=============================================================================== 00047064 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 47064: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47068: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 4706e: 5280 addql #1,%d0 47070: 206e 0008 moveal %fp@(8),%a0 47074: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 4707a: 42a7 clrl %sp@- 4707c: 2f28 0008 movel %a0@(8),%sp@- 47080: 4868 0010 pea %a0@(16) 47084: 4eb9 0004 736c jsr 4736c <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4708a: 4fef 000c lea %sp@(12),%sp } 4708e: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 47090: 4ef9 0004 88ae jmp 488ae <_Thread_Enable_dispatch> ... =============================================================================== 00046f3e <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 46f3e: 4e56 0000 linkw %fp,#0 46f42: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46f44: 2479 0005 fc5e moveal 5fc5e <_API_extensions_List>,%a2 46f4a: b5fc 0005 fc62 cmpal #392290,%a2 46f50: 6710 beqs 46f62 <_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)(); 46f52: 206a 0008 moveal %a2@(8),%a0 46f56: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 46f58: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46f5a: b5fc 0005 fc62 cmpal #392290,%a2 46f60: 66f0 bnes 46f52 <_API_extensions_Run_postdriver+0x14> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 46f62: 246e fffc moveal %fp@(-4),%a2 46f66: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046f6a <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 46f6a: 4e56 0000 linkw %fp,#0 46f6e: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46f70: 2479 0005 fc5e moveal 5fc5e <_API_extensions_List>,%a2 46f76: b5fc 0005 fc62 cmpal #392290,%a2 46f7c: 6718 beqs 46f96 <_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 ); 46f7e: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 46f84: 206a 000c moveal %a2@(12),%a0 46f88: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 46f8a: 2452 moveal %a2@,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46f8c: 588f addql #4,%sp 46f8e: b5fc 0005 fc62 cmpal #392290,%a2 46f94: 66e8 bnes 46f7e <_API_extensions_Run_postswitch+0x14> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 46f96: 246e fffc moveal %fp@(-4),%a2 46f9a: 4e5e unlk %fp ... =============================================================================== 00049560 <_CORE_RWLock_Obtain_for_reading>: * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 49560: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 49566: 4e56 ffe8 linkw %fp,#-24 4956a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4956e: 246e 0008 moveal %fp@(8),%a2 49572: 2a2e 000c movel %fp@(12),%d5 49576: 282e 0014 movel %fp@(20),%d4 4957a: 162e 0013 moveb %fp@(19),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 4957e: 2679 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a3 * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 49584: 40c2 movew %sr,%d2 49586: 8082 orl %d2,%d0 49588: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 4958a: 202a 0044 movel %a2@(68),%d0 4958e: 661a bnes 495aa <_CORE_RWLock_Obtain_for_reading+0x4a> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 49590: 7001 moveq #1,%d0 the_rwlock->number_of_readers += 1; 49592: 52aa 0048 addql #1,%a2@(72) */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 49596: 2540 0044 movel %d0,%a2@(68) the_rwlock->number_of_readers += 1; _ISR_Enable( level ); 4959a: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4959c: 42ab 0034 clrl %a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 495a0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 495a6: 4e5e unlk %fp 495a8: 4e75 rts * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 495aa: 7201 moveq #1,%d1 495ac: b280 cmpl %d0,%d1 495ae: 674e beqs 495fe <_CORE_RWLock_Obtain_for_reading+0x9e> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 495b0: 4a03 tstb %d3 495b2: 6612 bnes 495c6 <_CORE_RWLock_Obtain_for_reading+0x66> _ISR_Enable( level ); 495b4: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 495b6: 7202 moveq #2,%d1 495b8: 2741 0034 movel %d1,%a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 495bc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 495c2: 4e5e unlk %fp 495c4: 4e75 rts 495c6: 7001 moveq #1,%d0 495c8: 2540 0030 movel %d0,%a2@(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; 495cc: 274a 0044 movel %a2,%a3@(68) executing->Wait.id = id; 495d0: 2745 0020 movel %d5,%a3@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 495d4: 42ab 0030 clrl %a3@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 495d8: 42ab 0034 clrl %a3@(52) _ISR_Enable( level ); 495dc: 46c2 movew %d2,%sr _Thread_queue_Enqueue_with_handler( 495de: 2d44 000c movel %d4,%fp@(12) 495e2: 223c 0004 978c movel #300940,%d1 495e8: 2d4a 0008 movel %a2,%fp@(8) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 495ec: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 495f2: 2d41 0010 movel %d1,%fp@(16) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 495f6: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 495f8: 4ef9 0004 b104 jmp 4b104 <_Thread_queue_Enqueue_with_handler> executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 495fe: 2f0a movel %a2,%sp@- 49600: 4eb9 0004 b4a4 jsr 4b4a4 <_Thread_queue_First> if ( !waiter ) { 49606: 588f addql #4,%sp 49608: 4a80 tstl %d0 4960a: 66a4 bnes 495b0 <_CORE_RWLock_Obtain_for_reading+0x50><== NEVER TAKEN the_rwlock->number_of_readers += 1; 4960c: 52aa 0048 addql #1,%a2@(72) _ISR_Enable( level ); 49610: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 49612: 42ab 0034 clrl %a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49616: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4961c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049620 <_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 ); 49620: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 49626: 4e56 fff4 linkw %fp,#-12 4962a: 206e 0008 moveal %fp@(8),%a0 4962e: 48d7 001c moveml %d2-%d4,%sp@ 49632: 282e 000c movel %fp@(12),%d4 49636: 262e 0014 movel %fp@(20),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 4963a: 2279 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 49640: 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 ); 49644: 40c1 movew %sr,%d1 49646: 8081 orl %d1,%d0 49648: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 4964a: 4aa8 0044 tstl %a0@(68) 4964e: 6614 bnes 49664 <_CORE_RWLock_Obtain_for_writing+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 49650: 7002 moveq #2,%d0 49652: 2140 0044 movel %d0,%a0@(68) _ISR_Enable( level ); 49656: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 49658: 42a9 0034 clrl %a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4965c: 4cd7 001c moveml %sp@,%d2-%d4 49660: 4e5e unlk %fp 49662: 4e75 rts /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 49664: 4a02 tstb %d2 49666: 6610 bnes 49678 <_CORE_RWLock_Obtain_for_writing+0x58> _ISR_Enable( level ); 49668: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4966a: 7002 moveq #2,%d0 _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4966c: 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; 49670: 2340 0034 movel %d0,%a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49674: 4e5e unlk %fp 49676: 4e75 rts 49678: 7001 moveq #1,%d0 4967a: 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; 4967e: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 49682: 2344 0020 movel %d4,%a1@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 49686: 2340 0030 movel %d0,%a1@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4968a: 42a9 0034 clrl %a1@(52) _ISR_Enable( level ); 4968e: 46c1 movew %d1,%sr _Thread_queue_Enqueue_with_handler( 49690: 2d43 000c movel %d3,%fp@(12) 49694: 203c 0004 978c movel #300940,%d0 4969a: 2d48 0008 movel %a0,%fp@(8) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4969e: 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( 496a2: 2d40 0010 movel %d0,%fp@(16) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 496a6: 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( 496a8: 4ef9 0004 b104 jmp 4b104 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 000496b0 <_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 ); 496b0: 203c 0000 0700 movel #1792,%d0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 496b6: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 496ba: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 496c0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 496c4: 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 ); 496c8: 40c1 movew %sr,%d1 496ca: 8081 orl %d1,%d0 496cc: 46c0 movew %d0,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 496ce: 202a 0044 movel %a2@(68),%d0 496d2: 6700 0090 beqw 49764 <_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 ) { 496d6: 7401 moveq #1,%d2 496d8: b480 cmpl %d0,%d2 496da: 676e beqs 4974a <_CORE_RWLock_Release+0x9a> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 496dc: 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; 496e0: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 496e4: 46c1 movew %d1,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 496e6: 2f0a movel %a2,%sp@- 496e8: 4eb9 0004 af94 jsr 4af94 <_Thread_queue_Dequeue> if ( next ) { 496ee: 588f addql #4,%sp 496f0: 4a80 tstl %d0 496f2: 674a beqs 4973e <_CORE_RWLock_Release+0x8e> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 496f4: 7201 moveq #1,%d1 496f6: 2040 moveal %d0,%a0 496f8: b2a8 0030 cmpl %a0@(48),%d1 496fc: 677c beqs 4977a <_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; 496fe: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 49700: 52aa 0048 addql #1,%a2@(72) 49704: 47f9 0004 b4a4 lea 4b4a4 <_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 ); 4970a: 49f9 0004 b354 lea 4b354 <_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; 49710: 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 ); 49714: 2f0a movel %a2,%sp@- 49716: 4e93 jsr %a3@ if ( !next || 49718: 588f addql #4,%sp 4971a: 4a80 tstl %d0 4971c: 6720 beqs 4973e <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN 4971e: 7401 moveq #1,%d2 49720: 2040 moveal %d0,%a0 49722: b4a8 0030 cmpl %a0@(48),%d2 49726: 6716 beqs 4973e <_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; 49728: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4972c: 2f00 movel %d0,%sp@- 4972e: 2f0a movel %a2,%sp@- 49730: 4e94 jsr %a4@ } 49732: 508f addql #8,%sp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 49734: 2f0a movel %a2,%sp@- 49736: 4e93 jsr %a3@ if ( !next || 49738: 588f addql #4,%sp 4973a: 4a80 tstl %d0 4973c: 66e0 bnes 4971e <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4973e: 4280 clrl %d0 49740: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49746: 4e5e unlk %fp 49748: 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; 4974a: 202a 0048 movel %a2@(72),%d0 4974e: 5380 subql #1,%d0 49750: 2540 0048 movel %d0,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 49754: 6786 beqs 496dc <_CORE_RWLock_Release+0x2c> /* must be unlocked again */ _ISR_Enable( level ); 49756: 46c1 movew %d1,%sr } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49758: 4280 clrl %d0 4975a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49760: 4e5e unlk %fp 49762: 4e75 rts * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 49764: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 49766: 103c 0002 moveb #2,%d0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4976a: 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; 49770: 2140 0034 movel %d0,%a0@(52) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49774: 4280 clrl %d0 49776: 4e5e unlk %fp 49778: 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; 4977a: 7002 moveq #2,%d0 4977c: 2540 0044 movel %d0,%a2@(68) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49780: 4280 clrl %d0 49782: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49788: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004978c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 4978c: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49790: 486e fffc pea %fp@(-4) 49794: 2f2e 0008 movel %fp@(8),%sp@- 49798: 4eb9 0004 abd4 jsr 4abd4 <_Thread_Get> switch ( location ) { 4979e: 508f addql #8,%sp 497a0: 4aae fffc tstl %fp@(-4) 497a4: 6618 bnes 497be <_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 ); 497a6: 2f00 movel %d0,%sp@- 497a8: 4eb9 0004 b5e0 jsr 4b5e0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 497ae: 588f addql #4,%sp 497b0: 2039 0006 2910 movel 62910 <_Thread_Dispatch_disable_level>,%d0 497b6: 5380 subql #1,%d0 497b8: 23c0 0006 2910 movel %d0,62910 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 497be: 4e5e unlk %fp ... =============================================================================== 00048418 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 48418: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4841e: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 48422: 2279 0006 1800 moveal 61800 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 48428: 48d7 001c moveml %d2-%d4,%sp@ 4842c: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 48430: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 48434: 242e 000c movel %fp@(12),%d2 48438: 262e 0014 movel %fp@(20),%d3 4843c: 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 ); 48440: 40c1 movew %sr,%d1 48442: 8081 orl %d1,%d0 48444: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 48446: 2028 0048 movel %a0@(72),%d0 4844a: 5280 addql #1,%d0 4844c: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 48450: 4aa8 0040 tstl %a0@(64) 48454: 6606 bnes 4845c <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == 48456: b0a8 0044 cmpl %a0@(68),%d0 4845a: 672e beqs 4848a <_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; 4845c: 7001 moveq #1,%d0 4845e: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 48462: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 48466: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4846a: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4846c: 2d43 000c movel %d3,%fp@(12) 48470: 203c 0004 a4c4 movel #304324,%d0 48476: 2d48 0008 movel %a0,%fp@(8) } 4847a: 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 ); 4847e: 2d40 0010 movel %d0,%fp@(16) } 48482: 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 ); 48484: 4ef9 0004 a0fc jmp 4a0fc <_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; 4848a: 7001 moveq #1,%d0 4848c: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 48490: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 48492: 2d44 0010 movel %d4,%fp@(16) 48496: 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 ); } 4849a: 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 ); 4849e: 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 ); } 484a2: 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 ); 484a4: 4ef9 0004 d878 jmp 4d878 <_CORE_barrier_Release> ... =============================================================================== 0005a014 <_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 ) { 5a014: 4e56 ffe0 linkw %fp,#-32 5a018: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5a01c: 266e 0008 moveal %fp@(8),%a3 5a020: 282e 000c movel %fp@(12),%d4 5a024: 242e 0010 movel %fp@(16),%d2 5a028: 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 ) { 5a02c: b4ab 004c cmpl %a3@(76),%d2 5a030: 6262 bhis 5a094 <_CORE_message_queue_Broadcast+0x80><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 5a032: 4aab 0048 tstl %a3@(72) 5a036: 664c bnes 5a084 <_CORE_message_queue_Broadcast+0x70> /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a038: 2f0b movel %a3,%sp@- 5a03a: 49f9 0005 c92c lea 5c92c <_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 ) { 5a040: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5a042: 4bf9 0006 2da8 lea 62da8 ,%a5 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a048: 4e94 jsr %a4@ 5a04a: 588f addql #4,%sp 5a04c: 2440 moveal %d0,%a2 5a04e: 4a80 tstl %d0 5a050: 6722 beqs 5a074 <_CORE_message_queue_Broadcast+0x60> 5a052: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5a054: 5283 addql #1,%d3 5a056: 2f04 movel %d4,%sp@- 5a058: 2f2a 002c movel %a2@(44),%sp@- 5a05c: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 5a05e: 206a 0028 moveal %a2@(40),%a0 5a062: 4fef 000c lea %sp@(12),%sp 5a066: 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 = 5a068: 2f0b movel %a3,%sp@- 5a06a: 4e94 jsr %a4@ 5a06c: 588f addql #4,%sp 5a06e: 2440 moveal %d0,%a2 5a070: 4a80 tstl %d0 5a072: 66de bnes 5a052 <_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; 5a074: 2045 moveal %d5,%a0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5a076: 4280 clrl %d0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 5a078: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a07a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5a080: 4e5e unlk %fp 5a082: 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; 5a084: 2045 moveal %d5,%a0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5a086: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a088: 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; 5a08e: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a090: 4e5e unlk %fp 5a092: 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; 5a094: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a096: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5a09c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e68c <_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 ) { 4e68c: 4e56 0000 linkw %fp,#0 4e690: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4e692: 2f2e 0010 movel %fp@(16),%sp@- 4e696: 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 ) { 4e69a: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4e69e: 2f0a movel %a2,%sp@- 4e6a0: 4eb9 0005 0934 jsr 50934 <_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 ) 4e6a6: 4fef 000c lea %sp@(12),%sp 4e6aa: 4aaa 0048 tstl %a2@(72) 4e6ae: 6612 bnes 4e6c2 <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4e6b0: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 4e6b6: 246e fffc moveal %fp@(-4),%a2 4e6ba: 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 ); 4e6bc: 4ef9 0005 1752 jmp 51752 <_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 ); 4e6c2: 2f0a movel %a2,%sp@- 4e6c4: 4eb9 0004 e6e0 jsr 4e6e0 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 4e6ca: 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 ); 4e6d0: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 4e6d2: 246e fffc moveal %fp@(-4),%a2 4e6d6: 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 ); 4e6d8: 4ef9 0005 1752 jmp 51752 <_Workspace_Free> ... =============================================================================== 00050338 <_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)) { 50338: 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 ) { 5033a: 4e56 fff4 linkw %fp,#-12 5033e: 202e 0014 movel %fp@(20),%d0 50342: 48d7 040c moveml %d2-%d3/%a2,%sp@ 50346: 246e 0008 moveal %fp@(8),%a2 5034a: 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)) { 5034e: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 50350: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 50354: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 50358: 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; 5035c: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 50360: 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)) { 50364: 4a81 tstl %d1 50366: 6718 beqs 50380 <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); 50368: 2200 movel %d0,%d1 5036a: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 5036c: 76fc moveq #-4,%d3 5036e: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 50370: b280 cmpl %d0,%d1 50372: 640e bccs 50382 <_CORE_message_queue_Initialize+0x4a><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 50374: 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; 5037a: 4200 clrb %d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 5037c: 4e5e unlk %fp 5037e: 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)) { 50380: 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)); 50382: 2601 movel %d1,%d3 50384: 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 * 5038a: 2003 movel %d3,%d0 5038c: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 50390: b280 cmpl %d0,%d1 50392: 62e0 bhis 50374 <_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 ); 50394: 2f00 movel %d0,%sp@- 50396: 4eb9 0005 3346 jsr 53346 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 5039c: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 5039e: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 503a2: 67d0 beqs 50374 <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 503a4: 2f03 movel %d3,%sp@- 503a6: 2f02 movel %d2,%sp@- 503a8: 2f00 movel %d0,%sp@- 503aa: 486a 0068 pea %a2@(104) 503ae: 4eb9 0005 5b1c jsr 55b1c <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 503b4: 4878 0006 pea 6 503b8: 7001 moveq #1,%d0 503ba: 206e 000c moveal %fp@(12),%a0 503be: b090 cmpl %a0@,%d0 503c0: 57c0 seq %d0 503c2: 4878 0080 pea 80 503c6: 49c0 extbl %d0 503c8: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 503ca: 41ea 0054 lea %a2@(84),%a0 503ce: 2f00 movel %d0,%sp@- 503d0: 2548 0050 movel %a0,%a2@(80) the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 503d4: 41ea 0050 lea %a2@(80),%a0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 503d8: 42aa 0054 clrl %a2@(84) 503dc: 2548 0058 movel %a0,%a2@(88) _Thread_queue_Initialize( 503e0: 2f0a movel %a2,%sp@- 503e2: 4eb9 0005 2684 jsr 52684 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 503e8: 4fef 0020 lea %sp@(32),%sp } 503ec: 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; 503f2: 7001 moveq #1,%d0 } 503f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00055b84 <_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 ) { 55b84: 4e56 0000 linkw %fp,#0 55b88: 226e 000c moveal %fp@(12),%a1 55b8c: 2f0b movel %a3,%sp@- 55b8e: 202e 0010 movel %fp@(16),%d0 55b92: 2f0a movel %a2,%sp@- 55b94: 206e 0008 moveal %fp@(8),%a0 55b98: 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 ) { 55b9c: 0c80 7fff ffff cmpil #2147483647,%d0 55ba2: 6760 beqs 55c04 <_CORE_message_queue_Insert_message+0x80> _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 ) { 55ba4: 0c80 8000 0000 cmpil #-2147483648,%d0 55baa: 6700 008e beqw 55c3a <_CORE_message_queue_Insert_message+0xb6> 55bae: 2208 movel %a0,%d1 55bb0: 0681 0000 0054 addil #84,%d1 Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 55bb6: 2468 0050 moveal %a0@(80),%a2 while ( !_Chain_Is_tail( the_header, the_node ) ) { 55bba: b28a cmpl %a2,%d1 55bbc: 670c beqs 55bca <_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 ) { 55bbe: b0aa 0008 cmpl %a2@(8),%d0 55bc2: 6d06 blts 55bca <_CORE_message_queue_Insert_message+0x46> the_node = the_node->next; 55bc4: 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 = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 55bc6: b28a cmpl %a2,%d1 55bc8: 66f4 bnes 55bbe <_CORE_message_queue_Insert_message+0x3a> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 55bca: 203c 0000 0700 movel #1792,%d0 55bd0: 40c1 movew %sr,%d1 55bd2: 8081 orl %d1,%d0 55bd4: 46c0 movew %d0,%sr SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 55bd6: 246a 0004 moveal %a2@(4),%a2 } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55bda: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55bde: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 55be0: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 55be4: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 55be6: 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; 55bea: 228b movel %a3,%a1@ _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 55bec: 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 ) 55bee: 2268 0060 moveal %a0@(96),%a1 55bf2: 4a89 tstl %a1 55bf4: 673c beqs 55c32 <_CORE_message_queue_Insert_message+0xae> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 55bf6: 245f moveal %sp@+,%a2 * 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); 55bf8: 2d68 0064 0008 movel %a0@(100),%fp@(8) #endif } 55bfe: 265f moveal %sp@+,%a3 55c00: 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); 55c02: 4ed1 jmp %a1@ 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 ); 55c04: 203c 0000 0700 movel #1792,%d0 55c0a: 40c1 movew %sr,%d1 55c0c: 8081 orl %d1,%d0 55c0e: 46c0 movew %d0,%sr SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55c10: 52a8 0048 addql #1,%a0@(72) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 55c14: 45e8 0054 lea %a0@(84),%a2 55c18: 228a movel %a2,%a1@ ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 55c1a: 2468 0058 moveal %a0@(88),%a2 the_chain->last = the_node; 55c1e: 2149 0058 movel %a1,%a0@(88) old_last_node->next = the_node; 55c22: 2489 movel %a1,%a2@ the_node->previous = old_last_node; 55c24: 234a 0004 movel %a2,%a1@(4) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55c28: 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 ) 55c2a: 2268 0060 moveal %a0@(96),%a1 55c2e: 4a89 tstl %a1 55c30: 66c4 bnes 55bf6 <_CORE_message_queue_Insert_message+0x72><== NEVER TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 55c32: 245f moveal %sp@+,%a2 55c34: 265f moveal %sp@+,%a3 55c36: 4e5e unlk %fp 55c38: 4e75 rts 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 ) { _ISR_Disable( level ); 55c3a: 203c 0000 0700 movel #1792,%d0 55c40: 40c1 movew %sr,%d1 55c42: 8081 orl %d1,%d0 55c44: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Prepend_unprotected( 55c46: 45e8 0050 lea %a0@(80),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55c4a: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55c4e: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 55c50: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 55c54: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 55c56: 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; 55c5a: 228b movel %a3,%a1@ _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55c5c: 46c1 movew %d1,%sr 55c5e: 608e bras 55bee <_CORE_message_queue_Insert_message+0x6a> =============================================================================== 000503f8 <_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 ); 503f8: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 503fe: 4e56 ffe8 linkw %fp,#-24 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 50402: 2279 0006 9f44 moveal 69f44 <_Per_CPU_Information+0xc>,%a1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 50408: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 5040c: 246e 0008 moveal %fp@(8),%a2 50410: 282e 000c movel %fp@(12),%d4 50414: 262e 0010 movel %fp@(16),%d3 50418: 206e 0014 moveal %fp@(20),%a0 5041c: 286e 001c moveal %fp@(28),%a4 50420: 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; 50424: 42a9 0034 clrl %a1@(52) _ISR_Disable( level ); 50428: 40c1 movew %sr,%d1 5042a: 8081 orl %d1,%d0 5042c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5042e: 200a movel %a2,%d0 50430: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 50436: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 5043a: b08b cmpl %a3,%d0 5043c: 6700 0088 beqw 504c6 <_CORE_message_queue_Seize+0xce> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 50440: 2253 moveal %a3@,%a1 CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get_unprotected( &the_message_queue->Pending_messages ); 50442: 49ea 0050 lea %a2@(80),%a4 the_chain->first = new_first; 50446: 2549 0050 movel %a1,%a2@(80) 5044a: 234c 0004 movel %a4,%a1@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 5044e: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 50452: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 50454: 2279 0006 9f44 moveal 69f44 <_Per_CPU_Information+0xc>,%a1 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; 5045a: 20ab 000c movel %a3@(12),%a0@ _Thread_Executing->Wait.count = _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 5045e: 240b movel %a3,%d2 50460: 0682 0000 0010 addil #16,%d2 if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 50466: 236b 0008 0024 movel %a3@(8),%a1@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5046c: 49f9 0005 88d4 lea 588d4 ,%a4 50472: 2f10 movel %a0@,%sp@- 50474: 2f02 movel %d2,%sp@- 50476: 2f03 movel %d3,%sp@- 50478: 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 ); 5047a: 2f0a movel %a2,%sp@- 5047c: 4eb9 0005 2258 jsr 52258 <_Thread_queue_Dequeue> if ( !the_thread ) { 50482: 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 ); 50486: 2040 moveal %d0,%a0 if ( !the_thread ) { 50488: 4a80 tstl %d0 5048a: 6700 0088 beqw 50514 <_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; 5048e: 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; 50492: 2768 0024 0008 movel %a0@(36),%a3@(8) 50498: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5049c: 2f00 movel %d0,%sp@- 5049e: 2f28 002c movel %a0@(44),%sp@- 504a2: 2f02 movel %d2,%sp@- 504a4: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 504a6: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 504ac: 4fef 000c lea %sp@(12),%sp 504b0: 2d4b 000c movel %a3,%fp@(12) 504b4: 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 ); } 504b8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 504be: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 504c0: 4ef9 0005 5b84 jmp 55b84 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 504c6: 4a02 tstb %d2 504c8: 6612 bnes 504dc <_CORE_message_queue_Seize+0xe4> _ISR_Enable( level ); 504ca: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 504cc: 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 ); } 504ce: 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; 504d4: 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 ); } 504d8: 4e5e unlk %fp 504da: 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; 504dc: 7001 moveq #1,%d0 504de: 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; 504e2: 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; 504e6: 234a 0044 movel %a2,%a1@(68) executing->Wait.id = id; 504ea: 2344 0020 movel %d4,%a1@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 504ee: 2348 0028 movel %a0,%a1@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 504f2: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 504f4: 2d4c 000c movel %a4,%fp@(12) 504f8: 49f9 0005 2790 lea 52790 <_Thread_queue_Timeout>,%a4 504fe: 2d4a 0008 movel %a2,%fp@(8) 50502: 2d4c 0010 movel %a4,%fp@(16) } 50506: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5050c: 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 ); 5050e: 4ef9 0005 23c8 jmp 523c8 <_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 ); 50514: 45ea 0068 lea %a2@(104),%a2 50518: 2d4b 000c movel %a3,%fp@(12) 5051c: 2d4a 0008 movel %a2,%fp@(8) } 50520: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50526: 4e5e unlk %fp 50528: 4ef9 0005 026c jmp 5026c <_Chain_Append> ... =============================================================================== 00050530 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 50530: 4e56 ffec linkw %fp,#-20 50534: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 50538: 246e 0008 moveal %fp@(8),%a2 5053c: 242e 0010 movel %fp@(16),%d2 50540: 282e 001c movel %fp@(28),%d4 50544: 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 ) { 50548: b4aa 004c cmpl %a2@(76),%d2 5054c: 6228 bhis 50576 <_CORE_message_queue_Submit+0x46> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 5054e: 202a 0048 movel %a2@(72),%d0 50552: 672e beqs 50582 <_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 < 50554: b0aa 0044 cmpl %a2@(68),%d0 50558: 6500 00ba bcsw 50614 <_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 ) { 5055c: 4a03 tstb %d3 5055e: 6700 00f4 beqw 50654 <_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() ) { 50562: 4ab9 0006 9f40 tstl 69f40 <_Per_CPU_Information+0x8> 50568: 6754 beqs 505be <_CORE_message_queue_Submit+0x8e> return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; 5056a: 7003 moveq #3,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5056c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50572: 4e5e unlk %fp 50574: 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; 50576: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50578: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5057e: 4e5e unlk %fp 50580: 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 ); 50582: 2f0a movel %a2,%sp@- 50584: 4eb9 0005 2258 jsr 52258 <_Thread_queue_Dequeue> if ( the_thread ) { 5058a: 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 ); 5058c: 2640 moveal %d0,%a3 if ( the_thread ) { 5058e: 4a80 tstl %d0 50590: 6700 00ce beqw 50660 <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50594: 2f02 movel %d2,%sp@- 50596: 2f2e 000c movel %fp@(12),%sp@- 5059a: 2f2b 002c movel %a3@(44),%sp@- 5059e: 4eb9 0005 88d4 jsr 588d4 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 505a4: 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; 505a8: 4fef 000c lea %sp@(12),%sp 505ac: 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; 505ae: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 505b0: 2744 0024 movel %d4,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 505b4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 505ba: 4e5e unlk %fp 505bc: 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; 505be: 2079 0006 9f44 moveal 69f44 <_Per_CPU_Information+0xc>,%a0 ISR_Level level; _ISR_Disable( level ); 505c4: 203c 0000 0700 movel #1792,%d0 505ca: 40c1 movew %sr,%d1 505cc: 8081 orl %d1,%d0 505ce: 46c0 movew %d0,%sr 505d0: 7001 moveq #1,%d0 505d2: 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; 505d6: 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; 505da: 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; 505e0: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; 505e4: 2140 002c movel %d0,%a0@(44) executing->Wait.option = (uint32_t) size; 505e8: 2142 0030 movel %d2,%a0@(48) executing->Wait.count = submit_type; 505ec: 2144 0024 movel %d4,%a0@(36) _ISR_Enable( level ); 505f0: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 505f2: 4879 0005 2790 pea 52790 <_Thread_queue_Timeout> 505f8: 2f2e 0024 movel %fp@(36),%sp@- 505fc: 2f0a movel %a2,%sp@- 505fe: 4eb9 0005 23c8 jsr 523c8 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 50604: 4fef 000c lea %sp@(12),%sp 50608: 7007 moveq #7,%d0 #endif } 5060a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50610: 4e5e unlk %fp 50612: 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 ); 50614: 486a 0068 pea %a2@(104) 50618: 4eb9 0005 02cc jsr 502cc <_Chain_Get> 5061e: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50620: 2f02 movel %d2,%sp@- 50622: 2f2e 000c movel %fp@(12),%sp@- 50626: 486b 0010 pea %a3@(16) 5062a: 4eb9 0005 88d4 jsr 588d4 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 50630: 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; 50634: 2744 0008 movel %d4,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 50638: 2f04 movel %d4,%sp@- 5063a: 2f0b movel %a3,%sp@- 5063c: 2f0a movel %a2,%sp@- 5063e: 4eb9 0005 5b84 jsr 55b84 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 50644: 4fef 001c lea %sp@(28),%sp 50648: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5064a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50650: 4e5e unlk %fp 50652: 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; 50654: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50656: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5065c: 4e5e unlk %fp 5065e: 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 ) { 50660: 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 < 50664: b0aa 0044 cmpl %a2@(68),%d0 50668: 6400 fef2 bccw 5055c <_CORE_message_queue_Submit+0x2c> 5066c: 60a6 bras 50614 <_CORE_message_queue_Submit+0xe4> ... =============================================================================== 00047140 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 47140: 4e56 0000 linkw %fp,#0 47144: 206e 0008 moveal %fp@(8),%a0 47148: 2f0a movel %a2,%sp@- 4714a: 246e 000c moveal %fp@(12),%a2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 4714e: 224a moveal %a2,%a1 47150: 2159 0040 movel %a1@+,%a0@(64) 47154: 2159 0044 movel %a1@+,%a0@(68) 47158: 2159 0048 movel %a1@+,%a0@(72) CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 4715c: 202e 0010 movel %fp@(16),%d0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 47160: 3151 004c movew %a1@,%a0@(76) the_mutex->lock = initial_lock; 47164: 2140 004e movel %d0,%a0@(78) the_mutex->blocked_count = 0; 47168: 42a8 0056 clrl %a0@(86) if ( initial_lock == CORE_MUTEX_LOCKED ) { 4716c: 4a80 tstl %d0 4716e: 6654 bnes 471c4 <_CORE_mutex_Initialize+0x84> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 47170: 2279 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a1 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 47176: 7201 moveq #1,%d1 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 47178: 2169 0008 005e movel %a1@(8),%a0@(94) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 4717e: 2028 0046 movel %a0@(70),%d0 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 47182: 2141 0052 movel %d1,%a0@(82) the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 47186: 123c 0002 moveb #2,%d1 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 4718a: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4718e: b280 cmpl %d0,%d1 47190: 6762 beqs 471f4 <_CORE_mutex_Initialize+0xb4> 47192: 123c 0003 moveb #3,%d1 47196: b280 cmpl %d0,%d1 47198: 675a beqs 471f4 <_CORE_mutex_Initialize+0xb4> <== NEVER TAKEN the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4719a: 4aaa 0006 tstl %a2@(6) 4719e: 56c0 sne %d0 471a0: 4878 0005 pea 5 471a4: 49c0 extbl %d0 471a6: 4878 0400 pea 400 471aa: 4480 negl %d0 471ac: 2f00 movel %d0,%sp@- 471ae: 2f08 movel %a0,%sp@- 471b0: 4eb9 0004 90c0 jsr 490c0 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 471b6: 4fef 0010 lea %sp@(16),%sp 471ba: 4280 clrl %d0 } 471bc: 246e fffc moveal %fp@(-4),%a2 471c0: 4e5e unlk %fp 471c2: 4e75 rts the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 471c4: 4aaa 0006 tstl %a2@(6) 471c8: 56c0 sne %d0 #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 471ca: 42a8 0052 clrl %a0@(82) the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 471ce: 49c0 extbl %d0 471d0: 4480 negl %d0 _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 471d2: 42a8 005a clrl %a0@(90) the_mutex->holder_id = 0; 471d6: 42a8 005e clrl %a0@(94) } _Thread_queue_Initialize( 471da: 4878 0005 pea 5 471de: 4878 0400 pea 400 471e2: 2f00 movel %d0,%sp@- 471e4: 2f08 movel %a0,%sp@- 471e6: 4eb9 0004 90c0 jsr 490c0 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 471ec: 4fef 0010 lea %sp@(16),%sp 471f0: 4280 clrl %d0 471f2: 60c8 bras 471bc <_CORE_mutex_Initialize+0x7c> the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 471f4: 2028 004a movel %a0@(74),%d0 471f8: b0a9 0014 cmpl %a1@(20),%d0 471fc: 6228 bhis 47226 <_CORE_mutex_Initialize+0xe6> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 471fe: 52a9 001c addql #1,%a1@(28) the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 47202: 4aaa 0006 tstl %a2@(6) 47206: 56c0 sne %d0 47208: 4878 0005 pea 5 4720c: 49c0 extbl %d0 4720e: 4878 0400 pea 400 47212: 4480 negl %d0 47214: 2f00 movel %d0,%sp@- 47216: 2f08 movel %a0,%sp@- 47218: 4eb9 0004 90c0 jsr 490c0 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 4721e: 4fef 0010 lea %sp@(16),%sp 47222: 4280 clrl %d0 47224: 6096 bras 471bc <_CORE_mutex_Initialize+0x7c> } 47226: 246e fffc moveal %fp@(-4),%a2 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; 4722a: 7006 moveq #6,%d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 4722c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000472bc <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 472bc: 4e56 0000 linkw %fp,#0 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 472c0: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 472c6: 2f0a movel %a2,%sp@- 472c8: 246e 0008 moveal %fp@(8),%a2 472cc: 2f02 movel %d2,%sp@- 472ce: 142e 0013 moveb %fp@(19),%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 472d2: 4a80 tstl %d0 472d4: 6704 beqs 472da <_CORE_mutex_Seize+0x1e> 472d6: 4a02 tstb %d2 472d8: 6634 bnes 4730e <_CORE_mutex_Seize+0x52> <== ALWAYS TAKEN 472da: 486e 0018 pea %fp@(24) 472de: 2f0a movel %a2,%sp@- 472e0: 4eb9 0004 c5ac jsr 4c5ac <_CORE_mutex_Seize_interrupt_trylock> 472e6: 508f addql #8,%sp 472e8: 4a80 tstl %d0 472ea: 6716 beqs 47302 <_CORE_mutex_Seize+0x46> 472ec: 4a02 tstb %d2 472ee: 6636 bnes 47326 <_CORE_mutex_Seize+0x6a> 472f0: 202e 0018 movel %fp@(24),%d0 472f4: 46c0 movew %d0,%sr 472f6: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 472fc: 7001 moveq #1,%d0 472fe: 2140 0034 movel %d0,%a0@(52) } 47302: 242e fff8 movel %fp@(-8),%d2 47306: 246e fffc moveal %fp@(-4),%a2 4730a: 4e5e unlk %fp 4730c: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 4730e: 7001 moveq #1,%d0 47310: b0b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d0 47316: 64c2 bccs 472da <_CORE_mutex_Seize+0x1e> 47318: 4878 0012 pea 12 4731c: 42a7 clrl %sp@- 4731e: 42a7 clrl %sp@- 47320: 4eb9 0004 7a24 jsr 47a24 <_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; 47326: 7001 moveq #1,%d0 47328: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 4732e: 2540 0030 movel %d0,%a2@(48) 47332: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 47338: 5280 addql #1,%d0 4733a: 216e 000c 0020 movel %fp@(12),%a0@(32) 47340: 214a 0044 movel %a2,%a0@(68) 47344: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> 4734a: 202e 0018 movel %fp@(24),%d0 4734e: 46c0 movew %d0,%sr 47350: 2f2e 0014 movel %fp@(20),%sp@- 47354: 2f0a movel %a2,%sp@- 47356: 4eb9 0004 7230 jsr 47230 <_CORE_mutex_Seize_interrupt_blocking> } 4735c: 242e fff8 movel %fp@(-8),%d2 bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 47360: 508f addql #8,%sp } 47362: 246e fffc moveal %fp@(-4),%a2 47366: 4e5e unlk %fp ... =============================================================================== 000474c0 <_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 ) { 474c0: 4e56 0000 linkw %fp,#0 474c4: 2f0a movel %a2,%sp@- 474c6: 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)) ) { 474ca: 2f0a movel %a2,%sp@- 474cc: 4eb9 0004 8c94 jsr 48c94 <_Thread_queue_Dequeue> 474d2: 588f addql #4,%sp 474d4: 4a80 tstl %d0 474d6: 670a beqs 474e2 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 474d8: 246e fffc moveal %fp@(-4),%a2 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 474dc: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 474de: 4e5e unlk %fp 474e0: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 474e2: 303c 0700 movew #1792,%d0 474e6: 40c1 movew %sr,%d1 474e8: 8081 orl %d1,%d0 474ea: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 474ec: 202a 0048 movel %a2@(72),%d0 474f0: b0aa 0040 cmpl %a2@(64),%d0 474f4: 6412 bccs 47508 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN the_semaphore->count += 1; 474f6: 5280 addql #1,%d0 474f8: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 474fc: 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 ); 474fe: 46c1 movew %d1,%sr } return status; } 47500: 246e fffc moveal %fp@(-4),%a2 47504: 4e5e unlk %fp 47506: 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; 47508: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 4750a: 46c1 movew %d1,%sr <== NOT EXECUTED 4750c: 60f2 bras 47500 <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED ... =============================================================================== 0004c544 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4c544: 4e56 fff0 linkw %fp,#-16 4c548: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4c54c: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4c550: 224a moveal %a2,%a1 4c552: 282e 000c movel %fp@(12),%d4 4c556: 262e 0010 movel %fp@(16),%d3 4c55a: 242e 0014 movel %fp@(20),%d2 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 4c55e: 42aa 0004 clrl %a2@(4) next = starting_address; while ( count-- ) { 4c562: 4a83 tstl %d3 4c564: 6732 beqs 4c598 <_Chain_Initialize+0x54> <== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 4c566: 2044 moveal %d4,%a0 4c568: 2003 movel %d3,%d0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c56a: 2208 movel %a0,%d1 4c56c: d282 addl %d2,%d1 4c56e: 5380 subql #1,%d0 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 4c570: 2288 movel %a0,%a1@ next->previous = current; 4c572: 2149 0004 movel %a1,%a0@(4) count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4c576: 4a80 tstl %d0 4c578: 6714 beqs 4c58e <_Chain_Initialize+0x4a> 4c57a: 2248 moveal %a0,%a1 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 4c57c: 2041 moveal %d1,%a0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c57e: 2208 movel %a0,%d1 4c580: d282 addl %d2,%d1 4c582: 5380 subql #1,%d0 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 4c584: 2288 movel %a0,%a1@ next->previous = current; 4c586: 2149 0004 movel %a1,%a0@(4) count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4c58a: 4a80 tstl %d0 4c58c: 66ec bnes 4c57a <_Chain_Initialize+0x36> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c58e: 5383 subql #1,%d3 4c590: 4c02 3800 mulsl %d2,%d3 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4c594: 2244 moveal %d4,%a1 4c596: d3c3 addal %d3,%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c598: 200a movel %a2,%d0 4c59a: 5880 addql #4,%d0 4c59c: 2280 movel %d0,%a1@ current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 4c59e: 2549 0008 movel %a1,%a2@(8) } 4c5a2: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4c5a6: 4e5e unlk %fp ... =============================================================================== 00045ff4 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 45ff4: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 45ffa: 4e56 ffec linkw %fp,#-20 45ffe: 222e 0008 movel %fp@(8),%d1 46002: 48d7 043c moveml %d2-%d5/%a2,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 46006: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 4600c: 242e 000c movel %fp@(12),%d2 46010: 2a2e 0010 movel %fp@(16),%d5 46014: 226e 0014 moveal %fp@(20),%a1 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 46018: 42aa 0034 clrl %a2@(52) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4601c: 206a 010a moveal %a2@(266),%a0 _ISR_Disable( level ); 46020: 40c4 movew %sr,%d4 46022: 8084 orl %d4,%d0 46024: 46c0 movew %d0,%sr pending_events = api->pending_events; 46026: 2610 movel %a0@,%d3 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 ); 46028: 2001 movel %d1,%d0 4602a: c083 andl %d3,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 4602c: 670c beqs 4603a <_Event_Seize+0x46> 4602e: b081 cmpl %d1,%d0 46030: 6700 0084 beqw 460b6 <_Event_Seize+0xc2> (seized_events == event_in || _Options_Is_any( option_set )) ) { 46034: 0802 0001 btst #1,%d2 46038: 667c bnes 460b6 <_Event_Seize+0xc2> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 4603a: 0802 0000 btst #0,%d2 4603e: 6662 bnes 460a2 <_Event_Seize+0xae> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 46040: 2542 0030 movel %d2,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 46044: 7401 moveq #1,%d2 * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 46046: 2541 0024 movel %d1,%a2@(36) executing->Wait.return_argument = event_out; 4604a: 2549 0028 movel %a1,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4604e: 23c2 0006 031a movel %d2,6031a <_Event_Sync_state> _ISR_Enable( level ); 46054: 46c4 movew %d4,%sr if ( ticks ) { 46056: 4a85 tstl %d5 46058: 6672 bnes 460cc <_Event_Seize+0xd8> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 4605a: 4878 0100 pea 100 4605e: 2f0a movel %a2,%sp@- 46060: 4eb9 0004 9274 jsr 49274 <_Thread_Set_state> _ISR_Disable( level ); 46066: 203c 0000 0700 movel #1792,%d0 4606c: 40c1 movew %sr,%d1 4606e: 8081 orl %d1,%d0 46070: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 46072: 7401 moveq #1,%d2 46074: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 46076: 2039 0006 031a movel 6031a <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4607c: 42b9 0006 031a clrl 6031a <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 46082: b480 cmpl %d0,%d2 46084: 6700 00a4 beqw 4612a <_Event_Seize+0x136> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 46088: 2d4a 000c movel %a2,%fp@(12) 4608c: 2d41 0010 movel %d1,%fp@(16) } 46090: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 46096: 2d40 0008 movel %d0,%fp@(8) } 4609a: 4e5e unlk %fp * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 4609c: 4ef9 0004 8314 jmp 48314 <_Thread_blocking_operation_Cancel> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 460a2: 46c4 movew %d4,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 460a4: 720d moveq #13,%d1 460a6: 2541 0034 movel %d1,%a2@(52) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 460aa: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; 460b0: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 460b2: 4e5e unlk %fp 460b4: 4e75 rts 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) ); 460b6: 2200 movel %d0,%d1 460b8: 4681 notl %d1 460ba: c283 andl %d3,%d1 460bc: 2081 movel %d1,%a0@ if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 460be: 46c4 movew %d4,%sr *event_out = seized_events; 460c0: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 460c2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 460c8: 4e5e unlk %fp 460ca: 4e75 rts _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 460cc: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 460d0: 223c 0004 62bc movel #287420,%d1 the_watchdog->id = id; 460d6: 2540 0068 movel %d0,%a2@(104) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 460da: 2541 0064 movel %d1,%a2@(100) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 460de: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 460e2: 42aa 006c clrl %a2@(108) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 460e6: 2545 0054 movel %d5,%a2@(84) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 460ea: 486a 0048 pea %a2@(72) 460ee: 4879 0005 fb9e pea 5fb9e <_Watchdog_Ticks_chain> 460f4: 4eb9 0004 9ab8 jsr 49ab8 <_Watchdog_Insert> 460fa: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 460fc: 4878 0100 pea 100 46100: 2f0a movel %a2,%sp@- 46102: 4eb9 0004 9274 jsr 49274 <_Thread_Set_state> _ISR_Disable( level ); 46108: 203c 0000 0700 movel #1792,%d0 4610e: 40c1 movew %sr,%d1 46110: 8081 orl %d1,%d0 46112: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 46114: 7401 moveq #1,%d2 46116: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 46118: 2039 0006 031a movel 6031a <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4611e: 42b9 0006 031a clrl 6031a <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 46124: b480 cmpl %d0,%d2 46126: 6600 ff60 bnew 46088 <_Event_Seize+0x94> _ISR_Enable( level ); 4612a: 46c1 movew %d1,%sr * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4612c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46132: 4e5e unlk %fp ... =============================================================================== 00046194 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 46194: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 4619a: 4e56 ffec linkw %fp,#-20 4619e: 48d7 043c moveml %d2-%d5/%a2,%sp@ 461a2: 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 ]; 461a6: 206a 010a moveal %a2@(266),%a0 option_set = (rtems_option) the_thread->Wait.option; 461aa: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 461ae: 40c3 movew %sr,%d3 461b0: 8083 orl %d3,%d0 461b2: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 461b4: 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 ); 461b8: 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; 461ba: 2410 movel %a0@,%d2 461bc: 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 ) ) { 461be: 6776 beqs 46236 <_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() && 461c0: 4ab9 0005 ff68 tstl 5ff68 <_Per_CPU_Information+0x8> 461c6: 670a beqs 461d2 <_Event_Surrender+0x3e> 461c8: b5f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a2 461ce: 6700 00a0 beqw 46270 <_Event_Surrender+0xdc> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 461d2: 2a2a 0010 movel %a2@(16),%d5 461d6: 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 ) ) { 461dc: 674c beqs 4622a <_Event_Surrender+0x96> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 461de: b081 cmpl %d1,%d0 461e0: 6706 beqs 461e8 <_Event_Surrender+0x54> 461e2: 0804 0001 btst #1,%d4 461e6: 6742 beqs 4622a <_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) ); 461e8: 2200 movel %d0,%d1 461ea: 4681 notl %d1 461ec: c282 andl %d2,%d1 461ee: 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; 461f0: 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; 461f4: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 461f8: 2080 movel %d0,%a0@ _ISR_Flash( level ); 461fa: 203c 0000 0700 movel #1792,%d0 46200: 46c3 movew %d3,%sr 46202: 8083 orl %d3,%d0 46204: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 46206: 7a02 moveq #2,%d5 46208: baaa 0050 cmpl %a2@(80),%d5 4620c: 6734 beqs 46242 <_Event_Surrender+0xae> _ISR_Enable( level ); 4620e: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 46210: 2f3c 1003 fff8 movel #268697592,%sp@- 46216: 2f0a movel %a2,%sp@- 46218: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> 4621e: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 46220: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46226: 4e5e unlk %fp 46228: 4e75 rts _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 4622a: 46c3 movew %d3,%sr } 4622c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46232: 4e5e unlk %fp 46234: 4e75 rts /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 46236: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 46238: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4623e: 4e5e unlk %fp 46240: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 46242: 7003 moveq #3,%d0 46244: 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 ); 46248: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4624a: 486a 0048 pea %a2@(72) 4624e: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 46254: 2f3c 1003 fff8 movel #268697592,%sp@- 4625a: 2f0a movel %a2,%sp@- 4625c: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> 46262: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 46266: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4626c: 4e5e unlk %fp 4626e: 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) || 46270: 2279 0006 031a moveal 6031a <_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 ) && 46276: 7a02 moveq #2,%d5 46278: ba89 cmpl %a1,%d5 4627a: 6710 beqs 4628c <_Event_Surrender+0xf8> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4627c: 2279 0006 031a moveal 6031a <_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) || 46282: 1a3c 0001 moveb #1,%d5 46286: ba89 cmpl %a1,%d5 46288: 6600 ff48 bnew 461d2 <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4628c: b081 cmpl %d1,%d0 4628e: 6706 beqs 46296 <_Event_Surrender+0x102> 46290: 0804 0001 btst #1,%d4 46294: 671a beqs 462b0 <_Event_Surrender+0x11c> <== NEVER TAKEN 46296: 2200 movel %d0,%d1 46298: 4681 notl %d1 4629a: c282 andl %d2,%d1 4629c: 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; 4629e: 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; 462a2: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 462a6: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 462a8: 7003 moveq #3,%d0 462aa: 23c0 0006 031a movel %d0,6031a <_Event_Sync_state> } _ISR_Enable( level ); 462b0: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 462b2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000462bc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 462bc: 4e56 fffc linkw %fp,#-4 462c0: 2f03 movel %d3,%sp@- 462c2: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 462c4: 486e fffc pea %fp@(-4) 462c8: 2f2e 0008 movel %fp@(8),%sp@- 462cc: 4eb9 0004 88d4 jsr 488d4 <_Thread_Get> switch ( location ) { 462d2: 508f addql #8,%sp 462d4: 4aae fffc tstl %fp@(-4) 462d8: 6642 bnes 4631c <_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 ); 462da: 223c 0000 0700 movel #1792,%d1 462e0: 40c2 movew %sr,%d2 462e2: 8282 orl %d2,%d1 462e4: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 462e6: 2040 moveal %d0,%a0 462e8: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 462ec: b0b9 0005 ff6c cmpl 5ff6c <_Per_CPU_Information+0xc>,%d0 462f2: 6734 beqs 46328 <_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; 462f4: 7606 moveq #6,%d3 462f6: 2040 moveal %d0,%a0 462f8: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 462fc: 46c2 movew %d2,%sr 462fe: 2f3c 1003 fff8 movel #268697592,%sp@- 46304: 2f00 movel %d0,%sp@- 46306: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 4630c: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4630e: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 46314: 5380 subql #1,%d0 46316: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4631c: 242e fff4 movel %fp@(-12),%d2 46320: 262e fff8 movel %fp@(-8),%d3 46324: 4e5e unlk %fp 46326: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 46328: 2239 0006 031a movel 6031a <_Event_Sync_state>,%d1 4632e: 7601 moveq #1,%d3 46330: b681 cmpl %d1,%d3 46332: 66c0 bnes 462f4 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 46334: 7606 moveq #6,%d3 46336: 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; 46338: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4633a: 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; 4633e: 23c1 0006 031a movel %d1,6031a <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 46344: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 46346: 2f3c 1003 fff8 movel #268697592,%sp@- 4634c: 2f00 movel %d0,%sp@- 4634e: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 46354: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 46356: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 4635c: 5380 subql #1,%d0 4635e: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> 46364: 60b6 bras 4631c <_Event_Timeout+0x60> ... =============================================================================== 0004c78c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c78c: 4e56 ffcc linkw %fp,#-52 4c790: 226e 000c moveal %fp@(12),%a1 4c794: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c798: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 4c79c: 2e09 movel %a1,%d7 4c79e: 5887 addql #4,%d7 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 4c7a0: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c7a4: 222e 0010 movel %fp@(16),%d1 4c7a8: 282e 0014 movel %fp@(20),%d4 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c7ac: 206a 0008 moveal %a2@(8),%a0 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 4c7b0: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4c7b4: be89 cmpl %a1,%d7 4c7b6: 6500 0144 bcsw 4c8fc <_Heap_Allocate_aligned_with_boundary+0x170> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4c7ba: 4a84 tstl %d4 4c7bc: 6600 013a bnew 4c8f8 <_Heap_Allocate_aligned_with_boundary+0x16c> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4c7c0: b1ca cmpal %a2,%a0 4c7c2: 6700 0138 beqw 4c8fc <_Heap_Allocate_aligned_with_boundary+0x170> 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 4c7c6: 242e fffc movel %fp@(-4),%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 4c7ca: 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 4c7cc: 5e82 addql #7,%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 4c7ce: 9c89 subl %a1,%d6 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4c7d0: 4283 clrl %d3 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 4c7d2: 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 4c7d4: 2d42 fff8 movel %d2,%fp@(-8) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 4c7d8: 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 ) { 4c7dc: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4c7e0: 5283 addql #1,%d3 /* * 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 ) { 4c7e2: b08b cmpl %a3,%d0 4c7e4: 630e blss 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { 4c7e6: 4a81 tstl %d1 4c7e8: 6628 bnes 4c812 <_Heap_Allocate_aligned_with_boundary+0x86> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4c7ea: 2408 movel %a0,%d2 4c7ec: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4c7ee: 4a82 tstl %d2 4c7f0: 6600 00ea bnew 4c8dc <_Heap_Allocate_aligned_with_boundary+0x150> break; } block = block->next; 4c7f4: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4c7f8: b1ca cmpal %a2,%a0 4c7fa: 66e0 bnes 4c7dc <_Heap_Allocate_aligned_with_boundary+0x50> 4c7fc: 4280 clrl %d0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 4c7fe: b6aa 0044 cmpl %a2@(68),%d3 4c802: 6304 blss 4c808 <_Heap_Allocate_aligned_with_boundary+0x7c> stats->max_search = search_count; 4c804: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4c808: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4c80e: 4e5e unlk %fp 4c810: 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; 4c812: 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; 4c814: 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; 4c818: c087 andl %d7,%d0 4c81a: 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; 4c81e: 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; 4c820: 2a2e fff8 movel %fp@(-8),%d5 4c824: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4c826: 242e fff4 movel %fp@(-12),%d2 4c82a: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c82c: 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 4c82e: d085 addl %d5,%d0 4c830: 4c41 6005 remul %d1,%d5,%d6 4c834: 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 ) { 4c836: b480 cmpl %d0,%d2 4c838: 630a blss 4c844 <_Heap_Allocate_aligned_with_boundary+0xb8> 4c83a: 2a00 movel %d0,%d5 4c83c: 4c41 5002 remul %d1,%d2,%d5 4c840: 9082 subl %d2,%d0 4c842: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4c844: 4a84 tstl %d4 4c846: 676a beqs 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126> /* 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; 4c848: 2002 movel %d2,%d0 4c84a: d089 addl %a1,%d0 4c84c: 2c00 movel %d0,%d6 4c84e: 4c44 6005 remul %d4,%d5,%d6 4c852: 2c00 movel %d0,%d6 4c854: 9c85 subl %d5,%d6 4c856: 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 ) { 4c858: bc82 cmpl %d2,%d6 4c85a: 6356 blss 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126><== NEVER TAKEN 4c85c: bc80 cmpl %d0,%d6 4c85e: 6452 bccs 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126><== NEVER TAKEN alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4c860: 2c0d movel %a5,%d6 4c862: 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 ) { 4c864: ba86 cmpl %d6,%d5 4c866: 658c bcss 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68> return 0; } alloc_begin = boundary_line - alloc_size; 4c868: 2405 movel %d5,%d2 4c86a: 9489 subl %a1,%d2 4c86c: 2a02 movel %d2,%d5 4c86e: 4c41 5000 remul %d1,%d0,%d5 4c872: 9480 subl %d0,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4c874: 2002 movel %d2,%d0 4c876: d089 addl %a1,%d0 4c878: 2e00 movel %d0,%d7 4c87a: 4c44 7005 remul %d4,%d5,%d7 4c87e: 2e00 movel %d0,%d7 4c880: 9e85 subl %d5,%d7 4c882: 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 ) { 4c884: be82 cmpl %d2,%d7 4c886: 632a blss 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126><== NEVER TAKEN 4c888: be80 cmpl %d0,%d7 4c88a: 6426 bccs 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126><== NEVER TAKEN if ( boundary_line < boundary_floor ) { 4c88c: ba86 cmpl %d6,%d5 4c88e: 6500 ff64 bcsw 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68> return 0; } alloc_begin = boundary_line - alloc_size; 4c892: 2405 movel %d5,%d2 4c894: 9489 subl %a1,%d2 4c896: 2a02 movel %d2,%d5 4c898: 4c41 5000 remul %d1,%d0,%d5 4c89c: 9480 subl %d0,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4c89e: 2002 movel %d2,%d0 4c8a0: d089 addl %a1,%d0 4c8a2: 2e00 movel %d0,%d7 4c8a4: 4c44 7005 remul %d4,%d5,%d7 4c8a8: 2e00 movel %d0,%d7 4c8aa: 9e85 subl %d5,%d7 4c8ac: 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 ) { 4c8ae: be82 cmpl %d2,%d7 4c8b0: 62d6 bhis 4c888 <_Heap_Allocate_aligned_with_boundary+0xfc><== 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 ) { 4c8b2: b48d cmpl %a5,%d2 4c8b4: 6500 ff3e bcsw 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68> 4c8b8: 2e2e fffc movel %fp@(-4),%d7 4c8bc: 2c02 movel %d2,%d6 4c8be: 70f8 moveq #-8,%d0 4c8c0: 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); 4c8c2: d082 addl %d2,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c8c4: 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; 4c8c8: 9085 subl %d5,%d0 if ( free_size >= min_block_size || free_size == 0 ) { 4c8ca: b08c cmpl %a4,%d0 4c8cc: 6400 ff20 bccw 4c7ee <_Heap_Allocate_aligned_with_boundary+0x62> 4c8d0: 4a80 tstl %d0 4c8d2: 6600 ff20 bnew 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { 4c8d6: 4a82 tstl %d2 4c8d8: 6700 ff1a beqw 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4c8dc: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4c8de: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4c8e2: 2f02 movel %d2,%sp@- 4c8e4: 2f08 movel %a0,%sp@- 4c8e6: 2f0a movel %a2,%sp@- 4c8e8: 4eb9 0004 7908 jsr 47908 <_Heap_Block_allocate> 4c8ee: 4fef 0010 lea %sp@(16),%sp 4c8f2: 2002 movel %d2,%d0 4c8f4: 6000 ff08 braw 4c7fe <_Heap_Allocate_aligned_with_boundary+0x72> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4c8f8: b889 cmpl %a1,%d4 4c8fa: 640c bccs 4c908 <_Heap_Allocate_aligned_with_boundary+0x17c> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4c8fc: 4280 clrl %d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c8fe: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4c904: 4e5e unlk %fp 4c906: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4c908: 4a81 tstl %d1 4c90a: 6600 feb4 bnew 4c7c0 <_Heap_Allocate_aligned_with_boundary+0x34> alignment = page_size; 4c90e: 2200 movel %d0,%d1 4c910: 6000 feae braw 4c7c0 <_Heap_Allocate_aligned_with_boundary+0x34> =============================================================================== 00047908 <_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; 47908: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 4790a: 4e56 ffe0 linkw %fp,#-32 4790e: 206e 000c moveal %fp@(12),%a0 47912: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; } return block; } 47916: 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; 4791a: 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; 4791c: c082 andl %d2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 4791e: 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); 47922: 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; 47926: 2641 moveal %d1,%a3 47928: 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; 4792a: 2a0b movel %a3,%d5 4792c: 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; 4792e: c8ac 0004 andl %a4@(4),%d4 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 47932: 246e 0008 moveal %fp@(8),%a2 47936: 262e 0014 movel %fp@(20),%d3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 4793a: 4a84 tstl %d4 4793c: 6600 0092 bnew 479d0 <_Heap_Block_allocate+0xc8> if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; } return block; } 47940: 2828 0008 movel %a0@(8),%d4 { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 47944: 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; 47946: 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; 4794a: 2344 0008 movel %d4,%a1@(8) next->prev = prev; 4794e: 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 ); 47952: 91aa 0030 subl %d0,%a2@(48) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 47956: 53aa 0038 subql #1,%a2@(56) ++stats->used_blocks; 4795a: 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 ) { 4795e: 202a 0010 movel %a2@(16),%d0 47962: b085 cmpl %d5,%d0 47964: 6274 bhis 479da <_Heap_Block_allocate+0xd2> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 47966: 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); 4796a: 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; 4796c: 200b movel %a3,%d0 4796e: 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; 47970: 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; 47974: 99cb subal %a3,%a4 _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; if ( _Heap_Is_prev_used( block ) ) { 47976: 0802 0000 btst #0,%d2 4797a: 6778 beqs 479f4 <_Heap_Block_allocate+0xec> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4797c: 2a69 0008 moveal %a1@(8),%a5 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47980: 7401 moveq #1,%d2 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 47982: 2208 movel %a0,%d1 new_block->next = next; 47984: 214d 0008 movel %a5,%a0@(8) block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47988: 8480 orl %d0,%d2 new_block->prev = block_before; 4798a: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4798e: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 47992: 2b48 000c movel %a0,%a5@(12) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 47996: 52aa 0038 addql #1,%a2@(56) block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4799a: 2142 0004 movel %d2,%a0@(4) new_block->prev_size = block_size; 4799e: 2680 movel %d0,%a3@ new_block->size_and_flag = new_block_size; 479a0: 274c 0004 movel %a4,%a3@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 479a4: 2f03 movel %d3,%sp@- 479a6: 2f01 movel %d1,%sp@- 479a8: 2f0b movel %a3,%sp@- 479aa: 2f0a movel %a2,%sp@- 479ac: 4eb9 0004 7814 jsr 47814 <_Heap_Block_split> 479b2: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 479b6: 202a 0030 movel %a2@(48),%d0 479ba: b0aa 0034 cmpl %a2@(52),%d0 479be: 6404 bccs 479c4 <_Heap_Block_allocate+0xbc> stats->min_free_size = stats->free_size; 479c0: 2540 0034 movel %d0,%a2@(52) } return block; } 479c4: 200b movel %a3,%d0 479c6: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 479cc: 4e5e unlk %fp 479ce: 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 ) { 479d0: 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 ); 479d4: 224a moveal %a2,%a1 } if ( alloc_area_offset < heap->page_size ) { 479d6: b085 cmpl %d5,%d0 479d8: 638c blss 47966 <_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 ); 479da: 2645 moveal %d5,%a3 479dc: 4873 3800 pea %a3@(00000000,%d3:l) 479e0: 2648 moveal %a0,%a3 479e2: 2f09 movel %a1,%sp@- 479e4: 2f08 movel %a0,%sp@- 479e6: 2f0a movel %a2,%sp@- 479e8: 4eb9 0004 7814 jsr 47814 <_Heap_Block_split> 479ee: 4fef 0010 lea %sp@(16),%sp 479f2: 60c2 bras 479b6 <_Heap_Block_allocate+0xae> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 479f4: 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; 479f6: 74fe moveq #-2,%d2 Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 479f8: 2209 movel %a1,%d1 479fa: c4a8 0004 andl %a0@(4),%d2 479fe: d082 addl %d2,%d0 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47a00: 7401 moveq #1,%d2 47a02: 8480 orl %d0,%d2 new_block->prev_size = block_size; 47a04: 2680 movel %d0,%a3@ block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47a06: 2142 0004 movel %d2,%a0@(4) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 47a0a: 274c 0004 movel %a4,%a3@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 47a0e: 2f03 movel %d3,%sp@- 47a10: 2f01 movel %d1,%sp@- 47a12: 2f0b movel %a3,%sp@- 47a14: 2f0a movel %a2,%sp@- 47a16: 4eb9 0004 7814 jsr 47814 <_Heap_Block_split> 47a1c: 4fef 0010 lea %sp@(16),%sp 47a20: 6094 bras 479b6 <_Heap_Block_allocate+0xae> ... =============================================================================== 0004cc20 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4cc20: 4e56 ffcc linkw %fp,#-52 4cc24: 202e 0010 movel %fp@(16),%d0 4cc28: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cc2c: 246e 0008 moveal %fp@(8),%a2 4cc30: 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; 4cc34: 2602 movel %d2,%d3 4cc36: 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; 4cc38: 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; 4cc3c: 282a 0010 movel %a2@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 4cc40: 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; 4cc44: 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; 4cc48: 42ae fffc clrl %fp@(-4) Heap_Block *extend_last_block = NULL; 4cc4c: 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 ) { 4cc50: b682 cmpl %d2,%d3 4cc52: 640c bccs 4cc60 <_Heap_Extend+0x40> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4cc54: 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; 4cc5a: 4200 clrb %d0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4cc5c: 4e5e unlk %fp 4cc5e: 4e75 rts if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4cc60: 486e fff8 pea %fp@(-8) 4cc64: 486e fffc pea %fp@(-4) 4cc68: 2f01 movel %d1,%sp@- 4cc6a: 2f04 movel %d4,%sp@- 4cc6c: 2f00 movel %d0,%sp@- 4cc6e: 2f02 movel %d2,%sp@- 4cc70: 4eb9 0004 7980 jsr 47980 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4cc76: 4fef 0018 lea %sp@(24),%sp 4cc7a: 4a00 tstb %d0 4cc7c: 67d6 beqs 4cc54 <_Heap_Extend+0x34> 4cc7e: 2045 moveal %d5,%a0 4cc80: 9bcd subal %a5,%a5 4cc82: 97cb subal %a3,%a3 4cc84: 99cc subal %a4,%a4 4cc86: 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; 4cc8a: ba88 cmpl %a0,%d5 4cc8c: 6700 014a beqw 4cdd8 <_Heap_Extend+0x1b8> 4cc90: 2208 movel %a0,%d1 uintptr_t const sub_area_end = start_block->prev_size; 4cc92: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4cc94: b082 cmpl %d2,%d0 4cc96: 6304 blss 4cc9c <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4cc98: b681 cmpl %d1,%d3 4cc9a: 62b8 bhis 4cc54 <_Heap_Extend+0x34> ) { return false; } if ( extend_area_end == sub_area_begin ) { 4cc9c: b681 cmpl %d1,%d3 4cc9e: 6700 0132 beqw 4cdd2 <_Heap_Extend+0x1b2> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4cca2: b083 cmpl %d3,%d0 4cca4: 6304 blss 4ccaa <_Heap_Extend+0x8a> 4cca6: 2d48 fff4 movel %a0,%fp@(-12) 4ccaa: 2e00 movel %d0,%d7 4ccac: 2240 moveal %d0,%a1 4ccae: 5189 subql #8,%a1 4ccb0: 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); 4ccb4: 93c1 subal %d1,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4ccb6: b480 cmpl %d0,%d2 4ccb8: 6700 0100 beqw 4cdba <_Heap_Extend+0x19a> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4ccbc: b082 cmpl %d2,%d0 4ccbe: 6402 bccs 4ccc2 <_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 ) 4ccc0: 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; 4ccc2: 70fe moveq #-2,%d0 4ccc4: 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); 4ccc8: 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 ); 4cccc: b1c5 cmpal %d5,%a0 4ccce: 66ba bnes 4cc8a <_Heap_Extend+0x6a> if ( extend_area_begin < heap->area_begin ) { 4ccd0: b4aa 0018 cmpl %a2@(24),%d2 4ccd4: 6500 010a bcsw 4cde0 <_Heap_Extend+0x1c0> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 4ccd8: b6aa 001c cmpl %a2@(28),%d3 4ccdc: 6304 blss 4cce2 <_Heap_Extend+0xc2> heap->area_end = extend_area_end; 4ccde: 2543 001c movel %d3,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4cce2: 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 = 4cce6: 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; 4cce8: 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; 4ccea: 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 = 4ccee: 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; 4ccf0: 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; 4ccf2: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4ccf4: 2141 0004 movel %d1,%a0@(4) extend_last_block->prev_size = extend_first_block_size; 4ccf8: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4ccfa: 42a9 0004 clrl %a1@(4) if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4ccfe: b1ea 0020 cmpal %a2@(32),%a0 4cd02: 6400 0104 bccw 4ce08 <_Heap_Extend+0x1e8> heap->first_block = extend_first_block; 4cd06: 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 ) { 4cd0a: 4a8c tstl %a4 4cd0c: 6700 0148 beqw 4ce56 <_Heap_Extend+0x236> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4cd10: 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 ); 4cd14: 5082 addql #8,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4cd16: 2802 movel %d2,%d4 4cd18: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4cd1c: 4a81 tstl %d1 4cd1e: 6704 beqs 4cd24 <_Heap_Extend+0x104> <== ALWAYS TAKEN return value - remainder + alignment; 4cd20: d480 addl %d0,%d2 <== NOT EXECUTED 4cd22: 9481 subl %d1,%d2 <== NOT EXECUTED uintptr_t const new_first_block_begin = 4cd24: 2042 moveal %d2,%a0 4cd26: 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 = 4cd28: 200c movel %a4,%d0 4cd2a: 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; 4cd2c: 7201 moveq #1,%d1 4cd2e: 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; 4cd30: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4cd32: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4cd36: 2f08 movel %a0,%sp@- 4cd38: 2f0a movel %a2,%sp@- 4cd3a: 4eba fec8 jsr %pc@(4cc04 <_Heap_Free_block>) 4cd3e: 508f addql #8,%sp link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4cd40: 4a8b tstl %a3 4cd42: 6700 00d4 beqw 4ce18 <_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, 4cd46: 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( 4cd48: 968b subl %a3,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4cd4a: 2203 movel %d3,%d1 4cd4c: 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; 4cd52: 7201 moveq #1,%d1 4cd54: 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) 4cd56: 202b 0004 movel %a3@(4),%d0 4cd5a: 9083 subl %d3,%d0 | HEAP_PREV_BLOCK_USED; 4cd5c: 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; 4cd5e: 7001 moveq #1,%d0 4cd60: 2781 3804 movel %d1,%a3@(00000004,%d3:l) 4cd64: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4cd68: 8680 orl %d0,%d3 4cd6a: 2743 0004 movel %d3,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4cd6e: 2f0b movel %a3,%sp@- 4cd70: 2f0a movel %a2,%sp@- 4cd72: 4eba fe90 jsr %pc@(4cc04 <_Heap_Free_block>) 4cd76: 508f addql #8,%sp extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4cd78: 4a8c tstl %a4 4cd7a: 6700 00c4 beqw 4ce40 <_Heap_Extend+0x220> _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4cd7e: 202a 0030 movel %a2@(48),%d0 4cd82: 9086 subl %d6,%d0 4cd84: 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; 4cd86: 7001 moveq #1,%d0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4cd88: 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( 4cd8c: 222a 0020 movel %a2@(32),%d1 4cd90: 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; 4cd92: c0a8 0004 andl %a0@(4),%d0 block->size_and_flag = size | flag; 4cd96: 8280 orl %d0,%d1 4cd98: 2141 0004 movel %d1,%a0@(4) _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; 4cd9c: ddaa 002c addl %d6,%a2@(44) if ( extended_size_ptr != NULL ) 4cda0: 4aae 0014 tstl %fp@(20) 4cda4: 6700 00ca beqw 4ce70 <_Heap_Extend+0x250> *extended_size_ptr = extended_size; 4cda8: 206e 0014 moveal %fp@(20),%a0 4cdac: 2086 movel %d6,%a0@ return true; } 4cdae: 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; 4cdb4: 7001 moveq #1,%d0 } 4cdb6: 4e5e unlk %fp 4cdb8: 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; 4cdba: 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 ) 4cdbc: 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; 4cdbe: 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; 4cdc2: 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); 4cdc4: 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 ); 4cdc8: b1c5 cmpal %d5,%a0 4cdca: 6600 febe bnew 4cc8a <_Heap_Extend+0x6a> 4cdce: 6000 ff00 braw 4ccd0 <_Heap_Extend+0xb0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4cdd2: 2848 moveal %a0,%a4 4cdd4: 6000 fed4 braw 4ccaa <_Heap_Extend+0x8a> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4cdd8: 222a 0018 movel %a2@(24),%d1 4cddc: 6000 feb4 braw 4cc92 <_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; 4cde0: 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 = 4cde4: 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; 4cde6: 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; 4cde8: 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 = 4cdec: 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; 4cdee: 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; 4cdf2: 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; 4cdf4: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4cdf6: 2141 0004 movel %d1,%a0@(4) extend_last_block->prev_size = extend_first_block_size; 4cdfa: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4cdfc: 42a9 0004 clrl %a1@(4) if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4ce00: b1ea 0020 cmpal %a2@(32),%a0 4ce04: 6500 ff00 bcsw 4cd06 <_Heap_Extend+0xe6> heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4ce08: b3ea 0024 cmpal %a2@(36),%a1 4ce0c: 6300 fefc blsw 4cd0a <_Heap_Extend+0xea> heap->last_block = extend_last_block; 4ce10: 2549 0024 movel %a1,%a2@(36) 4ce14: 6000 fef4 braw 4cd0a <_Heap_Extend+0xea> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4ce18: 4a8d tstl %a5 4ce1a: 6700 ff5c beqw 4cd78 <_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; 4ce1e: 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 ); 4ce20: 222e fffc movel %fp@(-4),%d1 4ce24: 928d subl %a5,%d1 4ce26: 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( 4ce2a: 206e fff8 moveal %fp@(-8),%a0 block->size_and_flag = size | flag; 4ce2e: 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; 4ce30: 7001 moveq #1,%d0 4ce32: 2b41 0004 movel %d1,%a5@(4) 4ce36: 81a8 0004 orl %d0,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4ce3a: 4a8c tstl %a4 4ce3c: 6600 ff40 bnew 4cd7e <_Heap_Extend+0x15e> 4ce40: 4a8b tstl %a3 4ce42: 6600 ff3a bnew 4cd7e <_Heap_Extend+0x15e> _Heap_Free_block( heap, extend_first_block ); 4ce46: 2f2e fffc movel %fp@(-4),%sp@- 4ce4a: 2f0a movel %a2,%sp@- 4ce4c: 4eba fdb6 jsr %pc@(4cc04 <_Heap_Free_block>) 4ce50: 508f addql #8,%sp 4ce52: 6000 ff2a braw 4cd7e <_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 ) { 4ce56: 4aae fff4 tstl %fp@(-12) 4ce5a: 6700 fee4 beqw 4cd40 <_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; 4ce5e: 202e fff4 movel %fp@(-12),%d0 4ce62: 7201 moveq #1,%d1 4ce64: 9089 subl %a1,%d0 4ce66: 8280 orl %d0,%d1 4ce68: 2341 0004 movel %d1,%a1@(4) 4ce6c: 6000 fed2 braw 4cd40 <_Heap_Extend+0x120> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4ce70: 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; 4ce76: 7001 moveq #1,%d0 <== NOT EXECUTED } 4ce78: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c914 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4c914: 4e56 ffe8 linkw %fp,#-24 4c918: 202e 000c movel %fp@(12),%d0 4c91c: 2040 moveal %d0,%a0 4c91e: 5188 subql #8,%a0 4c920: 226e 0008 moveal %fp@(8),%a1 4c924: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4c92a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 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 4c92e: 2029 0020 movel %a1@(32),%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c932: 91c1 subal %d1,%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; 4c934: b088 cmpl %a0,%d0 4c936: 6200 0098 bhiw 4c9d0 <_Heap_Free+0xbc> 4c93a: 2229 0024 movel %a1@(36),%d1 4c93e: b288 cmpl %a0,%d1 4c940: 6500 008e bcsw 4c9d0 <_Heap_Free+0xbc> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c944: 2628 0004 movel %a0@(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; 4c948: 74fe moveq #-2,%d2 4c94a: 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); 4c94c: 45f0 2800 lea %a0@(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; 4c950: b5c0 cmpal %d0,%a2 4c952: 657c bcss 4c9d0 <_Heap_Free+0xbc> <== NEVER TAKEN 4c954: b5c1 cmpal %d1,%a2 4c956: 6278 bhis 4c9d0 <_Heap_Free+0xbc> <== NEVER TAKEN 4c958: 282a 0004 movel %a2@(4),%d4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4c95c: 0804 0000 btst #0,%d4 4c960: 676e beqs 4c9d0 <_Heap_Free+0xbc> <== 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; 4c962: 7afe moveq #-2,%d5 4c964: c885 andl %d5,%d4 return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4c966: b5c1 cmpal %d1,%a2 4c968: 6700 00f6 beqw 4ca60 <_Heap_Free+0x14c> 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; 4c96c: 7a01 moveq #1,%d5 4c96e: cab2 4804 andl %a2@(00000004,%d4:l),%d5 #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4c972: 57c5 seq %d5 4c974: 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 ) ) { 4c976: 0803 0000 btst #0,%d3 4c97a: 665e bnes 4c9da <_Heap_Free+0xc6> uintptr_t const prev_size = block->prev_size; 4c97c: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4c97e: 91c3 subal %d3,%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; 4c980: b1c0 cmpal %d0,%a0 4c982: 654c bcss 4c9d0 <_Heap_Free+0xbc> <== NEVER TAKEN 4c984: b1c1 cmpal %d1,%a0 4c986: 6248 bhis 4c9d0 <_Heap_Free+0xbc> <== 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; 4c988: 7001 moveq #1,%d0 4c98a: c0a8 0004 andl %a0@(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) ) { 4c98e: 6740 beqs 4c9d0 <_Heap_Free+0xbc> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4c990: 4a05 tstb %d5 4c992: 6700 00d2 beqw 4ca66 <_Heap_Free+0x152> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c996: 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; 4c99a: d882 addl %d2,%d4 4c99c: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c99e: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c9a0: 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; 4c9a4: 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; 4c9a8: 8083 orl %d3,%d0 next->prev = prev; 4c9aa: 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; 4c9ae: 53a9 0038 subql #1,%a1@(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; 4c9b2: 2183 3800 movel %d3,%a0@(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; 4c9b6: 2140 0004 movel %d0,%a0@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c9ba: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4c9be: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4c9c2: d5a9 0030 addl %d2,%a1@(48) return( true ); 4c9c6: 7001 moveq #1,%d0 } 4c9c8: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4c9cc: 4e5e unlk %fp 4c9ce: 4e75 rts 4c9d0: 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 ); 4c9d4: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c9d6: 4e5e unlk %fp 4c9d8: 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 */ 4c9da: 4a05 tstb %d5 4c9dc: 6736 beqs 4ca14 <_Heap_Free+0x100> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c9de: 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; 4c9e2: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c9e4: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c9e6: 246a 000c moveal %a2@(12),%a2 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4c9ea: 214b 0008 movel %a3,%a0@(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; 4c9ee: 8084 orl %d4,%d0 new_block->prev = prev; 4c9f0: 214a 000c movel %a2,%a0@(12) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4c9f4: 2184 4800 movel %d4,%a0@(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; 4c9f8: 2140 0004 movel %d0,%a0@(4) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c9fc: 7001 moveq #1,%d0 next->prev = new_block; prev->next = new_block; 4c9fe: 2548 0008 movel %a0,%a2@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 4ca02: 2748 000c movel %a0,%a3@(12) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4ca06: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4ca0a: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4ca0e: d5a9 0030 addl %d2,%a1@(48) 4ca12: 60b4 bras 4c9c8 <_Heap_Free+0xb4> 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; 4ca14: 2029 0038 movel %a1@(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; 4ca18: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ca1a: 7afe moveq #-2,%d5 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4ca1c: 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; 4ca1e: 2669 0008 moveal %a1@(8),%a3 new_block->next = next; new_block->prev = block_before; 4ca22: 2149 000c movel %a1,%a0@(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; 4ca26: 8282 orl %d2,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4ca28: 214b 0008 movel %a3,%a0@(8) 4ca2c: 2141 0004 movel %d1,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ca30: cbaa 0004 andl %d5,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4ca34: 2748 000c movel %a0,%a3@(12) next_block->prev_size = block_size; 4ca38: 2482 movel %d2,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4ca3a: 2348 0008 movel %a0,%a1@(8) /* Statistics */ ++stats->free_blocks; 4ca3e: 2340 0038 movel %d0,%a1@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4ca42: b0a9 003c cmpl %a1@(60),%d0 4ca46: 6300 ff72 blsw 4c9ba <_Heap_Free+0xa6> stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4ca4a: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4ca4e: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4ca52: d5a9 0030 addl %d2,%a1@(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; 4ca56: 2340 003c movel %d0,%a1@(60) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4ca5a: 7001 moveq #1,%d0 4ca5c: 6000 ff6a braw 4c9c8 <_Heap_Free+0xb4> return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4ca60: 4205 clrb %d5 4ca62: 6000 ff12 braw 4c976 <_Heap_Free+0x62> 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; 4ca66: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ca68: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ca6a: 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; 4ca6c: 8283 orl %d3,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4ca6e: 2483 movel %d3,%a2@ /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4ca70: 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; 4ca72: 2141 0004 movel %d1,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ca76: cbaa 0004 andl %d5,%a2@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4ca7a: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4ca7e: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4ca82: d5a9 0030 addl %d2,%a1@(48) 4ca86: 6000 ff40 braw 4c9c8 <_Heap_Free+0xb4> ... =============================================================================== 00051a68 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 51a68: 4e56 fff0 linkw %fp,#-16 51a6c: 226e 0008 moveal %fp@(8),%a1 51a70: 48d7 041c moveml %d2-%d4/%a2,%sp@ 51a74: 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)); 51a78: 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; 51a7a: 2469 0020 moveal %a1@(32),%a2 Heap_Block *const end = the_heap->last_block; 51a7e: 2429 0024 movel %a1@(36),%d2 memset(the_info, 0, sizeof(*the_info)); 51a82: 4298 clrl %a0@+ 51a84: 4298 clrl %a0@+ 51a86: 4298 clrl %a0@+ 51a88: 4298 clrl %a0@+ 51a8a: 4298 clrl %a0@+ 51a8c: 4290 clrl %a0@ while ( the_block != end ) { 51a8e: b48a cmpl %a2,%d2 51a90: 6738 beqs 51aca <_Heap_Get_information+0x62> <== 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; 51a92: 2604 movel %d4,%d3 51a94: 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 ) { 51a9a: 222a 0004 movel %a2@(4),%d1 51a9e: 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; 51aa0: 2043 moveal %d3,%a0 51aa2: 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); 51aa4: 43f2 0800 lea %a2@(00000000,%d0:l),%a1 if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 51aa8: 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) ) 51aac: 0801 0000 btst #0,%d1 51ab0: 6602 bnes 51ab4 <_Heap_Get_information+0x4c> info = &the_info->Used; else info = &the_info->Free; 51ab2: 2044 moveal %d4,%a0 info->number++; 51ab4: 5290 addql #1,%a0@ 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 ) { 51ab6: 2449 moveal %a1,%a2 info = &the_info->Used; else info = &the_info->Free; info->number++; info->total += the_size; 51ab8: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 51abc: b0a8 0004 cmpl %a0@(4),%d0 51ac0: 6304 blss 51ac6 <_Heap_Get_information+0x5e> info->largest = the_size; 51ac2: 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 ) { 51ac6: b3c2 cmpal %d2,%a1 51ac8: 66d4 bnes 51a9e <_Heap_Get_information+0x36> if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 51aca: 4cd7 041c moveml %sp@,%d2-%d4/%a2 51ace: 4e5e unlk %fp ... =============================================================================== 0005c748 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5c748: 4e56 0000 linkw %fp,#0 5c74c: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5c750: 2040 moveal %d0,%a0 5c752: 5188 subql #8,%a0 5c754: 226e 0008 moveal %fp@(8),%a1 5c758: 2f02 movel %d2,%sp@- 5c75a: 2400 movel %d0,%d2 5c75c: 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); 5c762: 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 5c764: 2229 0020 movel %a1@(32),%d1 && (uintptr_t) block <= (uintptr_t) heap->last_block; 5c768: b288 cmpl %a0,%d1 5c76a: 6236 bhis 5c7a2 <_Heap_Size_of_alloc_area+0x5a> 5c76c: 2269 0024 moveal %a1@(36),%a1 5c770: b3c8 cmpal %a0,%a1 5c772: 652e bcss 5c7a2 <_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; 5c774: 74fe moveq #-2,%d2 5c776: 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); 5c77a: 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; 5c77c: b1c1 cmpal %d1,%a0 5c77e: 6522 bcss 5c7a2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN 5c780: b1c9 cmpal %a1,%a0 5c782: 621e bhis 5c7a2 <_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; 5c784: 7201 moveq #1,%d1 5c786: 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 ) 5c78a: 6716 beqs 5c7a2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5c78c: 7204 moveq #4,%d1 5c78e: 9280 subl %d0,%d1 5c790: 2001 movel %d1,%d0 5c792: d088 addl %a0,%d0 5c794: 226e 0010 moveal %fp@(16),%a1 return true; } 5c798: 241f movel %sp@+,%d2 5c79a: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5c79c: 2280 movel %d0,%a1@ return true; 5c79e: 7001 moveq #1,%d0 } 5c7a0: 4e75 rts 5c7a2: 241f movel %sp@+,%d2 5c7a4: 4e5e unlk %fp if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 5c7a6: 4200 clrb %d0 } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; } ... =============================================================================== 00048432 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 48432: 4e56 ffc4 linkw %fp,#-60 48436: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4843a: 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; 4843e: 4bfa ff94 lea %pc@(483d4 <_Heap_Walk_print_nothing>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 48442: 2a2e 000c movel %fp@(12),%d5 uintptr_t const page_size = heap->page_size; 48446: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 4844a: 2c2a 0014 movel %a2@(20),%d6 Heap_Block *const first_block = heap->first_block; 4844e: 282a 0020 movel %a2@(32),%d4 Heap_Block *const last_block = heap->last_block; 48452: 2e2a 0024 movel %a2@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 48456: 4a2e 0013 tstb %fp@(19) 4845a: 6704 beqs 48460 <_Heap_Walk+0x2e> 4845c: 4bfa ff7e lea %pc@(483dc <_Heap_Walk_print>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 48460: 7003 moveq #3,%d0 48462: b0b9 0006 20e2 cmpl 620e2 <_System_state_Current>,%d0 48468: 670c beqs 48476 <_Heap_Walk+0x44> block = next_block; } while ( block != first_block ); return true; } 4846a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 } block = next_block; } while ( block != first_block ); return true; 48470: 7001 moveq #1,%d0 } 48472: 4e5e unlk %fp 48474: 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)( 48476: 2f2a 000c movel %a2@(12),%sp@- 4847a: 2f2a 0008 movel %a2@(8),%sp@- 4847e: 2f07 movel %d7,%sp@- 48480: 2f04 movel %d4,%sp@- 48482: 2f2a 001c movel %a2@(28),%sp@- 48486: 2f2a 0018 movel %a2@(24),%sp@- 4848a: 2f06 movel %d6,%sp@- 4848c: 2f03 movel %d3,%sp@- 4848e: 4879 0005 e47f pea 5e47f <_Status_Object_name_errors_to_status+0x5d> 48494: 42a7 clrl %sp@- 48496: 2f05 movel %d5,%sp@- 48498: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 4849a: 4fef 002c lea %sp@(44),%sp 4849e: 4a83 tstl %d3 484a0: 6700 0082 beqw 48524 <_Heap_Walk+0xf2> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 484a4: 7003 moveq #3,%d0 484a6: c083 andl %d3,%d0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 484a8: 6600 0090 bnew 4853a <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 484ac: 2206 movel %d6,%d1 484ae: 4c43 1000 remul %d3,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 484b2: 4a80 tstl %d0 484b4: 6600 00a4 bnew 4855a <_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; 484b8: 2004 movel %d4,%d0 484ba: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 484bc: 4c43 0001 remul %d3,%d1,%d0 ); return false; } if ( 484c0: 4a81 tstl %d1 484c2: 6600 00ae bnew 48572 <_Heap_Walk+0x140> block = next_block; } while ( block != first_block ); return true; } 484c6: 2044 moveal %d4,%a0 484c8: 2228 0004 movel %a0@(4),%d1 484cc: 2d41 fff0 movel %d1,%fp@(-16) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 484d0: 0801 0000 btst #0,%d1 484d4: 6700 017e beqw 48654 <_Heap_Walk+0x222> - 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; 484d8: 2047 moveal %d7,%a0 484da: 72fe moveq #-2,%d1 484dc: 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); 484e0: 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; 484e2: 7201 moveq #1,%d1 484e4: c2a8 0004 andl %a0@(4),%d1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 484e8: 6724 beqs 4850e <_Heap_Walk+0xdc> ); return false; } if ( 484ea: b1c4 cmpal %d4,%a0 484ec: 6700 009c beqw 4858a <_Heap_Walk+0x158> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 484f0: 4879 0005 e5d9 pea 5e5d9 <_Status_Object_name_errors_to_status+0x1b7><== NOT EXECUTED 484f6: 4878 0001 pea 1 <== NOT EXECUTED 484fa: 2f05 movel %d5,%sp@- <== NOT EXECUTED 484fc: 4e95 jsr %a5@ <== NOT EXECUTED 484fe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48502: 4200 clrb %d0 <== NOT EXECUTED block = next_block; } while ( block != first_block ); return true; } 48504: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4850a: 4e5e unlk %fp 4850c: 4e75 rts return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 4850e: 4879 0005 e5c4 pea 5e5c4 <_Status_Object_name_errors_to_status+0x1a2> } if ( _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 48514: 4878 0001 pea 1 48518: 2f05 movel %d5,%sp@- 4851a: 4e95 jsr %a5@ 4851c: 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; 48520: 4200 clrb %d0 48522: 60e0 bras 48504 <_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" ); 48524: 4879 0005 e510 pea 5e510 <_Status_Object_name_errors_to_status+0xee> } if ( _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 4852a: 4878 0001 pea 1 4852e: 2f05 movel %d5,%sp@- 48530: 4e95 jsr %a5@ 48532: 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; 48536: 4200 clrb %d0 48538: 60ca bras 48504 <_Heap_Walk+0xd2> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 4853a: 2f03 movel %d3,%sp@- 4853c: 4879 0005 e523 pea 5e523 <_Status_Object_name_errors_to_status+0x101> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48542: 4878 0001 pea 1 48546: 2f05 movel %d5,%sp@- 48548: 4e95 jsr %a5@ 4854a: 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; 4854e: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48550: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48556: 4e5e unlk %fp 48558: 4e75 rts return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 4855a: 2f06 movel %d6,%sp@- 4855c: 4879 0005 e541 pea 5e541 <_Status_Object_name_errors_to_status+0x11f> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48562: 4878 0001 pea 1 48566: 2f05 movel %d5,%sp@- 48568: 4e95 jsr %a5@ 4856a: 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; 4856e: 4200 clrb %d0 48570: 60de bras 48550 <_Heap_Walk+0x11e> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 48572: 2f04 movel %d4,%sp@- 48574: 4879 0005 e565 pea 5e565 <_Status_Object_name_errors_to_status+0x143> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4857a: 4878 0001 pea 1 4857e: 2f05 movel %d5,%sp@- 48580: 4e95 jsr %a5@ 48582: 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; 48586: 4200 clrb %d0 48588: 60c6 bras 48550 <_Heap_Walk+0x11e> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 4858a: 202a 0010 movel %a2@(16),%d0 block = next_block; } while ( block != first_block ); return true; } 4858e: 206a 0008 moveal %a2@(8),%a0 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 48592: 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 ) { 48596: b1ca cmpal %a2,%a0 48598: 6700 032c beqw 488c6 <_Heap_Walk+0x494> block = next_block; } while ( block != first_block ); return true; } 4859c: 242a 0020 movel %a2@(32),%d2 485a0: 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; 485a4: b1c2 cmpal %d2,%a0 485a6: 6500 0092 bcsw 4863a <_Heap_Walk+0x208> 485aa: 286a 0024 moveal %a2@(36),%a4 485ae: b1cc cmpal %a4,%a0 485b0: 6200 0088 bhiw 4863a <_Heap_Walk+0x208> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 485b4: 47e8 0008 lea %a0@(8),%a3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 485b8: 200b movel %a3,%d0 485ba: 222e fffc movel %fp@(-4),%d1 485be: 4c41 0002 remul %d1,%d2,%d0 ); return false; } if ( 485c2: 4a82 tstl %d2 485c4: 6600 00a6 bnew 4866c <_Heap_Walk+0x23a> - 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; 485c8: 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; 485ca: 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; 485cc: c4a8 0004 andl %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; 485d0: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 485d4: 664a bnes 48620 <_Heap_Walk+0x1ee> <== NEVER TAKEN 485d6: 222e fff4 movel %fp@(-12),%d1 485da: 224a moveal %a2,%a1 485dc: 2648 moveal %a0,%a3 485de: 2d43 fff8 movel %d3,%fp@(-8) ); return false; } if ( free_block->prev != prev_block ) { 485e2: 2428 000c movel %a0@(12),%d2 485e6: b3c2 cmpal %d2,%a1 485e8: 6600 02c0 bnew 488aa <_Heap_Walk+0x478> return false; } prev_block = free_block; free_block = free_block->next; 485ec: 2068 0008 moveal %a0@(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 ) { 485f0: b1ca cmpal %a2,%a0 485f2: 6700 0092 beqw 48686 <_Heap_Walk+0x254> 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; 485f6: b1c1 cmpal %d1,%a0 485f8: 6540 bcss 4863a <_Heap_Walk+0x208> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 485fa: 2408 movel %a0,%d2 485fc: 5082 addql #8,%d2 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; 485fe: b9c8 cmpal %a0,%a4 48600: 6538 bcss 4863a <_Heap_Walk+0x208> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 48602: 202e fffc movel %fp@(-4),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48606: 224b moveal %a3,%a1 48608: 2648 moveal %a0,%a3 4860a: 4c40 2003 remul %d0,%d3,%d2 ); return false; } if ( 4860e: 4a83 tstl %d3 48610: 665a bnes 4866c <_Heap_Walk+0x23a> - 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; 48612: 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; 48614: 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; 48616: c4a8 0004 andl %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; 4861a: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 4861e: 67c2 beqs 485e2 <_Heap_Walk+0x1b0> (*printer)( 48620: 2f08 movel %a0,%sp@- 48622: 4879 0005 e658 pea 5e658 <_Status_Object_name_errors_to_status+0x236> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48628: 4878 0001 pea 1 4862c: 2f05 movel %d5,%sp@- 4862e: 4e95 jsr %a5@ 48630: 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; 48634: 4200 clrb %d0 48636: 6000 ff18 braw 48550 <_Heap_Walk+0x11e> 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)( 4863a: 2f08 movel %a0,%sp@- 4863c: 4879 0005 e608 pea 5e608 <_Status_Object_name_errors_to_status+0x1e6> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48642: 4878 0001 pea 1 48646: 2f05 movel %d5,%sp@- 48648: 4e95 jsr %a5@ 4864a: 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; 4864e: 4200 clrb %d0 48650: 6000 fefe braw 48550 <_Heap_Walk+0x11e> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 48654: 4879 0005 e596 pea 5e596 <_Status_Object_name_errors_to_status+0x174> } if ( _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 4865a: 4878 0001 pea 1 4865e: 2f05 movel %d5,%sp@- 48660: 4e95 jsr %a5@ 48662: 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; 48666: 4200 clrb %d0 48668: 6000 fe9a braw 48504 <_Heap_Walk+0xd2> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 4866c: 2f08 movel %a0,%sp@- 4866e: 4879 0005 e628 pea 5e628 <_Status_Object_name_errors_to_status+0x206> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48674: 4878 0001 pea 1 48678: 2f05 movel %d5,%sp@- 4867a: 4e95 jsr %a5@ 4867c: 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; 48680: 4200 clrb %d0 48682: 6000 fecc braw 48550 <_Heap_Walk+0x11e> 48686: 262e fff8 movel %fp@(-8),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 4868a: 2844 moveal %d4,%a4 4868c: 2d41 fff4 movel %d1,%fp@(-12) 48690: 222e fff4 movel %fp@(-12),%d1 48694: 2d43 fffc movel %d3,%fp@(-4) 48698: 262e fff0 movel %fp@(-16),%d3 4869c: 2d47 ffec movel %d7,%fp@(-20) - 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; 486a0: 74fe moveq #-2,%d2 486a2: 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); 486a4: 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; 486a8: b7c1 cmpal %d1,%a3 486aa: 657e bcss 4872a <_Heap_Walk+0x2f8> <== NEVER TAKEN 486ac: b7ea 0024 cmpal %a2@(36),%a3 486b0: 6278 bhis 4872a <_Heap_Walk+0x2f8> 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; 486b2: b9ee ffec cmpal %fp@(-20),%a4 486b6: 56c1 sne %d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 486b8: 202e fffc movel %fp@(-4),%d0 486bc: 2e02 movel %d2,%d7 486be: 3241 moveaw %d1,%a1 486c0: 4c40 7001 remul %d0,%d1,%d7 486c4: 2009 movel %a1,%d0 486c6: 4480 negl %d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 486c8: 4a81 tstl %d1 486ca: 6704 beqs 486d0 <_Heap_Walk+0x29e> 486cc: 4a00 tstb %d0 486ce: 667c bnes 4874c <_Heap_Walk+0x31a> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 486d0: b486 cmpl %d6,%d2 486d2: 6406 bccs 486da <_Heap_Walk+0x2a8> 486d4: 4a00 tstb %d0 486d6: 6600 008e bnew 48766 <_Heap_Walk+0x334> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 486da: b7cc cmpal %a4,%a3 486dc: 6206 bhis 486e4 <_Heap_Walk+0x2b2> 486de: 4a00 tstb %d0 486e0: 6600 00a8 bnew 4878a <_Heap_Walk+0x358> 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; 486e4: 7001 moveq #1,%d0 486e6: 7e01 moveq #1,%d7 486e8: c0ab 0004 andl %a3@(4),%d0 486ec: c687 andl %d7,%d3 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 486ee: 4a80 tstl %d0 486f0: 6700 00cc beqw 487be <_Heap_Walk+0x38c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 486f4: 4a83 tstl %d3 486f6: 6700 00ac beqw 487a4 <_Heap_Walk+0x372> (*printer)( 486fa: 2f02 movel %d2,%sp@- 486fc: 2f0c movel %a4,%sp@- 486fe: 4879 0005 e7fd pea 5e7fd <_Status_Object_name_errors_to_status+0x3db> 48704: 42a7 clrl %sp@- 48706: 2f05 movel %d5,%sp@- 48708: 4e95 jsr %a5@ 4870a: 4fef 0014 lea %sp@(20),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 4870e: b7c4 cmpal %d4,%a3 48710: 6700 fd58 beqw 4846a <_Heap_Walk+0x38> 48714: 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; 48718: 74fe moveq #-2,%d2 4871a: 284b moveal %a3,%a4 4871c: c483 andl %d3,%d2 4871e: 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); 48722: 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; 48726: b7c1 cmpal %d1,%a3 48728: 6482 bccs 486ac <_Heap_Walk+0x27a> <== 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)( 4872a: 2f0b movel %a3,%sp@- 4872c: 2f0c movel %a4,%sp@- 4872e: 4879 0005 e6a6 pea 5e6a6 <_Status_Object_name_errors_to_status+0x284> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48734: 4878 0001 pea 1 48738: 2f05 movel %d5,%sp@- 4873a: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 4873c: 4fef 0014 lea %sp@(20),%sp 48740: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48742: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48748: 4e5e unlk %fp 4874a: 4e75 rts return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 4874c: 2f02 movel %d2,%sp@- 4874e: 2f0c movel %a4,%sp@- 48750: 4879 0005 e6d3 pea 5e6d3 <_Status_Object_name_errors_to_status+0x2b1> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48756: 4878 0001 pea 1 4875a: 2f05 movel %d5,%sp@- 4875c: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 4875e: 4fef 0014 lea %sp@(20),%sp 48762: 4200 clrb %d0 48764: 60dc bras 48742 <_Heap_Walk+0x310> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 48766: 2f06 movel %d6,%sp@- 48768: 2f02 movel %d2,%sp@- 4876a: 2f0c movel %a4,%sp@- 4876c: 4879 0005 e701 pea 5e701 <_Status_Object_name_errors_to_status+0x2df> 48772: 4878 0001 pea 1 48776: 2f05 movel %d5,%sp@- 48778: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 4877a: 4fef 0018 lea %sp@(24),%sp block = next_block; } while ( block != first_block ); return true; } 4877e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 block, block_size, min_block_size ); return false; 48784: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48786: 4e5e unlk %fp 48788: 4e75 rts return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 4878a: 2f0b movel %a3,%sp@- 4878c: 2f0c movel %a4,%sp@- 4878e: 4879 0005 e72c pea 5e72c <_Status_Object_name_errors_to_status+0x30a> 48794: 4878 0001 pea 1 48798: 2f05 movel %d5,%sp@- 4879a: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 4879c: 4fef 0014 lea %sp@(20),%sp 487a0: 4200 clrb %d0 487a2: 609e bras 48742 <_Heap_Walk+0x310> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 487a4: 2f14 movel %a4@,%sp@- 487a6: 2f02 movel %d2,%sp@- 487a8: 2f0c movel %a4,%sp@- 487aa: 4879 0005 e814 pea 5e814 <_Status_Object_name_errors_to_status+0x3f2> 487b0: 42a7 clrl %sp@- 487b2: 2f05 movel %d5,%sp@- 487b4: 4e95 jsr %a5@ 487b6: 4fef 0018 lea %sp@(24),%sp 487ba: 6000 ff52 braw 4870e <_Heap_Walk+0x2dc> block = next_block; } while ( block != first_block ); return true; } 487be: 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)( 487c2: 43f9 0005 e44c lea 5e44c <_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 ? 487c8: 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)( 487cc: b2aa 000c cmpl %a2@(12),%d1 487d0: 670a beqs 487dc <_Heap_Walk+0x3aa> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 487d2: 43f9 0005 e394 lea 5e394 ,%a1 487d8: b28a cmpl %a2,%d1 487da: 6764 beqs 48840 <_Heap_Walk+0x40e> 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 ? 487dc: 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)( 487e0: 41f9 0005 e465 lea 5e465 <_Status_Object_name_errors_to_status+0x43>,%a0 487e6: b087 cmpl %d7,%d0 487e8: 670a beqs 487f4 <_Heap_Walk+0x3c2> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 487ea: 41f9 0005 e394 lea 5e394 ,%a0 487f0: b08a cmpl %a2,%d0 487f2: 6754 beqs 48848 <_Heap_Walk+0x416> 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)( 487f4: 2f09 movel %a1,%sp@- 487f6: 2f01 movel %d1,%sp@- 487f8: 2f08 movel %a0,%sp@- 487fa: 2f00 movel %d0,%sp@- 487fc: 2f02 movel %d2,%sp@- 487fe: 2f0c movel %a4,%sp@- 48800: 4879 0005 e760 pea 5e760 <_Status_Object_name_errors_to_status+0x33e> 48806: 42a7 clrl %sp@- 48808: 2f05 movel %d5,%sp@- 4880a: 4e95 jsr %a5@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 4880c: 2213 movel %a3@,%d1 4880e: 4fef 0024 lea %sp@(36),%sp 48812: b282 cmpl %d2,%d1 48814: 663a bnes 48850 <_Heap_Walk+0x41e> ); return false; } if ( !prev_used ) { 48816: 4a83 tstl %d3 48818: 6776 beqs 48890 <_Heap_Walk+0x45e> block = next_block; } while ( block != first_block ); return true; } 4881a: 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 ) { 4881e: b1ca cmpal %a2,%a0 48820: 6754 beqs 48876 <_Heap_Walk+0x444> <== NEVER TAKEN if ( free_block == block ) { 48822: b1cc cmpal %a4,%a0 48824: 6700 fee8 beqw 4870e <_Heap_Walk+0x2dc> 48828: 2e2e ffec movel %fp@(-20),%d7 return true; } free_block = free_block->next; 4882c: 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 ) { 48830: b1ca cmpal %a2,%a0 48832: 6742 beqs 48876 <_Heap_Walk+0x444> if ( free_block == block ) { 48834: b1cc cmpal %a4,%a0 48836: 66f4 bnes 4882c <_Heap_Walk+0x3fa> 48838: 2d47 ffec movel %d7,%fp@(-20) 4883c: 6000 fed0 braw 4870e <_Heap_Walk+0x2dc> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 48840: 43f9 0005 e45b lea 5e45b <_Status_Object_name_errors_to_status+0x39>,%a1 48846: 6094 bras 487dc <_Heap_Walk+0x3aa> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 48848: 41f9 0005 e475 lea 5e475 <_Status_Object_name_errors_to_status+0x53>,%a0 4884e: 60a4 bras 487f4 <_Heap_Walk+0x3c2> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 48850: 2f0b movel %a3,%sp@- 48852: 2f01 movel %d1,%sp@- 48854: 2f02 movel %d2,%sp@- 48856: 2f0c movel %a4,%sp@- 48858: 4879 0005 e795 pea 5e795 <_Status_Object_name_errors_to_status+0x373> 4885e: 4878 0001 pea 1 48862: 2f05 movel %d5,%sp@- 48864: 4e95 jsr %a5@ 48866: 4fef 001c lea %sp@(28),%sp block = next_block; } while ( block != first_block ); return true; } 4886a: 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; 48870: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48872: 4e5e unlk %fp 48874: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48876: 2f0c movel %a4,%sp@- 48878: 4879 0005 e839 pea 5e839 <_Status_Object_name_errors_to_status+0x417> 4887e: 4878 0001 pea 1 48882: 2f05 movel %d5,%sp@- 48884: 4e95 jsr %a5@ 48886: 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; 4888a: 4200 clrb %d0 4888c: 6000 fcc2 braw 48550 <_Heap_Walk+0x11e> return false; } if ( !prev_used ) { (*printer)( 48890: 2f0c movel %a4,%sp@- 48892: 4879 0005 e7ce pea 5e7ce <_Status_Object_name_errors_to_status+0x3ac> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48898: 4878 0001 pea 1 4889c: 2f05 movel %d5,%sp@- 4889e: 4e95 jsr %a5@ 488a0: 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; 488a4: 4200 clrb %d0 488a6: 6000 fca8 braw 48550 <_Heap_Walk+0x11e> return false; } if ( free_block->prev != prev_block ) { (*printer)( 488aa: 2f02 movel %d2,%sp@- 488ac: 2f08 movel %a0,%sp@- 488ae: 4879 0005 e674 pea 5e674 <_Status_Object_name_errors_to_status+0x252> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 488b4: 4878 0001 pea 1 488b8: 2f05 movel %d5,%sp@- 488ba: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 488bc: 4fef 0014 lea %sp@(20),%sp 488c0: 4200 clrb %d0 488c2: 6000 fe7e braw 48742 <_Heap_Walk+0x310> 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 ) { 488c6: 222a 0020 movel %a2@(32),%d1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 488ca: 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 ) { 488cc: 2d41 fff4 movel %d1,%fp@(-12) ); return false; } if ( _Heap_Is_used( free_block ) ) { 488d0: 222e fff4 movel %fp@(-12),%d1 488d4: 2d43 fffc movel %d3,%fp@(-4) 488d8: 262e fff0 movel %fp@(-16),%d3 488dc: 2d47 ffec movel %d7,%fp@(-20) 488e0: 6000 fdbe braw 486a0 <_Heap_Walk+0x26e> =============================================================================== 000483dc <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 483dc: 4e56 0000 linkw %fp,#0 483e0: 202e 0008 movel %fp@(8),%d0 va_list ap; if ( error ) { 483e4: 4a2e 000f tstb %fp@(15) 483e8: 6624 bnes 4840e <_Heap_Walk_print+0x32> <== NEVER TAKEN printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); 483ea: 2f00 movel %d0,%sp@- 483ec: 4879 0005 e441 pea 5e441 <_Status_Object_name_errors_to_status+0x1f> 483f2: 4eb9 0004 4350 jsr 44350 483f8: 508f addql #8,%sp } va_start( ap, fmt ); vprintk( fmt, ap ); 483fa: 486e 0014 pea %fp@(20) 483fe: 2f2e 0010 movel %fp@(16),%sp@- 48402: 4eb9 0004 6274 jsr 46274 va_end( ap ); 48408: 508f addql #8,%sp } 4840a: 4e5e unlk %fp 4840c: 4e75 rts static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); 4840e: 2f00 movel %d0,%sp@- 48410: 4879 0005 e436 pea 5e436 <_Status_Object_name_errors_to_status+0x14> 48416: 4eb9 0004 4350 jsr 44350 4841c: 508f addql #8,%sp } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 4841e: 486e 0014 pea %fp@(20) 48422: 2f2e 0010 movel %fp@(16),%sp@- 48426: 4eb9 0004 6274 jsr 46274 va_end( ap ); 4842c: 508f addql #8,%sp } 4842e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046e22 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 46e22: 4e56 0000 linkw %fp,#0 46e26: 2f0a movel %a2,%sp@- 46e28: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46e2a: 4ab9 0006 0358 tstl 60358 <_IO_Number_of_drivers> 46e30: 671e beqs 46e50 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 46e32: 4282 clrl %d2 46e34: 45f9 0004 c4fc lea 4c4fc ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 46e3a: 42a7 clrl %sp@- 46e3c: 42a7 clrl %sp@- 46e3e: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46e40: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 46e42: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46e44: 4fef 000c lea %sp@(12),%sp 46e48: b4b9 0006 0358 cmpl 60358 <_IO_Number_of_drivers>,%d2 46e4e: 65ea bcss 46e3a <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 46e50: 242e fff8 movel %fp@(-8),%d2 46e54: 246e fffc moveal %fp@(-4),%a2 46e58: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046d88 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 46d88: 4e56 fff0 linkw %fp,#-16 46d8c: 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; 46d90: 2639 0005 e356 movel 5e356 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 46d96: 2439 0005 e352 movel 5e352 ,%d2 number_of_drivers = Configuration.maximum_drivers; 46d9c: 2839 0005 e34e movel 5e34e ,%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 ) 46da2: b882 cmpl %d2,%d4 46da4: 6366 blss 46e0c <_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( 46da6: 2004 movel %d4,%d0 46da8: 2a04 movel %d4,%d5 46daa: e788 lsll #3,%d0 46dac: eb8d lsll #5,%d5 46dae: 9a80 subl %d0,%d5 46db0: 2f05 movel %d5,%sp@- 46db2: 4eb9 0004 9db6 jsr 49db6 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 46db8: 2f05 movel %d5,%sp@- 46dba: 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 *) 46dbc: 23c0 0006 035c movel %d0,6035c <_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( 46dc2: 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; 46dc4: 23c4 0006 0358 movel %d4,60358 <_IO_Number_of_drivers> memset( 46dca: 4eb9 0004 f310 jsr 4f310 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46dd0: 4fef 0010 lea %sp@(16),%sp 46dd4: 4a82 tstl %d2 46dd6: 672a beqs 46e02 <_IO_Manager_initialization+0x7a><== NEVER TAKEN 46dd8: 2839 0006 035c movel 6035c <_IO_Driver_address_table>,%d4 46dde: 4280 clrl %d0 46de0: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 46de2: 2243 moveal %d3,%a1 46de4: 2044 moveal %d4,%a0 46de6: d3c0 addal %d0,%a1 46de8: 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++ ) 46dea: 5281 addql #1,%d1 46dec: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46df2: 20d9 movel %a1@+,%a0@+ 46df4: 20d9 movel %a1@+,%a0@+ 46df6: 20d9 movel %a1@+,%a0@+ 46df8: 20d9 movel %a1@+,%a0@+ 46dfa: 20d9 movel %a1@+,%a0@+ 46dfc: 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++ ) 46dfe: b282 cmpl %d2,%d1 46e00: 65e0 bcss 46de2 <_IO_Manager_initialization+0x5a> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 46e02: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46e08: 4e5e unlk %fp 46e0a: 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; 46e0c: 23c3 0006 035c movel %d3,6035c <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 46e12: 23c2 0006 0358 movel %d2,60358 <_IO_Number_of_drivers> ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 46e18: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46e1e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047a24 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47a24: 4e56 fffc linkw %fp,#-4 47a28: 206e 0010 moveal %fp@(16),%a0 47a2c: 2f02 movel %d2,%sp@- 47a2e: 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 ); 47a32: 4282 clrl %d2 47a34: 1401 moveb %d1,%d2 47a36: 2242 moveal %d2,%a1 47a38: 2f08 movel %a0,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47a3a: 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 ); 47a3e: 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; 47a40: 13c1 0005 fb76 moveb %d1,5fb76 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47a46: 2d48 fffc movel %a0,%fp@(-4) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 47a4a: 23c0 0005 fb72 movel %d0,5fb72 <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 47a50: 23c8 0005 fb78 movel %a0,5fb78 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 47a56: 2f00 movel %d0,%sp@- 47a58: 4eb9 0004 9942 jsr 49942 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47a5e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 47a62: 327c 0700 moveaw #1792,%a1 <== NOT EXECUTED 47a66: 2409 movel %a1,%d2 <== NOT EXECUTED 47a68: 40c0 movew %sr,%d0 <== NOT EXECUTED 47a6a: 8082 orl %d2,%d0 <== NOT EXECUTED 47a6c: 46c0 movew %d0,%sr <== NOT EXECUTED 47a6e: 2008 movel %a0,%d0 <== NOT EXECUTED 47a70: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47a76: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 47a78: 7005 moveq #5,%d0 <== NOT EXECUTED 47a7a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 47a7e: 23c0 0005 fc4a movel %d0,5fc4a <_System_state_Current> <== NOT EXECUTED 47a84: 60fe bras 47a84 <_Internal_error_Occurred+0x60> <== NOT EXECUTED ... =============================================================================== 00047ae8 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47ae8: 4e56 fff0 linkw %fp,#-16 47aec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47af0: 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 ) 47af4: 4aaa 0014 tstl %a2@(20) 47af8: 660c bnes 47b06 <_Objects_Allocate+0x1e> <== ALWAYS TAKEN return NULL; 47afa: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 47afc: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b02: 4e5e unlk %fp 47b04: 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 ); 47b06: 240a movel %a2,%d2 47b08: 0682 0000 001c addil #28,%d2 47b0e: 47f9 0004 70f8 lea 470f8 <_Chain_Get>,%a3 47b14: 2f02 movel %d2,%sp@- 47b16: 4e93 jsr %a3@ if ( information->auto_extend ) { 47b18: 588f addql #4,%sp 47b1a: 4a2a 0010 tstb %a2@(16) 47b1e: 67dc beqs 47afc <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 47b20: 4a80 tstl %d0 47b22: 6738 beqs 47b5c <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47b24: 2040 moveal %d0,%a0 47b26: 4281 clrl %d1 47b28: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47b2a: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47b2c: 362a 0008 movew %a2@(8),%d3 47b30: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47b34: 342a 0012 movew %a2@(18),%d2 information->inactive_per_block[ block ]--; 47b38: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47b3c: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47b3e: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; information->inactive--; 47b42: 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 ]--; 47b46: e589 lsll #2,%d1 information->inactive--; 47b48: 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 ]--; 47b4a: d1c1 addal %d1,%a0 47b4c: 5390 subql #1,%a0@ information->inactive--; 47b4e: 3549 0028 movew %a1,%a2@(40) ); } #endif return the_object; } 47b52: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b58: 4e5e unlk %fp 47b5a: 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 ); 47b5c: 2f0a movel %a2,%sp@- 47b5e: 4eb9 0004 7ba4 jsr 47ba4 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47b64: 2f02 movel %d2,%sp@- 47b66: 4e93 jsr %a3@ } if ( the_object ) { 47b68: 508f addql #8,%sp 47b6a: 4a80 tstl %d0 47b6c: 66b6 bnes 47b24 <_Objects_Allocate+0x3c> ); } #endif return the_object; } 47b6e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047b78 <_Objects_Close>: RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 47b78: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 47b7a: 4e56 0000 linkw %fp,#0 47b7e: 226e 000c moveal %fp@(12),%a1 47b82: 206e 0008 moveal %fp@(8),%a0 47b86: 2f0a movel %a2,%sp@- #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47b88: 2468 0018 moveal %a0@(24),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 47b8c: 3029 000a movew %a1@(10),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47b90: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 47b94: 245f moveal %sp@+,%a2 Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47b96: 2d49 000c movel %a1,%fp@(12) } 47b9a: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47b9c: 4ef9 0004 8120 jmp 48120 <_Objects_Namespace_remove> ... =============================================================================== 00047ba4 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 47ba4: 4e56 ffcc linkw %fp,#-52 47ba8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47bac: 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 ); 47bb0: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47bb2: 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 ); 47bb6: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47bba: 4a88 tstl %a0 47bbc: 6700 0232 beqw 47df0 <_Objects_Extend_information+0x24c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 47bc0: 322a 000e movew %a2@(14),%d1 47bc4: 302a 0012 movew %a2@(18),%d0 47bc8: 3801 movew %d1,%d4 47bca: 0284 0000 ffff andil #65535,%d4 47bd0: 88c0 divuw %d0,%d4 47bd2: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47bd8: 6700 022c beqw 47e06 <_Objects_Extend_information+0x262> if ( information->object_blocks[ block ] == NULL ) { 47bdc: 4a90 tstl %a0@ 47bde: 6700 0236 beqw 47e16 <_Objects_Extend_information+0x272> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 47be2: 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 ); 47be4: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 47be6: 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 ) { 47be8: 0280 0000 ffff andil #65535,%d0 do_extend = false; break; } else index_base += information->allocation_size; 47bee: 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++ ) { 47bf0: 5282 addql #1,%d2 47bf2: b484 cmpl %d4,%d2 47bf4: 6400 01a6 bccw 47d9c <_Objects_Extend_information+0x1f8> if ( information->object_blocks[ block ] == NULL ) { 47bf8: 4a98 tstl %a0@+ 47bfa: 66f2 bnes 47bee <_Objects_Extend_information+0x4a> do_extend = false; 47bfc: 4207 clrb %d7 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 47bfe: 0281 0000 ffff andil #65535,%d1 47c04: 2641 moveal %d1,%a3 47c06: 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 ) { 47c08: b7fc 0000 ffff cmpal #65535,%a3 47c0e: 6200 0182 bhiw 47d92 <_Objects_Extend_information+0x1ee> /* * 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; 47c12: 41ea 0014 lea %a2@(20),%a0 47c16: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 47c1a: 4a2a 0010 tstb %a2@(16) 47c1e: 6700 0182 beqw 47da2 <_Objects_Extend_information+0x1fe> new_object_block = _Workspace_Allocate( block_size ); 47c22: 2f00 movel %d0,%sp@- 47c24: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate> if ( !new_object_block ) 47c2a: 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 ); 47c2c: 2c00 movel %d0,%d6 if ( !new_object_block ) 47c2e: 6700 0162 beqw 47d92 <_Objects_Extend_information+0x1ee> } /* * Do we need to grow the tables? */ if ( do_extend ) { 47c32: 4a07 tstb %d7 47c34: 6700 00c4 beqw 47cfa <_Objects_Extend_information+0x156> */ /* * Up the block count and maximum */ block_count++; 47c38: 2a44 moveal %d4,%a5 47c3a: 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 *)); 47c3c: 200b movel %a3,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 47c3e: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 47c42: d088 addl %a0,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 47c44: d085 addl %d5,%d0 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 47c46: 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 ); 47c48: 2f00 movel %d0,%sp@- 47c4a: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate> if ( !object_blocks ) { 47c50: 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 ); 47c52: 2840 moveal %d0,%a4 if ( !object_blocks ) { 47c54: 4a80 tstl %d0 47c56: 6700 01ce beqw 47e26 <_Objects_Extend_information+0x282> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47c5a: 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 ) { 47c5c: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47c5e: 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 ) { 47c60: 302a 000e movew %a2@(14),%d0 47c64: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47c68: de8d addl %a5,%d7 47c6a: b085 cmpl %d5,%d0 47c6c: 6200 0144 bhiw 47db2 <_Objects_Extend_information+0x20e> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47c70: 4a85 tstl %d5 47c72: 670c beqs 47c80 <_Objects_Extend_information+0xdc><== NEVER TAKEN 47c74: 2047 moveal %d7,%a0 47c76: 4280 clrl %d0 local_table[ index ] = NULL; 47c78: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47c7a: 5280 addql #1,%d0 47c7c: b085 cmpl %d5,%d0 47c7e: 65f8 bcss 47c78 <_Objects_Extend_information+0xd4><== NEVER TAKEN 47c80: 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 ); 47c82: 4281 clrl %d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 47c84: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 47c88: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 47c8c: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 47c90: 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 ; 47c92: b283 cmpl %d3,%d1 47c94: 6310 blss 47ca6 <_Objects_Extend_information+0x102><== NEVER TAKEN 47c96: 2247 moveal %d7,%a1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 47c98: 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 ; 47c9a: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 47c9e: 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++ ) { 47ca0: 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 ; 47ca2: b280 cmpl %d0,%d1 47ca4: 62f8 bhis 47c9e <_Objects_Extend_information+0xfa> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 47ca6: 203c 0000 0700 movel #1792,%d0 47cac: 40c4 movew %sr,%d4 47cae: 8084 orl %d4,%d0 47cb0: 46c0 movew %d0,%sr uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47cb2: 2012 movel %a2@,%d0 47cb4: 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( 47cb6: 4281 clrl %d1 47cb8: eba8 lsll %d5,%d0 47cba: 4285 clrl %d5 47cbc: 3a0b movew %a3,%d5 47cbe: 322a 0004 movew %a2@(4),%d1 47cc2: 08c0 0010 bset #16,%d0 47cc6: 2245 moveal %d5,%a1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 47cc8: 7a1b moveq #27,%d5 47cca: eba9 lsll %d5,%d1 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47ccc: 206a 002e moveal %a2@(46),%a0 47cd0: 8081 orl %d1,%d0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47cd2: 2209 movel %a1,%d1 47cd4: 8280 orl %d0,%d1 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 47cd6: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 47cda: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; 47cde: 254d 002a movel %a5,%a2@(42) 47ce2: 2541 000a movel %d1,%a2@(10) information->local_table = local_table; 47ce6: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47cea: 46c4 movew %d4,%sr if ( old_tables ) 47cec: 4a88 tstl %a0 47cee: 670a beqs 47cfa <_Objects_Extend_information+0x156> _Workspace_Free( old_tables ); 47cf0: 2f08 movel %a0,%sp@- 47cf2: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 47cf8: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47cfa: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47cfe: 4280 clrl %d0 47d00: 280e movel %fp,%d4 47d02: 0684 ffff fff4 addil #-12,%d4 47d08: 47f9 0004 70f8 lea 470f8 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 47d0e: 2a0a movel %a2,%d5 47d10: 0685 0000 001c addil #28,%d5 47d16: 49f9 0004 7098 lea 47098 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47d1c: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47d1e: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47d22: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47d26: 2f2a 0014 movel %a2@(20),%sp@- 47d2a: 2f00 movel %d0,%sp@- 47d2c: 2f06 movel %d6,%sp@- 47d2e: 2f04 movel %d4,%sp@- 47d30: 4eb9 0004 c544 jsr 4c544 <_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 ) { 47d36: 4fef 0010 lea %sp@(16),%sp 47d3a: 2f04 movel %d4,%sp@- 47d3c: 4e93 jsr %a3@ 47d3e: 588f addql #4,%sp 47d40: 4a80 tstl %d0 47d42: 6734 beqs 47d78 <_Objects_Extend_information+0x1d4><== NEVER TAKEN 47d44: 2212 movel %a2@,%d1 47d46: 7e18 moveq #24,%d7 the_object->id = _Objects_Build_id( 47d48: 4286 clrl %d6 47d4a: 2040 moveal %d0,%a0 47d4c: 3c2a 0004 movew %a2@(4),%d6 47d50: efa9 lsll %d7,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 47d52: 1e3c 001b moveb #27,%d7 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47d56: 08c1 0010 bset #16,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 47d5a: efae lsll %d7,%d6 47d5c: 8286 orl %d6,%d1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47d5e: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 47d60: 5283 addql #1,%d3 47d62: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 47d66: 2f00 movel %d0,%sp@- 47d68: 2f05 movel %d5,%sp@- 47d6a: 4e94 jsr %a4@ index++; 47d6c: 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 ) { 47d6e: 2f04 movel %d4,%sp@- 47d70: 4e93 jsr %a3@ 47d72: 588f addql #4,%sp 47d74: 4a80 tstl %d0 47d76: 66cc bnes 47d44 <_Objects_Extend_information+0x1a0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47d78: 4281 clrl %d1 47d7a: 302a 0012 movew %a2@(18),%d0 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 47d7e: 326a 0028 moveaw %a2@(40),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47d82: 206a 002a moveal %a2@(42),%a0 47d86: 3200 movew %d0,%d1 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 47d88: d089 addl %a1,%d0 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47d8a: 2181 2800 movel %d1,%a0@(00000000,%d2:l) information->inactive = 47d8e: 3540 0028 movew %d0,%a2@(40) (Objects_Maximum)(information->inactive + information->allocation_size); } 47d92: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47d98: 4e5e unlk %fp 47d9a: 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; 47d9c: 7e01 moveq #1,%d7 47d9e: 6000 fe5e braw 47bfe <_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 ); 47da2: 2f00 movel %d0,%sp@- 47da4: 4eb9 0004 9db6 jsr 49db6 <_Workspace_Allocate_or_fatal_error> 47daa: 588f addql #4,%sp 47dac: 2c00 movel %d0,%d6 47dae: 6000 fe82 braw 47c32 <_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, 47db2: e58c lsll #2,%d4 47db4: 2f04 movel %d4,%sp@- 47db6: 2f2a 002e movel %a2@(46),%sp@- 47dba: 2f0c movel %a4,%sp@- 47dbc: 4eb9 0004 f2a0 jsr 4f2a0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47dc2: 2f04 movel %d4,%sp@- 47dc4: 2f2a 002a movel %a2@(42),%sp@- 47dc8: 2f0d movel %a5,%sp@- 47dca: 4eb9 0004 f2a0 jsr 4f2a0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 47dd0: 4280 clrl %d0 47dd2: 302a 000e movew %a2@(14),%d0 47dd6: 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, 47dd8: e58d lsll #2,%d5 47dda: 2f05 movel %d5,%sp@- 47ddc: 2f2a 0018 movel %a2@(24),%sp@- 47de0: 2f07 movel %d7,%sp@- 47de2: 4eb9 0004 f2a0 jsr 4f2a0 47de8: 4fef 0024 lea %sp@(36),%sp 47dec: 6000 fe94 braw 47c82 <_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 ) 47df0: 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 ); 47df2: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 47df4: 4282 clrl %d2 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 47df6: 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 ) 47df8: 322a 000e movew %a2@(14),%d1 47dfc: 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; 47e00: 7e01 moveq #1,%d7 47e02: 6000 fdfa braw 47bfe <_Objects_Extend_information+0x5a> minimum_index = _Objects_Get_index( information->minimum_id ); 47e06: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 47e08: 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++ ) { 47e0a: 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; 47e10: 7e01 moveq #1,%d7 <== NOT EXECUTED 47e12: 6000 fdea braw 47bfe <_Objects_Extend_information+0x5a><== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); 47e16: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 47e18: 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 ) { 47e1a: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED do_extend = false; 47e20: 4207 clrb %d7 <== NOT EXECUTED 47e22: 6000 fdda braw 47bfe <_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 ); 47e26: 2f06 movel %d6,%sp@- 47e28: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> return; 47e2e: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47e30: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47e36: 4e5e unlk %fp ... =============================================================================== 00047eec <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 47eec: 4e56 0000 linkw %fp,#0 47ef0: 2f02 movel %d2,%sp@- 47ef2: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47ef6: 660a bnes 47f02 <_Objects_Get_information+0x16> if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 47ef8: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 47efa: 242e fffc movel %fp@(-4),%d2 47efe: 4e5e unlk %fp 47f00: 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 ); 47f02: 2f2e 0008 movel %fp@(8),%sp@- 47f06: 4eb9 0004 ca8c jsr 4ca8c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 47f0c: 588f addql #4,%sp 47f0e: 4a80 tstl %d0 47f10: 67e6 beqs 47ef8 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 47f12: b082 cmpl %d2,%d0 47f14: 65e2 bcss 47ef8 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 47f16: 202e 0008 movel %fp@(8),%d0 47f1a: 41f9 0005 fa98 lea 5fa98 <_Objects_Information_table>,%a0 47f20: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47f24: 4a88 tstl %a0 47f26: 67d0 beqs 47ef8 <_Objects_Get_information+0xc> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 47f28: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 47f2c: 67cc beqs 47efa <_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; 47f2e: 2040 moveal %d0,%a0 47f30: 4a68 000e tstw %a0@(14) 47f34: 56c1 sne %d1 #endif return info; } 47f36: 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; 47f3a: 49c1 extbl %d1 #endif return info; } 47f3c: 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; 47f3e: c081 andl %d1,%d0 #endif return info; } ... =============================================================================== 000499e4 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 499e4: 4e56 ffdc linkw %fp,#-36 499e8: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 499ec: 262e 000c movel %fp@(12),%d3 499f0: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 499f4: 4a83 tstl %d3 499f6: 660e bnes 49a06 <_Objects_Get_name_as_string+0x22> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 499f8: 4282 clrl %d2 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 499fa: 2002 movel %d2,%d0 499fc: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 49a02: 4e5e unlk %fp 49a04: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 49a06: 4a82 tstl %d2 49a08: 67f0 beqs 499fa <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49a0a: 4aae 0008 tstl %fp@(8) 49a0e: 6600 009a bnew 49aaa <_Objects_Get_name_as_string+0xc6> 49a12: 2079 0006 a5a6 moveal 6a5a6 <_Per_CPU_Information+0xc>,%a0 49a18: 2828 0008 movel %a0@(8),%d4 information = _Objects_Get_information_id( tmpId ); 49a1c: 2f04 movel %d4,%sp@- 49a1e: 4eb9 0004 9900 jsr 49900 <_Objects_Get_information_id> if ( !information ) 49a24: 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 ); 49a26: 2440 moveal %d0,%a2 if ( !information ) 49a28: 4a80 tstl %d0 49a2a: 67cc beqs 499f8 <_Objects_Get_name_as_string+0x14> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 49a2c: 486e fffc pea %fp@(-4) 49a30: 2f04 movel %d4,%sp@- 49a32: 2f00 movel %d0,%sp@- 49a34: 4eb9 0004 9ae8 jsr 49ae8 <_Objects_Get> switch ( location ) { 49a3a: 4fef 000c lea %sp@(12),%sp 49a3e: 4aae fffc tstl %fp@(-4) 49a42: 66b4 bnes 499f8 <_Objects_Get_name_as_string+0x14> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 49a44: 4a2a 0032 tstb %a2@(50) 49a48: 6768 beqs 49ab2 <_Objects_Get_name_as_string+0xce> s = the_object->name.name_p; 49a4a: 2040 moveal %d0,%a0 49a4c: 2668 000c moveal %a0@(12),%a3 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 49a50: 4a8b tstl %a3 49a52: 674a beqs 49a9e <_Objects_Get_name_as_string+0xba> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a54: 5383 subql #1,%d3 49a56: 6746 beqs 49a9e <_Objects_Get_name_as_string+0xba><== NEVER TAKEN 49a58: 1013 moveb %a3@,%d0 49a5a: 6742 beqs 49a9e <_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( 49a5c: 528b addql #1,%a3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a5e: 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( 49a60: 91c8 subal %a0,%a0 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 49a62: 4281 clrl %d1 49a64: 1200 moveb %d0,%d1 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a66: 5288 addql #1,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; 49a68: 2479 0006 0cb0 moveal 60cb0 <__ctype_ptr__>,%a2 49a6e: 1232 1801 moveb %a2@(00000001,%d1:l),%d1 49a72: 49c1 extbl %d1 49a74: 0281 0000 0097 andil #151,%d1 49a7a: 6602 bnes 49a7e <_Objects_Get_name_as_string+0x9a> 49a7c: 702a moveq #42,%d0 49a7e: 12c0 moveb %d0,%a1@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a80: 2449 moveal %a1,%a2 49a82: b688 cmpl %a0,%d3 49a84: 6304 blss 49a8a <_Objects_Get_name_as_string+0xa6> 49a86: 101b moveb %a3@+,%d0 49a88: 66d8 bnes 49a62 <_Objects_Get_name_as_string+0x7e> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49a8a: 4212 clrb %a2@ _Thread_Enable_dispatch(); 49a8c: 4eb9 0004 a372 jsr 4a372 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 49a92: 2002 movel %d2,%d0 49a94: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 49a9a: 4e5e unlk %fp 49a9c: 4e75 rts s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a9e: 2442 moveal %d2,%a2 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49aa0: 4212 clrb %a2@ _Thread_Enable_dispatch(); 49aa2: 4eb9 0004 a372 jsr 4a372 <_Thread_Enable_dispatch> 49aa8: 60e8 bras 49a92 <_Objects_Get_name_as_string+0xae> return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49aaa: 282e 0008 movel %fp@(8),%d4 49aae: 6000 ff6c braw 49a1c <_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; 49ab2: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49ab4: 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; 49ab6: 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; 49aba: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49abe: 2a00 movel %d0,%d5 49ac0: e2ad lsrl %d1,%d5 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 49ac2: 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; 49ac4: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 49ac6: e089 lsrl #8,%d1 lname[ 3 ] = (u32_name >> 0) & 0xff; 49ac8: 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; 49acc: 4244 clrw %d4 49ace: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49ad0: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 49ad2: 1d45 fff7 moveb %d5,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; 49ad6: 1d44 fff8 moveb %d4,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; 49ada: 1d41 fff9 moveb %d1,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49ade: 1d40 fffb moveb %d0,%fp@(-5) 49ae2: 6000 ff70 braw 49a54 <_Objects_Get_name_as_string+0x70> ... =============================================================================== 0005bc00 <_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; 5bc00: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5bc02: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5bc04: 4e56 0000 linkw %fp,#0 5bc08: 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; 5bc0c: 90a8 0006 subl %a0@(6),%d0 5bc10: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5bc14: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5bc18: 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 ) { 5bc1c: b280 cmpl %d0,%d1 5bc1e: 6510 bcss 5bc30 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5bc20: 2068 0018 moveal %a0@(24),%a0 5bc24: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5bc28: 6706 beqs 5bc30 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 5bc2a: 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; } 5bc2c: 4e5e unlk %fp 5bc2e: 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; 5bc30: 7001 moveq #1,%d0 return NULL; } 5bc32: 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; 5bc34: 2280 movel %d0,%a1@ return NULL; 5bc36: 4280 clrl %d0 } ... =============================================================================== 00049700 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 49700: 4e56 fffc linkw %fp,#-4 49704: 222e 0008 movel %fp@(8),%d1 49708: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4970a: 4a81 tstl %d1 4970c: 660a bnes 49718 <_Objects_Id_to_name+0x18> 4970e: 2079 0006 1c44 moveal 61c44 <_Per_CPU_Information+0xc>,%a0 49714: 2228 0008 movel %a0@(8),%d1 49718: 7418 moveq #24,%d2 4971a: 2001 movel %d1,%d0 4971c: e4a8 lsrl %d2,%d0 4971e: 143c 0007 moveb #7,%d2 49722: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 49724: 143c 0002 moveb #2,%d2 49728: 2040 moveal %d0,%a0 4972a: 5388 subql #1,%a0 4972c: b488 cmpl %a0,%d2 4972e: 6522 bcss 49752 <_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 ] ) 49730: 41f9 0006 1770 lea 61770 <_Objects_Information_table>,%a0 49736: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4973a: 4a88 tstl %a0 4973c: 6714 beqs 49752 <_Objects_Id_to_name+0x52> <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 4973e: 2001 movel %d1,%d0 49740: 741b moveq #27,%d2 49742: e4a8 lsrl %d2,%d0 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 49744: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 49748: 4a88 tstl %a0 4974a: 6706 beqs 49752 <_Objects_Id_to_name+0x52> <== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 4974c: 4a28 0032 tstb %a0@(50) 49750: 670a beqs 4975c <_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; } 49752: 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; 49756: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 49758: 4e5e unlk %fp 4975a: 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 ); 4975c: 486e fffc pea %fp@(-4) 49760: 2f01 movel %d1,%sp@- 49762: 2f08 movel %a0,%sp@- 49764: 4eb9 0004 9694 jsr 49694 <_Objects_Get> if ( !the_object ) 4976a: 4fef 000c lea %sp@(12),%sp 4976e: 4a80 tstl %d0 49770: 67e0 beqs 49752 <_Objects_Id_to_name+0x52> return OBJECTS_INVALID_ID; *name = the_object->name; 49772: 206e 000c moveal %fp@(12),%a0 49776: 2240 moveal %d0,%a1 49778: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 4977c: 4eb9 0004 a02a jsr 4a02a <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 49782: 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; 49786: 4280 clrl %d0 } 49788: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048558 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48558: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 4855a: 4e56 fff0 linkw %fp,#-16 4855e: 48d7 3c00 moveml %a2-%a5,%sp@ 48562: 286e 0008 moveal %fp@(8),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48566: 302c 0034 movew %a4@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 4856a: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4856e: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 48570: 2a6e 000c moveal %fp@(12),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48574: 2f0a movel %a2,%sp@- 48576: 4eb9 0005 0744 jsr 50744 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 4857c: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4857e: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 48580: 4a2c 0032 tstb %a4@(50) 48584: 6662 bnes 485e8 <_Objects_Set_name+0x90> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48586: 7018 moveq #24,%d0 48588: 1212 moveb %a2@,%d1 4858a: 49c1 extbl %d1 4858c: e1a9 lsll %d0,%d1 4858e: 103c 0001 moveb #1,%d0 48592: b08b cmpl %a3,%d0 48594: 643c bccs 485d2 <_Objects_Set_name+0x7a> 48596: 102a 0001 moveb %a2@(1),%d0 4859a: 49c0 extbl %d0 4859c: 4840 swap %d0 4859e: 4240 clrw %d0 485a0: 8081 orl %d1,%d0 485a2: 7202 moveq #2,%d1 485a4: b28b cmpl %a3,%d1 485a6: 6730 beqs 485d8 <_Objects_Set_name+0x80> 485a8: 122a 0002 moveb %a2@(2),%d1 485ac: 49c1 extbl %d1 485ae: e189 lsll #8,%d1 485b0: 8081 orl %d1,%d0 485b2: 7203 moveq #3,%d1 485b4: b28b cmpl %a3,%d1 485b6: 6700 0088 beqw 48640 <_Objects_Set_name+0xe8> 485ba: 122a 0003 moveb %a2@(3),%d1 485be: 49c1 extbl %d1 485c0: 8081 orl %d1,%d0 485c2: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 485c6: 7001 moveq #1,%d0 } 485c8: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 485ce: 4e5e unlk %fp 485d0: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 485d2: 2001 movel %d1,%d0 485d4: 08c0 0015 bset #21,%d0 485d8: 7220 moveq #32,%d1 485da: 08c0 000d bset #13,%d0 485de: 8081 orl %d1,%d0 485e0: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 485e4: 7001 moveq #1,%d0 485e6: 60e0 bras 485c8 <_Objects_Set_name+0x70> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 485e8: 486b 0001 pea %a3@(1) 485ec: 4eb9 0004 a202 jsr 4a202 <_Workspace_Allocate> if ( !d ) 485f2: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 485f4: 2840 moveal %d0,%a4 if ( !d ) 485f6: 4a80 tstl %d0 485f8: 673a beqs 48634 <_Objects_Set_name+0xdc> <== NEVER TAKEN return false; if ( the_object->name.name_p ) { 485fa: 202d 000c movel %a5@(12),%d0 485fe: 670e beqs 4860e <_Objects_Set_name+0xb6> _Workspace_Free( (void *)the_object->name.name_p ); 48600: 2f00 movel %d0,%sp@- 48602: 4eb9 0004 a21e jsr 4a21e <_Workspace_Free> the_object->name.name_p = NULL; 48608: 588f addql #4,%sp 4860a: 42ad 000c clrl %a5@(12) } strncpy( d, name, length ); 4860e: 2f0b movel %a3,%sp@- 48610: 2f0a movel %a2,%sp@- 48612: 2f0c movel %a4,%sp@- 48614: 4eb9 0005 06c0 jsr 506c0 d[length] = '\0'; the_object->name.name_p = d; 4861a: 4fef 000c lea %sp@(12),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; 4861e: 4200 clrb %d0 48620: 1980 b800 moveb %d0,%a4@(00000000,%a3:l) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 48624: 7001 moveq #1,%d0 the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; the_object->name.name_p = d; 48626: 2b4c 000c movel %a4,%a5@(12) ); } return true; } 4862a: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 48630: 4e5e unlk %fp 48632: 4e75 rts 48634: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 4863a: 4200 clrb %d0 <== NOT EXECUTED ); } return true; } 4863c: 4e5e unlk %fp <== NOT EXECUTED 4863e: 4e75 rts <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48640: 7220 moveq #32,%d1 48642: 8081 orl %d1,%d0 48644: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 48648: 7001 moveq #1,%d0 4864a: 6000 ff7c braw 485c8 <_Objects_Set_name+0x70> ... =============================================================================== 000481d0 <_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) / 481d0: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 481d2: 4e56 ffec linkw %fp,#-20 481d6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 481da: 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 ); 481de: 4283 clrl %d3 block_count = (information->maximum - index_base) / 481e0: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 481e2: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 481e6: 382a 000e movew %a2@(14),%d4 481ea: 322a 0012 movew %a2@(18),%d1 481ee: 9883 subl %d3,%d4 481f0: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 481f4: 6774 beqs 4826a <_Objects_Shrink_information+0x9a><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 481f6: 206a 002a moveal %a2@(42),%a0 481fa: b290 cmpl %a0@,%d1 481fc: 677e beqs 4827c <_Objects_Shrink_information+0xac><== NEVER TAKEN * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 481fe: 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++ ) { 48200: 4280 clrl %d0 48202: 5280 addql #1,%d0 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 48204: d681 addl %d1,%d3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 48206: b084 cmpl %d4,%d0 48208: 6460 bccs 4826a <_Objects_Shrink_information+0x9a> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4820a: 2400 movel %d0,%d2 4820c: e58a lsll #2,%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++ ) { if ( information->inactive_per_block[ block ] == 4820e: b298 cmpl %a0@+,%d1 48210: 66f0 bnes 48202 <_Objects_Shrink_information+0x32> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 48212: 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 ); 48216: 47f9 0004 70d0 lea 470d0 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 4821c: 4280 clrl %d0 4821e: 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; 48222: 2810 movel %a0@,%d4 if ((index >= index_base) && 48224: b680 cmpl %d0,%d3 48226: 620c bhis 48234 <_Objects_Shrink_information+0x64> (index < (index_base + information->allocation_size))) { 48228: 4281 clrl %d1 4822a: 322a 0012 movew %a2@(18),%d1 4822e: d283 addl %d3,%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) && 48230: b280 cmpl %d0,%d1 48232: 6240 bhis 48274 <_Objects_Shrink_information+0xa4> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 48234: 4a84 tstl %d4 48236: 6704 beqs 4823c <_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; 48238: 2044 moveal %d4,%a0 4823a: 60e0 bras 4821c <_Objects_Shrink_information+0x4c> while ( the_object ); /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4823c: 206a 002e moveal %a2@(46),%a0 48240: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 48244: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> information->object_blocks[ block ] = NULL; 4824a: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 4824e: 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; 48250: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; 48254: 206a 002a moveal %a2@(42),%a0 information->inactive -= information->allocation_size; 48258: 302a 0028 movew %a2@(40),%d0 4825c: 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; 48260: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive -= information->allocation_size; 48264: 9081 subl %d1,%d0 48266: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4826a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48270: 4e5e unlk %fp 48272: 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 ); 48274: 2f08 movel %a0,%sp@- 48276: 4e93 jsr %a3@ 48278: 588f addql #4,%sp 4827a: 60b8 bras 48234 <_Objects_Shrink_information+0x64> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 4827c: 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 ] == 48280: 4282 clrl %d2 <== 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 ); 48282: 47f9 0004 70d0 lea 470d0 <_Chain_Extract>,%a3 <== NOT EXECUTED 48288: 6092 bras 4821c <_Objects_Shrink_information+0x4c><== NOT EXECUTED ... =============================================================================== 000474f4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 474f4: 4e56 ffe8 linkw %fp,#-24 474f8: 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 ) ) { 474fc: 240e movel %fp,%d2 474fe: 5982 subql #4,%d2 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 47500: 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 ) ) { 47504: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 47506: 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 ) ) { 4750a: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 4750c: 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 ) ) { 47510: 4eb9 0004 766c jsr 4766c <_POSIX_Mutex_Get> 47516: 508f addql #8,%sp 47518: 4a80 tstl %d0 4751a: 6764 beqs 47580 <_POSIX_Condition_variables_Wait_support+0x8c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4751c: 2039 0006 252c movel 6252c <_Thread_Dispatch_disable_level>,%d0 47522: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 47524: 2f02 movel %d2,%sp@- 47526: 23c0 0006 252c movel %d0,6252c <_Thread_Dispatch_disable_level> 4752c: 2f0b movel %a3,%sp@- 4752e: 4eb9 0004 72dc jsr 472dc <_POSIX_Condition_variables_Get> switch ( location ) { 47534: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 47536: 2840 moveal %d0,%a4 switch ( location ) { 47538: 4aae fffc tstl %fp@(-4) 4753c: 6642 bnes 47580 <_POSIX_Condition_variables_Wait_support+0x8c> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 4753e: 202c 0014 movel %a4@(20),%d0 47542: 6718 beqs 4755c <_POSIX_Condition_variables_Wait_support+0x68> 47544: b092 cmpl %a2@,%d0 47546: 6714 beqs 4755c <_POSIX_Condition_variables_Wait_support+0x68> _Thread_Enable_dispatch(); 47548: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch> return EINVAL; 4754e: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 47550: 2002 movel %d2,%d0 47552: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47558: 4e5e unlk %fp 4755a: 4e75 rts if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 4755c: 2f0a movel %a2,%sp@- 4755e: 4eb9 0004 793c jsr 4793c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 47564: 588f addql #4,%sp 47566: 4a03 tstb %d3 47568: 6724 beqs 4758e <_POSIX_Condition_variables_Wait_support+0x9a> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 4756a: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch> status = ETIMEDOUT; 47570: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 47572: 2f0a movel %a2,%sp@- 47574: 4eb9 0004 78a0 jsr 478a0 if ( mutex_status ) 4757a: 588f addql #4,%sp 4757c: 4a80 tstl %d0 4757e: 67d0 beqs 47550 <_POSIX_Condition_variables_Wait_support+0x5c> #endif case OBJECTS_ERROR: break; } return EINVAL; 47580: 7416 moveq #22,%d2 } 47582: 2002 movel %d2,%d0 47584: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4758a: 4e5e unlk %fp 4758c: 4e75 rts return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 4758e: 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; 47592: 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; 47594: 200c movel %a4,%d0 47596: 0680 0000 0018 addil #24,%d0 4759c: 2941 0048 movel %d1,%a4@(72) if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 475a0: 2079 0006 29bc moveal 629bc <_Per_CPU_Information+0xc>,%a0 475a6: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 475aa: 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; 475ae: 2140 0044 movel %d0,%a0@(68) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 475b2: 4879 0004 b3f0 pea 4b3f0 <_Thread_queue_Timeout> 475b8: 2f2e 0010 movel %fp@(16),%sp@- 475bc: 2f00 movel %d0,%sp@- 475be: 4eb9 0004 afc0 jsr 4afc0 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 475c4: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 475ca: 2079 0006 29bc moveal 629bc <_Per_CPU_Information+0xc>,%a0 if ( status && status != ETIMEDOUT ) 475d0: 4fef 000c lea %sp@(12),%sp /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 475d4: 2428 0034 movel %a0@(52),%d2 if ( status && status != ETIMEDOUT ) 475d8: 6798 beqs 47572 <_POSIX_Condition_variables_Wait_support+0x7e> 475da: 7074 moveq #116,%d0 475dc: b082 cmpl %d2,%d0 475de: 6792 beqs 47572 <_POSIX_Condition_variables_Wait_support+0x7e><== ALWAYS TAKEN case OBJECTS_ERROR: break; } return EINVAL; } 475e0: 2002 movel %d2,%d0 <== NOT EXECUTED 475e2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 475e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e18c <_POSIX_Keys_Run_destructors>: 4e18c: 7018 moveq #24,%d0 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4e18e: 4e56 ffe8 linkw %fp,#-24 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4e192: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4e196: 48d7 047c moveml %d2-%d6/%a2,%sp@ uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4e19a: 2628 0008 movel %a0@(8),%d3 4e19e: 2803 movel %d3,%d4 4e1a0: e0ac lsrl %d0,%d4 4e1a2: 103c 0007 moveb #7,%d0 thread_api = _Objects_Get_API( thread->Object.id ); iterations = 0; 4e1a6: 4286 clrl %d6 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4e1a8: 0283 0000 ffff andil #65535,%d3 4e1ae: c880 andl %d0,%d4 4e1b0: 3239 0005 fe60 movew 5fe60 <_POSIX_Keys_Information+0xe>,%d1 if ( !the_key ) continue; if ( !the_key->destructor ) continue; value = the_key->Values[ thread_api ][ thread_index ]; 4e1b6: e58b lsll #2,%d3 4e1b8: 5a84 addql #5,%d4 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4e1ba: 4a41 tstw %d1 4e1bc: 6752 beqs 4e210 <_POSIX_Keys_Run_destructors+0x84> 4e1be: 7401 moveq #1,%d2 4e1c0: 7a01 moveq #1,%d5 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; 4e1c2: 2079 0005 fe6a moveal 5fe6a <_POSIX_Keys_Information+0x18>,%a0 are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { the_key = (POSIX_Keys_Control *) 4e1c8: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 _POSIX_Keys_Information.local_table[ index ]; if ( !the_key ) 4e1cc: 4a8a tstl %a2 4e1ce: 672a beqs 4e1fa <_POSIX_Keys_Run_destructors+0x6e> continue; if ( !the_key->destructor ) 4e1d0: 206a 0010 moveal %a2@(16),%a0 4e1d4: 4a88 tstl %a0 4e1d6: 6722 beqs 4e1fa <_POSIX_Keys_Run_destructors+0x6e> continue; value = the_key->Values[ thread_api ][ thread_index ]; 4e1d8: 2272 4c00 moveal %a2@(00000000,%d4:l:4),%a1 4e1dc: 2031 3800 movel %a1@(00000000,%d3:l),%d0 if ( value ) { 4e1e0: 6718 beqs 4e1fa <_POSIX_Keys_Run_destructors+0x6e> (*the_key->destructor)( value ); 4e1e2: 2f00 movel %d0,%sp@- 4e1e4: 4e90 jsr %a0@ if ( the_key->Values[ thread_api ][ thread_index ] ) 4e1e6: 588f addql #4,%sp 4e1e8: 2072 4c00 moveal %a2@(00000000,%d4:l:4),%a0 4e1ec: 4ab0 3800 tstl %a0@(00000000,%d3:l) 4e1f0: 6728 beqs 4e21a <_POSIX_Keys_Run_destructors+0x8e> 4e1f2: 3239 0005 fe60 movew 5fe60 <_POSIX_Keys_Information+0xe>,%d1 are_all_null = false; 4e1f8: 4205 clrb %d5 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4e1fa: 4280 clrl %d0 4e1fc: 5282 addql #1,%d2 4e1fe: 3001 movew %d1,%d0 4e200: b480 cmpl %d0,%d2 4e202: 63be blss 4e1c2 <_POSIX_Keys_Run_destructors+0x36> if ( the_key->Values[ thread_api ][ thread_index ] ) are_all_null = false; } } if ( are_all_null == true ) 4e204: 4a05 tstb %d5 4e206: 6608 bnes 4e210 <_POSIX_Keys_Run_destructors+0x84> return; iterations++; 4e208: 5286 addql #1,%d6 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 4e20a: 7004 moveq #4,%d0 4e20c: b086 cmpl %d6,%d0 4e20e: 66aa bnes 4e1ba <_POSIX_Keys_Run_destructors+0x2e> return; } } 4e210: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4e216: 4e5e unlk %fp 4e218: 4e75 rts for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4e21a: 4280 clrl %d0 4e21c: 5282 addql #1,%d2 4e21e: 3239 0005 fe60 movew 5fe60 <_POSIX_Keys_Information+0xe>,%d1 4e224: 3001 movew %d1,%d0 4e226: b480 cmpl %d0,%d2 4e228: 6398 blss 4e1c2 <_POSIX_Keys_Run_destructors+0x36><== NEVER TAKEN 4e22a: 60d8 bras 4e204 <_POSIX_Keys_Run_destructors+0x78> =============================================================================== 0004c390 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4c390: 4e56 ffe4 linkw %fp,#-28 4c394: 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( 4c398: 486e fffc pea %fp@(-4) 4c39c: 242e 0008 movel %fp@(8),%d2 4c3a0: 2f02 movel %d2,%sp@- 4c3a2: 4879 0006 9c56 pea 69c56 <_POSIX_Message_queue_Information_fds> 4c3a8: 162e 001b moveb %fp@(27),%d3 4c3ac: 4eb9 0004 f84c jsr 4f84c <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4c3b2: 4fef 000c lea %sp@(12),%sp 4c3b6: 4aae fffc tstl %fp@(-4) 4c3ba: 671a beqs 4c3d6 <_POSIX_Message_queue_Receive_support+0x46> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c3bc: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c3c2: 72ff moveq #-1,%d1 4c3c4: 2040 moveal %d0,%a0 4c3c6: 7009 moveq #9,%d0 } 4c3c8: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c3ce: 2080 movel %d0,%a0@ } 4c3d0: 2001 movel %d1,%d0 4c3d2: 4e5e unlk %fp 4c3d4: 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 ) { 4c3d6: 2040 moveal %d0,%a0 4c3d8: 7803 moveq #3,%d4 4c3da: 7a01 moveq #1,%d5 4c3dc: 2228 0014 movel %a0@(20),%d1 4c3e0: c881 andl %d1,%d4 4c3e2: ba84 cmpl %d4,%d5 4c3e4: 6700 00f0 beqw 4c4d6 <_POSIX_Message_queue_Receive_support+0x146> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4c3e8: 2240 moveal %d0,%a1 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4c3ea: 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; 4c3ee: 2069 0010 moveal %a1@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4c3f2: b0a8 0066 cmpl %a0@(102),%d0 4c3f6: 6500 0094 bcsw 4c48c <_POSIX_Message_queue_Receive_support+0xfc> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4c3fa: 70ff moveq #-1,%d0 4c3fc: 2d40 fff8 movel %d0,%fp@(-8) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c400: 4a03 tstb %d3 4c402: 6756 beqs 4c45a <_POSIX_Message_queue_Receive_support+0xca><== NEVER TAKEN do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c404: 2f2e 001c movel %fp@(28),%sp@- length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c408: 0801 000e btst #14,%d1 4c40c: 57c0 seq %d0 4c40e: 49c0 extbl %d0 4c410: 4480 negl %d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c412: 2f00 movel %d0,%sp@- 4c414: 486e fff8 pea %fp@(-8) 4c418: 2f2e 000c movel %fp@(12),%sp@- 4c41c: 2f02 movel %d2,%sp@- 4c41e: 4868 001a pea %a0@(26) 4c422: 4eb9 0004 e73c jsr 4e73c <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4c428: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4c42e: 2079 0006 9cc8 moveal 69cc8 <_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); 4c434: 2028 0024 movel %a0@(36),%d0 4c438: 6d4e blts 4c488 <_POSIX_Message_queue_Receive_support+0xf8> do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4c43a: 226e 0014 moveal %fp@(20),%a1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4c43e: 4fef 0018 lea %sp@(24),%sp do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4c442: 2280 movel %d0,%a1@ _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4c444: 4aa8 0034 tstl %a0@(52) 4c448: 6662 bnes 4c4ac <_POSIX_Message_queue_Receive_support+0x11c> return length_out; 4c44a: 222e fff8 movel %fp@(-8),%d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c44e: 2001 movel %d1,%d0 4c450: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c456: 4e5e unlk %fp 4c458: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c45a: 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 ) 4c45e: 4280 clrl %d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c460: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c462: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4c466: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4c46a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c46c: 4868 001a pea %a0@(26) <== NOT EXECUTED 4c470: 4eb9 0004 e73c jsr 4e73c <_CORE_message_queue_Seize> <== NOT EXECUTED &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4c476: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch> <== NOT EXECUTED *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4c47c: 2079 0006 9cc8 moveal 69cc8 <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 4c482: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 4c486: 6cb2 bges 4c43a <_POSIX_Message_queue_Receive_support+0xaa><== NOT EXECUTED 4c488: 4480 negl %d0 4c48a: 60ae bras 4c43a <_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(); 4c48c: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4c492: 747a moveq #122,%d2 4c494: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c49a: 72ff moveq #-1,%d1 4c49c: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c49e: 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 ); 4c4a0: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c4a2: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c4a8: 4e5e unlk %fp 4c4aa: 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( 4c4ac: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c4b2: 2079 0006 9cc8 moveal 69cc8 <_Per_CPU_Information+0xc>,%a0 4c4b8: 2440 moveal %d0,%a2 4c4ba: 2f28 0034 movel %a0@(52),%sp@- 4c4be: 4eb9 0004 c78c jsr 4c78c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c4c4: 588f addql #4,%sp 4c4c6: 72ff moveq #-1,%d1 4c4c8: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c4ca: 2001 movel %d1,%d0 4c4cc: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c4d2: 4e5e unlk %fp 4c4d4: 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(); 4c4d6: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4c4dc: 7609 moveq #9,%d3 4c4de: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c4e4: 72ff moveq #-1,%d1 4c4e6: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c4e8: 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 ); 4c4ea: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c4ec: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c4f2: 4e5e unlk %fp ... =============================================================================== 0004c51c <_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 ) 4c51c: 7020 moveq #32,%d0 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 4c51e: 4e56 ffe8 linkw %fp,#-24 4c522: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4c526: 262e 0008 movel %fp@(8),%d3 4c52a: 242e 0014 movel %fp@(20),%d2 4c52e: 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 ) 4c532: b082 cmpl %d2,%d0 4c534: 6500 00e2 bcsw 4c618 <_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( 4c538: 486e fffc pea %fp@(-4) 4c53c: 2f03 movel %d3,%sp@- 4c53e: 4879 0006 9c56 pea 69c56 <_POSIX_Message_queue_Information_fds> 4c544: 4eb9 0004 f84c jsr 4f84c <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4c54a: 4fef 000c lea %sp@(12),%sp 4c54e: 4aae fffc tstl %fp@(-4) 4c552: 6600 00aa bnew 4c5fe <_POSIX_Message_queue_Send_support+0xe2> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4c556: 2240 moveal %d0,%a1 4c558: 7a03 moveq #3,%d5 4c55a: 2229 0014 movel %a1@(20),%d1 4c55e: ca81 andl %d1,%d5 4c560: 6700 00d0 beqw 4c632 <_POSIX_Message_queue_Send_support+0x116> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4c564: 2240 moveal %d0,%a1 4c566: 2069 0010 moveal %a1@(16),%a0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c56a: 4a04 tstb %d4 4c56c: 6750 beqs 4c5be <_POSIX_Message_queue_Send_support+0xa2> do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c56e: 2f2e 001c movel %fp@(28),%sp@- 4c572: 4482 negl %d2 the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c574: 0801 000e btst #14,%d1 4c578: 57c0 seq %d0 4c57a: 49c0 extbl %d0 4c57c: 4480 negl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c57e: 2f00 movel %d0,%sp@- 4c580: 2f02 movel %d2,%sp@- 4c582: 42a7 clrl %sp@- 4c584: 2f03 movel %d3,%sp@- 4c586: 2f2e 0010 movel %fp@(16),%sp@- 4c58a: 2f2e 000c movel %fp@(12),%sp@- 4c58e: 4868 001a pea %a0@(26) 4c592: 4eb9 0004 e874 jsr 4e874 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c598: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c59c: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c59e: 4eb9 0005 015e jsr 5015e <_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 ) 4c5a4: 7007 moveq #7,%d0 4c5a6: b082 cmpl %d2,%d0 4c5a8: 6748 beqs 4c5f2 <_POSIX_Message_queue_Send_support+0xd6> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4c5aa: 4a82 tstl %d2 4c5ac: 6600 00a4 bnew 4c652 <_POSIX_Message_queue_Send_support+0x136> return msg_status; 4c5b0: 4281 clrl %d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c5b2: 2001 movel %d1,%d0 4c5b4: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c5ba: 4e5e unlk %fp 4c5bc: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c5be: 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 ) 4c5c2: 4280 clrl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c5c4: 4482 negl %d2 4c5c6: 2f00 movel %d0,%sp@- 4c5c8: 2f02 movel %d2,%sp@- 4c5ca: 42a7 clrl %sp@- 4c5cc: 2f03 movel %d3,%sp@- 4c5ce: 2f2e 0010 movel %fp@(16),%sp@- 4c5d2: 2f2e 000c movel %fp@(12),%sp@- 4c5d6: 4868 001a pea %a0@(26) 4c5da: 4eb9 0004 e874 jsr 4e874 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c5e0: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c5e4: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c5e6: 4eb9 0005 015e jsr 5015e <_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 ) 4c5ec: 7007 moveq #7,%d0 4c5ee: b082 cmpl %d2,%d0 4c5f0: 66b8 bnes 4c5aa <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN msg_status = _Thread_Executing->Wait.return_code; 4c5f2: 2079 0006 9cc8 moveal 69cc8 <_Per_CPU_Information+0xc>,%a0 4c5f8: 2428 0034 movel %a0@(52),%d2 4c5fc: 60ac bras 4c5aa <_POSIX_Message_queue_Send_support+0x8e> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c5fe: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c604: 72ff moveq #-1,%d1 4c606: 2040 moveal %d0,%a0 4c608: 7009 moveq #9,%d0 } 4c60a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c610: 2080 movel %d0,%a0@ } 4c612: 2001 movel %d1,%d0 4c614: 4e5e unlk %fp 4c616: 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 ); 4c618: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c61e: 7616 moveq #22,%d3 4c620: 72ff moveq #-1,%d1 4c622: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c624: 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 ); 4c626: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c628: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c62e: 4e5e unlk %fp 4c630: 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(); 4c632: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4c638: 7409 moveq #9,%d2 4c63a: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c640: 72ff moveq #-1,%d1 4c642: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c644: 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 ); 4c646: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c648: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c64e: 4e5e unlk %fp 4c650: 4e75 rts msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 4c652: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c658: 2440 moveal %d0,%a2 4c65a: 2f02 movel %d2,%sp@- 4c65c: 4eb9 0004 c78c jsr 4c78c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c662: 588f addql #4,%sp 4c664: 72ff moveq #-1,%d1 4c666: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c668: 2001 movel %d1,%d0 4c66a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c670: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bacc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 4bacc: 4e56 0000 linkw %fp,#0 4bad0: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4bad4: 2069 010e moveal %a1@(270),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4bad8: 4aa8 00d4 tstl %a0@(212) 4badc: 6608 bnes 4bae6 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN 4bade: 7001 moveq #1,%d0 4bae0: b0a8 00d8 cmpl %a0@(216),%d0 4bae4: 6708 beqs 4baee <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4bae6: 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(); 4bae8: 4ef9 0004 8c12 jmp 48c12 <_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 && 4baee: 4aa8 00dc tstl %a0@(220) 4baf2: 67f2 beqs 4bae6 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 4baf4: 4878 ffff pea ffffffff */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4baf8: 2039 0006 02d0 movel 602d0 <_Thread_Dispatch_disable_level>,%d0 4bafe: 5380 subql #1,%d0 4bb00: 2f09 movel %a1,%sp@- 4bb02: 23c0 0006 02d0 movel %d0,602d0 <_Thread_Dispatch_disable_level> 4bb08: 4eb9 0004 c418 jsr 4c418 <_POSIX_Thread_Exit> 4bb0e: 508f addql #8,%sp } else _Thread_Enable_dispatch(); } 4bb10: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d230 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4d230: 4e56 ffe8 linkw %fp,#-24 4d234: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4d238: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4d23c: 47f9 0004 d20c lea 4d20c <_POSIX_Priority_Is_valid>,%a3 4d242: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4d244: 242e 0008 movel %fp@(8),%d2 4d248: 286e 0010 moveal %fp@(16),%a4 4d24c: 2a6e 0014 moveal %fp@(20),%a5 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4d250: 4e93 jsr %a3@ 4d252: 588f addql #4,%sp 4d254: 4a00 tstb %d0 4d256: 6720 beqs 4d278 <_POSIX_Thread_Translate_sched_param+0x48><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4d258: 4294 clrl %a4@ *budget_callout = NULL; 4d25a: 4295 clrl %a5@ if ( policy == SCHED_OTHER ) { 4d25c: 4a82 tstl %d2 4d25e: 6724 beqs 4d284 <_POSIX_Thread_Translate_sched_param+0x54> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 4d260: 7001 moveq #1,%d0 4d262: b082 cmpl %d2,%d0 4d264: 6700 0086 beqw 4d2ec <_POSIX_Thread_Translate_sched_param+0xbc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 4d268: 103c 0002 moveb #2,%d0 4d26c: b082 cmpl %d2,%d0 4d26e: 6700 0088 beqw 4d2f8 <_POSIX_Thread_Translate_sched_param+0xc8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 4d272: 7004 moveq #4,%d0 4d274: b082 cmpl %d2,%d0 4d276: 671c beqs 4d294 <_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; 4d278: 7016 moveq #22,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d27a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d280: 4e5e unlk %fp 4d282: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4d284: 7201 moveq #1,%d1 return 0; 4d286: 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; 4d288: 2881 movel %d1,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d28a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d290: 4e5e unlk %fp 4d292: 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) && 4d294: 4aaa 0008 tstl %a2@(8) 4d298: 6606 bnes 4d2a0 <_POSIX_Thread_Translate_sched_param+0x70> 4d29a: 4aaa 000c tstl %a2@(12) 4d29e: 67d8 beqs 4d278 <_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) && 4d2a0: 4aaa 0010 tstl %a2@(16) 4d2a4: 6606 bnes 4d2ac <_POSIX_Thread_Translate_sched_param+0x7c> 4d2a6: 4aaa 0014 tstl %a2@(20) 4d2aa: 67cc beqs 4d278 <_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 ) < 4d2ac: 486a 0008 pea %a2@(8) 4d2b0: 243c 0004 abac movel #306092,%d2 4d2b6: 2042 moveal %d2,%a0 4d2b8: 4e90 jsr %a0@ _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4d2ba: 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 ) < 4d2be: 2600 movel %d0,%d3 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4d2c0: 2042 moveal %d2,%a0 4d2c2: 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 ) < 4d2c4: 508f addql #8,%sp 4d2c6: b083 cmpl %d3,%d0 4d2c8: 62ae bhis 4d278 <_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 ) ) 4d2ca: 2f2a 0004 movel %a2@(4),%sp@- 4d2ce: 4e93 jsr %a3@ 4d2d0: 588f addql #4,%sp 4d2d2: 4a00 tstb %d0 4d2d4: 67a2 beqs 4d278 <_POSIX_Thread_Translate_sched_param+0x48> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4d2d6: 7003 moveq #3,%d0 4d2d8: 2880 movel %d0,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 4d2da: 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; 4d2dc: 2abc 0004 7000 movel #290816,%a5@ return 0; } return EINVAL; } 4d2e2: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d2e8: 4e5e unlk %fp 4d2ea: 4e75 rts return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 4d2ec: 4280 clrl %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d2ee: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d2f4: 4e5e unlk %fp 4d2f6: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4d2f8: 2880 movel %d0,%a4@ return 0; 4d2fa: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d2fc: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d302: 4e5e unlk %fp ... =============================================================================== 00046c90 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 46c90: 4e56 ff9c linkw %fp,#-100 46c94: 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; 46c98: 2479 0005 f7de moveal 5f7de ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 46c9e: 2839 0005 f7da movel 5f7da ,%d4 if ( !user_threads || maximum == 0 ) 46ca4: 4a8a tstl %a2 46ca6: 675a beqs 46d02 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN 46ca8: 4a84 tstl %d4 46caa: 6756 beqs 46d02 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN 46cac: 240e movel %fp,%d2 46cae: 2a0e movel %fp,%d5 46cb0: 4283 clrl %d3 46cb2: 0682 ffff ffc0 addil #-64,%d2 46cb8: 2c3c 0004 d308 movel #316168,%d6 46cbe: 4bf9 0004 d334 lea 4d334 ,%a5 46cc4: 49f9 0004 d374 lea 4d374 ,%a4 46cca: 5985 subql #4,%d5 46ccc: 47f9 0004 68dc lea 468dc ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 46cd2: 2f02 movel %d2,%sp@- 46cd4: 2046 moveal %d6,%a0 46cd6: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 46cd8: 4878 0002 pea 2 46cdc: 2f02 movel %d2,%sp@- 46cde: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 46ce0: 2f2a 0004 movel %a2@(4),%sp@- 46ce4: 2f02 movel %d2,%sp@- 46ce6: 4e94 jsr %a4@ status = pthread_create( 46ce8: 42a7 clrl %sp@- 46cea: 2f12 movel %a2@,%sp@- 46cec: 2f02 movel %d2,%sp@- 46cee: 2f05 movel %d5,%sp@- 46cf0: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 46cf2: 4fef 0024 lea %sp@(36),%sp 46cf6: 4a80 tstl %d0 46cf8: 6612 bnes 46d0c <_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++ ) { 46cfa: 5283 addql #1,%d3 46cfc: 508a addql #8,%a2 46cfe: b684 cmpl %d4,%d3 46d00: 65d0 bcss 46cd2 <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 46d02: 4cee 3c7c ff9c moveml %fp@(-100),%d2-%d6/%a2-%a5 46d08: 4e5e unlk %fp 46d0a: 4e75 rts &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 46d0c: 2f00 movel %d0,%sp@- 46d0e: 4878 0001 pea 1 46d12: 4878 0002 pea 2 46d16: 4eb9 0004 8e14 jsr 48e14 <_Internal_error_Occurred> =============================================================================== 0004bef0 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 4bef0: 4e56 fff4 linkw %fp,#-12 4bef4: 48d7 1c00 moveml %a2-%a4,%sp@ 4bef8: 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 ); 4befc: 49f9 0004 ce4c lea 4ce4c <_Timespec_To_ticks>,%a4 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4bf02: 246b 010e moveal %a3@(270),%a2 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4bf06: 486a 0094 pea %a2@(148) 4bf0a: 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 ) { 4bf0c: 588f addql #4,%sp RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4bf0e: 4281 clrl %d1 4bf10: 1239 0005 e322 moveb 5e322 ,%d1 4bf16: 92aa 0084 subl %a2@(132),%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; 4bf1a: 2740 0076 movel %d0,%a3@(118) new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 4bf1e: 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 ) { 4bf22: 4aab 001c tstl %a3@(28) 4bf26: 6606 bnes 4bf2e <_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 ) { 4bf28: b2ab 0014 cmpl %a3@(20),%d1 4bf2c: 652c bcss 4bf5a <_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 ); 4bf2e: 486a 008c pea %a2@(140) 4bf32: 4e94 jsr %a4@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4bf34: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4bf36: 2540 00b0 movel %d0,%a2@(176) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4bf3a: 45ea 00a4 lea %a2@(164),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4bf3e: 203c 0005 fb9e movel #392094,%d0 4bf44: 2d4a 000c movel %a2,%fp@(12) } 4bf48: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4bf4e: 2d40 0008 movel %d0,%fp@(8) 4bf52: 4e5e unlk %fp 4bf54: 4ef9 0004 9ab8 jmp 49ab8 <_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 ); 4bf5a: 4878 0001 pea 1 4bf5e: 2f01 movel %d1,%sp@- 4bf60: 2f0b movel %a3,%sp@- 4bf62: 4eb9 0004 837c jsr 4837c <_Thread_Change_priority> 4bf68: 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 ); 4bf6c: 486a 008c pea %a2@(140) 4bf70: 4e94 jsr %a4@ 4bf72: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4bf74: 2540 00b0 movel %d0,%a2@(176) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4bf78: 45ea 00a4 lea %a2@(164),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4bf7c: 203c 0005 fb9e movel #392094,%d0 4bf82: 2d4a 000c movel %a2,%fp@(12) } 4bf86: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4bf8c: 2d40 0008 movel %d0,%fp@(8) 4bf90: 4e5e unlk %fp 4bf92: 4ef9 0004 9ab8 jmp 49ab8 <_Watchdog_Insert> =============================================================================== 0004bf98 <_POSIX_Threads_Sporadic_budget_callout>: 4bf98: 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 */ 4bf9a: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4bf9c: 4e56 0000 linkw %fp,#0 4bfa0: 206e 0008 moveal %fp@(8),%a0 4bfa4: 1039 0005 e322 moveb 5e322 ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4bfaa: 2268 010e moveal %a0@(270),%a1 4bfae: 90a9 0088 subl %a1@(136),%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 */ 4bfb2: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4bfb6: 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 ) { 4bfba: 4aa8 001c tstl %a0@(28) 4bfbe: 6606 bnes 4bfc6 <_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 ) { 4bfc0: b0a8 0014 cmpl %a0@(20),%d0 4bfc4: 6204 bhis 4bfca <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 4bfc6: 4e5e unlk %fp <== NOT EXECUTED 4bfc8: 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 ); 4bfca: 4878 0001 pea 1 4bfce: 2f00 movel %d0,%sp@- 4bfd0: 2f08 movel %a0,%sp@- 4bfd2: 4eb9 0004 837c jsr 4837c <_Thread_Change_priority> 4bfd8: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4bfdc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e124 <_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; 4e124: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4e126: 4e56 ffec linkw %fp,#-20 4e12a: 206e 0008 moveal %fp@(8),%a0 4e12e: 48d7 3c04 moveml %d2/%a2-%a5,%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 ]; 4e132: 2668 010e moveal %a0@(270),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4e136: 45eb 00e4 lea %a3@(228),%a2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4e13a: 2740 00d4 movel %d0,%a3@(212) while ( !_Chain_Is_empty( handler_stack ) ) { 4e13e: b5eb 00e0 cmpal %a3@(224),%a2 4e142: 673c beqs 4e180 <_POSIX_Threads_cancel_run+0x5c> 4e144: 49f9 0004 9d9e lea 49d9e <_Workspace_Free>,%a4 _ISR_Disable( level ); 4e14a: 243c 0000 0700 movel #1792,%d2 4e150: 2002 movel %d2,%d0 4e152: 40c1 movew %sr,%d1 4e154: 8081 orl %d1,%d0 4e156: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4e158: 2a6a 0004 moveal %a2@(4),%a5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4e15c: 2255 moveal %a5@,%a1 previous = the_node->previous; 4e15e: 206d 0004 moveal %a5@(4),%a0 next->previous = previous; 4e162: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4e166: 2089 movel %a1,%a0@ _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4e168: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4e16a: 2f2d 000c movel %a5@(12),%sp@- 4e16e: 206d 0008 moveal %a5@(8),%a0 4e172: 4e90 jsr %a0@ _Workspace_Free( handler ); 4e174: 2f0d movel %a5,%sp@- 4e176: 4e94 jsr %a4@ handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 4e178: 508f addql #8,%sp 4e17a: b5eb 00e0 cmpal %a3@(224),%a2 4e17e: 66d0 bnes 4e150 <_POSIX_Threads_cancel_run+0x2c> <== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4e180: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4e186: 4e5e unlk %fp ... =============================================================================== 000465f0 <_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) { 465f0: 4e56 0000 linkw %fp,#0 465f4: 2f0a movel %a2,%sp@- 465f6: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 465fa: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 465fe: 4aaa 0052 tstl %a2@(82) 46602: 6606 bnes 4660a <_POSIX_Timer_TSR+0x1a> 46604: 4aaa 0056 tstl %a2@(86) 46608: 672a beqs 46634 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 4660a: 2f0a movel %a2,%sp@- 4660c: 4879 0004 65f0 pea 465f0 <_POSIX_Timer_TSR> 46612: 2f2a 0008 movel %a2@(8),%sp@- 46616: 2f2a 0062 movel %a2@(98),%sp@- 4661a: 486a 0010 pea %a2@(16) 4661e: 4eb9 0004 ca88 jsr 4ca88 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 46624: 4fef 0014 lea %sp@(20),%sp 46628: 4a00 tstb %d0 4662a: 662a bnes 46656 <_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; } 4662c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 46630: 4e5e unlk %fp <== NOT EXECUTED 46632: 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; 46634: 7004 moveq #4,%d0 <== NOT EXECUTED 46636: 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 ) ) { 4663a: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 4663e: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 46642: 4eb9 0004 c5a8 jsr 4c5a8 <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 46648: 508f addql #8,%sp <== NOT EXECUTED 4664a: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED } 4664e: 246e fffc moveal %fp@(-4),%a2 46652: 4e5e unlk %fp 46654: 4e75 rts ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 46656: 486a 006a pea %a2@(106) 4665a: 4eb9 0004 7dc4 jsr 47dc4 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 46660: 588f addql #4,%sp 46662: 7003 moveq #3,%d0 46664: 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 ) ) { 46668: 2f2a 0042 movel %a2@(66),%sp@- 4666c: 2f2a 0038 movel %a2@(56),%sp@- 46670: 4eb9 0004 c5a8 jsr 4c5a8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 46676: 508f addql #8,%sp 46678: 42aa 0066 clrl %a2@(102) 4667c: 60d0 bras 4664e <_POSIX_Timer_TSR+0x5e> ... =============================================================================== 0004e22c <_POSIX_signals_Check_signal>: ) { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4e22c: 4280 clrl %d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4e22e: 4e56 ffe4 linkw %fp,#-28 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4e232: 102e 0013 moveb %fp@(19),%d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4e236: 48d7 041c moveml %d2-%d4/%a2,%sp@ siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4e23a: 4878 0001 pea 1 4e23e: 260e movel %fp,%d3 4e240: 0683 ffff fff4 addil #-12,%d3 4e246: 2f00 movel %d0,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4e248: 242e 000c movel %fp@(12),%d2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4e24c: 2f03 movel %d3,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4e24e: 246e 0008 moveal %fp@(8),%a2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4e252: 2f02 movel %d2,%sp@- 4e254: 2f0a movel %a2,%sp@- 4e256: 4eb9 0004 e2d4 jsr 4e2d4 <_POSIX_signals_Clear_signals> 4e25c: 4fef 0014 lea %sp@(20),%sp 4e260: 4a00 tstb %d0 4e262: 6762 beqs 4e2c6 <_POSIX_signals_Check_signal+0x9a> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4e264: 2202 movel %d2,%d1 4e266: 2002 movel %d2,%d0 4e268: e589 lsll #2,%d1 4e26a: e988 lsll #4,%d0 4e26c: 9081 subl %d1,%d0 4e26e: 2240 moveal %d0,%a1 4e270: d3fc 0005 ff7a addal #393082,%a1 4e276: 7201 moveq #1,%d1 4e278: 2069 0008 moveal %a1@(8),%a0 4e27c: b288 cmpl %a0,%d1 4e27e: 6746 beqs 4e2c6 <_POSIX_signals_Check_signal+0x9a><== NEVER TAKEN /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4e280: 2229 0004 movel %a1@(4),%d1 /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4e284: 43f9 0005 ff7a lea 5ff7a <_POSIX_signals_Vectors>,%a1 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4e28a: 282a 00cc movel %a2@(204),%d4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4e28e: 8284 orl %d4,%d1 4e290: 2541 00cc movel %d1,%a2@(204) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4e294: 7202 moveq #2,%d1 4e296: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1 4e29a: 6716 beqs 4e2b2 <_POSIX_signals_Check_signal+0x86> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4e29c: 2f02 movel %d2,%sp@- 4e29e: 4e90 jsr %a0@ break; 4e2a0: 588f addql #4,%sp /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 4e2a2: 7001 moveq #1,%d0 } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4e2a4: 2544 00cc movel %d4,%a2@(204) return true; } 4e2a8: 4cee 041c ffe4 moveml %fp@(-28),%d2-%d4/%a2 4e2ae: 4e5e unlk %fp 4e2b0: 4e75 rts /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4e2b2: 42a7 clrl %sp@- 4e2b4: 2f03 movel %d3,%sp@- 4e2b6: 2f02 movel %d2,%sp@- 4e2b8: 4e90 jsr %a0@ signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 4e2ba: 4fef 000c lea %sp@(12),%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4e2be: 2544 00cc movel %d4,%a2@(204) return true; 4e2c2: 7001 moveq #1,%d0 4e2c4: 60e2 bras 4e2a8 <_POSIX_signals_Check_signal+0x7c> } 4e2c6: 4cee 041c ffe4 moveml %fp@(-28),%d2-%d4/%a2 /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) return false; 4e2cc: 4200 clrb %d0 * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } 4e2ce: 4e5e unlk %fp ... =============================================================================== 0004e95c <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4e95c: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4e962: 4e56 0000 linkw %fp,#0 4e966: 222e 0008 movel %fp@(8),%d1 4e96a: 2f03 movel %d3,%sp@- 4e96c: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4e96e: 40c2 movew %sr,%d2 4e970: 8082 orl %d2,%d0 4e972: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4e974: 2601 movel %d1,%d3 4e976: 2001 movel %d1,%d0 4e978: 41f9 0005 ff7a lea 5ff7a <_POSIX_signals_Vectors>,%a0 4e97e: e58b lsll #2,%d3 4e980: e988 lsll #4,%d0 4e982: 9083 subl %d3,%d0 4e984: 7602 moveq #2,%d3 4e986: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4e98a: 6718 beqs 4e9a4 <_POSIX_signals_Clear_process_signals+0x48> 4e98c: 5381 subql #1,%d1 4e98e: 7001 moveq #1,%d0 4e990: e3a8 lsll %d1,%d0 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4e992: 4680 notl %d0 4e994: c1b9 0006 016e andl %d0,6016e <_POSIX_signals_Pending> } _ISR_Enable( level ); 4e99a: 46c2 movew %d2,%sr } 4e99c: 241f movel %sp@+,%d2 4e99e: 261f movel %sp@+,%d3 4e9a0: 4e5e unlk %fp 4e9a2: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4e9a4: 2040 moveal %d0,%a0 4e9a6: d1fc 0006 0176 addal #393590,%a0 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4e9ac: 43f9 0006 0172 lea 60172 <_POSIX_signals_Siginfo>,%a1 4e9b2: b1f1 0800 cmpal %a1@(00000000,%d0:l),%a0 4e9b6: 67d4 beqs 4e98c <_POSIX_signals_Clear_process_signals+0x30><== ALWAYS TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); 4e9b8: 46c2 movew %d2,%sr <== NOT EXECUTED } 4e9ba: 241f movel %sp@+,%d2 <== NOT EXECUTED 4e9bc: 261f movel %sp@+,%d3 <== NOT EXECUTED 4e9be: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004e2d4 <_POSIX_signals_Clear_signals>: static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4e2d4: 7001 moveq #1,%d0 int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4e2d6: 4e56 ffe8 linkw %fp,#-24 4e2da: 206e 0008 moveal %fp@(8),%a0 4e2de: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4e2e2: 242e 000c movel %fp@(12),%d2 4e2e6: 2202 movel %d2,%d1 4e2e8: 5381 subql #1,%d1 4e2ea: 1a2e 0017 moveb %fp@(23),%d5 4e2ee: e3a8 lsll %d1,%d0 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 4e2f0: 4a2e 001b tstb %fp@(27) 4e2f4: 6752 beqs 4e348 <_POSIX_signals_Clear_signals+0x74> signals_blocked = ~api->signals_blocked; 4e2f6: 2828 00cc movel %a0@(204),%d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4e2fa: 223c 0000 0700 movel #1792,%d1 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 4e300: 4684 notl %d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4e302: 40c3 movew %sr,%d3 4e304: 8283 orl %d3,%d1 4e306: 46c1 movew %d1,%sr if ( is_global ) { 4e308: 4a05 tstb %d5 4e30a: 674e beqs 4e35a <_POSIX_signals_Clear_signals+0x86> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4e30c: c0b9 0006 016e andl 6016e <_POSIX_signals_Pending>,%d0 4e312: c084 andl %d4,%d0 4e314: 6768 beqs 4e37e <_POSIX_signals_Clear_signals+0xaa> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4e316: 2202 movel %d2,%d1 4e318: 2002 movel %d2,%d0 4e31a: 47f9 0004 e95c lea 4e95c <_POSIX_signals_Clear_process_signals>,%a3 4e320: 41f9 0005 ff7a lea 5ff7a <_POSIX_signals_Vectors>,%a0 4e326: e589 lsll #2,%d1 4e328: e988 lsll #4,%d0 4e32a: 9081 subl %d1,%d0 4e32c: 7202 moveq #2,%d1 4e32e: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1 4e332: 6758 beqs 4e38c <_POSIX_signals_Clear_signals+0xb8> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4e334: 2f02 movel %d2,%sp@- 4e336: 4e93 jsr %a3@ 4e338: 588f addql #4,%sp do_callout = true; 4e33a: 7001 moveq #1,%d0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4e33c: 46c3 movew %d3,%sr return do_callout; } 4e33e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4e344: 4e5e unlk %fp 4e346: 4e75 rts */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; else signals_blocked = SIGNAL_ALL_MASK; 4e348: 78ff moveq #-1,%d4 /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4e34a: 223c 0000 0700 movel #1792,%d1 4e350: 40c3 movew %sr,%d3 4e352: 8283 orl %d3,%d1 4e354: 46c1 movew %d1,%sr if ( is_global ) { 4e356: 4a05 tstb %d5 4e358: 66b2 bnes 4e30c <_POSIX_signals_Clear_signals+0x38> } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4e35a: 2428 00d0 movel %a0@(208),%d2 4e35e: 2200 movel %d0,%d1 4e360: c282 andl %d2,%d1 4e362: c284 andl %d4,%d1 4e364: 6718 beqs 4e37e <_POSIX_signals_Clear_signals+0xaa> api->signals_pending &= ~mask; 4e366: 2200 movel %d0,%d1 4e368: 4681 notl %d1 4e36a: c282 andl %d2,%d1 do_callout = true; 4e36c: 7001 moveq #1,%d0 _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4e36e: 2141 00d0 movel %d1,%a0@(208) do_callout = true; } } _ISR_Enable( level ); 4e372: 46c3 movew %d3,%sr return do_callout; } 4e374: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4e37a: 4e5e unlk %fp 4e37c: 4e75 rts bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); do_callout = false; 4e37e: 4200 clrb %d0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4e380: 46c3 movew %d3,%sr return do_callout; } 4e382: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4e388: 4e5e unlk %fp 4e38a: 4e75 rts */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4e38c: 41f9 0006 0172 lea 60172 <_POSIX_signals_Siginfo>,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4e392: 2200 movel %d0,%d1 4e394: 0681 0006 0176 addil #393590,%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4e39a: 2470 0800 moveal %a0@(00000000,%d0:l),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4e39e: b28a cmpl %a2,%d1 4e3a0: 6746 beqs 4e3e8 <_POSIX_signals_Clear_signals+0x114> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4e3a2: 2252 moveal %a2@,%a1 the_chain->first = new_first; 4e3a4: 2189 0800 movel %a1,%a0@(00000000,%d0:l) _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); 4e3a8: d088 addl %a0,%d0 4e3aa: 2340 0004 movel %d0,%a1@(4) _POSIX_signals_Clear_process_signals( signo ); 4e3ae: 2f02 movel %d2,%sp@- 4e3b0: 4e93 jsr %a3@ * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { *info = psiginfo->Info; 4e3b2: 206e 0010 moveal %fp@(16),%a0 the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; the_node->previous = old_last_node; 4e3b6: 588f addql #4,%sp 4e3b8: 20ea 0008 movel %a2@(8),%a0@+ 4e3bc: 20ea 000c movel %a2@(12),%a0@+ 4e3c0: 20aa 0010 movel %a2@(16),%a0@ ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4e3c4: 2079 0006 0102 moveal 60102 <_POSIX_signals_Inactive_siginfo+0x8>,%a0 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4e3ca: 24bc 0006 00fe movel #393470,%a2@ old_last_node = the_chain->last; the_chain->last = the_node; 4e3d0: 23ca 0006 0102 movel %a2,60102 <_POSIX_signals_Inactive_siginfo+0x8> old_last_node->next = the_node; 4e3d6: 208a movel %a2,%a0@ the_node->previous = old_last_node; 4e3d8: 2548 0004 movel %a0,%a2@(4) &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4e3dc: 2f02 movel %d2,%sp@- 4e3de: 4e93 jsr %a3@ 4e3e0: 588f addql #4,%sp do_callout = true; 4e3e2: 7001 moveq #1,%d0 4e3e4: 6000 ff56 braw 4e33c <_POSIX_signals_Clear_signals+0x68> if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 4e3e8: 2f02 movel %d2,%sp@- 4e3ea: 4e93 jsr %a3@ 4e3ec: 588f addql #4,%sp &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4e3ee: 2f02 movel %d2,%sp@- 4e3f0: 4e93 jsr %a3@ 4e3f2: 588f addql #4,%sp do_callout = true; 4e3f4: 7001 moveq #1,%d0 4e3f6: 6000 ff44 braw 4e33c <_POSIX_signals_Clear_signals+0x68> ... =============================================================================== 000473c8 <_POSIX_signals_Get_highest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 473c8: 701b moveq #27,%d0 #include int _POSIX_signals_Get_highest( sigset_t set ) { 473ca: 4e56 fff4 linkw %fp,#-12 473ce: 48d7 001c moveml %d2-%d4,%sp@ 473d2: 242e 0008 movel %fp@(8),%d2 473d6: 7601 moveq #1,%d3 #include #include #include #include int _POSIX_signals_Get_highest( 473d8: 2200 movel %d0,%d1 473da: 5381 subql #1,%d1 473dc: 2803 movel %d3,%d4 473de: e3ac lsll %d1,%d4 473e0: 2204 movel %d4,%d1 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 473e2: c282 andl %d2,%d1 473e4: 6626 bnes 4740c <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 473e6: 5280 addql #1,%d0 473e8: 123c 0020 moveb #32,%d1 473ec: b280 cmpl %d0,%d1 473ee: 66e8 bnes 473d8 <_POSIX_signals_Get_highest+0x10> 473f0: 7001 moveq #1,%d0 473f2: 7601 moveq #1,%d3 #include #include #include #include int _POSIX_signals_Get_highest( 473f4: 2200 movel %d0,%d1 473f6: 5381 subql #1,%d1 473f8: 2803 movel %d3,%d4 473fa: e3ac lsll %d1,%d4 473fc: 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 ) ) { 473fe: c282 andl %d2,%d1 47400: 660a bnes 4740c <_POSIX_signals_Get_highest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 47402: 5280 addql #1,%d0 47404: 123c 001b moveb #27,%d1 47408: b280 cmpl %d0,%d1 4740a: 66e8 bnes 473f4 <_POSIX_signals_Get_highest+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; } 4740c: 4cd7 001c moveml %sp@,%d2-%d4 47410: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b906 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4b906: 4e56 fff0 linkw %fp,#-16 POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b90a: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4b90e: 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 ]; 4b912: 2468 010e moveal %a0@(270),%a2 * * 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 ); 4b916: 263c 0000 0700 movel #1792,%d3 4b91c: 47f9 0004 e22c lea 4e22c <_POSIX_signals_Check_signal>,%a3 4b922: 2003 movel %d3,%d0 4b924: 40c1 movew %sr,%d1 4b926: 8081 orl %d1,%d0 4b928: 46c0 movew %d0,%sr if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 4b92a: 2039 0006 016e movel 6016e <_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 & 4b930: 242a 00cc movel %a2@(204),%d2 4b934: 4682 notl %d2 (api->signals_pending | _POSIX_signals_Pending)) ) { 4b936: 80aa 00d0 orl %a2@(208),%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 & 4b93a: c082 andl %d2,%d0 4b93c: 6762 beqs 4b9a0 <_POSIX_signals_Post_switch_extension+0x9a> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 4b93e: 46c1 movew %d1,%sr for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4b940: 741b moveq #27,%d2 _POSIX_signals_Check_signal( api, signo, false ); 4b942: 42a7 clrl %sp@- 4b944: 2f02 movel %d2,%sp@- 4b946: 2f0a movel %a2,%sp@- 4b948: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4b94a: 4878 0001 pea 1 4b94e: 2f02 movel %d2,%sp@- _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4b950: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4b952: 2f0a movel %a2,%sp@- 4b954: 4e93 jsr %a3@ _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4b956: 4fef 0018 lea %sp@(24),%sp 4b95a: 7020 moveq #32,%d0 4b95c: b082 cmpl %d2,%d0 4b95e: 66e2 bnes 4b942 <_POSIX_signals_Post_switch_extension+0x3c> 4b960: 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 ); 4b962: 42a7 clrl %sp@- 4b964: 2f02 movel %d2,%sp@- 4b966: 2f0a movel %a2,%sp@- 4b968: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4b96a: 4878 0001 pea 1 4b96e: 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++ ) { 4b970: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4b972: 2f0a movel %a2,%sp@- 4b974: 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++ ) { 4b976: 4fef 0018 lea %sp@(24),%sp 4b97a: 701b moveq #27,%d0 4b97c: b082 cmpl %d2,%d0 4b97e: 67a2 beqs 4b922 <_POSIX_signals_Post_switch_extension+0x1c><== NEVER TAKEN _POSIX_signals_Check_signal( api, signo, false ); 4b980: 42a7 clrl %sp@- 4b982: 2f02 movel %d2,%sp@- 4b984: 2f0a movel %a2,%sp@- 4b986: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4b988: 4878 0001 pea 1 4b98c: 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++ ) { 4b98e: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4b990: 2f0a movel %a2,%sp@- 4b992: 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++ ) { 4b994: 4fef 0018 lea %sp@(24),%sp 4b998: 701b moveq #27,%d0 4b99a: b082 cmpl %d2,%d0 4b99c: 66c4 bnes 4b962 <_POSIX_signals_Post_switch_extension+0x5c> 4b99e: 6082 bras 4b922 <_POSIX_signals_Post_switch_extension+0x1c> */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4b9a0: 46c1 movew %d1,%sr for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 4b9a2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b9a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005c3b0 <_POSIX_signals_Unblock_thread>: 5c3b0: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 5c3b2: 4e56 ffec linkw %fp,#-20 5c3b6: 206e 000c moveal %fp@(12),%a0 5c3ba: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 5c3be: 246e 0008 moveal %fp@(8),%a2 5c3c2: 2608 movel %a0,%d3 5c3c4: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5c3c6: 222a 0010 movel %a2@(16),%d1 5c3ca: 2401 movel %d1,%d2 5c3cc: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 5c3d2: 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 ]; 5c3d6: 226a 010e moveal %a2@(270),%a1 5c3da: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5c3dc: 0c82 1000 8000 cmpil #268468224,%d2 5c3e2: 6764 beqs 5c448 <_POSIX_signals_Unblock_thread+0x98> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 5c3e4: 2429 00cc movel %a1@(204),%d2 5c3e8: 4682 notl %d2 5c3ea: c082 andl %d2,%d0 5c3ec: 674e beqs 5c43c <_POSIX_signals_Unblock_thread+0x8c> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 5c3ee: 0801 001c btst #28,%d1 5c3f2: 6732 beqs 5c426 <_POSIX_signals_Unblock_thread+0x76> the_thread->Wait.return_code = EINTR; 5c3f4: 7004 moveq #4,%d0 5c3f6: 2540 0034 movel %d0,%a2@(52) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 5c3fa: 44c1 movew %d1,%ccr 5c3fc: 6a3e bpls 5c43c <_POSIX_signals_Unblock_thread+0x8c><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 5c3fe: 103c 0002 moveb #2,%d0 5c402: b0aa 0050 cmpl %a2@(80),%d0 5c406: 6700 00aa beqw 5c4b2 <_POSIX_signals_Unblock_thread+0x102> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 5c40a: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 5c410: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5c412: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> <== NOT EXECUTED 5c418: 508f addql #8,%sp <== NOT EXECUTED } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; } } return false; 5c41a: 4200 clrb %d0 <== NOT EXECUTED } 5c41c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5c422: 4e5e unlk %fp 5c424: 4e75 rts if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 5c426: 4a81 tstl %d1 5c428: 6612 bnes 5c43c <_POSIX_signals_Unblock_thread+0x8c><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5c42a: 4ab9 0005 ff68 tstl 5ff68 <_Per_CPU_Information+0x8> 5c430: 670a beqs 5c43c <_POSIX_signals_Unblock_thread+0x8c> 5c432: b5f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a2 5c438: 6700 009a beqw 5c4d4 <_POSIX_signals_Unblock_thread+0x124> _Context_Switch_necessary = true; } } return false; } 5c43c: 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 ) ) _Context_Switch_necessary = true; } } return false; 5c442: 4200 clrb %d0 } 5c444: 4e5e unlk %fp 5c446: 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) ) { 5c448: 2200 movel %d0,%d1 5c44a: c2aa 0030 andl %a2@(48),%d1 5c44e: 672e beqs 5c47e <_POSIX_signals_Unblock_thread+0xce> the_thread->Wait.return_code = EINTR; 5c450: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5c452: 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; 5c456: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5c45a: 4a84 tstl %d4 5c45c: 6738 beqs 5c496 <_POSIX_signals_Unblock_thread+0xe6> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 5c45e: 2244 moveal %d4,%a1 5c460: 204b moveal %a3,%a0 5c462: 20d9 movel %a1@+,%a0@+ 5c464: 20d9 movel %a1@+,%a0@+ 5c466: 2091 movel %a1@,%a0@ } _Thread_queue_Extract_with_proxy( the_thread ); 5c468: 2f0a movel %a2,%sp@- 5c46a: 4eb9 0004 9054 jsr 49054 <_Thread_queue_Extract_with_proxy> return true; 5c470: 588f addql #4,%sp 5c472: 7001 moveq #1,%d0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; } } return false; } 5c474: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5c47a: 4e5e unlk %fp 5c47c: 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) ) { 5c47e: 2229 00cc movel %a1@(204),%d1 5c482: 4681 notl %d1 5c484: c081 andl %d1,%d0 5c486: 67b4 beqs 5c43c <_POSIX_signals_Unblock_thread+0x8c> the_thread->Wait.return_code = EINTR; 5c488: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5c48a: 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; 5c48e: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5c492: 4a84 tstl %d4 5c494: 66c8 bnes 5c45e <_POSIX_signals_Unblock_thread+0xae><== ALWAYS TAKEN the_info->si_signo = signo; the_info->si_code = SI_USER; 5c496: 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; 5c49a: 2688 movel %a0,%a3@ the_info->si_code = SI_USER; 5c49c: 2740 0004 movel %d0,%a3@(4) the_info->si_value.sival_int = 0; 5c4a0: 42ab 0008 clrl %a3@(8) } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 5c4a4: 2f0a movel %a2,%sp@- 5c4a6: 4eb9 0004 9054 jsr 49054 <_Thread_queue_Extract_with_proxy> return true; 5c4ac: 588f addql #4,%sp 5c4ae: 7001 moveq #1,%d0 5c4b0: 60c2 bras 5c474 <_POSIX_signals_Unblock_thread+0xc4> _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 5c4b2: 486a 0048 pea %a2@(72) 5c4b6: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 5c4bc: 588f addql #4,%sp 5c4be: 2f3c 1003 fff8 movel #268697592,%sp@- 5c4c4: 2f0a movel %a2,%sp@- 5c4c6: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> 5c4cc: 508f addql #8,%sp } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; } } return false; 5c4ce: 4200 clrb %d0 5c4d0: 6000 ff4a braw 5c41c <_POSIX_signals_Unblock_thread+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 5c4d4: 7001 moveq #1,%d0 } } return false; } 5c4d6: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5c4dc: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 5c4de: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> } } return false; 5c4e4: 4200 clrb %d0 <== NOT EXECUTED } =============================================================================== 0004c39a <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4c39a: 4e56 0000 linkw %fp,#0 4c39e: 2f0a movel %a2,%sp@- 4c3a0: 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() ) 4c3a4: 4a39 0005 e2f4 tstb 5e2f4 4c3aa: 6758 beqs 4c404 <_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 ); 4c3ac: 705e moveq #94,%d0 if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c3ae: 2f00 movel %d0,%sp@- 4c3b0: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate> if ( !api ) 4c3b6: 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 ); 4c3b8: 2040 moveal %d0,%a0 if ( !api ) 4c3ba: 4a80 tstl %d0 4c3bc: 6758 beqs 4c416 <_RTEMS_tasks_Create_extension+0x7c> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4c3be: 2540 010a movel %d0,%a2@(266) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4c3c2: 4200 clrb %d0 api->pending_events = EVENT_SETS_NONE_PENDING; 4c3c4: 4290 clrl %a0@ 4c3c6: 1140 0008 moveb %d0,%a0@(8) api->event_condition = 0; 4c3ca: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4c3ce: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4c3d2: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4c3d6: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4c3da: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4c3de: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4c3e2: 42aa 0116 clrl %a2@(278) if ( rtems_configuration_get_notepads_enabled() ) { 4c3e6: 4a39 0005 e2f4 tstb 5e2f4 4c3ec: 670c beqs 4c3fa <_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( 4c3ee: 41e8 001e lea %a0@(30),%a0 4c3f2: 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; 4c3f4: 4298 clrl %a0@+ 4c3f6: 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++) 4c3f8: 66fa bnes 4c3f4 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4c3fa: 246e fffc moveal %fp@(-4),%a2 4c3fe: 4e5e unlk %fp if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; 4c400: 7001 moveq #1,%d0 } 4c402: 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)); 4c404: 701e moveq #30,%d0 api = _Workspace_Allocate( to_allocate ); 4c406: 2f00 movel %d0,%sp@- 4c408: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate> if ( !api ) 4c40e: 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 ); 4c410: 2040 moveal %d0,%a0 if ( !api ) 4c412: 4a80 tstl %d0 4c414: 66a8 bnes 4c3be <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4c416: 246e fffc moveal %fp@(-4),%a2 4c41a: 4e5e unlk %fp to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 4c41c: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 0004c344 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4c344: 4e56 fff4 linkw %fp,#-12 4c348: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4c34c: 246e 000c moveal %fp@(12),%a2 4c350: 47f9 0004 c46c lea 4c46c <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3 /* * Free per task variable memory */ tvp = deleted->task_variables; 4c356: 206a 0116 moveal %a2@(278),%a0 deleted->task_variables = NULL; 4c35a: 42aa 0116 clrl %a2@(278) while (tvp) { 4c35e: 4a88 tstl %a0 4c360: 671e beqs 4c380 <_RTEMS_tasks_Delete_extension+0x3c> next = (rtems_task_variable_t *)tvp->next; 4c362: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4c364: 2f08 movel %a0,%sp@- 4c366: 2f0a movel %a2,%sp@- 4c368: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4c36a: 508f addql #8,%sp 4c36c: 4a82 tstl %d2 4c36e: 6710 beqs 4c380 <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 4c370: 2042 moveal %d2,%a0 */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 4c372: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4c374: 2f08 movel %a0,%sp@- 4c376: 2f0a movel %a2,%sp@- 4c378: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4c37a: 508f addql #8,%sp 4c37c: 4a82 tstl %d2 4c37e: 66f0 bnes 4c370 <_RTEMS_tasks_Delete_extension+0x2c> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 4c380: 2f2a 010a movel %a2@(266),%sp@- 4c384: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4c38a: 588f addql #4,%sp 4c38c: 42aa 010a clrl %a2@(266) } 4c390: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4c396: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046a6c <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46a6c: 4e56 ffe4 linkw %fp,#-28 46a70: 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; 46a74: 2479 0005 e31a moveal 5e31a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 46a7a: 2639 0005 e316 movel 5e316 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46a80: 4a8a tstl %a2 46a82: 6754 beqs 46ad8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46a84: 4a83 tstl %d3 46a86: 6750 beqs 46ad8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 46a88: 280e movel %fp,%d4 46a8a: 4282 clrl %d2 46a8c: 5984 subql #4,%d4 46a8e: 47f9 0004 6844 lea 46844 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46a94: 49f9 0004 6af4 lea 46af4 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 46a9a: 2f04 movel %d4,%sp@- 46a9c: 2f2a 000c movel %a2@(12),%sp@- 46aa0: 2f2a 0014 movel %a2@(20),%sp@- 46aa4: 2f2a 0004 movel %a2@(4),%sp@- 46aa8: 2f2a 0008 movel %a2@(8),%sp@- 46aac: 2f12 movel %a2@,%sp@- 46aae: 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 ) ) 46ab0: 4fef 0018 lea %sp@(24),%sp 46ab4: 4a80 tstl %d0 46ab6: 662a bnes 46ae2 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46ab8: 2f2a 0018 movel %a2@(24),%sp@- 46abc: 2f2a 0010 movel %a2@(16),%sp@- 46ac0: 2f2e fffc movel %fp@(-4),%sp@- 46ac4: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 46ac6: 4fef 000c lea %sp@(12),%sp 46aca: 4a80 tstl %d0 46acc: 6614 bnes 46ae2 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46ace: 5282 addql #1,%d2 46ad0: 45ea 001c lea %a2@(28),%a2 46ad4: b483 cmpl %d3,%d2 46ad6: 65c2 bcss 46a9a <_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 ); } } 46ad8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46ade: 4e5e unlk %fp 46ae0: 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 ); 46ae2: 2f00 movel %d0,%sp@- 46ae4: 4878 0001 pea 1 46ae8: 4878 0001 pea 1 46aec: 4eb9 0004 7a24 jsr 47a24 <_Internal_error_Occurred> ... =============================================================================== 0004c2c8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4c2c8: 4e56 ffec linkw %fp,#-20 4c2cc: 206e 0008 moveal %fp@(8),%a0 4c2d0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4c2d4: 2468 010a moveal %a0@(266),%a2 if ( !api ) 4c2d8: 4a8a tstl %a2 4c2da: 671a beqs 4c2f6 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4c2dc: 203c 0000 0700 movel #1792,%d0 4c2e2: 40c1 movew %sr,%d1 4c2e4: 8081 orl %d1,%d0 4c2e6: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4c2e8: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4c2ec: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4c2f0: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4c2f2: 4a82 tstl %d2 4c2f4: 660a bnes 4c300 <_RTEMS_tasks_Post_switch_extension+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4c2f6: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4c2fc: 4e5e unlk %fp 4c2fe: 4e75 rts if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4c300: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4c304: 260e movel %fp,%d3 4c306: 5983 subql #4,%d3 4c308: 47f9 0004 e488 lea 4e488 ,%a3 4c30e: 2f03 movel %d3,%sp@- 4c310: 2f3c 0000 ffff movel #65535,%sp@- 4c316: 2f2a 000e movel %a2@(14),%sp@- 4c31a: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4c31c: 2f02 movel %d2,%sp@- 4c31e: 206a 000a moveal %a2@(10),%a0 4c322: 4e90 jsr %a0@ asr->nest_level -= 1; 4c324: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4c328: 2f03 movel %d3,%sp@- 4c32a: 2f3c 0000 ffff movel #65535,%sp@- 4c330: 2f2e fffc movel %fp@(-4),%sp@- 4c334: 4e93 jsr %a3@ 4c336: 4fef 001c lea %sp@(28),%sp } 4c33a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4c340: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c26e <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4c26e: 4e56 0000 linkw %fp,#0 4c272: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4c276: 2068 0116 moveal %a0@(278),%a0 while (tvp) { 4c27a: 4a88 tstl %a0 4c27c: 6712 beqs 4c290 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4c27e: 2268 0004 moveal %a0@(4),%a1 4c282: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4c286: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c28a: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4c28c: 4a88 tstl %a0 4c28e: 66ee bnes 4c27e <_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; 4c290: 206e 000c moveal %fp@(12),%a0 4c294: 2068 0116 moveal %a0@(278),%a0 while (tvp) { 4c298: 4a88 tstl %a0 4c29a: 6712 beqs 4c2ae <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4c29c: 2268 0004 moveal %a0@(4),%a1 4c2a0: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4c2a4: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c2a8: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4c2aa: 4a88 tstl %a0 4c2ac: 66ee bnes 4c29c <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4c2ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047b44 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 47b44: 4e56 fffc linkw %fp,#-4 47b48: 2f0a movel %a2,%sp@- 47b4a: 486e fffc pea %fp@(-4) 47b4e: 2f2e 0008 movel %fp@(8),%sp@- 47b52: 4879 0006 1b1c pea 61b1c <_Rate_monotonic_Information> 47b58: 4eb9 0004 9b08 jsr 49b08 <_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 ) { 47b5e: 4fef 000c lea %sp@(12),%sp 47b62: 2440 moveal %d0,%a2 47b64: 4aae fffc tstl %fp@(-4) 47b68: 6636 bnes 47ba0 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 47b6a: 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); 47b6e: 2028 0010 movel %a0@(16),%d0 47b72: 0280 0000 4000 andil #16384,%d0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 47b78: 670a beqs 47b84 <_Rate_monotonic_Timeout+0x40> 47b7a: 202a 0008 movel %a2@(8),%d0 47b7e: b0a8 0020 cmpl %a0@(32),%d0 47b82: 675e beqs 47be2 <_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 ) { 47b84: 7001 moveq #1,%d0 47b86: b0aa 0038 cmpl %a2@(56),%d0 47b8a: 671c beqs 47ba8 <_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; 47b8c: 7004 moveq #4,%d0 47b8e: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47b92: 2039 0006 1c18 movel 61c18 <_Thread_Dispatch_disable_level>,%d0 47b98: 5380 subql #1,%d0 47b9a: 23c0 0006 1c18 movel %d0,61c18 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 47ba0: 246e fff8 moveal %fp@(-8),%a2 47ba4: 4e5e unlk %fp 47ba6: 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; 47ba8: 103c 0003 moveb #3,%d0 47bac: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 47bb0: 2f0a movel %a2,%sp@- 47bb2: 4eb9 0004 7548 jsr 47548 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47bb8: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47bbe: 486a 0010 pea %a2@(16) 47bc2: 4879 0006 1cda pea 61cda <_Watchdog_Ticks_chain> 47bc8: 4eb9 0004 b714 jsr 4b714 <_Watchdog_Insert> 47bce: 4fef 000c lea %sp@(12),%sp 47bd2: 2039 0006 1c18 movel 61c18 <_Thread_Dispatch_disable_level>,%d0 47bd8: 5380 subql #1,%d0 47bda: 23c0 0006 1c18 movel %d0,61c18 <_Thread_Dispatch_disable_level> 47be0: 60be bras 47ba0 <_Rate_monotonic_Timeout+0x5c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47be2: 2f3c 1003 fff8 movel #268697592,%sp@- 47be8: 2f08 movel %a0,%sp@- 47bea: 4eb9 0004 a02c jsr 4a02c <_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 ); 47bf0: 2f0a movel %a2,%sp@- 47bf2: 4eb9 0004 7548 jsr 47548 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47bf8: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47bfe: 486a 0010 pea %a2@(16) 47c02: 4879 0006 1cda pea 61cda <_Watchdog_Ticks_chain> 47c08: 4eb9 0004 b714 jsr 4b714 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 47c0e: 4fef 0014 lea %sp@(20),%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47c12: 2039 0006 1c18 movel 61c18 <_Thread_Dispatch_disable_level>,%d0 47c18: 5380 subql #1,%d0 47c1a: 23c0 0006 1c18 movel %d0,61c18 <_Thread_Dispatch_disable_level> 47c20: 6000 ff7e braw 47ba0 <_Rate_monotonic_Timeout+0x5c> =============================================================================== 00048f28 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 48f28: 4e56 0000 linkw %fp,#0 48f2c: 2039 0006 a0dc movel 6a0dc <_Thread_Dispatch_disable_level>,%d0 48f32: 5280 addql #1,%d0 48f34: 2f0a movel %a2,%sp@- 48f36: 246e 0008 moveal %fp@(8),%a2 48f3a: 23c0 0006 a0dc movel %d0,6a0dc <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 48f40: 2039 0006 a166 movel 6a166 <_TOD_Now>,%d0 if ( time->tv_sec < seconds ) 48f46: 2212 movel %a2@,%d1 48f48: b280 cmpl %d0,%d1 48f4a: 6d38 blts 48f84 <_TOD_Set+0x5c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 48f4c: 9280 subl %d0,%d1 48f4e: 2f01 movel %d1,%sp@- 48f50: 42a7 clrl %sp@- 48f52: 4879 0006 a192 pea 6a192 <_Watchdog_Seconds_chain> 48f58: 4eb9 0004 b754 jsr 4b754 <_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 ); 48f5e: 23d2 0006 a166 movel %a2@,6a166 <_TOD_Now> 48f64: 588a addql #4,%a2 48f66: 4fef 000c lea %sp@(12),%sp 48f6a: 23d2 0006 a16a movel %a2@,6a16a <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 48f70: 246e fffc moveal %fp@(-4),%a2 48f74: 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; 48f76: 7001 moveq #1,%d0 48f78: 13c0 0006 a0ec moveb %d0,6a0ec <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 48f7e: 4ef9 0004 a372 jmp 4a372 <_Thread_Enable_dispatch> 48f84: 9081 subl %d1,%d0 48f86: 2f00 movel %d0,%sp@- 48f88: 4878 0001 pea 1 48f8c: 4879 0006 a192 pea 6a192 <_Watchdog_Seconds_chain> 48f92: 4eb9 0004 b754 jsr 4b754 <_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 ); 48f98: 23d2 0006 a166 movel %a2@,6a166 <_TOD_Now> 48f9e: 588a addql #4,%a2 48fa0: 4fef 000c lea %sp@(12),%sp 48fa4: 23d2 0006 a16a movel %a2@,6a16a <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 48faa: 246e fffc moveal %fp@(-4),%a2 48fae: 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; 48fb0: 7001 moveq #1,%d0 48fb2: 13c0 0006 a0ec moveb %d0,6a0ec <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 48fb8: 4ef9 0004 a372 jmp 4a372 <_Thread_Enable_dispatch> ... =============================================================================== 00047554 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 47554: 4e56 0000 linkw %fp,#0 47558: 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(); 4755c: 2039 0006 0b70 movel 60b70 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 47562: 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) || 47564: 4a88 tstl %a0 47566: 6762 beqs 475ca <_TOD_Validate+0x76> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 47568: 243c 000f 4240 movel #1000000,%d2 4756e: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 47572: b4a8 0018 cmpl %a0@(24),%d2 47576: 6352 blss 475ca <_TOD_Validate+0x76> (the_tod->ticks >= ticks_per_second) || 47578: 703b moveq #59,%d0 4757a: b0a8 0014 cmpl %a0@(20),%d0 4757e: 654a bcss 475ca <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 47580: b0a8 0010 cmpl %a0@(16),%d0 47584: 6544 bcss 475ca <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 47586: 7217 moveq #23,%d1 47588: b2a8 000c cmpl %a0@(12),%d1 4758c: 653c bcss 475ca <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 4758e: 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) || 47592: 6736 beqs 475ca <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month == 0) || 47594: 740c moveq #12,%d2 47596: b480 cmpl %d0,%d2 47598: 6530 bcss 475ca <_TOD_Validate+0x76> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 4759a: 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) || 4759c: 0c81 0000 07c3 cmpil #1987,%d1 475a2: 6326 blss 475ca <_TOD_Validate+0x76> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 475a4: 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) || 475a8: 4a88 tstl %a0 475aa: 671e beqs 475ca <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 475ac: 143c 0003 moveb #3,%d2 475b0: c282 andl %d2,%d1 475b2: 661e bnes 475d2 <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 475b4: 43f9 0005 fb2a lea 5fb2a <_TOD_Days_per_month>,%a1 475ba: 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( 475be: b1c0 cmpal %d0,%a0 475c0: 53c0 sls %d0 475c2: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 475c4: 241f movel %sp@+,%d2 475c6: 4e5e unlk %fp 475c8: 4e75 rts 475ca: 241f movel %sp@+,%d2 475cc: 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; 475ce: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 475d0: 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 ]; 475d2: 43f9 0005 fb2a lea 5fb2a <_TOD_Days_per_month>,%a1 475d8: 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( 475dc: b1c0 cmpal %d0,%a0 475de: 53c0 sls %d0 475e0: 4480 negl %d0 475e2: 60e0 bras 475c4 <_TOD_Validate+0x70> =============================================================================== 0004837c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4837c: 4e56 fff0 linkw %fp,#-16 48380: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48384: 246e 0008 moveal %fp@(8),%a2 */ /* * Save original state */ original_state = the_thread->current_state; 48388: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4838c: 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 ); 48390: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48392: 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 ); 48396: 4eb9 0004 9388 jsr 49388 <_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 ) 4839c: 588f addql #4,%sp 4839e: b4aa 0014 cmpl %a2@(20),%d2 483a2: 670c beqs 483b0 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 483a4: 2f02 movel %d2,%sp@- 483a6: 2f0a movel %a2,%sp@- 483a8: 4eb9 0004 9204 jsr 49204 <_Thread_Set_priority> 483ae: 508f addql #8,%sp _ISR_Disable( level ); 483b0: 203c 0000 0700 movel #1792,%d0 483b6: 40c1 movew %sr,%d1 483b8: 8081 orl %d1,%d0 483ba: 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; 483bc: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 483c0: 7404 moveq #4,%d2 483c2: b480 cmpl %d0,%d2 483c4: 6738 beqs 483fe <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 483c6: 44c3 movew %d3,%ccr 483c8: 6708 beqs 483d2 <_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); 483ca: 74fb moveq #-5,%d2 483cc: c480 andl %d0,%d2 483ce: 2542 0010 movel %d2,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 483d2: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 483d4: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 483da: 660a bnes 483e6 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 483dc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 483e2: 4e5e unlk %fp 483e4: 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 ); 483e6: 2d4a 000c movel %a2,%fp@(12) 483ea: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 483f0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 483f6: 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 ); 483f8: 4ef9 0004 9158 jmp 49158 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 483fe: 44c3 movew %d3,%ccr 48400: 673c beqs 4843e <_Thread_Change_priority+0xc2> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 48402: 206a 008e moveal %a2@(142),%a0 48406: 302a 0094 movew %a2@(148),%d0 4840a: 3410 movew %a0@,%d2 * 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 ); 4840c: 42aa 0010 clrl %a2@(16) 48410: 8082 orl %d2,%d0 48412: 3080 movew %d0,%a0@ _Priority_Major_bit_map |= the_priority_map->ready_major; 48414: 3439 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d2 4841a: 302a 0092 movew %a2@(146),%d0 4841e: 8082 orl %d2,%d0 48420: 33c0 0005 fb7c movew %d0,5fb7c <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 48426: 4a04 tstb %d4 48428: 6700 0082 beqw 484ac <_Thread_Change_priority+0x130> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4842c: 206a 008a moveal %a2@(138),%a0 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48430: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48432: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 48436: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 48438: 234a 0004 movel %a2,%a1@(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; 4843c: 2489 movel %a1,%a2@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 4843e: 203c 0000 0700 movel #1792,%d0 48444: 46c1 movew %d1,%sr 48446: 8081 orl %d1,%d0 48448: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 4844a: 3039 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d0 48450: 4840 swap %d0 48452: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 48454: 4282 clrl %d2 48456: 41f9 0005 fbe4 lea 5fbe4 <_Priority_Bit_map>,%a0 4845c: 3400 movew %d0,%d2 4845e: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 48462: 4840 swap %d0 48464: 04c0 ff1 %d0 return (_Priority_Bits_index( major ) << 4) + 48466: 4283 clrl %d3 48468: e98a lsll #4,%d2 4846a: 3600 movew %d0,%d3 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 4846c: 2279 0005 fa90 moveal 5fa90 <_Thread_Ready_chain>,%a1 48472: 2002 movel %d2,%d0 48474: d083 addl %d3,%d0 48476: 2400 movel %d0,%d2 48478: e58a lsll #2,%d2 4847a: e988 lsll #4,%d0 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 4847c: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 48482: 93c2 subal %d2,%a1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 48484: 2031 0800 movel %a1@(00000000,%d0:l),%d0 48488: 23c0 0005 ff70 movel %d0,5ff70 <_Per_CPU_Information+0x10> * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 4848e: b1c0 cmpal %d0,%a0 48490: 670e beqs 484a0 <_Thread_Change_priority+0x124> 48492: 4a28 0074 tstb %a0@(116) 48496: 6708 beqs 484a0 <_Thread_Change_priority+0x124> _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; 48498: 7401 moveq #1,%d2 4849a: 13c2 0005 ff78 moveb %d2,5ff78 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 484a0: 46c1 movew %d1,%sr } 484a2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 484a8: 4e5e unlk %fp 484aa: 4e75 rts _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 484ac: 206a 008a moveal %a2@(138),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 484b0: 2008 movel %a0,%d0 484b2: 5880 addql #4,%d0 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 484b4: 2268 0008 moveal %a0@(8),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 484b8: 2480 movel %d0,%a2@ { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 484ba: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; 484be: 228a movel %a2,%a1@ the_node->previous = old_last_node; 484c0: 2549 0004 movel %a1,%a2@(4) 484c4: 6000 ff78 braw 4843e <_Thread_Change_priority+0xc2> =============================================================================== 000484c8 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 484c8: 327c 0700 moveaw #1792,%a1 484cc: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 484ce: 4e56 ffec linkw %fp,#-20 484d2: 206e 0008 moveal %fp@(8),%a0 484d6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 484da: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 484de: 40c3 movew %sr,%d3 484e0: 8083 orl %d3,%d0 484e2: 46c0 movew %d0,%sr current_state = the_thread->current_state; 484e4: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 484e8: 2002 movel %d2,%d0 484ea: c081 andl %d1,%d0 484ec: 6776 beqs 48564 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 484ee: 2002 movel %d2,%d0 484f0: 4680 notl %d0 484f2: c081 andl %d1,%d0 current_state = the_thread->current_state = _States_Clear( state, current_state ); 484f4: 2140 0010 movel %d0,%a0@(16) if ( _States_Is_ready( current_state ) ) { 484f8: 666a bnes 48564 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 484fa: 2868 008e moveal %a0@(142),%a4 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 484fe: 2468 008a moveal %a0@(138),%a2 48502: 3214 movew %a4@,%d1 48504: 3028 0094 movew %a0@(148),%d0 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 48508: 266a 0008 moveal %a2@(8),%a3 4850c: 8081 orl %d1,%d0 4850e: 3880 movew %d0,%a4@ _Priority_Major_bit_map |= the_priority_map->ready_major; 48510: 3239 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d1 48516: 3028 0092 movew %a0@(146),%d0 4851a: 8081 orl %d1,%d0 4851c: 33c0 0005 fb7c movew %d0,5fb7c <_Priority_Major_bit_map> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 48522: 200a movel %a2,%d0 48524: 5880 addql #4,%d0 48526: 2080 movel %d0,%a0@ { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 48528: 2548 0008 movel %a0,%a2@(8) old_last_node->next = the_node; 4852c: 2688 movel %a0,%a3@ the_node->previous = old_last_node; 4852e: 214b 0004 movel %a3,%a0@(4) _ISR_Flash( level ); 48532: 2009 movel %a1,%d0 48534: 46c3 movew %d3,%sr 48536: 8083 orl %d3,%d0 48538: 46c0 movew %d0,%sr * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4853a: 2028 0014 movel %a0@(20),%d0 4853e: 2279 0005 ff70 moveal 5ff70 <_Per_CPU_Information+0x10>,%a1 48544: b0a9 0014 cmpl %a1@(20),%d0 48548: 641a bccs 48564 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 4854a: 23c8 0005 ff70 movel %a0,5ff70 <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 48550: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 48556: 4a28 0074 tstb %a0@(116) 4855a: 6712 beqs 4856e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4855c: 7001 moveq #1,%d0 4855e: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> } } } _ISR_Enable( level ); 48564: 46c3 movew %d3,%sr } 48566: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4856a: 4e5e unlk %fp 4856c: 4e75 rts * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4856e: 4a80 tstl %d0 48570: 66f2 bnes 48564 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 48572: 7001 moveq #1,%d0 <== NOT EXECUTED 48574: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> <== NOT EXECUTED 4857a: 60e8 bras 48564 <_Thread_Clear_state+0x9c> <== NOT EXECUTED =============================================================================== 0004857c <_Thread_Close>: RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 4857c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 4857e: 4e56 0000 linkw %fp,#0 48582: 2f0b movel %a3,%sp@- 48584: 266e 0008 moveal %fp@(8),%a3 48588: 2f0a movel %a2,%sp@- 4858a: 246e 000c moveal %fp@(12),%a2 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4858e: 206b 0018 moveal %a3@(24),%a0 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 48592: 302a 000a movew %a2@(10),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48596: 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; 4859a: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 485a0: 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 ); 485a2: 2f0a movel %a2,%sp@- 485a4: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> 485aa: 4eb9 0004 99ec jsr 499ec <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 485b0: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 485b6: 5280 addql #1,%d0 485b8: 23c0 0005 fadc movel %d0,5fadc <_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 ); 485be: 2f0a movel %a2,%sp@- 485c0: 2f0b movel %a3,%sp@- 485c2: 4eb9 0004 7b78 jsr 47b78 <_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 ); 485c8: 4878 0001 pea 1 485cc: 2f0a movel %a2,%sp@- 485ce: 4eb9 0004 9274 jsr 49274 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 485d4: 2f0a movel %a2,%sp@- 485d6: 4eb9 0004 9054 jsr 49054 <_Thread_queue_Extract_with_proxy> 485dc: 4fef 0018 lea %sp@(24),%sp 485e0: 4a00 tstb %d0 485e2: 6608 bnes 485ec <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 485e4: 7002 moveq #2,%d0 485e6: b0aa 0050 cmpl %a2@(80),%d0 485ea: 6756 beqs 48642 <_Thread_Close+0xc6> /* * 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 ) ) 485ec: b5f9 0005 fb5e cmpal 5fb5e <_Thread_Allocated_fp>,%a2 485f2: 6746 beqs 4863a <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 485f4: 202a 00c6 movel %a2@(198),%d0 #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; 485f8: 42aa 0102 clrl %a2@(258) if ( the_thread->Start.fp_context ) 485fc: 4a80 tstl %d0 485fe: 670a beqs 4860a <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 48600: 2f00 movel %d0,%sp@- 48602: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48608: 588f addql #4,%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 ); 4860a: 2f0a movel %a2,%sp@- 4860c: 4eb9 0004 9470 jsr 49470 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 48612: 202a 0112 movel %a2@(274),%d0 48616: 588f addql #4,%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; 48618: 42aa 00ca clrl %a2@(202) if ( the_thread->extensions ) 4861c: 4a80 tstl %d0 4861e: 670a beqs 4862a <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 48620: 2f00 movel %d0,%sp@- 48622: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48628: 588f addql #4,%sp the_thread->extensions = NULL; 4862a: 42aa 0112 clrl %a2@(274) } 4862e: 246e fff8 moveal %fp@(-8),%a2 48632: 266e fffc moveal %fp@(-4),%a3 48636: 4e5e unlk %fp 48638: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 4863a: 42b9 0005 fb5e clrl 5fb5e <_Thread_Allocated_fp> 48640: 60b2 bras 485f4 <_Thread_Close+0x78> */ _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 ); 48642: 486a 0048 pea %a2@(72) 48646: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 4864c: 588f addql #4,%sp /* * 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 ) ) 4864e: b5f9 0005 fb5e cmpal 5fb5e <_Thread_Allocated_fp>,%a2 48654: 669e bnes 485f4 <_Thread_Close+0x78> <== ALWAYS TAKEN 48656: 60e2 bras 4863a <_Thread_Close+0xbe> <== NOT EXECUTED =============================================================================== 00048708 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 48708: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4870c: 486e fffc pea %fp@(-4) 48710: 2f2e 0008 movel %fp@(8),%sp@- 48714: 4eb9 0004 88d4 jsr 488d4 <_Thread_Get> switch ( location ) { 4871a: 508f addql #8,%sp 4871c: 4aae fffc tstl %fp@(-4) 48720: 661e bnes 48740 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 48722: 2f3c 1000 0018 movel #268435480,%sp@- 48728: 2f00 movel %d0,%sp@- 4872a: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> 48730: 508f addql #8,%sp 48732: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 48738: 5380 subql #1,%d0 4873a: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 48740: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048744 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 48744: 4e56 ffc8 linkw %fp,#-56 48748: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 4874c: 283c 0000 0700 movel #1792,%d4 48752: 2004 movel %d4,%d0 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 48754: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 4875a: 40c1 movew %sr,%d1 4875c: 8081 orl %d1,%d0 4875e: 46c0 movew %d0,%sr while ( _Context_Switch_necessary == true ) { 48760: 1039 0005 ff78 moveb 5ff78 <_Per_CPU_Information+0x18>,%d0 48766: 6700 0120 beqw 48888 <_Thread_Dispatch+0x144> heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 4876a: 7001 moveq #1,%d0 4876c: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 48772: 2679 0005 ff70 moveal 5ff70 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 48778: 4200 clrb %d0 _Thread_Executing = heir; 4877a: 23cb 0005 ff6c movel %a3,5ff6c <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 48780: 13c0 0005 ff78 moveb %d0,5ff78 <_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 ) 48786: b7ca cmpal %a2,%a3 48788: 6700 00fe beqw 48888 <_Thread_Dispatch+0x144> 4878c: 260e movel %fp,%d3 4878e: 240e movel %fp,%d2 48790: 5183 subql #8,%d3 48792: 2e3c 0004 c6f0 movel #313072,%d7 48798: 0682 ffff fff0 addil #-16,%d2 4879e: 2c3c 0004 97b0 movel #300976,%d6 487a4: 2a3c 0004 9768 movel #300904,%d5 487aa: 4bf9 0004 9a78 lea 49a78 <_User_extensions_Thread_switch>,%a5 487b0: 49f9 0004 9dec lea 49dec <_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 ) 487b6: 7001 moveq #1,%d0 487b8: b0ab 007a cmpl %a3@(122),%d0 487bc: 6700 00e2 beqw 488a0 <_Thread_Dispatch+0x15c> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 487c0: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 487c2: 2f03 movel %d3,%sp@- 487c4: 2047 moveal %d7,%a0 487c6: 4e90 jsr %a0@ _Timestamp_Subtract( 487c8: 2046 moveal %d6,%a0 487ca: 2f02 movel %d2,%sp@- 487cc: 2f03 movel %d3,%sp@- 487ce: 4879 0005 fb8a pea 5fb8a <_Thread_Time_of_last_context_switch> 487d4: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 487d6: 2045 moveal %d5,%a0 487d8: 2f02 movel %d2,%sp@- 487da: 486a 0082 pea %a2@(130) 487de: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 487e0: 2079 0005 fb62 moveal 5fb62 <_Thread_libc_reent>,%a0 487e6: 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; 487ea: 202e fff8 movel %fp@(-8),%d0 487ee: 222e fffc movel %fp@(-4),%d1 487f2: 23c0 0005 fb8a movel %d0,5fb8a <_Thread_Time_of_last_context_switch> 487f8: 23c1 0005 fb8e movel %d1,5fb8e <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 487fe: 4a88 tstl %a0 48800: 6708 beqs 4880a <_Thread_Dispatch+0xc6> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 48802: 2550 0106 movel %a0@,%a2@(262) *_Thread_libc_reent = heir->libc_reent; 48806: 20ab 0106 movel %a3@(262),%a0@ } _User_extensions_Thread_switch( executing, heir ); 4880a: 2f0b movel %a3,%sp@- 4880c: 2f0a movel %a2,%sp@- 4880e: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 48810: 486b 00ce pea %a3@(206) 48814: 486a 00ce pea %a2@(206) 48818: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4881a: 4fef 0010 lea %sp@(16),%sp 4881e: 4aaa 0102 tstl %a2@(258) 48822: 672c beqs 48850 <_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 ); 48824: 2079 0005 fb5e moveal 5fb5e <_Thread_Allocated_fp>,%a0 4882a: b1ca cmpal %a2,%a0 4882c: 6722 beqs 48850 <_Thread_Dispatch+0x10c> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4882e: 4a88 tstl %a0 48830: 670c beqs 4883e <_Thread_Dispatch+0xfa> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 48832: 4868 0102 pea %a0@(258) 48836: 4eb9 0004 9f12 jsr 49f12 <_CPU_Context_save_fp> 4883c: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 4883e: 486a 0102 pea %a2@(258) 48842: 4eb9 0004 9f4a jsr 49f4a <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 48848: 588f addql #4,%sp 4884a: 23ca 0005 fb5e movel %a2,5fb5e <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 48850: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 48856: 2004 movel %d4,%d0 48858: 40c1 movew %sr,%d1 4885a: 8081 orl %d1,%d0 4885c: 46c0 movew %d0,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 4885e: 1039 0005 ff78 moveb 5ff78 <_Per_CPU_Information+0x18>,%d0 48864: 6722 beqs 48888 <_Thread_Dispatch+0x144> heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 48866: 7001 moveq #1,%d0 48868: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 4886e: 2679 0005 ff70 moveal 5ff70 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 48874: 4200 clrb %d0 _Thread_Executing = heir; 48876: 23cb 0005 ff6c movel %a3,5ff6c <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 4887c: 13c0 0005 ff78 moveb %d0,5ff78 <_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 ) 48882: b5cb cmpal %a3,%a2 48884: 6600 ff30 bnew 487b6 <_Thread_Dispatch+0x72> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 48888: 42b9 0005 fadc clrl 5fadc <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 4888e: 46c1 movew %d1,%sr _API_extensions_Run_postswitch(); 48890: 4eb9 0004 6f6a jsr 46f6a <_API_extensions_Run_postswitch> } 48896: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4889c: 4e5e unlk %fp 4889e: 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; 488a0: 41f9 0005 fa94 lea 5fa94 <_Thread_Ticks_per_timeslice>,%a0 488a6: 2750 0076 movel %a0@,%a3@(118) 488aa: 6000 ff14 braw 487c0 <_Thread_Dispatch+0x7c> =============================================================================== 000488d4 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 488d4: 4e56 0000 linkw %fp,#0 488d8: 202e 0008 movel %fp@(8),%d0 488dc: 2f03 movel %d3,%sp@- 488de: 206e 000c moveal %fp@(12),%a0 488e2: 2f02 movel %d2,%sp@- uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 488e4: 4a80 tstl %d0 488e6: 6766 beqs 4894e <_Thread_Get+0x7a> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 488e8: 7418 moveq #24,%d2 488ea: 2200 movel %d0,%d1 488ec: e4a9 lsrl %d2,%d1 488ee: 7607 moveq #7,%d3 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 488f0: 143c 0002 moveb #2,%d2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 488f4: c283 andl %d3,%d1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 488f6: 2241 moveal %d1,%a1 488f8: 5389 subql #1,%a1 488fa: b489 cmpl %a1,%d2 488fc: 653e bcss 4893c <_Thread_Get+0x68> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 488fe: 761b moveq #27,%d3 48900: 2400 movel %d0,%d2 48902: e6aa lsrl %d3,%d2 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 48904: 163c 0001 moveb #1,%d3 48908: b682 cmpl %d2,%d3 4890a: 6630 bnes 4893c <_Thread_Get+0x68> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 4890c: 43f9 0005 fa98 lea 5fa98 <_Objects_Information_table>,%a1 48912: 2271 1c00 moveal %a1@(00000000,%d1:l:4),%a1 if ( !api_information ) { 48916: 4a89 tstl %a1 48918: 6722 beqs 4893c <_Thread_Get+0x68> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 4891a: 2229 0004 movel %a1@(4),%d1 if ( !information ) { 4891e: 671c beqs 4893c <_Thread_Get+0x68> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 48920: 2f08 movel %a0,%sp@- 48922: 2f00 movel %d0,%sp@- 48924: 2f01 movel %d1,%sp@- 48926: 4eb9 0004 7fa4 jsr 47fa4 <_Objects_Get> done: return tp; } 4892c: 242e fff8 movel %fp@(-8),%d2 if ( !information ) { *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 48930: 4fef 000c lea %sp@(12),%sp done: return tp; } 48934: 262e fffc movel %fp@(-4),%d3 48938: 4e5e unlk %fp 4893a: 4e75 rts goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 4893c: 7001 moveq #1,%d0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 4893e: 242e fff8 movel %fp@(-8),%d2 48942: 262e fffc movel %fp@(-4),%d3 48946: 4e5e unlk %fp goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 48948: 2080 movel %d0,%a0@ { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 4894a: 4280 clrl %d0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 4894c: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4894e: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 48954: 5280 addql #1,%d0 48956: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> 4895c: 242e fff8 movel %fp@(-8),%d2 48960: 262e fffc movel %fp@(-4),%d3 48964: 4e5e unlk %fp Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 48966: 2039 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%d0 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4896c: 4290 clrl %a0@ <== NOT EXECUTED tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } =============================================================================== 0004e798 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e798: 4e56 0000 linkw %fp,#0 4e79c: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4e79e: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e7a4: 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; 4e7a6: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4e7aa: 40c0 movew %sr,%d0 4e7ac: e189 lsll #8,%d1 4e7ae: 0280 0000 f8ff andil #63743,%d0 4e7b4: 8081 orl %d1,%d0 4e7b6: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4e7b8: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4e7ba: 1439 0005 f298 moveb 5f298 ,%d2 doneConstructors = 1; 4e7c0: 13c0 0005 f298 moveb %d0,5f298 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4e7c6: 4aaa 0102 tstl %a2@(258) 4e7ca: 6720 beqs 4e7ec <_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 ); 4e7cc: 2079 0005 fb5e moveal 5fb5e <_Thread_Allocated_fp>,%a0 4e7d2: b1ca cmpal %a2,%a0 4e7d4: 6716 beqs 4e7ec <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4e7d6: 4a88 tstl %a0 4e7d8: 670c beqs 4e7e6 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4e7da: 4868 0102 pea %a0@(258) 4e7de: 4eb9 0004 9f12 jsr 49f12 <_CPU_Context_save_fp> 4e7e4: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4e7e6: 23ca 0005 fb5e movel %a2,5fb5e <_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 ); 4e7ec: 2f0a movel %a2,%sp@- 4e7ee: 4eb9 0004 98c4 jsr 498c4 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4e7f4: 4eb9 0004 88ae jsr 488ae <_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) */ { 4e7fa: 588f addql #4,%sp 4e7fc: 4a02 tstb %d2 4e7fe: 6724 beqs 4e824 <_Thread_Handler+0x8c> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e800: 202a 009e movel %a2@(158),%d0 4e804: 672a beqs 4e830 <_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 ) { 4e806: 7201 moveq #1,%d1 4e808: b280 cmpl %d0,%d1 4e80a: 674c beqs 4e858 <_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 ); 4e80c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e80e: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4e814: 4878 0005 pea 5 <== NOT EXECUTED 4e818: 4878 0001 pea 1 <== NOT EXECUTED 4e81c: 42a7 clrl %sp@- <== NOT EXECUTED 4e81e: 4eb9 0004 7a24 jsr 47a24 <_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 (); 4e824: 4eb9 0005 c840 jsr 5c840 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e82a: 202a 009e movel %a2@(158),%d0 4e82e: 66d6 bnes 4e806 <_Thread_Handler+0x6e> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4e830: 2f2a 00a6 movel %a2@(166),%sp@- 4e834: 206a 009a moveal %a2@(154),%a0 4e838: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4e83a: 588f addql #4,%sp 4e83c: 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 ); 4e840: 2f0a movel %a2,%sp@- 4e842: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e848: 4878 0005 pea 5 4e84c: 4878 0001 pea 1 4e850: 42a7 clrl %sp@- 4e852: 4eb9 0004 7a24 jsr 47a24 <_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)( 4e858: 2f2a 00a2 movel %a2@(162),%sp@- 4e85c: 206a 009a moveal %a2@(154),%a0 4e860: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4e862: 588f addql #4,%sp 4e864: 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 ); 4e868: 2f0a movel %a2,%sp@- 4e86a: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e870: 4878 0005 pea 5 <== NOT EXECUTED 4e874: 4878 0001 pea 1 <== NOT EXECUTED 4e878: 42a7 clrl %sp@- <== NOT EXECUTED 4e87a: 4eb9 0004 7a24 jsr 47a24 <_Internal_error_Occurred> <== NOT EXECUTED =============================================================================== 00048970 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 48970: 4e56 ffe4 linkw %fp,#-28 48974: 202e 0010 movel %fp@(16),%d0 48978: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4897c: 246e 000c moveal %fp@(12),%a2 48980: 282e 0014 movel %fp@(20),%d4 48984: 242e 001c movel %fp@(28),%d2 48988: 262e 0024 movel %fp@(36),%d3 4898c: 1a2e 001b moveb %fp@(27),%d5 48990: 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; 48994: 42aa 010a clrl %a2@(266) 48998: 42aa 010e clrl %a2@(270) extensions_area = NULL; the_thread->libc_reent = NULL; 4899c: 42aa 0106 clrl %a2@(262) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 489a0: 4a80 tstl %d0 489a2: 6700 01e8 beqw 48b8c <_Thread_Initialize+0x21c> 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; 489a6: 2204 movel %d4,%d1 489a8: 4204 clrb %d4 489aa: 1544 00bc moveb %d4,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 489ae: 2540 00c2 movel %d0,%a2@(194) the_stack->size = size; 489b2: 2541 00be movel %d1,%a2@(190) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 489b6: 4a05 tstb %d5 489b8: 6600 016e bnew 48b28 <_Thread_Initialize+0x1b8> 489bc: 4280 clrl %d0 extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 489be: 4284 clrl %d4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 489c0: 2239 0005 fb6e movel 5fb6e <_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; 489c6: 2540 0102 movel %d0,%a2@(258) the_thread->Start.fp_context = fp_area; 489ca: 2540 00c6 movel %d0,%a2@(198) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 489ce: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 489d2: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 489d6: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 489da: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 489de: 4a81 tstl %d1 489e0: 6600 0166 bnew 48b48 <_Thread_Initialize+0x1d8> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 489e4: 42aa 0112 clrl %a2@(274) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 489e8: 97cb subal %a3,%a3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 489ea: 2543 00ac movel %d3,%a2@(172) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 489ee: 7002 moveq #2,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 489f0: 1546 00aa moveb %d6,%a2@(170) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 489f4: 256e 0028 00b0 movel %fp@(40),%a2@(176) switch ( budget_algorithm ) { 489fa: b083 cmpl %d3,%d0 489fc: 6700 00c6 beqw 48ac4 <_Thread_Initialize+0x154> the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 48a00: 2f02 movel %d2,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 48a02: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 48a08: 7001 moveq #1,%d0 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 48a0a: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 48a0c: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 48a10: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 48a14: 42aa 001c clrl %a2@(28) the_thread->real_priority = priority; 48a18: 2542 0018 movel %d2,%a2@(24) the_thread->Start.initial_priority = priority; 48a1c: 2542 00b8 movel %d2,%a2@(184) _Thread_Set_priority( the_thread, priority ); 48a20: 4eb9 0004 9204 jsr 49204 <_Thread_Set_priority> _Thread_Stack_Free( the_thread ); return false; } 48a26: 206e 0008 moveal %fp@(8),%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 48a2a: 4280 clrl %d0 48a2c: 2068 0018 moveal %a0@(24),%a0 48a30: 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 ); 48a34: 42aa 0082 clrl %a2@(130) 48a38: 42aa 0086 clrl %a2@(134) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48a3c: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 48a40: 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 ); 48a46: 2f0a movel %a2,%sp@- 48a48: 4eb9 0004 9994 jsr 49994 <_User_extensions_Thread_create> if ( extension_status ) 48a4e: 4fef 000c lea %sp@(12),%sp 48a52: 4a00 tstb %d0 48a54: 6662 bnes 48ab8 <_Thread_Initialize+0x148> return true; failed: if ( the_thread->libc_reent ) 48a56: 202a 0106 movel %a2@(262),%d0 48a5a: 670a beqs 48a66 <_Thread_Initialize+0xf6> _Workspace_Free( the_thread->libc_reent ); 48a5c: 2f00 movel %d0,%sp@- 48a5e: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48a64: 588f addql #4,%sp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 48a66: 202a 010a movel %a2@(266),%d0 48a6a: 670a beqs 48a76 <_Thread_Initialize+0x106> _Workspace_Free( the_thread->API_Extensions[i] ); 48a6c: 2f00 movel %d0,%sp@- 48a6e: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48a74: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 48a76: 202a 010e movel %a2@(270),%d0 48a7a: 670a beqs 48a86 <_Thread_Initialize+0x116> _Workspace_Free( the_thread->API_Extensions[i] ); 48a7c: 2f00 movel %d0,%sp@- 48a7e: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48a84: 588f addql #4,%sp if ( extensions_area ) 48a86: 4a8b tstl %a3 48a88: 670a beqs 48a94 <_Thread_Initialize+0x124> (void) _Workspace_Free( extensions_area ); 48a8a: 2f0b movel %a3,%sp@- 48a8c: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48a92: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 48a94: 4a84 tstl %d4 48a96: 670a beqs 48aa2 <_Thread_Initialize+0x132> (void) _Workspace_Free( fp_area ); 48a98: 2f04 movel %d4,%sp@- 48a9a: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48aa0: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 48aa2: 2f0a movel %a2,%sp@- 48aa4: 4eb9 0004 9470 jsr 49470 <_Thread_Stack_Free> return false; 48aaa: 588f addql #4,%sp } 48aac: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 48ab2: 4200 clrb %d0 } 48ab4: 4e5e unlk %fp 48ab6: 4e75 rts 48ab8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 48abe: 7001 moveq #1,%d0 _Thread_Stack_Free( the_thread ); return false; } 48ac0: 4e5e unlk %fp 48ac2: 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; 48ac4: 41f9 0005 fa94 lea 5fa94 <_Thread_Ticks_per_timeslice>,%a0 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 48aca: 7001 moveq #1,%d0 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; 48acc: 2550 0076 movel %a0@,%a2@(118) the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 48ad0: 2f02 movel %d2,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 48ad2: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 48ad8: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 48ada: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 48ade: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 48ae2: 42aa 001c clrl %a2@(28) the_thread->real_priority = priority; 48ae6: 2542 0018 movel %d2,%a2@(24) the_thread->Start.initial_priority = priority; 48aea: 2542 00b8 movel %d2,%a2@(184) _Thread_Set_priority( the_thread, priority ); 48aee: 4eb9 0004 9204 jsr 49204 <_Thread_Set_priority> _Thread_Stack_Free( the_thread ); return false; } 48af4: 206e 0008 moveal %fp@(8),%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 48af8: 4280 clrl %d0 48afa: 2068 0018 moveal %a0@(24),%a0 48afe: 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 ); 48b02: 42aa 0082 clrl %a2@(130) 48b06: 42aa 0086 clrl %a2@(134) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48b0a: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 48b0e: 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 ); 48b14: 2f0a movel %a2,%sp@- 48b16: 4eb9 0004 9994 jsr 49994 <_User_extensions_Thread_create> if ( extension_status ) 48b1c: 4fef 000c lea %sp@(12),%sp 48b20: 4a00 tstb %d0 48b22: 6700 ff32 beqw 48a56 <_Thread_Initialize+0xe6> 48b26: 6090 bras 48ab8 <_Thread_Initialize+0x148> /* * 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 ); 48b28: 4878 001c pea 1c 48b2c: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate> if ( !fp_area ) 48b32: 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 ); 48b34: 2800 movel %d0,%d4 if ( !fp_area ) 48b36: 6600 fe88 bnew 489c0 <_Thread_Initialize+0x50> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 48b3a: 202a 0106 movel %a2@(262),%d0 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 48b3e: 97cb subal %a3,%a3 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 48b40: 6600 ff1a bnew 48a5c <_Thread_Initialize+0xec> 48b44: 6000 ff20 braw 48a66 <_Thread_Initialize+0xf6> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 48b48: e589 lsll #2,%d1 48b4a: 2041 moveal %d1,%a0 48b4c: 4868 0004 pea %a0@(4) 48b50: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 48b56: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 48b58: 2640 moveal %d0,%a3 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 48b5a: 4a80 tstl %d0 48b5c: 6700 fef8 beqw 48a56 <_Thread_Initialize+0xe6> goto failed; } the_thread->extensions = (void **) extensions_area; 48b60: 2079 0005 fb6e moveal 5fb6e <_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++ ) 48b66: 4281 clrl %d1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 48b68: 4280 clrl %d0 48b6a: 254b 0112 movel %a3,%a2@(274) * 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; 48b6e: 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++ ) 48b72: 5280 addql #1,%d0 48b74: 2200 movel %d0,%d1 48b76: b088 cmpl %a0,%d0 48b78: 6200 fe70 bhiw 489ea <_Thread_Initialize+0x7a> the_thread->extensions[i] = NULL; 48b7c: 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++ ) 48b80: 5280 addql #1,%d0 48b82: 2200 movel %d0,%d1 48b84: b088 cmpl %a0,%d0 48b86: 63e6 blss 48b6e <_Thread_Initialize+0x1fe> 48b88: 6000 fe60 braw 489ea <_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 ); 48b8c: 2f04 movel %d4,%sp@- 48b8e: 2f0a movel %a2,%sp@- 48b90: 4eb9 0004 940c jsr 4940c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 48b96: 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 ); 48b98: 2200 movel %d0,%d1 if ( !actual_stack_size || actual_stack_size < stack_size ) 48b9a: 6712 beqs 48bae <_Thread_Initialize+0x23e> 48b9c: b084 cmpl %d4,%d0 48b9e: 650e bcss 48bae <_Thread_Initialize+0x23e> <== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 48ba0: 202a 00ca movel %a2@(202),%d0 the_thread->Start.core_allocated_stack = true; 48ba4: 7801 moveq #1,%d4 48ba6: 1544 00bc moveb %d4,%a2@(188) 48baa: 6000 fe02 braw 489ae <_Thread_Initialize+0x3e> _Thread_Stack_Free( the_thread ); return false; } 48bae: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 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 */ 48bb4: 4200 clrb %d0 _Thread_Stack_Free( the_thread ); return false; } 48bb6: 4e5e unlk %fp ... =============================================================================== 0004db34 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4db34: 4e56 0000 linkw %fp,#0 4db38: 2f0a movel %a2,%sp@- 4db3a: 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; 4db3e: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4db44: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4db4a: 256e 000c 00a2 movel %fp@(12),%a2@(162) the_thread->Start.numeric_argument = numeric_argument; 4db50: 256e 0010 00a6 movel %fp@(16),%a2@(166) void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4db56: 156a 00aa 0074 moveb %a2@(170),%a2@(116) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4db5c: 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 ) ) { 4db60: 2f0a movel %a2,%sp@- 4db62: 4eb9 0004 9c68 jsr 49c68 <_Thread_queue_Extract_with_proxy> 4db68: 588f addql #4,%sp 4db6a: 4a00 tstb %d0 4db6c: 6608 bnes 4db76 <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4db6e: 7002 moveq #2,%d0 4db70: b0aa 0050 cmpl %a2@(80),%d0 4db74: 672a beqs 4dba0 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4db76: 202a 00b8 movel %a2@(184),%d0 4db7a: b0aa 0014 cmpl %a2@(20),%d0 4db7e: 6718 beqs 4db98 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; 4db80: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4db84: 2d4a 0008 movel %a2,%fp@(8) } } 4db88: 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 ); 4db8c: 2d40 000c movel %d0,%fp@(12) } } 4db90: 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 ); 4db92: 4ef9 0004 9ea8 jmp 49ea8 <_Thread_Set_priority> } } 4db98: 246e fffc moveal %fp@(-4),%a2 4db9c: 4e5e unlk %fp 4db9e: 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 ); 4dba0: 486a 0048 pea %a2@(72) 4dba4: 4eb9 0004 a8e8 jsr 4a8e8 <_Watchdog_Remove> 4dbaa: 588f addql #4,%sp 4dbac: 60c8 bras 4db76 <_Thread_Reset+0x42> ... =============================================================================== 00049e18 <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 49e18: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 49e1a: 4e56 0000 linkw %fp,#0 49e1e: 2f0a movel %a2,%sp@- 49e20: 246e 0008 moveal %fp@(8),%a2 49e24: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 49e28: 670a beqs 49e34 <_Thread_Restart+0x1c> return true; } return false; } 49e2a: 246e fffc moveal %fp@(-4),%a2 49e2e: 4e5e unlk %fp _Thread_Restart_self(); return true; } return false; 49e30: 4200 clrb %d0 } 49e32: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 49e34: 2f0a movel %a2,%sp@- 49e36: 4eb9 0004 a02c jsr 4a02c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 49e3c: 2f2e 0010 movel %fp@(16),%sp@- 49e40: 2f2e 000c movel %fp@(12),%sp@- 49e44: 2f0a movel %a2,%sp@- 49e46: 4eb9 0004 db34 jsr 4db34 <_Thread_Reset> _Thread_Load_environment( the_thread ); 49e4c: 2f0a movel %a2,%sp@- 49e4e: 4eb9 0004 d798 jsr 4d798 <_Thread_Load_environment> _Thread_Ready( the_thread ); 49e54: 2f0a movel %a2,%sp@- 49e56: 4eb9 0004 da74 jsr 4da74 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 49e5c: 2f0a movel %a2,%sp@- 49e5e: 4eb9 0004 a6d8 jsr 4a6d8 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 49e64: 4fef 001c lea %sp@(28),%sp 49e68: b5f9 0006 0f04 cmpal 60f04 <_Per_CPU_Information+0xc>,%a2 49e6e: 670a beqs 49e7a <_Thread_Restart+0x62> return true; } return false; } 49e70: 246e fffc moveal %fp@(-4),%a2 49e74: 4e5e unlk %fp _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 49e76: 7001 moveq #1,%d0 } return false; } 49e78: 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 ) 49e7a: 4aaa 0102 tstl %a2@(258) 49e7e: 6712 beqs 49e92 <_Thread_Restart+0x7a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 49e80: 486a 0102 pea %a2@(258) 49e84: 4eb9 0004 ac32 jsr 4ac32 <_CPU_Context_restore_fp> 49e8a: 2479 0006 0f04 moveal 60f04 <_Per_CPU_Information+0xc>,%a2 49e90: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49e92: 486a 00ce pea %a2@(206) 49e96: 4eb9 0004 aaea jsr 4aaea <_CPU_Context_Restart_self> 49e9c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 49ea0: 588f addql #4,%sp <== NOT EXECUTED 49ea2: 4e5e unlk %fp <== NOT EXECUTED _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 49ea4: 7001 moveq #1,%d0 <== NOT EXECUTED } return false; } =============================================================================== 0004c8d0 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c8d0: 327c 0700 moveaw #1792,%a1 4c8d4: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c8d6: 4e56 fff0 linkw %fp,#-16 4c8da: 206e 0008 moveal %fp@(8),%a0 4c8de: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c8e2: 40c1 movew %sr,%d1 4c8e4: 8081 orl %d1,%d0 4c8e6: 46c0 movew %d0,%sr current_state = the_thread->current_state; 4c8e8: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c8ec: 0800 0001 btst #1,%d0 4c8f0: 6774 beqs 4c966 <_Thread_Resume+0x96> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4c8f2: 74fd moveq #-3,%d2 4c8f4: c082 andl %d2,%d0 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 4c8f6: 2140 0010 movel %d0,%a0@(16) if ( _States_Is_ready( current_state ) ) { 4c8fa: 666a bnes 4c966 <_Thread_Resume+0x96> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4c8fc: 2868 008e moveal %a0@(142),%a4 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c900: 2468 008a moveal %a0@(138),%a2 4c904: 3414 movew %a4@,%d2 4c906: 3028 0094 movew %a0@(148),%d0 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4c90a: 266a 0008 moveal %a2@(8),%a3 4c90e: 8082 orl %d2,%d0 4c910: 3880 movew %d0,%a4@ _Priority_Major_bit_map |= the_priority_map->ready_major; 4c912: 3439 0006 3924 movew 63924 <_Priority_Major_bit_map>,%d2 4c918: 3028 0092 movew %a0@(146),%d0 4c91c: 8082 orl %d2,%d0 4c91e: 33c0 0006 3924 movew %d0,63924 <_Priority_Major_bit_map> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c924: 200a movel %a2,%d0 4c926: 5880 addql #4,%d0 4c928: 2080 movel %d0,%a0@ { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 4c92a: 2548 0008 movel %a0,%a2@(8) old_last_node->next = the_node; 4c92e: 2688 movel %a0,%a3@ the_node->previous = old_last_node; 4c930: 214b 0004 movel %a3,%a0@(4) _ISR_Flash( level ); 4c934: 2009 movel %a1,%d0 4c936: 46c1 movew %d1,%sr 4c938: 8081 orl %d1,%d0 4c93a: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c93c: 2028 0014 movel %a0@(20),%d0 4c940: 2279 0006 3d18 moveal 63d18 <_Per_CPU_Information+0x10>,%a1 4c946: b0a9 0014 cmpl %a1@(20),%d0 4c94a: 641a bccs 4c966 <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c94c: 23c8 0006 3d18 movel %a0,63d18 <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 4c952: 2079 0006 3d14 moveal 63d14 <_Per_CPU_Information+0xc>,%a0 4c958: 4a28 0074 tstb %a0@(116) 4c95c: 6712 beqs 4c970 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c95e: 7401 moveq #1,%d2 4c960: 13c2 0006 3d20 moveb %d2,63d20 <_Per_CPU_Information+0x18> } } } _ISR_Enable( level ); 4c966: 46c1 movew %d1,%sr } 4c968: 4cd7 1c04 moveml %sp@,%d2/%a2-%a4 4c96c: 4e5e unlk %fp 4c96e: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c970: 4a80 tstl %d0 4c972: 66f2 bnes 4c966 <_Thread_Resume+0x96> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c974: 7401 moveq #1,%d2 <== NOT EXECUTED 4c976: 13c2 0006 3d20 moveb %d2,63d20 <_Per_CPU_Information+0x18> <== NOT EXECUTED 4c97c: 60e8 bras 4c966 <_Thread_Resume+0x96> <== NOT EXECUTED ... =============================================================================== 00049550 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 49550: 203c 0000 0700 movel #1792,%d0 */ void _Thread_Suspend( Thread_Control *the_thread ) { 49556: 4e56 fff4 linkw %fp,#-12 4955a: 206e 0008 moveal %fp@(8),%a0 4955e: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 49562: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 49566: 40c1 movew %sr,%d1 49568: 8081 orl %d1,%d0 4956a: 46c0 movew %d0,%sr if ( !_States_Is_ready( the_thread->current_state ) ) { 4956c: 2028 0010 movel %a0@(16),%d0 49570: 6642 bnes 495b4 <_Thread_Suspend+0x64> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 49572: 7002 moveq #2,%d0 if ( _Chain_Has_only_one_node( ready ) ) { 49574: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 49578: 2140 0010 movel %d0,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 4957c: b491 cmpl %a1@,%d2 4957e: 6700 0098 beqw 49618 <_Thread_Suspend+0xc8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 49582: 2450 moveal %a0@,%a2 previous = the_node->previous; 49584: 2268 0004 moveal %a0@(4),%a1 next->previous = previous; 49588: 2549 0004 movel %a1,%a2@(4) previous->next = next; 4958c: 228a movel %a2,%a1@ _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 4958e: 203c 0000 0700 movel #1792,%d0 49594: 46c1 movew %d1,%sr 49596: 8081 orl %d1,%d0 49598: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 4959a: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0 495a0: 6730 beqs 495d2 <_Thread_Suspend+0x82> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 495a2: b1f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a0 495a8: 671c beqs 495c6 <_Thread_Suspend+0x76> <== NEVER TAKEN _Context_Switch_necessary = true; _ISR_Enable( level ); 495aa: 46c1 movew %d1,%sr } 495ac: 4cd7 040c moveml %sp@,%d2-%d3/%a2 495b0: 4e5e unlk %fp 495b2: 4e75 rts RTEMS_INLINE_ROUTINE States_Control _States_Set ( States_Control states_to_set, States_Control current_state ) { return (current_state | states_to_set); 495b4: 7402 moveq #2,%d2 495b6: 8480 orl %d0,%d2 495b8: 2142 0010 movel %d2,%a0@(16) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 495bc: 46c1 movew %d1,%sr if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 495be: 4cd7 040c moveml %sp@,%d2-%d3/%a2 495c2: 4e5e unlk %fp 495c4: 4e75 rts if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 495c6: 7401 moveq #1,%d2 495c8: 13c2 0005 ff78 moveb %d2,5ff78 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 495ce: 46c1 movew %d1,%sr 495d0: 60da bras 495ac <_Thread_Suspend+0x5c> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 495d2: 3039 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d0 495d8: 4840 swap %d0 495da: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 495dc: 4282 clrl %d2 495de: 43f9 0005 fbe4 lea 5fbe4 <_Priority_Bit_map>,%a1 495e4: 3400 movew %d0,%d2 495e6: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 495ea: 4840 swap %d0 495ec: 04c0 ff1 %d0 return (_Priority_Bits_index( major ) << 4) + 495ee: 4283 clrl %d3 495f0: e98a lsll #4,%d2 495f2: 3600 movew %d0,%d3 _Thread_Ready_chain[ _Priority_Get_highest() ].first; 495f4: 2279 0005 fa90 moveal 5fa90 <_Thread_Ready_chain>,%a1 495fa: 2002 movel %d2,%d0 495fc: d083 addl %d3,%d0 495fe: 2400 movel %d0,%d2 49600: e58a lsll #2,%d2 49602: e988 lsll #4,%d0 49604: 93c2 subal %d2,%a1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 49606: d3c0 addal %d0,%a1 49608: 23d1 0005 ff70 movel %a1@,5ff70 <_Per_CPU_Information+0x10> _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 4960e: b1f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a0 49614: 6694 bnes 495aa <_Thread_Suspend+0x5a> <== NEVER TAKEN 49616: 60ae bras 495c6 <_Thread_Suspend+0x76> RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 49618: 2468 008e moveal %a0@(142),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4961c: 2009 movel %a1,%d0 4961e: 5880 addql #4,%d0 49620: 2280 movel %d0,%a1@ 49622: 3412 movew %a2@,%d2 49624: 3028 0098 movew %a0@(152),%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 49628: 42a9 0004 clrl %a1@(4) 4962c: c082 andl %d2,%d0 the_chain->last = _Chain_Head(the_chain); 4962e: 2349 0008 movel %a1,%a1@(8) 49632: 3480 movew %d0,%a2@ if ( *the_priority_map->minor == 0 ) 49634: 6600 ff58 bnew 4958e <_Thread_Suspend+0x3e> _Priority_Major_bit_map &= the_priority_map->block_major; 49638: 3439 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d2 4963e: 3028 0096 movew %a0@(150),%d0 49642: c082 andl %d2,%d0 49644: 33c0 0005 fb7c movew %d0,5fb7c <_Priority_Major_bit_map> _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 4964a: 203c 0000 0700 movel #1792,%d0 49650: 46c1 movew %d1,%sr 49652: 8081 orl %d1,%d0 49654: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 49656: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0 4965c: 6600 ff44 bnew 495a2 <_Thread_Suspend+0x52> 49660: 6000 ff70 braw 495d2 <_Thread_Suspend+0x82> =============================================================================== 00049664 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 49664: 4e56 0000 linkw %fp,#0 49668: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 4966a: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 49670: 4a2a 0074 tstb %a2@(116) 49674: 6720 beqs 49696 <_Thread_Tickle_timeslice+0x32> return; if ( !_States_Is_ready( executing->current_state ) ) 49676: 4aaa 0010 tstl %a2@(16) 4967a: 661a bnes 49696 <_Thread_Tickle_timeslice+0x32> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 4967c: 202a 007a movel %a2@(122),%d0 49680: 7201 moveq #1,%d1 49682: b280 cmpl %d0,%d1 49684: 6210 bhis 49696 <_Thread_Tickle_timeslice+0x32> 49686: 123c 0002 moveb #2,%d1 4968a: b280 cmpl %d0,%d1 4968c: 642e bccs 496bc <_Thread_Tickle_timeslice+0x58> 4968e: 123c 0003 moveb #3,%d1 49692: b280 cmpl %d0,%d1 49694: 6708 beqs 4969e <_Thread_Tickle_timeslice+0x3a> <== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 49696: 246e fffc moveal %fp@(-4),%a2 4969a: 4e5e unlk %fp 4969c: 4e75 rts } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 4969e: 202a 0076 movel %a2@(118),%d0 496a2: 5380 subql #1,%d0 496a4: 2540 0076 movel %d0,%a2@(118) 496a8: 66ec bnes 49696 <_Thread_Tickle_timeslice+0x32> (*executing->budget_callout)( executing ); 496aa: 2f0a movel %a2,%sp@- 496ac: 206a 007e moveal %a2@(126),%a0 496b0: 4e90 jsr %a0@ break; #endif } } 496b2: 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 ); 496b6: 588f addql #4,%sp break; #endif } } 496b8: 4e5e unlk %fp 496ba: 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 ) { 496bc: 202a 0076 movel %a2@(118),%d0 496c0: 5380 subql #1,%d0 496c2: 2540 0076 movel %d0,%a2@(118) 496c6: 6ece bgts 49696 <_Thread_Tickle_timeslice+0x32> * at the priority of the currently executing thread, then the * 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. */ _Thread_Yield_processor(); 496c8: 4eb9 0004 96e0 jsr 496e0 <_Thread_Yield_processor> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 496ce: 41f9 0005 fa94 lea 5fa94 <_Thread_Ticks_per_timeslice>,%a0 496d4: 2550 0076 movel %a0@,%a2@(118) if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 496d8: 246e fffc moveal %fp@(-4),%a2 496dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000496e0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 496e0: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 496e4: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 496ea: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 496ee: 243c 0000 0700 movel #1792,%d2 496f4: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 496f6: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 496fa: 40c1 movew %sr,%d1 496fc: 8081 orl %d1,%d0 496fe: 46c0 movew %d0,%sr } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 49700: 2469 0008 moveal %a1@(8),%a2 Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { 49704: b5d1 cmpal %a1@,%a2 49706: 674c beqs 49754 <_Thread_Yield_processor+0x74> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 49708: 2650 moveal %a0@,%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4970a: 2009 movel %a1,%d0 4970c: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4970e: 2868 0004 moveal %a0@(4),%a4 next->previous = previous; previous->next = next; 49712: 288b movel %a3,%a4@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 49714: 274c 0004 movel %a4,%a3@(4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49718: 2080 movel %d0,%a0@ { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 4971a: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; 4971e: 2488 movel %a0,%a2@ the_node->previous = old_last_node; 49720: 214a 0004 movel %a2,%a0@(4) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 49724: 46c1 movew %d1,%sr 49726: 8481 orl %d1,%d2 49728: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 4972a: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0 49730: 6712 beqs 49744 <_Thread_Yield_processor+0x64> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 49732: 7001 moveq #1,%d0 49734: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 4973a: 46c1 movew %d1,%sr } 4973c: 4cd7 1c04 moveml %sp@,%d2/%a2-%a4 49740: 4e5e unlk %fp 49742: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 49744: 23d1 0005 ff70 movel %a1@,5ff70 <_Per_CPU_Information+0x10> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 4974a: 7001 moveq #1,%d0 4974c: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> 49752: 60e6 bras 4973a <_Thread_Yield_processor+0x5a> if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 49754: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0 4975a: 67de beqs 4973a <_Thread_Yield_processor+0x5a> _Context_Switch_necessary = true; 4975c: 7001 moveq #1,%d0 4975e: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> 49764: 60d4 bras 4973a <_Thread_Yield_processor+0x5a> ... =============================================================================== 00048314 <_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 ) ) { 48314: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 48316: 4e56 0000 linkw %fp,#0 4831a: 202e 0010 movel %fp@(16),%d0 4831e: 2f0a movel %a2,%sp@- 48320: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 48324: 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 ) ) { 48328: b2aa 0050 cmpl %a2@(80),%d1 4832c: 671c beqs 4834a <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4832e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 48330: 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 } 48334: 246e fffc moveal %fp@(-4),%a2 48338: 203c 1003 fff8 movel #268697592,%d0 4833e: 2d40 000c movel %d0,%fp@(12) 48342: 4e5e unlk %fp 48344: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4834a: 123c 0003 moveb #3,%d1 4834e: 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 ); 48352: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 48354: 486a 0048 pea %a2@(72) 48358: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 4835e: 588f addql #4,%sp 48360: 203c 1003 fff8 movel #268697592,%d0 48366: 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 } 4836a: 246e fffc moveal %fp@(-4),%a2 4836e: 2d40 000c movel %d0,%fp@(12) 48372: 4e5e unlk %fp 48374: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state> ... =============================================================================== 00048eac <_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 ) { 48eac: 4e56 ffe0 linkw %fp,#-32 48eb0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 48eb4: 246e 000c moveal %fp@(12),%a2 48eb8: 41ea 003c lea %a2@(60),%a0 48ebc: 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; 48ec0: 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); 48ec4: 2a01 movel %d1,%d5 48ec6: ec8d lsrl #6,%d5 48ec8: 2548 0038 movel %a0,%a2@(56) header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 48ecc: 242b 0038 movel %a3@(56),%d2 Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 48ed0: 41ea 0038 lea %a2@(56),%a0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48ed4: 42aa 003c clrl %a2@(60) 48ed8: 2548 0040 movel %a0,%a2@(64) priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 48edc: 0801 0005 btst #5,%d1 48ee0: 665e bnes 48f40 <_Thread_queue_Enqueue_priority+0x94> 48ee2: 700c moveq #12,%d0 48ee4: 4c00 5800 mulsl %d0,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 48ee8: 2c3c 0000 0700 movel #1792,%d6 48eee: 2006 movel %d6,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 48ef0: 49f3 5804 lea %a3@(00000004,%d5:l),%a4 48ef4: 40c3 movew %sr,%d3 48ef6: 8083 orl %d3,%d0 48ef8: 46c0 movew %d0,%sr 48efa: 2803 movel %d3,%d4 search_thread = (Thread_Control *) header->first; 48efc: 2073 5800 moveal %a3@(00000000,%d5:l),%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48f00: b9c8 cmpal %a0,%a4 48f02: 6700 013c beqw 49040 <_Thread_queue_Enqueue_priority+0x194> search_priority = search_thread->current_priority; 48f06: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 48f0a: b3c1 cmpal %d1,%a1 48f0c: 6418 bccs 48f26 <_Thread_queue_Enqueue_priority+0x7a> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 48f0e: 2006 movel %d6,%d0 48f10: 46c3 movew %d3,%sr 48f12: 8083 orl %d3,%d0 48f14: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 48f16: 2002 movel %d2,%d0 48f18: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48f1c: 6700 00c0 beqw 48fde <_Thread_queue_Enqueue_priority+0x132> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 48f20: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48f22: b9c8 cmpal %a0,%a4 48f24: 66e0 bnes 48f06 <_Thread_queue_Enqueue_priority+0x5a> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48f26: 202b 0030 movel %a3@(48),%d0 48f2a: 7401 moveq #1,%d2 48f2c: b480 cmpl %d0,%d2 48f2e: 6700 00c6 beqw 48ff6 <_Thread_queue_Enqueue_priority+0x14a> * 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; 48f32: 206e 0010 moveal %fp@(16),%a0 48f36: 2084 movel %d4,%a0@ return the_thread_queue->sync_state; } 48f38: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 48f3c: 4e5e unlk %fp 48f3e: 4e75 rts _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 48f40: 2005 movel %d5,%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; 48f42: 4283 clrl %d3 48f44: 1639 0005 e322 moveb 5e322 ,%d3 _ISR_Disable( level ); 48f4a: 2c3c 0000 0700 movel #1792,%d6 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48f50: 2243 moveal %d3,%a1 48f52: 5289 addql #1,%a1 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 48f54: e588 lsll #2,%d0 48f56: e98d lsll #4,%d5 48f58: 9a80 subl %d0,%d5 48f5a: da8b addl %a3,%d5 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 48f5c: 2845 moveal %d5,%a4 48f5e: 508c addql #8,%a4 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 48f60: 2006 movel %d6,%d0 48f62: 40c3 movew %sr,%d3 48f64: 8083 orl %d3,%d0 48f66: 46c0 movew %d0,%sr 48f68: 2803 movel %d3,%d4 search_thread = (Thread_Control *) header->last; 48f6a: 2054 moveal %a4@,%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48f6c: ba88 cmpl %a0,%d5 48f6e: 6720 beqs 48f90 <_Thread_queue_Enqueue_priority+0xe4> search_priority = search_thread->current_priority; 48f70: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 48f74: b3c1 cmpal %d1,%a1 48f76: 6318 blss 48f90 <_Thread_queue_Enqueue_priority+0xe4> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 48f78: 2006 movel %d6,%d0 48f7a: 46c3 movew %d3,%sr 48f7c: 8083 orl %d3,%d0 48f7e: 46c0 movew %d0,%sr 48f80: 2002 movel %d2,%d0 48f82: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48f86: 6736 beqs 48fbe <_Thread_queue_Enqueue_priority+0x112> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 48f88: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48f8c: ba88 cmpl %a0,%d5 48f8e: 66e0 bnes 48f70 <_Thread_queue_Enqueue_priority+0xc4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48f90: 202b 0030 movel %a3@(48),%d0 48f94: 7401 moveq #1,%d2 48f96: b480 cmpl %d0,%d2 48f98: 6698 bnes 48f32 <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48f9a: 42ab 0030 clrl %a3@(48) if ( priority == search_priority ) 48f9e: b3c1 cmpal %d1,%a1 48fa0: 677a beqs 4901c <_Thread_queue_Enqueue_priority+0x170> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48fa2: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 48fa4: 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; 48fa8: 2489 movel %a1,%a2@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 48faa: 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; 48fae: 208a movel %a2,%a0@ next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48fb0: 254b 0044 movel %a3,%a2@(68) _ISR_Enable( level ); 48fb4: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 48fb6: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 48fba: 4e5e unlk %fp 48fbc: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48fbe: 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; 48fc0: 4283 clrl %d3 48fc2: 1639 0005 e322 moveb 5e322 ,%d3 _ISR_Disable( level ); 48fc8: 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; 48fca: 2243 moveal %d3,%a1 48fcc: 5289 addql #1,%a1 _ISR_Disable( level ); 48fce: 40c3 movew %sr,%d3 48fd0: 8083 orl %d3,%d0 48fd2: 46c0 movew %d0,%sr 48fd4: 2803 movel %d3,%d4 search_thread = (Thread_Control *) header->last; 48fd6: 2054 moveal %a4@,%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48fd8: ba88 cmpl %a0,%d5 48fda: 6694 bnes 48f70 <_Thread_queue_Enqueue_priority+0xc4><== NEVER TAKEN 48fdc: 60b2 bras 48f90 <_Thread_queue_Enqueue_priority+0xe4> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48fde: 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 ); 48fe0: 2006 movel %d6,%d0 48fe2: 40c3 movew %sr,%d3 48fe4: 8083 orl %d3,%d0 48fe6: 46c0 movew %d0,%sr 48fe8: 2803 movel %d3,%d4 search_thread = (Thread_Control *) header->first; 48fea: 2073 5800 moveal %a3@(00000000,%d5:l),%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48fee: b9c8 cmpal %a0,%a4 48ff0: 6600 ff14 bnew 48f06 <_Thread_queue_Enqueue_priority+0x5a> 48ff4: 604a bras 49040 <_Thread_queue_Enqueue_priority+0x194> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48ff6: 42ab 0030 clrl %a3@(48) if ( priority == search_priority ) 48ffa: b3c1 cmpal %d1,%a1 48ffc: 671e beqs 4901c <_Thread_queue_Enqueue_priority+0x170> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 48ffe: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 49002: 2488 movel %a0,%a2@ the_node->previous = previous_node; 49004: 2549 0004 movel %a1,%a2@(4) previous_node->next = the_node; 49008: 228a movel %a2,%a1@ search_node->previous = the_node; 4900a: 214a 0004 movel %a2,%a0@(4) the_thread->Wait.queue = the_thread_queue; 4900e: 254b 0044 movel %a3,%a2@(68) _ISR_Enable( level ); 49012: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 49014: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 49018: 4e5e unlk %fp 4901a: 4e75 rts 4901c: 41e8 003c lea %a0@(60),%a0 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 49020: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 49024: 2488 movel %a0,%a2@ the_node->previous = previous_node; 49026: 2549 0004 movel %a1,%a2@(4) previous_node->next = the_node; 4902a: 228a movel %a2,%a1@ search_node->previous = the_node; 4902c: 214a 0004 movel %a2,%a0@(4) the_thread->Wait.queue = the_thread_queue; 49030: 254b 0044 movel %a3,%a2@(68) _ISR_Enable( level ); 49034: 46c4 movew %d4,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 49036: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 49038: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4903c: 4e5e unlk %fp 4903e: 4e75 rts } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 49040: 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; 49044: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 49048: 7401 moveq #1,%d2 4904a: b480 cmpl %d0,%d2 4904c: 6600 fee4 bnew 48f32 <_Thread_queue_Enqueue_priority+0x86> 49050: 60a4 bras 48ff6 <_Thread_queue_Enqueue_priority+0x14a> ... =============================================================================== 0004e880 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4e880: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4e886: 4e56 0000 linkw %fp,#0 4e88a: 2f0a movel %a2,%sp@- 4e88c: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4e890: 40c1 movew %sr,%d1 4e892: 8081 orl %d1,%d0 4e894: 46c0 movew %d0,%sr 4e896: 202a 0010 movel %a2@(16),%d0 4e89a: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4e8a0: 6734 beqs 4e8d6 <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4e8a2: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4e8a4: 7002 moveq #2,%d0 previous = the_node->previous; 4e8a6: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4e8aa: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4e8ae: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4e8b0: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4e8b4: b0aa 0050 cmpl %a2@(80),%d0 4e8b8: 6726 beqs 4e8e0 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4e8ba: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4e8bc: 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 } 4e8c0: 246e fffc moveal %fp@(-4),%a2 4e8c4: 203c 1003 fff8 movel #268697592,%d0 4e8ca: 2d40 000c movel %d0,%fp@(12) 4e8ce: 4e5e unlk %fp 4e8d0: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4e8d6: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4e8d8: 246e fffc moveal %fp@(-4),%a2 4e8dc: 4e5e unlk %fp 4e8de: 4e75 rts 4e8e0: 7003 moveq #3,%d0 4e8e2: 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 ); 4e8e6: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4e8e8: 486a 0048 pea %a2@(72) 4e8ec: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 4e8f2: 588f addql #4,%sp 4e8f4: 203c 1003 fff8 movel #268697592,%d0 4e8fa: 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 } 4e8fe: 246e fffc moveal %fp@(-4),%a2 4e902: 2d40 000c movel %d0,%fp@(12) 4e906: 4e5e unlk %fp 4e908: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state> ... =============================================================================== 0004cc5c <_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 ); 4cc5c: 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 ) { 4cc62: 4e56 ffec linkw %fp,#-20 4cc66: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4cc6a: 246e 000c moveal %fp@(12),%a2 4cc6e: 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 ); 4cc72: 40c1 movew %sr,%d1 4cc74: 8081 orl %d1,%d0 4cc76: 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); 4cc78: 202a 0010 movel %a2@(16),%d0 4cc7c: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4cc82: 6778 beqs 4ccfc <_Thread_queue_Extract_priority_helper+0xa0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4cc84: 200a movel %a2,%d0 4cc86: 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; 4cc8c: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4cc8e: 286a 0004 moveal %a2@(4),%a4 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4cc92: 206a 0038 moveal %a2@(56),%a0 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4cc96: b088 cmpl %a0,%d0 4cc98: 676e beqs 4cd08 <_Thread_queue_Extract_priority_helper+0xac> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4cc9a: 226a 0040 moveal %a2@(64),%a1 new_second_node = new_first_node->next; 4cc9e: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4cca0: 2748 0004 movel %a0,%a3@(4) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4cca4: 2888 movel %a0,%a4@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4cca6: 214c 0004 movel %a4,%a0@(4) last_node = the_thread->Wait.Block2n.last; 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; 4ccaa: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4ccac: b1c9 cmpal %a1,%a0 4ccae: 6716 beqs 4ccc6 <_Thread_queue_Extract_priority_helper+0x6a> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 4ccb0: 47e8 0038 lea %a0@(56),%a3 4ccb4: 2b4b 0004 movel %a3,%a5@(4) new_first_thread->Wait.Block2n.first = new_second_node; 4ccb8: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4ccbc: 2149 0040 movel %a1,%a0@(64) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ccc0: 41e8 003c lea %a0@(60),%a0 4ccc4: 2288 movel %a0,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4ccc6: 4a02 tstb %d2 4ccc8: 6626 bnes 4ccf0 <_Thread_queue_Extract_priority_helper+0x94> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4ccca: 7002 moveq #2,%d0 4cccc: b0aa 0050 cmpl %a2@(80),%d0 4ccd0: 6742 beqs 4cd14 <_Thread_queue_Extract_priority_helper+0xb8><== NEVER TAKEN _ISR_Enable( level ); 4ccd2: 46c1 movew %d1,%sr 4ccd4: 2d4a 0008 movel %a2,%fp@(8) 4ccd8: 267c 1003 fff8 moveal #268697592,%a3 4ccde: 2d4b 000c movel %a3,%fp@(12) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cce2: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cce8: 4e5e unlk %fp 4ccea: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4ccf0: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4ccf2: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4ccf8: 4e5e unlk %fp 4ccfa: 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 ); 4ccfc: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4ccfe: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cd04: 4e5e unlk %fp 4cd06: 4e75 rts new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4cd08: 288b movel %a3,%a4@ next_node->previous = previous_node; 4cd0a: 274c 0004 movel %a4,%a3@(4) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4cd0e: 4a02 tstb %d2 4cd10: 67b8 beqs 4ccca <_Thread_queue_Extract_priority_helper+0x6e> 4cd12: 60dc bras 4ccf0 <_Thread_queue_Extract_priority_helper+0x94> 4cd14: 7003 moveq #3,%d0 <== NOT EXECUTED 4cd16: 2540 0050 movel %d0,%a2@(80) <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4cd1a: 46c1 movew %d1,%sr <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4cd1c: 486a 0048 pea %a2@(72) <== NOT EXECUTED 4cd20: 267c 1003 fff8 moveal #268697592,%a3 <== NOT EXECUTED 4cd26: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> <== NOT EXECUTED 4cd2c: 588f addql #4,%sp <== NOT EXECUTED 4cd2e: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED 4cd32: 2d4b 000c movel %a3,%fp@(12) <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cd36: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 4cd3c: 4e5e unlk %fp <== NOT EXECUTED 4cd3e: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state> <== NOT EXECUTED =============================================================================== 000490c0 <_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 ) { 490c0: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 490c2: 4e56 0000 linkw %fp,#0 490c6: 206e 0008 moveal %fp@(8),%a0 490ca: 2f0a movel %a2,%sp@- 490cc: 202e 000c movel %fp@(12),%d0 490d0: 2f02 movel %d2,%sp@- the_thread_queue->state = state; 490d2: 216e 0010 0038 movel %fp@(16),%a0@(56) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 490d8: 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; 490de: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 490e2: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 490e6: b280 cmpl %d0,%d1 490e8: 6716 beqs 49100 <_Thread_queue_Initialize+0x40> 490ea: 2448 moveal %a0,%a2 490ec: 588a addql #4,%a2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 490ee: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 490f2: 208a movel %a2,%a0@ Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 490f4: 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 ); } } 490f8: 241f movel %sp@+,%d2 490fa: 245f moveal %sp@+,%a2 490fc: 4e5e unlk %fp 490fe: 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 ) { 49100: 2248 moveal %a0,%a1 49102: 4280 clrl %d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49104: 2400 movel %d0,%d2 49106: 2200 movel %d0,%d1 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 49108: 5280 addql #1,%d0 4910a: e58a lsll #2,%d2 4910c: e989 lsll #4,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4910e: 42a9 0004 clrl %a1@(4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49112: 9282 subl %d2,%d1 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 49114: 45f0 1800 lea %a0@(00000000,%d1:l),%a2 49118: 234a 0008 movel %a2,%a1@(8) 4911c: 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 ; 49120: 7204 moveq #4,%d1 49122: 228a movel %a2,%a1@ index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 49124: 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 ; 49128: b280 cmpl %d0,%d1 4912a: 67cc beqs 490f8 <_Thread_queue_Initialize+0x38> <== NEVER TAKEN 4912c: 2400 movel %d0,%d2 4912e: 2200 movel %d0,%d1 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 49130: 5280 addql #1,%d0 49132: e58a lsll #2,%d2 49134: e989 lsll #4,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 49136: 42a9 0004 clrl %a1@(4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4913a: 9282 subl %d2,%d1 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4913c: 45f0 1800 lea %a0@(00000000,%d1:l),%a2 49140: 234a 0008 movel %a2,%a1@(8) 49144: 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 ; 49148: 7204 moveq #4,%d1 4914a: 228a movel %a2,%a1@ index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 4914c: 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 ; 49150: b280 cmpl %d0,%d1 49152: 66b0 bnes 49104 <_Thread_queue_Initialize+0x44> 49154: 60a2 bras 490f8 <_Thread_queue_Initialize+0x38> ... =============================================================================== 0004cd44 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4cd44: 4e56 0000 linkw %fp,#0 4cd48: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4cd4c: 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 && 4cd50: 2029 0030 movel %a1@(48),%d0 4cd54: 6708 beqs 4cd5e <_Thread_queue_Process_timeout+0x1a> 4cd56: b1f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a0 4cd5c: 6716 beqs 4cd74 <_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; 4cd5e: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4cd64: 2f08 movel %a0,%sp@- 4cd66: 2f09 movel %a1,%sp@- 4cd68: 4eb9 0004 cc24 jsr 4cc24 <_Thread_queue_Extract> 4cd6e: 508f addql #8,%sp } } 4cd70: 4e5e unlk %fp 4cd72: 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 ) { 4cd74: 7203 moveq #3,%d1 4cd76: b280 cmpl %d0,%d1 4cd78: 67f6 beqs 4cd70 <_Thread_queue_Process_timeout+0x2c> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4cd7a: 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 ); } } 4cd7c: 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; 4cd7e: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4cd84: 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 ); } } ... =============================================================================== 00049158 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 49158: 4e56 fff0 linkw %fp,#-16 4915c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49160: 246e 0008 moveal %fp@(8),%a2 49164: 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 ) 49168: 4a8a tstl %a2 4916a: 6708 beqs 49174 <_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 ) { 4916c: 7001 moveq #1,%d0 4916e: b0aa 0034 cmpl %a2@(52),%d0 49172: 670a beqs 4917e <_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 ); } } 49174: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4917a: 4e5e unlk %fp <== NOT EXECUTED 4917c: 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 ); 4917e: 303c 0700 movew #1792,%d0 49182: 40c2 movew %sr,%d2 49184: 8082 orl %d2,%d0 49186: 46c0 movew %d0,%sr 49188: 202b 0010 movel %a3@(16),%d0 4918c: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 49192: 660c bnes 491a0 <_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 ); 49194: 46c2 movew %d2,%sr <== NOT EXECUTED } } 49196: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4919c: 4e5e unlk %fp 4919e: 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 ); 491a0: 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; 491a4: 7001 moveq #1,%d0 491a6: 2f0b movel %a3,%sp@- 491a8: 2540 0030 movel %d0,%a2@(48) 491ac: 2f0a movel %a2,%sp@- 491ae: 4eb9 0004 cc5c jsr 4cc5c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 491b4: 486e fffc pea %fp@(-4) 491b8: 2f0b movel %a3,%sp@- 491ba: 2f0a movel %a2,%sp@- 491bc: 4eb9 0004 8eac jsr 48eac <_Thread_queue_Enqueue_priority> 491c2: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 491c6: 46c2 movew %d2,%sr 491c8: 60cc bras 49196 <_Thread_queue_Requeue+0x3e> ... =============================================================================== 000491cc <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 491cc: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 491d0: 486e fffc pea %fp@(-4) 491d4: 2f2e 0008 movel %fp@(8),%sp@- 491d8: 4eb9 0004 88d4 jsr 488d4 <_Thread_Get> switch ( location ) { 491de: 508f addql #8,%sp 491e0: 4aae fffc tstl %fp@(-4) 491e4: 6618 bnes 491fe <_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 ); 491e6: 2f00 movel %d0,%sp@- 491e8: 4eb9 0004 cd44 jsr 4cd44 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 491ee: 588f addql #4,%sp 491f0: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 491f6: 5380 subql #1,%d0 491f8: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 491fe: 4e5e unlk %fp ... =============================================================================== 00059360 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 59360: 4e56 ffb0 linkw %fp,#-80 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59364: 41ee ffec lea %fp@(-20),%a0 59368: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5936c: 246e 0008 moveal %fp@(8),%a2 59370: 2c0e movel %fp,%d6 59372: 260e movel %fp,%d3 59374: 5186 subql #8,%d6 59376: 0683 ffff ffe8 addil #-24,%d3 5937c: 240a movel %a2,%d2 5937e: 2a0a movel %a2,%d5 59380: 4bf9 0005 d9d0 lea 5d9d0 <_Watchdog_Adjust_to_chain>,%a5 59386: 0682 0000 0030 addil #48,%d2 5938c: 0685 0000 0068 addil #104,%d5 59392: 47f9 0005 9f70 lea 59f70 <_Chain_Get>,%a3 59398: 49f9 0005 da58 lea 5da58 <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 5939e: 283c 0000 0700 movel #1792,%d4 593a4: 2d48 ffd8 movel %a0,%fp@(-40) 593a8: 41ea 0008 lea %a2@(8),%a0 593ac: 2d48 ffe4 movel %a0,%fp@(-28) 593b0: 41ea 0040 lea %a2@(64),%a0 593b4: 2d48 ffe0 movel %a0,%fp@(-32) { Timer_server_Control *ts = (Timer_server_Control *) arg; Chain_Control insert_chain; Chain_Control fire_chain; _Chain_Initialize_empty( &insert_chain ); 593b8: 41ee fff4 lea %fp@(-12),%a0 593bc: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 593c0: 41ee ffec lea %fp@(-20),%a0 593c4: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 593c8: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 593cc: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 593d0: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 593d4: 2d43 fff0 movel %d3,%fp@(-16) { /* * 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; 593d8: 41ee fff4 lea %fp@(-12),%a0 593dc: 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; 593e0: 2039 0007 ebec movel 7ebec <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 593e6: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 593ea: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 593ee: 9081 subl %d1,%d0 593f0: 2f03 movel %d3,%sp@- 593f2: 2f00 movel %d0,%sp@- 593f4: 2f02 movel %d2,%sp@- 593f6: 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(); 593f8: 2039 0007 eb4a movel 7eb4a <_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 ) { 593fe: 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; 59402: 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 ) { 59406: b280 cmpl %d0,%d1 59408: 6500 0086 bcsw 59490 <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 5940c: b280 cmpl %d0,%d1 5940e: 6200 00a4 bhiw 594b4 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 59412: 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 ); 59416: 202a 0078 movel %a2@(120),%d0 5941a: 2f00 movel %d0,%sp@- 5941c: 4e93 jsr %a3@ if ( timer == NULL ) { 5941e: 588f addql #4,%sp 59420: 4a80 tstl %d0 59422: 672e beqs 59452 <_Timer_server_Body+0xf2> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 59424: 2040 moveal %d0,%a0 <== NOT EXECUTED 59426: 7e01 moveq #1,%d7 <== NOT EXECUTED 59428: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 5942c: be81 cmpl %d1,%d7 <== NOT EXECUTED 5942e: 6700 00a8 beqw 594d8 <_Timer_server_Body+0x178> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 59432: 7e03 moveq #3,%d7 <== NOT EXECUTED 59434: be81 cmpl %d1,%d7 <== NOT EXECUTED 59436: 66de bnes 59416 <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59438: 2040 moveal %d0,%a0 <== NOT EXECUTED 5943a: 4868 0010 pea %a0@(16) <== NOT EXECUTED 5943e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 59440: 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 ); 59442: 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 ); 59446: 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 ); 59448: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5944a: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 5944c: 588f addql #4,%sp <== NOT EXECUTED 5944e: 4a80 tstl %d0 <== NOT EXECUTED 59450: 66d2 bnes 59424 <_Timer_server_Body+0xc4> <== 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 ); 59452: 2004 movel %d4,%d0 59454: 40c1 movew %sr,%d1 59456: 8081 orl %d1,%d0 59458: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 5945a: bcae fff4 cmpl %fp@(-12),%d6 5945e: 6700 0086 beqw 594e6 <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 59462: 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; 59464: 2039 0007 ebec movel 7ebec <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 5946a: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 5946e: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59472: 9081 subl %d1,%d0 <== NOT EXECUTED 59474: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59476: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59478: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5947a: 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(); 5947c: 2039 0007 eb4a movel 7eb4a <_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 ) { 59482: 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; 59486: 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 ) { 5948a: b280 cmpl %d0,%d1 <== NOT EXECUTED 5948c: 6400 ff7e bccw 5940c <_Timer_server_Body+0xac> <== 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 ); 59490: 2f03 movel %d3,%sp@- 59492: 2e00 movel %d0,%d7 59494: 9e81 subl %d1,%d7 59496: 2f07 movel %d7,%sp@- 59498: 2d40 ffdc movel %d0,%fp@(-36) 5949c: 2f05 movel %d5,%sp@- 5949e: 4eb9 0005 d9d0 jsr 5d9d0 <_Watchdog_Adjust_to_chain> 594a4: 202e ffdc movel %fp@(-36),%d0 594a8: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 594ac: 2540 0074 movel %d0,%a2@(116) 594b0: 6000 ff64 braw 59416 <_Timer_server_Body+0xb6> /* * 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 ); 594b4: 9280 subl %d0,%d1 594b6: 2f01 movel %d1,%sp@- 594b8: 4878 0001 pea 1 594bc: 2d40 ffdc movel %d0,%fp@(-36) 594c0: 2f05 movel %d5,%sp@- 594c2: 4eb9 0005 d93c jsr 5d93c <_Watchdog_Adjust> 594c8: 202e ffdc movel %fp@(-36),%d0 594cc: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 594d0: 2540 0074 movel %d0,%a2@(116) 594d4: 6000 ff40 braw 59416 <_Timer_server_Body+0xb6> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 594d8: 4868 0010 pea %a0@(16) <== NOT EXECUTED 594dc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 594de: 4e94 jsr %a4@ <== NOT EXECUTED 594e0: 508f addql #8,%sp <== NOT EXECUTED 594e2: 6000 ff32 braw 59416 <_Timer_server_Body+0xb6> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 594e6: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 594ea: 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 ) ) { 594ec: 202e ffd8 movel %fp@(-40),%d0 594f0: b0ae ffe8 cmpl %fp@(-24),%d0 594f4: 6752 beqs 59548 <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 594f6: 2204 movel %d4,%d1 594f8: 40c0 movew %sr,%d0 594fa: 8280 orl %d0,%d1 594fc: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 594fe: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 59502: b1ee ffd8 cmpal %fp@(-40),%a0 59506: 6732 beqs 5953a <_Timer_server_Body+0x1da> <== NEVER TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 59508: 2250 moveal %a0@,%a1 the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 5950a: 2343 0004 movel %d3,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 5950e: 42a8 0008 clrl %a0@(8) Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 59512: 2d49 ffe8 movel %a1,%fp@(-24) _ISR_Enable( level ); 59516: 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 ); 59518: 2f28 0024 movel %a0@(36),%sp@- 5951c: 2f28 0020 movel %a0@(32),%sp@- 59520: 2068 001c moveal %a0@(28),%a0 59524: 4e90 jsr %a0@ } 59526: 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 ); 59528: 2204 movel %d4,%d1 5952a: 40c0 movew %sr,%d0 5952c: 8280 orl %d0,%d1 5952e: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59530: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 59534: b1ee ffd8 cmpal %fp@(-40),%a0 59538: 66ce bnes 59508 <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 5953a: 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; 5953c: 41ee fff4 lea %fp@(-12),%a0 59540: 2548 0078 movel %a0,%a2@(120) 59544: 6000 fe9a braw 593e0 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 59548: 4207 clrb %d7 5954a: 1547 007c moveb %d7,%a2@(124) 5954e: 2039 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d0 59554: 5280 addql #1,%d0 59556: 23c0 0007 eac0 movel %d0,7eac0 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 5955c: 4878 0008 pea 8 59560: 2f12 movel %a2@,%sp@- 59562: 4eb9 0005 d04c jsr 5d04c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 59568: 2f0a movel %a2,%sp@- 5956a: 4eba fd1c jsr %pc@(59288 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5956e: 2f0a movel %a2,%sp@- 59570: 4eba fd80 jsr %pc@(592f2 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 59574: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> ts->active = true; 5957a: 7001 moveq #1,%d0 5957c: 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 ); 59580: 2f2e ffe4 movel %fp@(-28),%sp@- 59584: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 5958a: 2f2e ffe0 movel %fp@(-32),%sp@- 5958e: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove> 59594: 4fef 0018 lea %sp@(24),%sp 59598: 6000 fe3e braw 593d8 <_Timer_server_Body+0x78> =============================================================================== 0005959c <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 5959c: 4e56 fff0 linkw %fp,#-16 595a0: 206e 000c moveal %fp@(12),%a0 595a4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 595a8: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 595ac: 202a 0078 movel %a2@(120),%d0 595b0: 671a beqs 595cc <_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 ); 595b2: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 595b6: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 595ba: 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 ); 595c0: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 595c4: 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 ); 595c6: 4ef9 0005 9f10 jmp 59f10 <_Chain_Append> <== NOT EXECUTED 595cc: 2039 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d0 595d2: 5280 addql #1,%d0 595d4: 23c0 0007 eac0 movel %d0,7eac0 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 595da: 2028 0038 movel %a0@(56),%d0 595de: 7201 moveq #1,%d1 595e0: b280 cmpl %d0,%d1 595e2: 6700 008a beqw 5966e <_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 ) { 595e6: 7803 moveq #3,%d4 595e8: b880 cmpl %d0,%d4 595ea: 670e beqs 595fa <_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 ); } } 595ec: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 595f2: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 595f4: 4ef9 0005 c546 jmp 5c546 <_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 ); 595fa: 203c 0000 0700 movel #1792,%d0 59600: 40c2 movew %sr,%d2 59602: 8082 orl %d2,%d0 59604: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59606: 260a movel %a2,%d3 59608: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5960e: 2039 0007 eb4a movel 7eb4a <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 59614: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59618: 226a 0068 moveal %a2@(104),%a1 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 5961c: b689 cmpl %a1,%d3 5961e: 671c beqs 5963c <_Timer_server_Schedule_operation_method+0xa0> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 59620: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 59624: b280 cmpl %d0,%d1 59626: 6400 00ba bccw 596e2 <_Timer_server_Schedule_operation_method+0x146> /* * We advanced in time. */ delta = snapshot - last_snapshot; 5962a: 2800 movel %d0,%d4 5962c: 9881 subl %d1,%d4 if (delta_interval > delta) { 5962e: b883 cmpl %d3,%d4 59630: 6400 00bc bccw 596ee <_Timer_server_Schedule_operation_method+0x152> delta_interval -= delta; 59634: 9684 subl %d4,%d3 59636: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59638: 2341 0010 movel %d1,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 5963c: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 59640: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59642: 4868 0010 pea %a0@(16) 59646: 486a 0068 pea %a2@(104) 5964a: 4eb9 0005 da58 jsr 5da58 <_Watchdog_Insert> if ( !ts->active ) { 59650: 508f addql #8,%sp 59652: 102a 007c moveb %a2@(124),%d0 59656: 6694 bnes 595ec <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 59658: 2f0a movel %a2,%sp@- 5965a: 4eba fc96 jsr %pc@(592f2 <_Timer_server_Reset_tod_system_watchdog>) 5965e: 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 ); } } 59660: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59666: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 59668: 4ef9 0005 c546 jmp 5c546 <_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 ); 5966e: 203c 0000 0700 movel #1792,%d0 59674: 40c3 movew %sr,%d3 59676: 8083 orl %d3,%d0 59678: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 5967a: 2039 0007 ebec movel 7ebec <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59680: 220a movel %a2,%d1 59682: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 59688: 282a 003c movel %a2@(60),%d4 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5968c: 226a 0030 moveal %a2@(48),%a1 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 59690: b289 cmpl %a1,%d1 59692: 6712 beqs 596a6 <_Timer_server_Schedule_operation_method+0x10a> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 59694: 2200 movel %d0,%d1 59696: 9284 subl %d4,%d1 delta_interval = first_watchdog->delta_interval; 59698: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 5969c: b481 cmpl %d1,%d2 5969e: 633a blss 596da <_Timer_server_Schedule_operation_method+0x13e> delta_interval -= delta; 596a0: 9481 subl %d1,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 596a2: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 596a6: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 596aa: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 596ac: 4868 0010 pea %a0@(16) 596b0: 486a 0030 pea %a2@(48) 596b4: 4eb9 0005 da58 jsr 5da58 <_Watchdog_Insert> if ( !ts->active ) { 596ba: 508f addql #8,%sp 596bc: 102a 007c moveb %a2@(124),%d0 596c0: 6600 ff2a bnew 595ec <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 596c4: 2f0a movel %a2,%sp@- 596c6: 4eba fbc0 jsr %pc@(59288 <_Timer_server_Reset_interval_system_watchdog>) 596ca: 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 ); } } 596cc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596d2: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 596d4: 4ef9 0005 c546 jmp 5c546 <_Thread_Enable_dispatch> delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 596da: 4282 clrl %d2 } first_watchdog->delta_interval = delta_interval; 596dc: 2342 0010 movel %d2,%a1@(16) 596e0: 60c4 bras 596a6 <_Timer_server_Schedule_operation_method+0x10a> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 596e2: d283 addl %d3,%d1 delta_interval += delta; 596e4: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 596e6: 2341 0010 movel %d1,%a1@(16) 596ea: 6000 ff50 braw 5963c <_Timer_server_Schedule_operation_method+0xa0> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 596ee: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 596f0: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED 596f4: 6000 ff46 braw 5963c <_Timer_server_Schedule_operation_method+0xa0><== NOT EXECUTED =============================================================================== 00049942 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49942: 4e56 fff0 linkw %fp,#-16 49946: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4994a: 242e 0008 movel %fp@(8),%d2 4994e: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 49952: 2479 0005 fc5a moveal 5fc5a <_User_extensions_List+0x8>,%a2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49958: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 4995c: b5fc 0005 fc52 cmpal #392274,%a2 49962: 6726 beqs 4998a <_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 ); 49964: 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 ) 4996a: 206a 0030 moveal %a2@(48),%a0 4996e: 4a88 tstl %a0 49970: 670c beqs 4997e <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49972: 2f03 movel %d3,%sp@- 49974: 2f04 movel %d4,%sp@- 49976: 2f02 movel %d2,%sp@- 49978: 4e90 jsr %a0@ 4997a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 4997e: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 49982: b5fc 0005 fc52 cmpal #392274,%a2 49988: 66e0 bnes 4996a <_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 ); } } 4998a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 49990: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049800 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 49800: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49804: 203c 0005 fc56 movel #392278,%d0 4980a: 23c0 0005 fc52 movel %d0,5fc52 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 49810: 203c 0005 fc52 movel #392274,%d0 49816: 23c0 0005 fc5a movel %d0,5fc5a <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4981c: 203c 0005 fae4 movel #391908,%d0 49822: 23c0 0005 fae0 movel %d0,5fae0 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 49828: 203c 0005 fae0 movel #391904,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4982e: 42b9 0005 fc56 clrl 5fc56 <_User_extensions_List+0x4> 49834: 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; 49838: 2439 0005 e35a movel 5e35a ,%d2 initial_extensions = Configuration.User_extension_table; 4983e: 2639 0005 e35e movel 5e35e ,%d3 49844: 42b9 0005 fae4 clrl 5fae4 <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 4984a: 23c0 0005 fae8 movel %d0,5fae8 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 49850: 4a83 tstl %d3 49852: 6764 beqs 498b8 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 49854: 7834 moveq #52,%d4 49856: 4c02 4800 mulsl %d2,%d4 4985a: 2f04 movel %d4,%sp@- 4985c: 4eb9 0004 9db6 jsr 49db6 <_Workspace_Allocate_or_fatal_error> 49862: 2440 moveal %d0,%a2 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 49864: 2f04 movel %d4,%sp@- 49866: 42a7 clrl %sp@- 49868: 2f00 movel %d0,%sp@- 4986a: 4eb9 0004 f310 jsr 4f310 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49870: 4fef 0010 lea %sp@(16),%sp 49874: 4a82 tstl %d2 49876: 6740 beqs 498b8 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN 49878: 4284 clrl %d4 4987a: 47f9 0004 ceac lea 4ceac <_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; 49880: 2043 moveal %d3,%a0 49882: 5284 addql #1,%d4 49884: 0683 0000 0020 addil #32,%d3 4988a: 2558 0014 movel %a0@+,%a2@(20) 4988e: 2558 0018 movel %a0@+,%a2@(24) 49892: 2558 001c movel %a0@+,%a2@(28) 49896: 2558 0020 movel %a0@+,%a2@(32) 4989a: 2558 0024 movel %a0@+,%a2@(36) 4989e: 2558 0028 movel %a0@+,%a2@(40) 498a2: 2558 002c movel %a0@+,%a2@(44) 498a6: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 498aa: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 498ac: 45ea 0034 lea %a2@(52),%a2 498b0: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 498b2: 588f addql #4,%sp 498b4: b882 cmpl %d2,%d4 498b6: 65c8 bcss 49880 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 498b8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 498be: 4e5e unlk %fp ... =============================================================================== 000498c4 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 498c4: 4e56 0000 linkw %fp,#0 498c8: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 498ca: 2479 0005 fc52 moveal 5fc52 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 498d0: 2f02 movel %d2,%sp@- 498d2: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 498d6: b5fc 0005 fc56 cmpal #392278,%a2 498dc: 6718 beqs 498f6 <_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 ) 498de: 206a 0028 moveal %a2@(40),%a0 498e2: 4a88 tstl %a0 498e4: 6706 beqs 498ec <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 498e6: 2f02 movel %d2,%sp@- 498e8: 4e90 jsr %a0@ 498ea: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 498ec: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 498ee: b5fc 0005 fc56 cmpal #392278,%a2 498f4: 66e8 bnes 498de <_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 ); } } 498f6: 242e fff8 movel %fp@(-8),%d2 498fa: 246e fffc moveal %fp@(-4),%a2 498fe: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049994 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 49994: 4e56 0000 linkw %fp,#0 49998: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 4999a: 2479 0005 fc52 moveal 5fc52 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 499a0: 2f02 movel %d2,%sp@- 499a2: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 499a6: b5fc 0005 fc56 cmpal #392278,%a2 499ac: 6722 beqs 499d0 <_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 ) { 499ae: 206a 0014 moveal %a2@(20),%a0 499b2: 4a88 tstl %a0 499b4: 6710 beqs 499c6 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 499b6: 2f02 movel %d2,%sp@- 499b8: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 499be: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 499c0: 508f addql #8,%sp 499c2: 4a00 tstb %d0 499c4: 6718 beqs 499de <_User_extensions_Thread_create+0x4a> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 499c6: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 499c8: b5fc 0005 fc56 cmpal #392278,%a2 499ce: 66de bnes 499ae <_User_extensions_Thread_create+0x1a> return false; } } return true; } 499d0: 242e fff8 movel %fp@(-8),%d2 499d4: 246e fffc moveal %fp@(-4),%a2 499d8: 4e5e unlk %fp if ( !status ) return false; } } return true; 499da: 7001 moveq #1,%d0 } 499dc: 4e75 rts 499de: 242e fff8 movel %fp@(-8),%d2 499e2: 246e fffc moveal %fp@(-4),%a2 499e6: 4e5e unlk %fp status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 499e8: 4200 clrb %d0 <== NOT EXECUTED } } return true; } =============================================================================== 000499ec <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 499ec: 4e56 0000 linkw %fp,#0 499f0: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 499f2: 2479 0005 fc5a moveal 5fc5a <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 499f8: 2f02 movel %d2,%sp@- 499fa: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 499fe: b5fc 0005 fc52 cmpal #392274,%a2 49a04: 6720 beqs 49a26 <_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 ) 49a06: 206a 0020 moveal %a2@(32),%a0 49a0a: 4a88 tstl %a0 49a0c: 670c beqs 49a1a <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 49a0e: 2f02 movel %d2,%sp@- 49a10: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 49a16: 4e90 jsr %a0@ 49a18: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49a1a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 49a1e: b5fc 0005 fc52 cmpal #392274,%a2 49a24: 66e0 bnes 49a06 <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 49a26: 242e fff8 movel %fp@(-8),%d2 49a2a: 246e fffc moveal %fp@(-4),%a2 49a2e: 4e5e unlk %fp ... =============================================================================== 00049902 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 49902: 4e56 0000 linkw %fp,#0 49906: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 49908: 2479 0005 fc5a moveal 5fc5a <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 4990e: 2f02 movel %d2,%sp@- 49910: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 49914: b5fc 0005 fc52 cmpal #392274,%a2 4991a: 671a beqs 49936 <_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 ) 4991c: 206a 002c moveal %a2@(44),%a0 49920: 4a88 tstl %a0 49922: 6706 beqs 4992a <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 49924: 2f02 movel %d2,%sp@- 49926: 4e90 jsr %a0@ 49928: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 4992a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 4992e: b5fc 0005 fc52 cmpal #392274,%a2 49934: 66e6 bnes 4991c <_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 ); } } 49936: 242e fff8 movel %fp@(-8),%d2 4993a: 246e fffc moveal %fp@(-4),%a2 4993e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a6d8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a6d8: 4e56 0000 linkw %fp,#0 4a6dc: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4a6de: 2479 0006 0bea moveal 60bea <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a6e4: 2f02 movel %d2,%sp@- 4a6e6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4a6ea: b5fc 0006 0bee cmpal #396270,%a2 4a6f0: 671e beqs 4a710 <_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 ) 4a6f2: 206a 001c moveal %a2@(28),%a0 4a6f6: 4a88 tstl %a0 4a6f8: 670c beqs 4a706 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 4a6fa: 2f02 movel %d2,%sp@- 4a6fc: 2f39 0006 0f04 movel 60f04 <_Per_CPU_Information+0xc>,%sp@- 4a702: 4e90 jsr %a0@ 4a704: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 4a706: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4a708: b5fc 0006 0bee cmpal #396270,%a2 4a70e: 66e2 bnes 4a6f2 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 4a710: 242e fff8 movel %fp@(-8),%d2 4a714: 246e fffc moveal %fp@(-4),%a2 4a718: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a34 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 49a34: 4e56 0000 linkw %fp,#0 49a38: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49a3a: 2479 0005 fc52 moveal 5fc52 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 49a40: 2f02 movel %d2,%sp@- 49a42: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49a46: b5fc 0005 fc56 cmpal #392278,%a2 49a4c: 671e beqs 49a6c <_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 ) 49a4e: 206a 0018 moveal %a2@(24),%a0 49a52: 4a88 tstl %a0 49a54: 670c beqs 49a62 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 49a56: 2f02 movel %d2,%sp@- 49a58: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 49a5e: 4e90 jsr %a0@ 49a60: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49a62: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49a64: b5fc 0005 fc56 cmpal #392278,%a2 49a6a: 66e2 bnes 49a4e <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 49a6c: 242e fff8 movel %fp@(-8),%d2 49a70: 246e fffc moveal %fp@(-4),%a2 49a74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a78 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 49a78: 4e56 fff4 linkw %fp,#-12 49a7c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49a80: 262e 0008 movel %fp@(8),%d3 49a84: 242e 000c movel %fp@(12),%d2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 49a88: 2479 0005 fae0 moveal 5fae0 <_User_extensions_Switches_list>,%a2 49a8e: b5fc 0005 fae4 cmpal #391908,%a2 49a94: 6716 beqs 49aac <_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 ); 49a96: 2f02 movel %d2,%sp@- 49a98: 2f03 movel %d3,%sp@- 49a9a: 206a 0008 moveal %a2@(8),%a0 49a9e: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 49aa0: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 49aa2: 508f addql #8,%sp 49aa4: b5fc 0005 fae4 cmpal #391908,%a2 49aaa: 66ea bnes 49a96 <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 49aac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49ab2: 4e5e unlk %fp ... =============================================================================== 0004b754 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b754: 4e56 ffe8 linkw %fp,#-24 4b758: 226e 000c moveal %fp@(12),%a1 4b75c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4b760: 283c 0000 0700 movel #1792,%d4 4b766: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b768: 266e 0008 moveal %fp@(8),%a3 4b76c: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4b770: 40c1 movew %sr,%d1 4b772: 8081 orl %d1,%d0 4b774: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b776: 244b moveal %a3,%a2 4b778: 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 ) ) { 4b77a: b5c8 cmpal %a0,%a2 4b77c: 6748 beqs 4b7c6 <_Watchdog_Adjust+0x72> switch ( direction ) { 4b77e: 4a89 tstl %a1 4b780: 6650 bnes 4b7d2 <_Watchdog_Adjust+0x7e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b782: 4a82 tstl %d2 4b784: 6740 beqs 4b7c6 <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b786: 2628 0010 movel %a0@(16),%d3 4b78a: 49f9 0004 b9d0 lea 4b9d0 <_Watchdog_Tickle>,%a4 4b790: b682 cmpl %d2,%d3 4b792: 622c bhis 4b7c0 <_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; 4b794: 7001 moveq #1,%d0 4b796: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4b79a: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4b79c: 2f0b movel %a3,%sp@- 4b79e: 4e94 jsr %a4@ _ISR_Disable( level ); 4b7a0: 2004 movel %d4,%d0 4b7a2: 40c1 movew %sr,%d1 4b7a4: 8081 orl %d1,%d0 4b7a6: 46c0 movew %d0,%sr if ( _Chain_Is_empty( header ) ) 4b7a8: 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; 4b7aa: 9483 subl %d3,%d2 4b7ac: 2013 movel %a3@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 4b7ae: 2040 moveal %d0,%a0 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4b7b0: b08a cmpl %a2,%d0 4b7b2: 6712 beqs 4b7c6 <_Watchdog_Adjust+0x72> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b7b4: 4a82 tstl %d2 4b7b6: 670e beqs 4b7c6 <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b7b8: 2628 0010 movel %a0@(16),%d3 4b7bc: b483 cmpl %d3,%d2 4b7be: 64d4 bccs 4b794 <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4b7c0: 9682 subl %d2,%d3 4b7c2: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4b7c6: 46c1 movew %d1,%sr } 4b7c8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b7ce: 4e5e unlk %fp 4b7d0: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4b7d2: 7001 moveq #1,%d0 4b7d4: b089 cmpl %a1,%d0 4b7d6: 66ee bnes 4b7c6 <_Watchdog_Adjust+0x72> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4b7d8: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4b7dc: 46c1 movew %d1,%sr } 4b7de: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b7e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049ab8 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 49ab8: 4e56 ffec linkw %fp,#-20 49abc: 226e 000c moveal %fp@(12),%a1 49ac0: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49ac4: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 49ac8: 2a3c 0000 0700 movel #1792,%d5 49ace: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 49ad0: 2839 0005 ff68 movel 5ff68 <_Per_CPU_Information+0x8>,%d4 _ISR_Disable( level ); 49ad6: 40c3 movew %sr,%d3 49ad8: 8083 orl %d3,%d0 49ada: 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 ) { 49adc: 4aa9 0008 tstl %a1@(8) 49ae0: 6600 00c6 bnew 49ba8 <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 49ae4: 2039 0005 fc04 movel 5fc04 <_Watchdog_Sync_count>,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 49aea: 7201 moveq #1,%d1 _Watchdog_Sync_count++; 49aec: 5280 addql #1,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 49aee: 2341 0008 movel %d1,%a1@(8) _Watchdog_Sync_count++; 49af2: 23c0 0005 fc04 movel %d0,5fc04 <_Watchdog_Sync_count> restart: delta_interval = the_watchdog->initial; 49af8: 2029 000c movel %a1@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 49afc: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 49afe: 6764 beqs 49b64 <_Watchdog_Insert+0xac> 49b00: 4a90 tstl %a0@ 49b02: 6760 beqs 49b64 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 49b04: 2228 0010 movel %a0@(16),%d1 49b08: b280 cmpl %d0,%d1 49b0a: 6252 bhis 49b5e <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 49b0c: 2405 movel %d5,%d2 49b0e: 46c3 movew %d3,%sr 49b10: 8483 orl %d3,%d2 49b12: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 49b14: 7401 moveq #1,%d2 49b16: b4a9 0008 cmpl %a1@(8),%d2 49b1a: 666e bnes 49b8a <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49b1c: 2439 0005 fb82 movel 5fb82 <_Watchdog_Sync_level>,%d2 49b22: b484 cmpl %d4,%d2 49b24: 6230 bhis 49b56 <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 49b26: 9081 subl %d1,%d0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 49b28: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 49b2a: 4a80 tstl %d0 49b2c: 6736 beqs 49b64 <_Watchdog_Insert+0xac> 49b2e: 4a90 tstl %a0@ 49b30: 6732 beqs 49b64 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 49b32: 2228 0010 movel %a0@(16),%d1 49b36: b081 cmpl %d1,%d0 49b38: 6524 bcss 49b5e <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 49b3a: 2405 movel %d5,%d2 49b3c: 46c3 movew %d3,%sr 49b3e: 8483 orl %d3,%d2 49b40: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 49b42: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 49b44: 7201 moveq #1,%d1 49b46: b2a9 0008 cmpl %a1@(8),%d1 49b4a: 663e bnes 49b8a <_Watchdog_Insert+0xd2> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49b4c: 2239 0005 fb82 movel 5fb82 <_Watchdog_Sync_level>,%d1 49b52: b284 cmpl %d4,%d1 49b54: 63d2 blss 49b28 <_Watchdog_Insert+0x70> <== ALWAYS TAKEN _Watchdog_Sync_level = insert_isr_nest_level; 49b56: 23c4 0005 fb82 movel %d4,5fb82 <_Watchdog_Sync_level> goto restart; 49b5c: 609a bras 49af8 <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 49b5e: 9280 subl %d0,%d1 49b60: 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 ); 49b64: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 49b68: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 49b6a: 2450 moveal %a0@,%a2 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 49b6c: 2340 0010 movel %d0,%a1@(16) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 49b70: 2039 0005 fc08 movel 5fc08 <_Watchdog_Ticks_since_boot>,%d0 49b76: 2342 0008 movel %d2,%a1@(8) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 49b7a: 2348 0004 movel %a0,%a1@(4) before_node = after_node->next; after_node->next = the_node; 49b7e: 2089 movel %a1,%a0@ the_node->next = before_node; before_node->previous = the_node; 49b80: 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; 49b84: 228a movel %a2,%a1@ 49b86: 2340 0014 movel %d0,%a1@(20) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 49b8a: 23c4 0005 fb82 movel %d4,5fb82 <_Watchdog_Sync_level> _Watchdog_Sync_count--; 49b90: 2039 0005 fc04 movel 5fc04 <_Watchdog_Sync_count>,%d0 49b96: 5380 subql #1,%d0 49b98: 23c0 0005 fc04 movel %d0,5fc04 <_Watchdog_Sync_count> _ISR_Enable( level ); 49b9e: 46c3 movew %d3,%sr } 49ba0: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49ba4: 4e5e unlk %fp 49ba6: 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 ); 49ba8: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 49baa: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49bae: 4e5e unlk %fp ... =============================================================================== 00049c00 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 49c00: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 49c06: 4e56 0000 linkw %fp,#0 49c0a: 206e 0008 moveal %fp@(8),%a0 49c0e: 2f0a movel %a2,%sp@- 49c10: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 49c12: 40c1 movew %sr,%d1 49c14: 8081 orl %d1,%d0 49c16: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 49c18: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 49c1c: 7401 moveq #1,%d2 49c1e: b480 cmpl %d0,%d2 49c20: 6764 beqs 49c86 <_Watchdog_Remove+0x86> 49c22: 6314 blss 49c38 <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49c24: 2279 0005 fc08 moveal 5fc08 <_Watchdog_Ticks_since_boot>,%a1 49c2a: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49c2e: 46c1 movew %d1,%sr return( previous_state ); } 49c30: 241f movel %sp@+,%d2 49c32: 245f moveal %sp@+,%a2 49c34: 4e5e unlk %fp 49c36: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 49c38: 143c 0003 moveb #3,%d2 49c3c: b480 cmpl %d0,%d2 49c3e: 65e4 bcss 49c24 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 49c40: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 49c42: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 49c46: 4a91 tstl %a1@ 49c48: 6708 beqs 49c52 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 49c4a: 2428 0010 movel %a0@(16),%d2 49c4e: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 49c52: 2479 0005 fc04 moveal 5fc04 <_Watchdog_Sync_count>,%a2 49c58: 4a8a tstl %a2 49c5a: 670c beqs 49c68 <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 49c5c: 45f9 0005 ff68 lea 5ff68 <_Per_CPU_Information+0x8>,%a2 49c62: 23d2 0005 fb82 movel %a2@,5fb82 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 49c68: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 49c6c: 234a 0004 movel %a2,%a1@(4) previous->next = next; 49c70: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49c72: 2279 0005 fc08 moveal 5fc08 <_Watchdog_Ticks_since_boot>,%a1 49c78: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49c7c: 46c1 movew %d1,%sr return( previous_state ); } 49c7e: 241f movel %sp@+,%d2 49c80: 245f moveal %sp@+,%a2 49c82: 4e5e unlk %fp 49c84: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49c86: 2279 0005 fc08 moveal 5fc08 <_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; 49c8c: 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; 49c90: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49c94: 46c1 movew %d1,%sr return( previous_state ); } 49c96: 241f movel %sp@+,%d2 49c98: 245f moveal %sp@+,%a2 49c9a: 4e5e unlk %fp ... =============================================================================== 0004b0fc <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b0fc: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4b102: 4e56 ffe8 linkw %fp,#-24 4b106: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b10a: 242e 0008 movel %fp@(8),%d2 4b10e: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b112: 40c3 movew %sr,%d3 4b114: 8083 orl %d3,%d0 4b116: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4b118: 2f0b movel %a3,%sp@- 4b11a: 4bf9 0004 4928 lea 44928 ,%a5 4b120: 2f02 movel %d2,%sp@- 4b122: 4879 0005 f4cc pea 5f4cc <_Status_Object_name_errors_to_status+0x14> 4b128: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b12a: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4b12c: 4fef 000c lea %sp@(12),%sp 4b130: b7ca cmpal %a2,%a3 4b132: 672c beqs 4b160 <_Watchdog_Report_chain+0x64> 4b134: 49f9 0004 b178 lea 4b178 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4b13a: 2f0a movel %a2,%sp@- 4b13c: 42a7 clrl %sp@- 4b13e: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 4b140: 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 = header->first ; 4b142: 508f addql #8,%sp 4b144: b7ca cmpal %a2,%a3 4b146: 66f2 bnes 4b13a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4b148: 2f02 movel %d2,%sp@- 4b14a: 4879 0005 f4e3 pea 5f4e3 <_Status_Object_name_errors_to_status+0x2b> 4b150: 4e95 jsr %a5@ 4b152: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4b154: 46c3 movew %d3,%sr } 4b156: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b15c: 4e5e unlk %fp 4b15e: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4b160: 4879 0005 f4f2 pea 5f4f2 <_Status_Object_name_errors_to_status+0x3a> 4b166: 4e95 jsr %a5@ 4b168: 588f addql #4,%sp } _ISR_Enable( level ); 4b16a: 46c3 movew %d3,%sr } 4b16c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b172: 4e5e unlk %fp ... =============================================================================== 00049ca0 <_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 ); 49ca0: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 49ca6: 4e56 ffe8 linkw %fp,#-24 49caa: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49cae: 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 ); 49cb2: 40c2 movew %sr,%d2 49cb4: 8082 orl %d2,%d0 49cb6: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 49cb8: 264c moveal %a4,%a3 49cba: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 49cbc: b7ca cmpal %a2,%a3 49cbe: 673e beqs 49cfe <_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) { 49cc0: 202a 0010 movel %a2@(16),%d0 49cc4: 4bf9 0004 9c00 lea 49c00 <_Watchdog_Remove>,%a5 49cca: 6708 beqs 49cd4 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 49ccc: 5380 subql #1,%d0 49cce: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 49cd2: 662a bnes 49cfe <_Watchdog_Tickle+0x5e> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49cd4: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 49cda: 2f0a movel %a2,%sp@- 49cdc: 4e95 jsr %a5@ _ISR_Enable( level ); 49cde: 46c2 movew %d2,%sr switch( watchdog_state ) { 49ce0: 7202 moveq #2,%d1 49ce2: 588f addql #4,%sp 49ce4: b280 cmpl %d0,%d1 49ce6: 6722 beqs 49d0a <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49ce8: 2003 movel %d3,%d0 49cea: 40c2 movew %sr,%d2 49cec: 8082 orl %d2,%d0 49cee: 46c0 movew %d0,%sr } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 49cf0: 2014 movel %a4@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49cf2: 2440 moveal %d0,%a2 _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 49cf4: b7c0 cmpal %d0,%a3 49cf6: 6706 beqs 49cfe <_Watchdog_Tickle+0x5e> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 49cf8: 4aaa 0010 tstl %a2@(16) 49cfc: 67dc beqs 49cda <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 49cfe: 46c2 movew %d2,%sr } 49d00: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49d06: 4e5e unlk %fp 49d08: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 49d0a: 2f2a 0024 movel %a2@(36),%sp@- 49d0e: 2f2a 0020 movel %a2@(32),%sp@- 49d12: 206a 001c moveal %a2@(28),%a0 49d16: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 49d18: 508f addql #8,%sp 49d1a: 60cc bras 49ce8 <_Watchdog_Tickle+0x48> =============================================================================== 00049db6 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 49db6: 4e56 0000 linkw %fp,#0 49dba: 42a7 clrl %sp@- 49dbc: 42a7 clrl %sp@- 49dbe: 2f2e 0008 movel %fp@(8),%sp@- 49dc2: 4879 0005 fafa pea 5fafa <_Workspace_Area> 49dc8: 4eb9 0004 c78c jsr 4c78c <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 49dce: 4fef 0010 lea %sp@(16),%sp 49dd2: 4a80 tstl %d0 49dd4: 6704 beqs 49dda <_Workspace_Allocate_or_fatal_error+0x24> true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 49dd6: 4e5e unlk %fp 49dd8: 4e75 rts memory ); #endif if ( memory == NULL ) _Internal_error_Occurred( 49dda: 4878 0003 pea 3 49dde: 4878 0001 pea 1 49de2: 42a7 clrl %sp@- 49de4: 4eb9 0004 7a24 jsr 47a24 <_Internal_error_Occurred> ... =============================================================================== 0005bf04 <_kill_r>: int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5bf04: 4e56 0000 linkw %fp,#0 return killinfo( pid, sig, NULL ); 5bf08: 2d6e 000c 0008 movel %fp@(12),%fp@(8) int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5bf0e: 202e 0010 movel %fp@(16),%d0 return killinfo( pid, sig, NULL ); 5bf12: 42ae 0010 clrl %fp@(16) 5bf16: 2d40 000c movel %d0,%fp@(12) } 5bf1a: 4e5e unlk %fp struct _reent *ptr, pid_t pid, int sig ) { return killinfo( pid, sig, NULL ); 5bf1c: 4ef9 0005 c0f4 jmp 5c0f4 ... =============================================================================== 000466f0 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 466f0: 4e56 ffec linkw %fp,#-20 466f4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 466f8: 246e 0008 moveal %fp@(8),%a2 466fc: 266e 000c moveal %fp@(12),%a3 long adjustment; /* * Simple validations */ if ( !delta ) 46700: 4a8a tstl %a2 46702: 6700 00ec beqw 467f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 46706: 202a 0004 movel %a2@(4),%d0 4670a: 0c80 000f 423f cmpil #999999,%d0 46710: 6200 00de bhiw 467f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 46714: 4a8b tstl %a3 46716: 670a beqs 46722 olddelta->tv_sec = 0; olddelta->tv_usec = 0; 46718: 42ab 0004 clrl %a3@(4) 4671c: 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; 46720: 4293 clrl %a3@ olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 46722: 223c 000f 4240 movel #1000000,%d1 46728: 4c12 1800 mulsl %a2@,%d1 adjustment += delta->tv_usec; 4672c: d081 addl %d1,%d0 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 4672e: b0b9 0005 fa80 cmpl 5fa80 ,%d0 46734: 640c bccs 46742 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; 46736: 4280 clrl %d0 } 46738: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 4673e: 4e5e unlk %fp 46740: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46742: 2039 0006 1354 movel 61354 <_Thread_Dispatch_disable_level>,%d0 46748: 5280 addql #1,%d0 4674a: 23c0 0006 1354 movel %d0,61354 <_Thread_Dispatch_disable_level> * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 46750: 240e movel %fp,%d2 46752: 5182 subql #8,%d2 46754: 2f02 movel %d2,%sp@- 46756: 4eb9 0004 80a8 jsr 480a8 <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 4675c: 202a 0004 movel %a2@(4),%d0 46760: 223c 0000 03e8 movel #1000,%d1 46766: 4c01 0800 mulsl %d1,%d0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4676a: 588f addql #4,%sp _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 4676c: 2212 movel %a2@,%d1 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 4676e: d0ae fffc addl %fp@(-4),%d0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 46772: d3ae fff8 addl %d1,%fp@(-8) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 46776: 2d40 fffc movel %d0,%fp@(-4) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4677a: 0c80 3b9a c9ff cmpil #999999999,%d0 46780: 631c blss 4679e 46782: 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( 46786: 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; 46788: 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 ) { 4678e: 0c80 3b9a c9ff cmpil #999999999,%d0 46794: 62f0 bhis 46786 <== NEVER TAKEN 46796: 2d40 fffc movel %d0,%fp@(-4) 4679a: 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) ) { 4679e: 0c80 c465 3600 cmpil #-1000000000,%d0 467a4: 621c bhis 467c2 <== NEVER TAKEN 467a6: 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( 467aa: 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; 467ac: 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) ) { 467b2: 0c80 c465 3600 cmpil #-1000000000,%d0 467b8: 63f0 blss 467aa 467ba: 2d40 fffc movel %d0,%fp@(-4) 467be: 2d41 fff8 movel %d1,%fp@(-8) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 467c2: 2f02 movel %d2,%sp@- 467c4: 4eb9 0004 8174 jsr 48174 <_TOD_Set> _Thread_Enable_dispatch(); 467ca: 4eb9 0004 945e jsr 4945e <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 467d0: 588f addql #4,%sp 467d2: 4a8b tstl %a3 467d4: 6700 ff60 beqw 46736 *olddelta = *delta; return 0; 467d8: 4280 clrl %d0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 467da: 2212 movel %a2@,%d1 467dc: 242a 0004 movel %a2@(4),%d2 467e0: 2681 movel %d1,%a3@ 467e2: 2742 0004 movel %d2,%a3@(4) return 0; } 467e6: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 467ec: 4e5e unlk %fp 467ee: 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 ); 467f0: 4eb9 0004 f6dc jsr 4f6dc <__errno> 467f6: 7216 moveq #22,%d1 467f8: 2040 moveal %d0,%a0 467fa: 70ff moveq #-1,%d0 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 467fc: 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 ); 46802: 2081 movel %d1,%a0@ /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 46804: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000485c4 : } unsigned int alarm( unsigned int seconds ) { 485c4: 4e56 fff4 linkw %fp,#-12 485c8: 48d7 001c moveml %d2-%d4,%sp@ 485cc: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 485d0: 4ab9 0006 49ec tstl 649ec <_POSIX_signals_Alarm_timer+0x1c> 485d6: 674e beqs 48626 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 485d8: 4879 0006 49d0 pea 649d0 <_POSIX_signals_Alarm_timer> 485de: 4eb9 0004 d764 jsr 4d764 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 485e4: 588f addql #4,%sp 485e6: 7201 moveq #1,%d1 485e8: 5580 subql #2,%d0 485ea: b280 cmpl %d0,%d1 485ec: 645e bccs 4864c unsigned int alarm( unsigned int seconds ) { unsigned int remaining = 0; 485ee: 4283 clrl %d3 remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 485f0: 4a82 tstl %d2 485f2: 660c bnes 48600 <== NEVER TAKEN _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 485f4: 2003 movel %d3,%d0 485f6: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 485fc: 4e5e unlk %fp 485fe: 4e75 rts ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 48600: 4879 0006 49d0 pea 649d0 <_POSIX_signals_Alarm_timer> 48606: 4879 0006 4d1a pea 64d1a <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4860c: 23c2 0006 49dc movel %d2,649dc <_POSIX_signals_Alarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 48612: 4eb9 0004 d61c jsr 4d61c <_Watchdog_Insert> 48618: 508f addql #8,%sp 4861a: 2003 movel %d3,%d0 4861c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48622: 4e5e unlk %fp 48624: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 48626: 42b9 0006 49d8 clrl 649d8 <_POSIX_signals_Alarm_timer+0x8> unsigned int alarm( unsigned int seconds ) { unsigned int remaining = 0; 4862c: 4283 clrl %d3 the_watchdog->routine = routine; 4862e: 203c 0004 85a8 movel #296360,%d0 the_watchdog->id = id; 48634: 42b9 0006 49f0 clrl 649f0 <_POSIX_signals_Alarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4863a: 23c0 0006 49ec movel %d0,649ec <_POSIX_signals_Alarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 48640: 42b9 0006 49f4 clrl 649f4 <_POSIX_signals_Alarm_timer+0x24> remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 48646: 4a82 tstl %d2 48648: 67aa beqs 485f4 <== NEVER TAKEN 4864a: 60b4 bras 48600 * 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); 4864c: 2839 0006 49e8 movel 649e8 <_POSIX_signals_Alarm_timer+0x18>,%d4 48652: 98b9 0006 49e4 subl 649e4 <_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 - 48658: 2639 0006 49dc movel 649dc <_POSIX_signals_Alarm_timer+0xc>,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 4865e: 4eb9 0004 b0b8 jsr 4b0b8 48664: 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 - 48668: 9684 subl %d4,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 4866a: 4a82 tstl %d2 4866c: 6786 beqs 485f4 <== NEVER TAKEN 4866e: 6090 bras 48600 =============================================================================== 0004655c : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 4655c: 4e56 0000 linkw %fp,#0 46560: 202e 0008 movel %fp@(8),%d0 46564: 222e 000c movel %fp@(12),%d1 46568: 2f02 movel %d2,%sp@- if ( !tp ) 4656a: 4a81 tstl %d1 4656c: 6718 beqs 46586 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 4656e: 7401 moveq #1,%d2 46570: b480 cmpl %d0,%d2 46572: 6752 beqs 465c6 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 46574: 7404 moveq #4,%d2 46576: b480 cmpl %d0,%d2 46578: 6738 beqs 465b2 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 4657a: 7402 moveq #2,%d2 4657c: b480 cmpl %d0,%d2 4657e: 6732 beqs 465b2 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 46580: 7203 moveq #3,%d1 46582: b280 cmpl %d0,%d1 46584: 6716 beqs 4659c rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 46586: 4eb9 0004 fc64 jsr 4fc64 <__errno> return 0; } 4658c: 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 ); 46590: 2040 moveal %d0,%a0 46592: 7216 moveq #22,%d1 46594: 70ff moveq #-1,%d0 return 0; } 46596: 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 ); 46598: 2081 movel %d1,%a0@ return 0; } 4659a: 4e75 rts } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 4659c: 4eb9 0004 fc64 jsr 4fc64 <__errno> 465a2: 7458 moveq #88,%d2 465a4: 2040 moveal %d0,%a0 465a6: 70ff moveq #-1,%d0 465a8: 2082 movel %d2,%a0@ #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 465aa: 242e fffc movel %fp@(-4),%d2 465ae: 4e5e unlk %fp 465b0: 4e75 rts } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 465b2: 2f01 movel %d1,%sp@- 465b4: 4eb9 0004 86cc jsr 486cc <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 465ba: 242e fffc movel %fp@(-4),%d2 #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); return 0; 465be: 588f addql #4,%sp 465c0: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 465c2: 4e5e unlk %fp 465c4: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 465c6: 2f01 movel %d1,%sp@- 465c8: 4eb9 0004 8630 jsr 48630 <_TOD_Get> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 465ce: 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; 465d2: 588f addql #4,%sp 465d4: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 465d6: 4e5e unlk %fp ... =============================================================================== 000465dc : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 465dc: 4e56 0000 linkw %fp,#0 465e0: 202e 0008 movel %fp@(8),%d0 465e4: 206e 000c moveal %fp@(12),%a0 if ( !tp ) 465e8: 4a88 tstl %a0 465ea: 6712 beqs 465fe <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 465ec: 7201 moveq #1,%d1 465ee: b280 cmpl %d0,%d1 465f0: 6730 beqs 46622 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 465f2: 7202 moveq #2,%d1 465f4: b280 cmpl %d0,%d1 465f6: 6718 beqs 46610 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 465f8: 7203 moveq #3,%d1 465fa: b280 cmpl %d0,%d1 465fc: 6712 beqs 46610 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 465fe: 4eb9 0004 fc64 jsr 4fc64 <__errno> 46604: 7216 moveq #22,%d1 46606: 2040 moveal %d0,%a0 46608: 70ff moveq #-1,%d0 return 0; } 4660a: 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 ); 4660c: 2081 movel %d1,%a0@ return 0; } 4660e: 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 ); 46610: 4eb9 0004 fc64 jsr 4fc64 <__errno> 46616: 7258 moveq #88,%d1 46618: 2040 moveal %d0,%a0 4661a: 70ff moveq #-1,%d0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 4661c: 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 ); 4661e: 2081 movel %d1,%a0@ #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 46620: 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 ) 46622: 203c 21da e4ff movel #567993599,%d0 46628: b090 cmpl %a0@,%d0 4662a: 64d2 bccs 465fe rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4662c: 2039 0006 1b1c movel 61b1c <_Thread_Dispatch_disable_level>,%d0 46632: 5280 addql #1,%d0 46634: 23c0 0006 1b1c movel %d0,61b1c <_Thread_Dispatch_disable_level> rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 4663a: 2f08 movel %a0,%sp@- 4663c: 4eb9 0004 8724 jsr 48724 <_TOD_Set> _Thread_Enable_dispatch(); 46642: 4eb9 0004 9a0e jsr 49a0e <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 46648: 588f addql #4,%sp 4664a: 4280 clrl %d0 } 4664c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005c0f4 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 5c0f4: 4e56 ffc4 linkw %fp,#-60 5c0f8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5c0fc: 262e 000c movel %fp@(12),%d3 5c100: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 5c104: 4eb9 0005 bc28 jsr 5bc28 5c10a: b0ae 0008 cmpl %fp@(8),%d0 5c10e: 6600 0230 bnew 5c340 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 5c112: 4a83 tstl %d3 5c114: 6700 0242 beqw 5c358 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5c118: 2003 movel %d3,%d0 5c11a: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5c11c: 721f moveq #31,%d1 5c11e: b280 cmpl %d0,%d1 5c120: 6500 0236 bcsw 5c358 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 ) 5c124: 2c03 movel %d3,%d6 5c126: 2a03 movel %d3,%d5 5c128: 7201 moveq #1,%d1 5c12a: e98e lsll #4,%d6 5c12c: e58d lsll #2,%d5 5c12e: 2806 movel %d6,%d4 5c130: 9885 subl %d5,%d4 5c132: 2044 moveal %d4,%a0 5c134: d1fc 0005 ff82 addal #393090,%a0 5c13a: b290 cmpl %a0@,%d1 5c13c: 6700 01ee beqw 5c32c /* * 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 ) ) 5c140: 123c 0008 moveb #8,%d1 5c144: b283 cmpl %d3,%d1 5c146: 6700 00d2 beqw 5c21a 5c14a: 123c 0004 moveb #4,%d1 5c14e: b283 cmpl %d3,%d1 5c150: 6700 00c8 beqw 5c21a 5c154: 123c 000b moveb #11,%d1 5c158: b283 cmpl %d3,%d1 5c15a: 6700 00be beqw 5c21a static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 5c15e: 7401 moveq #1,%d2 5c160: e1aa lsll %d0,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 5c162: 7001 moveq #1,%d0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 5c164: 2d43 fff4 movel %d3,%fp@(-12) siginfo->si_code = SI_USER; 5c168: 2d40 fff8 movel %d0,%fp@(-8) if ( !value ) { 5c16c: 4a8a tstl %a2 5c16e: 6700 01c8 beqw 5c338 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 5c172: 2d52 fffc movel %a2@,%fp@(-4) 5c176: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 5c17c: 5280 addql #1,%d0 5c17e: 23c0 0005 fadc movel %d0,5fadc <_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; 5c184: 2879 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a4 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 5c18a: 206c 010e moveal %a4@(270),%a0 5c18e: 2028 00cc movel %a0@(204),%d0 5c192: 4680 notl %d0 5c194: c082 andl %d2,%d0 5c196: 6642 bnes 5c1da /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 5c198: 2079 0006 0106 moveal 60106 <_POSIX_signals_Wait_queue>,%a0 5c19e: b1fc 0006 010a cmpal #393482,%a0 5c1a4: 6700 00d6 beqw 5c27c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5c1a8: 2002 movel %d2,%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 5c1aa: 2848 moveal %a0,%a4 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5c1ac: c0a8 0030 andl %a0@(48),%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5c1b0: 2268 010e moveal %a0@(270),%a1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5c1b4: 6624 bnes 5c1da /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 5c1b6: 2029 00cc movel %a1@(204),%d0 5c1ba: 4680 notl %d0 5c1bc: c082 andl %d2,%d0 5c1be: 661a bnes 5c1da the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 5c1c0: 2050 moveal %a0@,%a0 the_thread = (Thread_Control *)the_node; 5c1c2: 2848 moveal %a0,%a4 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 5c1c4: b1fc 0006 010a cmpal #393482,%a0 5c1ca: 6700 00b0 beqw 5c27c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5c1ce: 2002 movel %d2,%d0 <== NOT EXECUTED 5c1d0: c0a8 0030 andl %a0@(48),%d0 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5c1d4: 2268 010e moveal %a0@(270),%a1 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5c1d8: 67dc beqs 5c1b6 <== 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 ) ) { 5c1da: 486e fff4 pea %fp@(-12) 5c1de: 2f03 movel %d3,%sp@- 5c1e0: 2f0c movel %a4,%sp@- 5c1e2: 4eb9 0005 c3b0 jsr 5c3b0 <_POSIX_signals_Unblock_thread> 5c1e8: 4fef 000c lea %sp@(12),%sp 5c1ec: 4a00 tstb %d0 5c1ee: 6618 bnes 5c208 /* * 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 ); 5c1f0: 2f02 movel %d2,%sp@- 5c1f2: 4eb9 0005 c390 jsr 5c390 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 5c1f8: 588f addql #4,%sp 5c1fa: 41f9 0005 ff7a lea 5ff7a <_POSIX_signals_Vectors>,%a0 5c200: 7002 moveq #2,%d0 5c202: b0b0 4800 cmpl %a0@(00000000,%d4:l),%d0 5c206: 672e beqs 5c236 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 5c208: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> return 0; 5c20e: 4280 clrl %d0 } 5c210: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c216: 4e5e unlk %fp 5c218: 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 ); 5c21a: 4eb9 0005 c5c0 jsr 5c5c0 5c220: 2f03 movel %d3,%sp@- 5c222: 2f00 movel %d0,%sp@- 5c224: 4eb9 0005 c4e8 jsr 5c4e8 5c22a: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5c22c: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c232: 4e5e unlk %fp 5c234: 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 ); 5c236: 4879 0006 00fa pea 600fa <_POSIX_signals_Inactive_siginfo> 5c23c: 4eb9 0004 70f8 jsr 470f8 <_Chain_Get> if ( !psiginfo ) { 5c242: 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 ); 5c244: 2040 moveal %d0,%a0 if ( !psiginfo ) { 5c246: 4a80 tstl %d0 5c248: 6700 0126 beqw 5c370 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5c24c: 9c85 subl %d5,%d6 5c24e: 0686 0006 0172 addil #393586,%d6 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 5c254: 216e fff4 0008 movel %fp@(-12),%a0@(8) 5c25a: 216e fff8 000c movel %fp@(-8),%a0@(12) 5c260: 216e fffc 0010 movel %fp@(-4),%a0@(16) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5c266: 2f00 movel %d0,%sp@- 5c268: 2f06 movel %d6,%sp@- 5c26a: 4eb9 0004 7098 jsr 47098 <_Chain_Append> 5c270: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 5c272: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> return 0; 5c278: 4280 clrl %d0 5c27a: 6094 bras 5c210 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 5c27c: 4287 clrl %d7 5c27e: 1e39 0005 e322 moveb 5e322 ,%d7 5c284: 47f9 0005 faa0 lea 5faa0 <_Objects_Information_table+0x8>,%a3 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 5c28a: 99cc subal %a4,%a4 interested_priority = PRIORITY_MAXIMUM + 1; 5c28c: 5287 addql #1,%d7 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 ] ) 5c28e: 205b moveal %a3@+,%a0 5c290: 4a88 tstl %a0 5c292: 676e beqs 5c302 <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 5c294: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 5c298: 4281 clrl %d1 5c29a: 3228 000e movew %a0@(14),%d1 object_table = the_info->local_table; 5c29e: 2268 0018 moveal %a0@(24),%a1 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 5c2a2: 2441 moveal %d1,%a2 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5c2a4: 4a8a tstl %a2 5c2a6: 675a beqs 5c302 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 5c2a8: 5889 addql #4,%a1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5c2aa: 7001 moveq #1,%d0 5c2ac: 2d43 ffec movel %d3,%fp@(-20) the_thread = (Thread_Control *) object_table[ index ]; 5c2b0: 2059 moveal %a1@+,%a0 if ( !the_thread ) 5c2b2: 4a88 tstl %a0 5c2b4: 6742 beqs 5c2f8 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 5c2b6: 2228 0014 movel %a0@(20),%d1 5c2ba: be81 cmpl %d1,%d7 5c2bc: 653a bcss 5c2f8 <== NEVER TAKEN #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 5c2be: 2a68 010e moveal %a0@(270),%a5 5c2c2: 262d 00cc movel %a5@(204),%d3 5c2c6: 4683 notl %d3 5c2c8: c682 andl %d2,%d3 5c2ca: 672c beqs 5c2f8 * * 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 ) { 5c2cc: be81 cmpl %d1,%d7 5c2ce: 6224 bhis 5c2f4 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 5c2d0: 2a6c 0010 moveal %a4@(16),%a5 5c2d4: 4a8d tstl %a5 5c2d6: 6720 beqs 5c2f8 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5c2d8: 2628 0010 movel %a0@(16),%d3 5c2dc: 2d43 fff0 movel %d3,%fp@(-16) 5c2e0: 6712 beqs 5c2f4 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 5c2e2: 260d movel %a5,%d3 5c2e4: 0803 001c btst #28,%d3 5c2e8: 660e bnes 5c2f8 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 5c2ea: 262e fff0 movel %fp@(-16),%d3 5c2ee: 0803 001c btst #28,%d3 5c2f2: 6704 beqs 5c2f8 */ if ( !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5c2f4: 2e01 movel %d1,%d7 5c2f6: 2848 moveal %a0,%a4 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5c2f8: 5280 addql #1,%d0 5c2fa: b08a cmpl %a2,%d0 5c2fc: 63b2 blss 5c2b0 5c2fe: 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++) { 5c302: b7fc 0005 faa8 cmpal #391848,%a3 5c308: 6684 bnes 5c28e } } } } if ( interested ) { 5c30a: 4a8c tstl %a4 5c30c: 6700 fee2 beqw 5c1f0 /* * 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 ) ) { 5c310: 486e fff4 pea %fp@(-12) 5c314: 2f03 movel %d3,%sp@- 5c316: 2f0c movel %a4,%sp@- 5c318: 4eb9 0005 c3b0 jsr 5c3b0 <_POSIX_signals_Unblock_thread> 5c31e: 4fef 000c lea %sp@(12),%sp 5c322: 4a00 tstb %d0 5c324: 6700 feca beqw 5c1f0 5c328: 6000 fede braw 5c208 <== 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; 5c32c: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5c32e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c334: 4e5e unlk %fp 5c336: 4e75 rts */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 5c338: 42ae fffc clrl %fp@(-4) 5c33c: 6000 fe38 braw 5c176 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 5c340: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5c346: 7603 moveq #3,%d3 5c348: 2040 moveal %d0,%a0 5c34a: 70ff moveq #-1,%d0 5c34c: 2083 movel %d3,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5c34e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c354: 4e5e unlk %fp 5c356: 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 ); 5c358: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5c35e: 7416 moveq #22,%d2 5c360: 2040 moveal %d0,%a0 5c362: 70ff moveq #-1,%d0 5c364: 2082 movel %d2,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5c366: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c36c: 4e5e unlk %fp 5c36e: 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(); 5c370: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 5c376: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5c37c: 720b moveq #11,%d1 5c37e: 2040 moveal %d0,%a0 5c380: 70ff moveq #-1,%d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5c382: 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 ); 5c388: 2081 movel %d1,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5c38a: 4e5e unlk %fp ... =============================================================================== 0004c7a4 : */ int mq_unlink( const char *name ) { 4c7a4: 4e56 fffc linkw %fp,#-4 4c7a8: 2039 0006 9838 movel 69838 <_Thread_Dispatch_disable_level>,%d0 4c7ae: 5280 addql #1,%d0 4c7b0: 2f0a movel %a2,%sp@- 4c7b2: 2f02 movel %d2,%sp@- 4c7b4: 23c0 0006 9838 movel %d0,69838 <_Thread_Dispatch_disable_level> register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4c7ba: 486e fffc pea %fp@(-4) 4c7be: 2f2e 0008 movel %fp@(8),%sp@- 4c7c2: 4eb9 0005 3438 jsr 53438 <_POSIX_Message_queue_Name_to_id> if ( status != 0 ) { 4c7c8: 508f addql #8,%sp register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4c7ca: 2400 movel %d0,%d2 if ( status != 0 ) { 4c7cc: 6644 bnes 4c812 <== NEVER TAKEN */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 4c7ce: 4280 clrl %d0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 4c7d0: 2079 0006 9b00 moveal 69b00 <_POSIX_Message_queue_Information+0x18>,%a0 4c7d6: 302e fffe movew %fp@(-2),%d0 4c7da: 2470 0c00 moveal %a0@(00000000,%d0:l:4),%a2 &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = false; 4c7de: 4200 clrb %d0 4c7e0: 1540 0015 moveb %d0,%a2@(21) RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove ( POSIX_Message_queue_Control *the_mq ) { _Objects_Namespace_remove( 4c7e4: 2f0a movel %a2,%sp@- 4c7e6: 4879 0006 9ae8 pea 69ae8 <_POSIX_Message_queue_Information> 4c7ec: 4eb9 0004 f9c8 jsr 4f9c8 <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 4c7f2: 2f0a movel %a2,%sp@- 4c7f4: 4eb9 0004 bfd8 jsr 4bfd8 <_POSIX_Message_queue_Delete> _Thread_Enable_dispatch(); 4c7fa: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch> return 0; } 4c800: 242e fff4 movel %fp@(-12),%d2 the_mq->linked = false; _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); _Thread_Enable_dispatch(); return 0; 4c804: 4fef 000c lea %sp@(12),%sp 4c808: 4280 clrl %d0 } 4c80a: 246e fff8 moveal %fp@(-8),%a2 4c80e: 4e5e unlk %fp 4c810: 4e75 rts _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); 4c812: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 4c818: 4eb9 0005 6a7c jsr 56a7c <__errno> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); _Thread_Enable_dispatch(); return 0; } 4c81e: 246e fff8 moveal %fp@(-8),%a2 _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); 4c822: 2040 moveal %d0,%a0 4c824: 70ff moveq #-1,%d0 4c826: 2082 movel %d2,%a0@ _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); _Thread_Enable_dispatch(); return 0; } 4c828: 242e fff4 movel %fp@(-12),%d2 4c82c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aa84 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 4aa84: 4e56 0000 linkw %fp,#0 4aa88: 206e 0008 moveal %fp@(8),%a0 4aa8c: 202e 000c movel %fp@(12),%d0 4aa90: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 4aa92: 4a88 tstl %a0 4aa94: 672e beqs 4aac4 4aa96: 4a90 tstl %a0@ 4aa98: 672a beqs 4aac4 return EINVAL; switch ( policy ) { 4aa9a: 7204 moveq #4,%d1 4aa9c: b280 cmpl %d0,%d1 4aa9e: 640c bccs 4aaac return 0; default: return ENOTSUP; } } 4aaa0: 241f movel %sp@+,%d2 case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 4aaa2: 203c 0000 0086 movel #134,%d0 } } 4aaa8: 4e5e unlk %fp 4aaaa: 4e75 rts ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 4aaac: 123c 0001 moveb #1,%d1 4aab0: 7417 moveq #23,%d2 4aab2: e1a9 lsll %d0,%d1 4aab4: c282 andl %d2,%d1 4aab6: 67e8 beqs 4aaa0 <== NEVER TAKEN return 0; default: return ENOTSUP; } } 4aab8: 241f movel %sp@+,%d2 4aaba: 4e5e unlk %fp switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 4aabc: 2140 0014 movel %d0,%a0@(20) return 0; 4aac0: 4280 clrl %d0 default: return ENOTSUP; } } 4aac2: 4e75 rts 4aac4: 241f movel %sp@+,%d2 pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 4aac6: 7016 moveq #22,%d0 return 0; default: return ENOTSUP; } } 4aac8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046a4c : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 46a4c: 4e56 ffe0 linkw %fp,#-32 46a50: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46a54: 246e 0008 moveal %fp@(8),%a2 46a58: 262e 000c movel %fp@(12),%d3 46a5c: 242e 0010 movel %fp@(16),%d2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 46a60: 4a8a tstl %a2 46a62: 677a beqs 46ade return EINVAL; if ( count == 0 ) 46a64: 4a82 tstl %d2 46a66: 6776 beqs 46ade return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 46a68: 4a83 tstl %d3 46a6a: 6700 0090 beqw 46afc 46a6e: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46a70: 4a90 tstl %a0@ 46a72: 676a beqs 46ade return EINVAL; switch ( the_attr->process_shared ) { 46a74: 4aa8 0004 tstl %a0@(4) 46a78: 6664 bnes 46ade <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46a7a: 2039 0006 1370 movel 61370 <_Thread_Dispatch_disable_level>,%d0 46a80: 5280 addql #1,%d0 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 46a82: 42ae fff8 clrl %fp@(-8) the_attributes.maximum_count = count; 46a86: 2d42 fffc movel %d2,%fp@(-4) 46a8a: 23c0 0006 1370 movel %d0,61370 <_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 ); 46a90: 4879 0006 1694 pea 61694 <_POSIX_Barrier_Information> 46a96: 4eb9 0004 8e60 jsr 48e60 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 46a9c: 588f addql #4,%sp 46a9e: 2640 moveal %d0,%a3 46aa0: 4a80 tstl %d0 46aa2: 6746 beqs 46aea _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 46aa4: 486e fff8 pea %fp@(-8) 46aa8: 486b 0010 pea %a3@(16) 46aac: 4eb9 0004 83dc jsr 483dc <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 46ab2: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 46ab6: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46ab8: 2079 0006 16ac moveal 616ac <_POSIX_Barrier_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 46abe: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46ac0: 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; 46ac4: 42ab 000c clrl %a3@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 46ac8: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 46aca: 4eb9 0004 9ba6 jsr 49ba6 <_Thread_Enable_dispatch> return 0; 46ad0: 508f addql #8,%sp 46ad2: 4280 clrl %d0 } 46ad4: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46ada: 4e5e unlk %fp 46adc: 4e75 rts switch ( the_attr->process_shared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 46ade: 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; } 46ae0: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46ae6: 4e5e unlk %fp 46ae8: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 46aea: 4eb9 0004 9ba6 jsr 49ba6 <_Thread_Enable_dispatch> return EAGAIN; 46af0: 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; } 46af2: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46af8: 4e5e unlk %fp 46afa: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 46afc: 260e movel %fp,%d3 46afe: 0683 ffff fff0 addil #-16,%d3 46b04: 2f03 movel %d3,%sp@- 46b06: 4eb9 0004 6988 jsr 46988 46b0c: 588f addql #4,%sp the_attr = &my_attr; 46b0e: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46b10: 4a90 tstl %a0@ 46b12: 6600 ff60 bnew 46a74 46b16: 60c6 bras 46ade <== NOT EXECUTED =============================================================================== 00046490 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 46490: 4e56 0000 linkw %fp,#0 46494: 2f03 movel %d3,%sp@- 46496: 262e 000c movel %fp@(12),%d3 4649a: 2f02 movel %d2,%sp@- 4649c: 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 ) 464a0: 6754 beqs 464f6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 464a2: 2039 0006 0cd8 movel 60cd8 <_Thread_Dispatch_disable_level>,%d0 464a8: 5280 addql #1,%d0 464aa: 23c0 0006 0cd8 movel %d0,60cd8 <_Thread_Dispatch_disable_level> return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 464b0: 4878 0010 pea 10 464b4: 4eb9 0004 ab9e jsr 4ab9e <_Workspace_Allocate> if ( handler ) { 464ba: 588f addql #4,%sp 464bc: 4a80 tstl %d0 464be: 6726 beqs 464e6 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 464c0: 2079 0006 1168 moveal 61168 <_Per_CPU_Information+0xc>,%a0 handler_stack = &thread_support->Cancellation_Handlers; 464c6: 2228 010e movel %a0@(270),%d1 handler->routine = routine; 464ca: 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; 464cc: 0681 0000 00e0 addil #224,%d1 handler->routine = routine; 464d2: 2142 0008 movel %d2,%a0@(8) handler->arg = arg; 464d6: 2143 000c movel %d3,%a0@(12) _Chain_Append( handler_stack, &handler->Node ); 464da: 2f00 movel %d0,%sp@- 464dc: 2f01 movel %d1,%sp@- 464de: 4eb9 0004 7e90 jsr 47e90 <_Chain_Append> 464e4: 508f addql #8,%sp } _Thread_Enable_dispatch(); } 464e6: 242e fff8 movel %fp@(-8),%d2 464ea: 262e fffc movel %fp@(-4),%d3 464ee: 4e5e unlk %fp handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 464f0: 4ef9 0004 9626 jmp 49626 <_Thread_Enable_dispatch> } 464f6: 242e fff8 movel %fp@(-8),%d2 464fa: 262e fffc movel %fp@(-4),%d3 464fe: 4e5e unlk %fp ... =============================================================================== 00047354 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 47354: 4e56 0000 linkw %fp,#0 47358: 2f0b movel %a3,%sp@- 4735a: 2f0a movel %a2,%sp@- 4735c: 246e 000c moveal %fp@(12),%a2 POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 47360: 4a8a tstl %a2 47362: 6700 0090 beqw 473f4 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 47366: 7001 moveq #1,%d0 47368: b0aa 0004 cmpl %a2@(4),%d0 4736c: 6704 beqs 47372 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 4736e: 4a92 tstl %a2@ 47370: 660e bnes 47380 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 47372: 246e fff8 moveal %fp@(-8),%a2 if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return EINVAL; if ( !the_attr->is_initialized ) return EINVAL; 47376: 7016 moveq #22,%d0 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 47378: 266e fffc moveal %fp@(-4),%a3 4737c: 4e5e unlk %fp 4737e: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47380: 2039 0006 252c movel 6252c <_Thread_Dispatch_disable_level>,%d0 47386: 5280 addql #1,%d0 47388: 23c0 0006 252c movel %d0,6252c <_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 ); 4738e: 4879 0006 28dc pea 628dc <_POSIX_Condition_variables_Information> 47394: 4eb9 0004 9d24 jsr 49d24 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 4739a: 588f addql #4,%sp 4739c: 2640 moveal %d0,%a3 4739e: 4a80 tstl %d0 473a0: 675c beqs 473fe _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 473a2: 276a 0004 0010 movel %a2@(4),%a3@(16) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 473a8: 42ab 0014 clrl %a3@(20) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 473ac: 4878 0074 pea 74 473b0: 4878 0800 pea 800 473b4: 42a7 clrl %sp@- 473b6: 486b 0018 pea %a3@(24) 473ba: 4eb9 0004 b2e4 jsr 4b2e4 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 473c0: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 473c4: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 473c6: 2079 0006 28f4 moveal 628f4 <_POSIX_Condition_variables_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 473cc: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 473ce: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 473d2: 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; 473d6: 42ab 000c clrl %a3@(12) 473da: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 473dc: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch> return 0; } 473e2: 246e fff8 moveal %fp@(-8),%a2 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 473e6: 4fef 0010 lea %sp@(16),%sp 473ea: 4280 clrl %d0 } 473ec: 266e fffc moveal %fp@(-4),%a3 473f0: 4e5e unlk %fp 473f2: 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; 473f4: 45f9 0005 fde2 lea 5fde2 <_POSIX_Condition_variables_Default_attributes>,%a2 473fa: 6000 ff6a braw 47366 _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 473fe: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch> *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 47404: 246e fff8 moveal %fp@(-8),%a2 the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; 47408: 700c moveq #12,%d0 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 4740a: 266e fffc moveal %fp@(-4),%a3 4740e: 4e5e unlk %fp ... =============================================================================== 000471b4 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 471b4: 4e56 0000 linkw %fp,#0 471b8: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 471bc: 4a88 tstl %a0 471be: 670c beqs 471cc 471c0: 4a90 tstl %a0@ 471c2: 6708 beqs 471cc <== NEVER TAKEN return EINVAL; attr->is_initialized = false; return 0; 471c4: 4280 clrl %d0 } 471c6: 4e5e unlk %fp ) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; 471c8: 4290 clrl %a0@ return 0; } 471ca: 4e75 rts int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 471cc: 7016 moveq #22,%d0 attr->is_initialized = false; return 0; } 471ce: 4e5e unlk %fp ... =============================================================================== 000468dc : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 468dc: 4e56 ff9c linkw %fp,#-100 468e0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 468e4: 246e 000c moveal %fp@(12),%a2 468e8: 262e 0010 movel %fp@(16),%d3 int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 468ec: 6700 01fc beqw 46aea return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 468f0: 4a8a tstl %a2 468f2: 6738 beqs 4692c if ( !the_attr->is_initialized ) 468f4: 4a92 tstl %a2@ 468f6: 6726 beqs 4691e * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 468f8: 4aaa 0004 tstl %a2@(4) 468fc: 670c beqs 4690a 468fe: 2039 0005 f7e2 movel 5f7e2 ,%d0 46904: b0aa 0008 cmpl %a2@(8),%d0 46908: 6214 bhis 4691e * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 4690a: 202a 0010 movel %a2@(16),%d0 4690e: 7201 moveq #1,%d1 46910: b280 cmpl %d0,%d1 46912: 6700 0176 beqw 46a8a 46916: 123c 0002 moveb #2,%d1 4691a: b280 cmpl %d0,%d1 4691c: 6716 beqs 46934 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; 4691e: 7416 moveq #22,%d2 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 46920: 2002 movel %d2,%d0 46922: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46928: 4e5e unlk %fp 4692a: 4e75 rts int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 4692c: 45f9 0005 e862 lea 5e862 <_POSIX_Threads_Default_attributes>,%a2 46932: 60c0 bras 468f4 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 46934: 226a 0014 moveal %a2@(20),%a1 schedparam = the_attr->schedparam; 46938: 2e0e movel %fp,%d7 4693a: 2c0e movel %fp,%d6 4693c: 0687 ffff ffe0 addil #-32,%d7 46942: 0686 ffff ffe4 addil #-28,%d6 46948: 2047 moveal %d7,%a0 4694a: 2a0e movel %fp,%d5 4694c: 280e movel %fp,%d4 4694e: 0685 ffff ffe8 addil #-24,%d5 46954: 0684 ffff ffec addil #-20,%d4 4695a: 47ee ffdc lea %fp@(-36),%a3 4695e: 4bee fff0 lea %fp@(-16),%a5 46962: 49ee fff4 lea %fp@(-12),%a4 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 46966: 2d49 ffd8 movel %a1,%fp@(-40) schedparam = the_attr->schedparam; 4696a: 2246 moveal %d6,%a1 4696c: 20aa 001c movel %a2@(28),%a0@ 46970: 2045 moveal %d5,%a0 46972: 22aa 0020 movel %a2@(32),%a1@ 46976: 2244 moveal %d4,%a1 46978: 26aa 0018 movel %a2@(24),%a3@ 4697c: 20aa 0024 movel %a2@(36),%a0@ 46980: 22aa 0028 movel %a2@(40),%a1@ 46984: 2aaa 002c movel %a2@(44),%a5@ 46988: 28aa 0030 movel %a2@(48),%a4@ /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) return ENOTSUP; 4698c: 243c 0000 0086 movel #134,%d2 /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 46992: 4aaa 000c tstl %a2@(12) 46996: 6688 bnes 46920 <== NEVER TAKEN return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 46998: 2f2e ffdc movel %fp@(-36),%sp@- 4699c: 4eb9 0004 d20c jsr 4d20c <_POSIX_Priority_Is_valid> 469a2: 588f addql #4,%sp 469a4: 4a00 tstb %d0 469a6: 6700 ff76 beqw 4691e core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 469aa: 486e fff8 pea %fp@(-8) 469ae: 486e fffc pea %fp@(-4) * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 469b2: 202e ffdc movel %fp@(-36),%d0 /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 469b6: 2f0b movel %a3,%sp@- 469b8: 2f2e ffd8 movel %fp@(-40),%sp@- RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 469bc: 1239 0005 f7e6 moveb 5f7e6 ,%d1 * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 469c2: 2d40 ffd4 movel %d0,%fp@(-44) 469c6: 1d41 ffd3 moveb %d1,%fp@(-45) /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 469ca: 4eb9 0004 d230 jsr 4d230 <_POSIX_Thread_Translate_sched_param> schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 469d0: 4fef 0010 lea %sp@(16),%sp core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 469d4: 2400 movel %d0,%d2 schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 469d6: 6600 ff48 bnew 46920 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 469da: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- 469e0: 4eb9 0004 83f4 jsr 483f4 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 469e6: 4879 0006 1134 pea 61134 <_POSIX_Threads_Information> 469ec: 4eb9 0004 8ed8 jsr 48ed8 <_Objects_Allocate> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 469f2: 508f addql #8,%sp 469f4: 2040 moveal %d0,%a0 469f6: 4a80 tstl %d0 469f8: 6700 01d4 beqw 46bce /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 469fc: 222e fffc movel %fp@(-4),%d1 static inline size_t _POSIX_Threads_Ensure_minimum_stack ( size_t size ) { if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) 46a00: 2039 0005 f7e2 movel 5f7e2 ,%d0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 46a06: 2d41 ffce movel %d1,%fp@(-50) 46a0a: 226e fff8 moveal %fp@(-8),%a1 static inline size_t _POSIX_Threads_Ensure_minimum_stack ( size_t size ) { if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) 46a0e: d080 addl %d0,%d0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 46a10: 222a 0008 movel %a2@(8),%d1 46a14: b280 cmpl %d0,%d1 46a16: 6302 blss 46a1a 46a18: 2001 movel %d1,%d0 46a1a: 42a7 clrl %sp@- 46a1c: 4281 clrl %d1 46a1e: 122e ffd3 moveb %fp@(-45),%d1 46a22: 92ae ffd4 subl %fp@(-44),%d1 46a26: 42a7 clrl %sp@- 46a28: 2f09 movel %a1,%sp@- 46a2a: 2f2e ffce movel %fp@(-50),%sp@- 46a2e: 4878 0001 pea 1 46a32: 2f01 movel %d1,%sp@- 46a34: 4878 0001 pea 1 46a38: 2f00 movel %d0,%sp@- 46a3a: 2f2a 0004 movel %a2@(4),%sp@- 46a3e: 2f08 movel %a0,%sp@- 46a40: 4879 0006 1134 pea 61134 <_POSIX_Threads_Information> 46a46: 2d48 ffca movel %a0,%fp@(-54) 46a4a: 4eb9 0004 9ce0 jsr 49ce0 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 46a50: 206e ffca moveal %fp@(-54),%a0 46a54: 4fef 002c lea %sp@(44),%sp 46a58: 4a00 tstb %d0 46a5a: 6600 009c bnew 46af8 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 46a5e: 2f08 movel %a0,%sp@- 46a60: 4879 0006 1134 pea 61134 <_POSIX_Threads_Information> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); return EAGAIN; 46a66: 740b moveq #11,%d2 46a68: 4eb9 0004 922c jsr 4922c <_Objects_Free> name /* posix threads don't have a name */ ); if ( !status ) { _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 46a6e: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- 46a74: 4eb9 0004 8454 jsr 48454 <_API_Mutex_Unlock> return EAGAIN; 46a7a: 4fef 000c lea %sp@(12),%sp */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 46a7e: 2002 movel %d2,%d0 46a80: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46a86: 4e5e unlk %fp 46a88: 4e75 rts * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46a8a: 2079 0006 13fc moveal 613fc <_Per_CPU_Information+0xc>,%a0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 46a90: 47ee ffdc lea %fp@(-36),%a3 46a94: 2e0e movel %fp,%d7 46a96: 0687 ffff ffe0 addil #-32,%d7 46a9c: 2247 moveal %d7,%a1 46a9e: 2c0e movel %fp,%d6 46aa0: 0686 ffff ffe4 addil #-28,%d6 46aa6: 2a0e movel %fp,%d5 46aa8: 0685 ffff ffe8 addil #-24,%d5 46aae: 280e movel %fp,%d4 46ab0: 0684 ffff ffec addil #-20,%d4 46ab6: 4bee fff0 lea %fp@(-16),%a5 46aba: 49ee fff4 lea %fp@(-12),%a4 * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46abe: 2028 010e movel %a0@(270),%d0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 46ac2: 2040 moveal %d0,%a0 46ac4: 41e8 0084 lea %a0@(132),%a0 46ac8: 2698 movel %a0@+,%a3@ 46aca: 2298 movel %a0@+,%a1@ 46acc: 2246 moveal %d6,%a1 46ace: 2298 movel %a0@+,%a1@ 46ad0: 2245 moveal %d5,%a1 46ad2: 2298 movel %a0@+,%a1@ 46ad4: 2244 moveal %d4,%a1 46ad6: 2298 movel %a0@+,%a1@ 46ad8: 2a98 movel %a0@+,%a5@ 46ada: 2890 movel %a0@,%a4@ * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 46adc: 2040 moveal %d0,%a0 46ade: 2028 0080 movel %a0@(128),%d0 46ae2: 2d40 ffd8 movel %d0,%fp@(-40) schedparam = api->schedparam; break; 46ae6: 6000 fea4 braw 4698c struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) return EFAULT; 46aea: 740e moveq #14,%d2 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 46aec: 2002 movel %d2,%d0 46aee: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46af4: 4e5e unlk %fp 46af6: 4e75 rts } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 46af8: 2268 010e moveal %a0@(270),%a1 api->Attributes = *the_attr; 46afc: 4878 003c pea 3c 46b00: 2f0a movel %a2,%sp@- 46b02: 2d48 ffca movel %a0,%fp@(-54) 46b06: 2f09 movel %a1,%sp@- 46b08: 2d49 ffc6 movel %a1,%fp@(-58) 46b0c: 4eb9 0005 025c jsr 5025c api->detachstate = the_attr->detachstate; 46b12: 226e ffc6 moveal %fp@(-58),%a1 46b16: 236a 0038 003c movel %a2@(56),%a1@(60) api->schedpolicy = schedpolicy; api->schedparam = schedparam; 46b1c: 45e9 0084 lea %a1@(132),%a2 46b20: 24d3 movel %a3@,%a2@+ 46b22: 2647 moveal %d7,%a3 46b24: 24d3 movel %a3@,%a2@+ 46b26: 2646 moveal %d6,%a3 46b28: 24d3 movel %a3@,%a2@+ 46b2a: 2645 moveal %d5,%a3 46b2c: 24d3 movel %a3@,%a2@+ 46b2e: 2644 moveal %d4,%a3 46b30: 24d3 movel %a3@,%a2@+ 46b32: 24d5 movel %a5@,%a2@+ */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 46b34: 202e ffd8 movel %fp@(-40),%d0 api->schedparam = schedparam; 46b38: 2494 movel %a4@,%a2@ /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 46b3a: 206e ffca moveal %fp@(-54),%a0 */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 46b3e: 2340 0080 movel %d0,%a1@(128) api->schedparam = schedparam; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 46b42: 42a7 clrl %sp@- 46b44: 2f2e 0014 movel %fp@(20),%sp@- 46b48: 2f03 movel %d3,%sp@- 46b4a: 4878 0001 pea 1 46b4e: 2f08 movel %a0,%sp@- 46b50: 4eb9 0004 a864 jsr 4a864 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 46b56: 206e ffca moveal %fp@(-54),%a0 46b5a: 4fef 0020 lea %sp@(32),%sp 46b5e: 7204 moveq #4,%d1 46b60: 226e ffc6 moveal %fp@(-58),%a1 46b64: b2ae ffd8 cmpl %fp@(-40),%d1 46b68: 6722 beqs 46b8c } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 46b6a: 226e 0008 moveal %fp@(8),%a1 46b6e: 22a8 0008 movel %a0@(8),%a1@ _RTEMS_Unlock_allocator(); 46b72: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- 46b78: 4eb9 0004 8454 jsr 48454 <_API_Mutex_Unlock> return 0; 46b7e: 588f addql #4,%sp } 46b80: 2002 movel %d2,%d0 46b82: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46b88: 4e5e unlk %fp 46b8a: 4e75 rts return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 46b8c: 4869 008c pea %a1@(140) 46b90: 4eb9 0004 abac jsr 4abac <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46b96: 226e ffc6 moveal %fp@(-58),%a1 46b9a: 2340 00b0 movel %d0,%a1@(176) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46b9e: 4869 00a4 pea %a1@(164) 46ba2: 4879 0006 102e pea 6102e <_Watchdog_Ticks_chain> 46ba8: 4eb9 0004 af08 jsr 4af08 <_Watchdog_Insert> 46bae: 206e ffca moveal %fp@(-54),%a0 46bb2: 4fef 000c lea %sp@(12),%sp } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 46bb6: 226e 0008 moveal %fp@(8),%a1 46bba: 22a8 0008 movel %a0@(8),%a1@ _RTEMS_Unlock_allocator(); 46bbe: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- 46bc4: 4eb9 0004 8454 jsr 48454 <_API_Mutex_Unlock> return 0; 46bca: 588f addql #4,%sp 46bcc: 60b2 bras 46b80 * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 46bce: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- return EAGAIN; 46bd4: 143c 000b moveb #11,%d2 * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 46bd8: 4eb9 0004 8454 jsr 48454 <_API_Mutex_Unlock> return EAGAIN; 46bde: 588f addql #4,%sp */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 46be0: 2002 movel %d2,%d0 46be2: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46be8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e46c : } void pthread_exit( void *value_ptr ) { 4e46c: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4e470: 2f2e 0008 movel %fp@(8),%sp@- 4e474: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 4e47a: 4eb9 0004 e3fc jsr 4e3fc <_POSIX_Thread_Exit> 4e480: 508f addql #8,%sp <== NOT EXECUTED } 4e482: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004659c : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 4659c: 4e56 ffe4 linkw %fp,#-28 465a0: 2039 0006 1aac movel 61aac <_Thread_Dispatch_disable_level>,%d0 465a6: 5280 addql #1,%d0 465a8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 465ac: 23c0 0006 1aac movel %d0,61aac <_Thread_Dispatch_disable_level> * the inactive chain of free keys control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 465b2: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 465b8: 4eb9 0004 8b6c jsr 48b6c <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 465be: 588f addql #4,%sp 465c0: 2640 moveal %d0,%a3 465c2: 4a80 tstl %d0 465c4: 6700 0094 beqw 4665a _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 465c8: 49f9 0006 1a6c lea 61a6c <_Objects_Information_table+0x4>,%a4 int _EXFUN(pthread_once, (pthread_once_t *__once_control, void (*__init_routine)(void))); /* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */ int _EXFUN(pthread_key_create, 465ce: 45eb 0018 lea %a3@(24),%a2 * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 465d2: 7601 moveq #1,%d3 INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 465d4: 4bf9 0004 aebe lea 4aebe <_Workspace_Allocate>,%a5 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 465da: 283c 0005 0148 movel #328008,%d4 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 465e0: 276e 000c 0010 movel %fp@(12),%a3@(16) for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 465e6: 205c moveal %a4@+,%a0 465e8: 4a88 tstl %a0 465ea: 6760 beqs 4664c <== NEVER TAKEN true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); 465ec: 2068 0004 moveal %a0@(4),%a0 465f0: 4282 clrl %d2 465f2: 3428 000e movew %a0@(14),%d2 465f6: 5282 addql #1,%d2 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 465f8: e58a lsll #2,%d2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 465fa: 2f02 movel %d2,%sp@- 465fc: 4e95 jsr %a5@ if ( !table ) { 465fe: 588f addql #4,%sp 46600: 4a80 tstl %d0 46602: 6768 beqs 4666c _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 46604: 2480 movel %d0,%a2@ memset( table, '\0', bytes_to_allocate ); 46606: 2044 moveal %d4,%a0 * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 46608: 5283 addql #1,%d3 4660a: 588a addql #4,%a2 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 4660c: 2f02 movel %d2,%sp@- 4660e: 42a7 clrl %sp@- 46610: 2f00 movel %d0,%sp@- 46612: 4e90 jsr %a0@ 46614: 4fef 000c lea %sp@(12),%sp * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 46618: 7004 moveq #4,%d0 4661a: b083 cmpl %d3,%d0 4661c: 66c8 bnes 465e6 uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 4661e: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 46622: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46624: 2079 0006 1e3a moveal 61e3a <_POSIX_Keys_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 4662a: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4662c: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 46630: 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; 46634: 42ab 000c clrl %a3@(12) 46638: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 4663a: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch> return 0; } 46640: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; 46646: 4280 clrl %d0 } 46648: 4e5e unlk %fp 4664a: 4e75 rts } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 4664c: 4292 clrl %a2@ <== NOT EXECUTED * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 4664e: 5283 addql #1,%d3 <== NOT EXECUTED 46650: 588a addql #4,%a2 <== NOT EXECUTED * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 46652: 7004 moveq #4,%d0 <== NOT EXECUTED 46654: b083 cmpl %d3,%d0 <== NOT EXECUTED 46656: 668e bnes 465e6 <== NOT EXECUTED 46658: 60c4 bras 4661e <== NOT EXECUTED _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 4665a: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch> return EAGAIN; 46660: 700b moveq #11,%d0 *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 46662: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 46668: 4e5e unlk %fp 4666a: 4e75 rts #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 4666c: 2403 movel %d3,%d2 4666e: 5382 subql #1,%d2 46670: 6716 beqs 46688 46672: 49f9 0004 aeda lea 4aeda <_Workspace_Free>,%a4 46678: 45f3 3c14 lea %a3@(00000014,%d3:l:4),%a2 the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 4667c: 2f22 movel %a2@-,%sp@- (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 4667e: 5382 subql #1,%d2 _Workspace_Free( the_key->Values[ the_api ] ); 46680: 4e94 jsr %a4@ #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 46682: 588f addql #4,%sp 46684: 4a82 tstl %d2 46686: 66f4 bnes 4667c */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 46688: 2f0b movel %a3,%sp@- 4668a: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 46690: 4eb9 0004 8ec0 jsr 48ec0 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 46696: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch> return ENOMEM; 4669c: 508f addql #8,%sp 4669e: 700c moveq #12,%d0 *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 466a0: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 466a6: 4e5e unlk %fp ... =============================================================================== 000466ac : */ int pthread_key_delete( pthread_key_t key ) { 466ac: 4e56 ffec linkw %fp,#-20 466b0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location ); 466b4: 486e fffc pea %fp@(-4) 466b8: 2f2e 0008 movel %fp@(8),%sp@- 466bc: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 466c2: 4eb9 0004 9028 jsr 49028 <_Objects_Get> register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 466c8: 4fef 000c lea %sp@(12),%sp 466cc: 2600 movel %d0,%d3 466ce: 4aae fffc tstl %fp@(-4) 466d2: 6652 bnes 46726 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 466d4: 2f00 movel %d0,%sp@- 466d6: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> (pthread_key_t __key, _CONST void *__value)); void * _EXFUN(pthread_getspecific, (pthread_key_t __key)); /* Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ int _EXFUN(pthread_key_delete, (pthread_key_t __key)); 466dc: 2440 moveal %d0,%a2 466de: 45ea 0018 lea %a2@(24),%a2 466e2: 7403 moveq #3,%d2 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) _Workspace_Free( the_key->Values[ the_api ] ); 466e4: 47f9 0004 aeda lea 4aeda <_Workspace_Free>,%a3 the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 466ea: 4eb9 0004 8bfc jsr 48bfc <_Objects_Close> 466f0: 508f addql #8,%sp for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 466f2: 201a movel %a2@+,%d0 _Workspace_Free( the_key->Values[ the_api ] ); 466f4: 5382 subql #1,%d2 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 466f6: 4a80 tstl %d0 466f8: 6706 beqs 46700 <== NEVER TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 466fa: 2f00 movel %d0,%sp@- 466fc: 4e93 jsr %a3@ 466fe: 588f addql #4,%sp switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) 46700: 4a82 tstl %d2 46702: 66ee bnes 466f2 */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 46704: 2f03 movel %d3,%sp@- 46706: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 4670c: 4eb9 0004 8ec0 jsr 48ec0 <_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(); 46712: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch> return 0; 46718: 508f addql #8,%sp 4671a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 4671c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 46722: 4e5e unlk %fp 46724: 4e75 rts #endif case OBJECTS_ERROR: break; } return EINVAL; 46726: 7016 moveq #22,%d0 } 46728: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4672e: 4e5e unlk %fp ... =============================================================================== 000487b8 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 487b8: 4e56 ffec linkw %fp,#-20 487bc: 48d7 041c moveml %d2-%d4/%a2,%sp@ 487c0: 262e 0008 movel %fp@(8),%d3 487c4: 242e 000c movel %fp@(12),%d2 487c8: 246e 0010 moveal %fp@(16),%a2 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 487cc: 4a8a tstl %a2 487ce: 670e beqs 487de return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 487d0: 2f02 movel %d2,%sp@- 487d2: 4eb9 0004 89bc jsr 489bc <_POSIX_Priority_Is_valid> 487d8: 588f addql #4,%sp 487da: 4a00 tstb %d0 487dc: 660c bnes 487ea #endif case OBJECTS_ERROR: break; } return EINVAL; 487de: 7016 moveq #22,%d0 } 487e0: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 487e6: 4e5e unlk %fp 487e8: 4e75 rts /* * Must acquire the mutex before we can change it's ceiling. * POSIX says block until we acquire it. */ (void) pthread_mutex_lock( mutex ); 487ea: 2f03 movel %d3,%sp@- 487ec: 1839 0006 3616 moveb 63616 ,%d4 487f2: 4eb9 0004 8734 jsr 48734 * operations. * * NOTE: This makes it easier to get 100% binary coverage since the * bad Id case is handled by the switch. */ the_mutex = _POSIX_Mutex_Get( mutex, &location ); 487f8: 486e fffc pea %fp@(-4) 487fc: 2f03 movel %d3,%sp@- 487fe: 4eb9 0004 84b0 jsr 484b0 <_POSIX_Mutex_Get> switch ( location ) { 48804: 4fef 000c lea %sp@(12),%sp 48808: 4aae fffc tstl %fp@(-4) 4880c: 66d0 bnes 487de <== NEVER TAKEN RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4880e: 4281 clrl %d1 48810: 1239 0006 3616 moveb 63616 ,%d1 48816: 2040 moveal %d0,%a0 48818: 92a8 005e subl %a0@(94),%d1 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4881c: 0284 0000 00ff andil #255,%d4 RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 48822: 2481 movel %d1,%a2@ RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 48824: 9882 subl %d2,%d4 48826: 2144 005e movel %d4,%a0@(94) ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 4882a: 42a7 clrl %sp@- 4882c: 2f28 0008 movel %a0@(8),%sp@- 48830: 4868 0014 pea %a0@(20) 48834: 4eb9 0004 a744 jsr 4a744 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4883a: 4eb9 0004 bc9e jsr 4bc9e <_Thread_Enable_dispatch> return 0; 48840: 4fef 000c lea %sp@(12),%sp 48844: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 48846: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4884c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046288 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 46288: 4e56 0000 linkw %fp,#0 4628c: 206e 0008 moveal %fp@(8),%a0 46290: 226e 000c moveal %fp@(12),%a1 if ( !attr ) 46294: 4a88 tstl %a0 46296: 6712 beqs 462aa return EINVAL; if ( !attr->is_initialized ) 46298: 4a90 tstl %a0@ 4629a: 670e beqs 462aa return EINVAL; if ( !type ) 4629c: 4a89 tstl %a1 4629e: 670a beqs 462aa <== NEVER TAKEN return EINVAL; *type = attr->type; 462a0: 22a8 0010 movel %a0@(16),%a1@ return 0; 462a4: 4280 clrl %d0 } 462a6: 4e5e unlk %fp 462a8: 4e75 rts if ( !attr->is_initialized ) return EINVAL; if ( !type ) return EINVAL; 462aa: 7016 moveq #22,%d0 *type = attr->type; return 0; } 462ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048404 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 48404: 4e56 0000 linkw %fp,#0 48408: 206e 0008 moveal %fp@(8),%a0 4840c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 48410: 4a88 tstl %a0 48412: 670a beqs 4841e 48414: 4a90 tstl %a0@ 48416: 6706 beqs 4841e return EINVAL; switch ( pshared ) { 48418: 7201 moveq #1,%d1 4841a: b280 cmpl %d0,%d1 4841c: 6406 bccs 48424 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 4841e: 7016 moveq #22,%d0 } } 48420: 4e5e unlk %fp 48422: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 48424: 2140 0004 movel %d0,%a0@(4) return 0; 48428: 4280 clrl %d0 default: return EINVAL; } } 4842a: 4e5e unlk %fp ... =============================================================================== 000462ec : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 462ec: 4e56 0000 linkw %fp,#0 462f0: 206e 0008 moveal %fp@(8),%a0 462f4: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 462f8: 4a88 tstl %a0 462fa: 670a beqs 46306 462fc: 4a90 tstl %a0@ 462fe: 6706 beqs 46306 <== NEVER TAKEN return EINVAL; switch ( type ) { 46300: 7203 moveq #3,%d1 46302: b280 cmpl %d0,%d1 46304: 6406 bccs 4630c case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; default: return EINVAL; 46306: 7016 moveq #22,%d0 } } 46308: 4e5e unlk %fp 4630a: 4e75 rts switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 4630c: 2140 0010 movel %d0,%a0@(16) return 0; 46310: 4280 clrl %d0 default: return EINVAL; } } 46312: 4e5e unlk %fp ... =============================================================================== 00047094 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 47094: 4e56 ffec linkw %fp,#-20 47098: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4709c: 246e 0008 moveal %fp@(8),%a2 470a0: 266e 000c moveal %fp@(12),%a3 if ( !once_control || !init_routine ) 470a4: 4a8a tstl %a2 470a6: 6772 beqs 4711a 470a8: 4a8b tstl %a3 470aa: 676e beqs 4711a return EINVAL; if ( !once_control->init_executed ) { 470ac: 4aaa 0004 tstl %a2@(4) 470b0: 670c beqs 470be once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; 470b2: 4280 clrl %d0 } 470b4: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 470ba: 4e5e unlk %fp 470bc: 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); 470be: 240e movel %fp,%d2 470c0: 5982 subql #4,%d2 470c2: 49f9 0004 7d54 lea 47d54 ,%a4 470c8: 2f02 movel %d2,%sp@- 470ca: 4878 0100 pea 100 470ce: 4878 0100 pea 100 470d2: 4e94 jsr %a4@ if ( !once_control->init_executed ) { 470d4: 4fef 000c lea %sp@(12),%sp 470d8: 4aaa 0004 tstl %a2@(4) 470dc: 671c beqs 470fa <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 470de: 2f02 movel %d2,%sp@- <== NOT EXECUTED 470e0: 4878 0100 pea 100 <== NOT EXECUTED 470e4: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 470e8: 4e94 jsr %a4@ <== NOT EXECUTED 470ea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } return 0; 470ee: 4280 clrl %d0 <== NOT EXECUTED } 470f0: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 470f6: 4e5e unlk %fp 470f8: 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; 470fa: 7001 moveq #1,%d0 470fc: 2480 movel %d0,%a2@ once_control->init_executed = true; 470fe: 7001 moveq #1,%d0 47100: 2540 0004 movel %d0,%a2@(4) (*init_routine)(); 47104: 4e93 jsr %a3@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 47106: 2f02 movel %d2,%sp@- 47108: 4878 0100 pea 100 4710c: 2f2e fffc movel %fp@(-4),%sp@- 47110: 4e94 jsr %a4@ 47112: 4fef 000c lea %sp@(12),%sp } return 0; 47116: 4280 clrl %d0 47118: 60d6 bras 470f0 pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) return EINVAL; 4711a: 7016 moveq #22,%d0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 4711c: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 47122: 4e5e unlk %fp ... =============================================================================== 00047498 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 47498: 4e56 ffe8 linkw %fp,#-24 4749c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 474a0: 246e 0008 moveal %fp@(8),%a2 474a4: 242e 000c movel %fp@(12),%d2 const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 474a8: 4a8a tstl %a2 474aa: 676e beqs 4751a return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 474ac: 4a82 tstl %d2 474ae: 6700 0088 beqw 47538 474b2: 2042 moveal %d2,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 474b4: 4a90 tstl %a0@ 474b6: 6762 beqs 4751a <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 474b8: 4aa8 0004 tstl %a0@(4) 474bc: 665c bnes 4751a <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 474be: 2039 0006 2910 movel 62910 <_Thread_Dispatch_disable_level>,%d0 474c4: 5280 addql #1,%d0 474c6: 23c0 0006 2910 movel %d0,62910 <_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 ); 474cc: 4879 0006 2a9e pea 62a9e <_POSIX_RWLock_Information> 474d2: 4eb9 0004 9e68 jsr 49e68 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 474d8: 588f addql #4,%sp 474da: 2640 moveal %d0,%a3 474dc: 4a80 tstl %d0 474de: 6746 beqs 47526 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 474e0: 486e fffc pea %fp@(-4) 474e4: 486b 0010 pea %a3@(16) 474e8: 4eb9 0004 952c jsr 4952c <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 474ee: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 474f2: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 474f4: 2079 0006 2ab6 moveal 62ab6 <_POSIX_RWLock_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 474fa: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 474fc: 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; 47500: 42ab 000c clrl %a3@(12) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 47504: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 47506: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch> return 0; 4750c: 508f addql #8,%sp 4750e: 4280 clrl %d0 } 47510: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 47516: 4e5e unlk %fp 47518: 4e75 rts switch ( the_attr->process_shared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 4751a: 7016 moveq #22,%d0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 4751c: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 47522: 4e5e unlk %fp 47524: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 47526: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch> return EAGAIN; 4752c: 700b moveq #11,%d0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 4752e: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 47534: 4e5e unlk %fp 47536: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 47538: 240e movel %fp,%d2 4753a: 0682 ffff fff4 addil #-12,%d2 47540: 2f02 movel %d2,%sp@- 47542: 4eb9 0004 7fd0 jsr 47fd0 47548: 588f addql #4,%sp the_attr = &default_attr; 4754a: 2042 moveal %d2,%a0 4754c: 6000 ff66 braw 474b4 =============================================================================== 000475bc : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 475bc: 4e56 ffec linkw %fp,#-20 475c0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 475c4: 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 ) 475c8: 4a8a tstl %a2 475ca: 6700 0082 beqw 4764e * * 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 ); 475ce: 486e fff8 pea %fp@(-8) 475d2: 2f2e 000c movel %fp@(12),%sp@- 475d6: 4eb9 0004 df40 jsr 4df40 <_POSIX_Absolute_timeout_to_ticks> 475dc: 486e fffc pea %fp@(-4) 475e0: 2400 movel %d0,%d2 475e2: 2f12 movel %a2@,%sp@- 475e4: 4879 0006 2a9e pea 62a9e <_POSIX_RWLock_Information> 475ea: 4eb9 0004 a324 jsr 4a324 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 475f0: 4fef 0014 lea %sp@(20),%sp 475f4: 4aae fffc tstl %fp@(-4) 475f8: 6654 bnes 4764e 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, 475fa: 7203 moveq #3,%d1 475fc: b282 cmpl %d2,%d1 475fe: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 47600: 42a7 clrl %sp@- 47602: 2f2e fff8 movel %fp@(-8),%sp@- 47606: 4483 negl %d3 47608: 4281 clrl %d1 4760a: 1203 moveb %d3,%d1 4760c: 2040 moveal %d0,%a0 4760e: 2f01 movel %d1,%sp@- 47610: 2f12 movel %a2@,%sp@- 47612: 4868 0010 pea %a0@(16) 47616: 4eb9 0004 9560 jsr 49560 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 4761c: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch> if ( !do_wait ) { 47622: 4fef 0014 lea %sp@(20),%sp 47626: 4a03 tstb %d3 47628: 6644 bnes 4766e if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 4762a: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 47630: 7202 moveq #2,%d1 47632: 2028 0034 movel %a0@(52),%d0 47636: b280 cmpl %d0,%d1 47638: 6720 beqs 4765a break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 4763a: 2f00 movel %d0,%sp@- 4763c: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47642: 588f addql #4,%sp case OBJECTS_ERROR: break; } return EINVAL; } 47644: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4764a: 4e5e unlk %fp 4764c: 4e75 rts #endif case OBJECTS_ERROR: break; } return EINVAL; 4764e: 7016 moveq #22,%d0 } 47650: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47656: 4e5e unlk %fp 47658: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 4765a: 4a82 tstl %d2 4765c: 67f0 beqs 4764e <== NEVER TAKEN 4765e: b282 cmpl %d2,%d1 47660: 65d8 bcss 4763a <== NEVER TAKEN case POSIX_ABSOLUTE_TIMEOUT_INVALID: return EINVAL; case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST: case POSIX_ABSOLUTE_TIMEOUT_IS_NOW: return ETIMEDOUT; 47662: 7074 moveq #116,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 47664: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4766a: 4e5e unlk %fp 4766c: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 4766e: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 47674: 2028 0034 movel %a0@(52),%d0 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 47678: 2f00 movel %d0,%sp@- 4767a: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47680: 588f addql #4,%sp 47682: 60c0 bras 47644 =============================================================================== 00047684 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 47684: 4e56 ffec linkw %fp,#-20 47688: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4768c: 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 ) 47690: 4a8a tstl %a2 47692: 6700 0082 beqw 47716 * * 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 ); 47696: 486e fff8 pea %fp@(-8) 4769a: 2f2e 000c movel %fp@(12),%sp@- 4769e: 4eb9 0004 df40 jsr 4df40 <_POSIX_Absolute_timeout_to_ticks> 476a4: 486e fffc pea %fp@(-4) 476a8: 2400 movel %d0,%d2 476aa: 2f12 movel %a2@,%sp@- 476ac: 4879 0006 2a9e pea 62a9e <_POSIX_RWLock_Information> 476b2: 4eb9 0004 a324 jsr 4a324 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 476b8: 4fef 0014 lea %sp@(20),%sp 476bc: 4aae fffc tstl %fp@(-4) 476c0: 6654 bnes 47716 (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, 476c2: 7203 moveq #3,%d1 476c4: b282 cmpl %d2,%d1 476c6: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 476c8: 42a7 clrl %sp@- 476ca: 2f2e fff8 movel %fp@(-8),%sp@- 476ce: 4483 negl %d3 476d0: 4281 clrl %d1 476d2: 1203 moveb %d3,%d1 476d4: 2040 moveal %d0,%a0 476d6: 2f01 movel %d1,%sp@- 476d8: 2f12 movel %a2@,%sp@- 476da: 4868 0010 pea %a0@(16) 476de: 4eb9 0004 9620 jsr 49620 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 476e4: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch> if ( !do_wait && 476ea: 4fef 0014 lea %sp@(20),%sp 476ee: 4a03 tstb %d3 476f0: 6644 bnes 47736 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 476f2: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 476f8: 7202 moveq #2,%d1 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 476fa: 2028 0034 movel %a0@(52),%d0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 476fe: b280 cmpl %d0,%d1 47700: 6720 beqs 47722 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 47702: 2f00 movel %d0,%sp@- 47704: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> 4770a: 588f addql #4,%sp case OBJECTS_ERROR: break; } return EINVAL; } 4770c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47712: 4e5e unlk %fp 47714: 4e75 rts #endif case OBJECTS_ERROR: break; } return EINVAL; 47716: 7016 moveq #22,%d0 } 47718: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4771e: 4e5e unlk %fp 47720: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 47722: 4a82 tstl %d2 47724: 67f0 beqs 47716 <== NEVER TAKEN 47726: b282 cmpl %d2,%d1 47728: 65d8 bcss 47702 <== NEVER TAKEN case POSIX_ABSOLUTE_TIMEOUT_INVALID: return EINVAL; case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST: case POSIX_ABSOLUTE_TIMEOUT_IS_NOW: return ETIMEDOUT; 4772a: 7074 moveq #116,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 4772c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47732: 4e5e unlk %fp 47734: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 47736: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 4773c: 2028 0034 movel %a0@(52),%d0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 47740: 2f00 movel %d0,%sp@- 47742: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47748: 588f addql #4,%sp 4774a: 60c0 bras 4770c =============================================================================== 000477d0 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 477d0: 4e56 fffc linkw %fp,#-4 477d4: 2f0a movel %a2,%sp@- 477d6: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 477da: 4a8a tstl %a2 477dc: 6752 beqs 47830 <== NEVER TAKEN 477de: 486e fffc pea %fp@(-4) 477e2: 2f12 movel %a2@,%sp@- 477e4: 4879 0006 2a9e pea 62a9e <_POSIX_RWLock_Information> 477ea: 4eb9 0004 a324 jsr 4a324 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 477f0: 4fef 000c lea %sp@(12),%sp 477f4: 4aae fffc tstl %fp@(-4) 477f8: 6636 bnes 47830 <== NEVER TAKEN case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 477fa: 42a7 clrl %sp@- 477fc: 2040 moveal %d0,%a0 477fe: 42a7 clrl %sp@- 47800: 42a7 clrl %sp@- 47802: 2f12 movel %a2@,%sp@- 47804: 4868 0010 pea %a0@(16) 47808: 4eb9 0004 9620 jsr 49620 <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 4780e: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 47814: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 4781a: 2f28 0034 movel %a0@(52),%sp@- 4781e: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 47824: 246e fff8 moveal %fp@(-8),%a2 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 47828: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return EINVAL; } 4782c: 4e5e unlk %fp 4782e: 4e75 rts 47830: 246e fff8 moveal %fp@(-8),%a2 #endif case OBJECTS_ERROR: break; } return EINVAL; 47834: 7016 moveq #22,%d0 } 47836: 4e5e unlk %fp ... =============================================================================== 00047ff0 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 47ff0: 4e56 0000 linkw %fp,#0 47ff4: 206e 0008 moveal %fp@(8),%a0 47ff8: 202e 000c movel %fp@(12),%d0 if ( !attr ) 47ffc: 4a88 tstl %a0 47ffe: 670a beqs 4800a return EINVAL; if ( !attr->is_initialized ) 48000: 4a90 tstl %a0@ 48002: 6706 beqs 4800a return EINVAL; switch ( pshared ) { 48004: 7201 moveq #1,%d1 48006: b280 cmpl %d0,%d1 48008: 6406 bccs 48010 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 4800a: 7016 moveq #22,%d0 } } 4800c: 4e5e unlk %fp 4800e: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 48010: 2140 0004 movel %d0,%a0@(4) return 0; 48014: 4280 clrl %d0 default: return EINVAL; } } 48016: 4e5e unlk %fp ... =============================================================================== 00049224 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 49224: 4e56 ffe0 linkw %fp,#-32 49228: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4922c: 282e 000c movel %fp@(12),%d4 49230: 242e 0010 movel %fp@(16),%d2 int rc; /* * Check all the parameters */ if ( !param ) 49234: 6700 00c4 beqw 492fa return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 49238: 486e fff8 pea %fp@(-8) 4923c: 486e fffc pea %fp@(-4) 49240: 2f02 movel %d2,%sp@- 49242: 2f04 movel %d4,%sp@- 49244: 4eb9 0004 f344 jsr 4f344 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 4924a: 4fef 0010 lea %sp@(16),%sp * Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 4924e: 2600 movel %d0,%d3 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 49250: 670c beqs 4925e case OBJECTS_ERROR: break; } return ESRCH; } 49252: 2003 movel %d3,%d0 49254: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4925a: 4e5e unlk %fp 4925c: 4e75 rts 4925e: 486e fff4 pea %fp@(-12) 49262: 2f2e 0008 movel %fp@(8),%sp@- 49266: 4879 0006 4fc4 pea 64fc4 <_POSIX_Threads_Information> 4926c: 4eb9 0004 b414 jsr 4b414 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 49272: 4fef 000c lea %sp@(12),%sp 49276: 2440 moveal %d0,%a2 49278: 4aae fff4 tstl %fp@(-12) 4927c: 6600 008a bnew 49308 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 49280: 266a 010e moveal %a2@(270),%a3 if ( api->schedpolicy == SCHED_SPORADIC ) 49284: 7004 moveq #4,%d0 49286: b0ab 0080 cmpl %a3@(128),%d0 4928a: 6700 00b8 beqw 49344 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 4928e: 41eb 0084 lea %a3@(132),%a0 49292: 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; 49294: 2744 0080 movel %d4,%a3@(128) api->schedparam = *param; 49298: 20d9 movel %a1@+,%a0@+ 4929a: 20d9 movel %a1@+,%a0@+ 4929c: 20d9 movel %a1@+,%a0@+ 4929e: 20d9 movel %a1@+,%a0@+ 492a0: 20d9 movel %a1@+,%a0@+ 492a2: 20d9 movel %a1@+,%a0@+ 492a4: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; 492a6: 256e fffc 007a movel %fp@(-4),%a2@(122) the_thread->budget_callout = budget_callout; 492ac: 256e fff8 007e movel %fp@(-8),%a2@(126) switch ( api->schedpolicy ) { 492b2: 4a84 tstl %d4 492b4: 6d32 blts 492e8 <== NEVER TAKEN 492b6: 7002 moveq #2,%d0 492b8: b084 cmpl %d4,%d0 492ba: 6d5a blts 49316 492bc: 4280 clrl %d0 492be: 1039 0006 3616 moveb 63616 ,%d0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 492c4: 41f9 0006 4db4 lea 64db4 <_Thread_Ticks_per_timeslice>,%a0 492ca: 90ab 0084 subl %a3@(132),%d0 492ce: 2550 0076 movel %a0@,%a2@(118) the_thread->real_priority = 492d2: 2540 0018 movel %d0,%a2@(24) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 492d6: 4878 0001 pea 1 492da: 2f00 movel %d0,%sp@- 492dc: 2f0a movel %a2,%sp@- 492de: 4eb9 0004 b76c jsr 4b76c <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 492e4: 4fef 000c lea %sp@(12),%sp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 492e8: 4eb9 0004 bc9e jsr 4bc9e <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 492ee: 2003 movel %d3,%d0 492f0: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 492f6: 4e5e unlk %fp 492f8: 4e75 rts /* * Check all the parameters */ if ( !param ) return EINVAL; 492fa: 7616 moveq #22,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 492fc: 2003 movel %d3,%d0 492fe: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 49304: 4e5e unlk %fp 49306: 4e75 rts #endif case OBJECTS_ERROR: break; } return ESRCH; 49308: 7603 moveq #3,%d3 } 4930a: 2003 movel %d3,%d0 4930c: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 49312: 4e5e unlk %fp 49314: 4e75 rts api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 49316: 103c 0004 moveb #4,%d0 4931a: b084 cmpl %d4,%d0 4931c: 66ca bnes 492e8 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 4931e: 276b 0084 00a0 movel %a3@(132),%a3@(160) _Watchdog_Remove( &api->Sporadic_timer ); 49324: 486b 00a4 pea %a3@(164) 49328: 4eb9 0004 d188 jsr 4d188 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 4932e: 2f0a movel %a2,%sp@- 49330: 42a7 clrl %sp@- 49332: 4eb9 0004 90d4 jsr 490d4 <_POSIX_Threads_Sporadic_budget_TSR> break; 49338: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4933c: 4eb9 0004 bc9e jsr 4bc9e <_Thread_Enable_dispatch> 49342: 60aa bras 492ee case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 49344: 486b 00a4 pea %a3@(164) 49348: 4eb9 0004 d188 jsr 4d188 <_Watchdog_Remove> 4934e: 588f addql #4,%sp api->schedpolicy = policy; api->schedparam = *param; 49350: 41eb 0084 lea %a3@(132),%a0 49354: 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; 49356: 2744 0080 movel %d4,%a3@(128) api->schedparam = *param; 4935a: 20d9 movel %a1@+,%a0@+ 4935c: 20d9 movel %a1@+,%a0@+ 4935e: 20d9 movel %a1@+,%a0@+ 49360: 20d9 movel %a1@+,%a0@+ 49362: 20d9 movel %a1@+,%a0@+ 49364: 20d9 movel %a1@+,%a0@+ 49366: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; 49368: 256e fffc 007a movel %fp@(-4),%a2@(122) the_thread->budget_callout = budget_callout; 4936e: 256e fff8 007e movel %fp@(-8),%a2@(126) switch ( api->schedpolicy ) { 49374: 4a84 tstl %d4 49376: 6c00 ff3e bgew 492b6 4937a: 6000 ff6c braw 492e8 <== NOT EXECUTED ... =============================================================================== 000467a8 : int pthread_setspecific( pthread_key_t key, const void *value ) { 467a8: 4e56 fffc linkw %fp,#-4 467ac: 2f03 movel %d3,%sp@- 467ae: 2f02 movel %d2,%sp@- 467b0: 486e fffc pea %fp@(-4) 467b4: 2f2e 0008 movel %fp@(8),%sp@- 467b8: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 467be: 4eb9 0004 9028 jsr 49028 <_Objects_Get> uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 467c4: 4fef 000c lea %sp@(12),%sp 467c8: 4aae fffc tstl %fp@(-4) 467cc: 663e bnes 4680c <== NEVER TAKEN case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 467ce: 2079 0006 1f3c moveal 61f3c <_Per_CPU_Information+0xc>,%a0 467d4: 7618 moveq #24,%d3 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 467d6: 2240 moveal %d0,%a1 the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 467d8: 2428 0008 movel %a0@(8),%d2 467dc: 2202 movel %d2,%d1 467de: e6a9 lsrl %d3,%d1 467e0: 163c 0007 moveb #7,%d3 467e4: c283 andl %d3,%d1 index = _Objects_Get_index( _Thread_Executing->Object.id ); 467e6: 0282 0000 ffff andil #65535,%d2 the_key->Values[ api ][ index ] = (void *) value; 467ec: 2071 1c14 moveal %a1@(00000014,%d1:l:4),%a0 467f0: 43ee 000c lea %fp@(12),%a1 467f4: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4) _Thread_Enable_dispatch(); 467f8: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } 467fe: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; _Thread_Enable_dispatch(); return 0; 46802: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 46804: 262e fff8 movel %fp@(-8),%d3 46808: 4e5e unlk %fp 4680a: 4e75 rts 4680c: 242e fff4 movel %fp@(-12),%d2 #endif case OBJECTS_ERROR: break; } return EINVAL; 46810: 7016 moveq #22,%d0 } 46812: 262e fff8 movel %fp@(-8),%d3 46816: 4e5e unlk %fp ... =============================================================================== 0004d48c : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 4d48c: 4e56 0000 linkw %fp,#0 4d490: 202e 0008 movel %fp@(8),%d0 4d494: 2f0a movel %a2,%sp@- 4d496: 226e 000c moveal %fp@(12),%a1 4d49a: 246e 0010 moveal %fp@(16),%a2 POSIX_API_Control *api; if ( !set && !oset ) 4d49e: 4a89 tstl %a1 4d4a0: 6700 0084 beqw 4d526 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4d4a4: 2079 0006 1fac moveal 61fac <_Per_CPU_Information+0xc>,%a0 4d4aa: 2068 010e moveal %a0@(270),%a0 if ( oset ) 4d4ae: 4a8a tstl %a2 4d4b0: 6708 beqs 4d4ba *oset = api->signals_blocked; 4d4b2: 24a8 00cc movel %a0@(204),%a2@ if ( !set ) 4d4b6: 4a89 tstl %a1 4d4b8: 673a beqs 4d4f4 <== NEVER TAKEN return 0; switch ( how ) { 4d4ba: 7201 moveq #1,%d1 4d4bc: b280 cmpl %d0,%d1 4d4be: 675e beqs 4d51e 4d4c0: 123c 0002 moveb #2,%d1 4d4c4: b280 cmpl %d0,%d1 4d4c6: 6736 beqs 4d4fe 4d4c8: 4a80 tstl %d0 4d4ca: 663c bnes 4d508 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 4d4cc: 2151 00cc movel %a1@,%a0@(204) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 4d4d0: 2039 0006 21ae movel 621ae <_POSIX_signals_Pending>,%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4d4d6: 2228 00cc movel %a0@(204),%d1 4d4da: 4681 notl %d1 (api->signals_pending | _POSIX_signals_Pending) ) { 4d4dc: 80a8 00d0 orl %a0@(208),%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4d4e0: c081 andl %d1,%d0 4d4e2: 6710 beqs 4d4f4 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); 4d4e4: 4eb9 0004 98a4 jsr 498a4 <_Thread_Dispatch> } return 0; } 4d4ea: 246e fffc moveal %fp@(-4),%a2 if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; 4d4ee: 4280 clrl %d0 } 4d4f0: 4e5e unlk %fp 4d4f2: 4e75 rts 4d4f4: 246e fffc moveal %fp@(-4),%a2 if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; 4d4f8: 4280 clrl %d0 } 4d4fa: 4e5e unlk %fp 4d4fc: 4e75 rts switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 4d4fe: 2011 movel %a1@,%d0 4d500: 4680 notl %d0 4d502: c1a8 00cc andl %d0,%a0@(204) break; 4d506: 60c8 bras 4d4d0 case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4d508: 4eb9 0004 fc64 jsr 4fc64 <__errno> (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 4d50e: 246e fffc moveal %fp@(-4),%a2 break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4d512: 2040 moveal %d0,%a0 4d514: 7216 moveq #22,%d1 4d516: 70ff moveq #-1,%d0 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 4d518: 4e5e unlk %fp break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4d51a: 2081 movel %d1,%a0@ (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 4d51c: 4e75 rts if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 4d51e: 2011 movel %a1@,%d0 4d520: 81a8 00cc orl %d0,%a0@(204) break; 4d524: 60aa bras 4d4d0 sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 4d526: 4a8a tstl %a2 4d528: 67de beqs 4d508 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4d52a: 2079 0006 1fac moveal 61fac <_Per_CPU_Information+0xc>,%a0 4d530: 2068 010e moveal %a0@(270),%a0 if ( oset ) *oset = api->signals_blocked; 4d534: 24a8 00cc movel %a0@(204),%a2@ if ( !set ) 4d538: 4a89 tstl %a1 4d53a: 6600 ff7e bnew 4d4ba 4d53e: 60b4 bras 4d4f4 =============================================================================== 00046d88 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 46d88: 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() ) 46d8c: 4ab9 0006 1164 tstl 61164 <_Per_CPU_Information+0x8> 46d92: 663c bnes 46dd0 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46d94: 2079 0006 1168 moveal 61168 <_Per_CPU_Information+0xc>,%a0 46d9a: 2039 0006 0cd8 movel 60cd8 <_Thread_Dispatch_disable_level>,%d0 46da0: 5280 addql #1,%d0 46da2: 2068 010e moveal %a0@(270),%a0 46da6: 23c0 0006 0cd8 movel %d0,60cd8 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 46dac: 4aa8 00d4 tstl %a0@(212) 46db0: 6622 bnes 46dd4 <== NEVER TAKEN 46db2: 4aa8 00dc tstl %a0@(220) 46db6: 671c beqs 46dd4 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 46db8: 4eb9 0004 9626 jsr 49626 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 46dbe: 4878 ffff pea ffffffff 46dc2: 2f39 0006 1168 movel 61168 <_Per_CPU_Information+0xc>,%sp@- 46dc8: 4eb9 0004 cdc4 jsr 4cdc4 <_POSIX_Thread_Exit> 46dce: 508f addql #8,%sp <== NOT EXECUTED } 46dd0: 4e5e unlk %fp <== NOT EXECUTED 46dd2: 4e75 rts <== NOT EXECUTED 46dd4: 4e5e unlk %fp _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 46dd6: 4ef9 0004 9626 jmp 49626 <_Thread_Enable_dispatch> =============================================================================== 0004e948 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4e948: 4e56 ffe8 linkw %fp,#-24 4e94c: 202e 0010 movel %fp@(16),%d0 4e950: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4e954: 242e 0008 movel %fp@(8),%d2 4e958: 262e 000c movel %fp@(12),%d3 4e95c: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4e960: 4a82 tstl %d2 4e962: 677a beqs 4e9de <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 4e964: 4a8a tstl %a2 4e966: 6700 00cc beqw 4ea34 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4e96a: 0803 0004 btst #4,%d3 4e96e: 677a beqs 4e9ea the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4e970: 42ae fff8 clrl %fp@(-8) if ( maximum_waiters == 0 ) 4e974: 4a80 tstl %d0 4e976: 6700 00b0 beqw 4ea28 4e97a: 2239 0006 15e4 movel 615e4 <_Thread_Dispatch_disable_level>,%d1 4e980: 5281 addql #1,%d1 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4e982: 2d40 fffc movel %d0,%fp@(-4) 4e986: 23c1 0006 15e4 movel %d1,615e4 <_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 ); 4e98c: 4879 0006 1e22 pea 61e22 <_Barrier_Information> 4e992: 4eb9 0004 941c jsr 4941c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4e998: 588f addql #4,%sp 4e99a: 2640 moveal %d0,%a3 4e99c: 4a80 tstl %d0 4e99e: 6776 beqs 4ea16 <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4e9a0: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4e9a4: 486e fff8 pea %fp@(-8) 4e9a8: 486b 0014 pea %a3@(20) 4e9ac: 4eb9 0004 f1ec jsr 4f1ec <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 4e9b2: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 4e9b6: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4e9b8: 2079 0006 1e3a moveal 61e3a <_Barrier_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 4e9be: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4e9c0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4e9c4: 2742 000c movel %d2,%a3@(12) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4e9c8: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4e9ca: 4eb9 0004 a162 jsr 4a162 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4e9d0: 508f addql #8,%sp 4e9d2: 4280 clrl %d0 } 4e9d4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4e9da: 4e5e unlk %fp 4e9dc: 4e75 rts { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 4e9de: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4e9e0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4e9e6: 4e5e unlk %fp 4e9e8: 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; 4e9ea: 7201 moveq #1,%d1 4e9ec: 2d41 fff8 movel %d1,%fp@(-8) 4e9f0: 2239 0006 15e4 movel 615e4 <_Thread_Dispatch_disable_level>,%d1 4e9f6: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4e9f8: 2d40 fffc movel %d0,%fp@(-4) 4e9fc: 23c1 0006 15e4 movel %d1,615e4 <_Thread_Dispatch_disable_level> 4ea02: 4879 0006 1e22 pea 61e22 <_Barrier_Information> 4ea08: 4eb9 0004 941c jsr 4941c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4ea0e: 588f addql #4,%sp 4ea10: 2640 moveal %d0,%a3 4ea12: 4a80 tstl %d0 4ea14: 668a bnes 4e9a0 _Thread_Enable_dispatch(); 4ea16: 4eb9 0004 a162 jsr 4a162 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 4ea1c: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4ea1e: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4ea24: 4e5e unlk %fp 4ea26: 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; 4ea28: 700a moveq #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4ea2a: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4ea30: 4e5e unlk %fp 4ea32: 4e75 rts if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 4ea34: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4ea36: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4ea3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048534 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 48534: 4e56 fff4 linkw %fp,#-12 48538: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4853c: 242e 0008 movel %fp@(8),%d2 48540: 246e 0010 moveal %fp@(16),%a2 Extension_Control *the_extension; if ( !id ) 48544: 4a8a tstl %a2 48546: 6700 00a0 beqw 485e8 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 4854a: 4a82 tstl %d2 4854c: 660c bnes 4855a return RTEMS_INVALID_NAME; 4854e: 7003 moveq #3,%d0 ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 48550: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 48556: 4e5e unlk %fp 48558: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4855a: 2039 0006 a0dc movel 6a0dc <_Thread_Dispatch_disable_level>,%d0 48560: 5280 addql #1,%d0 48562: 23c0 0006 a0dc movel %d0,6a0dc <_Thread_Dispatch_disable_level> #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 48568: 4879 0006 a26a pea 6a26a <_Extension_Information> 4856e: 4eb9 0004 9528 jsr 49528 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 48574: 588f addql #4,%sp 48576: 2640 moveal %d0,%a3 48578: 4a80 tstl %d0 4857a: 675a beqs 485d6 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 4857c: 206e 000c moveal %fp@(12),%a0 48580: 2758 0024 movel %a0@+,%a3@(36) 48584: 2758 0028 movel %a0@+,%a3@(40) 48588: 2758 002c movel %a0@+,%a3@(44) 4858c: 2758 0030 movel %a0@+,%a3@(48) 48590: 2758 0034 movel %a0@+,%a3@(52) 48594: 2758 0038 movel %a0@+,%a3@(56) 48598: 2758 003c movel %a0@+,%a3@(60) 4859c: 2750 0040 movel %a0@,%a3@(64) _User_extensions_Add_set( extension ); 485a0: 486b 0010 pea %a3@(16) 485a4: 4eb9 0004 b458 jsr 4b458 <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 485aa: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 485ae: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 485b0: 2079 0006 a282 moveal 6a282 <_Extension_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 485b6: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 485b8: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 485bc: 2742 000c movel %d2,%a3@(12) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 485c0: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 485c2: 4eb9 0004 a372 jsr 4a372 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 485c8: 588f addql #4,%sp 485ca: 4280 clrl %d0 } 485cc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 485d2: 4e5e unlk %fp 485d4: 4e75 rts _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 485d6: 4eb9 0004 a372 jsr 4a372 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 485dc: 7005 moveq #5,%d0 ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 485de: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 485e4: 4e5e unlk %fp 485e6: 4e75 rts ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 485e8: 7009 moveq #9,%d0 ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 485ea: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 485f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046d02 : 46d02: 7002 moveq #2,%d0 } void rtems_initialize_start_multitasking(void) { 46d04: 4e56 0000 linkw %fp,#0 ****** APPLICATION RUNS HERE ****** ****** RETURNS WHEN SYSTEM IS SHUT DOWN ****** ******************************************************************* ******************************************************************* *******************************************************************/ } 46d08: 4e5e unlk %fp 46d0a: 23c0 0005 fc4a movel %d0,5fc4a <_System_state_Current> void rtems_initialize_start_multitasking(void) { _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); _Thread_Start_multitasking(); 46d10: 4ef9 0004 94a4 jmp 494a4 <_Thread_Start_multitasking> ... =============================================================================== 00048248 : 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 ) { 48248: 4e56 fff4 linkw %fp,#-12 4824c: 226e 000c moveal %fp@(12),%a1 48250: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48254: 242e 0008 movel %fp@(8),%d2 48258: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 4825c: 2039 0006 4590 movel 64590 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 48262: 4ab9 0006 41a0 tstl 641a0 <_Per_CPU_Information+0x8> 48268: 6600 009c bnew 48306 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 4826c: 4a8a tstl %a2 4826e: 6700 00ea beqw 4835a return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 48272: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 48274: 4a89 tstl %a1 48276: 6700 00e2 beqw 4835a static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4827a: 4a91 tstl %a1@ 4827c: 6700 00d4 beqw 48352 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48280: b480 cmpl %d0,%d2 48282: 6476 bccs 482fa rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48284: 2039 0006 3d14 movel 63d14 <_Thread_Dispatch_disable_level>,%d0 4828a: 5280 addql #1,%d0 4828c: 23c0 0006 3d14 movel %d0,63d14 <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 48292: 4a82 tstl %d2 48294: 667c bnes 48312 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 48296: 2039 0006 4590 movel 64590 <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 4829c: 6700 0106 beqw 483a4 482a0: 2239 0006 4594 movel 64594 <_IO_Driver_address_table>,%d1 482a6: 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; 482a8: 4a90 tstl %a0@ 482aa: 6700 008e beqw 4833a 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 ) { 482ae: 5282 addql #1,%d2 482b0: 41e8 0018 lea %a0@(24),%a0 482b4: b480 cmpl %d0,%d2 482b6: 65f0 bcss 482a8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 482b8: 2482 movel %d2,%a2@ if ( m != n ) 482ba: b480 cmpl %d0,%d2 482bc: 6700 00e8 beqw 483a6 482c0: 2602 movel %d2,%d3 482c2: 2002 movel %d2,%d0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 482c4: 2041 moveal %d1,%a0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 482c6: e78b lsll #3,%d3 482c8: eb88 lsll #5,%d0 482ca: 9083 subl %d3,%d0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 482cc: d1c0 addal %d0,%a0 482ce: 20d9 movel %a1@+,%a0@+ 482d0: 20d9 movel %a1@+,%a0@+ 482d2: 20d9 movel %a1@+,%a0@+ 482d4: 20d9 movel %a1@+,%a0@+ 482d6: 20d9 movel %a1@+,%a0@+ 482d8: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 482da: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 482e0: 2d42 0008 movel %d2,%fp@(8) } 482e4: 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 ); 482ea: 42ae 0010 clrl %fp@(16) 482ee: 42ae 000c clrl %fp@(12) } 482f2: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 482f4: 4ef9 0005 08c0 jmp 508c0 if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 482fa: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 482fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48302: 4e5e unlk %fp 48304: 4e75 rts ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 48306: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48308: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4830e: 4e5e unlk %fp 48310: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 48312: 2202 movel %d2,%d1 48314: 2002 movel %d2,%d0 48316: e789 lsll #3,%d1 48318: eb88 lsll #5,%d0 4831a: 2079 0006 4594 moveal 64594 <_IO_Driver_address_table>,%a0 48320: 9081 subl %d1,%d0 48322: 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; 48324: 4a90 tstl %a0@ 48326: 673e beqs 48366 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(); 48328: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 4832e: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48330: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48336: 4e5e unlk %fp 48338: 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; 4833a: 4aa8 0004 tstl %a0@(4) 4833e: 6700 ff78 beqw 482b8 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 ) { 48342: 5282 addql #1,%d2 48344: 41e8 0018 lea %a0@(24),%a0 48348: b480 cmpl %d0,%d2 4834a: 6500 ff5c bcsw 482a8 4834e: 6000 ff68 braw 482b8 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48352: 4aa9 0004 tstl %a1@(4) 48356: 6600 ff28 bnew 48280 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 4835a: 7009 moveq #9,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 4835c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48362: 4e5e unlk %fp 48364: 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; 48366: 4aa8 0004 tstl %a0@(4) 4836a: 66bc bnes 48328 4836c: 2239 0006 4594 movel 64594 <_IO_Driver_address_table>,%d1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48372: 2041 moveal %d1,%a0 48374: d1c0 addal %d0,%a0 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 48376: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; 48378: 20d9 movel %a1@+,%a0@+ 4837a: 20d9 movel %a1@+,%a0@+ 4837c: 20d9 movel %a1@+,%a0@+ 4837e: 20d9 movel %a1@+,%a0@+ 48380: 20d9 movel %a1@+,%a0@+ 48382: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 48384: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 4838a: 2d42 0008 movel %d2,%fp@(8) } 4838e: 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 ); 48394: 42ae 0010 clrl %fp@(16) 48398: 42ae 000c clrl %fp@(12) } 4839c: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4839e: 4ef9 0005 08c0 jmp 508c0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 483a4: 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(); 483a6: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 483ac: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483ae: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000494cc : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 494cc: 4e56 fff0 linkw %fp,#-16 494d0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 494d4: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 494d8: 4a8b tstl %a3 494da: 6742 beqs 4951e <== NEVER TAKEN 494dc: 49f9 0006 a09c lea 6a09c <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 494e2: 205c moveal %a4@+,%a0 494e4: 4a88 tstl %a0 494e6: 672e beqs 49516 <== NEVER TAKEN continue; information = _Objects_Information_table[ api_index ][ 1 ]; 494e8: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 494ec: 4a8a tstl %a2 494ee: 6726 beqs 49516 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 494f0: 4a6a 000e tstw %a2@(14) 494f4: 6720 beqs 49516 494f6: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 494f8: 206a 0018 moveal %a2@(24),%a0 494fc: 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++ ) { 49500: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 49502: 4a80 tstl %d0 49504: 6706 beqs 4950c <== NEVER TAKEN continue; (*routine)(the_thread); 49506: 2f00 movel %d0,%sp@- 49508: 4e93 jsr %a3@ 4950a: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 4950c: 4280 clrl %d0 4950e: 302a 000e movew %a2@(14),%d0 49512: b480 cmpl %d0,%d2 49514: 63e2 blss 494f8 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 49516: b9fc 0006 a0a8 cmpal #434344,%a4 4951c: 66c4 bnes 494e2 (*routine)(the_thread); } } } 4951e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49524: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046644 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 46644: 7001 moveq #1,%d0 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 46646: 4e56 0000 linkw %fp,#0 4664a: 222e 0008 movel %fp@(8),%d1 4664e: 2f02 movel %d2,%sp@- const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 46650: b081 cmpl %d1,%d0 46652: 674e beqs 466a2 <== NEVER TAKEN api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 46654: 7402 moveq #2,%d2 46656: b481 cmpl %d1,%d2 46658: 6740 beqs 4669a <== NEVER TAKEN api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 4665a: 143c 0003 moveb #3,%d2 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 4665e: 203c 0005 ddb6 movel #384438,%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 ) 46664: b481 cmpl %d1,%d2 46666: 6708 beqs 46670 return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 46668: 242e fffc movel %fp@(-4),%d2 4666c: 4e5e unlk %fp 4666e: 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; 46670: 203c 0005 eef8 movel #388856,%d0 #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 46676: 2f2e 000c movel %fp@(12),%sp@- 4667a: 2f00 movel %d0,%sp@- 4667c: 4eb9 0004 b424 jsr 4b424 if ( class_assoc ) 46682: 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 ); 46684: 2040 moveal %d0,%a0 if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; 46686: 203c 0005 ddbe movel #384446,%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 ) 4668c: 4a88 tstl %a0 4668e: 67d8 beqs 46668 return class_assoc->name; return "BAD CLASS"; } 46690: 242e fffc movel %fp@(-4),%d2 46694: 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; 46696: 2010 movel %a0@,%d0 return "BAD CLASS"; } 46698: 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; 4669a: 203c 0005 ee80 movel #388736,%d0 466a0: 60d4 bras 46676 { 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; 466a2: 203c 0005 ee68 movel #388712,%d0 466a8: 60cc bras 46676 ... =============================================================================== 0004808c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 4808c: 4e56 0000 linkw %fp,#0 48090: 2f0a movel %a2,%sp@- 48092: 246e 0010 moveal %fp@(16),%a2 48096: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 48098: 4a8a tstl %a2 4809a: 6766 beqs 48102 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 4809c: 2f2e 000c movel %fp@(12),%sp@- 480a0: 2f2e 0008 movel %fp@(8),%sp@- 480a4: 4eb9 0004 9dec jsr 49dec <_Objects_Get_information> if ( !obj_info ) 480aa: 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 ); 480ac: 2040 moveal %d0,%a0 if ( !obj_info ) 480ae: 4a80 tstl %d0 480b0: 675e beqs 48110 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 480b2: 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; 480b6: 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; 480b8: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 480be: 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; 480c2: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 480c8: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 480cc: 6750 beqs 4811e <== NEVER TAKEN 480ce: 2068 0018 moveal %a0@(24),%a0 480d2: 7201 moveq #1,%d1 480d4: 7001 moveq #1,%d0 480d6: 93c9 subal %a1,%a1 480d8: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 480da: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 480de: 6718 beqs 480f8 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++ ) 480e0: 2200 movel %d0,%d1 480e2: b082 cmpl %d2,%d0 480e4: 63f2 blss 480d8 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 480e6: 2549 000e movel %a1,%a2@(14) return RTEMS_SUCCESSFUL; 480ea: 4280 clrl %d0 } 480ec: 242e fff8 movel %fp@(-8),%d2 480f0: 246e fffc moveal %fp@(-4),%a2 480f4: 4e5e unlk %fp 480f6: 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++; 480f8: 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++ ) 480fa: 2200 movel %d0,%d1 480fc: b082 cmpl %d2,%d0 480fe: 63d8 blss 480d8 <== NEVER TAKEN 48100: 60e4 bras 480e6 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 48102: 242e fff8 movel %fp@(-8),%d2 /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 48106: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 48108: 246e fffc moveal %fp@(-4),%a2 4810c: 4e5e unlk %fp 4810e: 4e75 rts 48110: 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; 48114: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 48116: 246e fffc moveal %fp@(-4),%a2 4811a: 4e5e unlk %fp 4811c: 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++ ) 4811e: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; 48120: 4280 clrl %d0 <== NOT EXECUTED for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 48122: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 48126: 60c4 bras 480ec <== NOT EXECUTED =============================================================================== 00056a40 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 56a40: 4e56 ffe8 linkw %fp,#-24 56a44: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 56a48: 242e 0008 movel %fp@(8),%d2 56a4c: 2a2e 000c movel %fp@(12),%d5 56a50: 282e 0010 movel %fp@(16),%d4 56a54: 262e 0014 movel %fp@(20),%d3 56a58: 246e 001c moveal %fp@(28),%a2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 56a5c: 4a82 tstl %d2 56a5e: 673a beqs 56a9a return RTEMS_INVALID_NAME; if ( !starting_address ) 56a60: 4a85 tstl %d5 56a62: 671e beqs 56a82 return RTEMS_INVALID_ADDRESS; if ( !id ) 56a64: 4a8a tstl %a2 56a66: 671a beqs 56a82 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 56a68: 4a84 tstl %d4 56a6a: 6722 beqs 56a8e 56a6c: 4a83 tstl %d3 56a6e: 671e beqs 56a8e 56a70: b684 cmpl %d4,%d3 56a72: 621a bhis 56a8e */ RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned ( uint32_t buffer_size ) { return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0); 56a74: 7003 moveq #3,%d0 56a76: c083 andl %d3,%d0 56a78: 6614 bnes 56a8e ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 56a7a: 103c 0003 moveb #3,%d0 56a7e: c085 andl %d5,%d0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 56a80: 6724 beqs 56aa6 return RTEMS_INVALID_ADDRESS; 56a82: 7009 moveq #9,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56a84: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a8a: 4e5e unlk %fp 56a8c: 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; 56a8e: 7008 moveq #8,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56a90: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a96: 4e5e unlk %fp 56a98: 4e75 rts ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 56a9a: 7003 moveq #3,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56a9c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56aa2: 4e5e unlk %fp 56aa4: 4e75 rts 56aa6: 2039 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d0 56aac: 5280 addql #1,%d0 56aae: 23c0 0007 eac0 movel %d0,7eac0 <_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 ); 56ab4: 4879 0007 e952 pea 7e952 <_Partition_Information> 56aba: 4eb9 0005 b744 jsr 5b744 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 56ac0: 588f addql #4,%sp 56ac2: 2640 moveal %d0,%a3 56ac4: 4a80 tstl %d0 56ac6: 6758 beqs 56b20 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 56ac8: 2744 0014 movel %d4,%a3@(20) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 56acc: 276e 0018 001c movel %fp@(24),%a3@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 56ad2: 4c43 4004 remul %d3,%d4,%d4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 56ad6: 2745 0010 movel %d5,%a3@(16) the_partition->length = length; the_partition->buffer_size = buffer_size; 56ada: 2743 0018 movel %d3,%a3@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 56ade: 42ab 0020 clrl %a3@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 56ae2: 2f03 movel %d3,%sp@- 56ae4: 2f04 movel %d4,%sp@- 56ae6: 2f05 movel %d5,%sp@- 56ae8: 486b 0024 pea %a3@(36) 56aec: 4eb9 0005 9fac jsr 59fac <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 56af2: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 56af6: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 56af8: 2079 0007 e96a moveal 7e96a <_Partition_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 56afe: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 56b00: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 56b04: 2742 000c movel %d2,%a3@(12) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 56b08: 2480 movel %d0,%a2@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 56b0a: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 56b10: 4fef 0010 lea %sp@(16),%sp 56b14: 4280 clrl %d0 } 56b16: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56b1c: 4e5e unlk %fp 56b1e: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 56b20: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 56b26: 7005 moveq #5,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56b28: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56b2e: 4e5e unlk %fp ... =============================================================================== 00056ba4 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 56ba4: 4e56 fff0 linkw %fp,#-16 56ba8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 56bac: 246e 000c moveal %fp@(12),%a2 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 56bb0: 4a8a tstl %a2 56bb2: 6754 beqs 56c08 <== NEVER TAKEN Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 56bb4: 486e fffc pea %fp@(-4) 56bb8: 2f2e 0008 movel %fp@(8),%sp@- 56bbc: 4879 0007 e952 pea 7e952 <_Partition_Information> 56bc2: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56bc8: 4fef 000c lea %sp@(12),%sp 56bcc: 2640 moveal %d0,%a3 56bce: 4aae fffc tstl %fp@(-4) 56bd2: 6628 bnes 56bfc */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 56bd4: 486b 0024 pea %a3@(36) 56bd8: 4eb9 0005 9f70 jsr 59f70 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 56bde: 588f addql #4,%sp 56be0: 2400 movel %d0,%d2 56be2: 6730 beqs 56c14 the_partition->number_of_used_blocks += 1; 56be4: 52ab 0020 addql #1,%a3@(32) _Thread_Enable_dispatch(); 56be8: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> *buffer = the_buffer; return RTEMS_SUCCESSFUL; 56bee: 4280 clrl %d0 case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; 56bf0: 2482 movel %d2,%a2@ case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bf2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56bf8: 4e5e unlk %fp 56bfa: 4e75 rts case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 56bfc: 7004 moveq #4,%d0 } 56bfe: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56c04: 4e5e unlk %fp 56c06: 4e75 rts register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 56c08: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56c0a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56c10: 4e5e unlk %fp 56c12: 4e75 rts the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56c14: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 56c1a: 700d moveq #13,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56c1c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56c22: 4e5e unlk %fp ... =============================================================================== 00056c54 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 56c54: 4e56 fffc linkw %fp,#-4 56c58: 2f0a movel %a2,%sp@- 56c5a: 2f02 movel %d2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 56c5c: 486e fffc pea %fp@(-4) 56c60: 2f2e 0008 movel %fp@(8),%sp@- 56c64: 4879 0007 e952 pea 7e952 <_Partition_Information> 56c6a: 242e 000c movel %fp@(12),%d2 56c6e: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56c74: 4fef 000c lea %sp@(12),%sp 56c78: 2440 moveal %d0,%a2 56c7a: 4aae fffc tstl %fp@(-4) 56c7e: 670e beqs 56c8e case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56c80: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 56c84: 7004 moveq #4,%d0 } 56c86: 246e fff8 moveal %fp@(-8),%a2 56c8a: 4e5e unlk %fp 56c8c: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 56c8e: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 56c92: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 56c96: b082 cmpl %d2,%d0 56c98: 623c bhis 56cd6 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 56c9a: d280 addl %d0,%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 56c9c: b282 cmpl %d2,%d1 56c9e: 6536 bcss 56cd6 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 56ca0: 2202 movel %d2,%d1 56ca2: 9280 subl %d0,%d1 56ca4: 2001 movel %d1,%d0 offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 56ca6: 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 ) && 56cac: 4a81 tstl %d1 56cae: 6626 bnes 56cd6 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 56cb0: 2f02 movel %d2,%sp@- 56cb2: 486a 0024 pea %a2@(36) 56cb6: 4eb9 0005 9f10 jsr 59f10 <_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; 56cbc: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 56cc0: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56cc6: 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; 56cca: 508f addql #8,%sp 56ccc: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56cce: 246e fff8 moveal %fp@(-8),%a2 56cd2: 4e5e unlk %fp 56cd4: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56cd6: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56cdc: 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; 56ce0: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56ce2: 246e fff8 moveal %fp@(-8),%a2 56ce6: 4e5e unlk %fp ... =============================================================================== 000476e0 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 476e0: 4e56 ffec linkw %fp,#-20 476e4: 48d7 040c moveml %d2-%d3/%a2,%sp@ Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 476e8: 486e fffc pea %fp@(-4) 476ec: 242e 0008 movel %fp@(8),%d2 476f0: 2f02 movel %d2,%sp@- 476f2: 4879 0006 1b1c pea 61b1c <_Rate_monotonic_Information> 476f8: 4eb9 0004 9b08 jsr 49b08 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 476fe: 4fef 000c lea %sp@(12),%sp 47702: 2440 moveal %d0,%a2 47704: 4aae fffc tstl %fp@(-4) 47708: 661e bnes 47728 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 4770a: 2039 0006 20a8 movel 620a8 <_Per_CPU_Information+0xc>,%d0 47710: b0aa 0040 cmpl %a2@(64),%d0 47714: 671e beqs 47734 _Thread_Enable_dispatch(); 47716: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 4771c: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4771e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47724: 4e5e unlk %fp 47726: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 47728: 7004 moveq #4,%d0 } 4772a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47730: 4e5e unlk %fp 47732: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 47734: 4aae 000c tstl %fp@(12) 47738: 6700 00ce beqw 47808 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 4773c: 203c 0000 0700 movel #1792,%d0 47742: 40c3 movew %sr,%d3 47744: 8083 orl %d3,%d0 47746: 46c0 movew %d0,%sr switch ( the_period->state ) { 47748: 202a 0038 movel %a2@(56),%d0 4774c: 7202 moveq #2,%d1 4774e: b280 cmpl %d0,%d1 47750: 6700 00e4 beqw 47836 47754: 123c 0004 moveb #4,%d1 47758: b280 cmpl %d0,%d1 4775a: 6762 beqs 477be 4775c: 4a80 tstl %d0 4775e: 66c8 bnes 47728 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 47760: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 47762: 2f0a movel %a2,%sp@- 47764: 2d40 fff8 movel %d0,%fp@(-8) 47768: 4eb9 0004 7548 jsr 47548 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4776e: 223c 0004 7b44 movel #293700,%d1 the_watchdog->id = id; 47774: 2542 0030 movel %d2,%a2@(48) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 47778: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4777c: 2541 002c movel %d1,%a2@(44) /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); the_period->state = RATE_MONOTONIC_ACTIVE; 47780: 7202 moveq #2,%d1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47782: 42aa 0018 clrl %a2@(24) 47786: 2541 0038 movel %d1,%a2@(56) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4778a: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 4778e: 2542 003c movel %d2,%a2@(60) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47792: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47796: 486a 0010 pea %a2@(16) 4779a: 4879 0006 1cda pea 61cda <_Watchdog_Ticks_chain> 477a0: 4eb9 0004 b714 jsr 4b714 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 477a6: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 477ac: 202e fff8 movel %fp@(-8),%d0 477b0: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 477b4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477ba: 4e5e unlk %fp 477bc: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 477be: 2f0a movel %a2,%sp@- 477c0: 4eb9 0004 75c6 jsr 475c6 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 477c6: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 477c8: 7402 moveq #2,%d2 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 477ca: 7006 moveq #6,%d0 _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; 477cc: 222e 000c movel %fp@(12),%d1 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 477d0: 2542 0038 movel %d2,%a2@(56) the_period->next_length = length; 477d4: 2541 003c movel %d1,%a2@(60) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 477d8: 2541 001c movel %d1,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 477dc: 486a 0010 pea %a2@(16) 477e0: 4879 0006 1cda pea 61cda <_Watchdog_Ticks_chain> 477e6: 2d40 fff8 movel %d0,%fp@(-8) 477ea: 4eb9 0004 b714 jsr 4b714 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 477f0: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 477f6: 202e fff8 movel %fp@(-8),%d0 477fa: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 477fe: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47804: 4e5e unlk %fp 47806: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 47808: 202a 0038 movel %a2@(56),%d0 4780c: 7204 moveq #4,%d1 4780e: b280 cmpl %d0,%d1 47810: 6500 00a4 bcsw 478b6 47814: 41f9 0005 f2ba lea 5f2ba ,%a0 4781a: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 4781e: 2d40 fff8 movel %d0,%fp@(-8) 47822: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch> return( return_value ); 47828: 202e fff8 movel %fp@(-8),%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4782c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47832: 4e5e unlk %fp 47834: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 47836: 2f0a movel %a2,%sp@- 47838: 4eb9 0004 75c6 jsr 475c6 <_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; the_period->next_length = length; 4783e: 222e 000c movel %fp@(12),%d1 /* * 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; 47842: 7001 moveq #1,%d0 the_period->next_length = length; 47844: 2541 003c movel %d1,%a2@(60) /* * 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; 47848: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 4784c: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 4784e: 2079 0006 20a8 moveal 620a8 <_Per_CPU_Information+0xc>,%a0 47854: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 4785a: 4878 4000 pea 4000 4785e: 2f08 movel %a0,%sp@- 47860: 4eb9 0004 add8 jsr 4add8 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 47866: 203c 0000 0700 movel #1792,%d0 4786c: 40c1 movew %sr,%d1 4786e: 8081 orl %d1,%d0 47870: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 47872: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 47874: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 47878: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 4787c: 46c1 movew %d1,%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 ) 4787e: 7203 moveq #3,%d1 47880: 4fef 000c lea %sp@(12),%sp 47884: b280 cmpl %d0,%d1 47886: 6712 beqs 4789a _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 47888: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4788e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47890: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47896: 4e5e unlk %fp 47898: 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 ); 4789a: 4878 4000 pea 4000 4789e: 2f39 0006 20a8 movel 620a8 <_Per_CPU_Information+0xc>,%sp@- 478a4: 4eb9 0004 a02c jsr 4a02c <_Thread_Clear_state> 478aa: 508f addql #8,%sp _Thread_Enable_dispatch(); 478ac: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 478b2: 4280 clrl %d0 478b4: 60da bras 47890 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 478b6: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 478b8: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 478bc: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 478c2: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 478c6: 6000 ff64 braw 4782c <== NOT EXECUTED ... =============================================================================== 000478cc : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 478cc: 4e56 ff78 linkw %fp,#-136 478d0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 478d4: 262e 0008 movel %fp@(8),%d3 478d8: 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 ) 478dc: 4a8a tstl %a2 478de: 6700 0082 beqw 47962 return; (*print)( context, "Period information by period\n" ); 478e2: 4879 0005 f2ce pea 5f2ce 478e8: 2f03 movel %d3,%sp@- 478ea: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 478ec: 4879 0005 f2ec pea 5f2ec 478f2: 2f03 movel %d3,%sp@- 478f4: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 478f6: 4879 0005 f30e pea 5f30e 478fc: 2f03 movel %d3,%sp@- 478fe: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 47900: 4879 0005 f331 pea 5f331 47906: 2f03 movel %d3,%sp@- 47908: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 4790a: 4fef 001c lea %sp@(28),%sp 4790e: 2ebc 0005 f37c movel #390012,%sp@ 47914: 2f03 movel %d3,%sp@- 47916: 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 ; 47918: 2439 0006 1b22 movel 61b22 <_Rate_monotonic_Information+0x6>,%d2 4791e: 508f addql #8,%sp 47920: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2 47926: 623a bhis 47962 <== NEVER TAKEN 47928: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 4792a: 2a0e movel %fp,%d5 4792c: 0684 ffff ffa2 addil #-94,%d4 47932: 47f9 0004 de00 lea 4de00 ,%a3 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 47938: 4bf9 0004 dec0 lea 4dec0 ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 4793e: 5b85 subql #5,%d5 47940: 49f9 0004 7c24 lea 47c24 ,%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 ); 47946: 2e3c 0004 b314 movel #307988,%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 ); 4794c: 2f04 movel %d4,%sp@- 4794e: 2f02 movel %d2,%sp@- 47950: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 47952: 508f addql #8,%sp 47954: 4a80 tstl %d0 47956: 6714 beqs 4796c * 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++ ) { 47958: 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 ; 4795a: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2 47960: 63ea blss 4794c the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 47962: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47968: 4e5e unlk %fp 4796a: 4e75 rts status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 4796c: 486e ffda pea %fp@(-38) 47970: 2f02 movel %d2,%sp@- 47972: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47974: 2f05 movel %d5,%sp@- 47976: 4878 0005 pea 5 4797a: 2f2e ffda movel %fp@(-38),%sp@- 4797e: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 47980: 2f2e ffa6 movel %fp@(-90),%sp@- 47984: 2f2e ffa2 movel %fp@(-94),%sp@- 47988: 2f05 movel %d5,%sp@- 4798a: 2f02 movel %d2,%sp@- 4798c: 4879 0005 f3c8 pea 5f3c8 47992: 2f03 movel %d3,%sp@- 47994: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 47996: 202e ffa2 movel %fp@(-94),%d0 4799a: 4fef 002c lea %sp@(44),%sp 4799e: 6618 bnes 479b8 (*print)( context, "\n" ); 479a0: 4879 0005 f266 pea 5f266 * 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++ ) { 479a6: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 479a8: 2f03 movel %d3,%sp@- 479aa: 4e92 jsr %a2@ continue; 479ac: 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 ; 479ae: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2 479b4: 6396 blss 4794c <== ALWAYS TAKEN 479b6: 60aa bras 47962 <== 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 ); 479b8: 486e fff2 pea %fp@(-14) 479bc: 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++ ) { 479be: 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 ); 479c0: 2f00 movel %d0,%sp@- 479c2: 486e ffba pea %fp@(-70) 479c6: 4e90 jsr %a0@ (*print)( context, 479c8: 202e fff6 movel %fp@(-10),%d0 479cc: 223c 0000 03e8 movel #1000,%d1 479d2: 4c41 0800 remsl %d1,%d0,%d0 479d6: 2c2e ffb6 movel %fp@(-74),%d6 479da: 2f00 movel %d0,%sp@- 479dc: 2001 movel %d1,%d0 479de: 2f2e fff2 movel %fp@(-14),%sp@- 479e2: 4c40 6806 remsl %d0,%d6,%d6 479e6: 202e ffae movel %fp@(-82),%d0 479ea: 2246 moveal %d6,%a1 479ec: 223c 0000 03e8 movel #1000,%d1 479f2: 2f09 movel %a1,%sp@- 479f4: 2f2e ffb2 movel %fp@(-78),%sp@- 479f8: 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, 479fc: 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, 47a02: 2f00 movel %d0,%sp@- 47a04: 2f2e ffaa movel %fp@(-86),%sp@- 47a08: 4879 0005 f3df pea 5f3df 47a0e: 2f03 movel %d3,%sp@- 47a10: 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); 47a12: 4fef 002c lea %sp@(44),%sp 47a16: 2047 moveal %d7,%a0 47a18: 486e fff2 pea %fp@(-14) 47a1c: 2f2e ffa2 movel %fp@(-94),%sp@- 47a20: 486e ffd2 pea %fp@(-46) 47a24: 4e90 jsr %a0@ (*print)( context, 47a26: 202e fff6 movel %fp@(-10),%d0 47a2a: 4c46 0800 remsl %d6,%d0,%d0 47a2e: 222e ffce movel %fp@(-50),%d1 47a32: 2f00 movel %d0,%sp@- 47a34: 2f2e fff2 movel %fp@(-14),%sp@- 47a38: 4c46 1801 remsl %d6,%d1,%d1 47a3c: 202e ffc6 movel %fp@(-58),%d0 47a40: 2241 moveal %d1,%a1 47a42: 2f09 movel %a1,%sp@- 47a44: 2f2e ffca movel %fp@(-54),%sp@- 47a48: 4c46 0800 remsl %d6,%d0,%d0 47a4c: 2f00 movel %d0,%sp@- 47a4e: 2f2e ffc2 movel %fp@(-62),%sp@- 47a52: 4879 0005 f3fe pea 5f3fe 47a58: 2f03 movel %d3,%sp@- 47a5a: 4e92 jsr %a2@ 47a5c: 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 ; 47a60: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2 47a66: 6300 fee4 blsw 4794c 47a6a: 6000 fef6 braw 47962 <== NOT EXECUTED =============================================================================== 00047a88 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 47a88: 4e56 0000 linkw %fp,#0 47a8c: 2039 0006 1c18 movel 61c18 <_Thread_Dispatch_disable_level>,%d0 47a92: 5280 addql #1,%d0 47a94: 2f0a movel %a2,%sp@- 47a96: 23c0 0006 1c18 movel %d0,61c18 <_Thread_Dispatch_disable_level> 47a9c: 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 ; 47a9e: 2439 0006 1b22 movel 61b22 <_Rate_monotonic_Information+0x6>,%d2 47aa4: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2 47aaa: 6216 bhis 47ac2 <== NEVER TAKEN 47aac: 45f9 0004 7ad4 lea 47ad4 ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 47ab2: 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++ ) { 47ab4: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 47ab6: 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 ; 47ab8: 588f addql #4,%sp 47aba: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2 47ac0: 63f0 blss 47ab2 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 47ac2: 242e fff8 movel %fp@(-8),%d2 47ac6: 246e fffc moveal %fp@(-4),%a2 47aca: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 47acc: 4ef9 0004 a412 jmp 4a412 <_Thread_Enable_dispatch> ... =============================================================================== 00057788 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 57788: 4e56 fff8 linkw %fp,#-8 5778c: 2f0a movel %a2,%sp@- 5778e: 2f02 movel %d2,%sp@- 57790: 242e 000c movel %fp@(12),%d2 bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 57794: 6700 0086 beqw 5781c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 57798: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 5779e: 4eb9 0005 9e7c jsr 59e7c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 577a4: 486e fff8 pea %fp@(-8) 577a8: 2f2e 0008 movel %fp@(8),%sp@- 577ac: 4879 0007 e9c6 pea 7e9c6 <_Region_Information> 577b2: 4eb9 0005 bc00 jsr 5bc00 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 577b8: 4fef 0010 lea %sp@(16),%sp 577bc: 2440 moveal %d0,%a2 577be: 4aae fff8 tstl %fp@(-8) 577c2: 6646 bnes 5780a <== NEVER TAKEN case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 577c4: 486e fffc pea %fp@(-4) 577c8: 2f2e 0010 movel %fp@(16),%sp@- 577cc: 2f02 movel %d2,%sp@- 577ce: 486a 0068 pea %a2@(104) 577d2: 4eb9 0005 acc0 jsr 5acc0 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 577d8: 4fef 0010 lea %sp@(16),%sp 577dc: 4a00 tstb %d0 577de: 674c beqs 5782c the_region->length += amount_extended; 577e0: 202e fffc movel %fp@(-4),%d0 577e4: d1aa 0054 addl %d0,%a2@(84) the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; 577e8: 4282 clrl %d2 &amount_extended ); if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; 577ea: d1aa 005c addl %d0,%a2@(92) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 577ee: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 577f4: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> return return_status; 577fa: 588f addql #4,%sp } 577fc: 2002 movel %d2,%d0 577fe: 242e fff0 movel %fp@(-16),%d2 57802: 246e fff4 moveal %fp@(-12),%a2 57806: 4e5e unlk %fp 57808: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5780a: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 57810: 7404 moveq #4,%d2 break; } _RTEMS_Unlock_allocator(); 57812: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> return return_status; 57818: 588f addql #4,%sp 5781a: 60e0 bras 577fc Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 5781c: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 5781e: 2002 movel %d2,%d0 57820: 242e fff0 movel %fp@(-16),%d2 57824: 246e fff4 moveal %fp@(-12),%a2 57828: 4e5e unlk %fp 5782a: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5782c: 2f39 0007 eb62 movel 7eb62 <_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; 57832: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57834: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> return return_status; 5783a: 588f addql #4,%sp 5783c: 60be bras 577fc ... =============================================================================== 00057ac4 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 57ac4: 4e56 fffc linkw %fp,#-4 57ac8: 2f03 movel %d3,%sp@- 57aca: 262e 0010 movel %fp@(16),%d3 57ace: 2f02 movel %d2,%sp@- 57ad0: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 57ad4: 6700 0092 beqw 57b68 return RTEMS_INVALID_ADDRESS; if ( !size ) 57ad8: 4a83 tstl %d3 57ada: 6700 008c beqw 57b68 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 57ade: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 57ae4: 4eb9 0005 9e7c jsr 59e7c <_API_Mutex_Lock> 57aea: 486e fffc pea %fp@(-4) 57aee: 2f2e 0008 movel %fp@(8),%sp@- 57af2: 4879 0007 e9c6 pea 7e9c6 <_Region_Information> 57af8: 4eb9 0005 bc00 jsr 5bc00 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57afe: 222e fffc movel %fp@(-4),%d1 57b02: 4fef 0010 lea %sp@(16),%sp 57b06: 6636 bnes 57b3e case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57b08: 2f03 movel %d3,%sp@- 57b0a: 2040 moveal %d0,%a0 57b0c: 2f02 movel %d2,%sp@- 57b0e: 4868 0068 pea %a0@(104) 57b12: 4eb9 0005 b61c jsr 5b61c <_Heap_Size_of_alloc_area> 57b18: 4fef 000c lea %sp@(12),%sp 57b1c: 4a00 tstb %d0 57b1e: 6624 bnes 57b44 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57b20: 2f39 0007 eb62 movel 7eb62 <_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; 57b26: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57b28: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 57b2e: 588f addql #4,%sp <== NOT EXECUTED } 57b30: 2002 movel %d2,%d0 57b32: 242e fff4 movel %fp@(-12),%d2 57b36: 262e fff8 movel %fp@(-8),%d3 57b3a: 4e5e unlk %fp 57b3c: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57b3e: 7001 moveq #1,%d0 57b40: b081 cmpl %d1,%d0 57b42: 6712 beqs 57b56 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57b44: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 57b4a: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57b4c: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> return return_status; 57b52: 588f addql #4,%sp 57b54: 60da bras 57b30 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57b56: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- case OBJECTS_REMOTE: /* this error cannot be returned */ break; #endif case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; 57b5c: 7404 moveq #4,%d2 break; } _RTEMS_Unlock_allocator(); 57b5e: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> return return_status; 57b64: 588f addql #4,%sp 57b66: 60c8 bras 57b30 if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 57b68: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 57b6a: 2002 movel %d2,%d0 57b6c: 242e fff4 movel %fp@(-12),%d2 57b70: 262e fff8 movel %fp@(-8),%d3 57b74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057ba4 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 57ba4: 4e56 fff0 linkw %fp,#-16 57ba8: 2f0b movel %a3,%sp@- 57baa: 2f0a movel %a2,%sp@- 57bac: 246e 0014 moveal %fp@(20),%a2 uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 57bb0: 4a8a tstl %a2 57bb2: 6700 00a4 beqw 57c58 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 57bb6: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 57bbc: 4eb9 0005 9e7c jsr 59e7c <_API_Mutex_Lock> 57bc2: 486e fff8 pea %fp@(-8) 57bc6: 2f2e 0008 movel %fp@(8),%sp@- 57bca: 4879 0007 e9c6 pea 7e9c6 <_Region_Information> 57bd0: 4eb9 0005 bc00 jsr 5bc00 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57bd6: 4fef 0010 lea %sp@(16),%sp 57bda: 2640 moveal %d0,%a3 57bdc: 4aae fff8 tstl %fp@(-8) 57be0: 663e bnes 57c20 <== NEVER TAKEN case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 57be2: 486e fffc pea %fp@(-4) 57be6: 486e fff4 pea %fp@(-12) 57bea: 2f2e 0010 movel %fp@(16),%sp@- 57bee: 2f2e 000c movel %fp@(12),%sp@- 57bf2: 486b 0068 pea %a3@(104) 57bf6: 4eb9 0005 b530 jsr 5b530 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 57bfc: 24ae fff4 movel %fp@(-12),%a2@ _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 57c00: 4fef 0014 lea %sp@(20),%sp 57c04: 4a80 tstl %d0 57c06: 6634 bnes 57c3c _Region_Process_queue( the_region ); /* unlocks allocator */ 57c08: 2f0b movel %a3,%sp@- 57c0a: 4eb9 0006 01a0 jsr 601a0 <_Region_Process_queue> break; } _RTEMS_Unlock_allocator(); return return_status; } 57c10: 246e ffe8 moveal %fp@(-24),%a2 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ 57c14: 588f addql #4,%sp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 57c16: 4280 clrl %d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 57c18: 266e ffec moveal %fp@(-20),%a3 57c1c: 4e5e unlk %fp 57c1e: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57c20: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 57c26: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> return return_status; } 57c2c: 246e ffe8 moveal %fp@(-24),%a2 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 57c30: 588f addql #4,%sp 57c32: 7004 moveq #4,%d0 } 57c34: 266e ffec moveal %fp@(-20),%a3 57c38: 4e5e unlk %fp 57c3a: 4e75 rts _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 57c3c: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 57c42: 2d40 fff0 movel %d0,%fp@(-16) 57c46: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 57c4c: 202e fff0 movel %fp@(-16),%d0 57c50: 588f addql #4,%sp 57c52: 7201 moveq #1,%d1 57c54: b280 cmpl %d0,%d1 57c56: 670e beqs 57c66 break; } _RTEMS_Unlock_allocator(); return return_status; } 57c58: 246e ffe8 moveal %fp@(-24),%a2 if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) return RTEMS_UNSATISFIED; return RTEMS_INVALID_ADDRESS; 57c5c: 7009 moveq #9,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 57c5e: 266e ffec moveal %fp@(-20),%a3 57c62: 4e5e unlk %fp 57c64: 4e75 rts 57c66: 246e ffe8 moveal %fp@(-24),%a2 if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) return RTEMS_UNSATISFIED; 57c6a: 700d moveq #13,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 57c6c: 266e ffec moveal %fp@(-20),%a3 57c70: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046570 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 46570: 4e56 fffc linkw %fp,#-4 46574: 2f0a movel %a2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 46576: 486e fffc pea %fp@(-4) 4657a: 2f2e 0008 movel %fp@(8),%sp@- 4657e: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 46584: 4eb9 0004 7fa4 jsr 47fa4 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4658a: 4fef 000c lea %sp@(12),%sp 4658e: 2440 moveal %d0,%a2 46590: 4aae fffc tstl %fp@(-4) 46594: 670a beqs 465a0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46596: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4659a: 7004 moveq #4,%d0 } 4659c: 4e5e unlk %fp 4659e: 4e75 rts 465a0: 7030 moveq #48,%d0 465a2: 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) ) { 465a6: 6760 beqs 46608 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 465a8: 4aaa 0062 tstl %a2@(98) 465ac: 6616 bnes 465c4 465ae: 7220 moveq #32,%d1 465b0: b280 cmpl %d0,%d1 465b2: 6710 beqs 465c4 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 465b4: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 465ba: 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; 465be: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 465c0: 4e5e unlk %fp 465c2: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 465c4: 4878 0004 pea 4 465c8: 42a7 clrl %sp@- 465ca: 486a 0014 pea %a2@(20) 465ce: 4eb9 0004 7134 jsr 47134 <_CORE_mutex_Flush> 465d4: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 465d8: 2f0a movel %a2,%sp@- 465da: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 465e0: 4eb9 0004 7b78 jsr 47b78 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 465e6: 2f0a movel %a2,%sp@- 465e8: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 465ee: 4eb9 0004 7e3c jsr 47e3c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 465f4: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 465fa: 4fef 0010 lea %sp@(16),%sp 465fe: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46600: 246e fff8 moveal %fp@(-8),%a2 46604: 4e5e unlk %fp 46606: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 46608: 4878 0002 pea 2 4660c: 42a7 clrl %sp@- 4660e: 486a 0014 pea %a2@(20) 46612: 4eb9 0004 746c jsr 4746c <_CORE_semaphore_Flush> 46618: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 4661c: 2f0a movel %a2,%sp@- 4661e: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 46624: 4eb9 0004 7b78 jsr 47b78 <_Objects_Close> 4662a: 2f0a movel %a2,%sp@- 4662c: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 46632: 4eb9 0004 7e3c jsr 47e3c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 46638: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4663e: 4fef 0010 lea %sp@(16),%sp 46642: 4280 clrl %d0 46644: 60ba bras 46600 ... =============================================================================== 000503d0 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 503d0: 4e56 fffc linkw %fp,#-4 503d4: 486e fffc pea %fp@(-4) 503d8: 2f2e 0008 movel %fp@(8),%sp@- 503dc: 4879 0006 3c54 pea 63c54 <_Semaphore_Information> 503e2: 4eb9 0004 955c jsr 4955c <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 503e8: 4fef 000c lea %sp@(12),%sp 503ec: 4aae fffc tstl %fp@(-4) 503f0: 6706 beqs 503f8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 503f2: 7004 moveq #4,%d0 } 503f4: 4e5e unlk %fp 503f6: 4e75 rts 503f8: 7230 moveq #48,%d1 503fa: 2040 moveal %d0,%a0 503fc: 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) ) { 50400: 6720 beqs 50422 _CORE_mutex_Flush( 50402: 4878 0001 pea 1 50406: 42a7 clrl %sp@- 50408: 4868 0014 pea %a0@(20) 5040c: 4eb9 0004 86ec jsr 486ec <_CORE_mutex_Flush> 50412: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50416: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5041c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5041e: 4e5e unlk %fp 50420: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 50422: 4878 0001 pea 1 50426: 2040 moveal %d0,%a0 50428: 42a7 clrl %sp@- 5042a: 4868 0014 pea %a0@(20) 5042e: 4eb9 0004 8a24 jsr 48a24 <_CORE_semaphore_Flush> 50434: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50438: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5043e: 4280 clrl %d0 50440: 60dc bras 5041e ... =============================================================================== 00046648 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 46648: 4e56 ffec linkw %fp,#-20 4664c: 48d7 001c moveml %d2-%d4,%sp@ Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level ); 46650: 486e fff8 pea %fp@(-8) 46654: 486e fffc pea %fp@(-4) 46658: 242e 0008 movel %fp@(8),%d2 4665c: 2f02 movel %d2,%sp@- 4665e: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 46664: 262e 000c movel %fp@(12),%d3 46668: 282e 0010 movel %fp@(16),%d4 4666c: 4eb9 0004 7f44 jsr 47f44 <_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 ) { 46672: 4fef 0010 lea %sp@(16),%sp 46676: 4aae fffc tstl %fp@(-4) 4667a: 670c beqs 46688 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4667c: 7004 moveq #4,%d0 } 4667e: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 46684: 4e5e unlk %fp 46686: 4e75 rts 46688: 7230 moveq #48,%d1 4668a: 2040 moveal %d0,%a0 4668c: 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) ) { 46690: 6738 beqs 466ca _CORE_mutex_Seize( 46692: 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; 46696: 7201 moveq #1,%d1 46698: c681 andl %d1,%d3 4669a: 2f04 movel %d4,%sp@- 4669c: b781 eorl %d3,%d1 4669e: 2f01 movel %d1,%sp@- 466a0: 2f02 movel %d2,%sp@- 466a2: 4868 0014 pea %a0@(20) 466a6: 4eb9 0004 72bc jsr 472bc <_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 ); 466ac: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 466b2: 2f28 0034 movel %a0@(52),%sp@- 466b6: 4eb9 0004 6818 jsr 46818 <_Semaphore_Translate_core_mutex_return_code> 466bc: 4fef 0018 lea %sp@(24),%sp break; } return RTEMS_INVALID_ID; } 466c0: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 466c6: 4e5e unlk %fp 466c8: 4e75 rts /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { 466ca: 2240 moveal %d0,%a1 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 466cc: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { 466d2: 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; 466d6: 42a8 0034 clrl %a0@(52) if ( the_semaphore->count != 0 ) { 466da: 4a81 tstl %d1 466dc: 662e bnes 4670c the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 466de: 0803 0000 btst #0,%d3 466e2: 6748 beqs 4672c _ISR_Enable( *level_p ); 466e4: 202e fff8 movel %fp@(-8),%d0 466e8: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 466ea: 7001 moveq #1,%d0 466ec: 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 ); 466f0: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 466f6: 2f28 0034 movel %a0@(52),%sp@- 466fa: 4eb9 0004 682e jsr 4682e <_Semaphore_Translate_core_semaphore_return_code> 46700: 588f addql #4,%sp break; } return RTEMS_INVALID_ID; } 46702: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 46708: 4e5e unlk %fp 4670a: 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; 4670c: 5381 subql #1,%d1 4670e: 2341 005c movel %d1,%a1@(92) _ISR_Enable( *level_p ); 46712: 202e fff8 movel %fp@(-8),%d0 46716: 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 ); 46718: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 4671e: 2f28 0034 movel %a0@(52),%sp@- 46722: 4eb9 0004 682e jsr 4682e <_Semaphore_Translate_core_semaphore_return_code> 46728: 588f addql #4,%sp 4672a: 60d6 bras 46702 4672c: 2239 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d1 46732: 5281 addql #1,%d1 46734: 23c1 0005 fadc movel %d1,5fadc <_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; 4673a: 7201 moveq #1,%d1 4673c: 2240 moveal %d0,%a1 return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 4673e: 0680 0000 0014 addil #20,%d0 46744: 2341 0044 movel %d1,%a1@(68) executing->Wait.id = id; 46748: 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; 4674c: 2140 0044 movel %d0,%a0@(68) executing->Wait.id = id; _ISR_Enable( *level_p ); 46750: 222e fff8 movel %fp@(-8),%d1 46754: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 46756: 4879 0004 91cc pea 491cc <_Thread_queue_Timeout> 4675c: 2f04 movel %d4,%sp@- 4675e: 2f00 movel %d0,%sp@- 46760: 4eb9 0004 8e04 jsr 48e04 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 46766: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> _Thread_Executing->Wait.return_code ); 4676c: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 46772: 4fef 000c lea %sp@(12),%sp id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 46776: 2f28 0034 movel %a0@(52),%sp@- 4677a: 4eb9 0004 682e jsr 4682e <_Semaphore_Translate_core_semaphore_return_code> 46780: 588f addql #4,%sp 46782: 6000 ff7e braw 46702 ... =============================================================================== 00058244 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 58244: 4e56 fffc linkw %fp,#-4 58248: 2f03 movel %d3,%sp@- 5824a: 2f02 movel %d2,%sp@- 5824c: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 58250: 660e bnes 58260 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58252: 242e fff4 movel %fp@(-12),%d2 Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 58256: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58258: 262e fff8 movel %fp@(-8),%d3 5825c: 4e5e unlk %fp 5825e: 4e75 rts ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 58260: 486e fffc pea %fp@(-4) 58264: 2f2e 0008 movel %fp@(8),%sp@- 58268: 4eb9 0005 c56c jsr 5c56c <_Thread_Get> switch ( location ) { 5826e: 508f addql #8,%sp 58270: 4aae fffc tstl %fp@(-4) 58274: 670e beqs 58284 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58276: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5827a: 7004 moveq #4,%d0 } 5827c: 262e fff8 movel %fp@(-8),%d3 58280: 4e5e unlk %fp 58282: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 58284: 2240 moveal %d0,%a1 58286: 2069 010a moveal %a1@(266),%a0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 5828a: 4aa8 000a tstl %a0@(10) 5828e: 676a beqs 582fa if ( asr->is_enabled ) { 58290: 4a28 0008 tstb %a0@(8) 58294: 6736 beqs 582cc rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 58296: 223c 0000 0700 movel #1792,%d1 5829c: 40c3 movew %sr,%d3 5829e: 8283 orl %d3,%d1 582a0: 46c1 movew %d1,%sr *signal_set |= signals; 582a2: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 582a6: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 582a8: 4ab9 0007 ef54 tstl 7ef54 <_Per_CPU_Information+0x8> 582ae: 6708 beqs 582b8 582b0: b0b9 0007 ef58 cmpl 7ef58 <_Per_CPU_Information+0xc>,%d0 582b6: 6730 beqs 582e8 <== ALWAYS TAKEN _Context_Switch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 582b8: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 582be: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 582c0: 242e fff4 movel %fp@(-12),%d2 582c4: 262e fff8 movel %fp@(-8),%d3 582c8: 4e5e unlk %fp 582ca: 4e75 rts rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 582cc: 203c 0000 0700 movel #1792,%d0 582d2: 40c1 movew %sr,%d1 582d4: 8081 orl %d1,%d0 582d6: 46c0 movew %d0,%sr *signal_set |= signals; 582d8: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 582dc: 46c1 movew %d1,%sr if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 582de: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 582e4: 4280 clrl %d0 582e6: 60d8 bras 582c0 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 ) ) _Context_Switch_necessary = true; 582e8: 7001 moveq #1,%d0 582ea: 13c0 0007 ef64 moveb %d0,7ef64 <_Per_CPU_Information+0x18> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 582f0: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 582f6: 4280 clrl %d0 582f8: 60c6 bras 582c0 } _Thread_Enable_dispatch(); 582fa: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58300: 242e fff4 movel %fp@(-12),%d2 } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; 58304: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58306: 262e fff8 movel %fp@(-8),%d3 5830a: 4e5e unlk %fp ... =============================================================================== 0004e488 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4e488: 4e56 ffe4 linkw %fp,#-28 4e48c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4e490: 2a2e 0008 movel %fp@(8),%d5 4e494: 242e 000c movel %fp@(12),%d2 4e498: 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 ) 4e49c: 4a8c tstl %a4 4e49e: 6700 015c beqw 4e5fc return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4e4a2: 2479 0005 ff6c moveal 5ff6c <_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; 4e4a8: 4a2a 0074 tstb %a2@(116) 4e4ac: 57c3 seq %d3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4e4ae: 266a 010a moveal %a2@(266),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4e4b2: 49c3 extbl %d3 4e4b4: 0283 0000 0100 andil #256,%d3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4e4ba: 4aaa 007a tstl %a2@(122) 4e4be: 6600 00cc bnew 4e58c old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4e4c2: 4a2b 0008 tstb %a3@(8) 4e4c6: 57c4 seq %d4 old_mode |= _ISR_Get_level(); 4e4c8: 4eb9 0004 9ea8 jsr 49ea8 <_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; 4e4ce: 49c4 extbl %d4 4e4d0: 0284 0000 0400 andil #1024,%d4 4e4d6: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); 4e4d8: 8083 orl %d3,%d0 4e4da: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4e4dc: 0802 0008 btst #8,%d2 4e4e0: 670c beqs 4e4ee executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4e4e2: 0805 0008 btst #8,%d5 4e4e6: 57c0 seq %d0 4e4e8: 4480 negl %d0 4e4ea: 1540 0074 moveb %d0,%a2@(116) if ( mask & RTEMS_TIMESLICE_MASK ) { 4e4ee: 0802 0009 btst #9,%d2 4e4f2: 6718 beqs 4e50c if ( _Modes_Is_timeslice(mode_set) ) { 4e4f4: 0805 0009 btst #9,%d5 4e4f8: 6700 00f0 beqw 4e5ea executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4e4fc: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4e4fe: 41f9 0005 fa94 lea 5fa94 <_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; 4e504: 2540 007a movel %d0,%a2@(122) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4e508: 2550 0076 movel %a0@,%a2@(118) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4e50c: 7007 moveq #7,%d0 4e50e: c082 andl %d2,%d0 4e510: 6712 beqs 4e524 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4e512: 40c0 movew %sr,%d0 */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 4e514: 7207 moveq #7,%d1 4e516: 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 ) ); 4e518: 0280 0000 f8ff andil #63743,%d0 4e51e: e189 lsll #8,%d1 4e520: 8081 orl %d1,%d0 4e522: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4e524: 0802 000a btst #10,%d2 4e528: 6754 beqs 4e57e is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 4e52a: 4282 clrl %d2 4e52c: 142b 0008 moveb %a3@(8),%d2 4e530: 4280 clrl %d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4e532: 0805 000a btst #10,%d5 4e536: 57c1 seq %d1 4e538: 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 ) { 4e53a: 1001 moveb %d1,%d0 4e53c: b082 cmpl %d2,%d0 4e53e: 673e beqs 4e57e ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4e540: 203c 0000 0700 movel #1792,%d0 asr->is_enabled = is_asr_enabled; 4e546: 1741 0008 moveb %d1,%a3@(8) 4e54a: 40c1 movew %sr,%d1 4e54c: 8081 orl %d1,%d0 4e54e: 46c0 movew %d0,%sr _signals = information->signals_pending; 4e550: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4e554: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4e55a: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4e55e: 46c1 movew %d1,%sr /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4e560: 4aab 0012 tstl %a3@(18) 4e564: 56c0 sne %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4e566: 7203 moveq #3,%d1 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4e568: 4480 negl %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4e56a: b2b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d1 4e570: 6744 beqs 4e5b6 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 4e572: 4280 clrl %d0 } 4e574: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4e57a: 4e5e unlk %fp 4e57c: 4e75 rts needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4e57e: 7203 moveq #3,%d1 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4e580: 4200 clrb %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4e582: b2b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d1 4e588: 66e8 bnes 4e572 <== NEVER TAKEN 4e58a: 602a bras 4e5b6 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; 4e58c: 4a2b 0008 tstb %a3@(8) 4e590: 57c4 seq %d4 old_mode |= _ISR_Get_level(); 4e592: 4eb9 0004 9ea8 jsr 49ea8 <_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; 4e598: 49c4 extbl %d4 4e59a: 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; 4e5a0: 08c3 0009 bset #9,%d3 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4e5a4: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); 4e5a6: 8083 orl %d3,%d0 4e5a8: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4e5aa: 0802 0008 btst #8,%d2 4e5ae: 6700 ff3e beqw 4e4ee 4e5b2: 6000 ff2e braw 4e4e2 */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4e5b6: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4e5bc: 4aa8 0010 tstl %a0@(16) 4e5c0: 660e bnes 4e5d0 <== NEVER TAKEN 4e5c2: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0 4e5c8: 673e beqs 4e608 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4e5ca: 4a28 0074 tstb %a0@(116) 4e5ce: 6738 beqs 4e608 <== NEVER TAKEN _Context_Switch_necessary = true; 4e5d0: 7001 moveq #1,%d0 4e5d2: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 4e5d8: 4eb9 0004 8744 jsr 48744 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; 4e5de: 4280 clrl %d0 } 4e5e0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4e5e6: 4e5e unlk %fp 4e5e8: 4e75 rts /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4e5ea: 7007 moveq #7,%d0 4e5ec: 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; 4e5ee: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4e5f2: 4a80 tstl %d0 4e5f4: 6700 ff2e beqw 4e524 4e5f8: 6000 ff18 braw 4e512 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 4e5fc: 7009 moveq #9,%d0 if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 4e5fe: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4e604: 4e5e unlk %fp 4e606: 4e75 rts } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4e608: 4a00 tstb %d0 4e60a: 6700 ff66 beqw 4e572 _Thread_Dispatch(); 4e60e: 4eb9 0004 8744 jsr 48744 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; 4e614: 4280 clrl %d0 4e616: 60c8 bras 4e5e0 =============================================================================== 0004af0c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4af0c: 4e56 fffc linkw %fp,#-4 4af10: 2f0a movel %a2,%sp@- 4af12: 246e 0010 moveal %fp@(16),%a2 4af16: 2f02 movel %d2,%sp@- 4af18: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4af1c: 670c beqs 4af2a 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 ) ); 4af1e: 4280 clrl %d0 4af20: 1039 0006 27d2 moveb 627d2 ,%d0 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4af26: b082 cmpl %d2,%d0 4af28: 6566 bcss 4af90 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4af2a: 4a8a tstl %a2 4af2c: 6770 beqs 4af9e return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4af2e: 486e fffc pea %fp@(-4) 4af32: 2f2e 0008 movel %fp@(8),%sp@- 4af36: 4eb9 0004 cf34 jsr 4cf34 <_Thread_Get> switch ( location ) { 4af3c: 508f addql #8,%sp 4af3e: 4aae fffc tstl %fp@(-4) 4af42: 663e bnes 4af82 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4af44: 2040 moveal %d0,%a0 4af46: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4af4a: 4a82 tstl %d2 4af4c: 6720 beqs 4af6e the_thread->real_priority = new_priority; 4af4e: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4af52: 4aa8 001c tstl %a0@(28) 4af56: 6706 beqs 4af5e 4af58: b4a8 0014 cmpl %a0@(20),%d2 4af5c: 6410 bccs 4af6e <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 4af5e: 42a7 clrl %sp@- 4af60: 2f02 movel %d2,%sp@- 4af62: 2f00 movel %d0,%sp@- 4af64: 4eb9 0004 c9dc jsr 4c9dc <_Thread_Change_priority> 4af6a: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4af6e: 4eb9 0004 cf0e jsr 4cf0e <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af74: 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; 4af78: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af7a: 246e fff8 moveal %fp@(-8),%a2 4af7e: 4e5e unlk %fp 4af80: 4e75 rts 4af82: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4af86: 7004 moveq #4,%d0 } 4af88: 246e fff8 moveal %fp@(-8),%a2 4af8c: 4e5e unlk %fp 4af8e: 4e75 rts 4af90: 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; 4af94: 7013 moveq #19,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af96: 246e fff8 moveal %fp@(-8),%a2 4af9a: 4e5e unlk %fp 4af9c: 4e75 rts 4af9e: 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; 4afa2: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4afa4: 246e fff8 moveal %fp@(-8),%a2 4afa8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046af4 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 46af4: 4e56 fffc linkw %fp,#-4 46af8: 2f02 movel %d2,%sp@- 46afa: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 46afe: 674a beqs 46b4a <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 46b00: 486e fffc pea %fp@(-4) 46b04: 2f2e 0008 movel %fp@(8),%sp@- 46b08: 4eb9 0004 88d4 jsr 488d4 <_Thread_Get> switch ( location ) { 46b0e: 508f addql #8,%sp 46b10: 4aae fffc tstl %fp@(-4) 46b14: 662a bnes 46b40 case OBJECTS_LOCAL: if ( _Thread_Start( 46b16: 2f2e 0010 movel %fp@(16),%sp@- 46b1a: 42a7 clrl %sp@- 46b1c: 2f02 movel %d2,%sp@- 46b1e: 42a7 clrl %sp@- 46b20: 2f00 movel %d0,%sp@- 46b22: 4eb9 0004 94f4 jsr 494f4 <_Thread_Start> 46b28: 4fef 0014 lea %sp@(20),%sp 46b2c: 4a00 tstb %d0 46b2e: 6624 bnes 46b54 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 46b30: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46b36: 242e fff8 movel %fp@(-8),%d2 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; 46b3a: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46b3c: 4e5e unlk %fp 46b3e: 4e75 rts 46b40: 242e fff8 movel %fp@(-8),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 46b44: 7004 moveq #4,%d0 } 46b46: 4e5e unlk %fp 46b48: 4e75 rts 46b4a: 242e fff8 movel %fp@(-8),%d2 { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 46b4e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46b50: 4e5e unlk %fp 46b52: 4e75 rts switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 46b54: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46b5a: 242e fff8 movel %fp@(-8),%d2 case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 46b5e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46b60: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047788 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 47788: 4e56 fffc linkw %fp,#-4 4778c: 2f02 movel %d2,%sp@- 4778e: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 47792: 6772 beqs 47806 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 47794: 486e fffc pea %fp@(-4) 47798: 2f2e 0008 movel %fp@(8),%sp@- 4779c: 4eb9 0004 95a4 jsr 495a4 <_Thread_Get> switch (location) { 477a2: 508f addql #8,%sp 477a4: 4aae fffc tstl %fp@(-4) 477a8: 6634 bnes 477de case OBJECTS_LOCAL: tvp = the_thread->task_variables; 477aa: 2040 moveal %d0,%a0 477ac: 2268 0116 moveal %a0@(278),%a1 while (tvp) { 477b0: 4a89 tstl %a1 477b2: 671a beqs 477ce if (tvp->ptr == ptr) { 477b4: b4a9 0004 cmpl %a1@(4),%d2 477b8: 6756 beqs 47810 <== NEVER TAKEN _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 477ba: 2051 moveal %a1@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 477bc: 4a88 tstl %a0 477be: 670e beqs 477ce <== NEVER TAKEN if (tvp->ptr == ptr) { 477c0: b4a8 0004 cmpl %a0@(4),%d2 477c4: 6722 beqs 477e8 477c6: 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; 477c8: 2051 moveal %a1@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 477ca: 4a88 tstl %a0 477cc: 66f2 bnes 477c0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 477ce: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 477d4: 242e fff8 movel %fp@(-8),%d2 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 477d8: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 477da: 4e5e unlk %fp 477dc: 4e75 rts 477de: 242e fff8 movel %fp@(-8),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 477e2: 7004 moveq #4,%d0 } 477e4: 4e5e unlk %fp 477e6: 4e75 rts case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 477e8: 2290 movel %a0@,%a1@ else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 477ea: 2f08 movel %a0,%sp@- 477ec: 2f00 movel %d0,%sp@- 477ee: 4eb9 0004 78bc jsr 478bc <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 477f4: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 477fa: 508f addql #8,%sp 477fc: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 477fe: 242e fff8 movel %fp@(-8),%d2 47802: 4e5e unlk %fp 47804: 4e75 rts 47806: 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; 4780a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4780c: 4e5e unlk %fp 4780e: 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; 47810: 2040 moveal %d0,%a0 47812: 2151 0116 movel %a1@,%a0@(278) 47816: 2049 moveal %a1,%a0 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 47818: 2f08 movel %a0,%sp@- 4781a: 2f00 movel %d0,%sp@- 4781c: 4eb9 0004 78bc jsr 478bc <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47822: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47828: 508f addql #8,%sp 4782a: 4280 clrl %d0 4782c: 60d0 bras 477fe ... =============================================================================== 00047830 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 47830: 4e56 fffc linkw %fp,#-4 47834: 2f0a movel %a2,%sp@- 47836: 246e 0010 moveal %fp@(16),%a2 4783a: 2f02 movel %d2,%sp@- 4783c: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 47840: 6752 beqs 47894 return RTEMS_INVALID_ADDRESS; if ( !result ) 47842: 4a8a tstl %a2 47844: 674e beqs 47894 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 47846: 486e fffc pea %fp@(-4) 4784a: 2f2e 0008 movel %fp@(8),%sp@- 4784e: 4eb9 0004 95a4 jsr 495a4 <_Thread_Get> switch (location) { 47854: 508f addql #8,%sp 47856: 4aae fffc tstl %fp@(-4) 4785a: 662a bnes 47886 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 4785c: 2240 moveal %d0,%a1 4785e: 2069 0116 moveal %a1@(278),%a0 while (tvp) { 47862: 4a88 tstl %a0 47864: 670c beqs 47872 if (tvp->ptr == ptr) { 47866: b4a8 0004 cmpl %a0@(4),%d2 4786a: 6736 beqs 478a2 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 4786c: 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) { 4786e: 4a88 tstl %a0 47870: 66f4 bnes 47866 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 47872: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47878: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 4787c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4787e: 246e fff8 moveal %fp@(-8),%a2 47882: 4e5e unlk %fp 47884: 4e75 rts 47886: 242e fff4 movel %fp@(-12),%d2 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4788a: 7004 moveq #4,%d0 } 4788c: 246e fff8 moveal %fp@(-8),%a2 47890: 4e5e unlk %fp 47892: 4e75 rts 47894: 242e fff4 movel %fp@(-12),%d2 if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 47898: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4789a: 246e fff8 moveal %fp@(-8),%a2 4789e: 4e5e unlk %fp 478a0: 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; 478a2: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 478a6: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478ac: 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; 478b0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478b2: 246e fff8 moveal %fp@(-8),%a2 478b6: 4e5e unlk %fp ... =============================================================================== 00058c44 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 58c44: 4e56 fffc linkw %fp,#-4 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 58c48: 486e fffc pea %fp@(-4) 58c4c: 2f2e 0008 movel %fp@(8),%sp@- 58c50: 4879 0007 f344 pea 7f344 <_Timer_Information> 58c56: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58c5c: 4fef 000c lea %sp@(12),%sp 58c60: 4aae fffc tstl %fp@(-4) 58c64: 6706 beqs 58c6c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 58c66: 7004 moveq #4,%d0 } 58c68: 4e5e unlk %fp 58c6a: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 58c6c: 7204 moveq #4,%d1 58c6e: 2040 moveal %d0,%a0 58c70: b2a8 0038 cmpl %a0@(56),%d1 58c74: 670c beqs 58c82 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 58c76: 4868 0010 pea %a0@(16) 58c7a: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove> 58c80: 588f addql #4,%sp _Thread_Enable_dispatch(); 58c82: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58c88: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58c8a: 4e5e unlk %fp ... =============================================================================== 000596f8 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 596f8: 4e56 fffc linkw %fp,#-4 596fc: 202e 0008 movel %fp@(8),%d0 59700: 2f03 movel %d3,%sp@- 59702: 2f02 movel %d2,%sp@- 59704: 4a80 tstl %d0 59706: 6748 beqs 59750 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 59708: 4281 clrl %d1 5970a: 1239 0007 8f52 moveb 78f52 ,%d1 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 59710: b280 cmpl %d0,%d1 59712: 644a bccs 5975e * 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 ) 59714: 72ff moveq #-1,%d1 59716: b280 cmpl %d0,%d1 59718: 6636 bnes 59750 5971a: 2239 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d1 59720: 5281 addql #1,%d1 return RTEMS_INVALID_PRIORITY; _priority = 0; 59722: 4283 clrl %d3 59724: 23c1 0007 eac0 movel %d1,7eac0 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 5972a: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 5972c: 1439 0007 9f9a moveb 79f9a ,%d2 initialized = true; 59732: 13c0 0007 9f9a moveb %d0,79f9a _Thread_Enable_dispatch(); 59738: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> if ( tmpInitialized ) 5973e: 4a02 tstb %d2 59740: 6744 beqs 59786 initialized = false; } #endif return status; } 59742: 242e fff4 movel %fp@(-12),%d2 tmpInitialized = initialized; initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) return RTEMS_INCORRECT_STATE; 59746: 700e moveq #14,%d0 initialized = false; } #endif return status; } 59748: 262e fff8 movel %fp@(-8),%d3 5974c: 4e5e unlk %fp 5974e: 4e75 rts 59750: 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; 59754: 7013 moveq #19,%d0 initialized = false; } #endif return status; } 59756: 262e fff8 movel %fp@(-8),%d3 5975a: 4e5e unlk %fp 5975c: 4e75 rts 5975e: 2239 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d1 59764: 5281 addql #1,%d1 59766: 2600 movel %d0,%d3 59768: 23c1 0007 eac0 movel %d1,7eac0 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 5976e: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 59770: 1439 0007 9f9a moveb 79f9a ,%d2 initialized = true; 59776: 13c0 0007 9f9a moveb %d0,79f9a _Thread_Enable_dispatch(); 5977c: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> if ( tmpInitialized ) 59782: 4a02 tstb %d2 59784: 66bc bnes 59742 <== 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( 59786: 222e 0010 movel %fp@(16),%d1 5978a: 486e fffc pea %fp@(-4) 5978e: 08c1 000f bset #15,%d1 59792: 2f01 movel %d1,%sp@- 59794: 4878 0100 pea 100 59798: 2f2e 000c movel %fp@(12),%sp@- 5979c: 2f03 movel %d3,%sp@- 5979e: 2f3c 5449 4d45 movel #1414090053,%sp@- 597a4: 4eb9 0005 8310 jsr 58310 /* 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) { 597aa: 4fef 0018 lea %sp@(24),%sp 597ae: 4a80 tstl %d0 597b0: 6714 beqs 597c6 initialized = false; } #endif return status; } 597b2: 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; 597b6: 4201 clrb %d1 initialized = false; } #endif return status; } 597b8: 262e fff8 movel %fp@(-8),%d3 597bc: 4e5e unlk %fp /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 597be: 13c1 0007 9f9a moveb %d1,79f9a initialized = false; } #endif return status; } 597c4: 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) 597c6: 202e fffc movel %fp@(-4),%d0 */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 597ca: 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( 597cc: 2079 0007 ea52 moveal 7ea52 <_RTEMS_tasks_Information+0x18>,%a0 597d2: 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; 597d4: 2239 0007 ebec movel 7ebec <_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( 597da: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 597de: 23d0 0007 9f1c movel %a0@,79f1c <_Timer_server_Default> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 597e4: 41f9 0007 9f50 lea 79f50 <_Timer_server_Default+0x34>,%a0 _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 597ea: 4879 0007 9f1c pea 79f1c <_Timer_server_Default> 597f0: 487a fb6e pea %pc@(59360 <_Timer_server_Body>) 597f4: 23c8 0007 9f4c movel %a0,79f4c <_Timer_server_Default+0x30> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 597fa: 41f9 0007 9f4c lea 79f4c <_Timer_server_Default+0x30>,%a0 59800: 23c8 0007 9f54 movel %a0,79f54 <_Timer_server_Default+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 59806: 41f9 0007 9f88 lea 79f88 <_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; 5980c: 23c1 0007 9f58 movel %d1,79f58 <_Timer_server_Default+0x3c> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 59812: 223c 0007 9f84 movel #499588,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 59818: 23c8 0007 9f84 movel %a0,79f84 <_Timer_server_Default+0x68> ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5981e: 41f9 0007 eb4a lea 7eb4a <_TOD_Now>,%a0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 59824: 23c1 0007 9f8c movel %d1,79f8c <_Timer_server_Default+0x70> 5982a: 23d0 0007 9f90 movel %a0@,79f90 <_Timer_server_Default+0x74> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 59830: 223c 0005 c3a0 movel #377760,%d1 59836: 41f9 0005 c3a0 lea 5c3a0 <_Thread_Delay_ended>,%a0 5983c: 23c1 0007 9f40 movel %d1,79f40 <_Timer_server_Default+0x24> ts->insert_chain = NULL; ts->active = false; 59842: 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; 59844: 42b9 0007 9f94 clrl 79f94 <_Timer_server_Default+0x78> ts->active = false; 5984a: 13c1 0007 9f98 moveb %d1,79f98 <_Timer_server_Default+0x7c> 59850: 23c8 0007 9f78 movel %a0,79f78 <_Timer_server_Default+0x5c> /* * The default timer server is now available. */ _Timer_server = ts; 59856: 41f9 0007 9f1c lea 79f1c <_Timer_server_Default>,%a0 /* * Start the timer server */ status = rtems_task_start( 5985c: 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; 5985e: 223c 0005 959c movel #365980,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 59864: 42b9 0007 9f50 clrl 79f50 <_Timer_server_Default+0x34> 5986a: 42b9 0007 9f88 clrl 79f88 <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59870: 42b9 0007 9f2c clrl 79f2c <_Timer_server_Default+0x10> 59876: 23c1 0007 9f20 movel %d1,79f20 <_Timer_server_Default+0x4> the_watchdog->routine = routine; the_watchdog->id = id; 5987c: 23c0 0007 9f44 movel %d0,79f44 <_Timer_server_Default+0x28> ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 59882: 23c8 0007 f37e movel %a0,7f37e <_Timer_server> the_watchdog->user_data = user_data; 59888: 42b9 0007 9f48 clrl 79f48 <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5988e: 42b9 0007 9f64 clrl 79f64 <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 59894: 23c0 0007 9f7c movel %d0,79f7c <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 5989a: 42b9 0007 9f80 clrl 79f80 <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 598a0: 4eb9 0005 8a2c jsr 58a2c initialized = false; } #endif return status; } 598a6: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 598aa: 4fef 000c lea %sp@(12),%sp } 598ae: 262e fff8 movel %fp@(-8),%d3 598b2: 4e5e unlk %fp ... =============================================================================== 00058ffc : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 58ffc: 4e56 fff0 linkw %fp,#-16 59000: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 59004: 486e fffc pea %fp@(-4) 59008: 2f2e 0008 movel %fp@(8),%sp@- 5900c: 4879 0007 f344 pea 7f344 <_Timer_Information> 59012: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59018: 4fef 000c lea %sp@(12),%sp 5901c: 2440 moveal %d0,%a2 5901e: 4aae fffc tstl %fp@(-4) 59022: 670e beqs 59032 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 59024: 7404 moveq #4,%d2 } 59026: 2002 movel %d2,%d0 59028: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5902e: 4e5e unlk %fp 59030: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 59032: 202a 0038 movel %a2@(56),%d0 59036: 671a beqs 59052 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 59038: 7201 moveq #1,%d1 5903a: b280 cmpl %d0,%d1 5903c: 673c beqs 5907a /* * 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; 5903e: 740b moveq #11,%d2 } _Thread_Enable_dispatch(); 59040: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59046: 2002 movel %d2,%d0 59048: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5904e: 4e5e unlk %fp 59050: 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 ); 59052: 45ea 0010 lea %a2@(16),%a2 rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 59056: 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 ); 59058: 2f0a movel %a2,%sp@- 5905a: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 59060: 2f0a movel %a2,%sp@- 59062: 4879 0007 eb82 pea 7eb82 <_Watchdog_Ticks_chain> 59068: 4eb9 0005 da58 jsr 5da58 <_Watchdog_Insert> 5906e: 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(); 59072: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> 59078: 60cc bras 59046 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 5907a: 486a 0010 pea %a2@(16) rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 5907e: 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; 59080: 2679 0007 f37e moveal 7f37e <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 59086: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 5908c: 2f0a movel %a2,%sp@- 5908e: 2f0b movel %a3,%sp@- 59090: 206b 0004 moveal %a3@(4),%a0 59094: 4e90 jsr %a0@ 59096: 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(); 5909a: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> 590a0: 60a4 bras 59046 ... =============================================================================== 0005918c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 5918c: 4e56 ffec linkw %fp,#-20 59190: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 59194: 242e 000c movel %fp@(12),%d2 59198: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 5919c: 2479 0007 f37e moveal 7f37e <_Timer_server>,%a2 if ( !timer_server ) 591a2: 4a8a tstl %a2 591a4: 6700 00c8 beqw 5926e return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 591a8: 4a39 0007 ead0 tstb 7ead0 <_TOD_Is_set> 591ae: 6700 00a6 beqw 59256 return RTEMS_NOT_DEFINED; if ( !routine ) 591b2: 4a83 tstl %d3 591b4: 6700 00ac beqw 59262 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 591b8: 2f02 movel %d2,%sp@- 591ba: 4eb9 0005 5eac jsr 55eac <_TOD_Validate> 591c0: 588f addql #4,%sp 591c2: 4a00 tstb %d0 591c4: 660c bnes 591d2 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 591c6: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591c8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591ce: 4e5e unlk %fp 591d0: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 591d2: 2f02 movel %d2,%sp@- 591d4: 4eb9 0005 5da4 jsr 55da4 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 591da: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 591dc: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 591de: b0b9 0007 eb4a cmpl 7eb4a <_TOD_Now>,%d0 591e4: 63e0 blss 591c6 591e6: 486e fffc pea %fp@(-4) 591ea: 2f2e 0008 movel %fp@(8),%sp@- 591ee: 4879 0007 f344 pea 7f344 <_Timer_Information> 591f4: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 591fa: 4fef 000c lea %sp@(12),%sp 591fe: 2640 moveal %d0,%a3 59200: 4aae fffc tstl %fp@(-4) 59204: 6674 bnes 5927a case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 59206: 486b 0010 pea %a3@(16) 5920a: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove> the_watchdog->user_data = user_data; 59210: 276e 0014 0034 movel %fp@(20),%a3@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 59216: 7003 moveq #3,%d0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 59218: 94b9 0007 eb4a subl 7eb4a <_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; 5921e: 2740 0038 movel %d0,%a3@(56) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 59222: 202e 0008 movel %fp@(8),%d0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 59226: 2742 001c movel %d2,%a3@(28) 5922a: 2740 0030 movel %d0,%a3@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5922e: 42ab 0018 clrl %a3@(24) the_watchdog->routine = routine; 59232: 2743 002c movel %d3,%a3@(44) (*timer_server->schedule_operation)( timer_server, the_timer ); 59236: 2f0b movel %a3,%sp@- 59238: 2f0a movel %a2,%sp@- 5923a: 206a 0004 moveal %a2@(4),%a0 5923e: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59240: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 59246: 4fef 000c lea %sp@(12),%sp 5924a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5924c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59252: 4e5e unlk %fp 59254: 4e75 rts if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 59256: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59258: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 5925e: 4e5e unlk %fp <== NOT EXECUTED 59260: 4e75 rts <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 59262: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59264: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5926a: 4e5e unlk %fp 5926c: 4e75 rts Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 5926e: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59270: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59276: 4e5e unlk %fp 59278: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5927a: 7004 moveq #4,%d0 } 5927c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59282: 4e5e unlk %fp ... =============================================================================== 0004713c : int sched_get_priority_max( int policy ) { switch ( policy ) { 4713c: 7004 moveq #4,%d0 #include int sched_get_priority_max( int policy ) { 4713e: 4e56 0000 linkw %fp,#0 47142: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 47146: b081 cmpl %d1,%d0 47148: 6412 bccs 4715c case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4714a: 4eb9 0004 f9b0 jsr 4f9b0 <__errno> 47150: 7216 moveq #22,%d1 47152: 2040 moveal %d0,%a0 47154: 70ff moveq #-1,%d0 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 47156: 4e5e unlk %fp case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 47158: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 4715a: 4e75 rts int sched_get_priority_max( int policy ) { switch ( policy ) { 4715c: 103c 0001 moveb #1,%d0 47160: e3a8 lsll %d1,%d0 47162: 7217 moveq #23,%d1 47164: c081 andl %d1,%d0 47166: 67e2 beqs 4714a <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 47168: 4280 clrl %d0 4716a: 1039 0005 f7e6 moveb 5f7e6 ,%d0 } 47170: 4e5e unlk %fp default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 47172: 5380 subql #1,%d0 } ... =============================================================================== 00047178 : int sched_get_priority_min( int policy ) { switch ( policy ) { 47178: 7004 moveq #4,%d0 #include int sched_get_priority_min( int policy ) { 4717a: 4e56 0000 linkw %fp,#0 4717e: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 47182: b081 cmpl %d1,%d0 47184: 6412 bccs 47198 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 47186: 4eb9 0004 f9b0 jsr 4f9b0 <__errno> 4718c: 7216 moveq #22,%d1 4718e: 2040 moveal %d0,%a0 47190: 70ff moveq #-1,%d0 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 47192: 4e5e unlk %fp case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 47194: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 47196: 4e75 rts int sched_get_priority_min( int policy ) { switch ( policy ) { 47198: 103c 0001 moveb #1,%d0 4719c: e3a8 lsll %d1,%d0 4719e: 7217 moveq #23,%d1 471a0: c081 andl %d1,%d0 471a2: 67e2 beqs 47186 <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; 471a4: 7001 moveq #1,%d0 } 471a6: 4e5e unlk %fp ... =============================================================================== 000471ac : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 471ac: 4e56 0000 linkw %fp,#0 471b0: 2f03 movel %d3,%sp@- 471b2: 262e 0008 movel %fp@(8),%d3 471b6: 2f02 movel %d2,%sp@- 471b8: 242e 000c movel %fp@(12),%d2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 471bc: 4a83 tstl %d3 471be: 6622 bnes 471e2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 471c0: 4a82 tstl %d2 471c2: 6742 beqs 47206 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 471c4: 2f02 movel %d2,%sp@- 471c6: 2f39 0006 0f24 movel 60f24 <_Thread_Ticks_per_timeslice>,%sp@- 471cc: 4eb9 0004 ab20 jsr 4ab20 <_Timespec_From_ticks> return 0; } 471d2: 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; 471d6: 508f addql #8,%sp 471d8: 4280 clrl %d0 } 471da: 262e fffc movel %fp@(-4),%d3 471de: 4e5e unlk %fp 471e0: 4e75 rts { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 471e2: 4eb9 0004 3768 jsr 43768 471e8: b680 cmpl %d0,%d3 471ea: 67d4 beqs 471c0 rtems_set_errno_and_return_minus_one( ESRCH ); 471ec: 4eb9 0004 f9b0 jsr 4f9b0 <__errno> 471f2: 7403 moveq #3,%d2 471f4: 2040 moveal %d0,%a0 471f6: 70ff moveq #-1,%d0 471f8: 2082 movel %d2,%a0@ if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 471fa: 242e fff8 movel %fp@(-8),%d2 471fe: 262e fffc movel %fp@(-4),%d3 47202: 4e5e unlk %fp 47204: 4e75 rts if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 47206: 4eb9 0004 f9b0 jsr 4f9b0 <__errno> _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 4720c: 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 ); 47210: 2040 moveal %d0,%a0 47212: 7216 moveq #22,%d1 47214: 70ff moveq #-1,%d0 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 47216: 262e fffc movel %fp@(-4),%d3 4721a: 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 ); 4721c: 2081 movel %d1,%a0@ <== NOT EXECUTED _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } =============================================================================== 000494a8 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 494a8: 4e56 ffe0 linkw %fp,#-32 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 494ac: 2039 0006 4dc8 movel 64dc8 <_Thread_Dispatch_disable_level>,%d0 494b2: 5280 addql #1,%d0 494b4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 494b8: 2a2e 0008 movel %fp@(8),%d5 494bc: 262e 000c movel %fp@(12),%d3 494c0: 23c0 0006 4dc8 movel %d0,64dc8 <_Thread_Dispatch_disable_level> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 494c6: 2803 movel %d3,%d4 494c8: 0284 0000 0200 andil #512,%d4 494ce: 6600 0086 bnew 49556 /* unsigned int value */ ) { va_list arg; mode_t mode; unsigned int value = 0; 494d2: 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 ); 494d4: 486e fffc pea %fp@(-4) 494d8: 2f05 movel %d5,%sp@- 494da: 4eb9 0004 fe20 jsr 4fe20 <_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 ) { 494e0: 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 ); 494e2: 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 ) { 494e4: 6726 beqs 4950c /* * 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) ) ) { 494e6: 7002 moveq #2,%d0 494e8: b082 cmpl %d2,%d0 494ea: 6604 bnes 494f0 <== NEVER TAKEN 494ec: 4a84 tstl %d4 494ee: 666e bnes 4955e _Thread_Enable_dispatch(); 494f0: 4eb9 0004 c06e jsr 4c06e <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 494f6: 4eb9 0005 2bf4 jsr 52bf4 <__errno> 494fc: 2040 moveal %d0,%a0 494fe: 70ff moveq #-1,%d0 49500: 2082 movel %d2,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 49502: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49508: 4e5e unlk %fp 4950a: 4e75 rts /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4950c: 0283 0000 0a00 andil #2560,%d3 49512: 0c83 0000 0a00 cmpil #2560,%d3 49518: 6772 beqs 4958c 4951a: 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(); 4951e: 45f9 0004 c06e lea 4c06e <_Thread_Enable_dispatch>,%a2 49524: 2f2e fffc movel %fp@(-4),%sp@- 49528: 4879 0006 5004 pea 65004 <_POSIX_Semaphore_Information> 4952e: 4eb9 0004 b75c jsr 4b75c <_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; 49534: 2040 moveal %d0,%a0 49536: 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 ); 4953a: 2d40 fff8 movel %d0,%fp@(-8) the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 4953e: 4e92 jsr %a2@ _Thread_Enable_dispatch(); 49540: 4e92 jsr %a2@ goto return_id; 49542: 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; 49546: 202e fff8 movel %fp@(-8),%d0 4954a: 5080 addql #8,%d0 #endif return id; } 4954c: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49552: 4e5e unlk %fp 49554: 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 ); 49556: 246e 0014 moveal %fp@(20),%a2 4955a: 6000 ff78 braw 494d4 /* * 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( 4955e: 486e fff8 pea %fp@(-8) 49562: 2f0a movel %a2,%sp@- 49564: 42a7 clrl %sp@- 49566: 2f05 movel %d5,%sp@- 49568: 4eb9 0004 fc68 jsr 4fc68 <_POSIX_Semaphore_Create_support> 4956e: 2400 movel %d0,%d2 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 49570: 4eb9 0004 c06e jsr 4c06e <_Thread_Enable_dispatch> if ( status == -1 ) 49576: 4fef 0010 lea %sp@(16),%sp 4957a: 70ff moveq #-1,%d0 4957c: b082 cmpl %d2,%d0 4957e: 66c6 bnes 49546 return SEM_FAILED; 49580: 70ff moveq #-1,%d0 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 49582: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49588: 4e5e unlk %fp 4958a: 4e75 rts /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 4958c: 4eb9 0004 c06e jsr 4c06e <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 49592: 4eb9 0005 2bf4 jsr 52bf4 <__errno> 49598: 7211 moveq #17,%d1 4959a: 2040 moveal %d0,%a0 4959c: 70ff moveq #-1,%d0 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 4959e: 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 * ); 495a4: 2081 movel %d1,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 495a6: 4e5e unlk %fp ... =============================================================================== 00049604 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 49604: 4e56 fffc linkw %fp,#-4 49608: 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 ); 4960a: 486e fffc pea %fp@(-4) 4960e: 2f2e 000c movel %fp@(12),%sp@- int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 49612: 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 ); 49616: 4eb9 0004 f084 jsr 4f084 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 4961c: 508f addql #8,%sp 4961e: 7203 moveq #3,%d1 49620: b280 cmpl %d0,%d1 49622: 671a beqs 4963e <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 49624: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 49628: 42a7 clrl %sp@- <== NOT EXECUTED 4962a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4962c: 4eb9 0004 fe94 jsr 4fe94 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 49632: 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 ); 49636: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED break; } } return lock_status; } 4963a: 4e5e unlk %fp <== NOT EXECUTED 4963c: 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 ); 4963e: 2f2e fffc movel %fp@(-4),%sp@- 49642: 4878 0001 pea 1 49646: 2f02 movel %d2,%sp@- 49648: 4eb9 0004 fe94 jsr 4fe94 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 4964e: 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 ); 49652: 4fef 000c lea %sp@(12),%sp break; } } return lock_status; } 49656: 4e5e unlk %fp ... =============================================================================== 00046f78 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 46f78: 4e56 fff4 linkw %fp,#-12 46f7c: 226e 0010 moveal %fp@(16),%a1 46f80: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46f84: 242e 0008 movel %fp@(8),%d2 46f88: 246e 000c moveal %fp@(12),%a2 ISR_Level level; if ( oact ) 46f8c: 4a89 tstl %a1 46f8e: 6718 beqs 46fa8 *oact = _POSIX_signals_Vectors[ sig ]; 46f90: 2202 movel %d2,%d1 46f92: 2002 movel %d2,%d0 46f94: e989 lsll #4,%d1 46f96: e588 lsll #2,%d0 46f98: 2041 moveal %d1,%a0 46f9a: 91c0 subal %d0,%a0 46f9c: d1fc 0006 1fba addal #401338,%a0 46fa2: 22d8 movel %a0@+,%a1@+ 46fa4: 22d8 movel %a0@+,%a1@+ 46fa6: 2290 movel %a0@,%a1@ if ( !sig ) 46fa8: 4a82 tstl %d2 46faa: 6700 0088 beqw 47034 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 46fae: 2002 movel %d2,%d0 46fb0: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 46fb2: 721f moveq #31,%d1 46fb4: b280 cmpl %d0,%d1 46fb6: 657c bcss 47034 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 46fb8: 7009 moveq #9,%d0 46fba: b082 cmpl %d2,%d0 46fbc: 6776 beqs 47034 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 46fbe: 4a8a tstl %a2 46fc0: 6766 beqs 47028 <== 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 ); 46fc2: 203c 0000 0700 movel #1792,%d0 46fc8: 40c3 movew %sr,%d3 46fca: 8083 orl %d3,%d0 46fcc: 46c0 movew %d0,%sr if ( act->sa_handler == SIG_DFL ) { 46fce: 4aaa 0008 tstl %a2@(8) 46fd2: 6730 beqs 47004 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 46fd4: 2f02 movel %d2,%sp@- 46fd6: 4eb9 0004 cd00 jsr 4cd00 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 46fdc: 588f addql #4,%sp 46fde: 2002 movel %d2,%d0 46fe0: 224a moveal %a2,%a1 46fe2: e98a lsll #4,%d2 46fe4: e588 lsll #2,%d0 46fe6: 2042 moveal %d2,%a0 46fe8: 91c0 subal %d0,%a0 46fea: d1fc 0006 1fba addal #401338,%a0 46ff0: 20d9 movel %a1@+,%a0@+ 46ff2: 20d9 movel %a1@+,%a0@+ 46ff4: 2091 movel %a1@,%a0@ } _ISR_Enable( level ); 46ff6: 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; 46ff8: 4280 clrl %d0 } 46ffa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47000: 4e5e unlk %fp 47002: 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 ]; 47004: 2002 movel %d2,%d0 47006: e98a lsll #4,%d2 47008: e588 lsll #2,%d0 4700a: 9480 subl %d0,%d2 4700c: 2242 moveal %d2,%a1 4700e: 2042 moveal %d2,%a0 47010: d3fc 0005 f642 addal #390722,%a1 47016: d1fc 0006 1fba addal #401338,%a0 4701c: 20d9 movel %a1@+,%a0@+ 4701e: 20d9 movel %a1@+,%a0@+ 47020: 2091 movel %a1@,%a0@ } else { _POSIX_signals_Clear_process_signals( sig ); _POSIX_signals_Vectors[ sig ] = *act; } _ISR_Enable( level ); 47022: 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; 47024: 4280 clrl %d0 47026: 60d2 bras 46ffa 47028: 4280 clrl %d0 <== NOT EXECUTED } 4702a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 47030: 4e5e unlk %fp <== NOT EXECUTED 47032: 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 ); 47034: 4eb9 0004 fc64 jsr 4fc64 <__errno> 4703a: 7216 moveq #22,%d1 4703c: 2040 moveal %d0,%a0 4703e: 70ff moveq #-1,%d0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 47040: 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 ); 47046: 2081 movel %d1,%a0@ * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 47048: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049658 : #include int sigsuspend( const sigset_t *sigmask ) { 49658: 4e56 ffec linkw %fp,#-20 4965c: 48d7 040c moveml %d2-%d3/%a2,%sp@ int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 49660: 240e movel %fp,%d2 49662: 5982 subql #4,%d2 49664: 45f9 0004 9630 lea 49630 ,%a2 (void) sigfillset( &all_signals ); 4966a: 260e movel %fp,%d3 4966c: 5183 subql #8,%d3 int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 4966e: 2f02 movel %d2,%sp@- 49670: 2f2e 0008 movel %fp@(8),%sp@- 49674: 4878 0001 pea 1 49678: 4e92 jsr %a2@ (void) sigfillset( &all_signals ); 4967a: 2f03 movel %d3,%sp@- 4967c: 4eb9 0004 9584 jsr 49584 status = sigtimedwait( &all_signals, NULL, NULL ); 49682: 42a7 clrl %sp@- 49684: 42a7 clrl %sp@- 49686: 2f03 movel %d3,%sp@- 49688: 4eb9 0004 9714 jsr 49714 4968e: 2600 movel %d0,%d3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 49690: 42a7 clrl %sp@- 49692: 2f02 movel %d2,%sp@- 49694: 42a7 clrl %sp@- 49696: 4e92 jsr %a2@ /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 49698: 4fef 0028 lea %sp@(40),%sp 4969c: 70ff moveq #-1,%d0 4969e: b083 cmpl %d3,%d0 496a0: 660c bnes 496ae <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 496a2: 70ff moveq #-1,%d0 <== NOT EXECUTED 496a4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 496aa: 4e5e unlk %fp <== NOT EXECUTED 496ac: 4e75 rts <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 496ae: 4eb9 0005 2218 jsr 52218 <__errno> 496b4: 2040 moveal %d0,%a0 496b6: 7004 moveq #4,%d0 return status; } 496b8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 496be: 2080 movel %d0,%a0@ return status; } 496c0: 70ff moveq #-1,%d0 496c2: 4e5e unlk %fp ... =============================================================================== 000498fc : int sigwait( const sigset_t *set, int *sig ) { 498fc: 4e56 0000 linkw %fp,#0 49900: 2f0a movel %a2,%sp@- 49902: 246e 000c moveal %fp@(12),%a2 int status; status = sigtimedwait( set, NULL, NULL ); 49906: 42a7 clrl %sp@- 49908: 42a7 clrl %sp@- 4990a: 2f2e 0008 movel %fp@(8),%sp@- 4990e: 4eb9 0004 9714 jsr 49714 if ( status != -1 ) { 49914: 4fef 000c lea %sp@(12),%sp 49918: 72ff moveq #-1,%d1 4991a: b280 cmpl %d0,%d1 4991c: 6710 beqs 4992e if ( sig ) 4991e: 4a8a tstl %a2 49920: 671e beqs 49940 <== NEVER TAKEN *sig = status; 49922: 2480 movel %d0,%a2@ return 0; } return errno; } 49924: 246e fffc moveal %fp@(-4),%a2 status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 49928: 4280 clrl %d0 } return errno; } 4992a: 4e5e unlk %fp 4992c: 4e75 rts if ( sig ) *sig = status; return 0; } return errno; 4992e: 4eb9 0005 2218 jsr 52218 <__errno> } 49934: 246e fffc moveal %fp@(-4),%a2 if ( sig ) *sig = status; return 0; } return errno; 49938: 2040 moveal %d0,%a0 } 4993a: 4e5e unlk %fp if ( sig ) *sig = status; return 0; } return errno; 4993c: 2010 movel %a0@,%d0 } 4993e: 4e75 rts 49940: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 49944: 4280 clrl %d0 <== NOT EXECUTED } return errno; } 49946: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00047bcc : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 47bcc: 4e56 fffc linkw %fp,#-4 47bd0: 2f02 movel %d2,%sp@- timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); 47bd2: 486e fffc pea %fp@(-4) 47bd6: 2f2e 0008 movel %fp@(8),%sp@- 47bda: 4879 0006 2e72 pea 62e72 <_POSIX_Timer_Information> 47be0: 4eb9 0004 a004 jsr 4a004 <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 47be6: 4fef 000c lea %sp@(12),%sp 47bea: 2040 moveal %d0,%a0 47bec: 4aae fffc tstl %fp@(-4) 47bf0: 6718 beqs 47c0a <== NEVER TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47bf2: 4eb9 0005 0d18 jsr 50d18 <__errno> 47bf8: 74ff moveq #-1,%d2 47bfa: 2040 moveal %d0,%a0 47bfc: 7016 moveq #22,%d0 47bfe: 2080 movel %d0,%a0@ } 47c00: 2002 movel %d2,%d0 47c02: 242e fff8 movel %fp@(-8),%d2 47c06: 4e5e unlk %fp 47c08: 4e75 rts ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 47c0a: 2428 0066 movel %a0@(102),%d2 ptimer->overrun = 0; 47c0e: 42a8 0066 clrl %a0@(102) _Thread_Enable_dispatch(); 47c12: 4eb9 0004 a88e jsr 4a88e <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 47c18: 2002 movel %d2,%d0 47c1a: 242e fff8 movel %fp@(-8),%d2 47c1e: 4e5e unlk %fp ... =============================================================================== 00047c24 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 47c24: 4e56 fff4 linkw %fp,#-12 47c28: 2f0b movel %a3,%sp@- 47c2a: 2f0a movel %a2,%sp@- 47c2c: 246e 000c moveal %fp@(12),%a2 POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 47c30: 4a8a tstl %a2 47c32: 676a beqs 47c9e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 47c34: 486e fff4 pea %fp@(-12) 47c38: 4eb9 0004 9548 jsr 49548 <_TOD_Get> 47c3e: 486e fffc pea %fp@(-4) 47c42: 2f2e 0008 movel %fp@(8),%sp@- 47c46: 4879 0006 2e72 pea 62e72 <_POSIX_Timer_Information> 47c4c: 4eb9 0004 a004 jsr 4a004 <_Objects_Get> ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 47c52: 4fef 0010 lea %sp@(16),%sp 47c56: 2640 moveal %d0,%a3 47c58: 4aae fffc tstl %fp@(-4) 47c5c: 6640 bnes 47c9e left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 47c5e: 486a 0008 pea %a2@(8) case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 47c62: 222b 001c movel %a3@(28),%d1 47c66: d2ab 0024 addl %a3@(36),%d1 47c6a: 2039 0006 2d28 movel 62d28 <_Watchdog_Ticks_since_boot>,%d0 _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 47c70: 9280 subl %d0,%d1 47c72: 2f01 movel %d1,%sp@- 47c74: 4eb9 0004 b790 jsr 4b790 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 47c7a: 202b 0052 movel %a3@(82),%d0 47c7e: 222b 0056 movel %a3@(86),%d1 47c82: 2480 movel %d0,%a2@ 47c84: 2541 0004 movel %d1,%a2@(4) _Thread_Enable_dispatch(); 47c88: 4eb9 0004 a88e jsr 4a88e <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 47c8e: 246e ffec moveal %fp@(-20),%a2 _Timespec_From_ticks( left, &value->it_value ); value->it_interval = ptimer->timer_data.it_interval; _Thread_Enable_dispatch(); return 0; 47c92: 508f addql #8,%sp 47c94: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 47c96: 266e fff0 moveal %fp@(-16),%a3 47c9a: 4e5e unlk %fp 47c9c: 4e75 rts #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47c9e: 4eb9 0005 0d18 jsr 50d18 <__errno> } 47ca4: 246e ffec moveal %fp@(-20),%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47ca8: 2040 moveal %d0,%a0 47caa: 7216 moveq #22,%d1 47cac: 70ff moveq #-1,%d0 } 47cae: 266e fff0 moveal %fp@(-16),%a3 47cb2: 4e5e unlk %fp #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47cb4: 2081 movel %d1,%a0@ <== NOT EXECUTED } =============================================================================== 000463f6 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 463f6: 4e56 ffe8 linkw %fp,#-24 463fa: 48d7 041c moveml %d2-%d4/%a2,%sp@ 463fe: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 46402: 4ab9 0006 1d1e tstl 61d1e <_POSIX_signals_Ualarm_timer+0x1c> 46408: 6700 0086 beqw 46490 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 4640c: 4879 0006 1d02 pea 61d02 <_POSIX_signals_Ualarm_timer> 46412: 4eb9 0004 a268 jsr 4a268 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 46418: 588f addql #4,%sp 4641a: 7201 moveq #1,%d1 4641c: 5580 subql #2,%d0 4641e: b280 cmpl %d0,%d1 46420: 6400 0098 bccw 464ba useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 46424: 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 ) { 46426: 4a82 tstl %d2 <== NOT EXECUTED 46428: 660c bnes 46436 <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 4642a: 2003 movel %d3,%d0 4642c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 46432: 4e5e unlk %fp 46434: 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 ); 46436: 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; 46438: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 4643e: 5184 subql #8,%d4 46440: 45f9 0004 9d74 lea 49d74 <_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; 46446: 4c41 2000 remul %d1,%d0,%d2 4644a: 4c41 2002 remul %d1,%d2,%d2 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4644e: 223c 0000 03e8 movel #1000,%d1 46454: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 46458: 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; 4645a: 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; 4645e: 2d42 fff8 movel %d2,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 46462: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 46464: 2f04 movel %d4,%sp@- 46466: 4e92 jsr %a2@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46468: 4879 0006 1d02 pea 61d02 <_POSIX_signals_Ualarm_timer> 4646e: 4879 0006 15ae pea 615ae <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46474: 23c0 0006 1d0e movel %d0,61d0e <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4647a: 4eb9 0004 a120 jsr 4a120 <_Watchdog_Insert> 46480: 4fef 0010 lea %sp@(16),%sp } return remaining; } 46484: 2003 movel %d3,%d0 46486: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4648c: 4e5e unlk %fp 4648e: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46490: 42b9 0006 1d0a clrl 61d0a <_POSIX_signals_Ualarm_timer+0x8> useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 46496: 4283 clrl %d3 the_watchdog->routine = routine; 46498: 203c 0004 63b4 movel #287668,%d0 the_watchdog->id = id; 4649e: 42b9 0006 1d22 clrl 61d22 <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 464a4: 23c0 0006 1d1e movel %d0,61d1e <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 464aa: 42b9 0006 1d26 clrl 61d26 <_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 ) { 464b0: 4a82 tstl %d2 464b2: 6700 ff76 beqw 4642a 464b6: 6000 ff7e braw 46436 * 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); 464ba: 2039 0006 1d16 movel 61d16 <_POSIX_signals_Ualarm_timer+0x14>,%d0 464c0: d0b9 0006 1d0e addl 61d0e <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 464c6: 486e fff8 pea %fp@(-8) 464ca: 90b9 0006 1d1a subl 61d1a <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 464d0: 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 ); 464d6: 2f00 movel %d0,%sp@- 464d8: 4eb9 0004 9ce8 jsr 49ce8 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 464de: 202e fff8 movel %fp@(-8),%d0 464e2: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 464e6: 283c 0000 03e8 movel #1000,%d4 464ec: 508f addql #8,%sp 464ee: 262e fffc movel %fp@(-4),%d3 464f2: 4c44 3803 remsl %d4,%d3,%d3 464f6: 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 ) { 464f8: 4a82 tstl %d2 464fa: 6700 ff2e beqw 4642a 464fe: 6000 ff36 braw 46436 <== NOT EXECUTED ...