0010a6c0 <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { 10a6c0: 55 push %ebp 10a6c1: 89 e5 mov %esp,%ebp 10a6c3: 57 push %edi 10a6c4: 56 push %esi 10a6c5: 83 ec 1c sub $0x1c,%esp CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; 10a6c8: 8d 7d e8 lea -0x18(%ebp),%edi 10a6cb: be c0 e7 11 00 mov $0x11e7c0,%esi 10a6d0: b9 04 00 00 00 mov $0x4,%ecx 10a6d5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); 10a6d7: 68 d4 42 12 00 push $0x1242d4 10a6dc: e8 0b 09 00 00 call 10afec <_Objects_Allocate> <== ALWAYS TAKEN 10a6e1: 89 c6 mov %eax,%esi _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); 10a6e3: 83 c4 0c add $0xc,%esp 10a6e6: 6a 01 push $0x1 10a6e8: 8d 45 e8 lea -0x18(%ebp),%eax 10a6eb: 50 push %eax 10a6ec: 8d 46 10 lea 0x10(%esi),%eax 10a6ef: 50 push %eax 10a6f0: e8 e7 01 00 00 call 10a8dc <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a6f5: 0f b7 56 08 movzwl 0x8(%esi),%edx 10a6f9: a1 f0 42 12 00 mov 0x1242f0,%eax 10a6fe: 89 34 90 mov %esi,(%eax,%edx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a701: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; 10a708: 8b 45 08 mov 0x8(%ebp),%eax 10a70b: 89 30 mov %esi,(%eax) 10a70d: 83 c4 10 add $0x10,%esp } 10a710: 8d 65 f8 lea -0x8(%ebp),%esp 10a713: 5e pop %esi 10a714: 5f pop %edi 10a715: c9 leave 10a716: c3 ret 0010a73c <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { 10a73c: 55 push %ebp 10a73d: 89 e5 mov %esp,%ebp 10a73f: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10a742: 6a 00 push $0x0 10a744: 6a 00 push $0x0 10a746: 6a 74 push $0x74 10a748: ff 75 08 pushl 0x8(%ebp) 10a74b: 6a 02 push $0x2 10a74d: 6a 01 push $0x1 10a74f: 68 d4 42 12 00 push $0x1242d4 10a754: e8 ff 0c 00 00 call 10b458 <_Objects_Initialize_information> <== ALWAYS TAKEN 10a759: 83 c4 20 add $0x20,%esp , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10a75c: c9 leave 10a75d: c3 ret 0010a718 <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 10a718: 55 push %ebp 10a719: 89 e5 mov %esp,%ebp 10a71b: 83 ec 14 sub $0x14,%esp 10a71e: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10a721: 9c pushf 10a722: fa cli 10a723: 5a pop %edx _CORE_mutex_Seize( 10a724: 52 push %edx 10a725: 6a 00 push $0x0 10a727: 6a 01 push $0x1 10a729: ff 70 08 pushl 0x8(%eax) 10a72c: 83 c0 10 add $0x10,%eax 10a72f: 50 push %eax 10a730: e8 90 02 00 00 call 10a9c5 <_CORE_mutex_Seize> <== ALWAYS TAKEN 10a735: 83 c4 20 add $0x20,%esp the_mutex->Object.id, true, 0, level ); } 10a738: c9 leave 10a739: c3 ret 0010a760 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 10a760: 55 push %ebp 10a761: 89 e5 mov %esp,%ebp 10a763: 83 ec 0c sub $0xc,%esp 10a766: 8b 45 08 mov 0x8(%ebp),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a769: 8b 15 ec 41 12 00 mov 0x1241ec,%edx 10a76f: 42 inc %edx 10a770: 89 15 ec 41 12 00 mov %edx,0x1241ec _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 10a776: 6a 00 push $0x0 10a778: ff 70 08 pushl 0x8(%eax) 10a77b: 83 c0 10 add $0x10,%eax 10a77e: 50 push %eax 10a77f: e8 d8 02 00 00 call 10aa5c <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10a784: 83 c4 10 add $0x10,%esp } 10a787: c9 leave _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10a788: e9 64 14 00 00 jmp 10bbf1 <_Thread_Enable_dispatch> 0010a6a8 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 10a6a8: 55 push %ebp 10a6a9: 89 e5 mov %esp,%ebp 10a6ab: 83 ec 10 sub $0x10,%esp _Chain_Append( &_API_extensions_List, &the_extension->Node ); 10a6ae: ff 75 08 pushl 0x8(%ebp) 10a6b1: 68 08 44 12 00 push $0x124408 10a6b6: e8 d5 00 00 00 call 10a790 <_Chain_Append> <== ALWAYS TAKEN 10a6bb: 83 c4 10 add $0x10,%esp } 10a6be: c9 leave 10a6bf: c3 ret 0010a65b <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10a65b: 55 push %ebp 10a65c: 89 e5 mov %esp,%ebp 10a65e: 53 push %ebx 10a65f: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10a662: 8b 1d 08 44 12 00 mov 0x124408,%ebx 10a668: eb 05 jmp 10a66f <_API_extensions_Run_postdriver+0x14> <== ALWAYS 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)(); 10a66a: ff 53 08 call *0x8(%ebx) 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 ) { 10a66d: 8b 1b mov (%ebx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a66f: 81 fb 0c 44 12 00 cmp $0x12440c,%ebx 10a675: 75 f3 jne 10a66a <_API_extensions_Run_postdriver+0xf> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10a677: 58 pop %eax 10a678: 5b pop %ebx 10a679: c9 leave 10a67a: c3 ret 0010a67b <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10a67b: 55 push %ebp 10a67c: 89 e5 mov %esp,%ebp 10a67e: 53 push %ebx 10a67f: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10a682: 8b 1d 08 44 12 00 mov 0x124408,%ebx 10a688: eb 11 jmp 10a69b <_API_extensions_Run_postswitch+0x20> <== ALWAYS TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10a68a: 83 ec 0c sub $0xc,%esp 10a68d: ff 35 a8 42 12 00 pushl 0x1242a8 10a693: ff 53 0c call *0xc(%ebx) 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 ) { 10a696: 8b 1b mov (%ebx),%ebx 10a698: 83 c4 10 add $0x10,%esp 10a69b: 81 fb 0c 44 12 00 cmp $0x12440c,%ebx 10a6a1: 75 e7 jne 10a68a <_API_extensions_Run_postswitch+0xf> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10a6a3: 8b 5d fc mov -0x4(%ebp),%ebx 10a6a6: c9 leave 10a6a7: c3 ret 0010c798 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10c798: 55 push %ebp 10c799: 89 e5 mov %esp,%ebp 10c79b: 57 push %edi 10c79c: 56 push %esi 10c79d: 53 push %ebx 10c79e: 83 ec 1c sub $0x1c,%esp 10c7a1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c7a4: 8b 4d 0c mov 0xc(%ebp),%ecx 10c7a7: 8b 45 14 mov 0x14(%ebp),%eax 10c7aa: 89 45 e4 mov %eax,-0x1c(%ebp) 10c7ad: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c7b0: 8b 35 c0 72 12 00 mov 0x1272c0,%esi * 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 ); 10c7b6: 9c pushf 10c7b7: fa cli 10c7b8: 5f pop %edi switch ( the_rwlock->current_state ) { 10c7b9: 8b 43 44 mov 0x44(%ebx),%eax 10c7bc: 85 c0 test %eax,%eax 10c7be: 74 05 je 10c7c5 <_CORE_RWLock_Obtain_for_reading+0x2d> 10c7c0: 48 dec %eax 10c7c1: 75 3a jne 10c7fd <_CORE_RWLock_Obtain_for_reading+0x65> 10c7c3: eb 0e jmp 10c7d3 <_CORE_RWLock_Obtain_for_reading+0x3b> <== ALWAYS TAKEN case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10c7c5: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10c7cc: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10c7cf: 57 push %edi 10c7d0: 9d popf 10c7d1: eb 21 jmp 10c7f4 <_CORE_RWLock_Obtain_for_reading+0x5c> <== ALWAYS TAKEN 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 ); 10c7d3: 83 ec 0c sub $0xc,%esp 10c7d6: 53 push %ebx 10c7d7: 88 55 dc mov %dl,-0x24(%ebp) 10c7da: 89 4d e0 mov %ecx,-0x20(%ebp) 10c7dd: e8 66 1a 00 00 call 10e248 <_Thread_queue_First> if ( !waiter ) { 10c7e2: 83 c4 10 add $0x10,%esp 10c7e5: 85 c0 test %eax,%eax 10c7e7: 8a 55 dc mov -0x24(%ebp),%dl 10c7ea: 8b 4d e0 mov -0x20(%ebp),%ecx 10c7ed: 75 0e jne 10c7fd <_CORE_RWLock_Obtain_for_reading+0x65> <== ALWAYS TAKEN the_rwlock->number_of_readers += 1; 10c7ef: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10c7f2: 57 push %edi 10c7f3: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c7f4: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10c7fb: eb 48 jmp 10c845 <_CORE_RWLock_Obtain_for_reading+0xad> <== ALWAYS TAKEN /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10c7fd: 84 d2 test %dl,%dl 10c7ff: 75 0b jne 10c80c <_CORE_RWLock_Obtain_for_reading+0x74> _ISR_Enable( level ); 10c801: 57 push %edi 10c802: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c803: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) 10c80a: eb 39 jmp 10c845 <_CORE_RWLock_Obtain_for_reading+0xad> <== ALWAYS TAKEN 10c80c: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) /* * 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; 10c813: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10c816: 89 4e 20 mov %ecx,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10c819: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c820: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10c827: 57 push %edi 10c828: 9d popf _Thread_queue_Enqueue_with_handler( 10c829: c7 45 10 74 c9 10 00 movl $0x10c974,0x10(%ebp) 10c830: 8b 45 e4 mov -0x1c(%ebp),%eax 10c833: 89 45 0c mov %eax,0xc(%ebp) 10c836: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c839: 8d 65 f4 lea -0xc(%ebp),%esp 10c83c: 5b pop %ebx 10c83d: 5e pop %esi 10c83e: 5f pop %edi 10c83f: c9 leave 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( 10c840: e9 2b 17 00 00 jmp 10df70 <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c845: 8d 65 f4 lea -0xc(%ebp),%esp 10c848: 5b pop %ebx 10c849: 5e pop %esi 10c84a: 5f pop %edi 10c84b: c9 leave 10c84c: c3 ret 0010c850 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 56 push %esi 10c854: 53 push %ebx 10c855: 83 ec 10 sub $0x10,%esp 10c858: 8b 55 08 mov 0x8(%ebp),%edx 10c85b: 8b 75 0c mov 0xc(%ebp),%esi 10c85e: 8b 5d 14 mov 0x14(%ebp),%ebx 10c861: 8a 45 10 mov 0x10(%ebp),%al 10c864: 88 45 f7 mov %al,-0x9(%ebp) ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c867: a1 c0 72 12 00 mov 0x1272c0,%eax * 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 ); 10c86c: 9c pushf 10c86d: fa cli 10c86e: 59 pop %ecx switch ( the_rwlock->current_state ) { 10c86f: 83 7a 44 00 cmpl $0x0,0x44(%edx) 10c873: 75 12 jne 10c887 <_CORE_RWLock_Obtain_for_writing+0x37> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10c875: c7 42 44 02 00 00 00 movl $0x2,0x44(%edx) _ISR_Enable( level ); 10c87c: 51 push %ecx 10c87d: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c87e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) return; 10c885: eb 46 jmp 10c8cd <_CORE_RWLock_Obtain_for_writing+0x7d> <== ALWAYS TAKEN /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10c887: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 10c88b: 75 0b jne 10c898 <_CORE_RWLock_Obtain_for_writing+0x48> _ISR_Enable( level ); 10c88d: 51 push %ecx 10c88e: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c88f: c7 40 34 02 00 00 00 movl $0x2,0x34(%eax) 10c896: eb 35 jmp 10c8cd <_CORE_RWLock_Obtain_for_writing+0x7d> <== ALWAYS TAKEN 10c898: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) /* * 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; 10c89f: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 10c8a2: 89 70 20 mov %esi,0x20(%eax) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10c8a5: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c8ac: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Enable( level ); 10c8b3: 51 push %ecx 10c8b4: 9d popf _Thread_queue_Enqueue_with_handler( 10c8b5: c7 45 10 74 c9 10 00 movl $0x10c974,0x10(%ebp) 10c8bc: 89 5d 0c mov %ebx,0xc(%ebp) 10c8bf: 89 55 08 mov %edx,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c8c2: 83 c4 10 add $0x10,%esp 10c8c5: 5b pop %ebx 10c8c6: 5e pop %esi 10c8c7: c9 leave 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( 10c8c8: e9 a3 16 00 00 jmp 10df70 <_Thread_queue_Enqueue_with_handler> _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c8cd: 83 c4 10 add $0x10,%esp 10c8d0: 5b pop %ebx 10c8d1: 5e pop %esi 10c8d2: c9 leave 10c8d3: c3 ret 0010c8d4 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10c8d4: 55 push %ebp 10c8d5: 89 e5 mov %esp,%ebp 10c8d7: 53 push %ebx 10c8d8: 83 ec 04 sub $0x4,%esp 10c8db: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c8de: 8b 15 c0 72 12 00 mov 0x1272c0,%edx * 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 ); 10c8e4: 9c pushf 10c8e5: fa cli 10c8e6: 58 pop %eax if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10c8e7: 8b 4b 44 mov 0x44(%ebx),%ecx 10c8ea: 85 c9 test %ecx,%ecx 10c8ec: 75 0b jne 10c8f9 <_CORE_RWLock_Release+0x25> _ISR_Enable( level ); 10c8ee: 50 push %eax 10c8ef: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c8f0: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) return CORE_RWLOCK_SUCCESSFUL; 10c8f7: eb 72 jmp 10c96b <_CORE_RWLock_Release+0x97> <== ALWAYS TAKEN } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10c8f9: 49 dec %ecx 10c8fa: 75 0f jne 10c90b <_CORE_RWLock_Release+0x37> the_rwlock->number_of_readers -= 1; 10c8fc: 8b 4b 48 mov 0x48(%ebx),%ecx 10c8ff: 49 dec %ecx 10c900: 89 4b 48 mov %ecx,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10c903: 85 c9 test %ecx,%ecx 10c905: 74 04 je 10c90b <_CORE_RWLock_Release+0x37> /* must be unlocked again */ _ISR_Enable( level ); 10c907: 50 push %eax 10c908: 9d popf return CORE_RWLOCK_SUCCESSFUL; 10c909: eb 60 jmp 10c96b <_CORE_RWLock_Release+0x97> <== ALWAYS TAKEN } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c90b: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10c912: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10c919: 50 push %eax 10c91a: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10c91b: 83 ec 0c sub $0xc,%esp 10c91e: 53 push %ebx 10c91f: e8 48 15 00 00 call 10de6c <_Thread_queue_Dequeue> if ( next ) { 10c924: 83 c4 10 add $0x10,%esp 10c927: 85 c0 test %eax,%eax 10c929: 74 40 je 10c96b <_CORE_RWLock_Release+0x97> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10c92b: 83 78 30 01 cmpl $0x1,0x30(%eax) 10c92f: 75 09 jne 10c93a <_CORE_RWLock_Release+0x66> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10c931: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10c938: eb 31 jmp 10c96b <_CORE_RWLock_Release+0x97> <== ALWAYS TAKEN } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10c93a: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10c93d: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10c944: 83 ec 0c sub $0xc,%esp 10c947: 53 push %ebx 10c948: e8 fb 18 00 00 call 10e248 <_Thread_queue_First> if ( !next || 10c94d: 83 c4 10 add $0x10,%esp 10c950: 85 c0 test %eax,%eax 10c952: 74 17 je 10c96b <_CORE_RWLock_Release+0x97> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10c954: 83 78 30 01 cmpl $0x1,0x30(%eax) 10c958: 74 11 je 10c96b <_CORE_RWLock_Release+0x97> <== ALWAYS TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10c95a: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10c95d: 52 push %edx 10c95e: 52 push %edx 10c95f: 50 push %eax 10c960: 53 push %ebx 10c961: e8 d2 17 00 00 call 10e138 <_Thread_queue_Extract> } 10c966: 83 c4 10 add $0x10,%esp 10c969: eb d9 jmp 10c944 <_CORE_RWLock_Release+0x70> <== ALWAYS TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10c96b: 31 c0 xor %eax,%eax 10c96d: 8b 5d fc mov -0x4(%ebp),%ebx 10c970: c9 leave 10c971: c3 ret 0010c974 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10c974: 55 push %ebp 10c975: 89 e5 mov %esp,%ebp 10c977: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c97a: 8d 45 f4 lea -0xc(%ebp),%eax 10c97d: 50 push %eax 10c97e: ff 75 08 pushl 0x8(%ebp) 10c981: e8 7a 11 00 00 call 10db00 <_Thread_Get> switch ( location ) { 10c986: 83 c4 10 add $0x10,%esp 10c989: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c98d: 75 17 jne 10c9a6 <_CORE_RWLock_Timeout+0x32> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c98f: 83 ec 0c sub $0xc,%esp 10c992: 50 push %eax 10c993: e8 70 19 00 00 call 10e308 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c998: a1 04 72 12 00 mov 0x127204,%eax 10c99d: 48 dec %eax 10c99e: a3 04 72 12 00 mov %eax,0x127204 10c9a3: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c9a6: c9 leave 10c9a7: c3 ret 00110a44 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 110a44: 55 push %ebp 110a45: 89 e5 mov %esp,%ebp 110a47: 56 push %esi 110a48: 53 push %ebx 110a49: 8b 75 08 mov 0x8(%ebp),%esi Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 110a4c: 31 db xor %ebx,%ebx 110a4e: eb 01 jmp 110a51 <_CORE_barrier_Release+0xd> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 110a50: 43 inc %ebx { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 110a51: 83 ec 0c sub $0xc,%esp 110a54: 56 push %esi 110a55: e8 26 b5 ff ff call 10bf80 <_Thread_queue_Dequeue> 110a5a: 83 c4 10 add $0x10,%esp 110a5d: 85 c0 test %eax,%eax 110a5f: 75 ef jne 110a50 <_CORE_barrier_Release+0xc> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; 110a61: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) return count; } 110a68: 89 d8 mov %ebx,%eax 110a6a: 8d 65 f8 lea -0x8(%ebp),%esp 110a6d: 5b pop %ebx 110a6e: 5e pop %esi 110a6f: c9 leave 110a70: c3 ret 00110a74 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 110a74: 55 push %ebp 110a75: 89 e5 mov %esp,%ebp 110a77: 57 push %edi 110a78: 56 push %esi 110a79: 53 push %ebx 110a7a: 83 ec 1c sub $0x1c,%esp 110a7d: 8b 45 08 mov 0x8(%ebp),%eax 110a80: 8b 4d 0c mov 0xc(%ebp),%ecx 110a83: 8b 75 14 mov 0x14(%ebp),%esi 110a86: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 110a89: 8b 15 a8 42 12 00 mov 0x1242a8,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 110a8f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 110a96: 9c pushf 110a97: fa cli 110a98: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 110a9b: 8b 58 48 mov 0x48(%eax),%ebx 110a9e: 43 inc %ebx 110a9f: 89 58 48 mov %ebx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 110aa2: 83 78 40 00 cmpl $0x0,0x40(%eax) 110aa6: 75 25 jne 110acd <_CORE_barrier_Wait+0x59> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 110aa8: 3b 58 44 cmp 0x44(%eax),%ebx 110aab: 75 20 jne 110acd <_CORE_barrier_Wait+0x59> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 110aad: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 110ab4: ff 75 e4 pushl -0x1c(%ebp) 110ab7: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 110ab8: 89 7d 10 mov %edi,0x10(%ebp) 110abb: 89 4d 0c mov %ecx,0xc(%ebp) 110abe: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 110ac1: 83 c4 1c add $0x1c,%esp 110ac4: 5b pop %ebx 110ac5: 5e pop %esi 110ac6: 5f pop %edi 110ac7: c9 leave 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 ); 110ac8: e9 77 ff ff ff jmp 110a44 <_CORE_barrier_Release> <== ALWAYS TAKEN 110acd: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 110ad4: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 110ad7: 89 4a 20 mov %ecx,0x20(%edx) _ISR_Enable( level ); 110ada: ff 75 e4 pushl -0x1c(%ebp) 110add: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 110ade: c7 45 10 40 c3 10 00 movl $0x10c340,0x10(%ebp) 110ae5: 89 75 0c mov %esi,0xc(%ebp) 110ae8: 89 45 08 mov %eax,0x8(%ebp) } 110aeb: 83 c4 1c add $0x1c,%esp 110aee: 5b pop %ebx 110aef: 5e pop %esi 110af0: 5f pop %edi 110af1: c9 leave _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 ); 110af2: e9 8d b5 ff ff jmp 10c084 <_Thread_queue_Enqueue_with_handler> 00116dc0 <_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 ) { 116dc0: 55 push %ebp 116dc1: 89 e5 mov %esp,%ebp 116dc3: 57 push %edi 116dc4: 56 push %esi 116dc5: 53 push %ebx 116dc6: 83 ec 1c sub $0x1c,%esp 116dc9: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 116dcc: b8 01 00 00 00 mov $0x1,%eax 116dd1: 8b 55 10 mov 0x10(%ebp),%edx 116dd4: 3b 53 4c cmp 0x4c(%ebx),%edx 116dd7: 77 4c ja 116e25 <_CORE_message_queue_Broadcast+0x65> <== ALWAYS TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 116dd9: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) * 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 ) { 116de0: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 116de4: 74 23 je 116e09 <_CORE_message_queue_Broadcast+0x49> *count = 0; 116de6: 8b 45 1c mov 0x1c(%ebp),%eax 116de9: c7 00 00 00 00 00 movl $0x0,(%eax) 116def: eb 32 jmp 116e23 <_CORE_message_queue_Broadcast+0x63> <== ALWAYS TAKEN */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 116df1: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 116df4: 8b 42 2c mov 0x2c(%edx),%eax 116df7: 89 c7 mov %eax,%edi 116df9: 8b 75 0c mov 0xc(%ebp),%esi 116dfc: 8b 4d 10 mov 0x10(%ebp),%ecx 116dff: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 116e01: 8b 42 28 mov 0x28(%edx),%eax 116e04: 8b 55 10 mov 0x10(%ebp),%edx 116e07: 89 10 mov %edx,(%eax) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 116e09: 83 ec 0c sub $0xc,%esp 116e0c: 53 push %ebx 116e0d: e8 9e 21 00 00 call 118fb0 <_Thread_queue_Dequeue> 116e12: 89 c2 mov %eax,%edx /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 116e14: 83 c4 10 add $0x10,%esp 116e17: 85 c0 test %eax,%eax 116e19: 75 d6 jne 116df1 <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 116e1b: 8b 55 e4 mov -0x1c(%ebp),%edx 116e1e: 8b 45 1c mov 0x1c(%ebp),%eax 116e21: 89 10 mov %edx,(%eax) 116e23: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 116e25: 8d 65 f4 lea -0xc(%ebp),%esp 116e28: 5b pop %ebx 116e29: 5e pop %esi 116e2a: 5f pop %edi 116e2b: c9 leave 116e2c: c3 ret 001145fc <_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 ) { 1145fc: 55 push %ebp 1145fd: 89 e5 mov %esp,%ebp 1145ff: 53 push %ebx 114600: 83 ec 08 sub $0x8,%esp 114603: 8b 5d 08 mov 0x8(%ebp),%ebx /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 114606: ff 75 10 pushl 0x10(%ebp) 114609: ff 75 0c pushl 0xc(%ebp) 11460c: 53 push %ebx 11460d: e8 f2 b2 ff ff call 10f904 <_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 ) 114612: 83 c4 10 add $0x10,%esp 114615: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 114619: 74 0c je 114627 <_CORE_message_queue_Close+0x2b> (void) _CORE_message_queue_Flush_support( the_message_queue ); 11461b: 83 ec 0c sub $0xc,%esp 11461e: 53 push %ebx 11461f: e8 14 00 00 00 call 114638 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 114624: 83 c4 10 add $0x10,%esp (void) _Workspace_Free( the_message_queue->message_buffers ); 114627: 8b 43 5c mov 0x5c(%ebx),%eax 11462a: 89 45 08 mov %eax,0x8(%ebp) } 11462d: 8b 5d fc mov -0x4(%ebp),%ebx 114630: c9 leave */ 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 ); 114631: e9 a3 bc ff ff jmp 1102d9 <_Workspace_Free> 00116e6c <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { 116e6c: 55 push %ebp 116e6d: 89 e5 mov %esp,%ebp 116e6f: 83 ec 08 sub $0x8,%esp 116e72: 8b 45 08 mov 0x8(%ebp),%eax if ( the_message_queue->number_of_pending_messages != 0 ) 116e75: 83 78 48 00 cmpl $0x0,0x48(%eax) 116e79: 75 04 jne 116e7f <_CORE_message_queue_Flush+0x13> return _CORE_message_queue_Flush_support( the_message_queue ); else return 0; } 116e7b: 31 c0 xor %eax,%eax 116e7d: c9 leave 116e7e: c3 ret uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { if ( the_message_queue->number_of_pending_messages != 0 ) return _CORE_message_queue_Flush_support( the_message_queue ); 116e7f: 89 45 08 mov %eax,0x8(%ebp) else return 0; } 116e82: c9 leave uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { if ( the_message_queue->number_of_pending_messages != 0 ) return _CORE_message_queue_Flush_support( the_message_queue ); 116e83: e9 00 00 00 00 jmp 116e88 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 00112204 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 112204: 55 push %ebp 112205: 89 e5 mov %esp,%ebp 112207: 57 push %edi 112208: 56 push %esi 112209: 53 push %ebx 11220a: 83 ec 0c sub $0xc,%esp 11220d: 8b 5d 08 mov 0x8(%ebp),%ebx 112210: 8b 75 10 mov 0x10(%ebp),%esi 112213: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 112216: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 112219: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 112220: 89 53 4c mov %edx,0x4c(%ebx) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 112223: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 11222a: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) /* * 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)) { 112231: 89 d0 mov %edx,%eax 112233: f6 c2 03 test $0x3,%dl 112236: 74 0a je 112242 <_CORE_message_queue_Initialize+0x3e> allocated_message_size += sizeof(uint32_t); 112238: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 11223b: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 11223e: 39 d0 cmp %edx,%eax 112240: 72 5f jb 1122a1 <_CORE_message_queue_Initialize+0x9d> <== ALWAYS TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 112242: 8d 78 14 lea 0x14(%eax),%edi /* * 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 * 112245: 89 fa mov %edi,%edx 112247: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 11224a: 39 c2 cmp %eax,%edx 11224c: 72 53 jb 1122a1 <_CORE_message_queue_Initialize+0x9d> <== ALWAYS TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11224e: 83 ec 0c sub $0xc,%esp 112251: 52 push %edx 112252: e8 11 26 00 00 call 114868 <_Workspace_Allocate> 112257: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 11225a: 83 c4 10 add $0x10,%esp 11225d: 85 c0 test %eax,%eax 11225f: 74 40 je 1122a1 <_CORE_message_queue_Initialize+0x9d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112261: 57 push %edi 112262: 56 push %esi 112263: 50 push %eax 112264: 8d 43 68 lea 0x68(%ebx),%eax 112267: 50 push %eax 112268: e8 b3 45 00 00 call 116820 <_Chain_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11226d: 8d 43 54 lea 0x54(%ebx),%eax 112270: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112273: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 11227a: 8d 43 50 lea 0x50(%ebx),%eax 11227d: 89 43 58 mov %eax,0x58(%ebx) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 112280: 6a 06 push $0x6 112282: 68 80 00 00 00 push $0x80 112287: 8b 45 0c mov 0xc(%ebp),%eax 11228a: 83 38 01 cmpl $0x1,(%eax) 11228d: 0f 94 c0 sete %al 112290: 0f b6 c0 movzbl %al,%eax 112293: 50 push %eax 112294: 53 push %ebx 112295: e8 a6 1c 00 00 call 113f40 <_Thread_queue_Initialize> 11229a: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11229c: 83 c4 20 add $0x20,%esp 11229f: eb 02 jmp 1122a3 <_CORE_message_queue_Initialize+0x9f> <== ALWAYS TAKEN 1122a1: 31 c0 xor %eax,%eax } 1122a3: 8d 65 f4 lea -0xc(%ebp),%esp 1122a6: 5b pop %ebx 1122a7: 5e pop %esi 1122a8: 5f pop %edi 1122a9: c9 leave 1122aa: c3 ret 0010ebf8 <_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 ) { 10ebf8: 55 push %ebp 10ebf9: 89 e5 mov %esp,%ebp 10ebfb: 56 push %esi 10ebfc: 53 push %ebx 10ebfd: 8b 45 08 mov 0x8(%ebp),%eax 10ec00: 8b 55 0c mov 0xc(%ebp),%edx 10ec03: 8b 5d 10 mov 0x10(%ebp),%ebx 10ec06: 89 5a 08 mov %ebx,0x8(%edx) _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 ) { 10ec09: 81 fb ff ff ff 7f cmp $0x7fffffff,%ebx 10ec0f: 75 1a jne 10ec2b <_CORE_message_queue_Insert_message+0x33> _ISR_Disable( level ); 10ec11: 9c pushf 10ec12: fa cli 10ec13: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 10ec14: ff 40 48 incl 0x48(%eax) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ec17: 8d 48 54 lea 0x54(%eax),%ecx 10ec1a: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 10ec1c: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 10ec1f: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 10ec22: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 10ec24: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10ec27: 53 push %ebx 10ec28: 9d popf 10ec29: eb 4d jmp 10ec78 <_CORE_message_queue_Insert_message+0x80> <== ALWAYS TAKEN } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 10ec2b: 81 fb 00 00 00 80 cmp $0x80000000,%ebx 10ec31: 75 1b jne 10ec4e <_CORE_message_queue_Insert_message+0x56> _ISR_Disable( level ); 10ec33: 9c pushf 10ec34: fa cli 10ec35: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 10ec36: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10ec39: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ec3c: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 10ec3f: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 10ec42: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 10ec45: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 10ec47: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10ec4a: 53 push %ebx 10ec4b: 9d popf 10ec4c: eb 2a jmp 10ec78 <_CORE_message_queue_Insert_message+0x80> <== ALWAYS TAKEN 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; 10ec4e: 8b 48 50 mov 0x50(%eax),%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ec51: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 10ec54: eb 07 jmp 10ec5d <_CORE_message_queue_Insert_message+0x65> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority ( CORE_message_queue_Buffer_control *the_message ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) return the_message->priority; 10ec56: 39 59 08 cmp %ebx,0x8(%ecx) 10ec59: 7f 06 jg 10ec61 <_CORE_message_queue_Insert_message+0x69> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { the_node = the_node->next; 10ec5b: 8b 09 mov (%ecx),%ecx 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 ) ) { 10ec5d: 39 f1 cmp %esi,%ecx 10ec5f: 75 f5 jne 10ec56 <_CORE_message_queue_Insert_message+0x5e> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 10ec61: 9c pushf 10ec62: fa cli 10ec63: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 10ec64: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 10ec67: 8b 49 04 mov 0x4(%ecx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ec6a: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 10ec6d: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 10ec6f: 89 11 mov %edx,(%ecx) the_node->next = before_node; 10ec71: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 10ec73: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 10ec76: 56 push %esi 10ec77: 9d popf /* * 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 ) 10ec78: 8b 50 60 mov 0x60(%eax),%edx 10ec7b: 85 d2 test %edx,%edx 10ec7d: 74 0b je 10ec8a <_CORE_message_queue_Insert_message+0x92> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 10ec7f: 8b 40 64 mov 0x64(%eax),%eax 10ec82: 89 45 08 mov %eax,0x8(%ebp) #endif } 10ec85: 5b pop %ebx 10ec86: 5e pop %esi 10ec87: c9 leave * 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); 10ec88: ff e2 jmp *%edx #endif } 10ec8a: 5b pop %ebx 10ec8b: 5e pop %esi 10ec8c: c9 leave 10ec8d: c3 ret 001122ac <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1122ac: 55 push %ebp 1122ad: 89 e5 mov %esp,%ebp 1122af: 57 push %edi 1122b0: 56 push %esi 1122b1: 53 push %ebx 1122b2: 83 ec 2c sub $0x2c,%esp 1122b5: 8b 55 08 mov 0x8(%ebp),%edx 1122b8: 8b 45 0c mov 0xc(%ebp),%eax 1122bb: 89 45 dc mov %eax,-0x24(%ebp) 1122be: 8b 5d 10 mov 0x10(%ebp),%ebx 1122c1: 89 5d e0 mov %ebx,-0x20(%ebp) 1122c4: 8b 4d 14 mov 0x14(%ebp),%ecx 1122c7: 8b 75 1c mov 0x1c(%ebp),%esi 1122ca: 89 75 d4 mov %esi,-0x2c(%ebp) 1122cd: 8a 45 18 mov 0x18(%ebp),%al 1122d0: 88 45 db mov %al,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1122d3: a1 78 d5 12 00 mov 0x12d578,%eax executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1122d8: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Disable( level ); 1122df: 9c pushf 1122e0: fa cli 1122e1: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1122e4: 8b 5a 50 mov 0x50(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1122e7: 8d 72 54 lea 0x54(%edx),%esi 1122ea: 39 f3 cmp %esi,%ebx 1122ec: 0f 84 8a 00 00 00 je 11237c <_CORE_message_queue_Seize+0xd0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 1122f2: 8b 33 mov (%ebx),%esi the_chain->first = new_first; 1122f4: 89 72 50 mov %esi,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 1122f7: 8d 7a 50 lea 0x50(%edx),%edi 1122fa: 89 7e 04 mov %edi,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 1122fd: 85 db test %ebx,%ebx 1122ff: 74 7b je 11237c <_CORE_message_queue_Seize+0xd0> <== ALWAYS TAKEN the_message_queue->number_of_pending_messages -= 1; 112301: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 112304: ff 75 e4 pushl -0x1c(%ebp) 112307: 9d popf *size_p = the_message->Contents.size; 112308: 8b 43 0c mov 0xc(%ebx),%eax 11230b: 89 01 mov %eax,(%ecx) _Thread_Executing->Wait.count = 11230d: 8b 73 08 mov 0x8(%ebx),%esi 112310: a1 78 d5 12 00 mov 0x12d578,%eax 112315: 89 70 24 mov %esi,0x24(%eax) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 112318: 8d 73 10 lea 0x10(%ebx),%esi 11231b: 89 75 e4 mov %esi,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11231e: 8b 09 mov (%ecx),%ecx 112320: 8b 7d e0 mov -0x20(%ebp),%edi 112323: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * 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 ); 112325: 83 ec 0c sub $0xc,%esp 112328: 52 push %edx 112329: 89 55 d0 mov %edx,-0x30(%ebp) 11232c: e8 f3 18 00 00 call 113c24 <_Thread_queue_Dequeue> if ( !the_thread ) { 112331: 83 c4 10 add $0x10,%esp 112334: 85 c0 test %eax,%eax 112336: 8b 55 d0 mov -0x30(%ebp),%edx 112339: 75 15 jne 112350 <_CORE_message_queue_Seize+0xa4> 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 ); 11233b: 89 5d 0c mov %ebx,0xc(%ebp) 11233e: 83 c2 68 add $0x68,%edx 112341: 89 55 08 mov %edx,0x8(%ebp) 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 ); } 112344: 8d 65 f4 lea -0xc(%ebp),%esp 112347: 5b pop %ebx 112348: 5e pop %esi 112349: 5f pop %edi 11234a: c9 leave 11234b: e9 34 fe ff ff jmp 112184 <_Chain_Append> <== ALWAYS TAKEN CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 112350: 8b 48 24 mov 0x24(%eax),%ecx 112353: 89 4b 08 mov %ecx,0x8(%ebx) */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 112356: 8b 48 30 mov 0x30(%eax),%ecx 112359: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11235c: 8b 70 2c mov 0x2c(%eax),%esi 11235f: 8b 7d e4 mov -0x1c(%ebp),%edi 112362: f3 a4 rep movsb %ds:(%esi),%es:(%edi) the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 112364: 8b 43 08 mov 0x8(%ebx),%eax 112367: 89 45 10 mov %eax,0x10(%ebp) 11236a: 89 5d 0c mov %ebx,0xc(%ebp) 11236d: 89 55 08 mov %edx,0x8(%ebp) 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 ); } 112370: 8d 65 f4 lea -0xc(%ebp),%esp 112373: 5b pop %ebx 112374: 5e pop %esi 112375: 5f pop %edi 112376: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 112377: e9 dc 44 00 00 jmp 116858 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 11237c: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 112380: 75 13 jne 112395 <_CORE_message_queue_Seize+0xe9> _ISR_Enable( level ); 112382: ff 75 e4 pushl -0x1c(%ebp) 112385: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112386: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax) 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 ); } 11238d: 8d 65 f4 lea -0xc(%ebp),%esp 112390: 5b pop %ebx 112391: 5e pop %esi 112392: 5f pop %edi 112393: c9 leave 112394: c3 ret 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; 112395: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) 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; 11239c: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 11239f: 8b 5d dc mov -0x24(%ebp),%ebx 1123a2: 89 58 20 mov %ebx,0x20(%eax) executing->Wait.return_argument_second.mutable_object = buffer; 1123a5: 8b 75 e0 mov -0x20(%ebp),%esi 1123a8: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.return_argument = size_p; 1123ab: 89 48 28 mov %ecx,0x28(%eax) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 1123ae: ff 75 e4 pushl -0x1c(%ebp) 1123b1: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 1123b2: c7 45 10 e4 3f 11 00 movl $0x113fe4,0x10(%ebp) 1123b9: 8b 45 d4 mov -0x2c(%ebp),%eax 1123bc: 89 45 0c mov %eax,0xc(%ebp) 1123bf: 89 55 08 mov %edx,0x8(%ebp) } 1123c2: 8d 65 f4 lea -0xc(%ebp),%esp 1123c5: 5b pop %ebx 1123c6: 5e pop %esi 1123c7: 5f pop %edi 1123c8: c9 leave 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 ); 1123c9: e9 5a 19 00 00 jmp 113d28 <_Thread_queue_Enqueue_with_handler> 0010a7d8 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10a7d8: 55 push %ebp 10a7d9: 89 e5 mov %esp,%ebp 10a7db: 57 push %edi 10a7dc: 56 push %esi 10a7dd: 53 push %ebx 10a7de: 83 ec 1c sub $0x1c,%esp 10a7e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10a7e4: 8b 75 0c mov 0xc(%ebp),%esi 10a7e7: 8a 4d 20 mov 0x20(%ebp),%cl CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10a7ea: b8 01 00 00 00 mov $0x1,%eax 10a7ef: 8b 55 10 mov 0x10(%ebp),%edx 10a7f2: 3b 53 4c cmp 0x4c(%ebx),%edx 10a7f5: 0f 87 cd 00 00 00 ja 10a8c8 <_CORE_message_queue_Submit+0xf0> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10a7fb: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 10a7ff: 75 37 jne 10a838 <_CORE_message_queue_Submit+0x60> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10a801: 83 ec 0c sub $0xc,%esp 10a804: 53 push %ebx 10a805: 88 4d e4 mov %cl,-0x1c(%ebp) 10a808: e8 73 17 00 00 call 10bf80 <_Thread_queue_Dequeue> 10a80d: 89 c2 mov %eax,%edx if ( the_thread ) { 10a80f: 83 c4 10 add $0x10,%esp 10a812: 85 c0 test %eax,%eax 10a814: 8a 4d e4 mov -0x1c(%ebp),%cl 10a817: 74 1f je 10a838 <_CORE_message_queue_Submit+0x60> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10a819: 8b 40 2c mov 0x2c(%eax),%eax 10a81c: 89 c7 mov %eax,%edi 10a81e: 8b 4d 10 mov 0x10(%ebp),%ecx 10a821: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 10a823: 8b 42 28 mov 0x28(%edx),%eax 10a826: 8b 4d 10 mov 0x10(%ebp),%ecx 10a829: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10a82b: 8b 45 1c mov 0x1c(%ebp),%eax 10a82e: 89 42 24 mov %eax,0x24(%edx) 10a831: 31 c0 xor %eax,%eax #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; 10a833: e9 90 00 00 00 jmp 10a8c8 <_CORE_message_queue_Submit+0xf0> <== ALWAYS TAKEN /* * 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 < the_message_queue->maximum_pending_messages ) { 10a838: 8b 43 48 mov 0x48(%ebx),%eax 10a83b: 3b 43 44 cmp 0x44(%ebx),%eax 10a83e: 73 33 jae 10a873 <_CORE_message_queue_Submit+0x9b> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10a840: 83 ec 0c sub $0xc,%esp 10a843: 8d 43 68 lea 0x68(%ebx),%eax 10a846: 50 push %eax 10a847: e8 68 ff ff ff call 10a7b4 <_Chain_Get> <== ALWAYS TAKEN 10a84c: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10a84e: 8d 40 10 lea 0x10(%eax),%eax 10a851: 89 c7 mov %eax,%edi 10a853: 8b 4d 10 mov 0x10(%ebp),%ecx 10a856: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10a858: 8b 4d 10 mov 0x10(%ebp),%ecx 10a85b: 89 4a 0c mov %ecx,0xc(%edx) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 10a85e: 8b 45 1c mov 0x1c(%ebp),%eax 10a861: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10a864: 83 c4 0c add $0xc,%esp 10a867: 50 push %eax 10a868: 52 push %edx 10a869: 53 push %ebx 10a86a: e8 89 43 00 00 call 10ebf8 <_CORE_message_queue_Insert_message> 10a86f: 31 c0 xor %eax,%eax 10a871: eb 52 jmp 10a8c5 <_CORE_message_queue_Submit+0xed> <== ALWAYS TAKEN /* * 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 ) { 10a873: b8 02 00 00 00 mov $0x2,%eax 10a878: 84 c9 test %cl,%cl 10a87a: 74 4c je 10a8c8 <_CORE_message_queue_Submit+0xf0> /* * 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() ) { 10a87c: 8b 15 84 42 12 00 mov 0x124284,%edx 10a882: b0 03 mov $0x3,%al 10a884: 85 d2 test %edx,%edx 10a886: 75 40 jne 10a8c8 <_CORE_message_queue_Submit+0xf0> * 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; 10a888: a1 a8 42 12 00 mov 0x1242a8,%eax ISR_Level level; _ISR_Disable( level ); 10a88d: 9c pushf 10a88e: fa cli 10a88f: 59 pop %ecx 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; 10a890: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 10a897: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10a89a: 8b 55 14 mov 0x14(%ebp),%edx 10a89d: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10a8a0: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10a8a3: 8b 55 10 mov 0x10(%ebp),%edx 10a8a6: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10a8a9: 8b 55 1c mov 0x1c(%ebp),%edx 10a8ac: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10a8af: 51 push %ecx 10a8b0: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10a8b1: 50 push %eax 10a8b2: 68 40 c3 10 00 push $0x10c340 10a8b7: ff 75 24 pushl 0x24(%ebp) 10a8ba: 53 push %ebx 10a8bb: e8 c4 17 00 00 call 10c084 <_Thread_queue_Enqueue_with_handler> 10a8c0: b8 07 00 00 00 mov $0x7,%eax } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10a8c5: 83 c4 10 add $0x10,%esp #endif } 10a8c8: 8d 65 f4 lea -0xc(%ebp),%esp 10a8cb: 5b pop %ebx 10a8cc: 5e pop %esi 10a8cd: 5f pop %edi 10a8ce: c9 leave 10a8cf: c3 ret 0010a8dc <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10a8dc: 55 push %ebp 10a8dd: 89 e5 mov %esp,%ebp 10a8df: 57 push %edi 10a8e0: 56 push %esi 10a8e1: 53 push %ebx 10a8e2: 83 ec 0c sub $0xc,%esp 10a8e5: 8b 55 08 mov 0x8(%ebp),%edx 10a8e8: 8b 5d 0c mov 0xc(%ebp),%ebx 10a8eb: 8b 45 10 mov 0x10(%ebp),%eax /* 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; 10a8ee: 8d 7a 40 lea 0x40(%edx),%edi 10a8f1: b9 04 00 00 00 mov $0x4,%ecx 10a8f6: 89 de mov %ebx,%esi 10a8f8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10a8fa: 89 42 50 mov %eax,0x50(%edx) the_mutex->blocked_count = 0; 10a8fd: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10a904: 85 c0 test %eax,%eax 10a906: 75 35 jne 10a93d <_CORE_mutex_Initialize+0x61> the_mutex->nest_count = 1; 10a908: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx) the_mutex->holder = _Thread_Executing; 10a90f: 8b 0d a8 42 12 00 mov 0x1242a8,%ecx 10a915: 89 4a 5c mov %ecx,0x5c(%edx) the_mutex->holder_id = _Thread_Executing->Object.id; 10a918: 8b 41 08 mov 0x8(%ecx),%eax 10a91b: 89 42 60 mov %eax,0x60(%edx) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10a91e: 8b 42 48 mov 0x48(%edx),%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10a921: 83 f8 02 cmp $0x2,%eax 10a924: 74 05 je 10a92b <_CORE_mutex_Initialize+0x4f> 10a926: 83 f8 03 cmp $0x3,%eax 10a929: 75 27 jne 10a952 <_CORE_mutex_Initialize+0x76> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10a92b: 8b 71 14 mov 0x14(%ecx),%esi 10a92e: b8 06 00 00 00 mov $0x6,%eax 10a933: 3b 72 4c cmp 0x4c(%edx),%esi 10a936: 72 36 jb 10a96e <_CORE_mutex_Initialize+0x92> _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++; 10a938: ff 41 1c incl 0x1c(%ecx) 10a93b: eb 15 jmp 10a952 <_CORE_mutex_Initialize+0x76> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 10a93d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) the_mutex->holder = NULL; 10a944: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) the_mutex->holder_id = 0; 10a94b: c7 42 60 00 00 00 00 movl $0x0,0x60(%edx) } _Thread_queue_Initialize( 10a952: 6a 05 push $0x5 10a954: 68 00 04 00 00 push $0x400 10a959: 31 c0 xor %eax,%eax 10a95b: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10a95f: 0f 95 c0 setne %al 10a962: 50 push %eax 10a963: 52 push %edx 10a964: e8 33 19 00 00 call 10c29c <_Thread_queue_Initialize> 10a969: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10a96b: 83 c4 10 add $0x10,%esp } 10a96e: 8d 65 f4 lea -0xc(%ebp),%esp 10a971: 5b pop %ebx 10a972: 5e pop %esi 10a973: 5f pop %edi 10a974: c9 leave 10a975: c3 ret 0010a9c5 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10a9c5: 55 push %ebp 10a9c6: 89 e5 mov %esp,%ebp 10a9c8: 53 push %ebx 10a9c9: 83 ec 14 sub $0x14,%esp 10a9cc: 8b 5d 08 mov 0x8(%ebp),%ebx 10a9cf: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10a9d2: a1 ec 41 12 00 mov 0x1241ec,%eax 10a9d7: 85 c0 test %eax,%eax 10a9d9: 74 19 je 10a9f4 <_CORE_mutex_Seize+0x2f> 10a9db: 84 d2 test %dl,%dl 10a9dd: 74 15 je 10a9f4 <_CORE_mutex_Seize+0x2f> <== ALWAYS TAKEN 10a9df: 83 3d 84 43 12 00 01 cmpl $0x1,0x124384 10a9e6: 76 0c jbe 10a9f4 <_CORE_mutex_Seize+0x2f> 10a9e8: 53 push %ebx 10a9e9: 6a 13 push $0x13 10a9eb: 6a 00 push $0x0 10a9ed: 6a 00 push $0x0 10a9ef: e8 60 05 00 00 call 10af54 <_Internal_error_Occurred> 10a9f4: 51 push %ecx 10a9f5: 51 push %ecx 10a9f6: 8d 45 18 lea 0x18(%ebp),%eax 10a9f9: 50 push %eax 10a9fa: 53 push %ebx 10a9fb: 88 55 f4 mov %dl,-0xc(%ebp) 10a9fe: e8 8d 42 00 00 call 10ec90 <_CORE_mutex_Seize_interrupt_trylock> 10aa03: 83 c4 10 add $0x10,%esp 10aa06: 85 c0 test %eax,%eax 10aa08: 8a 55 f4 mov -0xc(%ebp),%dl 10aa0b: 74 48 je 10aa55 <_CORE_mutex_Seize+0x90> 10aa0d: 84 d2 test %dl,%dl 10aa0f: 75 12 jne 10aa23 <_CORE_mutex_Seize+0x5e> 10aa11: ff 75 18 pushl 0x18(%ebp) 10aa14: 9d popf 10aa15: a1 a8 42 12 00 mov 0x1242a8,%eax 10aa1a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10aa21: eb 32 jmp 10aa55 <_CORE_mutex_Seize+0x90> <== ALWAYS TAKEN 10aa23: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10aa2a: a1 a8 42 12 00 mov 0x1242a8,%eax 10aa2f: 89 58 44 mov %ebx,0x44(%eax) 10aa32: 8b 55 0c mov 0xc(%ebp),%edx 10aa35: 89 50 20 mov %edx,0x20(%eax) 10aa38: a1 ec 41 12 00 mov 0x1241ec,%eax 10aa3d: 40 inc %eax 10aa3e: a3 ec 41 12 00 mov %eax,0x1241ec 10aa43: ff 75 18 pushl 0x18(%ebp) 10aa46: 9d popf 10aa47: 50 push %eax 10aa48: 50 push %eax 10aa49: ff 75 14 pushl 0x14(%ebp) 10aa4c: 53 push %ebx 10aa4d: e8 26 ff ff ff call 10a978 <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN 10aa52: 83 c4 10 add $0x10,%esp } 10aa55: 8b 5d fc mov -0x4(%ebp),%ebx 10aa58: c9 leave 10aa59: c3 ret 0010a978 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 10a978: 55 push %ebp 10a979: 89 e5 mov %esp,%ebp 10a97b: 56 push %esi 10a97c: 53 push %ebx 10a97d: 8b 5d 08 mov 0x8(%ebp),%ebx 10a980: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *executing; executing = _Thread_Executing; 10a983: 8b 15 a8 42 12 00 mov 0x1242a8,%edx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 10a989: 83 7b 48 02 cmpl $0x2,0x48(%ebx) 10a98d: 75 18 jne 10a9a7 <_CORE_mutex_Seize_interrupt_blocking+0x2f> if ( the_mutex->holder->current_priority > executing->current_priority ) { 10a98f: 8b 43 5c mov 0x5c(%ebx),%eax 10a992: 8b 52 14 mov 0x14(%edx),%edx 10a995: 39 50 14 cmp %edx,0x14(%eax) 10a998: 76 0d jbe 10a9a7 <_CORE_mutex_Seize_interrupt_blocking+0x2f> _Thread_Change_priority( 10a99a: 51 push %ecx 10a99b: 6a 00 push $0x0 10a99d: 52 push %edx 10a99e: 50 push %eax 10a99f: e8 b0 0d 00 00 call 10b754 <_Thread_Change_priority> <== ALWAYS TAKEN 10a9a4: 83 c4 10 add $0x10,%esp false ); } } the_mutex->blocked_count++; 10a9a7: ff 43 58 incl 0x58(%ebx) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 10a9aa: 50 push %eax 10a9ab: 68 40 c3 10 00 push $0x10c340 10a9b0: 56 push %esi 10a9b1: 53 push %ebx 10a9b2: e8 cd 16 00 00 call 10c084 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10a9b7: 83 c4 10 add $0x10,%esp } 10a9ba: 8d 65 f8 lea -0x8(%ebp),%esp 10a9bd: 5b pop %ebx 10a9be: 5e pop %esi 10a9bf: c9 leave } the_mutex->blocked_count++; _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); _Thread_Enable_dispatch(); 10a9c0: e9 2c 12 00 00 jmp 10bbf1 <_Thread_Enable_dispatch> 0010ec90 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 10ec90: 55 push %ebp 10ec91: 89 e5 mov %esp,%ebp 10ec93: 53 push %ebx 10ec94: 83 ec 04 sub $0x4,%esp 10ec97: 8b 45 08 mov 0x8(%ebp),%eax 10ec9a: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10ec9d: 8b 15 a8 42 12 00 mov 0x1242a8,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10eca3: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10ecaa: 83 78 50 00 cmpl $0x0,0x50(%eax) 10ecae: 0f 84 87 00 00 00 je 10ed3b <_CORE_mutex_Seize_interrupt_trylock+0xab> the_mutex->lock = CORE_MUTEX_LOCKED; 10ecb4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10ecbb: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10ecbe: 8b 5a 08 mov 0x8(%edx),%ebx 10ecc1: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10ecc4: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10eccb: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10ecce: 83 fb 02 cmp $0x2,%ebx 10ecd1: 74 05 je 10ecd8 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10ecd3: 83 fb 03 cmp $0x3,%ebx 10ecd6: 75 08 jne 10ece0 <_CORE_mutex_Seize_interrupt_trylock+0x50> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 10ecd8: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10ecdb: 83 fb 03 cmp $0x3,%ebx 10ecde: 74 05 je 10ece5 <_CORE_mutex_Seize_interrupt_trylock+0x55> _ISR_Enable( *level_p ); 10ece0: ff 31 pushl (%ecx) 10ece2: 9d popf 10ece3: eb 7b jmp 10ed60 <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10ece5: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10ece8: 3b 58 4c cmp 0x4c(%eax),%ebx 10eceb: 75 05 jne 10ecf2 <_CORE_mutex_Seize_interrupt_trylock+0x62> _ISR_Enable( *level_p ); 10eced: ff 31 pushl (%ecx) 10ecef: 9d popf 10ecf0: eb 6e jmp 10ed60 <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN return 0; } if ( current > ceiling ) { 10ecf2: 76 2a jbe 10ed1e <_CORE_mutex_Seize_interrupt_trylock+0x8e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ecf4: 8b 15 ec 41 12 00 mov 0x1241ec,%edx 10ecfa: 42 inc %edx 10ecfb: 89 15 ec 41 12 00 mov %edx,0x1241ec _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10ed01: ff 31 pushl (%ecx) 10ed03: 9d popf _Thread_Change_priority( 10ed04: 52 push %edx 10ed05: 6a 00 push $0x0 10ed07: ff 70 4c pushl 0x4c(%eax) 10ed0a: ff 70 5c pushl 0x5c(%eax) 10ed0d: e8 42 ca ff ff call 10b754 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10ed12: e8 da ce ff ff call 10bbf1 <_Thread_Enable_dispatch> 10ed17: 31 c0 xor %eax,%eax 10ed19: 83 c4 10 add $0x10,%esp 10ed1c: eb 4b jmp 10ed69 <_CORE_mutex_Seize_interrupt_trylock+0xd9> <== ALWAYS TAKEN return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10ed1e: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10ed25: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10ed2c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10ed33: ff 4a 1c decl 0x1c(%edx) _ISR_Enable( *level_p ); 10ed36: ff 31 pushl (%ecx) 10ed38: 9d popf 10ed39: eb 25 jmp 10ed60 <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 10ed3b: 8b 58 5c mov 0x5c(%eax),%ebx 10ed3e: 39 d3 cmp %edx,%ebx 10ed40: 75 22 jne 10ed64 <_CORE_mutex_Seize_interrupt_trylock+0xd4> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10ed42: 8b 50 40 mov 0x40(%eax),%edx 10ed45: 85 d2 test %edx,%edx 10ed47: 74 05 je 10ed4e <_CORE_mutex_Seize_interrupt_trylock+0xbe> 10ed49: 4a dec %edx 10ed4a: 75 18 jne 10ed64 <_CORE_mutex_Seize_interrupt_trylock+0xd4> 10ed4c: eb 08 jmp 10ed56 <_CORE_mutex_Seize_interrupt_trylock+0xc6> <== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10ed4e: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 10ed51: ff 31 pushl (%ecx) 10ed53: 9d popf 10ed54: eb 0a jmp 10ed60 <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10ed56: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) _ISR_Enable( *level_p ); 10ed5d: ff 31 pushl (%ecx) 10ed5f: 9d popf 10ed60: 31 c0 xor %eax,%eax 10ed62: eb 05 jmp 10ed69 <_CORE_mutex_Seize_interrupt_trylock+0xd9> <== ALWAYS TAKEN 10ed64: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10ed69: 8b 5d fc mov -0x4(%ebp),%ebx 10ed6c: c9 leave 10ed6d: c3 ret 0010aa5c <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10aa5c: 55 push %ebp 10aa5d: 89 e5 mov %esp,%ebp 10aa5f: 53 push %ebx 10aa60: 83 ec 04 sub $0x4,%esp 10aa63: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10aa66: 8b 53 5c mov 0x5c(%ebx),%edx * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10aa69: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10aa6d: 74 11 je 10aa80 <_CORE_mutex_Surrender+0x24> if ( !_Thread_Is_executing( holder ) ) 10aa6f: b8 03 00 00 00 mov $0x3,%eax 10aa74: 3b 15 a8 42 12 00 cmp 0x1242a8,%edx 10aa7a: 0f 85 b6 00 00 00 jne 10ab36 <_CORE_mutex_Surrender+0xda> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10aa80: 8b 43 54 mov 0x54(%ebx),%eax 10aa83: 85 c0 test %eax,%eax 10aa85: 0f 84 a9 00 00 00 je 10ab34 <_CORE_mutex_Surrender+0xd8> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10aa8b: 48 dec %eax 10aa8c: 89 43 54 mov %eax,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10aa8f: 85 c0 test %eax,%eax 10aa91: 0f 85 9d 00 00 00 jne 10ab34 <_CORE_mutex_Surrender+0xd8> 10aa97: 8b 43 48 mov 0x48(%ebx),%eax /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10aa9a: 83 f8 02 cmp $0x2,%eax 10aa9d: 74 05 je 10aaa4 <_CORE_mutex_Surrender+0x48> 10aa9f: 83 f8 03 cmp $0x3,%eax 10aaa2: 75 03 jne 10aaa7 <_CORE_mutex_Surrender+0x4b> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10aaa4: ff 4a 1c decl 0x1c(%edx) } the_mutex->holder = NULL; 10aaa7: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10aaae: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 10aab5: 8b 43 48 mov 0x48(%ebx),%eax /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10aab8: 83 f8 02 cmp $0x2,%eax 10aabb: 74 05 je 10aac2 <_CORE_mutex_Surrender+0x66> 10aabd: 83 f8 03 cmp $0x3,%eax 10aac0: 75 1b jne 10aadd <_CORE_mutex_Surrender+0x81> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10aac2: 83 7a 1c 00 cmpl $0x0,0x1c(%edx) 10aac6: 75 15 jne 10aadd <_CORE_mutex_Surrender+0x81> holder->real_priority != holder->current_priority ) { 10aac8: 8b 42 18 mov 0x18(%edx),%eax 10aacb: 3b 42 14 cmp 0x14(%edx),%eax 10aace: 74 0d je 10aadd <_CORE_mutex_Surrender+0x81> _Thread_Change_priority( holder, holder->real_priority, true ); 10aad0: 51 push %ecx 10aad1: 6a 01 push $0x1 10aad3: 50 push %eax 10aad4: 52 push %edx 10aad5: e8 7a 0c 00 00 call 10b754 <_Thread_Change_priority> <== ALWAYS TAKEN 10aada: 83 c4 10 add $0x10,%esp /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10aadd: 83 ec 0c sub $0xc,%esp 10aae0: 53 push %ebx 10aae1: e8 9a 14 00 00 call 10bf80 <_Thread_queue_Dequeue> 10aae6: 83 c4 10 add $0x10,%esp 10aae9: 85 c0 test %eax,%eax 10aaeb: 74 40 je 10ab2d <_CORE_mutex_Surrender+0xd1> } else #endif { the_mutex->holder = the_thread; 10aaed: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10aaf0: 8b 50 08 mov 0x8(%eax),%edx 10aaf3: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10aaf6: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10aafd: 8b 53 48 mov 0x48(%ebx),%edx 10ab00: 83 fa 02 cmp $0x2,%edx 10ab03: 74 07 je 10ab0c <_CORE_mutex_Surrender+0xb0> 10ab05: 83 fa 03 cmp $0x3,%edx 10ab08: 75 2a jne 10ab34 <_CORE_mutex_Surrender+0xd8> 10ab0a: eb 05 jmp 10ab11 <_CORE_mutex_Surrender+0xb5> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10ab0c: ff 40 1c incl 0x1c(%eax) 10ab0f: eb 23 jmp 10ab34 <_CORE_mutex_Surrender+0xd8> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10ab11: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10ab14: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10ab17: 3b 50 14 cmp 0x14(%eax),%edx 10ab1a: 73 18 jae 10ab34 <_CORE_mutex_Surrender+0xd8> _Thread_Change_priority( 10ab1c: 51 push %ecx 10ab1d: 6a 00 push $0x0 10ab1f: 52 push %edx 10ab20: 50 push %eax 10ab21: e8 2e 0c 00 00 call 10b754 <_Thread_Change_priority> <== ALWAYS TAKEN 10ab26: 31 c0 xor %eax,%eax 10ab28: 83 c4 10 add $0x10,%esp 10ab2b: eb 09 jmp 10ab36 <_CORE_mutex_Surrender+0xda> <== ALWAYS TAKEN } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10ab2d: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10ab34: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10ab36: 8b 5d fc mov -0x4(%ebp),%ebx 10ab39: c9 leave 10ab3a: c3 ret 001127f0 <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 1127f0: 55 push %ebp 1127f1: 89 e5 mov %esp,%ebp 1127f3: 57 push %edi 1127f4: 56 push %esi 1127f5: 53 push %ebx 1127f6: 83 ec 1c sub $0x1c,%esp 1127f9: 8b 45 08 mov 0x8(%ebp),%eax 1127fc: 8b 75 0c mov 0xc(%ebp),%esi 1127ff: 8b 7d 14 mov 0x14(%ebp),%edi 112802: 8a 55 10 mov 0x10(%ebp),%dl 112805: 88 55 e7 mov %dl,-0x19(%ebp) Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 112808: 8b 15 b8 a4 12 00 mov 0x12a4b8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 11280e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 112815: 9c pushf 112816: fa cli 112817: 59 pop %ecx if ( the_semaphore->count != 0 ) { 112818: 8b 58 48 mov 0x48(%eax),%ebx 11281b: 85 db test %ebx,%ebx 11281d: 74 08 je 112827 <_CORE_semaphore_Seize+0x37> the_semaphore->count -= 1; 11281f: 4b dec %ebx 112820: 89 58 48 mov %ebx,0x48(%eax) _ISR_Enable( level ); 112823: 51 push %ecx 112824: 9d popf return; 112825: eb 39 jmp 112860 <_CORE_semaphore_Seize+0x70> <== ALWAYS TAKEN /* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { 112827: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 11282b: 75 0b jne 112838 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 11282d: 51 push %ecx 11282e: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 11282f: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) 112836: eb 28 jmp 112860 <_CORE_semaphore_Seize+0x70> <== ALWAYS TAKEN 112838: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 11283f: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 112842: 89 72 20 mov %esi,0x20(%edx) _ISR_Enable( level ); 112845: 51 push %ecx 112846: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 112847: c7 45 10 a0 f8 10 00 movl $0x10f8a0,0x10(%ebp) 11284e: 89 7d 0c mov %edi,0xc(%ebp) 112851: 89 45 08 mov %eax,0x8(%ebp) } 112854: 83 c4 1c add $0x1c,%esp 112857: 5b pop %ebx 112858: 5e pop %esi 112859: 5f pop %edi 11285a: c9 leave */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 11285b: e9 84 cd ff ff jmp 10f5e4 <_Thread_queue_Enqueue_with_handler> } 112860: 83 c4 1c add $0x1c,%esp 112863: 5b pop %ebx 112864: 5e pop %esi 112865: 5f pop %edi 112866: c9 leave 112867: c3 ret 0010ab88 <_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 ) { 10ab88: 55 push %ebp 10ab89: 89 e5 mov %esp,%ebp 10ab8b: 53 push %ebx 10ab8c: 83 ec 10 sub $0x10,%esp 10ab8f: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 10ab92: 53 push %ebx 10ab93: e8 e8 13 00 00 call 10bf80 <_Thread_queue_Dequeue> 10ab98: 89 c2 mov %eax,%edx 10ab9a: 83 c4 10 add $0x10,%esp 10ab9d: 31 c0 xor %eax,%eax 10ab9f: 85 d2 test %edx,%edx 10aba1: 75 15 jne 10abb8 <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10aba3: 9c pushf 10aba4: fa cli 10aba5: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10aba6: 8b 53 48 mov 0x48(%ebx),%edx 10aba9: b0 04 mov $0x4,%al 10abab: 3b 53 40 cmp 0x40(%ebx),%edx 10abae: 73 06 jae 10abb6 <_CORE_semaphore_Surrender+0x2e> <== ALWAYS TAKEN the_semaphore->count += 1; 10abb0: 42 inc %edx 10abb1: 89 53 48 mov %edx,0x48(%ebx) 10abb4: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10abb6: 51 push %ecx 10abb7: 9d popf } return status; } 10abb8: 8b 5d fc mov -0x4(%ebp),%ebx 10abbb: c9 leave 10abbc: c3 ret 0010b4f0 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10b4f0: 55 push %ebp 10b4f1: 89 e5 mov %esp,%ebp 10b4f3: 53 push %ebx 10b4f4: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10b4f7: 9c pushf 10b4f8: fa cli 10b4f9: 5a pop %edx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10b4fa: 8b 48 04 mov 0x4(%eax),%ecx 10b4fd: 85 c9 test %ecx,%ecx 10b4ff: 75 09 jne 10b50a <_CORE_spinlock_Release+0x1a> _ISR_Enable( level ); 10b501: 52 push %edx 10b502: 9d popf 10b503: b8 06 00 00 00 mov $0x6,%eax return CORE_SPINLOCK_NOT_LOCKED; 10b508: eb 30 jmp 10b53a <_CORE_spinlock_Release+0x4a> <== ALWAYS TAKEN } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10b50a: 8b 58 0c mov 0xc(%eax),%ebx 10b50d: 8b 0d b8 52 12 00 mov 0x1252b8,%ecx 10b513: 3b 59 08 cmp 0x8(%ecx),%ebx 10b516: 74 09 je 10b521 <_CORE_spinlock_Release+0x31> _ISR_Enable( level ); 10b518: 52 push %edx 10b519: 9d popf 10b51a: b8 02 00 00 00 mov $0x2,%eax return CORE_SPINLOCK_NOT_HOLDER; 10b51f: eb 19 jmp 10b53a <_CORE_spinlock_Release+0x4a> <== ALWAYS TAKEN } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10b521: 8b 48 08 mov 0x8(%eax),%ecx 10b524: 49 dec %ecx 10b525: 89 48 08 mov %ecx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10b528: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10b52f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10b536: 52 push %edx 10b537: 9d popf 10b538: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; } 10b53a: 5b pop %ebx 10b53b: c9 leave 10b53c: c3 ret 0010b540 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10b540: 55 push %ebp 10b541: 89 e5 mov %esp,%ebp 10b543: 56 push %esi 10b544: 53 push %ebx 10b545: 83 ec 10 sub $0x10,%esp 10b548: 8b 5d 08 mov 0x8(%ebp),%ebx 10b54b: 8a 4d 0c mov 0xc(%ebp),%cl ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 10b54e: 9c pushf 10b54f: fa cli 10b550: 58 pop %eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10b551: 8b 53 04 mov 0x4(%ebx),%edx 10b554: 4a dec %edx 10b555: 75 17 jne 10b56e <_CORE_spinlock_Wait+0x2e> (the_spinlock->holder == _Thread_Executing->Object.id) ) { 10b557: 8b 73 0c mov 0xc(%ebx),%esi 10b55a: 8b 15 b8 52 12 00 mov 0x1252b8,%edx 10b560: 3b 72 08 cmp 0x8(%edx),%esi 10b563: 75 09 jne 10b56e <_CORE_spinlock_Wait+0x2e> _ISR_Enable( level ); 10b565: 50 push %eax 10b566: 9d popf 10b567: b8 01 00 00 00 mov $0x1,%eax return CORE_SPINLOCK_HOLDER_RELOCKING; 10b56c: eb 58 jmp 10b5c6 <_CORE_spinlock_Wait+0x86> <== ALWAYS TAKEN } the_spinlock->users += 1; 10b56e: 8b 53 08 mov 0x8(%ebx),%edx 10b571: 42 inc %edx 10b572: 89 53 08 mov %edx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10b575: 8b 53 04 mov 0x4(%ebx),%edx 10b578: 85 d2 test %edx,%edx 10b57a: 75 19 jne 10b595 <_CORE_spinlock_Wait+0x55> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10b57c: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10b583: 8b 15 b8 52 12 00 mov 0x1252b8,%edx 10b589: 8b 52 08 mov 0x8(%edx),%edx 10b58c: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10b58f: 50 push %eax 10b590: 9d popf 10b591: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; 10b593: eb 31 jmp 10b5c6 <_CORE_spinlock_Wait+0x86> <== ALWAYS TAKEN } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10b595: 84 c9 test %cl,%cl 10b597: 75 10 jne 10b5a9 <_CORE_spinlock_Wait+0x69> the_spinlock->users -= 1; 10b599: 8b 53 08 mov 0x8(%ebx),%edx 10b59c: 4a dec %edx 10b59d: 89 53 08 mov %edx,0x8(%ebx) _ISR_Enable( level ); 10b5a0: 50 push %eax 10b5a1: 9d popf 10b5a2: b8 05 00 00 00 mov $0x5,%eax return CORE_SPINLOCK_UNAVAILABLE; 10b5a7: eb 1d jmp 10b5c6 <_CORE_spinlock_Wait+0x86> <== ALWAYS TAKEN * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10b5a9: 50 push %eax 10b5aa: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10b5ab: 88 4d f4 mov %cl,-0xc(%ebp) 10b5ae: e8 4e 10 00 00 call 10c601 <_Thread_Enable_dispatch> 10b5b3: a1 fc 51 12 00 mov 0x1251fc,%eax 10b5b8: 40 inc %eax 10b5b9: a3 fc 51 12 00 mov %eax,0x1251fc /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10b5be: 9c pushf 10b5bf: fa cli 10b5c0: 58 pop %eax } 10b5c1: 8a 4d f4 mov -0xc(%ebp),%cl 10b5c4: eb af jmp 10b575 <_CORE_spinlock_Wait+0x35> <== ALWAYS TAKEN } 10b5c6: 83 c4 10 add $0x10,%esp 10b5c9: 5b pop %ebx 10b5ca: 5e pop %esi 10b5cb: c9 leave 10b5cc: c3 ret 0010a7b4 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10a7b4: 55 push %ebp 10a7b5: 89 e5 mov %esp,%ebp 10a7b7: 53 push %ebx 10a7b8: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10a7bb: 9c pushf 10a7bc: fa cli 10a7bd: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10a7be: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a7c0: 8d 4a 04 lea 0x4(%edx),%ecx 10a7c3: 39 c8 cmp %ecx,%eax 10a7c5: 75 04 jne 10a7cb <_Chain_Get+0x17> 10a7c7: 31 c0 xor %eax,%eax 10a7c9: eb 07 jmp 10a7d2 <_Chain_Get+0x1e> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10a7cb: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10a7cd: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10a7cf: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10a7d2: 53 push %ebx 10a7d3: 9d popf return return_node; } 10a7d4: 5b pop %ebx 10a7d5: c9 leave 10a7d6: c3 ret 0010ebc0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 10ebc0: 55 push %ebp 10ebc1: 89 e5 mov %esp,%ebp 10ebc3: 56 push %esi 10ebc4: 53 push %ebx 10ebc5: 8b 4d 08 mov 0x8(%ebp),%ecx 10ebc8: 8b 5d 10 mov 0x10(%ebp),%ebx 10ebcb: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10ebce: 89 c8 mov %ecx,%eax Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 10ebd0: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) next = starting_address; 10ebd7: 8b 55 0c mov 0xc(%ebp),%edx while ( count-- ) { 10ebda: eb 0a jmp 10ebe6 <_Chain_Initialize+0x26> <== ALWAYS TAKEN current->next = next; 10ebdc: 89 10 mov %edx,(%eax) next->previous = current; 10ebde: 89 42 04 mov %eax,0x4(%edx) current = next; next = (Chain_Node *) 10ebe1: 4b dec %ebx 10ebe2: 89 d0 mov %edx,%eax 10ebe4: 01 f2 add %esi,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 10ebe6: 85 db test %ebx,%ebx 10ebe8: 75 f2 jne 10ebdc <_Chain_Initialize+0x1c> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 10ebea: 8d 51 04 lea 0x4(%ecx),%edx 10ebed: 89 10 mov %edx,(%eax) the_chain->last = current; 10ebef: 89 41 08 mov %eax,0x8(%ecx) } 10ebf2: 5b pop %ebx 10ebf3: 5e pop %esi 10ebf4: c9 leave 10ebf5: c3 ret 001099b8 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 1099b8: 55 push %ebp 1099b9: 89 e5 mov %esp,%ebp 1099bb: 57 push %edi 1099bc: 56 push %esi 1099bd: 53 push %ebx 1099be: 83 ec 1c sub $0x1c,%esp 1099c1: 8b 45 08 mov 0x8(%ebp),%eax 1099c4: 8b 75 0c mov 0xc(%ebp),%esi 1099c7: 8b 55 10 mov 0x10(%ebp),%edx 1099ca: 89 55 dc mov %edx,-0x24(%ebp) 1099cd: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 1099d0: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 1099d6: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 1099dd: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi _ISR_Disable( level ); 1099e3: 9c pushf 1099e4: fa cli 1099e5: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 1099e8: 8b 17 mov (%edi),%edx 1099ea: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 1099ed: 21 c2 and %eax,%edx 1099ef: 74 1b je 109a0c <_Event_Seize+0x54> 1099f1: 39 c2 cmp %eax,%edx 1099f3: 74 08 je 1099fd <_Event_Seize+0x45> 1099f5: f7 c6 02 00 00 00 test $0x2,%esi 1099fb: 74 0f je 109a0c <_Event_Seize+0x54> <== ALWAYS TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 1099fd: 89 d0 mov %edx,%eax 1099ff: f7 d0 not %eax 109a01: 23 45 e0 and -0x20(%ebp),%eax 109a04: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 109a06: ff 75 e4 pushl -0x1c(%ebp) 109a09: 9d popf 109a0a: eb 13 jmp 109a1f <_Event_Seize+0x67> <== ALWAYS TAKEN *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 109a0c: f7 c6 01 00 00 00 test $0x1,%esi 109a12: 74 12 je 109a26 <_Event_Seize+0x6e> _ISR_Enable( level ); 109a14: ff 75 e4 pushl -0x1c(%ebp) 109a17: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 109a18: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 109a1f: 89 11 mov %edx,(%ecx) return; 109a21: e9 91 00 00 00 jmp 109ab7 <_Event_Seize+0xff> <== ALWAYS TAKEN * 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; 109a26: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 109a29: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 109a2c: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 109a2f: c7 05 c4 4a 12 00 01 movl $0x1,0x124ac4 109a36: 00 00 00 _ISR_Enable( level ); 109a39: ff 75 e4 pushl -0x1c(%ebp) 109a3c: 9d popf if ( ticks ) { 109a3d: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 109a41: 74 34 je 109a77 <_Event_Seize+0xbf> _Watchdog_Initialize( 109a43: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109a46: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 109a4d: c7 43 64 f4 9b 10 00 movl $0x109bf4,0x64(%ebx) the_watchdog->id = id; 109a54: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 109a57: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 109a5e: 8b 45 dc mov -0x24(%ebp),%eax 109a61: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 109a64: 52 push %edx 109a65: 52 push %edx 109a66: 8d 43 48 lea 0x48(%ebx),%eax 109a69: 50 push %eax 109a6a: 68 c8 42 12 00 push $0x1242c8 109a6f: e8 3c 2f 00 00 call 10c9b0 <_Watchdog_Insert> 109a74: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 109a77: 50 push %eax 109a78: 50 push %eax 109a79: 68 00 01 00 00 push $0x100 109a7e: 53 push %ebx 109a7f: e8 58 29 00 00 call 10c3dc <_Thread_Set_state> _ISR_Disable( level ); 109a84: 9c pushf 109a85: fa cli 109a86: 5a pop %edx sync_state = _Event_Sync_state; 109a87: a1 c4 4a 12 00 mov 0x124ac4,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 109a8c: c7 05 c4 4a 12 00 00 movl $0x0,0x124ac4 109a93: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 109a96: 83 c4 10 add $0x10,%esp 109a99: 83 f8 01 cmp $0x1,%eax 109a9c: 75 04 jne 109aa2 <_Event_Seize+0xea> _ISR_Enable( level ); 109a9e: 52 push %edx 109a9f: 9d popf 109aa0: eb 15 jmp 109ab7 <_Event_Seize+0xff> <== ALWAYS TAKEN * 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 ); 109aa2: 89 55 10 mov %edx,0x10(%ebp) 109aa5: 89 5d 0c mov %ebx,0xc(%ebp) 109aa8: 89 45 08 mov %eax,0x8(%ebp) } 109aab: 8d 65 f4 lea -0xc(%ebp),%esp 109aae: 5b pop %ebx 109aaf: 5e pop %esi 109ab0: 5f pop %edi 109ab1: c9 leave * 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 ); 109ab2: e9 51 1c 00 00 jmp 10b708 <_Thread_blocking_operation_Cancel> } 109ab7: 8d 65 f4 lea -0xc(%ebp),%esp 109aba: 5b pop %ebx 109abb: 5e pop %esi 109abc: 5f pop %edi 109abd: c9 leave 109abe: c3 ret 00109b0c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109b0c: 55 push %ebp 109b0d: 89 e5 mov %esp,%ebp 109b0f: 57 push %edi 109b10: 56 push %esi 109b11: 53 push %ebx 109b12: 83 ec 2c sub $0x2c,%esp 109b15: 8b 5d 08 mov 0x8(%ebp),%ebx 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 ]; 109b18: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109b1e: 8b 43 30 mov 0x30(%ebx),%eax 109b21: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109b24: 9c pushf 109b25: fa cli 109b26: 58 pop %eax pending_events = api->pending_events; 109b27: 8b 17 mov (%edi),%edx 109b29: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109b2c: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 109b2f: 21 f2 and %esi,%edx 109b31: 75 07 jne 109b3a <_Event_Surrender+0x2e> _ISR_Enable( level ); 109b33: 50 push %eax 109b34: 9d popf return; 109b35: e9 b0 00 00 00 jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN /* * 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() && 109b3a: 8b 0d 84 42 12 00 mov 0x124284,%ecx 109b40: 85 c9 test %ecx,%ecx 109b42: 74 49 je 109b8d <_Event_Surrender+0x81> 109b44: 3b 1d a8 42 12 00 cmp 0x1242a8,%ebx 109b4a: 75 41 jne 109b8d <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109b4c: 8b 0d c4 4a 12 00 mov 0x124ac4,%ecx /* * 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() && 109b52: 83 f9 02 cmp $0x2,%ecx 109b55: 74 09 je 109b60 <_Event_Surrender+0x54> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109b57: 8b 0d c4 4a 12 00 mov 0x124ac4,%ecx /* * 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() && 109b5d: 49 dec %ecx 109b5e: 75 2d jne 109b8d <_Event_Surrender+0x81> <== ALWAYS TAKEN _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) ) { 109b60: 39 f2 cmp %esi,%edx 109b62: 74 06 je 109b6a <_Event_Surrender+0x5e> 109b64: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109b68: 74 1f je 109b89 <_Event_Surrender+0x7d> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 109b6a: 89 d6 mov %edx,%esi 109b6c: f7 d6 not %esi 109b6e: 23 75 d4 and -0x2c(%ebp),%esi 109b71: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109b73: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109b7a: 8b 4b 28 mov 0x28(%ebx),%ecx 109b7d: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109b7f: c7 05 c4 4a 12 00 03 movl $0x3,0x124ac4 109b86: 00 00 00 } _ISR_Enable( level ); 109b89: 50 push %eax 109b8a: 9d popf return; 109b8b: eb 5d jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109b8d: f6 43 11 01 testb $0x1,0x11(%ebx) 109b91: 74 55 je 109be8 <_Event_Surrender+0xdc> <== ALWAYS TAKEN if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109b93: 39 f2 cmp %esi,%edx 109b95: 74 06 je 109b9d <_Event_Surrender+0x91> 109b97: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109b9b: 74 4b je 109be8 <_Event_Surrender+0xdc> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 109b9d: 89 d6 mov %edx,%esi 109b9f: f7 d6 not %esi 109ba1: 23 75 d4 and -0x2c(%ebp),%esi 109ba4: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109ba6: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109bad: 8b 4b 28 mov 0x28(%ebx),%ecx 109bb0: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109bb2: 50 push %eax 109bb3: 9d popf 109bb4: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109bb5: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109bb9: 74 06 je 109bc1 <_Event_Surrender+0xb5> _ISR_Enable( level ); 109bbb: 50 push %eax 109bbc: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109bbd: 51 push %ecx 109bbe: 51 push %ecx 109bbf: eb 17 jmp 109bd8 <_Event_Surrender+0xcc> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109bc1: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109bc8: 50 push %eax 109bc9: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109bca: 83 ec 0c sub $0xc,%esp 109bcd: 8d 43 48 lea 0x48(%ebx),%eax 109bd0: 50 push %eax 109bd1: e8 f2 2e 00 00 call 10cac8 <_Watchdog_Remove> 109bd6: 58 pop %eax 109bd7: 5a pop %edx 109bd8: 68 f8 ff 03 10 push $0x1003fff8 109bdd: 53 push %ebx 109bde: e8 91 1c 00 00 call 10b874 <_Thread_Clear_state> 109be3: 83 c4 10 add $0x10,%esp 109be6: eb 02 jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109be8: 50 push %eax <== NOT EXECUTED 109be9: 9d popf <== NOT EXECUTED } 109bea: 8d 65 f4 lea -0xc(%ebp),%esp 109bed: 5b pop %ebx 109bee: 5e pop %esi 109bef: 5f pop %edi 109bf0: c9 leave 109bf1: c3 ret 00109bf4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109bf4: 55 push %ebp 109bf5: 89 e5 mov %esp,%ebp 109bf7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109bfa: 8d 45 f4 lea -0xc(%ebp),%eax 109bfd: 50 push %eax 109bfe: ff 75 08 pushl 0x8(%ebp) 109c01: e8 0e 20 00 00 call 10bc14 <_Thread_Get> switch ( location ) { 109c06: 83 c4 10 add $0x10,%esp 109c09: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109c0d: 75 49 jne 109c58 <_Event_Timeout+0x64> <== ALWAYS 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 ); 109c0f: 9c pushf 109c10: fa cli 109c11: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109c12: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109c19: 3b 05 a8 42 12 00 cmp 0x1242a8,%eax 109c1f: 75 13 jne 109c34 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109c21: 8b 0d c4 4a 12 00 mov 0x124ac4,%ecx 109c27: 49 dec %ecx 109c28: 75 0a jne 109c34 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109c2a: c7 05 c4 4a 12 00 02 movl $0x2,0x124ac4 109c31: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109c34: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109c3b: 52 push %edx 109c3c: 9d popf 109c3d: 52 push %edx 109c3e: 52 push %edx 109c3f: 68 f8 ff 03 10 push $0x1003fff8 109c44: 50 push %eax 109c45: e8 2a 1c 00 00 call 10b874 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109c4a: a1 ec 41 12 00 mov 0x1241ec,%eax 109c4f: 48 dec %eax 109c50: a3 ec 41 12 00 mov %eax,0x1241ec 109c55: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109c58: c9 leave 109c59: c3 ret 0010a4c4 <_Extension_Manager_initialization>: * * Output parameters: NONE */ void _Extension_Manager_initialization(void) { 10a4c4: 55 push %ebp 10a4c5: 89 e5 mov %esp,%ebp 10a4c7: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10a4ca: 6a 04 push $0x4 10a4cc: 6a 00 push $0x0 10a4ce: 6a 44 push $0x44 10a4d0: ff 35 00 02 12 00 pushl 0x120200 10a4d6: 6a 09 push $0x9 10a4d8: 6a 02 push $0x2 10a4da: 68 08 4b 12 00 push $0x124b08 10a4df: e8 74 0f 00 00 call 10b458 <_Objects_Initialize_information> <== ALWAYS TAKEN 10a4e4: 83 c4 20 add $0x20,%esp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10a4e7: c9 leave 10a4e8: c3 ret 0010ee28 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10ee28: 55 push %ebp 10ee29: 89 e5 mov %esp,%ebp 10ee2b: 57 push %edi 10ee2c: 56 push %esi 10ee2d: 53 push %ebx 10ee2e: 83 ec 2c sub $0x2c,%esp 10ee31: 8b 75 08 mov 0x8(%ebp),%esi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10ee34: 8b 4e 08 mov 0x8(%esi),%ecx 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; 10ee37: 8b 46 10 mov 0x10(%esi),%eax 10ee3a: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10ee3d: 8b 45 0c mov 0xc(%ebp),%eax 10ee40: 83 c0 04 add $0x4,%eax 10ee43: 89 45 cc mov %eax,-0x34(%ebp) 10ee46: 0f 82 2f 01 00 00 jb 10ef7b <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10ee4c: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10ee50: 74 18 je 10ee6a <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10ee52: 8b 45 0c mov 0xc(%ebp),%eax 10ee55: 39 45 14 cmp %eax,0x14(%ebp) 10ee58: 0f 82 1d 01 00 00 jb 10ef7b <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10ee5e: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10ee62: 75 06 jne 10ee6a <_Heap_Allocate_aligned_with_boundary+0x42> 10ee64: 8b 45 e0 mov -0x20(%ebp),%eax 10ee67: 89 45 10 mov %eax,0x10(%ebp) 10ee6a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 10ee71: 8b 45 e0 mov -0x20(%ebp),%eax 10ee74: 83 c0 07 add $0x7,%eax 10ee77: 89 45 c8 mov %eax,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10ee7a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10ee81: 8b 45 0c mov 0xc(%ebp),%eax 10ee84: 29 45 d8 sub %eax,-0x28(%ebp) 10ee87: 89 f7 mov %esi,%edi 10ee89: e9 ba 00 00 00 jmp 10ef48 <_Heap_Allocate_aligned_with_boundary+0x120> <== ALWAYS TAKEN while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10ee8e: ff 45 e4 incl -0x1c(%ebp) /* * 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 ) { 10ee91: 8b 59 04 mov 0x4(%ecx),%ebx 10ee94: 3b 5d cc cmp -0x34(%ebp),%ebx 10ee97: 0f 86 a8 00 00 00 jbe 10ef45 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10ee9d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10eea1: 8d 41 08 lea 0x8(%ecx),%eax 10eea4: 89 45 dc mov %eax,-0x24(%ebp) 10eea7: 75 07 jne 10eeb0 <_Heap_Allocate_aligned_with_boundary+0x88> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10eea9: 89 c3 mov %eax,%ebx 10eeab: e9 91 00 00 00 jmp 10ef41 <_Heap_Allocate_aligned_with_boundary+0x119> <== ALWAYS TAKEN uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 10eeb0: 8b 47 14 mov 0x14(%edi),%eax 10eeb3: 89 45 d4 mov %eax,-0x2c(%ebp) 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; 10eeb6: 83 e3 fe and $0xfffffffe,%ebx 10eeb9: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 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; 10eebc: 8b 75 c8 mov -0x38(%ebp),%esi 10eebf: 29 c6 sub %eax,%esi 10eec1: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10eec3: 03 5d d8 add -0x28(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10eec6: 89 d8 mov %ebx,%eax 10eec8: 31 d2 xor %edx,%edx 10eeca: f7 75 10 divl 0x10(%ebp) 10eecd: 29 d3 sub %edx,%ebx 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 ) { 10eecf: 39 f3 cmp %esi,%ebx 10eed1: 76 0b jbe 10eede <_Heap_Allocate_aligned_with_boundary+0xb6> 10eed3: 89 f0 mov %esi,%eax 10eed5: 31 d2 xor %edx,%edx 10eed7: f7 75 10 divl 0x10(%ebp) 10eeda: 89 f3 mov %esi,%ebx 10eedc: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10eede: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10eee2: 74 3f je 10ef23 <_Heap_Allocate_aligned_with_boundary+0xfb> /* 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; 10eee4: 8b 45 0c mov 0xc(%ebp),%eax 10eee7: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10eeea: 8b 45 dc mov -0x24(%ebp),%eax 10eeed: 03 45 0c add 0xc(%ebp),%eax 10eef0: 89 45 d0 mov %eax,-0x30(%ebp) 10eef3: eb 19 jmp 10ef0e <_Heap_Allocate_aligned_with_boundary+0xe6> <== ALWAYS TAKEN uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 10eef5: 3b 55 d0 cmp -0x30(%ebp),%edx 10eef8: 72 4b jb 10ef45 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10eefa: 89 d3 mov %edx,%ebx 10eefc: 2b 5d 0c sub 0xc(%ebp),%ebx 10eeff: 89 d8 mov %ebx,%eax 10ef01: 31 d2 xor %edx,%edx 10ef03: f7 75 10 divl 0x10(%ebp) 10ef06: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10ef08: 8b 45 0c mov 0xc(%ebp),%eax 10ef0b: 8d 34 03 lea (%ebx,%eax,1),%esi 10ef0e: 89 f0 mov %esi,%eax 10ef10: 31 d2 xor %edx,%edx 10ef12: f7 75 14 divl 0x14(%ebp) 10ef15: 89 f0 mov %esi,%eax 10ef17: 29 d0 sub %edx,%eax 10ef19: 89 c2 mov %eax,%edx /* 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 ) { 10ef1b: 39 f0 cmp %esi,%eax 10ef1d: 73 04 jae 10ef23 <_Heap_Allocate_aligned_with_boundary+0xfb> 10ef1f: 39 c3 cmp %eax,%ebx 10ef21: 72 d2 jb 10eef5 <_Heap_Allocate_aligned_with_boundary+0xcd> 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 ) { 10ef23: 3b 5d dc cmp -0x24(%ebp),%ebx 10ef26: 72 1d jb 10ef45 <_Heap_Allocate_aligned_with_boundary+0x11d> 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; 10ef28: be f8 ff ff ff mov $0xfffffff8,%esi 10ef2d: 29 ce sub %ecx,%esi 10ef2f: 01 de add %ebx,%esi 10ef31: 89 d8 mov %ebx,%eax 10ef33: 31 d2 xor %edx,%edx 10ef35: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10ef38: 29 d6 sub %edx,%esi 10ef3a: 74 05 je 10ef41 <_Heap_Allocate_aligned_with_boundary+0x119> 10ef3c: 3b 75 d4 cmp -0x2c(%ebp),%esi 10ef3f: 72 04 jb 10ef45 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10ef41: 85 db test %ebx,%ebx 10ef43: 75 11 jne 10ef56 <_Heap_Allocate_aligned_with_boundary+0x12e> <== NEVER TAKEN break; } block = block->next; 10ef45: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10ef48: 39 f9 cmp %edi,%ecx 10ef4a: 0f 85 3e ff ff ff jne 10ee8e <_Heap_Allocate_aligned_with_boundary+0x66> 10ef50: 89 fe mov %edi,%esi 10ef52: 31 db xor %ebx,%ebx 10ef54: eb 16 jmp 10ef6c <_Heap_Allocate_aligned_with_boundary+0x144> <== ALWAYS TAKEN 10ef56: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10ef58: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef5b: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10ef5e: ff 75 0c pushl 0xc(%ebp) 10ef61: 53 push %ebx 10ef62: 51 push %ecx 10ef63: 57 push %edi 10ef64: e8 0f bf ff ff call 10ae78 <_Heap_Block_allocate> <== ALWAYS TAKEN 10ef69: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10ef6c: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef6f: 39 46 44 cmp %eax,0x44(%esi) 10ef72: 73 03 jae 10ef77 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10ef74: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10ef77: 89 d8 mov %ebx,%eax 10ef79: eb 02 jmp 10ef7d <_Heap_Allocate_aligned_with_boundary+0x155> <== ALWAYS TAKEN 10ef7b: 31 c0 xor %eax,%eax } 10ef7d: 8d 65 f4 lea -0xc(%ebp),%esp 10ef80: 5b pop %ebx 10ef81: 5e pop %esi 10ef82: 5f pop %edi 10ef83: c9 leave 10ef84: c3 ret 0010ae78 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10ae78: 55 push %ebp 10ae79: 89 e5 mov %esp,%ebp 10ae7b: 57 push %edi 10ae7c: 56 push %esi 10ae7d: 53 push %ebx 10ae7e: 83 ec 10 sub $0x10,%esp 10ae81: 8b 75 08 mov 0x8(%ebp),%esi 10ae84: 8b 5d 0c mov 0xc(%ebp),%ebx 10ae87: 8b 45 10 mov 0x10(%ebp),%eax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10ae8a: 89 5d e8 mov %ebx,-0x18(%ebp) 10ae8d: 8d 50 f8 lea -0x8(%eax),%edx 10ae90: 89 55 f0 mov %edx,-0x10(%ebp) 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; 10ae93: 89 d7 mov %edx,%edi 10ae95: 29 df sub %ebx,%edi Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10ae97: 8b 53 04 mov 0x4(%ebx),%edx 10ae9a: 83 e2 fe and $0xfffffffe,%edx /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10ae9d: 89 f1 mov %esi,%ecx Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10ae9f: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10aea4: 75 1b jne 10aec1 <_Heap_Block_allocate+0x49> free_list_anchor = block->prev; 10aea6: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10aea9: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10aeac: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10aeaf: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10aeb2: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10aeb5: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10aeb8: 8b 53 04 mov 0x4(%ebx),%edx 10aebb: 83 e2 fe and $0xfffffffe,%edx 10aebe: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10aec1: 8b 56 10 mov 0x10(%esi),%edx 10aec4: 89 55 e4 mov %edx,-0x1c(%ebp) 10aec7: 39 d7 cmp %edx,%edi 10aec9: 73 0e jae 10aed9 <_Heap_Block_allocate+0x61> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10aecb: 03 7d 14 add 0x14(%ebp),%edi 10aece: 57 push %edi 10aecf: 51 push %ecx 10aed0: 53 push %ebx 10aed1: 56 push %esi 10aed2: e8 cc fe ff ff call 10ada3 <_Heap_Block_split> <== ALWAYS TAKEN 10aed7: eb 62 jmp 10af3b <_Heap_Block_allocate+0xc3> <== ALWAYS 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; 10aed9: 8b 7b 04 mov 0x4(%ebx),%edi 10aedc: 89 7d ec mov %edi,-0x14(%ebp) 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 ) 10aedf: 31 d2 xor %edx,%edx 10aee1: f7 75 e4 divl -0x1c(%ebp) 10aee4: 8b 45 f0 mov -0x10(%ebp),%eax 10aee7: 29 d0 sub %edx,%eax 10aee9: 89 c7 mov %eax,%edi _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; 10aeeb: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10aeed: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10aef0: f6 43 04 01 testb $0x1,0x4(%ebx) 10aef4: 74 16 je 10af0c <_Heap_Block_allocate+0x94> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10aef6: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10aef9: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10aefc: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10aeff: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10af02: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10af05: ff 46 38 incl 0x38(%esi) 10af08: 89 d9 mov %ebx,%ecx 10af0a: eb 0a jmp 10af16 <_Heap_Block_allocate+0x9e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10af0c: 2b 1b sub (%ebx),%ebx 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; 10af0e: 8b 53 04 mov 0x4(%ebx),%edx 10af11: 83 e2 fe and $0xfffffffe,%edx 10af14: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10af16: 89 c2 mov %eax,%edx 10af18: 83 ca 01 or $0x1,%edx 10af1b: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10af1e: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10af20: 8b 45 ec mov -0x14(%ebp),%eax 10af23: 83 e0 fe and $0xfffffffe,%eax 10af26: 03 45 e8 add -0x18(%ebp),%eax 10af29: 29 f8 sub %edi,%eax 10af2b: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10af2e: ff 75 14 pushl 0x14(%ebp) 10af31: 51 push %ecx 10af32: 57 push %edi 10af33: 56 push %esi 10af34: e8 6a fe ff ff call 10ada3 <_Heap_Block_split> <== ALWAYS TAKEN 10af39: 89 fb mov %edi,%ebx 10af3b: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10af3e: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10af41: 39 46 34 cmp %eax,0x34(%esi) 10af44: 76 03 jbe 10af49 <_Heap_Block_allocate+0xd1> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10af46: 89 46 34 mov %eax,0x34(%esi) } return block; } 10af49: 89 d8 mov %ebx,%eax 10af4b: 8d 65 f4 lea -0xc(%ebp),%esp 10af4e: 5b pop %ebx 10af4f: 5e pop %esi 10af50: 5f pop %edi 10af51: c9 leave 10af52: c3 ret 0010ada3 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10ada3: 55 push %ebp 10ada4: 89 e5 mov %esp,%ebp 10ada6: 57 push %edi 10ada7: 56 push %esi 10ada8: 53 push %ebx 10ada9: 83 ec 10 sub $0x10,%esp 10adac: 8b 4d 08 mov 0x8(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10adaf: 8b 71 10 mov 0x10(%ecx),%esi uintptr_t const min_block_size = heap->min_block_size; 10adb2: 8b 41 14 mov 0x14(%ecx),%eax 10adb5: 89 45 e4 mov %eax,-0x1c(%ebp) - 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; 10adb8: 8b 55 0c mov 0xc(%ebp),%edx 10adbb: 8b 52 04 mov 0x4(%edx),%edx 10adbe: 89 55 e8 mov %edx,-0x18(%ebp) 10adc1: 83 e2 fe and $0xfffffffe,%edx 10adc4: 89 55 ec mov %edx,-0x14(%ebp) uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10adc7: 89 c2 mov %eax,%edx 10adc9: 83 ea 08 sub $0x8,%edx 10adcc: 8b 45 14 mov 0x14(%ebp),%eax 10adcf: 39 d0 cmp %edx,%eax 10add1: 73 02 jae 10add5 <_Heap_Block_split+0x32> 10add3: 89 d0 mov %edx,%eax 10add5: 83 c0 08 add $0x8,%eax 10add8: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10addb: 31 d2 xor %edx,%edx 10addd: f7 f6 div %esi if ( remainder != 0 ) { 10addf: 8b 7d f0 mov -0x10(%ebp),%edi 10ade2: 85 d2 test %edx,%edx 10ade4: 74 04 je 10adea <_Heap_Block_split+0x47> return value - remainder + alignment; 10ade6: 01 f7 add %esi,%edi 10ade8: 29 d7 sub %edx,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10adea: 8b 45 0c mov 0xc(%ebp),%eax 10aded: 03 45 ec add -0x14(%ebp),%eax 10adf0: 89 c2 mov %eax,%edx Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10adf2: 8b 5d ec mov -0x14(%ebp),%ebx 10adf5: 83 c3 04 add $0x4,%ebx 10adf8: 2b 5d f0 sub -0x10(%ebp),%ebx 10adfb: 8b 75 e4 mov -0x1c(%ebp),%esi 10adfe: 83 c6 04 add $0x4,%esi 10ae01: 39 f3 cmp %esi,%ebx 10ae03: 72 67 jb 10ae6c <_Heap_Block_split+0xc9> 10ae05: 8b 5d 0c mov 0xc(%ebp),%ebx 10ae08: 8d 04 1f lea (%edi,%ebx,1),%eax Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10ae0b: 8b 75 ec mov -0x14(%ebp),%esi 10ae0e: 29 fe sub %edi,%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10ae10: 8b 5d e8 mov -0x18(%ebp),%ebx 10ae13: 83 e3 01 and $0x1,%ebx 10ae16: 09 fb or %edi,%ebx 10ae18: 8b 7d 0c mov 0xc(%ebp),%edi 10ae1b: 89 5f 04 mov %ebx,0x4(%edi) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10ae1e: 01 71 30 add %esi,0x30(%ecx) - 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; 10ae21: 8b 5a 04 mov 0x4(%edx),%ebx 10ae24: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10ae27: f6 44 1a 04 01 testb $0x1,0x4(%edx,%ebx,1) 10ae2c: 74 17 je 10ae45 <_Heap_Block_split+0xa2> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ae2e: 8b 7d 10 mov 0x10(%ebp),%edi 10ae31: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10ae34: 89 58 08 mov %ebx,0x8(%eax) new_block->prev = block_before; 10ae37: 89 78 0c mov %edi,0xc(%eax) block_before->next = new_block; 10ae3a: 89 47 08 mov %eax,0x8(%edi) next->prev = new_block; 10ae3d: 89 43 0c mov %eax,0xc(%ebx) _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10ae40: ff 41 38 incl 0x38(%ecx) 10ae43: eb 17 jmp 10ae5c <_Heap_Block_split+0xb9> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10ae45: 8b 4a 08 mov 0x8(%edx),%ecx Heap_Block *prev = old_block->prev; 10ae48: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10ae4b: 89 48 08 mov %ecx,0x8(%eax) new_block->prev = prev; 10ae4e: 89 50 0c mov %edx,0xc(%eax) next->prev = new_block; 10ae51: 89 41 0c mov %eax,0xc(%ecx) prev->next = new_block; 10ae54: 89 42 08 mov %eax,0x8(%edx) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10ae57: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ae59: 8d 14 06 lea (%esi,%eax,1),%edx next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10ae5c: 89 f1 mov %esi,%ecx 10ae5e: 83 c9 01 or $0x1,%ecx 10ae61: 89 48 04 mov %ecx,0x4(%eax) next_block->prev_size = free_block_size; 10ae64: 89 32 mov %esi,(%edx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ae66: 83 62 04 fe andl $0xfffffffe,0x4(%edx) 10ae6a: eb 04 jmp 10ae70 <_Heap_Block_split+0xcd> <== ALWAYS TAKEN } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10ae6c: 83 48 04 01 orl $0x1,0x4(%eax) } } 10ae70: 83 c4 10 add $0x10,%esp 10ae73: 5b pop %ebx 10ae74: 5e pop %esi 10ae75: 5f pop %edi 10ae76: c9 leave 10ae77: c3 ret 001121d4 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 1121d4: 55 push %ebp 1121d5: 89 e5 mov %esp,%ebp 1121d7: 56 push %esi 1121d8: 53 push %ebx 1121d9: 8b 4d 08 mov 0x8(%ebp),%ecx 1121dc: 8b 55 0c mov 0xc(%ebp),%edx Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 1121df: 8b 71 1c mov 0x1c(%ecx),%esi uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 1121e2: 8b 59 24 mov 0x24(%ecx),%ebx * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 1121e5: 39 f2 cmp %esi,%edx 1121e7: 73 0a jae 1121f3 <_Heap_Extend+0x1f> uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 1121e9: b8 01 00 00 00 mov $0x1,%eax 1121ee: 3b 51 18 cmp 0x18(%ecx),%edx 1121f1: 73 5f jae 112252 <_Heap_Extend+0x7e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 1121f3: b8 02 00 00 00 mov $0x2,%eax 1121f8: 39 f2 cmp %esi,%edx 1121fa: 75 56 jne 112252 <_Heap_Extend+0x7e> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 1121fc: 03 55 10 add 0x10(%ebp),%edx * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 1121ff: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 112202: 29 da sub %ebx,%edx 112204: 8d 72 f8 lea -0x8(%edx),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 112207: 89 f0 mov %esi,%eax 112209: 31 d2 xor %edx,%edx 11220b: f7 71 10 divl 0x10(%ecx) 11220e: 29 d6 sub %edx,%esi - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 112210: 8b 45 14 mov 0x14(%ebp),%eax 112213: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 112215: 31 c0 xor %eax,%eax 112217: 3b 71 14 cmp 0x14(%ecx),%esi 11221a: 72 36 jb 112252 <_Heap_Extend+0x7e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11221c: 8d 14 1e lea (%esi,%ebx,1),%edx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11221f: 8b 43 04 mov 0x4(%ebx),%eax 112222: 83 e0 01 and $0x1,%eax 112225: 09 f0 or %esi,%eax 112227: 89 43 04 mov %eax,0x4(%ebx) Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 11222a: 8b 41 20 mov 0x20(%ecx),%eax 11222d: 29 d0 sub %edx,%eax 11222f: 83 c8 01 or $0x1,%eax 112232: 89 42 04 mov %eax,0x4(%edx) ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 112235: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 112238: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 11223b: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 11223e: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 112241: 50 push %eax 112242: 50 push %eax 112243: 83 c3 08 add $0x8,%ebx 112246: 53 push %ebx 112247: 51 push %ecx 112248: e8 d7 b5 ff ff call 10d824 <_Heap_Free> <== ALWAYS TAKEN 11224d: 31 c0 xor %eax,%eax 11224f: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 112252: 8d 65 f8 lea -0x8(%ebp),%esp 112255: 5b pop %ebx 112256: 5e pop %esi 112257: c9 leave 112258: c3 ret 0010ef88 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10ef88: 55 push %ebp 10ef89: 89 e5 mov %esp,%ebp 10ef8b: 57 push %edi 10ef8c: 56 push %esi 10ef8d: 53 push %ebx 10ef8e: 83 ec 14 sub $0x14,%esp 10ef91: 8b 4d 08 mov 0x8(%ebp),%ecx 10ef94: 8b 45 0c mov 0xc(%ebp),%eax 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 ) 10ef97: 8d 58 f8 lea -0x8(%eax),%ebx 10ef9a: 31 d2 xor %edx,%edx 10ef9c: f7 71 10 divl 0x10(%ecx) 10ef9f: 29 d3 sub %edx,%ebx 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; 10efa1: 8b 41 20 mov 0x20(%ecx),%eax 10efa4: 89 45 f0 mov %eax,-0x10(%ebp) 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 10efa7: 31 c0 xor %eax,%eax 10efa9: 3b 5d f0 cmp -0x10(%ebp),%ebx 10efac: 72 08 jb 10efb6 <_Heap_Free+0x2e> 10efae: 31 c0 xor %eax,%eax 10efb0: 39 59 24 cmp %ebx,0x24(%ecx) 10efb3: 0f 93 c0 setae %al Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10efb6: 85 c0 test %eax,%eax 10efb8: 0f 84 2d 01 00 00 je 10f0eb <_Heap_Free+0x163> - 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; 10efbe: 8b 7b 04 mov 0x4(%ebx),%edi 10efc1: 89 fa mov %edi,%edx 10efc3: 83 e2 fe and $0xfffffffe,%edx 10efc6: 89 55 e0 mov %edx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10efc9: 8d 04 13 lea (%ebx,%edx,1),%eax 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 10efcc: 31 f6 xor %esi,%esi 10efce: 3b 45 f0 cmp -0x10(%ebp),%eax 10efd1: 72 0e jb 10efe1 <_Heap_Free+0x59> <== ALWAYS TAKEN 10efd3: 39 41 24 cmp %eax,0x24(%ecx) 10efd6: 0f 93 c2 setae %dl 10efd9: 89 d6 mov %edx,%esi 10efdb: 81 e6 ff 00 00 00 and $0xff,%esi } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10efe1: 85 f6 test %esi,%esi 10efe3: 0f 84 02 01 00 00 je 10f0eb <_Heap_Free+0x163> <== ALWAYS 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; 10efe9: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10efec: f7 c6 01 00 00 00 test $0x1,%esi 10eff2: 0f 84 f3 00 00 00 je 10f0eb <_Heap_Free+0x163> <== ALWAYS 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; 10eff8: 83 e6 fe and $0xfffffffe,%esi 10effb: 89 75 e8 mov %esi,-0x18(%ebp) 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 )); 10effe: 8b 51 24 mov 0x24(%ecx),%edx 10f001: 89 55 e4 mov %edx,-0x1c(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10f004: 31 f6 xor %esi,%esi 10f006: 39 d0 cmp %edx,%eax 10f008: 74 0d je 10f017 <_Heap_Free+0x8f> 10f00a: 8b 55 e8 mov -0x18(%ebp),%edx 10f00d: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10f011: 83 e6 01 and $0x1,%esi 10f014: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10f017: 83 e7 01 and $0x1,%edi 10f01a: 75 64 jne 10f080 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10f01c: 8b 13 mov (%ebx),%edx 10f01e: 89 55 ec mov %edx,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10f021: 29 d3 sub %edx,%ebx 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 10f023: 31 ff xor %edi,%edi 10f025: 3b 5d f0 cmp -0x10(%ebp),%ebx 10f028: 72 0e jb 10f038 <_Heap_Free+0xb0> <== ALWAYS TAKEN 10f02a: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10f02d: 0f 93 c2 setae %dl 10f030: 89 d7 mov %edx,%edi 10f032: 81 e7 ff 00 00 00 and $0xff,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10f038: 85 ff test %edi,%edi 10f03a: 0f 84 ab 00 00 00 je 10f0eb <_Heap_Free+0x163> <== ALWAYS TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 10f040: f6 43 04 01 testb $0x1,0x4(%ebx) 10f044: 0f 84 a1 00 00 00 je 10f0eb <_Heap_Free+0x163> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10f04a: 89 f2 mov %esi,%edx 10f04c: 84 d2 test %dl,%dl 10f04e: 74 1a je 10f06a <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10f050: 8b 75 e0 mov -0x20(%ebp),%esi 10f053: 03 75 e8 add -0x18(%ebp),%esi 10f056: 03 75 ec add -0x14(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10f059: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10f05c: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10f05f: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10f062: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10f065: ff 49 38 decl 0x38(%ecx) 10f068: eb 34 jmp 10f09e <_Heap_Free+0x116> <== ALWAYS TAKEN 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; 10f06a: 8b 75 e0 mov -0x20(%ebp),%esi 10f06d: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f070: 89 f7 mov %esi,%edi 10f072: 83 cf 01 or $0x1,%edi 10f075: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f078: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10f07c: 89 30 mov %esi,(%eax) 10f07e: eb 5b jmp 10f0db <_Heap_Free+0x153> <== ALWAYS TAKEN } } else if ( next_is_free ) { /* coalesce next */ 10f080: 89 f2 mov %esi,%edx 10f082: 84 d2 test %dl,%dl 10f084: 74 25 je 10f0ab <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10f086: 8b 75 e8 mov -0x18(%ebp),%esi 10f089: 03 75 e0 add -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10f08c: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10f08f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10f092: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10f095: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10f098: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10f09b: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f09e: 89 f0 mov %esi,%eax 10f0a0: 83 c8 01 or $0x1,%eax 10f0a3: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10f0a6: 89 34 33 mov %esi,(%ebx,%esi,1) 10f0a9: eb 30 jmp 10f0db <_Heap_Free+0x153> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10f0ab: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10f0ae: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10f0b1: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10f0b4: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10f0b7: 89 5e 0c mov %ebx,0xc(%esi) } 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; 10f0ba: 8b 75 e0 mov -0x20(%ebp),%esi 10f0bd: 83 ce 01 or $0x1,%esi 10f0c0: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f0c3: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10f0c7: 8b 55 e0 mov -0x20(%ebp),%edx 10f0ca: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10f0cc: 8b 41 38 mov 0x38(%ecx),%eax 10f0cf: 40 inc %eax 10f0d0: 89 41 38 mov %eax,0x38(%ecx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 10f0d3: 39 41 3c cmp %eax,0x3c(%ecx) 10f0d6: 73 03 jae 10f0db <_Heap_Free+0x153> 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; 10f0d8: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10f0db: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10f0de: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10f0e1: 8b 45 e0 mov -0x20(%ebp),%eax 10f0e4: 01 41 30 add %eax,0x30(%ecx) 10f0e7: b0 01 mov $0x1,%al return( true ); 10f0e9: eb 02 jmp 10f0ed <_Heap_Free+0x165> <== ALWAYS TAKEN 10f0eb: 31 c0 xor %eax,%eax } 10f0ed: 83 c4 14 add $0x14,%esp 10f0f0: 5b pop %ebx 10f0f1: 5e pop %esi 10f0f2: 5f pop %edi 10f0f3: c9 leave 10f0f4: c3 ret 0012887c <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 12887c: 55 push %ebp 12887d: 89 e5 mov %esp,%ebp 12887f: 53 push %ebx 128880: 8b 5d 08 mov 0x8(%ebp),%ebx 128883: 8b 45 0c mov 0xc(%ebp),%eax Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 128886: c7 00 00 00 00 00 movl $0x0,(%eax) info->largest = 0; 12888c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) info->total = 0; 128893: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 12889a: 8b 4b 08 mov 0x8(%ebx),%ecx for(the_block = _Heap_Free_list_first(the_heap); 12889d: eb 16 jmp 1288b5 <_Heap_Get_free_information+0x39> <== ALWAYS 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; 12889f: 8b 51 04 mov 0x4(%ecx),%edx 1288a2: 83 e2 fe and $0xfffffffe,%edx uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 1288a5: ff 00 incl (%eax) info->total += the_size; 1288a7: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 1288aa: 39 50 04 cmp %edx,0x4(%eax) 1288ad: 73 03 jae 1288b2 <_Heap_Get_free_information+0x36> info->largest = the_size; 1288af: 89 50 04 mov %edx,0x4(%eax) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 1288b2: 8b 49 08 mov 0x8(%ecx),%ecx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 1288b5: 39 d9 cmp %ebx,%ecx 1288b7: 75 e6 jne 12889f <_Heap_Get_free_information+0x23> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1288b9: 5b pop %ebx 1288ba: c9 leave 1288bb: c3 ret 00135618 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 135618: 55 push %ebp 135619: 89 e5 mov %esp,%ebp 13561b: 57 push %edi 13561c: 56 push %esi 13561d: 53 push %ebx 13561e: 8b 4d 08 mov 0x8(%ebp),%ecx 135621: 8b 45 0c mov 0xc(%ebp),%eax Heap_Block *the_block = the_heap->first_block; 135624: 8b 51 20 mov 0x20(%ecx),%edx Heap_Block *const end = the_heap->last_block; 135627: 8b 71 24 mov 0x24(%ecx),%esi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 13562a: c7 00 00 00 00 00 movl $0x0,(%eax) the_info->Free.total = 0; 135630: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) the_info->Free.largest = 0; 135637: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_info->Used.number = 0; 13563e: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) the_info->Used.total = 0; 135645: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) the_info->Used.largest = 0; 13564c: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 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; 135653: 8d 58 0c lea 0xc(%eax),%ebx the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 135656: eb 22 jmp 13567a <_Heap_Get_information+0x62> <== ALWAYS 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; 135658: 8b 4a 04 mov 0x4(%edx),%ecx 13565b: 83 e1 fe and $0xfffffffe,%ecx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 13565e: 8d 3c 0a lea (%edx,%ecx,1),%edi 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) ) 135661: 89 c2 mov %eax,%edx 135663: f6 47 04 01 testb $0x1,0x4(%edi) 135667: 74 02 je 13566b <_Heap_Get_information+0x53> 135669: 89 da mov %ebx,%edx info = &the_info->Used; else info = &the_info->Free; info->number++; 13566b: ff 02 incl (%edx) info->total += the_size; 13566d: 01 4a 08 add %ecx,0x8(%edx) if ( info->largest < the_size ) 135670: 39 4a 04 cmp %ecx,0x4(%edx) 135673: 73 03 jae 135678 <_Heap_Get_information+0x60> info->largest = the_size; 135675: 89 4a 04 mov %ecx,0x4(%edx) 135678: 89 fa mov %edi,%edx the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13567a: 39 f2 cmp %esi,%edx 13567c: 75 da jne 135658 <_Heap_Get_information+0x40> /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 13567e: 83 40 14 08 addl $0x8,0x14(%eax) } 135682: 5b pop %ebx 135683: 5e pop %esi 135684: 5f pop %edi 135685: c9 leave 135686: c3 ret 0010ac64 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10ac64: 55 push %ebp 10ac65: 89 e5 mov %esp,%ebp 10ac67: 57 push %edi 10ac68: 56 push %esi 10ac69: 53 push %ebx 10ac6a: 83 ec 0c sub $0xc,%esp 10ac6d: 8b 4d 08 mov 0x8(%ebp),%ecx 10ac70: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 10ac73: 85 db test %ebx,%ebx 10ac75: 75 04 jne 10ac7b <_Heap_Initialize+0x17> 10ac77: b3 04 mov $0x4,%bl 10ac79: eb 15 jmp 10ac90 <_Heap_Initialize+0x2c> <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10ac7b: 89 d8 mov %ebx,%eax 10ac7d: 83 e0 03 and $0x3,%eax 10ac80: 74 05 je 10ac87 <_Heap_Initialize+0x23> return value - remainder + alignment; 10ac82: 83 c3 04 add $0x4,%ebx 10ac85: 29 c3 sub %eax,%ebx page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10ac87: 83 fb 03 cmp $0x3,%ebx 10ac8a: 0f 86 01 01 00 00 jbe 10ad91 <_Heap_Initialize+0x12d> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10ac90: b8 10 00 00 00 mov $0x10,%eax 10ac95: 31 d2 xor %edx,%edx 10ac97: f7 f3 div %ebx if ( remainder != 0 ) { 10ac99: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10aca0: 85 d2 test %edx,%edx 10aca2: 74 08 je 10acac <_Heap_Initialize+0x48> return value - remainder + alignment; 10aca4: 8d 43 10 lea 0x10(%ebx),%eax 10aca7: 29 d0 sub %edx,%eax 10aca9: 89 45 f0 mov %eax,-0x10(%ebp) ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 10acac: 8b 7d 0c mov 0xc(%ebp),%edi 10acaf: 83 c7 08 add $0x8,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10acb2: 89 f8 mov %edi,%eax 10acb4: 31 d2 xor %edx,%edx 10acb6: f7 f3 div %ebx if ( remainder != 0 ) { 10acb8: 85 d2 test %edx,%edx 10acba: 74 05 je 10acc1 <_Heap_Initialize+0x5d> return value - remainder + alignment; 10acbc: 8d 3c 3b lea (%ebx,%edi,1),%edi 10acbf: 29 d7 sub %edx,%edi uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10acc1: 8b 45 0c mov 0xc(%ebp),%eax 10acc4: 03 45 10 add 0x10(%ebp),%eax 10acc7: 89 45 ec mov %eax,-0x14(%ebp) } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10acca: 8d 77 f8 lea -0x8(%edi),%esi 10accd: 2b 7d 0c sub 0xc(%ebp),%edi first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10acd0: 39 7d 10 cmp %edi,0x10(%ebp) 10acd3: 0f 86 b8 00 00 00 jbe 10ad91 <_Heap_Initialize+0x12d> 10acd9: 8b 45 0c mov 0xc(%ebp),%eax 10acdc: 39 45 ec cmp %eax,-0x14(%ebp) 10acdf: 0f 82 ac 00 00 00 jb 10ad91 <_Heap_Initialize+0x12d> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; 10ace5: 8b 45 10 mov 0x10(%ebp),%eax 10ace8: 29 f8 sub %edi,%eax 10acea: 89 c7 mov %eax,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10acec: 31 d2 xor %edx,%edx 10acee: f7 f3 div %ebx 10acf0: 29 d7 sub %edx,%edi first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10acf2: 3b 7d f0 cmp -0x10(%ebp),%edi 10acf5: 0f 82 96 00 00 00 jb 10ad91 <_Heap_Initialize+0x12d> alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; 10acfb: 8d 47 f8 lea -0x8(%edi),%eax 10acfe: 89 45 e8 mov %eax,-0x18(%ebp) return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10ad01: 89 1e mov %ebx,(%esi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10ad03: 89 fa mov %edi,%edx 10ad05: 83 ca 01 or $0x1,%edx 10ad08: 89 56 04 mov %edx,0x4(%esi) first_block->next = _Heap_Free_list_tail( heap ); 10ad0b: 89 4e 08 mov %ecx,0x8(%esi) first_block->prev = _Heap_Free_list_head( heap ); 10ad0e: 89 4e 0c mov %ecx,0xc(%esi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ad11: 8d 14 37 lea (%edi,%esi,1),%edx * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; 10ad14: 89 3a mov %edi,(%edx) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10ad16: 89 f0 mov %esi,%eax 10ad18: 29 d0 sub %edx,%eax 10ad1a: 89 42 04 mov %eax,0x4(%edx) /* Heap control */ heap->page_size = page_size; 10ad1d: 89 59 10 mov %ebx,0x10(%ecx) heap->min_block_size = min_block_size; 10ad20: 8b 45 f0 mov -0x10(%ebp),%eax 10ad23: 89 41 14 mov %eax,0x14(%ecx) heap->area_begin = heap_area_begin; 10ad26: 8b 45 0c mov 0xc(%ebp),%eax 10ad29: 89 41 18 mov %eax,0x18(%ecx) heap->area_end = heap_area_end; 10ad2c: 8b 45 ec mov -0x14(%ebp),%eax 10ad2f: 89 41 1c mov %eax,0x1c(%ecx) heap->first_block = first_block; 10ad32: 89 71 20 mov %esi,0x20(%ecx) heap->last_block = last_block; 10ad35: 89 51 24 mov %edx,0x24(%ecx) _Heap_Free_list_head( heap )->next = first_block; 10ad38: 89 71 08 mov %esi,0x8(%ecx) _Heap_Free_list_tail( heap )->prev = first_block; 10ad3b: 89 71 0c mov %esi,0xc(%ecx) /* Statistics */ stats->size = first_block_size; 10ad3e: 89 79 2c mov %edi,0x2c(%ecx) stats->free_size = first_block_size; 10ad41: 89 79 30 mov %edi,0x30(%ecx) stats->min_free_size = first_block_size; 10ad44: 89 79 34 mov %edi,0x34(%ecx) stats->free_blocks = 1; 10ad47: c7 41 38 01 00 00 00 movl $0x1,0x38(%ecx) stats->max_free_blocks = 1; 10ad4e: c7 41 3c 01 00 00 00 movl $0x1,0x3c(%ecx) stats->used_blocks = 0; 10ad55: c7 41 40 00 00 00 00 movl $0x0,0x40(%ecx) stats->max_search = 0; 10ad5c: c7 41 44 00 00 00 00 movl $0x0,0x44(%ecx) stats->allocs = 0; 10ad63: c7 41 48 00 00 00 00 movl $0x0,0x48(%ecx) stats->searches = 0; 10ad6a: c7 41 4c 00 00 00 00 movl $0x0,0x4c(%ecx) stats->frees = 0; 10ad71: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx) stats->resizes = 0; 10ad78: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx) stats->instance = instance++; 10ad7f: 8b 15 88 3e 12 00 mov 0x123e88,%edx 10ad85: 89 51 28 mov %edx,0x28(%ecx) 10ad88: 42 inc %edx 10ad89: 89 15 88 3e 12 00 mov %edx,0x123e88 ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10ad8f: eb 07 jmp 10ad98 <_Heap_Initialize+0x134> <== ALWAYS TAKEN 10ad91: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) } 10ad98: 8b 45 e8 mov -0x18(%ebp),%eax 10ad9b: 83 c4 0c add $0xc,%esp 10ad9e: 5b pop %ebx 10ad9f: 5e pop %esi 10ada0: 5f pop %edi 10ada1: c9 leave 10ada2: c3 ret 0011cc78 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11cc78: 55 push %ebp 11cc79: 89 e5 mov %esp,%ebp 11cc7b: 57 push %edi 11cc7c: 56 push %esi 11cc7d: 53 push %ebx 11cc7e: 83 ec 2c sub $0x2c,%esp 11cc81: 8b 5d 08 mov 0x8(%ebp),%ebx 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 ) 11cc84: 8b 4d 0c mov 0xc(%ebp),%ecx 11cc87: 83 e9 08 sub $0x8,%ecx 11cc8a: 8b 45 0c mov 0xc(%ebp),%eax 11cc8d: 31 d2 xor %edx,%edx 11cc8f: f7 73 10 divl 0x10(%ebx) 11cc92: 29 d1 sub %edx,%ecx uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 11cc94: 8b 45 14 mov 0x14(%ebp),%eax 11cc97: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11cc9d: 8b 55 18 mov 0x18(%ebp),%edx 11cca0: c7 02 00 00 00 00 movl $0x0,(%edx) 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 11cca6: 39 4b 20 cmp %ecx,0x20(%ebx) 11cca9: 0f 87 ac 00 00 00 ja 11cd5b <_Heap_Resize_block+0xe3> 11ccaf: 39 4b 24 cmp %ecx,0x24(%ebx) 11ccb2: 0f 82 a3 00 00 00 jb 11cd5b <_Heap_Resize_block+0xe3> - 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; 11ccb8: 8b 51 04 mov 0x4(%ecx),%edx 11ccbb: 83 e2 fe and $0xfffffffe,%edx { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11ccbe: 8d 3c 11 lea (%ecx,%edx,1),%edi uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11ccc1: 89 f8 mov %edi,%eax 11ccc3: 2b 45 0c sub 0xc(%ebp),%eax 11ccc6: 83 c0 04 add $0x4,%eax 11ccc9: 89 45 e4 mov %eax,-0x1c(%ebp) 11cccc: 8b 77 04 mov 0x4(%edi),%esi 11cccf: 83 e6 fe and $0xfffffffe,%esi 11ccd2: 89 75 d4 mov %esi,-0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11ccd5: 8b 44 37 04 mov 0x4(%edi,%esi,1),%eax 11ccd9: 83 e0 01 and $0x1,%eax 11ccdc: 89 45 d0 mov %eax,-0x30(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11ccdf: 8b 45 e4 mov -0x1c(%ebp),%eax 11cce2: 8b 75 14 mov 0x14(%ebp),%esi 11cce5: 89 06 mov %eax,(%esi) if ( next_block_is_free ) { 11cce7: 8a 45 d0 mov -0x30(%ebp),%al 11ccea: 34 01 xor $0x1,%al 11ccec: 88 45 e3 mov %al,-0x1d(%ebp) 11ccef: 74 09 je 11ccfa <_Heap_Resize_block+0x82> block_size += next_block_size; 11ccf1: 03 55 d4 add -0x2c(%ebp),%edx alloc_size += next_block_size; 11ccf4: 8b 75 d4 mov -0x2c(%ebp),%esi 11ccf7: 01 75 e4 add %esi,-0x1c(%ebp) } if ( new_alloc_size > alloc_size ) { 11ccfa: b8 01 00 00 00 mov $0x1,%eax 11ccff: 8b 75 e4 mov -0x1c(%ebp),%esi 11cd02: 39 75 10 cmp %esi,0x10(%ebp) 11cd05: 77 59 ja 11cd60 <_Heap_Resize_block+0xe8> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11cd07: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 11cd0b: 74 25 je 11cd32 <_Heap_Resize_block+0xba> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11cd0d: 8b 41 04 mov 0x4(%ecx),%eax 11cd10: 83 e0 01 and $0x1,%eax 11cd13: 09 d0 or %edx,%eax 11cd15: 89 41 04 mov %eax,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11cd18: 8b 47 08 mov 0x8(%edi),%eax Heap_Block *prev = block->prev; 11cd1b: 8b 7f 0c mov 0xc(%edi),%edi prev->next = next; 11cd1e: 89 47 08 mov %eax,0x8(%edi) next->prev = prev; 11cd21: 89 78 0c mov %edi,0xc(%eax) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11cd24: 83 4c 0a 04 01 orl $0x1,0x4(%edx,%ecx,1) /* Statistics */ --stats->free_blocks; 11cd29: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11cd2c: 8b 45 d4 mov -0x2c(%ebp),%eax 11cd2f: 29 43 30 sub %eax,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11cd32: ff 75 10 pushl 0x10(%ebp) 11cd35: ff 75 0c pushl 0xc(%ebp) 11cd38: 51 push %ecx 11cd39: 53 push %ebx 11cd3a: e8 39 e1 fe ff call 10ae78 <_Heap_Block_allocate> <== ALWAYS TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11cd3f: 8b 50 04 mov 0x4(%eax),%edx 11cd42: 83 e2 fe and $0xfffffffe,%edx 11cd45: 2b 45 0c sub 0xc(%ebp),%eax 11cd48: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11cd4c: 8b 55 18 mov 0x18(%ebp),%edx 11cd4f: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11cd51: ff 43 54 incl 0x54(%ebx) 11cd54: 31 c0 xor %eax,%eax 11cd56: 83 c4 10 add $0x10,%esp 11cd59: eb 05 jmp 11cd60 <_Heap_Resize_block+0xe8> <== ALWAYS TAKEN 11cd5b: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11cd60: 8d 65 f4 lea -0xc(%ebp),%esp 11cd63: 5b pop %ebx 11cd64: 5e pop %esi 11cd65: 5f pop %edi 11cd66: c9 leave 11cd67: c3 ret 0011cd68 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11cd68: 55 push %ebp 11cd69: 89 e5 mov %esp,%ebp 11cd6b: 56 push %esi 11cd6c: 53 push %ebx 11cd6d: 8b 5d 08 mov 0x8(%ebp),%ebx 11cd70: 8b 75 0c mov 0xc(%ebp),%esi 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 ) 11cd73: 8d 4e f8 lea -0x8(%esi),%ecx 11cd76: 89 f0 mov %esi,%eax 11cd78: 31 d2 xor %edx,%edx 11cd7a: f7 73 10 divl 0x10(%ebx) 11cd7d: 29 d1 sub %edx,%ecx 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; 11cd7f: 8b 53 20 mov 0x20(%ebx),%edx 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 11cd82: 31 c0 xor %eax,%eax 11cd84: 39 d1 cmp %edx,%ecx 11cd86: 72 08 jb 11cd90 <_Heap_Size_of_alloc_area+0x28> 11cd88: 31 c0 xor %eax,%eax 11cd8a: 39 4b 24 cmp %ecx,0x24(%ebx) 11cd8d: 0f 93 c0 setae %al uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11cd90: 85 c0 test %eax,%eax 11cd92: 74 2e je 11cdc2 <_Heap_Size_of_alloc_area+0x5a> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11cd94: 8b 41 04 mov 0x4(%ecx),%eax 11cd97: 83 e0 fe and $0xfffffffe,%eax 11cd9a: 01 c1 add %eax,%ecx 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 11cd9c: 31 c0 xor %eax,%eax 11cd9e: 39 d1 cmp %edx,%ecx 11cda0: 72 08 jb 11cdaa <_Heap_Size_of_alloc_area+0x42> <== ALWAYS TAKEN 11cda2: 31 c0 xor %eax,%eax 11cda4: 39 4b 24 cmp %ecx,0x24(%ebx) 11cda7: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11cdaa: 85 c0 test %eax,%eax 11cdac: 74 14 je 11cdc2 <_Heap_Size_of_alloc_area+0x5a> <== ALWAYS TAKEN 11cdae: f6 41 04 01 testb $0x1,0x4(%ecx) 11cdb2: 74 0e je 11cdc2 <_Heap_Size_of_alloc_area+0x5a> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11cdb4: 29 f1 sub %esi,%ecx 11cdb6: 8d 51 04 lea 0x4(%ecx),%edx 11cdb9: 8b 45 10 mov 0x10(%ebp),%eax 11cdbc: 89 10 mov %edx,(%eax) 11cdbe: b0 01 mov $0x1,%al return true; 11cdc0: eb 02 jmp 11cdc4 <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN 11cdc2: 31 c0 xor %eax,%eax } 11cdc4: 5b pop %ebx 11cdc5: 5e pop %esi 11cdc6: c9 leave 11cdc7: c3 ret 0010b965 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10b965: 55 push %ebp 10b966: 89 e5 mov %esp,%ebp 10b968: 57 push %edi 10b969: 56 push %esi 10b96a: 53 push %ebx 10b96b: 83 ec 4c sub $0x4c,%esp 10b96e: 8b 7d 08 mov 0x8(%ebp),%edi 10b971: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10b974: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10b977: 8b 47 14 mov 0x14(%edi),%eax 10b97a: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10b97d: 8b 57 24 mov 0x24(%edi),%edx 10b980: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10b983: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10b986: c7 45 e4 77 bc 10 00 movl $0x10bc77,-0x1c(%ebp) 10b98d: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10b991: 75 07 jne 10b99a <_Heap_Walk+0x35> 10b993: c7 45 e4 60 b9 10 00 movl $0x10b960,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10b99a: 83 3d 0c 64 12 00 03 cmpl $0x3,0x12640c 10b9a1: 0f 85 c6 02 00 00 jne 10bc6d <_Heap_Walk+0x308> 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)( 10b9a7: 50 push %eax 10b9a8: ff 77 0c pushl 0xc(%edi) 10b9ab: ff 77 08 pushl 0x8(%edi) 10b9ae: ff 75 d0 pushl -0x30(%ebp) 10b9b1: 53 push %ebx 10b9b2: ff 77 1c pushl 0x1c(%edi) 10b9b5: ff 77 18 pushl 0x18(%edi) 10b9b8: ff 75 dc pushl -0x24(%ebp) 10b9bb: 51 push %ecx 10b9bc: 68 68 f7 11 00 push $0x11f768 10b9c1: 6a 00 push $0x0 10b9c3: 56 push %esi 10b9c4: 89 4d bc mov %ecx,-0x44(%ebp) 10b9c7: ff 55 e4 call *-0x1c(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10b9ca: 83 c4 30 add $0x30,%esp 10b9cd: 8b 4d bc mov -0x44(%ebp),%ecx 10b9d0: 85 c9 test %ecx,%ecx 10b9d2: 75 0b jne 10b9df <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10b9d4: 53 push %ebx 10b9d5: 68 f9 f7 11 00 push $0x11f7f9 10b9da: e9 5b 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10b9df: f6 c1 03 test $0x3,%cl 10b9e2: 74 0b je 10b9ef <_Heap_Walk+0x8a> (*printer)( 10b9e4: 51 push %ecx 10b9e5: 68 0c f8 11 00 push $0x11f80c 10b9ea: e9 4b 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10b9ef: 8b 45 dc mov -0x24(%ebp),%eax 10b9f2: 31 d2 xor %edx,%edx 10b9f4: f7 f1 div %ecx 10b9f6: 85 d2 test %edx,%edx 10b9f8: 74 0d je 10ba07 <_Heap_Walk+0xa2> (*printer)( 10b9fa: ff 75 dc pushl -0x24(%ebp) 10b9fd: 68 2a f8 11 00 push $0x11f82a 10ba02: e9 33 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( 10ba07: 8d 43 08 lea 0x8(%ebx),%eax 10ba0a: 31 d2 xor %edx,%edx 10ba0c: f7 f1 div %ecx 10ba0e: 85 d2 test %edx,%edx 10ba10: 74 0b je 10ba1d <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10ba12: 53 push %ebx 10ba13: 68 4e f8 11 00 push $0x11f84e 10ba18: e9 1d 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10ba1d: f6 43 04 01 testb $0x1,0x4(%ebx) 10ba21: 75 0b jne 10ba2e <_Heap_Walk+0xc9> (*printer)( 10ba23: 51 push %ecx 10ba24: 68 7f f8 11 00 push $0x11f87f 10ba29: e9 0c 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( first_block->prev_size != page_size ) { 10ba2e: 8b 03 mov (%ebx),%eax 10ba30: 89 45 d4 mov %eax,-0x2c(%ebp) 10ba33: 39 c8 cmp %ecx,%eax 10ba35: 74 0f je 10ba46 <_Heap_Walk+0xe1> (*printer)( 10ba37: 83 ec 0c sub $0xc,%esp 10ba3a: 51 push %ecx 10ba3b: 50 push %eax 10ba3c: 68 ad f8 11 00 push $0x11f8ad 10ba41: e9 3d 01 00 00 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_free( last_block ) ) { 10ba46: 8b 55 d0 mov -0x30(%ebp),%edx 10ba49: 8b 42 04 mov 0x4(%edx),%eax 10ba4c: 83 e0 fe and $0xfffffffe,%eax 10ba4f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10ba54: 75 0b jne 10ba61 <_Heap_Walk+0xfc> (*printer)( 10ba56: 52 push %edx 10ba57: 68 d8 f8 11 00 push $0x11f8d8 10ba5c: e9 d9 01 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10ba61: 8b 4f 10 mov 0x10(%edi),%ecx 10ba64: 89 4d d8 mov %ecx,-0x28(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10ba67: 8b 4f 08 mov 0x8(%edi),%ecx 10ba6a: 89 7d e0 mov %edi,-0x20(%ebp) 10ba6d: eb 6a jmp 10bad9 <_Heap_Walk+0x174> <== ALWAYS TAKEN 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 10ba6f: 31 c0 xor %eax,%eax 10ba71: 39 4f 20 cmp %ecx,0x20(%edi) 10ba74: 77 08 ja 10ba7e <_Heap_Walk+0x119> 10ba76: 31 c0 xor %eax,%eax 10ba78: 39 4f 24 cmp %ecx,0x24(%edi) 10ba7b: 0f 93 c0 setae %al const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10ba7e: 85 c0 test %eax,%eax 10ba80: 75 0b jne 10ba8d <_Heap_Walk+0x128> (*printer)( 10ba82: 51 push %ecx 10ba83: 68 ed f8 11 00 push $0x11f8ed 10ba88: e9 ad 01 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( 10ba8d: 8d 41 08 lea 0x8(%ecx),%eax 10ba90: 31 d2 xor %edx,%edx 10ba92: f7 75 d8 divl -0x28(%ebp) 10ba95: 85 d2 test %edx,%edx 10ba97: 74 0b je 10baa4 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10ba99: 51 push %ecx 10ba9a: 68 0d f9 11 00 push $0x11f90d 10ba9f: e9 96 01 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10baa4: 8b 41 04 mov 0x4(%ecx),%eax 10baa7: 83 e0 fe and $0xfffffffe,%eax 10baaa: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10baaf: 74 0b je 10babc <_Heap_Walk+0x157> (*printer)( 10bab1: 51 push %ecx 10bab2: 68 3d f9 11 00 push $0x11f93d 10bab7: e9 7e 01 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10babc: 8b 41 0c mov 0xc(%ecx),%eax 10babf: 3b 45 e0 cmp -0x20(%ebp),%eax 10bac2: 74 0f je 10bad3 <_Heap_Walk+0x16e> (*printer)( 10bac4: 83 ec 0c sub $0xc,%esp 10bac7: 50 push %eax 10bac8: 51 push %ecx 10bac9: 68 59 f9 11 00 push $0x11f959 10bace: e9 b0 00 00 00 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN return false; } prev_block = free_block; free_block = free_block->next; 10bad3: 89 4d e0 mov %ecx,-0x20(%ebp) 10bad6: 8b 49 08 mov 0x8(%ecx),%ecx 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 ) { 10bad9: 39 f9 cmp %edi,%ecx 10badb: 75 92 jne 10ba6f <_Heap_Walk+0x10a> 10badd: 89 75 e0 mov %esi,-0x20(%ebp) 10bae0: e9 7f 01 00 00 jmp 10bc64 <_Heap_Walk+0x2ff> <== ALWAYS 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; 10bae5: 8b 43 04 mov 0x4(%ebx),%eax 10bae8: 89 c1 mov %eax,%ecx 10baea: 83 e1 fe and $0xfffffffe,%ecx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10baed: 8d 34 0b lea (%ebx,%ecx,1),%esi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10baf0: a8 01 test $0x1,%al 10baf2: 74 0c je 10bb00 <_Heap_Walk+0x19b> (*printer)( 10baf4: 83 ec 0c sub $0xc,%esp 10baf7: 51 push %ecx 10baf8: 53 push %ebx 10baf9: 68 8b f9 11 00 push $0x11f98b 10bafe: eb 0b jmp 10bb0b <_Heap_Walk+0x1a6> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10bb00: 50 push %eax 10bb01: 50 push %eax 10bb02: ff 33 pushl (%ebx) 10bb04: 51 push %ecx 10bb05: 53 push %ebx 10bb06: 68 a2 f9 11 00 push $0x11f9a2 10bb0b: 6a 00 push $0x0 10bb0d: ff 75 e0 pushl -0x20(%ebp) 10bb10: 89 4d bc mov %ecx,-0x44(%ebp) 10bb13: ff 55 e4 call *-0x1c(%ebp) 10bb16: 83 c4 20 add $0x20,%esp 10bb19: 8b 4d bc mov -0x44(%ebp),%ecx 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 10bb1c: 31 c0 xor %eax,%eax 10bb1e: 39 77 20 cmp %esi,0x20(%edi) 10bb21: 77 08 ja 10bb2b <_Heap_Walk+0x1c6> <== ALWAYS TAKEN 10bb23: 31 c0 xor %eax,%eax 10bb25: 39 77 24 cmp %esi,0x24(%edi) 10bb28: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10bb2b: 85 c0 test %eax,%eax 10bb2d: 75 11 jne 10bb40 <_Heap_Walk+0x1db> 10bb2f: 89 f1 mov %esi,%ecx 10bb31: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb34: 83 ec 0c sub $0xc,%esp 10bb37: 51 push %ecx 10bb38: 53 push %ebx 10bb39: 68 c7 f9 11 00 push $0x11f9c7 10bb3e: eb 43 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10bb40: 89 c8 mov %ecx,%eax 10bb42: 31 d2 xor %edx,%edx 10bb44: f7 75 d4 divl -0x2c(%ebp) 10bb47: 85 d2 test %edx,%edx 10bb49: 74 0f je 10bb5a <_Heap_Walk+0x1f5> 10bb4b: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb4e: 83 ec 0c sub $0xc,%esp 10bb51: 51 push %ecx 10bb52: 53 push %ebx 10bb53: 68 f4 f9 11 00 push $0x11f9f4 10bb58: eb 29 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( block_size < min_block_size ) { 10bb5a: 3b 4d dc cmp -0x24(%ebp),%ecx 10bb5d: 73 11 jae 10bb70 <_Heap_Walk+0x20b> 10bb5f: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb62: 57 push %edi 10bb63: 57 push %edi 10bb64: ff 75 dc pushl -0x24(%ebp) 10bb67: 51 push %ecx 10bb68: 53 push %ebx 10bb69: 68 22 fa 11 00 push $0x11fa22 10bb6e: eb 13 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin ) { 10bb70: 39 de cmp %ebx,%esi 10bb72: 77 1f ja 10bb93 <_Heap_Walk+0x22e> 10bb74: 89 f1 mov %esi,%ecx 10bb76: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb79: 83 ec 0c sub $0xc,%esp 10bb7c: 51 push %ecx 10bb7d: 53 push %ebx 10bb7e: 68 4d fa 11 00 push $0x11fa4d 10bb83: 6a 01 push $0x1 10bb85: 56 push %esi 10bb86: ff 55 e4 call *-0x1c(%ebp) 10bb89: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10bb8b: 83 c4 20 add $0x20,%esp 10bb8e: e9 dc 00 00 00 jmp 10bc6f <_Heap_Walk+0x30a> <== ALWAYS TAKEN } if ( !_Heap_Is_prev_used( next_block ) ) { 10bb93: f6 46 04 01 testb $0x1,0x4(%esi) 10bb97: 0f 85 c5 00 00 00 jne 10bc62 <_Heap_Walk+0x2fd> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10bb9d: 8b 47 08 mov 0x8(%edi),%eax 10bba0: 89 45 c0 mov %eax,-0x40(%ebp) 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; 10bba3: 8b 53 04 mov 0x4(%ebx),%edx 10bba6: 89 55 c4 mov %edx,-0x3c(%ebp) - 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; 10bba9: 83 e2 fe and $0xfffffffe,%edx 10bbac: 89 55 cc mov %edx,-0x34(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10bbaf: 01 da add %ebx,%edx 10bbb1: 89 55 c8 mov %edx,-0x38(%ebp) 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)( 10bbb4: 8b 4b 08 mov 0x8(%ebx),%ecx 10bbb7: 89 4d b4 mov %ecx,-0x4c(%ebp) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10bbba: ba 81 fa 11 00 mov $0x11fa81,%edx 10bbbf: 3b 4f 0c cmp 0xc(%edi),%ecx 10bbc2: 74 0e je 10bbd2 <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10bbc4: ba 8b fa 11 00 mov $0x11fa8b,%edx 10bbc9: 39 f9 cmp %edi,%ecx 10bbcb: 74 05 je 10bbd2 <_Heap_Walk+0x26d> 10bbcd: ba b5 f6 11 00 mov $0x11f6b5,%edx 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)( 10bbd2: 8b 43 0c mov 0xc(%ebx),%eax 10bbd5: 89 45 d8 mov %eax,-0x28(%ebp) 10bbd8: b8 95 fa 11 00 mov $0x11fa95,%eax 10bbdd: 8b 4d c0 mov -0x40(%ebp),%ecx 10bbe0: 39 4d d8 cmp %ecx,-0x28(%ebp) 10bbe3: 74 0f je 10bbf4 <_Heap_Walk+0x28f> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10bbe5: b8 a0 fa 11 00 mov $0x11faa0,%eax 10bbea: 39 7d d8 cmp %edi,-0x28(%ebp) 10bbed: 74 05 je 10bbf4 <_Heap_Walk+0x28f> 10bbef: b8 b5 f6 11 00 mov $0x11f6b5,%eax 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)( 10bbf4: 52 push %edx 10bbf5: ff 75 b4 pushl -0x4c(%ebp) 10bbf8: 50 push %eax 10bbf9: ff 75 d8 pushl -0x28(%ebp) 10bbfc: 53 push %ebx 10bbfd: 68 aa fa 11 00 push $0x11faaa 10bc02: 6a 00 push $0x0 10bc04: ff 75 e0 pushl -0x20(%ebp) 10bc07: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10bc0a: 8b 55 c8 mov -0x38(%ebp),%edx 10bc0d: 8b 02 mov (%edx),%eax 10bc0f: 83 c4 20 add $0x20,%esp 10bc12: 39 45 cc cmp %eax,-0x34(%ebp) 10bc15: 74 14 je 10bc2b <_Heap_Walk+0x2c6> 10bc17: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc1a: 51 push %ecx 10bc1b: 52 push %edx 10bc1c: 50 push %eax 10bc1d: ff 75 cc pushl -0x34(%ebp) 10bc20: 53 push %ebx 10bc21: 68 d6 fa 11 00 push $0x11fad6 10bc26: e9 58 ff ff ff jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 10bc2b: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10bc2f: 75 16 jne 10bc47 <_Heap_Walk+0x2e2> 10bc31: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc34: 53 push %ebx 10bc35: 68 0f fb 11 00 push $0x11fb0f 10bc3a: 6a 01 push $0x1 10bc3c: 56 push %esi 10bc3d: ff 55 e4 call *-0x1c(%ebp) 10bc40: 31 c0 xor %eax,%eax 10bc42: 83 c4 10 add $0x10,%esp 10bc45: eb 28 jmp 10bc6f <_Heap_Walk+0x30a> <== ALWAYS TAKEN return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10bc47: 8b 47 08 mov 0x8(%edi),%eax 10bc4a: eb 07 jmp 10bc53 <_Heap_Walk+0x2ee> <== ALWAYS TAKEN { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 10bc4c: 39 d8 cmp %ebx,%eax 10bc4e: 74 12 je 10bc62 <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10bc50: 8b 40 08 mov 0x8(%eax),%eax ) { 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 ) { 10bc53: 39 f8 cmp %edi,%eax 10bc55: 75 f5 jne 10bc4c <_Heap_Walk+0x2e7> 10bc57: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10bc5a: 53 push %ebx 10bc5b: 68 3e fb 11 00 push $0x11fb3e 10bc60: eb d8 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ) { 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 ) { 10bc62: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10bc64: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bc67: 0f 85 78 fe ff ff jne 10bae5 <_Heap_Walk+0x180> 10bc6d: b0 01 mov $0x1,%al block = next_block; } return true; } 10bc6f: 8d 65 f4 lea -0xc(%ebp),%esp 10bc72: 5b pop %ebx 10bc73: 5e pop %esi 10bc74: 5f pop %edi 10bc75: c9 leave 10bc76: c3 ret 0010bc77 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 10bc77: 55 push %ebp 10bc78: 89 e5 mov %esp,%ebp 10bc7a: 83 ec 08 sub $0x8,%esp 10bc7d: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; if ( error ) { 10bc80: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) 10bc84: 74 0a je 10bc90 <_Heap_Walk_print+0x19> printk( "FAIL[%d]: ", source ); 10bc86: 51 push %ecx 10bc87: 51 push %ecx 10bc88: 50 push %eax 10bc89: 68 69 fb 11 00 push $0x11fb69 10bc8e: eb 08 jmp 10bc98 <_Heap_Walk_print+0x21> <== ALWAYS TAKEN } else { printk( "PASS[%d]: ", source ); 10bc90: 52 push %edx 10bc91: 52 push %edx 10bc92: 50 push %eax 10bc93: 68 74 fb 11 00 push $0x11fb74 10bc98: e8 17 c8 ff ff call 1084b4 10bc9d: 5a pop %edx 10bc9e: 59 pop %ecx ) { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) 10bc9f: 8d 45 14 lea 0x14(%ebp),%eax } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 10bca2: 50 push %eax 10bca3: ff 75 10 pushl 0x10(%ebp) 10bca6: e8 3d e1 ff ff call 109de8 10bcab: 83 c4 10 add $0x10,%esp va_end( ap ); } 10bcae: c9 leave 10bcaf: c3 ret 0010a500 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10a500: 55 push %ebp 10a501: 89 e5 mov %esp,%ebp 10a503: 53 push %ebx 10a504: 83 ec 04 sub $0x4,%esp 10a507: 31 db xor %ebx,%ebx rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10a509: eb 0f jmp 10a51a <_IO_Initialize_all_drivers+0x1a> <== ALWAYS TAKEN (void) rtems_io_initialize( major, 0, NULL ); 10a50b: 50 push %eax 10a50c: 6a 00 push $0x0 10a50e: 6a 00 push $0x0 10a510: 53 push %ebx 10a511: e8 62 46 00 00 call 10eb78 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10a516: 43 inc %ebx 10a517: 83 c4 10 add $0x10,%esp 10a51a: 3b 1d 48 4b 12 00 cmp 0x124b48,%ebx 10a520: 72 e9 jb 10a50b <_IO_Initialize_all_drivers+0xb> (void) rtems_io_initialize( major, 0, NULL ); } 10a522: 8b 5d fc mov -0x4(%ebp),%ebx 10a525: c9 leave 10a526: c3 ret 0010a527 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10a527: 55 push %ebp 10a528: 89 e5 mov %esp,%ebp 10a52a: 57 push %edi 10a52b: 56 push %esi 10a52c: 53 push %ebx 10a52d: 83 ec 1c sub $0x1c,%esp 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; 10a530: 8b 35 2c 02 12 00 mov 0x12022c,%esi drivers_in_table = Configuration.number_of_device_drivers; 10a536: a1 28 02 12 00 mov 0x120228,%eax 10a53b: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10a53e: 8b 3d 24 02 12 00 mov 0x120224,%edi /* * 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 ) 10a544: 39 c7 cmp %eax,%edi 10a546: 76 30 jbe 10a578 <_IO_Manager_initialization+0x51> /* * 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 *) 10a548: 6b df 18 imul $0x18,%edi,%ebx 10a54b: 83 ec 0c sub $0xc,%esp 10a54e: 53 push %ebx 10a54f: e8 44 26 00 00 call 10cb98 <_Workspace_Allocate_or_fatal_error> 10a554: 89 c2 mov %eax,%edx 10a556: a3 4c 4b 12 00 mov %eax,0x124b4c _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10a55b: 89 3d 48 4b 12 00 mov %edi,0x124b48 memset( 10a561: 31 c0 xor %eax,%eax 10a563: 89 d7 mov %edx,%edi 10a565: 89 d9 mov %ebx,%ecx 10a567: f3 aa rep stos %al,%es:(%edi) 10a569: 89 f0 mov %esi,%eax 10a56b: 8b 15 4c 4b 12 00 mov 0x124b4c,%edx 10a571: 31 db xor %ebx,%ebx _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10a573: 83 c4 10 add $0x10,%esp 10a576: eb 22 jmp 10a59a <_IO_Manager_initialization+0x73> <== ALWAYS TAKEN * 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; 10a578: 89 35 4c 4b 12 00 mov %esi,0x124b4c _IO_Number_of_drivers = number_of_drivers; 10a57e: 8b 45 e4 mov -0x1c(%ebp),%eax 10a581: a3 48 4b 12 00 mov %eax,0x124b48 return; 10a586: eb 17 jmp 10a59f <_IO_Manager_initialization+0x78> <== ALWAYS TAKEN _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 10a588: 89 d7 mov %edx,%edi 10a58a: 89 c6 mov %eax,%esi 10a58c: b9 06 00 00 00 mov $0x6,%ecx 10a591: f3 a5 rep movsl %ds:(%esi),%es:(%edi) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10a593: 43 inc %ebx 10a594: 83 c0 18 add $0x18,%eax 10a597: 83 c2 18 add $0x18,%edx 10a59a: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10a59d: 72 e9 jb 10a588 <_IO_Manager_initialization+0x61> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10a59f: 8d 65 f4 lea -0xc(%ebp),%esp 10a5a2: 5b pop %ebx 10a5a3: 5e pop %esi 10a5a4: 5f pop %edi 10a5a5: c9 leave 10a5a6: c3 ret 0010af54 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10af54: 55 push %ebp 10af55: 89 e5 mov %esp,%ebp 10af57: 53 push %ebx 10af58: 83 ec 08 sub $0x8,%esp 10af5b: 8b 45 08 mov 0x8(%ebp),%eax 10af5e: 8b 55 0c mov 0xc(%ebp),%edx 10af61: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10af64: a3 90 42 12 00 mov %eax,0x124290 _Internal_errors_What_happened.is_internal = is_internal; 10af69: 88 15 94 42 12 00 mov %dl,0x124294 _Internal_errors_What_happened.the_error = the_error; 10af6f: 89 1d 98 42 12 00 mov %ebx,0x124298 _User_extensions_Fatal( the_source, is_internal, the_error ); 10af75: 53 push %ebx 10af76: 0f b6 d2 movzbl %dl,%edx 10af79: 52 push %edx 10af7a: 50 push %eax 10af7b: e8 13 19 00 00 call 10c893 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10af80: c7 05 84 43 12 00 05 movl $0x5,0x124384 <== NOT EXECUTED 10af87: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10af8a: fa cli <== NOT EXECUTED 10af8b: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10af8d: f4 hlt <== NOT EXECUTED 10af8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10af91: eb fe jmp 10af91 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 0010afec <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10afec: 55 push %ebp 10afed: 89 e5 mov %esp,%ebp 10afef: 56 push %esi 10aff0: 53 push %ebx 10aff1: 8b 5d 08 mov 0x8(%ebp),%ebx * 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 ) 10aff4: 31 c9 xor %ecx,%ecx 10aff6: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10affa: 74 53 je 10b04f <_Objects_Allocate+0x63> <== ALWAYS TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10affc: 8d 73 20 lea 0x20(%ebx),%esi 10afff: 83 ec 0c sub $0xc,%esp 10b002: 56 push %esi 10b003: e8 ac f7 ff ff call 10a7b4 <_Chain_Get> <== ALWAYS TAKEN 10b008: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b00a: 83 c4 10 add $0x10,%esp 10b00d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b011: 74 3c je 10b04f <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b013: 85 c0 test %eax,%eax 10b015: 75 1a jne 10b031 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b017: 83 ec 0c sub $0xc,%esp 10b01a: 53 push %ebx 10b01b: e8 60 00 00 00 call 10b080 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b020: 89 34 24 mov %esi,(%esp) 10b023: e8 8c f7 ff ff call 10a7b4 <_Chain_Get> <== ALWAYS TAKEN 10b028: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b02a: 83 c4 10 add $0x10,%esp 10b02d: 85 c0 test %eax,%eax 10b02f: 74 1e je 10b04f <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b031: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b035: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b039: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b03b: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b03f: 31 d2 xor %edx,%edx 10b041: f7 f6 div %esi 10b043: c1 e0 02 shl $0x2,%eax 10b046: 03 43 30 add 0x30(%ebx),%eax 10b049: ff 08 decl (%eax) information->inactive--; 10b04b: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b04f: 89 c8 mov %ecx,%eax 10b051: 8d 65 f8 lea -0x8(%ebp),%esp 10b054: 5b pop %ebx 10b055: 5e pop %esi 10b056: c9 leave 10b057: c3 ret 0010b058 <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 10b058: 55 push %ebp 10b059: 89 e5 mov %esp,%ebp 10b05b: 53 push %ebx 10b05c: 83 ec 04 sub $0x4,%esp 10b05f: 8b 45 08 mov 0x8(%ebp),%eax 10b062: 8b 55 0c mov 0xc(%ebp),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b065: 0f b7 5a 08 movzwl 0x8(%edx),%ebx 10b069: 8b 48 1c mov 0x1c(%eax),%ecx 10b06c: c7 04 99 00 00 00 00 movl $0x0,(%ecx,%ebx,4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10b073: 89 55 0c mov %edx,0xc(%ebp) } 10b076: 58 pop %eax 10b077: 5b pop %ebx 10b078: c9 leave Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10b079: e9 c6 04 00 00 jmp 10b544 <_Objects_Namespace_remove> <== ALWAYS TAKEN 0010b080 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b080: 55 push %ebp 10b081: 89 e5 mov %esp,%ebp 10b083: 57 push %edi 10b084: 56 push %esi 10b085: 53 push %ebx 10b086: 83 ec 4c sub $0x4c,%esp 10b089: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 10b08c: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b090: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b093: 8b 4b 34 mov 0x34(%ebx),%ecx 10b096: 85 c9 test %ecx,%ecx 10b098: 75 0e jne 10b0a8 <_Objects_Extend_information+0x28> 10b09a: 89 45 d4 mov %eax,-0x2c(%ebp) 10b09d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b0a4: 31 d2 xor %edx,%edx 10b0a6: eb 31 jmp 10b0d9 <_Objects_Extend_information+0x59> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b0a8: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b0ac: 8b 43 10 mov 0x10(%ebx),%eax 10b0af: 31 d2 xor %edx,%edx 10b0b1: 66 f7 f6 div %si 10b0b4: 0f b7 d0 movzwl %ax,%edx 10b0b7: 8b 7d c8 mov -0x38(%ebp),%edi 10b0ba: 89 7d d4 mov %edi,-0x2c(%ebp) 10b0bd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b0c4: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b0c6: eb 0a jmp 10b0d2 <_Objects_Extend_information+0x52> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 10b0c8: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b0cc: 74 08 je 10b0d6 <_Objects_Extend_information+0x56> 10b0ce: 01 75 d4 add %esi,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b0d1: 40 inc %eax 10b0d2: 39 d0 cmp %edx,%eax 10b0d4: 72 f2 jb 10b0c8 <_Objects_Extend_information+0x48> 10b0d6: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b0d9: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b0dd: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b0e1: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b0e4: 89 4d b8 mov %ecx,-0x48(%ebp) /* * 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 ) { 10b0e7: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b0ed: 0f 87 db 01 00 00 ja 10b2ce <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10b0f3: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b0f7: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b0fb: 74 1e je 10b11b <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b0fd: 83 ec 0c sub $0xc,%esp 10b100: 50 push %eax 10b101: 89 55 b4 mov %edx,-0x4c(%ebp) 10b104: e8 bb 1a 00 00 call 10cbc4 <_Workspace_Allocate> 10b109: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b10c: 83 c4 10 add $0x10,%esp 10b10f: 85 c0 test %eax,%eax 10b111: 8b 55 b4 mov -0x4c(%ebp),%edx 10b114: 75 1a jne 10b130 <_Objects_Extend_information+0xb0> 10b116: e9 b3 01 00 00 jmp 10b2ce <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b11b: 83 ec 0c sub $0xc,%esp 10b11e: 50 push %eax 10b11f: 89 55 b4 mov %edx,-0x4c(%ebp) 10b122: e8 71 1a 00 00 call 10cb98 <_Workspace_Allocate_or_fatal_error> 10b127: 89 45 bc mov %eax,-0x44(%ebp) 10b12a: 83 c4 10 add $0x10,%esp 10b12d: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10b130: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b134: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b137: 0f 82 14 01 00 00 jb 10b251 <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b13d: 8d 72 01 lea 0x1(%edx),%esi * 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 ); 10b140: 83 ec 0c sub $0xc,%esp 10b143: 8b 4d b8 mov -0x48(%ebp),%ecx 10b146: 03 4d c8 add -0x38(%ebp),%ecx 10b149: 8d 04 76 lea (%esi,%esi,2),%eax 10b14c: 8d 04 01 lea (%ecx,%eax,1),%eax 10b14f: c1 e0 02 shl $0x2,%eax 10b152: 50 push %eax 10b153: 89 55 b4 mov %edx,-0x4c(%ebp) 10b156: e8 69 1a 00 00 call 10cbc4 <_Workspace_Allocate> if ( !object_blocks ) { 10b15b: 83 c4 10 add $0x10,%esp 10b15e: 85 c0 test %eax,%eax 10b160: 8b 55 b4 mov -0x4c(%ebp),%edx 10b163: 75 13 jne 10b178 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b165: 83 ec 0c sub $0xc,%esp 10b168: ff 75 bc pushl -0x44(%ebp) 10b16b: e8 6d 1a 00 00 call 10cbdd <_Workspace_Free> return; 10b170: 83 c4 10 add $0x10,%esp 10b173: e9 56 01 00 00 jmp 10b2ce <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b178: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b17b: 89 4d c0 mov %ecx,-0x40(%ebp) 10b17e: 8d 34 f0 lea (%eax,%esi,8),%esi 10b181: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b184: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b188: 31 c9 xor %ecx,%ecx 10b18a: 3b 75 c8 cmp -0x38(%ebp),%esi 10b18d: 76 3e jbe 10b1cd <_Objects_Extend_information+0x14d> /* * 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, 10b18f: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b196: 89 75 d0 mov %esi,-0x30(%ebp) 10b199: 8b 73 34 mov 0x34(%ebx),%esi 10b19c: 89 c7 mov %eax,%edi 10b19e: 8b 4d d0 mov -0x30(%ebp),%ecx 10b1a1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b1a3: 8b 73 30 mov 0x30(%ebx),%esi 10b1a6: 8b 7d c0 mov -0x40(%ebp),%edi 10b1a9: 8b 4d d0 mov -0x30(%ebp),%ecx 10b1ac: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b1ae: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b1b2: 03 4d c8 add -0x38(%ebp),%ecx 10b1b5: c1 e1 02 shl $0x2,%ecx 10b1b8: 8b 73 1c mov 0x1c(%ebx),%esi 10b1bb: 8b 7d c4 mov -0x3c(%ebp),%edi 10b1be: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b1c0: eb 10 jmp 10b1d2 <_Objects_Extend_information+0x152> <== ALWAYS TAKEN /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b1c2: 8b 7d c4 mov -0x3c(%ebp),%edi 10b1c5: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b1cc: 41 inc %ecx 10b1cd: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b1d0: 72 f0 jb 10b1c2 <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b1d2: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b1d9: 8b 4d c0 mov -0x40(%ebp),%ecx 10b1dc: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b1e3: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b1e7: 8b 75 d4 mov -0x2c(%ebp),%esi 10b1ea: 01 d6 add %edx,%esi 10b1ec: 8b 7d d4 mov -0x2c(%ebp),%edi 10b1ef: 8b 55 c4 mov -0x3c(%ebp),%edx 10b1f2: 8d 0c ba lea (%edx,%edi,4),%ecx 10b1f5: 89 fa mov %edi,%edx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b1f7: eb 0a jmp 10b203 <_Objects_Extend_information+0x183> <== ALWAYS TAKEN index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b1f9: c7 01 00 00 00 00 movl $0x0,(%ecx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10b1ff: 42 inc %edx 10b200: 83 c1 04 add $0x4,%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b203: 39 f2 cmp %esi,%edx 10b205: 72 f2 jb 10b1f9 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b207: 9c pushf 10b208: fa cli 10b209: 5e pop %esi old_tables = information->object_blocks; 10b20a: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b20d: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b210: 8b 4d c0 mov -0x40(%ebp),%ecx 10b213: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b216: 8b 7d c4 mov -0x3c(%ebp),%edi 10b219: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b21c: 8b 45 b8 mov -0x48(%ebp),%eax 10b21f: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b223: 8b 03 mov (%ebx),%eax 10b225: c1 e0 18 shl $0x18,%eax 10b228: 0d 00 00 01 00 or $0x10000,%eax 10b22d: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b231: c1 e1 1b shl $0x1b,%ecx 10b234: 09 c8 or %ecx,%eax 10b236: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b23a: 09 c8 or %ecx,%eax 10b23c: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b23f: 56 push %esi 10b240: 9d popf if ( old_tables ) 10b241: 85 d2 test %edx,%edx 10b243: 74 0c je 10b251 <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b245: 83 ec 0c sub $0xc,%esp 10b248: 52 push %edx 10b249: e8 8f 19 00 00 call 10cbdd <_Workspace_Free> 10b24e: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b251: 8b 55 cc mov -0x34(%ebp),%edx 10b254: c1 e2 02 shl $0x2,%edx 10b257: 89 55 d0 mov %edx,-0x30(%ebp) 10b25a: 8b 43 34 mov 0x34(%ebx),%eax 10b25d: 8b 75 bc mov -0x44(%ebp),%esi 10b260: 8b 4d cc mov -0x34(%ebp),%ecx 10b263: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b266: ff 73 18 pushl 0x18(%ebx) 10b269: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b26d: 52 push %edx 10b26e: ff 34 88 pushl (%eax,%ecx,4) 10b271: 8d 45 dc lea -0x24(%ebp),%eax 10b274: 50 push %eax 10b275: 89 45 b4 mov %eax,-0x4c(%ebp) 10b278: e8 43 39 00 00 call 10ebc0 <_Chain_Initialize> <== ALWAYS TAKEN information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b27d: 8d 7b 20 lea 0x20(%ebx),%edi 10b280: 8b 75 d4 mov -0x2c(%ebp),%esi 10b283: eb 23 jmp 10b2a8 <_Objects_Extend_information+0x228> <== ALWAYS TAKEN */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b285: 8b 13 mov (%ebx),%edx 10b287: c1 e2 18 shl $0x18,%edx 10b28a: 81 ca 00 00 01 00 or $0x10000,%edx 10b290: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b294: c1 e1 1b shl $0x1b,%ecx 10b297: 09 ca or %ecx,%edx 10b299: 09 f2 or %esi,%edx 10b29b: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b29e: 52 push %edx 10b29f: 52 push %edx 10b2a0: 50 push %eax 10b2a1: 57 push %edi 10b2a2: e8 e9 f4 ff ff call 10a790 <_Chain_Append> <== ALWAYS TAKEN index++; 10b2a7: 46 inc %esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b2a8: 8d 45 dc lea -0x24(%ebp),%eax 10b2ab: 89 04 24 mov %eax,(%esp) 10b2ae: e8 01 f5 ff ff call 10a7b4 <_Chain_Get> <== ALWAYS TAKEN 10b2b3: 83 c4 10 add $0x10,%esp 10b2b6: 85 c0 test %eax,%eax 10b2b8: 75 cb jne 10b285 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b2ba: 8b 43 30 mov 0x30(%ebx),%eax 10b2bd: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b2c1: 8b 4d d0 mov -0x30(%ebp),%ecx 10b2c4: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b2c7: 8b 43 14 mov 0x14(%ebx),%eax 10b2ca: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b2ce: 8d 65 f4 lea -0xc(%ebp),%esp 10b2d1: 5b pop %ebx 10b2d2: 5e pop %esi 10b2d3: 5f pop %edi 10b2d4: c9 leave 10b2d5: c3 ret 0010b2d8 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { 10b2d8: 55 push %ebp 10b2d9: 89 e5 mov %esp,%ebp 10b2db: 57 push %edi 10b2dc: 56 push %esi 10b2dd: 53 push %ebx 10b2de: 83 ec 14 sub $0x14,%esp 10b2e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b2e4: 8b 75 0c mov 0xc(%ebp),%esi uint32_t allocation_size = information->allocation_size; 10b2e7: 8b 7b 14 mov 0x14(%ebx),%edi _Chain_Append( &information->Inactive, &the_object->Node ); 10b2ea: 56 push %esi 10b2eb: 8d 43 20 lea 0x20(%ebx),%eax 10b2ee: 50 push %eax 10b2ef: e8 9c f4 ff ff call 10a790 <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { 10b2f4: 83 c4 10 add $0x10,%esp 10b2f7: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b2fb: 74 42 je 10b33f <_Objects_Free+0x67> void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { uint32_t allocation_size = information->allocation_size; 10b2fd: 0f b7 cf movzwl %di,%ecx _Chain_Append( &information->Inactive, &the_object->Node ); if ( information->auto_extend ) { uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - 10b300: 0f b7 46 08 movzwl 0x8(%esi),%eax 10b304: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b308: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; 10b30a: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b30e: 31 d2 xor %edx,%edx 10b310: f7 f6 div %esi 10b312: c1 e0 02 shl $0x2,%eax 10b315: 03 43 30 add 0x30(%ebx),%eax 10b318: ff 00 incl (%eax) information->inactive++; 10b31a: 8b 43 2c mov 0x2c(%ebx),%eax 10b31d: 40 inc %eax 10b31e: 66 89 43 2c mov %ax,0x2c(%ebx) /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { 10b322: 0f b7 c0 movzwl %ax,%eax 10b325: 89 ca mov %ecx,%edx 10b327: d1 ea shr %edx 10b329: 8d 0c 0a lea (%edx,%ecx,1),%ecx 10b32c: 39 c8 cmp %ecx,%eax 10b32e: 76 0f jbe 10b33f <_Objects_Free+0x67> _Objects_Shrink_information( information ); 10b330: 89 5d 08 mov %ebx,0x8(%ebp) } } } 10b333: 8d 65 f4 lea -0xc(%ebp),%esp 10b336: 5b pop %ebx 10b337: 5e pop %esi 10b338: 5f pop %edi 10b339: c9 leave * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { _Objects_Shrink_information( information ); 10b33a: e9 a5 02 00 00 jmp 10b5e4 <_Objects_Shrink_information> <== ALWAYS TAKEN } } } 10b33f: 8d 65 f4 lea -0xc(%ebp),%esp 10b342: 5b pop %ebx 10b343: 5e pop %esi 10b344: 5f pop %edi 10b345: c9 leave 10b346: c3 ret 0010b400 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10b400: 55 push %ebp 10b401: 89 e5 mov %esp,%ebp 10b403: 56 push %esi 10b404: 53 push %ebx 10b405: 8b 55 08 mov 0x8(%ebp),%edx 10b408: 8b 75 10 mov 0x10(%ebp),%esi * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10b40b: b8 01 00 00 00 mov $0x1,%eax 10b410: 2b 42 08 sub 0x8(%edx),%eax 10b413: 03 45 0c add 0xc(%ebp),%eax /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 10b416: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10b41a: 39 c8 cmp %ecx,%eax 10b41c: 77 2c ja 10b44a <_Objects_Get+0x4a> 10b41e: 8b 0d ec 41 12 00 mov 0x1241ec,%ecx 10b424: 41 inc %ecx 10b425: 89 0d ec 41 12 00 mov %ecx,0x1241ec _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10b42b: 8b 52 1c mov 0x1c(%edx),%edx 10b42e: 8b 1c 82 mov (%edx,%eax,4),%ebx 10b431: 85 db test %ebx,%ebx 10b433: 74 08 je 10b43d <_Objects_Get+0x3d> *location = OBJECTS_LOCAL; 10b435: c7 06 00 00 00 00 movl $0x0,(%esi) return the_object; 10b43b: eb 15 jmp 10b452 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10b43d: e8 af 07 00 00 call 10bbf1 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10b442: c7 06 01 00 00 00 movl $0x1,(%esi) return NULL; 10b448: eb 08 jmp 10b452 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10b44a: c7 06 01 00 00 00 movl $0x1,(%esi) 10b450: 31 db xor %ebx,%ebx _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10b452: 89 d8 mov %ebx,%eax 10b454: 5b pop %ebx 10b455: 5e pop %esi 10b456: c9 leave 10b457: c3 ret 0010b368 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b368: 55 push %ebp 10b369: 89 e5 mov %esp,%ebp 10b36b: 56 push %esi 10b36c: 53 push %ebx 10b36d: 8b 75 08 mov 0x8(%ebp),%esi 10b370: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b373: 85 db test %ebx,%ebx 10b375: 74 2d je 10b3a4 <_Objects_Get_information+0x3c> /* * 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 ); 10b377: 83 ec 0c sub $0xc,%esp 10b37a: 56 push %esi 10b37b: e8 78 3d 00 00 call 10f0f8 <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) 10b380: 83 c4 10 add $0x10,%esp 10b383: 85 c0 test %eax,%eax 10b385: 74 1d je 10b3a4 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b387: 39 c3 cmp %eax,%ebx 10b389: 77 19 ja 10b3a4 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b38b: 8b 04 b5 c0 41 12 00 mov 0x1241c0(,%esi,4),%eax 10b392: 85 c0 test %eax,%eax 10b394: 74 0e je 10b3a4 <_Objects_Get_information+0x3c> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b396: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10b399: 85 c0 test %eax,%eax 10b39b: 74 09 je 10b3a6 <_Objects_Get_information+0x3e> <== ALWAYS TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10b39d: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10b3a2: 75 02 jne 10b3a6 <_Objects_Get_information+0x3e> 10b3a4: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10b3a6: 8d 65 f8 lea -0x8(%ebp),%esp 10b3a9: 5b pop %ebx 10b3aa: 5e pop %esi 10b3ab: c9 leave 10b3ac: c3 ret 0010b348 <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { 10b348: 55 push %ebp 10b349: 89 e5 mov %esp,%ebp 10b34b: 83 ec 10 sub $0x10,%esp 10b34e: 8b 45 08 mov 0x8(%ebp),%eax return _Objects_Get_information( 10b351: 89 c2 mov %eax,%edx 10b353: c1 ea 1b shr $0x1b,%edx 10b356: 52 push %edx 10b357: c1 e8 18 shr $0x18,%eax 10b35a: 83 e0 07 and $0x7,%eax 10b35d: 50 push %eax 10b35e: e8 05 00 00 00 call 10b368 <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } 10b363: c9 leave 10b364: c3 ret 0010b3b0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10b3b0: 55 push %ebp 10b3b1: 89 e5 mov %esp,%ebp 10b3b3: 56 push %esi 10b3b4: 53 push %ebx 10b3b5: 8b 5d 08 mov 0x8(%ebp),%ebx 10b3b8: 8b 55 10 mov 0x10(%ebp),%edx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10b3bb: b8 01 00 00 00 mov $0x1,%eax 10b3c0: 2b 43 08 sub 0x8(%ebx),%eax 10b3c3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10b3c6: 9c pushf 10b3c7: fa cli 10b3c8: 59 pop %ecx if ( information->maximum >= index ) { 10b3c9: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b3cd: 39 c6 cmp %eax,%esi 10b3cf: 72 21 jb 10b3f2 <_Objects_Get_isr_disable+0x42> if ( (the_object = information->local_table[ index ]) != NULL ) { 10b3d1: 8b 5b 1c mov 0x1c(%ebx),%ebx 10b3d4: 8b 04 83 mov (%ebx,%eax,4),%eax 10b3d7: 85 c0 test %eax,%eax 10b3d9: 74 0d je 10b3e8 <_Objects_Get_isr_disable+0x38> *location = OBJECTS_LOCAL; 10b3db: c7 02 00 00 00 00 movl $0x0,(%edx) *level_p = level; 10b3e1: 8b 55 14 mov 0x14(%ebp),%edx 10b3e4: 89 0a mov %ecx,(%edx) return the_object; 10b3e6: eb 14 jmp 10b3fc <_Objects_Get_isr_disable+0x4c> <== ALWAYS TAKEN } _ISR_Enable( level ); 10b3e8: 51 push %ecx 10b3e9: 9d popf *location = OBJECTS_ERROR; 10b3ea: c7 02 01 00 00 00 movl $0x1,(%edx) return NULL; 10b3f0: eb 0a jmp 10b3fc <_Objects_Get_isr_disable+0x4c> <== ALWAYS TAKEN } _ISR_Enable( level ); 10b3f2: 51 push %ecx 10b3f3: 9d popf *location = OBJECTS_ERROR; 10b3f4: c7 02 01 00 00 00 movl $0x1,(%edx) 10b3fa: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10b3fc: 5b pop %ebx 10b3fd: 5e pop %esi 10b3fe: c9 leave 10b3ff: c3 ret 00114cbc <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 114cbc: 55 push %ebp 114cbd: 89 e5 mov %esp,%ebp 114cbf: 57 push %edi 114cc0: 56 push %esi 114cc1: 53 push %ebx 114cc2: 83 ec 3c sub $0x3c,%esp 114cc5: 8b 7d 0c mov 0xc(%ebp),%edi 114cc8: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 114ccb: 85 ff test %edi,%edi 114ccd: 0f 84 ba 00 00 00 je 114d8d <_Objects_Get_name_as_string+0xd1> <== ALWAYS TAKEN return NULL; if ( name == NULL ) 114cd3: 85 db test %ebx,%ebx 114cd5: 0f 84 b4 00 00 00 je 114d8f <_Objects_Get_name_as_string+0xd3> <== ALWAYS TAKEN return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 114cdb: 8b 75 08 mov 0x8(%ebp),%esi 114cde: 85 f6 test %esi,%esi 114ce0: 75 08 jne 114cea <_Objects_Get_name_as_string+0x2e> 114ce2: a1 8c fb 12 00 mov 0x12fb8c,%eax 114ce7: 8b 70 08 mov 0x8(%eax),%esi information = _Objects_Get_information_id( tmpId ); 114cea: 83 ec 0c sub $0xc,%esp 114ced: 56 push %esi 114cee: e8 45 9c ff ff call 10e938 <_Objects_Get_information_id> <== ALWAYS TAKEN 114cf3: 89 c2 mov %eax,%edx if ( !information ) 114cf5: 83 c4 10 add $0x10,%esp 114cf8: 85 c0 test %eax,%eax 114cfa: 0f 84 8d 00 00 00 je 114d8d <_Objects_Get_name_as_string+0xd1> <== ALWAYS TAKEN return NULL; the_object = _Objects_Get( information, tmpId, &location ); 114d00: 50 push %eax 114d01: 8d 45 e4 lea -0x1c(%ebp),%eax 114d04: 50 push %eax 114d05: 56 push %esi 114d06: 52 push %edx 114d07: 89 55 cc mov %edx,-0x34(%ebp) 114d0a: e8 e1 9c ff ff call 10e9f0 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { 114d0f: 83 c4 10 add $0x10,%esp 114d12: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 114d16: 8b 55 cc mov -0x34(%ebp),%edx 114d19: 75 72 jne 114d8d <_Objects_Get_name_as_string+0xd1> <== ALWAYS TAKEN return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 114d1b: 80 7a 38 00 cmpb $0x0,0x38(%edx) 114d1f: 74 0b je 114d2c <_Objects_Get_name_as_string+0x70> s = the_object->name.name_p; 114d21: 8b 70 0c mov 0xc(%eax),%esi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 114d24: 89 d8 mov %ebx,%eax 114d26: 85 f6 test %esi,%esi 114d28: 75 27 jne 114d51 <_Objects_Get_name_as_string+0x95> 114d2a: eb 57 jmp 114d83 <_Objects_Get_name_as_string+0xc7> <== ALWAYS TAKEN if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 114d2c: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 114d2f: 89 c2 mov %eax,%edx 114d31: c1 ea 18 shr $0x18,%edx 114d34: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 114d37: 89 c2 mov %eax,%edx 114d39: c1 ea 10 shr $0x10,%edx 114d3c: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 114d3f: 89 c2 mov %eax,%edx 114d41: c1 ea 08 shr $0x8,%edx 114d44: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 114d47: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 114d4a: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 114d4e: 8d 75 df lea -0x21(%ebp),%esi 114d51: 89 d8 mov %ebx,%eax 114d53: 31 d2 xor %edx,%edx s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 114d55: 4f dec %edi 114d56: 89 7d d0 mov %edi,-0x30(%ebp) 114d59: 89 75 c4 mov %esi,-0x3c(%ebp) 114d5c: eb 16 jmp 114d74 <_Objects_Get_name_as_string+0xb8> <== ALWAYS TAKEN *d = (isprint((unsigned char)*s)) ? *s : '*'; 114d5e: 0f b6 f1 movzbl %cl,%esi 114d61: 8b 3d e8 d1 12 00 mov 0x12d1e8,%edi 114d67: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 114d6c: 75 02 jne 114d70 <_Objects_Get_name_as_string+0xb4> 114d6e: b1 2a mov $0x2a,%cl 114d70: 88 08 mov %cl,(%eax) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 114d72: 42 inc %edx 114d73: 40 inc %eax 114d74: 3b 55 d0 cmp -0x30(%ebp),%edx 114d77: 73 0a jae 114d83 <_Objects_Get_name_as_string+0xc7> 114d79: 8b 75 c4 mov -0x3c(%ebp),%esi 114d7c: 8a 0c 16 mov (%esi,%edx,1),%cl 114d7f: 84 c9 test %cl,%cl 114d81: 75 db jne 114d5e <_Objects_Get_name_as_string+0xa2> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 114d83: c6 00 00 movb $0x0,(%eax) _Thread_Enable_dispatch(); 114d86: e8 ca a4 ff ff call 10f255 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return name; 114d8b: eb 02 jmp 114d8f <_Objects_Get_name_as_string+0xd3> <== ALWAYS TAKEN 114d8d: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 114d8f: 89 d8 mov %ebx,%eax 114d91: 8d 65 f4 lea -0xc(%ebp),%esp 114d94: 5b pop %ebx 114d95: 5e pop %esi 114d96: 5f pop %edi 114d97: c9 leave 114d98: c3 ret 001173c8 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 1173c8: 55 push %ebp 1173c9: 89 e5 mov %esp,%ebp 1173cb: 57 push %edi 1173cc: 56 push %esi 1173cd: 53 push %ebx 1173ce: 83 ec 1c sub $0x1c,%esp 1173d1: 8b 7d 08 mov 0x8(%ebp),%edi 1173d4: 8b 75 10 mov 0x10(%ebp),%esi 1173d7: 8b 55 14 mov 0x14(%ebp),%edx Objects_Control *object; Objects_Id next_id; if ( !information ) 1173da: 85 ff test %edi,%edi 1173dc: 74 43 je 117421 <_Objects_Get_next+0x59> return NULL; if ( !location_p ) 1173de: 85 f6 test %esi,%esi 1173e0: 74 3f je 117421 <_Objects_Get_next+0x59> return NULL; if ( !next_id_p ) 1173e2: 85 d2 test %edx,%edx 1173e4: 74 3b je 117421 <_Objects_Get_next+0x59> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 1173e6: 8b 5d 0c mov 0xc(%ebp),%ebx 1173e9: 66 85 db test %bx,%bx 1173ec: 75 03 jne 1173f1 <_Objects_Get_next+0x29> next_id = information->minimum_id; 1173ee: 8b 5f 08 mov 0x8(%edi),%ebx else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 1173f1: 66 39 5f 10 cmp %bx,0x10(%edi) 1173f5: 73 0e jae 117405 <_Objects_Get_next+0x3d> { *location_p = OBJECTS_ERROR; 1173f7: c7 06 01 00 00 00 movl $0x1,(%esi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 1173fd: c7 02 ff ff ff ff movl $0xffffffff,(%edx) 117403: eb 1c jmp 117421 <_Objects_Get_next+0x59> <== ALWAYS TAKEN *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 117405: 50 push %eax 117406: 56 push %esi 117407: 53 push %ebx 117408: 57 push %edi 117409: 89 55 e4 mov %edx,-0x1c(%ebp) 11740c: e8 df 75 ff ff call 10e9f0 <_Objects_Get> <== ALWAYS TAKEN next_id++; 117411: 43 inc %ebx } while (*location_p != OBJECTS_LOCAL); 117412: 83 c4 10 add $0x10,%esp 117415: 83 3e 00 cmpl $0x0,(%esi) 117418: 8b 55 e4 mov -0x1c(%ebp),%edx 11741b: 75 d4 jne 1173f1 <_Objects_Get_next+0x29> *next_id_p = next_id; 11741d: 89 1a mov %ebx,(%edx) return object; 11741f: eb 02 jmp 117423 <_Objects_Get_next+0x5b> <== ALWAYS TAKEN final: *next_id_p = OBJECTS_ID_FINAL; return 0; 117421: 31 c0 xor %eax,%eax } 117423: 8d 65 f4 lea -0xc(%ebp),%esp 117426: 5b pop %ebx 117427: 5e pop %esi 117428: 5f pop %edi 117429: c9 leave 11742a: c3 ret 00118354 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118354: 55 push %ebp 118355: 89 e5 mov %esp,%ebp 118357: 53 push %ebx 118358: 8b 55 08 mov 0x8(%ebp),%edx 11835b: 8b 4d 10 mov 0x10(%ebp),%ecx /* * 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; 11835e: b8 01 00 00 00 mov $0x1,%eax 118363: 2b 42 08 sub 0x8(%edx),%eax 118366: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118369: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 11836d: 39 c3 cmp %eax,%ebx 11836f: 72 12 jb 118383 <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118371: 8b 52 1c mov 0x1c(%edx),%edx 118374: 8b 04 82 mov (%edx,%eax,4),%eax 118377: 85 c0 test %eax,%eax 118379: 74 08 je 118383 <_Objects_Get_no_protection+0x2f> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 11837b: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118381: eb 08 jmp 11838b <_Objects_Get_no_protection+0x37> <== ALWAYS TAKEN /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 118383: c7 01 01 00 00 00 movl $0x1,(%ecx) 118389: 31 c0 xor %eax,%eax return NULL; } 11838b: 5b pop %ebx 11838c: c9 leave 11838d: c3 ret 0010ea48 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10ea48: 55 push %ebp 10ea49: 89 e5 mov %esp,%ebp 10ea4b: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ea4e: 8b 45 08 mov 0x8(%ebp),%eax 10ea51: 85 c0 test %eax,%eax 10ea53: 75 08 jne 10ea5d <_Objects_Id_to_name+0x15> 10ea55: a1 8c fb 12 00 mov 0x12fb8c,%eax 10ea5a: 8b 40 08 mov 0x8(%eax),%eax */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10ea5d: 89 c2 mov %eax,%edx 10ea5f: c1 ea 18 shr $0x18,%edx 10ea62: 83 e2 07 and $0x7,%edx */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10ea65: 8d 4a ff lea -0x1(%edx),%ecx 10ea68: 83 f9 03 cmp $0x3,%ecx 10ea6b: 77 38 ja 10eaa5 <_Objects_Id_to_name+0x5d> 10ea6d: eb 3d jmp 10eaac <_Objects_Id_to_name+0x64> <== ALWAYS TAKEN if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10ea6f: 89 c1 mov %eax,%ecx 10ea71: c1 e9 1b shr $0x1b,%ecx 10ea74: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10ea77: 85 d2 test %edx,%edx 10ea79: 74 2a je 10eaa5 <_Objects_Id_to_name+0x5d> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10ea7b: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10ea7f: 75 24 jne 10eaa5 <_Objects_Id_to_name+0x5d> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10ea81: 51 push %ecx 10ea82: 8d 4d f4 lea -0xc(%ebp),%ecx 10ea85: 51 push %ecx 10ea86: 50 push %eax 10ea87: 52 push %edx 10ea88: e8 63 ff ff ff call 10e9f0 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) 10ea8d: 83 c4 10 add $0x10,%esp 10ea90: 85 c0 test %eax,%eax 10ea92: 74 11 je 10eaa5 <_Objects_Id_to_name+0x5d> return OBJECTS_INVALID_ID; *name = the_object->name; 10ea94: 8b 50 0c mov 0xc(%eax),%edx 10ea97: 8b 45 0c mov 0xc(%ebp),%eax 10ea9a: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10ea9c: e8 b4 07 00 00 call 10f255 <_Thread_Enable_dispatch> <== ALWAYS TAKEN 10eaa1: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10eaa3: eb 05 jmp 10eaaa <_Objects_Id_to_name+0x62> <== ALWAYS TAKEN 10eaa5: b8 03 00 00 00 mov $0x3,%eax } 10eaaa: c9 leave 10eaab: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10eaac: 8b 14 95 a4 fa 12 00 mov 0x12faa4(,%edx,4),%edx 10eab3: 85 d2 test %edx,%edx 10eab5: 75 b8 jne 10ea6f <_Objects_Id_to_name+0x27> 10eab7: eb ec jmp 10eaa5 <_Objects_Id_to_name+0x5d> <== ALWAYS TAKEN 0010b458 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10b458: 55 push %ebp 10b459: 89 e5 mov %esp,%ebp 10b45b: 57 push %edi 10b45c: 56 push %esi 10b45d: 53 push %ebx 10b45e: 83 ec 1c sub $0x1c,%esp 10b461: 8b 45 08 mov 0x8(%ebp),%eax 10b464: 8b 55 0c mov 0xc(%ebp),%edx 10b467: 8b 75 10 mov 0x10(%ebp),%esi 10b46a: 8b 5d 14 mov 0x14(%ebp),%ebx 10b46d: 8b 4d 20 mov 0x20(%ebp),%ecx 10b470: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b473: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10b477: 89 10 mov %edx,(%eax) information->the_class = the_class; 10b479: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10b47d: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10b480: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10b487: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10b48e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10b495: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10b49b: 8b 7d 1c mov 0x1c(%ebp),%edi 10b49e: 89 f9 mov %edi,%ecx 10b4a0: 88 48 38 mov %cl,0x38(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10b4a3: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10b4a9: 8b 3c 95 c0 41 12 00 mov 0x1241c0(,%edx,4),%edi 10b4b0: 89 04 b7 mov %eax,(%edi,%esi,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10b4b3: 89 df mov %ebx,%edi 10b4b5: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10b4b8: 89 f9 mov %edi,%ecx 10b4ba: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10b4bd: 89 d9 mov %ebx,%ecx 10b4bf: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10b4c5: 85 ff test %edi,%edi 10b4c7: 74 10 je 10b4d9 <_Objects_Initialize_information+0x81> 10b4c9: 85 c9 test %ecx,%ecx 10b4cb: 75 0c jne 10b4d9 <_Objects_Initialize_information+0x81> _Internal_error_Occurred( 10b4cd: 50 push %eax 10b4ce: 6a 14 push $0x14 10b4d0: 6a 01 push $0x1 10b4d2: 6a 00 push $0x0 10b4d4: e8 7b fa ff ff call 10af54 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10b4d9: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10b4dd: c7 40 1c 8c 3e 12 00 movl $0x123e8c,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10b4e4: c1 e2 18 shl $0x18,%edx 10b4e7: 81 ca 00 00 01 00 or $0x10000,%edx 10b4ed: c1 e6 1b shl $0x1b,%esi 10b4f0: 09 f2 or %esi,%edx 10b4f2: 85 c9 test %ecx,%ecx 10b4f4: 0f 95 c3 setne %bl 10b4f7: 89 de mov %ebx,%esi 10b4f9: 81 e6 ff 00 00 00 and $0xff,%esi 10b4ff: 09 f2 or %esi,%edx 10b501: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10b504: 8b 55 e4 mov -0x1c(%ebp),%edx 10b507: f6 c2 03 test $0x3,%dl 10b50a: 74 06 je 10b512 <_Objects_Initialize_information+0xba> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10b50c: 83 c2 04 add $0x4,%edx 10b50f: 83 e2 fc and $0xfffffffc,%edx ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10b512: 66 89 50 3a mov %dx,0x3a(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10b516: 8d 50 24 lea 0x24(%eax),%edx 10b519: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10b51c: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10b523: 8d 50 20 lea 0x20(%eax),%edx 10b526: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10b529: 85 c9 test %ecx,%ecx 10b52b: 74 0f je 10b53c <_Objects_Initialize_information+0xe4> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10b52d: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b530: 8d 65 f4 lea -0xc(%ebp),%esp 10b533: 5b pop %ebx 10b534: 5e pop %esi 10b535: 5f pop %edi 10b536: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10b537: e9 44 fb ff ff jmp 10b080 <_Objects_Extend_information> <== ALWAYS TAKEN _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b53c: 8d 65 f4 lea -0xc(%ebp),%esp 10b53f: 5b pop %ebx 10b540: 5e pop %esi 10b541: 5f pop %edi 10b542: c9 leave 10b543: c3 ret 00114a2c <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 114a2c: 55 push %ebp 114a2d: 89 e5 mov %esp,%ebp 114a2f: 57 push %edi 114a30: 56 push %esi 114a31: 53 push %ebx 114a32: 83 ec 1c sub $0x1c,%esp 114a35: 8b 7d 08 mov 0x8(%ebp),%edi 114a38: 8b 55 0c mov 0xc(%ebp),%edx uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 114a3b: b8 02 00 00 00 mov $0x2,%eax 114a40: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 114a44: 74 5b je 114aa1 <_Objects_Name_to_id_string+0x75> return OBJECTS_INVALID_ADDRESS; if ( !name ) 114a46: 85 d2 test %edx,%edx 114a48: 74 52 je 114a9c <_Objects_Name_to_id_string+0x70> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 114a4a: 8b 47 10 mov 0x10(%edi),%eax 114a4d: 66 85 c0 test %ax,%ax 114a50: 74 4a je 114a9c <_Objects_Name_to_id_string+0x70> 114a52: bb 01 00 00 00 mov $0x1,%ebx name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 114a57: 0f b7 c0 movzwl %ax,%eax 114a5a: 89 45 e4 mov %eax,-0x1c(%ebp) 114a5d: eb 38 jmp 114a97 <_Objects_Name_to_id_string+0x6b> <== ALWAYS TAKEN the_object = information->local_table[ index ]; 114a5f: 8b 47 1c mov 0x1c(%edi),%eax 114a62: 8b 34 98 mov (%eax,%ebx,4),%esi if ( !the_object ) 114a65: 85 f6 test %esi,%esi 114a67: 74 2d je 114a96 <_Objects_Name_to_id_string+0x6a> continue; if ( !the_object->name.name_p ) 114a69: 8b 46 0c mov 0xc(%esi),%eax 114a6c: 85 c0 test %eax,%eax 114a6e: 74 26 je 114a96 <_Objects_Name_to_id_string+0x6a> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 114a70: 51 push %ecx 114a71: 0f b7 4f 3a movzwl 0x3a(%edi),%ecx 114a75: 51 push %ecx 114a76: 50 push %eax 114a77: 52 push %edx 114a78: 89 55 e0 mov %edx,-0x20(%ebp) 114a7b: e8 48 35 00 00 call 117fc8 114a80: 83 c4 10 add $0x10,%esp 114a83: 85 c0 test %eax,%eax 114a85: 8b 55 e0 mov -0x20(%ebp),%edx 114a88: 75 0c jne 114a96 <_Objects_Name_to_id_string+0x6a> *id = the_object->id; 114a8a: 8b 46 08 mov 0x8(%esi),%eax 114a8d: 8b 55 10 mov 0x10(%ebp),%edx 114a90: 89 02 mov %eax,(%edx) 114a92: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 114a94: eb 0b jmp 114aa1 <_Objects_Name_to_id_string+0x75> <== ALWAYS TAKEN return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 114a96: 43 inc %ebx 114a97: 3b 5d e4 cmp -0x1c(%ebp),%ebx 114a9a: 76 c3 jbe 114a5f <_Objects_Name_to_id_string+0x33> 114a9c: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 114aa1: 8d 65 f4 lea -0xc(%ebp),%esp 114aa4: 5b pop %ebx 114aa5: 5e pop %esi 114aa6: 5f pop %edi 114aa7: c9 leave 114aa8: c3 ret 0010b578 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10b578: 55 push %ebp 10b579: 89 e5 mov %esp,%ebp 10b57b: 57 push %edi 10b57c: 56 push %esi 10b57d: 53 push %ebx 10b57e: 8b 4d 08 mov 0x8(%ebp),%ecx 10b581: 8b 5d 0c mov 0xc(%ebp),%ebx 10b584: 8b 55 10 mov 0x10(%ebp),%edx 10b587: 8b 75 14 mov 0x14(%ebp),%esi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10b58a: b8 02 00 00 00 mov $0x2,%eax 10b58f: 85 f6 test %esi,%esi 10b591: 74 49 je 10b5dc <_Objects_Name_to_id_u32+0x64> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10b593: 85 db test %ebx,%ebx 10b595: 74 40 je 10b5d7 <_Objects_Name_to_id_u32+0x5f> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10b597: 8b 79 10 mov 0x10(%ecx),%edi 10b59a: 66 85 ff test %di,%di 10b59d: 74 38 je 10b5d7 <_Objects_Name_to_id_u32+0x5f> 10b59f: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10b5a5: 74 24 je 10b5cb <_Objects_Name_to_id_u32+0x53> 10b5a7: 85 d2 test %edx,%edx 10b5a9: 74 20 je 10b5cb <_Objects_Name_to_id_u32+0x53> 10b5ab: 4a dec %edx 10b5ac: 75 29 jne 10b5d7 <_Objects_Name_to_id_u32+0x5f> 10b5ae: eb 1b jmp 10b5cb <_Objects_Name_to_id_u32+0x53> <== ALWAYS TAKEN if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 10b5b0: 8b 51 1c mov 0x1c(%ecx),%edx 10b5b3: 8b 14 82 mov (%edx,%eax,4),%edx if ( !the_object ) 10b5b6: 85 d2 test %edx,%edx 10b5b8: 74 0e je 10b5c8 <_Objects_Name_to_id_u32+0x50> continue; if ( name == the_object->name.name_u32 ) { 10b5ba: 3b 5a 0c cmp 0xc(%edx),%ebx 10b5bd: 75 09 jne 10b5c8 <_Objects_Name_to_id_u32+0x50> *id = the_object->id; 10b5bf: 8b 42 08 mov 0x8(%edx),%eax 10b5c2: 89 06 mov %eax,(%esi) 10b5c4: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10b5c6: eb 14 jmp 10b5dc <_Objects_Name_to_id_u32+0x64> <== ALWAYS TAKEN search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10b5c8: 40 inc %eax 10b5c9: eb 08 jmp 10b5d3 <_Objects_Name_to_id_u32+0x5b> <== ALWAYS TAKEN 10b5cb: b8 01 00 00 00 mov $0x1,%eax 10b5d0: 0f b7 ff movzwl %di,%edi 10b5d3: 39 f8 cmp %edi,%eax 10b5d5: 76 d9 jbe 10b5b0 <_Objects_Name_to_id_u32+0x38> 10b5d7: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10b5dc: 5b pop %ebx 10b5dd: 5e pop %esi 10b5de: 5f pop %edi 10b5df: c9 leave 10b5e0: c3 ret 0010bbc8 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10bbc8: 55 push %ebp 10bbc9: 89 e5 mov %esp,%ebp 10bbcb: 57 push %edi 10bbcc: 56 push %esi 10bbcd: 53 push %ebx 10bbce: 83 ec 34 sub $0x34,%esp 10bbd1: 8b 55 08 mov 0x8(%ebp),%edx 10bbd4: 8b 7d 0c mov 0xc(%ebp),%edi 10bbd7: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10bbda: 0f b7 42 3a movzwl 0x3a(%edx),%eax 10bbde: 50 push %eax 10bbdf: 53 push %ebx 10bbe0: 89 55 d4 mov %edx,-0x2c(%ebp) 10bbe3: e8 48 73 00 00 call 112f30 10bbe8: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10bbea: 83 c4 10 add $0x10,%esp 10bbed: 8b 55 d4 mov -0x2c(%ebp),%edx 10bbf0: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10bbf4: 74 54 je 10bc4a <_Objects_Set_name+0x82> char *d; d = _Workspace_Allocate( length + 1 ); 10bbf6: 83 ec 0c sub $0xc,%esp 10bbf9: 8d 40 01 lea 0x1(%eax),%eax 10bbfc: 50 push %eax 10bbfd: e8 7e 16 00 00 call 10d280 <_Workspace_Allocate> 10bc02: 89 c2 mov %eax,%edx if ( !d ) 10bc04: 83 c4 10 add $0x10,%esp 10bc07: 31 c0 xor %eax,%eax 10bc09: 85 d2 test %edx,%edx 10bc0b: 74 79 je 10bc86 <_Objects_Set_name+0xbe> <== ALWAYS TAKEN return false; if ( the_object->name.name_p ) { 10bc0d: 8b 47 0c mov 0xc(%edi),%eax 10bc10: 85 c0 test %eax,%eax 10bc12: 74 19 je 10bc2d <_Objects_Set_name+0x65> _Workspace_Free( (void *)the_object->name.name_p ); 10bc14: 83 ec 0c sub $0xc,%esp 10bc17: 50 push %eax 10bc18: 89 55 d4 mov %edx,-0x2c(%ebp) 10bc1b: e8 79 16 00 00 call 10d299 <_Workspace_Free> the_object->name.name_p = NULL; 10bc20: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) 10bc27: 83 c4 10 add $0x10,%esp 10bc2a: 8b 55 d4 mov -0x2c(%ebp),%edx } strncpy( d, name, length ); 10bc2d: 50 push %eax 10bc2e: 56 push %esi 10bc2f: 53 push %ebx 10bc30: 52 push %edx 10bc31: 89 55 d4 mov %edx,-0x2c(%ebp) 10bc34: e8 7b 72 00 00 call 112eb4 d[length] = '\0'; 10bc39: 8b 55 d4 mov -0x2c(%ebp),%edx 10bc3c: c6 04 32 00 movb $0x0,(%edx,%esi,1) the_object->name.name_p = d; 10bc40: 89 57 0c mov %edx,0xc(%edi) 10bc43: b0 01 mov $0x1,%al 10bc45: 83 c4 10 add $0x10,%esp 10bc48: eb 3c jmp 10bc86 <_Objects_Set_name+0xbe> <== ALWAYS TAKEN } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10bc4a: 8a 03 mov (%ebx),%al 10bc4c: 88 45 d8 mov %al,-0x28(%ebp) 10bc4f: 83 fe 01 cmp $0x1,%esi 10bc52: 76 3a jbe 10bc8e <_Objects_Set_name+0xc6> 10bc54: 0f be 53 01 movsbl 0x1(%ebx),%edx 10bc58: c1 e2 10 shl $0x10,%edx 10bc5b: 83 fe 02 cmp $0x2,%esi 10bc5e: 76 33 jbe 10bc93 <_Objects_Set_name+0xcb> 10bc60: 0f be 43 02 movsbl 0x2(%ebx),%eax 10bc64: c1 e0 08 shl $0x8,%eax 10bc67: b9 20 00 00 00 mov $0x20,%ecx 10bc6c: 83 fe 03 cmp $0x3,%esi 10bc6f: 76 04 jbe 10bc75 <_Objects_Set_name+0xad> 10bc71: 0f be 4b 03 movsbl 0x3(%ebx),%ecx 10bc75: 8a 5d d8 mov -0x28(%ebp),%bl 10bc78: c1 e3 18 shl $0x18,%ebx 10bc7b: 09 d3 or %edx,%ebx 10bc7d: 09 c3 or %eax,%ebx 10bc7f: 09 cb or %ecx,%ebx 10bc81: 89 5f 0c mov %ebx,0xc(%edi) 10bc84: b0 01 mov $0x1,%al ); } return true; } 10bc86: 8d 65 f4 lea -0xc(%ebp),%esp 10bc89: 5b pop %ebx 10bc8a: 5e pop %esi 10bc8b: 5f pop %edi 10bc8c: c9 leave 10bc8d: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10bc8e: ba 00 00 20 00 mov $0x200000,%edx 10bc93: b8 00 20 00 00 mov $0x2000,%eax 10bc98: b9 20 00 00 00 mov $0x20,%ecx 10bc9d: eb d6 jmp 10bc75 <_Objects_Set_name+0xad> <== ALWAYS TAKEN 0010b5e4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10b5e4: 55 push %ebp 10b5e5: 89 e5 mov %esp,%ebp 10b5e7: 57 push %edi 10b5e8: 56 push %esi 10b5e9: 53 push %ebx 10b5ea: 83 ec 1c sub $0x1c,%esp 10b5ed: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10b5f0: 0f b7 73 08 movzwl 0x8(%ebx),%esi block_count = (information->maximum - index_base) / 10b5f4: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b5f8: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b5fc: 29 f0 sub %esi,%eax 10b5fe: 31 d2 xor %edx,%edx 10b600: f7 f1 div %ecx 10b602: 89 45 e4 mov %eax,-0x1c(%ebp) 10b605: 31 c0 xor %eax,%eax information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10b607: eb 77 jmp 10b680 <_Objects_Shrink_information+0x9c> <== ALWAYS TAKEN 10b609: 8d 3c 85 00 00 00 00 lea 0x0(,%eax,4),%edi if ( information->inactive_per_block[ block ] == 10b610: 8b 53 30 mov 0x30(%ebx),%edx 10b613: 39 0c 82 cmp %ecx,(%edx,%eax,4) 10b616: 75 65 jne 10b67d <_Objects_Shrink_information+0x99> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10b618: 8b 43 20 mov 0x20(%ebx),%eax do { index = _Objects_Get_index( the_object->id ); 10b61b: 0f b7 50 08 movzwl 0x8(%eax),%edx 10b61f: 89 55 e4 mov %edx,-0x1c(%ebp) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10b622: 8b 10 mov (%eax),%edx if ((index >= index_base) && 10b624: 39 75 e4 cmp %esi,-0x1c(%ebp) 10b627: 72 1e jb 10b647 <_Objects_Shrink_information+0x63> (index < (index_base + information->allocation_size))) { 10b629: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b62d: 8d 0c 0e lea (%esi,%ecx,1),%ecx 10b630: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10b633: 73 12 jae 10b647 <_Objects_Shrink_information+0x63> _Chain_Extract( &extract_me->Node ); 10b635: 83 ec 0c sub $0xc,%esp 10b638: 50 push %eax 10b639: 89 55 e0 mov %edx,-0x20(%ebp) 10b63c: e8 67 35 00 00 call 10eba8 <_Chain_Extract> 10b641: 83 c4 10 add $0x10,%esp 10b644: 8b 55 e0 mov -0x20(%ebp),%edx } } while ( the_object ); 10b647: 85 d2 test %edx,%edx 10b649: 74 04 je 10b64f <_Objects_Shrink_information+0x6b> 10b64b: 89 d0 mov %edx,%eax 10b64d: eb cc jmp 10b61b <_Objects_Shrink_information+0x37> <== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10b64f: 83 ec 0c sub $0xc,%esp 10b652: 8b 43 34 mov 0x34(%ebx),%eax 10b655: ff 34 38 pushl (%eax,%edi,1) 10b658: e8 80 15 00 00 call 10cbdd <_Workspace_Free> information->object_blocks[ block ] = NULL; 10b65d: 8b 43 34 mov 0x34(%ebx),%eax 10b660: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10b667: 8b 43 30 mov 0x30(%ebx),%eax 10b66a: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10b671: 8b 43 14 mov 0x14(%ebx),%eax 10b674: 66 29 43 2c sub %ax,0x2c(%ebx) return; 10b678: 83 c4 10 add $0x10,%esp 10b67b: eb 08 jmp 10b685 <_Objects_Shrink_information+0xa1> <== ALWAYS TAKEN } index_base += information->allocation_size; 10b67d: 01 ce add %ecx,%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10b67f: 40 inc %eax 10b680: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b683: 72 84 jb 10b609 <_Objects_Shrink_information+0x25> return; } index_base += information->allocation_size; } } 10b685: 8d 65 f4 lea -0xc(%ebp),%esp 10b688: 5b pop %ebx 10b689: 5e pop %esi 10b68a: 5f pop %edi 10b68b: c9 leave 10b68c: c3 ret 0010a5a8 <_POSIX_API_Initialize>: */ Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ]; void _POSIX_API_Initialize(void) { 10a5a8: 55 push %ebp 10a5a9: 89 e5 mov %esp,%ebp 10a5ab: 83 ec 08 sub $0x8,%esp /* * Install our API Object Management Table and initialize the * various managers. */ _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 10a5ae: c7 05 cc 41 12 00 ac movl $0x1246ac,0x1241cc 10a5b5: 46 12 00 _POSIX_signals_Manager_Initialization(); 10a5b8: e8 83 3b 00 00 call 10e140 <_POSIX_signals_Manager_Initialization> _POSIX_Threads_Manager_initialization(); 10a5bd: e8 3e 3d 00 00 call 10e300 <_POSIX_Threads_Manager_initialization> <== ALWAYS TAKEN _POSIX_Condition_variables_Manager_initialization(); 10a5c2: e8 25 3a 00 00 call 10dfec <_POSIX_Condition_variables_Manager_initialization> _POSIX_Key_Manager_initialization(); 10a5c7: e8 48 3a 00 00 call 10e014 <_POSIX_Key_Manager_initialization> _POSIX_Mutex_Manager_initialization(); 10a5cc: e8 b7 3a 00 00 call 10e088 <_POSIX_Mutex_Manager_initialization> _POSIX_Message_queue_Manager_initialization(); 10a5d1: e8 66 3a 00 00 call 10e03c <_POSIX_Message_queue_Manager_initialization> _POSIX_Semaphore_Manager_initialization(); 10a5d6: e8 19 40 00 00 call 10e5f4 <_POSIX_Semaphore_Manager_initialization> _POSIX_Timer_Manager_initialization(); 10a5db: e8 ec 3f 00 00 call 10e5cc <_POSIX_Timer_Manager_initialization> _POSIX_Barrier_Manager_initialization(); 10a5e0: e8 0b 3b 00 00 call 10e0f0 <_POSIX_Barrier_Manager_initialization> _POSIX_RWLock_Manager_initialization(); 10a5e5: e8 2e 3b 00 00 call 10e118 <_POSIX_RWLock_Manager_initialization> _POSIX_Spinlock_Manager_initialization(); } 10a5ea: c9 leave _POSIX_Message_queue_Manager_initialization(); _POSIX_Semaphore_Manager_initialization(); _POSIX_Timer_Manager_initialization(); _POSIX_Barrier_Manager_initialization(); _POSIX_RWLock_Manager_initialization(); _POSIX_Spinlock_Manager_initialization(); 10a5eb: e9 d4 3c 00 00 jmp 10e2c4 <_POSIX_Spinlock_Manager_initialization> 0010a9a8 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10a9a8: 55 push %ebp 10a9a9: 89 e5 mov %esp,%ebp 10a9ab: 56 push %esi 10a9ac: 53 push %ebx 10a9ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10a9b0: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10a9b3: 85 db test %ebx,%ebx 10a9b5: 74 16 je 10a9cd <_POSIX_Condition_variables_Get+0x25> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10a9b7: 83 3b ff cmpl $0xffffffff,(%ebx) 10a9ba: 75 1b jne 10a9d7 <_POSIX_Condition_variables_Get+0x2f> /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 10a9bc: 52 push %edx 10a9bd: 52 push %edx 10a9be: 6a 00 push $0x0 10a9c0: 53 push %ebx 10a9c1: e8 2a 00 00 00 call 10a9f0 <== ALWAYS TAKEN if ( status ) { 10a9c6: 83 c4 10 add $0x10,%esp 10a9c9: 85 c0 test %eax,%eax 10a9cb: 74 0a je 10a9d7 <_POSIX_Condition_variables_Get+0x2f> *location = OBJECTS_ERROR; 10a9cd: c7 06 01 00 00 00 movl $0x1,(%esi) 10a9d3: 31 c0 xor %eax,%eax return (POSIX_Condition_variables_Control *) 0; 10a9d5: eb 11 jmp 10a9e8 <_POSIX_Condition_variables_Get+0x40> <== ALWAYS TAKEN } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10a9d7: 50 push %eax 10a9d8: 56 push %esi 10a9d9: ff 33 pushl (%ebx) 10a9db: 68 ac 76 12 00 push $0x1276ac 10a9e0: e8 c7 26 00 00 call 10d0ac <_Objects_Get> 10a9e5: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10a9e8: 8d 65 f8 lea -0x8(%ebp),%esp 10a9eb: 5b pop %ebx 10a9ec: 5e pop %esi 10a9ed: c9 leave 10a9ee: c3 ret 0010aaa4 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10aaa4: 55 push %ebp 10aaa5: 89 e5 mov %esp,%ebp 10aaa7: 56 push %esi 10aaa8: 53 push %ebx 10aaa9: 83 ec 28 sub $0x28,%esp 10aaac: 8a 45 0c mov 0xc(%ebp),%al 10aaaf: 88 45 e7 mov %al,-0x19(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10aab2: 8d 45 f4 lea -0xc(%ebp),%eax 10aab5: 50 push %eax 10aab6: ff 75 08 pushl 0x8(%ebp) 10aab9: e8 ea fe ff ff call 10a9a8 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10aabe: 89 c3 mov %eax,%ebx switch ( location ) { 10aac0: 83 c4 10 add $0x10,%esp 10aac3: b8 16 00 00 00 mov $0x16,%eax 10aac8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aacc: 75 2b jne 10aaf9 <_POSIX_Condition_variables_Signal_support+0x55> case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10aace: 8d 73 18 lea 0x18(%ebx),%esi 10aad1: 83 ec 0c sub $0xc,%esp 10aad4: 56 push %esi 10aad5: e8 52 31 00 00 call 10dc2c <_Thread_queue_Dequeue> if ( !the_thread ) 10aada: 83 c4 10 add $0x10,%esp 10aadd: 85 c0 test %eax,%eax 10aadf: 75 07 jne 10aae8 <_POSIX_Condition_variables_Signal_support+0x44> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10aae1: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) } while ( is_broadcast && the_thread ); 10aae8: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10aaec: 74 04 je 10aaf2 <_POSIX_Condition_variables_Signal_support+0x4e> 10aaee: 85 c0 test %eax,%eax 10aaf0: 75 df jne 10aad1 <_POSIX_Condition_variables_Signal_support+0x2d> _Thread_Enable_dispatch(); 10aaf2: e8 a6 2d 00 00 call 10d89d <_Thread_Enable_dispatch> 10aaf7: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10aaf9: 8d 65 f8 lea -0x8(%ebp),%esp 10aafc: 5b pop %ebx 10aafd: 5e pop %esi 10aafe: c9 leave 10aaff: c3 ret 0010ab54 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10ab54: 55 push %ebp 10ab55: 89 e5 mov %esp,%ebp 10ab57: 57 push %edi 10ab58: 56 push %esi 10ab59: 53 push %ebx 10ab5a: 83 ec 34 sub $0x34,%esp 10ab5d: 8b 7d 08 mov 0x8(%ebp),%edi 10ab60: 8b 75 0c mov 0xc(%ebp),%esi 10ab63: 8a 45 14 mov 0x14(%ebp),%al 10ab66: 88 45 d7 mov %al,-0x29(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 10ab69: 8d 5d e4 lea -0x1c(%ebp),%ebx 10ab6c: 53 push %ebx 10ab6d: 56 push %esi 10ab6e: e8 82 01 00 00 call 10acf5 <_POSIX_Mutex_Get> <== ALWAYS TAKEN 10ab73: 83 c4 10 add $0x10,%esp 10ab76: 85 c0 test %eax,%eax 10ab78: 0f 84 ae 00 00 00 je 10ac2c <_POSIX_Condition_variables_Wait_support+0xd8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ab7e: a1 2c 72 12 00 mov 0x12722c,%eax 10ab83: 48 dec %eax 10ab84: a3 2c 72 12 00 mov %eax,0x12722c return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10ab89: 52 push %edx 10ab8a: 52 push %edx 10ab8b: 53 push %ebx 10ab8c: 57 push %edi 10ab8d: e8 16 fe ff ff call 10a9a8 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10ab92: 89 c3 mov %eax,%ebx switch ( location ) { 10ab94: 83 c4 10 add $0x10,%esp 10ab97: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10ab9b: 0f 85 8b 00 00 00 jne 10ac2c <_POSIX_Condition_variables_Wait_support+0xd8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10aba1: 8b 40 14 mov 0x14(%eax),%eax 10aba4: 85 c0 test %eax,%eax 10aba6: 74 0b je 10abb3 <_POSIX_Condition_variables_Wait_support+0x5f> 10aba8: 3b 06 cmp (%esi),%eax 10abaa: 74 07 je 10abb3 <_POSIX_Condition_variables_Wait_support+0x5f> _Thread_Enable_dispatch(); 10abac: e8 ec 2c 00 00 call 10d89d <_Thread_Enable_dispatch> 10abb1: eb 79 jmp 10ac2c <_POSIX_Condition_variables_Wait_support+0xd8> <== ALWAYS TAKEN return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10abb3: 83 ec 0c sub $0xc,%esp 10abb6: 56 push %esi 10abb7: e8 20 03 00 00 call 10aedc <== ALWAYS TAKEN _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10abbc: 83 c4 10 add $0x10,%esp 10abbf: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10abc3: 75 4d jne 10ac12 <_POSIX_Condition_variables_Wait_support+0xbe> the_cond->Mutex = *mutex; 10abc5: 8b 06 mov (%esi),%eax 10abc7: 89 43 14 mov %eax,0x14(%ebx) 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; 10abca: c7 43 48 01 00 00 00 movl $0x1,0x48(%ebx) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10abd1: a1 e8 72 12 00 mov 0x1272e8,%eax 10abd6: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10abdd: 83 c3 18 add $0x18,%ebx 10abe0: 89 58 44 mov %ebx,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10abe3: 8b 17 mov (%edi),%edx 10abe5: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10abe8: 50 push %eax 10abe9: 68 34 e0 10 00 push $0x10e034 10abee: ff 75 10 pushl 0x10(%ebp) 10abf1: 53 push %ebx 10abf2: e8 39 31 00 00 call 10dd30 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10abf7: e8 a1 2c 00 00 call 10d89d <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10abfc: a1 e8 72 12 00 mov 0x1272e8,%eax 10ac01: 8b 58 34 mov 0x34(%eax),%ebx if ( status && status != ETIMEDOUT ) 10ac04: 83 c4 10 add $0x10,%esp 10ac07: 83 fb 74 cmp $0x74,%ebx 10ac0a: 74 10 je 10ac1c <_POSIX_Condition_variables_Wait_support+0xc8> 10ac0c: 85 db test %ebx,%ebx 10ac0e: 75 21 jne 10ac31 <_POSIX_Condition_variables_Wait_support+0xdd> <== ALWAYS TAKEN 10ac10: eb 0a jmp 10ac1c <_POSIX_Condition_variables_Wait_support+0xc8> <== ALWAYS TAKEN return status; } else { _Thread_Enable_dispatch(); 10ac12: e8 86 2c 00 00 call 10d89d <_Thread_Enable_dispatch> 10ac17: bb 74 00 00 00 mov $0x74,%ebx /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10ac1c: 83 ec 0c sub $0xc,%esp 10ac1f: 56 push %esi 10ac20: e8 37 02 00 00 call 10ae5c <== ALWAYS TAKEN if ( mutex_status ) 10ac25: 83 c4 10 add $0x10,%esp 10ac28: 85 c0 test %eax,%eax 10ac2a: 74 05 je 10ac31 <_POSIX_Condition_variables_Wait_support+0xdd> 10ac2c: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10ac31: 89 d8 mov %ebx,%eax 10ac33: 8d 65 f4 lea -0xc(%ebp),%esp 10ac36: 5b pop %ebx 10ac37: 5e pop %esi 10ac38: 5f pop %edi 10ac39: c9 leave 10ac3a: c3 ret 00110394 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 110394: 55 push %ebp 110395: 89 e5 mov %esp,%ebp 110397: 57 push %edi 110398: 56 push %esi 110399: 53 push %ebx 11039a: 83 ec 3c sub $0x3c,%esp uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 11039d: 8b 45 08 mov 0x8(%ebp),%eax 1103a0: 8b 50 08 mov 0x8(%eax),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 1103a3: 89 d0 mov %edx,%eax 1103a5: c1 e8 18 shr $0x18,%eax 1103a8: 83 e0 07 and $0x7,%eax if ( !the_key ) continue; if ( !the_key->destructor ) continue; value = the_key->Values[ thread_api ][ thread_index ]; 1103ab: 0f b7 d2 movzwl %dx,%edx 1103ae: c1 e2 02 shl $0x2,%edx 1103b1: 89 55 e0 mov %edx,-0x20(%ebp) 1103b4: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1103bb: 83 c0 04 add $0x4,%eax 1103be: bf 01 00 00 00 mov $0x1,%edi 1103c3: bb 01 00 00 00 mov $0x1,%ebx for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 1103c8: eb 4b jmp 110415 <_POSIX_Keys_Run_destructors+0x81> <== ALWAYS TAKEN the_key = (POSIX_Keys_Control *) 1103ca: 8b 15 48 46 12 00 mov 0x124648,%edx 1103d0: 8b 34 9a mov (%edx,%ebx,4),%esi _POSIX_Keys_Information.local_table[ index ]; if ( !the_key ) 1103d3: 85 f6 test %esi,%esi 1103d5: 74 3d je 110414 <_POSIX_Keys_Run_destructors+0x80> continue; if ( !the_key->destructor ) 1103d7: 8b 56 10 mov 0x10(%esi),%edx 1103da: 89 55 c4 mov %edx,-0x3c(%ebp) 1103dd: 85 d2 test %edx,%edx 1103df: 74 33 je 110414 <_POSIX_Keys_Run_destructors+0x80> continue; value = the_key->Values[ thread_api ][ thread_index ]; 1103e1: 8b 54 86 04 mov 0x4(%esi,%eax,4),%edx 1103e5: 8b 4d e0 mov -0x20(%ebp),%ecx 1103e8: 8b 0c 0a mov (%edx,%ecx,1),%ecx 1103eb: 89 4d d4 mov %ecx,-0x2c(%ebp) if ( value ) { 1103ee: 85 c9 test %ecx,%ecx 1103f0: 74 22 je 110414 <_POSIX_Keys_Run_destructors+0x80> (*the_key->destructor)( value ); 1103f2: 83 ec 0c sub $0xc,%esp 1103f5: 51 push %ecx 1103f6: 89 45 dc mov %eax,-0x24(%ebp) 1103f9: ff 55 c4 call *-0x3c(%ebp) if ( the_key->Values[ thread_api ][ thread_index ] ) 1103fc: 8b 45 dc mov -0x24(%ebp),%eax 1103ff: 8b 54 86 04 mov 0x4(%esi,%eax,4),%edx 110403: 83 c4 10 add $0x10,%esp 110406: 8b 4d e0 mov -0x20(%ebp),%ecx 110409: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) 11040d: 0f 94 c2 sete %dl 110410: f7 da neg %edx 110412: 21 d7 and %edx,%edi for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 110414: 43 inc %ebx 110415: 0f b7 15 3c 46 12 00 movzwl 0x12463c,%edx 11041c: 39 d3 cmp %edx,%ebx 11041e: 76 aa jbe 1103ca <_POSIX_Keys_Run_destructors+0x36> if ( the_key->Values[ thread_api ][ thread_index ] ) are_all_null = false; } } if ( are_all_null == true ) 110420: 89 fa mov %edi,%edx 110422: 84 d2 test %dl,%dl 110424: 75 09 jne 11042f <_POSIX_Keys_Run_destructors+0x9b> return; iterations++; 110426: ff 45 e4 incl -0x1c(%ebp) * 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 ) 110429: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 11042d: 75 8f jne 1103be <_POSIX_Keys_Run_destructors+0x2a> return; } } 11042f: 8d 65 f4 lea -0xc(%ebp),%esp 110432: 5b pop %ebx 110433: 5e pop %esi 110434: 5f pop %edi 110435: c9 leave 110436: c3 ret 00113764 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 113764: 55 push %ebp 113765: 89 e5 mov %esp,%ebp 113767: 57 push %edi 113768: 56 push %esi 113769: 53 push %ebx 11376a: 83 ec 34 sub $0x34,%esp 11376d: 8b 75 10 mov 0x10(%ebp),%esi CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 113770: 68 ff 00 00 00 push $0xff 113775: ff 75 08 pushl 0x8(%ebp) 113778: e8 43 49 00 00 call 1180c0 11377d: 89 45 d0 mov %eax,-0x30(%ebp) 113780: a1 2c ce 12 00 mov 0x12ce2c,%eax 113785: 40 inc %eax 113786: a3 2c ce 12 00 mov %eax,0x12ce2c * There is no real basis for the default values. They will work * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 11378b: 83 c4 10 add $0x10,%esp 11378e: 85 f6 test %esi,%esi 113790: 75 0e jne 1137a0 <_POSIX_Message_queue_Create_support+0x3c> 113792: bb 0a 00 00 00 mov $0xa,%ebx 113797: c7 45 d4 10 00 00 00 movl $0x10,-0x2c(%ebp) 11379e: eb 31 jmp 1137d1 <_POSIX_Message_queue_Create_support+0x6d> <== ALWAYS TAKEN attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 1137a0: 83 7e 04 00 cmpl $0x0,0x4(%esi) 1137a4: 7e 06 jle 1137ac <_POSIX_Message_queue_Create_support+0x48> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 1137a6: 83 7e 08 00 cmpl $0x0,0x8(%esi) 1137aa: 7f 12 jg 1137be <_POSIX_Message_queue_Create_support+0x5a> _Thread_Enable_dispatch(); 1137ac: e8 ec d9 ff ff call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 1137b1: e8 a2 33 00 00 call 116b58 <__errno> 1137b6: c7 00 16 00 00 00 movl $0x16,(%eax) 1137bc: eb 39 jmp 1137f7 <_POSIX_Message_queue_Create_support+0x93> <== ALWAYS TAKEN } attr = *attr_ptr; 1137be: 8d 7d d8 lea -0x28(%ebp),%edi 1137c1: b9 04 00 00 00 mov $0x4,%ecx 1137c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1137c8: 8b 5d dc mov -0x24(%ebp),%ebx 1137cb: 8b 45 e0 mov -0x20(%ebp),%eax 1137ce: 89 45 d4 mov %eax,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 1137d1: 83 ec 0c sub $0xc,%esp 1137d4: 68 94 d1 12 00 push $0x12d194 1137d9: e8 72 cd ff ff call 110550 <_Objects_Allocate> 1137de: 89 c6 mov %eax,%esi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 1137e0: 83 c4 10 add $0x10,%esp 1137e3: 85 c0 test %eax,%eax 1137e5: 75 18 jne 1137ff <_POSIX_Message_queue_Create_support+0x9b> _Thread_Enable_dispatch(); 1137e7: e8 b1 d9 ff ff call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 1137ec: e8 67 33 00 00 call 116b58 <__errno> 1137f1: c7 00 17 00 00 00 movl $0x17,(%eax) 1137f7: 83 c8 ff or $0xffffffff,%eax 1137fa: e9 c2 00 00 00 jmp 1138c1 <_POSIX_Message_queue_Create_support+0x15d> <== ALWAYS TAKEN } the_mq->process_shared = pshared; 1137ff: 8b 45 0c mov 0xc(%ebp),%eax 113802: 89 46 10 mov %eax,0x10(%esi) the_mq->named = true; 113805: c6 46 14 01 movb $0x1,0x14(%esi) the_mq->open_count = 1; 113809: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi) the_mq->linked = true; 113810: c6 46 15 01 movb $0x1,0x15(%esi) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 113814: 8b 55 d0 mov -0x30(%ebp),%edx 113817: 42 inc %edx 113818: 83 ec 0c sub $0xc,%esp 11381b: 52 push %edx 11381c: 89 55 cc mov %edx,-0x34(%ebp) 11381f: e8 10 ea ff ff call 112234 <_Workspace_Allocate> 113824: 89 c7 mov %eax,%edi if (!name) { 113826: 83 c4 10 add $0x10,%esp 113829: 85 c0 test %eax,%eax 11382b: 8b 55 cc mov -0x34(%ebp),%edx 11382e: 75 1f jne 11384f <_POSIX_Message_queue_Create_support+0xeb> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 113830: 53 push %ebx 113831: 53 push %ebx 113832: 56 push %esi 113833: 68 94 d1 12 00 push $0x12d194 113838: e8 ff cf ff ff call 11083c <_Objects_Free> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 11383d: e8 5b d9 ff ff call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 113842: e8 11 33 00 00 call 116b58 <__errno> 113847: c7 00 0c 00 00 00 movl $0xc,(%eax) 11384d: eb 4f jmp 11389e <_POSIX_Message_queue_Create_support+0x13a> <== ALWAYS TAKEN } strncpy( name, name_arg, n+1 ); 11384f: 51 push %ecx 113850: 52 push %edx 113851: ff 75 08 pushl 0x8(%ebp) 113854: 50 push %eax 113855: e8 ea 47 00 00 call 118044 * * Joel: Cite POSIX or OpenGroup on above statement so we can determine * if it is a real requirement. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 11385a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) if ( !_CORE_message_queue_Initialize( 113861: ff 75 d4 pushl -0x2c(%ebp) 113864: 53 push %ebx 113865: 8d 46 5c lea 0x5c(%esi),%eax 113868: 50 push %eax 113869: 8d 46 1c lea 0x1c(%esi),%eax 11386c: 50 push %eax 11386d: e8 6a 0c 00 00 call 1144dc <_CORE_message_queue_Initialize> 113872: 83 c4 20 add $0x20,%esp 113875: 84 c0 test %al,%al 113877: 75 2d jne 1138a6 <_POSIX_Message_queue_Create_support+0x142> 113879: 50 push %eax 11387a: 50 push %eax 11387b: 56 push %esi 11387c: 68 94 d1 12 00 push $0x12d194 113881: e8 b6 cf ff ff call 11083c <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 113886: 89 3c 24 mov %edi,(%esp) 113889: e8 bf e9 ff ff call 11224d <_Workspace_Free> _Thread_Enable_dispatch(); 11388e: e8 0a d9 ff ff call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 113893: e8 c0 32 00 00 call 116b58 <__errno> 113898: c7 00 1c 00 00 00 movl $0x1c,(%eax) 11389e: 83 c8 ff or $0xffffffff,%eax 1138a1: 83 c4 10 add $0x10,%esp 1138a4: eb 1b jmp 1138c1 <_POSIX_Message_queue_Create_support+0x15d> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1138a6: 0f b7 56 08 movzwl 0x8(%esi),%edx 1138aa: a1 b0 d1 12 00 mov 0x12d1b0,%eax 1138af: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 1138b2: 89 7e 0c mov %edi,0xc(%esi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 1138b5: 8b 45 14 mov 0x14(%ebp),%eax 1138b8: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 1138ba: e8 de d8 ff ff call 11119d <_Thread_Enable_dispatch> 1138bf: 31 c0 xor %eax,%eax return 0; } 1138c1: 8d 65 f4 lea -0xc(%ebp),%esp 1138c4: 5b pop %ebx 1138c5: 5e pop %esi 1138c6: 5f pop %edi 1138c7: c9 leave 1138c8: c3 ret 001138cc <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 1138cc: 55 push %ebp 1138cd: 89 e5 mov %esp,%ebp 1138cf: 53 push %ebx 1138d0: 83 ec 14 sub $0x14,%esp 1138d3: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 1138d6: 85 db test %ebx,%ebx 1138d8: 74 4b je 113925 <_POSIX_Message_queue_Name_to_id+0x59> return EINVAL; if ( !name[0] ) 1138da: 80 3b 00 cmpb $0x0,(%ebx) 1138dd: 74 46 je 113925 <_POSIX_Message_queue_Name_to_id+0x59> return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 1138df: 52 push %edx 1138e0: 52 push %edx 1138e1: 68 ff 00 00 00 push $0xff 1138e6: 53 push %ebx 1138e7: e8 d4 47 00 00 call 1180c0 1138ec: 89 c2 mov %eax,%edx 1138ee: 83 c4 10 add $0x10,%esp 1138f1: b8 5b 00 00 00 mov $0x5b,%eax 1138f6: 81 fa fe 00 00 00 cmp $0xfe,%edx 1138fc: 77 2c ja 11392a <_POSIX_Message_queue_Name_to_id+0x5e> return ENAMETOOLONG; status = _Objects_Name_to_id_string( 1138fe: 50 push %eax 1138ff: 8d 45 f4 lea -0xc(%ebp),%eax 113902: 50 push %eax 113903: 53 push %ebx 113904: 68 94 d1 12 00 push $0x12d194 113909: e8 1e 11 00 00 call 114a2c <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 11390e: 8b 4d f4 mov -0xc(%ebp),%ecx 113911: 8b 55 0c mov 0xc(%ebp),%edx 113914: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 113916: 83 c4 10 add $0x10,%esp 113919: 83 f8 01 cmp $0x1,%eax 11391c: 19 c0 sbb %eax,%eax 11391e: f7 d0 not %eax 113920: 83 e0 02 and $0x2,%eax 113923: eb 05 jmp 11392a <_POSIX_Message_queue_Name_to_id+0x5e> <== ALWAYS TAKEN 113925: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 11392a: 8b 5d fc mov -0x4(%ebp),%ebx 11392d: c9 leave 11392e: c3 ret 0010def4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10def4: 55 push %ebp 10def5: 89 e5 mov %esp,%ebp 10def7: 57 push %edi 10def8: 56 push %esi 10def9: 53 push %ebx 10defa: 83 ec 30 sub $0x30,%esp 10defd: 8b 75 08 mov 0x8(%ebp),%esi 10df00: 8b 5d 14 mov 0x14(%ebp),%ebx 10df03: 8a 55 18 mov 0x18(%ebp),%dl 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( 10df06: 8d 45 e4 lea -0x1c(%ebp),%eax 10df09: 50 push %eax 10df0a: 56 push %esi 10df0b: 68 20 d3 12 00 push $0x12d320 10df10: 88 55 d4 mov %dl,-0x2c(%ebp) 10df13: e8 4c 2a 00 00 call 110964 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10df18: 83 c4 10 add $0x10,%esp 10df1b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10df1f: 8a 55 d4 mov -0x2c(%ebp),%dl 10df22: 0f 85 af 00 00 00 jne 10dfd7 <_POSIX_Message_queue_Receive_support+0xe3> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10df28: 8b 78 14 mov 0x14(%eax),%edi 10df2b: 89 f9 mov %edi,%ecx 10df2d: 83 e1 03 and $0x3,%ecx 10df30: 49 dec %ecx 10df31: 75 0a jne 10df3d <_POSIX_Message_queue_Receive_support+0x49> _Thread_Enable_dispatch(); 10df33: e8 65 32 00 00 call 11119d <_Thread_Enable_dispatch> 10df38: e9 9a 00 00 00 jmp 10dfd7 <_POSIX_Message_queue_Receive_support+0xe3> <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10df3d: 8b 48 10 mov 0x10(%eax),%ecx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10df40: 8b 45 10 mov 0x10(%ebp),%eax 10df43: 3b 41 68 cmp 0x68(%ecx),%eax 10df46: 73 15 jae 10df5d <_POSIX_Message_queue_Receive_support+0x69> _Thread_Enable_dispatch(); 10df48: e8 50 32 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10df4d: e8 06 8c 00 00 call 116b58 <__errno> 10df52: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10df58: e9 85 00 00 00 jmp 10dfe2 <_POSIX_Message_queue_Receive_support+0xee> <== ALWAYS TAKEN length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10df5d: 31 c0 xor %eax,%eax 10df5f: 84 d2 test %dl,%dl 10df61: 74 0b je 10df6e <_POSIX_Message_queue_Receive_support+0x7a> <== ALWAYS TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10df63: 89 f8 mov %edi,%eax 10df65: c1 e8 0e shr $0xe,%eax 10df68: 83 f0 01 xor $0x1,%eax 10df6b: 83 e0 01 and $0x1,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10df6e: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10df75: 52 push %edx 10df76: 52 push %edx 10df77: ff 75 1c pushl 0x1c(%ebp) 10df7a: 0f b6 c0 movzbl %al,%eax 10df7d: 50 push %eax 10df7e: 8d 45 e0 lea -0x20(%ebp),%eax 10df81: 50 push %eax 10df82: ff 75 0c pushl 0xc(%ebp) 10df85: 56 push %esi 10df86: 83 c1 1c add $0x1c,%ecx 10df89: 51 push %ecx 10df8a: e8 09 1c 00 00 call 10fb98 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10df8f: 83 c4 20 add $0x20,%esp 10df92: e8 06 32 00 00 call 11119d <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10df97: a1 e8 ce 12 00 mov 0x12cee8,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10df9c: 8b 50 24 mov 0x24(%eax),%edx 10df9f: c1 fa 1f sar $0x1f,%edx 10dfa2: 8b 48 24 mov 0x24(%eax),%ecx 10dfa5: 31 d1 xor %edx,%ecx 10dfa7: 89 0b mov %ecx,(%ebx) 10dfa9: 29 13 sub %edx,(%ebx) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10dfab: 83 78 34 00 cmpl $0x0,0x34(%eax) 10dfaf: 75 05 jne 10dfb6 <_POSIX_Message_queue_Receive_support+0xc2> return length_out; 10dfb1: 8b 45 e0 mov -0x20(%ebp),%eax 10dfb4: eb 2f jmp 10dfe5 <_POSIX_Message_queue_Receive_support+0xf1> <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( 10dfb6: e8 9d 8b 00 00 call 116b58 <__errno> 10dfbb: 89 c3 mov %eax,%ebx 10dfbd: 83 ec 0c sub $0xc,%esp 10dfc0: a1 e8 ce 12 00 mov 0x12cee8,%eax 10dfc5: ff 70 34 pushl 0x34(%eax) 10dfc8: e8 ff 01 00 00 call 10e1cc <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10dfcd: 89 03 mov %eax,(%ebx) 10dfcf: 83 c8 ff or $0xffffffff,%eax 10dfd2: 83 c4 10 add $0x10,%esp 10dfd5: eb 0e jmp 10dfe5 <_POSIX_Message_queue_Receive_support+0xf1> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10dfd7: e8 7c 8b 00 00 call 116b58 <__errno> 10dfdc: c7 00 09 00 00 00 movl $0x9,(%eax) 10dfe2: 83 c8 ff or $0xffffffff,%eax } 10dfe5: 8d 65 f4 lea -0xc(%ebp),%esp 10dfe8: 5b pop %ebx 10dfe9: 5e pop %esi 10dfea: 5f pop %edi 10dfeb: c9 leave 10dfec: c3 ret 0010e010 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10e010: 55 push %ebp 10e011: 89 e5 mov %esp,%ebp 10e013: 57 push %edi 10e014: 56 push %esi 10e015: 53 push %ebx 10e016: 83 ec 2c sub $0x2c,%esp 10e019: 8b 5d 08 mov 0x8(%ebp),%ebx 10e01c: 8b 75 14 mov 0x14(%ebp),%esi 10e01f: 8a 55 18 mov 0x18(%ebp),%dl /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 10e022: 83 fe 20 cmp $0x20,%esi 10e025: 76 10 jbe 10e037 <_POSIX_Message_queue_Send_support+0x27> rtems_set_errno_and_return_minus_one( EINVAL ); 10e027: e8 2c 8b 00 00 call 116b58 <__errno> 10e02c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e032: e9 a3 00 00 00 jmp 10e0da <_POSIX_Message_queue_Send_support+0xca> <== ALWAYS TAKEN 10e037: 50 push %eax 10e038: 8d 45 e4 lea -0x1c(%ebp),%eax 10e03b: 50 push %eax 10e03c: 53 push %ebx 10e03d: 68 20 d3 12 00 push $0x12d320 10e042: 88 55 d4 mov %dl,-0x2c(%ebp) 10e045: e8 1a 29 00 00 call 110964 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10e04a: 83 c4 10 add $0x10,%esp 10e04d: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10e051: 8a 55 d4 mov -0x2c(%ebp),%dl 10e054: 75 79 jne 10e0cf <_POSIX_Message_queue_Send_support+0xbf> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10e056: 8b 78 14 mov 0x14(%eax),%edi 10e059: f7 c7 03 00 00 00 test $0x3,%edi 10e05f: 75 07 jne 10e068 <_POSIX_Message_queue_Send_support+0x58> _Thread_Enable_dispatch(); 10e061: e8 37 31 00 00 call 11119d <_Thread_Enable_dispatch> 10e066: eb 67 jmp 10e0cf <_POSIX_Message_queue_Send_support+0xbf> <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10e068: 8b 48 10 mov 0x10(%eax),%ecx /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10e06b: 31 c0 xor %eax,%eax 10e06d: 84 d2 test %dl,%dl 10e06f: 74 0b je 10e07c <_POSIX_Message_queue_Send_support+0x6c> do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10e071: 89 f8 mov %edi,%eax 10e073: c1 e8 0e shr $0xe,%eax 10e076: 83 f0 01 xor $0x1,%eax 10e079: 83 e0 01 and $0x1,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10e07c: ff 75 1c pushl 0x1c(%ebp) 10e07f: 0f b6 c0 movzbl %al,%eax 10e082: 50 push %eax 10e083: f7 de neg %esi 10e085: 56 push %esi 10e086: 6a 00 push $0x0 10e088: 53 push %ebx 10e089: ff 75 10 pushl 0x10(%ebp) 10e08c: ff 75 0c pushl 0xc(%ebp) 10e08f: 83 c1 1c add $0x1c,%ecx 10e092: 51 push %ecx 10e093: e8 24 1c 00 00 call 10fcbc <_CORE_message_queue_Submit> 10e098: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10e09a: 83 c4 20 add $0x20,%esp 10e09d: e8 fb 30 00 00 call 11119d <_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 ) 10e0a2: 83 fb 07 cmp $0x7,%ebx 10e0a5: 75 08 jne 10e0af <_POSIX_Message_queue_Send_support+0x9f> msg_status = _Thread_Executing->Wait.return_code; 10e0a7: a1 e8 ce 12 00 mov 0x12cee8,%eax 10e0ac: 8b 58 34 mov 0x34(%eax),%ebx if ( !msg_status ) 10e0af: 31 c0 xor %eax,%eax 10e0b1: 85 db test %ebx,%ebx 10e0b3: 74 28 je 10e0dd <_POSIX_Message_queue_Send_support+0xcd> return msg_status; rtems_set_errno_and_return_minus_one( 10e0b5: e8 9e 8a 00 00 call 116b58 <__errno> 10e0ba: 89 c6 mov %eax,%esi 10e0bc: 83 ec 0c sub $0xc,%esp 10e0bf: 53 push %ebx 10e0c0: e8 07 01 00 00 call 10e1cc <_POSIX_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 10e0c5: 89 06 mov %eax,(%esi) 10e0c7: 83 c8 ff or $0xffffffff,%eax 10e0ca: 83 c4 10 add $0x10,%esp 10e0cd: eb 0e jmp 10e0dd <_POSIX_Message_queue_Send_support+0xcd> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e0cf: e8 84 8a 00 00 call 116b58 <__errno> 10e0d4: c7 00 09 00 00 00 movl $0x9,(%eax) 10e0da: 83 c8 ff or $0xffffffff,%eax } 10e0dd: 8d 65 f4 lea -0xc(%ebp),%esp 10e0e0: 5b pop %ebx 10e0e1: 5e pop %esi 10e0e2: 5f pop %edi 10e0e3: c9 leave 10e0e4: c3 ret 0010baa1 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10baa1: 55 push %ebp 10baa2: 89 e5 mov %esp,%ebp 10baa4: 56 push %esi 10baa5: 53 push %ebx 10baa6: 8b 5d 08 mov 0x8(%ebp),%ebx 10baa9: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10baac: 85 db test %ebx,%ebx 10baae: 74 16 je 10bac6 <_POSIX_Mutex_Get+0x25> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10bab0: 83 3b ff cmpl $0xffffffff,(%ebx) 10bab3: 75 1b jne 10bad0 <_POSIX_Mutex_Get+0x2f> 10bab5: 51 push %ecx 10bab6: 51 push %ecx 10bab7: 6a 00 push $0x0 10bab9: 53 push %ebx 10baba: e8 6d 00 00 00 call 10bb2c <== ALWAYS TAKEN 10babf: 83 c4 10 add $0x10,%esp 10bac2: 85 c0 test %eax,%eax 10bac4: 74 0a je 10bad0 <_POSIX_Mutex_Get+0x2f> 10bac6: c7 06 01 00 00 00 movl $0x1,(%esi) 10bacc: 31 c0 xor %eax,%eax 10bace: eb 11 jmp 10bae1 <_POSIX_Mutex_Get+0x40> <== ALWAYS TAKEN return (POSIX_Mutex_Control *) 10bad0: 52 push %edx 10bad1: 56 push %esi 10bad2: ff 33 pushl (%ebx) 10bad4: 68 e4 95 12 00 push $0x1295e4 10bad9: e8 7e 26 00 00 call 10e15c <_Objects_Get> 10bade: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10bae1: 8d 65 f8 lea -0x8(%ebp),%esp 10bae4: 5b pop %ebx 10bae5: 5e pop %esi 10bae6: c9 leave 10bae7: c3 ret 0010ba58 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10ba58: 55 push %ebp 10ba59: 89 e5 mov %esp,%ebp 10ba5b: 56 push %esi 10ba5c: 53 push %ebx 10ba5d: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba60: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10ba63: 85 db test %ebx,%ebx 10ba65: 74 16 je 10ba7d <_POSIX_Mutex_Get_interrupt_disable+0x25> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10ba67: 83 3b ff cmpl $0xffffffff,(%ebx) 10ba6a: 75 1b jne 10ba87 <_POSIX_Mutex_Get_interrupt_disable+0x2f> 10ba6c: 50 push %eax 10ba6d: 50 push %eax 10ba6e: 6a 00 push $0x0 10ba70: 53 push %ebx 10ba71: e8 b6 00 00 00 call 10bb2c <== ALWAYS TAKEN 10ba76: 83 c4 10 add $0x10,%esp 10ba79: 85 c0 test %eax,%eax 10ba7b: 74 0a je 10ba87 <_POSIX_Mutex_Get_interrupt_disable+0x2f> 10ba7d: c7 06 01 00 00 00 movl $0x1,(%esi) 10ba83: 31 c0 xor %eax,%eax 10ba85: eb 13 jmp 10ba9a <_POSIX_Mutex_Get_interrupt_disable+0x42> <== ALWAYS TAKEN return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10ba87: ff 75 10 pushl 0x10(%ebp) 10ba8a: 56 push %esi 10ba8b: ff 33 pushl (%ebx) 10ba8d: 68 e4 95 12 00 push $0x1295e4 10ba92: e8 75 26 00 00 call 10e10c <_Objects_Get_isr_disable> 10ba97: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10ba9a: 8d 65 f8 lea -0x8(%ebp),%esp 10ba9d: 5b pop %ebx 10ba9e: 5e pop %esi 10ba9f: c9 leave 10baa0: c3 ret 0010bc60 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10bc60: 55 push %ebp 10bc61: 89 e5 mov %esp,%ebp 10bc63: 53 push %ebx 10bc64: 83 ec 18 sub $0x18,%esp 10bc67: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 10bc6a: 8d 45 f0 lea -0x10(%ebp),%eax 10bc6d: 50 push %eax 10bc6e: 8d 45 f4 lea -0xc(%ebp),%eax 10bc71: 50 push %eax 10bc72: ff 75 08 pushl 0x8(%ebp) 10bc75: e8 de fd ff ff call 10ba58 <_POSIX_Mutex_Get_interrupt_disable> <== ALWAYS TAKEN 10bc7a: 89 c2 mov %eax,%edx switch ( location ) { 10bc7c: 83 c4 10 add $0x10,%esp 10bc7f: b8 16 00 00 00 mov $0x16,%eax 10bc84: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bc88: 75 2c jne 10bcb6 <_POSIX_Mutex_Lock_support+0x56> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10bc8a: 83 ec 0c sub $0xc,%esp 10bc8d: ff 75 f0 pushl -0x10(%ebp) 10bc90: ff 75 10 pushl 0x10(%ebp) 10bc93: 0f b6 db movzbl %bl,%ebx 10bc96: 53 push %ebx 10bc97: ff 72 08 pushl 0x8(%edx) 10bc9a: 83 c2 14 add $0x14,%edx 10bc9d: 52 push %edx 10bc9e: e8 c6 19 00 00 call 10d669 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10bca3: 83 c4 14 add $0x14,%esp 10bca6: a1 f8 92 12 00 mov 0x1292f8,%eax 10bcab: ff 70 34 pushl 0x34(%eax) 10bcae: e8 c1 00 00 00 call 10bd74 <_POSIX_Mutex_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10bcb3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10bcb6: 8b 5d fc mov -0x4(%ebp),%ebx 10bcb9: c9 leave 10bcba: c3 ret 00111e7c <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 111e7c: 55 push %ebp 111e7d: 89 e5 mov %esp,%ebp 111e7f: 56 push %esi 111e80: 53 push %ebx 111e81: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 111e84: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 111e88: 74 0d je 111e97 <_POSIX_Semaphore_Create_support+0x1b> rtems_set_errno_and_return_minus_one( ENOSYS ); 111e8a: e8 5d 33 00 00 call 1151ec <__errno> 111e8f: c7 00 58 00 00 00 movl $0x58,(%eax) 111e95: eb 26 jmp 111ebd <_POSIX_Semaphore_Create_support+0x41> <== ALWAYS TAKEN if ( name ) { 111e97: 85 db test %ebx,%ebx 111e99: 74 2a je 111ec5 <_POSIX_Semaphore_Create_support+0x49> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 111e9b: 52 push %edx 111e9c: 52 push %edx 111e9d: 68 ff 00 00 00 push $0xff 111ea2: 53 push %ebx 111ea3: e8 f8 41 00 00 call 1160a0 111ea8: 83 c4 10 add $0x10,%esp 111eab: 3d fe 00 00 00 cmp $0xfe,%eax 111eb0: 76 13 jbe 111ec5 <_POSIX_Semaphore_Create_support+0x49> rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 111eb2: e8 35 33 00 00 call 1151ec <__errno> 111eb7: c7 00 5b 00 00 00 movl $0x5b,(%eax) 111ebd: 83 c8 ff or $0xffffffff,%eax 111ec0: e9 9b 00 00 00 jmp 111f60 <_POSIX_Semaphore_Create_support+0xe4> <== ALWAYS TAKEN 111ec5: a1 fc a3 12 00 mov 0x12a3fc,%eax 111eca: 40 inc %eax 111ecb: a3 fc a3 12 00 mov %eax,0x12a3fc * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 111ed0: 83 ec 0c sub $0xc,%esp 111ed3: 68 e4 a6 12 00 push $0x12a6e4 111ed8: e8 27 c6 ff ff call 10e504 <_Objects_Allocate> 111edd: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 111edf: 83 c4 10 add $0x10,%esp 111ee2: 85 c0 test %eax,%eax 111ee4: 75 12 jne 111ef8 <_POSIX_Semaphore_Create_support+0x7c> _Thread_Enable_dispatch(); 111ee6: e8 66 d2 ff ff call 10f151 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 111eeb: e8 fc 32 00 00 call 1151ec <__errno> 111ef0: c7 00 1c 00 00 00 movl $0x1c,(%eax) 111ef6: eb c5 jmp 111ebd <_POSIX_Semaphore_Create_support+0x41> <== ALWAYS TAKEN } the_semaphore->process_shared = pshared; 111ef8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 111eff: 85 db test %ebx,%ebx 111f01: 74 11 je 111f14 <_POSIX_Semaphore_Create_support+0x98> the_semaphore->named = true; 111f03: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 111f07: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 111f0e: c6 40 15 01 movb $0x1,0x15(%eax) 111f12: eb 0f jmp 111f23 <_POSIX_Semaphore_Create_support+0xa7> <== ALWAYS TAKEN } else { the_semaphore->named = false; 111f14: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 111f18: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 111f1f: c6 40 15 00 movb $0x0,0x15(%eax) * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 111f23: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 111f2a: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 111f31: 50 push %eax 111f32: ff 75 10 pushl 0x10(%ebp) 111f35: 8d 46 5c lea 0x5c(%esi),%eax 111f38: 50 push %eax 111f39: 8d 46 1c lea 0x1c(%esi),%eax 111f3c: 50 push %eax 111f3d: e8 1e c1 ff ff call 10e060 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 111f42: 0f b7 56 08 movzwl 0x8(%esi),%edx 111f46: a1 00 a7 12 00 mov 0x12a700,%eax 111f4b: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 111f4e: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 111f51: 8b 45 14 mov 0x14(%ebp),%eax 111f54: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 111f56: e8 f6 d1 ff ff call 10f151 <_Thread_Enable_dispatch> 111f5b: 31 c0 xor %eax,%eax return 0; 111f5d: 83 c4 10 add $0x10,%esp } 111f60: 8d 65 f8 lea -0x8(%ebp),%esp 111f63: 5b pop %ebx 111f64: 5e pop %esi 111f65: c9 leave 111f66: c3 ret 00111fb0 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 111fb0: 55 push %ebp 111fb1: 89 e5 mov %esp,%ebp 111fb3: 83 ec 18 sub $0x18,%esp 111fb6: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 111fb9: 85 c0 test %eax,%eax 111fbb: 74 2c je 111fe9 <_POSIX_Semaphore_Name_to_id+0x39> return EINVAL; if ( !name[0] ) 111fbd: 80 38 00 cmpb $0x0,(%eax) 111fc0: 74 27 je 111fe9 <_POSIX_Semaphore_Name_to_id+0x39> return EINVAL; status = _Objects_Name_to_id_string( 111fc2: 52 push %edx 111fc3: 8d 55 f4 lea -0xc(%ebp),%edx 111fc6: 52 push %edx 111fc7: 50 push %eax 111fc8: 68 e4 a6 12 00 push $0x12a6e4 111fcd: e8 a6 0c 00 00 call 112c78 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 111fd2: 8b 4d f4 mov -0xc(%ebp),%ecx 111fd5: 8b 55 0c mov 0xc(%ebp),%edx 111fd8: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 111fda: 83 c4 10 add $0x10,%esp 111fdd: 83 f8 01 cmp $0x1,%eax 111fe0: 19 c0 sbb %eax,%eax 111fe2: f7 d0 not %eax 111fe4: 83 e0 02 and $0x2,%eax 111fe7: eb 05 jmp 111fee <_POSIX_Semaphore_Name_to_id+0x3e> <== ALWAYS TAKEN 111fe9: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 111fee: c9 leave 111fef: c3 ret 00112018 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 112018: 55 push %ebp 112019: 89 e5 mov %esp,%ebp 11201b: 53 push %ebx 11201c: 83 ec 18 sub $0x18,%esp 11201f: 8a 5d 0c mov 0xc(%ebp),%bl RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 112022: 8d 45 f4 lea -0xc(%ebp),%eax 112025: 50 push %eax 112026: 8b 45 08 mov 0x8(%ebp),%eax 112029: ff 30 pushl (%eax) 11202b: 68 e4 a6 12 00 push $0x12a6e4 112030: e8 e3 c8 ff ff call 10e918 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 112035: 83 c4 10 add $0x10,%esp 112038: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11203c: 75 4a jne 112088 <_POSIX_Semaphore_Wait_support+0x70> case OBJECTS_LOCAL: _CORE_semaphore_Seize( 11203e: ff 75 10 pushl 0x10(%ebp) 112041: 0f b6 db movzbl %bl,%ebx 112044: 53 push %ebx 112045: ff 70 08 pushl 0x8(%eax) 112048: 83 c0 1c add $0x1c,%eax 11204b: 50 push %eax 11204c: e8 9f 07 00 00 call 1127f0 <_CORE_semaphore_Seize> <== ALWAYS TAKEN &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 112051: e8 fb d0 ff ff call 10f151 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 112056: 83 c4 10 add $0x10,%esp 112059: 31 c0 xor %eax,%eax 11205b: 8b 15 b8 a4 12 00 mov 0x12a4b8,%edx 112061: 83 7a 34 00 cmpl $0x0,0x34(%edx) 112065: 74 2f je 112096 <_POSIX_Semaphore_Wait_support+0x7e> return 0; rtems_set_errno_and_return_minus_one( 112067: e8 80 31 00 00 call 1151ec <__errno> 11206c: 89 c3 mov %eax,%ebx 11206e: 83 ec 0c sub $0xc,%esp 112071: a1 b8 a4 12 00 mov 0x12a4b8,%eax 112076: ff 70 34 pushl 0x34(%eax) 112079: e8 d2 22 00 00 call 114350 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 11207e: 89 03 mov %eax,(%ebx) 112080: 83 c8 ff or $0xffffffff,%eax 112083: 83 c4 10 add $0x10,%esp 112086: eb 0e jmp 112096 <_POSIX_Semaphore_Wait_support+0x7e> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 112088: e8 5f 31 00 00 call 1151ec <__errno> 11208d: c7 00 16 00 00 00 movl $0x16,(%eax) 112093: 83 c8 ff or $0xffffffff,%eax } 112096: 8b 5d fc mov -0x4(%ebp),%ebx 112099: c9 leave 11209a: c3 ret 0010e39c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10e39c: 55 push %ebp 10e39d: 89 e5 mov %esp,%ebp 10e39f: 83 ec 08 sub $0x8,%esp 10e3a2: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e3a5: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10e3ab: 83 b8 cc 00 00 00 00 cmpl $0x0,0xcc(%eax) 10e3b2: 75 2c jne 10e3e0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> <== ALWAYS TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 10e3b4: 83 b8 d0 00 00 00 01 cmpl $0x1,0xd0(%eax) 10e3bb: 75 23 jne 10e3e0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> thread_support->cancelation_requested ) { 10e3bd: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10e3c4: 74 1a je 10e3e0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e3c6: a1 e4 51 12 00 mov 0x1251e4,%eax 10e3cb: 48 dec %eax 10e3cc: a3 e4 51 12 00 mov %eax,0x1251e4 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10e3d1: 50 push %eax 10e3d2: 50 push %eax 10e3d3: 6a ff push $0xffffffff 10e3d5: 52 push %edx 10e3d6: e8 bd 05 00 00 call 10e998 <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10e3db: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 10e3de: c9 leave 10e3df: c3 ret 10e3e0: c9 leave 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(); 10e3e1: e9 b7 db ff ff jmp 10bf9d <_Thread_Enable_dispatch> 0010f36c <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 10f36c: 55 push %ebp 10f36d: 89 e5 mov %esp,%ebp 10f36f: 57 push %edi 10f370: 56 push %esi 10f371: 53 push %ebx 10f372: 83 ec 18 sub $0x18,%esp 10f375: 8b 7d 08 mov 0x8(%ebp),%edi 10f378: 8b 5d 0c mov 0xc(%ebp),%ebx 10f37b: 8b 75 10 mov 0x10(%ebp),%esi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 10f37e: ff 33 pushl (%ebx) 10f380: e8 c7 ff ff ff call 10f34c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10f385: 83 c4 10 add $0x10,%esp 10f388: 84 c0 test %al,%al 10f38a: 0f 84 97 00 00 00 je 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> <== ALWAYS TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10f390: c7 06 00 00 00 00 movl $0x0,(%esi) *budget_callout = NULL; 10f396: 8b 45 14 mov 0x14(%ebp),%eax 10f399: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 10f39f: 85 ff test %edi,%edi 10f3a1: 75 08 jne 10f3ab <_POSIX_Thread_Translate_sched_param+0x3f> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10f3a3: c7 06 01 00 00 00 movl $0x1,(%esi) 10f3a9: eb 18 jmp 10f3c3 <_POSIX_Thread_Translate_sched_param+0x57> <== ALWAYS TAKEN return 0; } if ( policy == SCHED_FIFO ) { 10f3ab: 83 ff 01 cmp $0x1,%edi 10f3ae: 75 08 jne 10f3b8 <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10f3b0: c7 06 00 00 00 00 movl $0x0,(%esi) 10f3b6: eb 0b jmp 10f3c3 <_POSIX_Thread_Translate_sched_param+0x57> <== ALWAYS TAKEN return 0; } if ( policy == SCHED_RR ) { 10f3b8: 83 ff 02 cmp $0x2,%edi 10f3bb: 75 0a jne 10f3c7 <_POSIX_Thread_Translate_sched_param+0x5b> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 10f3bd: c7 06 02 00 00 00 movl $0x2,(%esi) 10f3c3: 31 c0 xor %eax,%eax return 0; 10f3c5: eb 65 jmp 10f42c <_POSIX_Thread_Translate_sched_param+0xc0> <== ALWAYS TAKEN } if ( policy == SCHED_SPORADIC ) { 10f3c7: 83 ff 03 cmp $0x3,%edi 10f3ca: 75 5b jne 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> if ( (param->ss_replenish_period.tv_sec == 0) && 10f3cc: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10f3d0: 75 06 jne 10f3d8 <_POSIX_Thread_Translate_sched_param+0x6c> (param->ss_replenish_period.tv_nsec == 0) ) 10f3d2: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10f3d6: 74 4f je 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( (param->ss_initial_budget.tv_sec == 0) && 10f3d8: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10f3dc: 75 06 jne 10f3e4 <_POSIX_Thread_Translate_sched_param+0x78> (param->ss_initial_budget.tv_nsec == 0) ) 10f3de: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10f3e2: 74 43 je 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 10f3e4: 83 ec 0c sub $0xc,%esp 10f3e7: 8d 43 08 lea 0x8(%ebx),%eax 10f3ea: 50 push %eax 10f3eb: e8 78 e2 ff ff call 10d668 <_Timespec_To_ticks> 10f3f0: 89 c7 mov %eax,%edi 10f3f2: 8d 43 10 lea 0x10(%ebx),%eax 10f3f5: 89 04 24 mov %eax,(%esp) 10f3f8: e8 6b e2 ff ff call 10d668 <_Timespec_To_ticks> 10f3fd: 83 c4 10 add $0x10,%esp 10f400: 39 c7 cmp %eax,%edi 10f402: 72 23 jb 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 10f404: 83 ec 0c sub $0xc,%esp 10f407: ff 73 04 pushl 0x4(%ebx) 10f40a: e8 3d ff ff ff call 10f34c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10f40f: 83 c4 10 add $0x10,%esp 10f412: 84 c0 test %al,%al 10f414: 74 11 je 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 10f416: c7 06 03 00 00 00 movl $0x3,(%esi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 10f41c: 8b 45 14 mov 0x14(%ebp),%eax 10f41f: c7 00 1b a5 10 00 movl $0x10a51b,(%eax) 10f425: eb 9c jmp 10f3c3 <_POSIX_Thread_Translate_sched_param+0x57> <== ALWAYS TAKEN return 0; 10f427: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 10f42c: 8d 65 f4 lea -0xc(%ebp),%esp 10f42f: 5b pop %ebx 10f430: 5e pop %esi 10f431: 5f pop %edi 10f432: c9 leave 10f433: c3 ret 0010e3de <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 10e3de: 55 push %ebp 10e3df: 89 e5 mov %esp,%ebp 10e3e1: 57 push %edi 10e3e2: 56 push %esi 10e3e3: 53 push %ebx 10e3e4: 83 ec 28 sub $0x28,%esp 10e3e7: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 10e3ea: 68 e4 00 00 00 push $0xe4 10e3ef: 89 55 e4 mov %edx,-0x1c(%ebp) 10e3f2: e8 cd e7 ff ff call 10cbc4 <_Workspace_Allocate> <== ALWAYS TAKEN 10e3f7: 89 c3 mov %eax,%ebx if ( !api ) 10e3f9: 83 c4 10 add $0x10,%esp 10e3fc: 31 c0 xor %eax,%eax 10e3fe: 85 db test %ebx,%ebx 10e400: 8b 55 e4 mov -0x1c(%ebp),%edx 10e403: 0f 84 fa 00 00 00 je 10e503 <_POSIX_Threads_Create_extension+0x125> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 10e409: 89 9a f8 00 00 00 mov %ebx,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 10e40f: be 14 ee 11 00 mov $0x11ee14,%esi 10e414: b9 0e 00 00 00 mov $0xe,%ecx 10e419: 89 df mov %ebx,%edi 10e41b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 10e41d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 10e424: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 10e42b: be 2c ee 11 00 mov $0x11ee2c,%esi 10e430: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 10e436: b1 06 mov $0x6,%cl 10e438: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 10e43a: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10e441: 2b 42 14 sub 0x14(%edx),%eax 10e444: 89 83 80 00 00 00 mov %eax,0x80(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 10e44a: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 10e451: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 10e454: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10e45b: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 10e45e: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10e465: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e468: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10e46e: 89 83 d8 00 00 00 mov %eax,0xd8(%ebx) the_chain->permanent_null = NULL; 10e474: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 10e47b: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e47e: 8d 83 d8 00 00 00 lea 0xd8(%ebx),%eax 10e484: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 10e48a: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) 10e491: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 10e494: 0f b6 42 0b movzbl 0xb(%edx),%eax 10e498: 83 e0 07 and $0x7,%eax 10e49b: 83 f8 03 cmp $0x3,%eax 10e49e: 75 19 jne 10e4b9 <_POSIX_Threads_Create_extension+0xdb> #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 10e4a0: a1 a8 42 12 00 mov 0x1242a8,%eax 10e4a5: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10e4ab: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 10e4b1: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) 10e4b7: eb 0a jmp 10e4c3 <_POSIX_Threads_Create_extension+0xe5> <== ALWAYS TAKEN } else { api->signals_blocked = 0xffffffff; 10e4b9: c7 83 c4 00 00 00 ff movl $0xffffffff,0xc4(%ebx) 10e4c0: ff ff ff } _Thread_queue_Initialize( 10e4c3: 6a 00 push $0x0 10e4c5: 68 00 10 00 00 push $0x1000 10e4ca: 6a 00 push $0x0 10e4cc: 8d 43 3c lea 0x3c(%ebx),%eax 10e4cf: 50 push %eax 10e4d0: 89 55 e4 mov %edx,-0x1c(%ebp) 10e4d3: e8 c4 dd ff ff call 10c29c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 10e4d8: 8b 55 e4 mov -0x1c(%ebp),%edx 10e4db: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10e4de: c7 83 a4 00 00 00 00 movl $0x0,0xa4(%ebx) 10e4e5: 00 00 00 the_watchdog->routine = routine; 10e4e8: c7 83 b8 00 00 00 4b movl $0x10e54b,0xb8(%ebx) 10e4ef: e5 10 00 the_watchdog->id = id; 10e4f2: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) the_watchdog->user_data = user_data; 10e4f8: 89 93 c0 00 00 00 mov %edx,0xc0(%ebx) 10e4fe: b0 01 mov $0x1,%al _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 10e500: 83 c4 10 add $0x10,%esp } 10e503: 8d 65 f4 lea -0xc(%ebp),%esp 10e506: 5b pop %ebx 10e507: 5e pop %esi 10e508: 5f pop %edi 10e509: c9 leave 10e50a: c3 ret 0010e367 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 10e367: 55 push %ebp 10e368: 89 e5 mov %esp,%ebp 10e36a: 57 push %edi 10e36b: 56 push %esi 10e36c: 53 push %ebx 10e36d: 83 ec 28 sub $0x28,%esp 10e370: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 10e373: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 10e379: 53 push %ebx 10e37a: e8 b9 1f 00 00 call 110338 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 10e37f: 89 1c 24 mov %ebx,(%esp) 10e382: e8 0d 20 00 00 call 110394 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 10e387: 8b 53 28 mov 0x28(%ebx),%edx while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10e38a: 8d 7e 3c lea 0x3c(%esi),%edi 10e38d: 83 c4 10 add $0x10,%esp 10e390: eb 05 jmp 10e397 <_POSIX_Threads_Delete_extension+0x30> <== ALWAYS TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; 10e392: 8b 40 28 mov 0x28(%eax),%eax 10e395: 89 10 mov %edx,(%eax) /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10e397: 83 ec 0c sub $0xc,%esp 10e39a: 57 push %edi 10e39b: 89 55 e4 mov %edx,-0x1c(%ebp) 10e39e: e8 dd db ff ff call 10bf80 <_Thread_queue_Dequeue> 10e3a3: 83 c4 10 add $0x10,%esp 10e3a6: 85 c0 test %eax,%eax 10e3a8: 8b 55 e4 mov -0x1c(%ebp),%edx 10e3ab: 75 e5 jne 10e392 <_POSIX_Threads_Delete_extension+0x2b> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 10e3ad: 83 7e 7c 03 cmpl $0x3,0x7c(%esi) 10e3b1: 75 12 jne 10e3c5 <_POSIX_Threads_Delete_extension+0x5e> (void) _Watchdog_Remove( &api->Sporadic_timer ); 10e3b3: 83 ec 0c sub $0xc,%esp 10e3b6: 8d 86 9c 00 00 00 lea 0x9c(%esi),%eax 10e3bc: 50 push %eax 10e3bd: e8 06 e7 ff ff call 10cac8 <_Watchdog_Remove> 10e3c2: 83 c4 10 add $0x10,%esp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 10e3c5: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10e3cc: 00 00 00 (void) _Workspace_Free( api ); 10e3cf: 89 75 08 mov %esi,0x8(%ebp) } 10e3d2: 8d 65 f4 lea -0xc(%ebp),%esp 10e3d5: 5b pop %ebx 10e3d6: 5e pop %esi 10e3d7: 5f pop %edi 10e3d8: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 10e3d9: e9 ff e7 ff ff jmp 10cbdd <_Workspace_Free> 0010e344 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 10e344: 55 push %ebp 10e345: 89 e5 mov %esp,%ebp 10e347: 83 ec 08 sub $0x8,%esp 10e34a: 8b 55 08 mov 0x8(%ebp),%edx /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) 10e34d: 0f b6 42 0b movzbl 0xb(%edx),%eax 10e351: 83 e0 07 and $0x7,%eax 10e354: 83 f8 03 cmp $0x3,%eax 10e357: 75 0c jne 10e365 <_POSIX_Threads_Exitted_extension+0x21> pthread_exit( executing->Wait.return_argument ); 10e359: 8b 42 28 mov 0x28(%edx),%eax 10e35c: 89 45 08 mov %eax,0x8(%ebp) } 10e35f: c9 leave /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); 10e360: e9 b7 22 00 00 jmp 11061c <== ALWAYS TAKEN } 10e365: c9 leave 10e366: c3 ret 0010a284 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10a284: 55 push %ebp 10a285: 89 e5 mov %esp,%ebp 10a287: 57 push %edi 10a288: 56 push %esi 10a289: 53 push %ebx 10a28a: 83 ec 5c sub $0x5c,%esp 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; 10a28d: 8b 3d 10 12 12 00 mov 0x121210,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10a293: 8b 15 0c 12 12 00 mov 0x12120c,%edx if ( !user_threads || maximum == 0 ) 10a299: 85 d2 test %edx,%edx 10a29b: 74 54 je 10a2f1 <_POSIX_Threads_Initialize_user_threads_body+0x6d> <== ALWAYS TAKEN 10a29d: 85 ff test %edi,%edi 10a29f: 74 50 je 10a2f1 <_POSIX_Threads_Initialize_user_threads_body+0x6d> <== ALWAYS TAKEN 10a2a1: 31 db xor %ebx,%ebx for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10a2a3: 8d 75 ac lea -0x54(%ebp),%esi 10a2a6: 83 ec 0c sub $0xc,%esp 10a2a9: 56 push %esi 10a2aa: 89 55 a4 mov %edx,-0x5c(%ebp) 10a2ad: e8 82 51 00 00 call 10f434 <== ALWAYS TAKEN (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10a2b2: 5a pop %edx 10a2b3: 59 pop %ecx 10a2b4: 6a 02 push $0x2 10a2b6: 56 push %esi 10a2b7: e8 a0 51 00 00 call 10f45c <== ALWAYS TAKEN (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10a2bc: 59 pop %ecx 10a2bd: 58 pop %eax 10a2be: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10a2c2: 56 push %esi 10a2c3: e8 c4 51 00 00 call 10f48c <== ALWAYS TAKEN status = pthread_create( 10a2c8: 6a 00 push $0x0 10a2ca: ff 34 df pushl (%edi,%ebx,8) 10a2cd: 56 push %esi 10a2ce: 8d 45 e4 lea -0x1c(%ebp),%eax 10a2d1: 50 push %eax 10a2d2: e8 f5 fc ff ff call 109fcc <== ALWAYS TAKEN &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10a2d7: 83 c4 20 add $0x20,%esp 10a2da: 85 c0 test %eax,%eax 10a2dc: 8b 55 a4 mov -0x5c(%ebp),%edx 10a2df: 74 0b je 10a2ec <_POSIX_Threads_Initialize_user_threads_body+0x68> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10a2e1: 52 push %edx 10a2e2: 50 push %eax 10a2e3: 6a 01 push $0x1 10a2e5: 6a 02 push $0x2 10a2e7: e8 fc 1a 00 00 call 10bde8 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10a2ec: 43 inc %ebx 10a2ed: 39 d3 cmp %edx,%ebx 10a2ef: 72 b5 jb 10a2a6 <_POSIX_Threads_Initialize_user_threads_body+0x22> <== ALWAYS TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10a2f1: 8d 65 f4 lea -0xc(%ebp),%esp 10a2f4: 5b pop %ebx 10a2f5: 5e pop %esi 10a2f6: 5f pop %edi 10a2f7: c9 leave 10a2f8: c3 ret 0010e54b <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 10e54b: 55 push %ebp 10e54c: 89 e5 mov %esp,%ebp 10e54e: 56 push %esi 10e54f: 53 push %ebx 10e550: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e553: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 10e559: 83 ec 0c sub $0xc,%esp 10e55c: 8d 86 90 00 00 00 lea 0x90(%esi),%eax 10e562: 50 push %eax 10e563: e8 00 10 00 00 call 10f568 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 10e568: 89 43 78 mov %eax,0x78(%ebx) 10e56b: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10e572: 2b 86 98 00 00 00 sub 0x98(%esi),%eax new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; 10e578: 89 43 18 mov %eax,0x18(%ebx) */ #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 ) { 10e57b: 83 c4 10 add $0x10,%esp 10e57e: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10e582: 75 12 jne 10e596 <_POSIX_Threads_Sporadic_budget_TSR+0x4b> <== ALWAYS TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 10e584: 39 43 14 cmp %eax,0x14(%ebx) 10e587: 76 0d jbe 10e596 <_POSIX_Threads_Sporadic_budget_TSR+0x4b> _Thread_Change_priority( the_thread, new_priority, true ); 10e589: 52 push %edx 10e58a: 6a 01 push $0x1 10e58c: 50 push %eax 10e58d: 53 push %ebx 10e58e: e8 c1 d1 ff ff call 10b754 <_Thread_Change_priority> 10e593: 83 c4 10 add $0x10,%esp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 10e596: 83 ec 0c sub $0xc,%esp 10e599: 8d 86 88 00 00 00 lea 0x88(%esi),%eax 10e59f: 50 push %eax 10e5a0: e8 c3 0f 00 00 call 10f568 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10e5a5: 89 86 a8 00 00 00 mov %eax,0xa8(%esi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10e5ab: 83 c4 10 add $0x10,%esp 10e5ae: 81 c6 9c 00 00 00 add $0x9c,%esi 10e5b4: 89 75 0c mov %esi,0xc(%ebp) 10e5b7: c7 45 08 c8 42 12 00 movl $0x1242c8,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 10e5be: 8d 65 f8 lea -0x8(%ebp),%esp 10e5c1: 5b pop %ebx 10e5c2: 5e pop %esi 10e5c3: c9 leave 10e5c4: e9 e7 e3 ff ff jmp 10c9b0 <_Watchdog_Insert> 0010e50b <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10e50b: 55 push %ebp 10e50c: 89 e5 mov %esp,%ebp 10e50e: 83 ec 08 sub $0x8,%esp 10e511: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e514: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx /* * 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 */ 10e51a: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10e521: 0f b6 15 f4 01 12 00 movzbl 0x1201f4,%edx 10e528: 2b 91 84 00 00 00 sub 0x84(%ecx),%edx new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 10e52e: 89 50 18 mov %edx,0x18(%eax) */ #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 ) { 10e531: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e535: 75 12 jne 10e549 <_POSIX_Threads_Sporadic_budget_callout+0x3e> <== ALWAYS TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 10e537: 39 50 14 cmp %edx,0x14(%eax) 10e53a: 73 0d jae 10e549 <_POSIX_Threads_Sporadic_budget_callout+0x3e> _Thread_Change_priority( the_thread, new_priority, true ); 10e53c: 51 push %ecx 10e53d: 6a 01 push $0x1 10e53f: 52 push %edx 10e540: 50 push %eax 10e541: e8 0e d2 ff ff call 10b754 <_Thread_Change_priority> 10e546: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 10e549: c9 leave 10e54a: c3 ret 00110338 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 110338: 55 push %ebp 110339: 89 e5 mov %esp,%ebp 11033b: 57 push %edi 11033c: 56 push %esi 11033d: 53 push %ebx 11033e: 83 ec 0c sub $0xc,%esp 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 ]; 110341: 8b 45 08 mov 0x8(%ebp),%eax 110344: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 11034a: c7 83 cc 00 00 00 01 movl $0x1,0xcc(%ebx) 110351: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110354: 8d b3 dc 00 00 00 lea 0xdc(%ebx),%esi while ( !_Chain_Is_empty( handler_stack ) ) { 11035a: eb 26 jmp 110382 <_POSIX_Threads_cancel_run+0x4a> <== ALWAYS TAKEN _ISR_Disable( level ); 11035c: 9c pushf 11035d: fa cli 11035e: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 11035f: 8b 7e 04 mov 0x4(%esi),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110362: 8b 17 mov (%edi),%edx previous = the_node->previous; 110364: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 110367: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 11036a: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 11036c: 51 push %ecx 11036d: 9d popf (*handler->routine)( handler->arg ); 11036e: 83 ec 0c sub $0xc,%esp 110371: ff 77 0c pushl 0xc(%edi) 110374: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 110377: 89 3c 24 mov %edi,(%esp) 11037a: e8 5e c8 ff ff call 10cbdd <_Workspace_Free> 11037f: 83 c4 10 add $0x10,%esp POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 110382: 39 b3 d8 00 00 00 cmp %esi,0xd8(%ebx) 110388: 75 d2 jne 11035c <_POSIX_Threads_cancel_run+0x24> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 11038a: 8d 65 f4 lea -0xc(%ebp),%esp 11038d: 5b pop %ebx 11038e: 5e pop %esi 11038f: 5f pop %edi 110390: c9 leave 110391: c3 ret 0010f118 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 10f118: 55 push %ebp 10f119: 89 e5 mov %esp,%ebp 10f11b: 56 push %esi 10f11c: 53 push %ebx 10f11d: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 10f120: 83 ec 0c sub $0xc,%esp 10f123: 53 push %ebx 10f124: e8 53 e3 ff ff call 10d47c <_Watchdog_Remove> _ISR_Disable( level ); 10f129: 9c pushf 10f12a: fa cli 10f12b: 5e pop %esi /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { 10f12c: 83 c4 10 add $0x10,%esp 10f12f: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10f133: 74 06 je 10f13b <_POSIX_Timer_Insert_helper+0x23> _ISR_Enable( level ); 10f135: 56 push %esi 10f136: 9d popf 10f137: 31 c0 xor %eax,%eax return false; 10f139: eb 33 jmp 10f16e <_POSIX_Timer_Insert_helper+0x56> <== ALWAYS TAKEN Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10f13b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 10f142: 8b 45 14 mov 0x14(%ebp),%eax 10f145: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 10f148: 8b 45 10 mov 0x10(%ebp),%eax 10f14b: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 10f14e: 8b 45 18 mov 0x18(%ebp),%eax 10f151: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10f154: 8b 45 0c mov 0xc(%ebp),%eax 10f157: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10f15a: 50 push %eax 10f15b: 50 push %eax 10f15c: 53 push %ebx 10f15d: 68 1c 63 12 00 push $0x12631c 10f162: e8 fd e1 ff ff call 10d364 <_Watchdog_Insert> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 10f167: 56 push %esi 10f168: 9d popf 10f169: b0 01 mov $0x1,%al return true; 10f16b: 83 c4 10 add $0x10,%esp } 10f16e: 8d 65 f8 lea -0x8(%ebp),%esp 10f171: 5b pop %ebx 10f172: 5e pop %esi 10f173: c9 leave 10f174: c3 ret 0010a03c <_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) { 10a03c: 55 push %ebp 10a03d: 89 e5 mov %esp,%ebp 10a03f: 53 push %ebx 10a040: 83 ec 04 sub $0x4,%esp 10a043: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10a046: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a049: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 10a04d: 75 06 jne 10a055 <_POSIX_Timer_TSR+0x19> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10a04f: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10a053: 74 34 je 10a089 <_POSIX_Timer_TSR+0x4d> <== ALWAYS TAKEN activated = _POSIX_Timer_Insert_helper( 10a055: 83 ec 0c sub $0xc,%esp 10a058: 53 push %ebx 10a059: 68 3c a0 10 00 push $0x10a03c 10a05e: ff 73 08 pushl 0x8(%ebx) 10a061: ff 73 64 pushl 0x64(%ebx) 10a064: 8d 43 10 lea 0x10(%ebx),%eax 10a067: 50 push %eax 10a068: e8 ab 50 00 00 call 10f118 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10a06d: 83 c4 20 add $0x20,%esp 10a070: 84 c0 test %al,%al 10a072: 74 30 je 10a0a4 <_POSIX_Timer_TSR+0x68> <== ALWAYS TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10a074: 83 ec 0c sub $0xc,%esp 10a077: 8d 43 6c lea 0x6c(%ebx),%eax 10a07a: 50 push %eax 10a07b: e8 34 14 00 00 call 10b4b4 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a080: c6 43 3c 03 movb $0x3,0x3c(%ebx) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a084: 83 c4 10 add $0x10,%esp 10a087: eb 04 jmp 10a08d <_POSIX_Timer_TSR+0x51> <== ALWAYS TAKEN /* 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; 10a089: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== 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 ) ) { 10a08d: 50 push %eax 10a08e: 50 push %eax 10a08f: ff 73 44 pushl 0x44(%ebx) 10a092: ff 73 38 pushl 0x38(%ebx) 10a095: e8 7a 4c 00 00 call 10ed14 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10a09a: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10a0a1: 83 c4 10 add $0x10,%esp } 10a0a4: 8b 5d fc mov -0x4(%ebp),%ebx 10a0a7: c9 leave 10a0a8: c3 ret 0011031c <_POSIX_signals_Alarm_TSR>: void _POSIX_signals_Alarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 11031c: 55 push %ebp 11031d: 89 e5 mov %esp,%ebp 11031f: 83 ec 08 sub $0x8,%esp int status; status = kill( getpid(), SIGALRM ); 110322: e8 3d ff ff ff call 110264 110327: c7 45 0c 0e 00 00 00 movl $0xe,0xc(%ebp) 11032e: 89 45 08 mov %eax,0x8(%ebp) /* XXX can't print from an ISR, should this be fatal? */ } 110331: c9 leave void *argument __attribute__((unused)) ) { int status; status = kill( getpid(), SIGALRM ); 110332: e9 01 01 00 00 jmp 110438 <== ALWAYS TAKEN 00110450 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 110450: 55 push %ebp 110451: 89 e5 mov %esp,%ebp 110453: 57 push %edi 110454: 56 push %esi 110455: 53 push %ebx 110456: 83 ec 38 sub $0x38,%esp 110459: 8b 5d 08 mov 0x8(%ebp),%ebx 11045c: 8b 75 0c mov 0xc(%ebp),%esi siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 11045f: 6a 01 push $0x1 110461: 0f b6 45 10 movzbl 0x10(%ebp),%eax 110465: 50 push %eax 110466: 8d 7d dc lea -0x24(%ebp),%edi 110469: 57 push %edi 11046a: 56 push %esi 11046b: 53 push %ebx 11046c: e8 5b 00 00 00 call 1104cc <_POSIX_signals_Clear_signals> <== ALWAYS TAKEN 110471: 83 c4 20 add $0x20,%esp 110474: 84 c0 test %al,%al 110476: 74 48 je 1104c0 <_POSIX_signals_Check_signal+0x70> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 110478: 6b d6 0c imul $0xc,%esi,%edx 11047b: 8b 82 54 47 12 00 mov 0x124754(%edx),%eax 110481: 83 f8 01 cmp $0x1,%eax 110484: 74 3a je 1104c0 <_POSIX_signals_Check_signal+0x70> <== ALWAYS TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 110486: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx 11048c: 89 4d d4 mov %ecx,-0x2c(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 11048f: 0b 8a 50 47 12 00 or 0x124750(%edx),%ecx 110495: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 11049b: 83 ba 4c 47 12 00 02 cmpl $0x2,0x12474c(%edx) 1104a2: 75 06 jne 1104aa <_POSIX_signals_Check_signal+0x5a> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 1104a4: 52 push %edx 1104a5: 6a 00 push $0x0 1104a7: 57 push %edi 1104a8: eb 03 jmp 1104ad <_POSIX_signals_Check_signal+0x5d> <== ALWAYS TAKEN &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 1104aa: 83 ec 0c sub $0xc,%esp 1104ad: 56 push %esi 1104ae: ff d0 call *%eax 1104b0: 83 c4 10 add $0x10,%esp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 1104b3: 8b 45 d4 mov -0x2c(%ebp),%eax 1104b6: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) 1104bc: b0 01 mov $0x1,%al return true; 1104be: eb 02 jmp 1104c2 <_POSIX_signals_Check_signal+0x72> <== ALWAYS TAKEN 1104c0: 31 c0 xor %eax,%eax } 1104c2: 8d 65 f4 lea -0xc(%ebp),%esp 1104c5: 5b pop %ebx 1104c6: 5e pop %esi 1104c7: 5f pop %edi 1104c8: c9 leave 1104c9: c3 ret 00111234 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 111234: 55 push %ebp 111235: 89 e5 mov %esp,%ebp 111237: 53 push %ebx 111238: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 11123b: 9c pushf 11123c: fa cli 11123d: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 11123e: 6b c1 0c imul $0xc,%ecx,%eax 111241: 83 b8 4c 47 12 00 02 cmpl $0x2,0x12474c(%eax) 111248: 75 0e jne 111258 <_POSIX_signals_Clear_process_signals+0x24> 11124a: 8d 98 20 49 12 00 lea 0x124920(%eax),%ebx 111250: 39 98 1c 49 12 00 cmp %ebx,0x12491c(%eax) 111256: 75 1d jne 111275 <_POSIX_signals_Clear_process_signals+0x41> <== ALWAYS TAKEN if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 111258: 49 dec %ecx 111259: b8 fe ff ff ff mov $0xfffffffe,%eax 11125e: d3 c0 rol %cl,%eax 111260: 23 05 18 49 12 00 and 0x124918,%eax 111266: a3 18 49 12 00 mov %eax,0x124918 if ( !_POSIX_signals_Pending ) 11126b: 85 c0 test %eax,%eax 11126d: 75 06 jne 111275 <_POSIX_signals_Clear_process_signals+0x41> <== ALWAYS TAKEN _Thread_Do_post_task_switch_extension--; 11126f: ff 0d 8c 42 12 00 decl 0x12428c } _ISR_Enable( level ); 111275: 52 push %edx 111276: 9d popf } 111277: 5b pop %ebx 111278: c9 leave 111279: c3 ret 001104cc <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 1104cc: 55 push %ebp 1104cd: 89 e5 mov %esp,%ebp 1104cf: 57 push %edi 1104d0: 56 push %esi 1104d1: 53 push %ebx 1104d2: 83 ec 1c sub $0x1c,%esp 1104d5: 8b 7d 08 mov 0x8(%ebp),%edi 1104d8: 8b 45 0c mov 0xc(%ebp),%eax 1104db: 8b 75 14 mov 0x14(%ebp),%esi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1104de: 8d 48 ff lea -0x1(%eax),%ecx 1104e1: ba 01 00 00 00 mov $0x1,%edx 1104e6: d3 e2 shl %cl,%edx /* 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 ) 1104e8: 83 c9 ff or $0xffffffff,%ecx 1104eb: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 1104ef: 74 08 je 1104f9 <_POSIX_signals_Clear_signals+0x2d> signals_blocked = ~api->signals_blocked; 1104f1: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx 1104f7: f7 d1 not %ecx 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 ); 1104f9: 9c pushf 1104fa: fa cli 1104fb: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 1104fe: 89 f3 mov %esi,%ebx 110500: 84 db test %bl,%bl 110502: 0f 84 86 00 00 00 je 11058e <_POSIX_signals_Clear_signals+0xc2> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 110508: 23 15 18 49 12 00 and 0x124918,%edx 11050e: 85 ca test %ecx,%edx 110510: 0f 84 94 00 00 00 je 1105aa <_POSIX_signals_Clear_signals+0xde> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 110516: 6b d0 0c imul $0xc,%eax,%edx 110519: 83 ba 4c 47 12 00 02 cmpl $0x2,0x12474c(%edx) 110520: 75 5c jne 11057e <_POSIX_signals_Clear_signals+0xb2> psiginfo = (POSIX_signals_Siginfo_node *) 110522: 8d b2 1c 49 12 00 lea 0x12491c(%edx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110528: 8b 9a 1c 49 12 00 mov 0x12491c(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11052e: 8d 4e 04 lea 0x4(%esi),%ecx 110531: 39 cb cmp %ecx,%ebx 110533: 75 04 jne 110539 <_POSIX_signals_Clear_signals+0x6d> 110535: 31 db xor %ebx,%ebx 110537: eb 0b jmp 110544 <_POSIX_signals_Clear_signals+0x78> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 110539: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 11053b: 89 8a 1c 49 12 00 mov %ecx,0x12491c(%edx) new_first->previous = _Chain_Head(the_chain); 110541: 89 71 04 mov %esi,0x4(%ecx) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 110544: 83 ec 0c sub $0xc,%esp 110547: 50 push %eax 110548: 89 45 e0 mov %eax,-0x20(%ebp) 11054b: e8 e4 0c 00 00 call 111234 <_POSIX_signals_Clear_process_signals> /* * 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 ) { 110550: 83 c4 10 add $0x10,%esp 110553: 85 db test %ebx,%ebx 110555: 8b 45 e0 mov -0x20(%ebp),%eax 110558: 74 24 je 11057e <_POSIX_signals_Clear_signals+0xb2> *info = psiginfo->Info; 11055a: 8d 73 08 lea 0x8(%ebx),%esi 11055d: b9 03 00 00 00 mov $0x3,%ecx 110562: 8b 7d 10 mov 0x10(%ebp),%edi 110565: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 110567: c7 03 d0 48 12 00 movl $0x1248d0,(%ebx) old_last_node = the_chain->last; 11056d: 8b 15 d4 48 12 00 mov 0x1248d4,%edx the_chain->last = the_node; 110573: 89 1d d4 48 12 00 mov %ebx,0x1248d4 old_last_node->next = the_node; 110579: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 11057b: 89 53 04 mov %edx,0x4(%ebx) &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 11057e: 83 ec 0c sub $0xc,%esp 110581: 50 push %eax 110582: e8 ad 0c 00 00 call 111234 <_POSIX_signals_Clear_process_signals> <== ALWAYS TAKEN 110587: b0 01 mov $0x1,%al 110589: 83 c4 10 add $0x10,%esp 11058c: eb 1e jmp 1105ac <_POSIX_signals_Clear_signals+0xe0> <== ALWAYS TAKEN do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 11058e: 8b 87 c8 00 00 00 mov 0xc8(%edi),%eax 110594: 89 d6 mov %edx,%esi 110596: 21 c6 and %eax,%esi 110598: 85 ce test %ecx,%esi 11059a: 74 0e je 1105aa <_POSIX_signals_Clear_signals+0xde> api->signals_pending &= ~mask; 11059c: f7 d2 not %edx 11059e: 21 c2 and %eax,%edx 1105a0: 89 97 c8 00 00 00 mov %edx,0xc8(%edi) 1105a6: b0 01 mov $0x1,%al 1105a8: eb 02 jmp 1105ac <_POSIX_signals_Clear_signals+0xe0> <== ALWAYS TAKEN 1105aa: 31 c0 xor %eax,%eax do_callout = true; } } _ISR_Enable( level ); 1105ac: ff 75 e4 pushl -0x1c(%ebp) 1105af: 9d popf return do_callout; } 1105b0: 8d 65 f4 lea -0xc(%ebp),%esp 1105b3: 5b pop %ebx 1105b4: 5e pop %esi 1105b5: 5f pop %edi 1105b6: c9 leave 1105b7: c3 ret 0010a8dc <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10a8dc: 55 push %ebp 10a8dd: 89 e5 mov %esp,%ebp 10a8df: 56 push %esi 10a8e0: 53 push %ebx 10a8e1: 8b 55 08 mov 0x8(%ebp),%edx 10a8e4: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10a8e9: bb 01 00 00 00 mov $0x1,%ebx 10a8ee: 8d 48 ff lea -0x1(%eax),%ecx 10a8f1: 89 de mov %ebx,%esi 10a8f3: d3 e6 shl %cl,%esi 10a8f5: 85 d6 test %edx,%esi 10a8f7: 75 1e jne 10a917 <_POSIX_signals_Get_highest+0x3b> <== ALWAYS TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10a8f9: 40 inc %eax 10a8fa: 83 f8 20 cmp $0x20,%eax 10a8fd: 75 ef jne 10a8ee <_POSIX_signals_Get_highest+0x12> 10a8ff: b0 01 mov $0x1,%al #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10a901: bb 01 00 00 00 mov $0x1,%ebx 10a906: 8d 48 ff lea -0x1(%eax),%ecx 10a909: 89 de mov %ebx,%esi 10a90b: d3 e6 shl %cl,%esi 10a90d: 85 d6 test %edx,%esi 10a90f: 75 06 jne 10a917 <_POSIX_signals_Get_highest+0x3b> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10a911: 40 inc %eax 10a912: 83 f8 1b cmp $0x1b,%eax 10a915: 75 ef jne 10a906 <_POSIX_signals_Get_highest+0x2a> <== NEVER TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10a917: 5b pop %ebx 10a918: 5e pop %esi 10a919: c9 leave 10a91a: c3 ret 0010e140 <_POSIX_signals_Manager_Initialization>: * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) { 10e140: 55 push %ebp 10e141: 89 e5 mov %esp,%ebp 10e143: 57 push %edi 10e144: 56 push %esi 10e145: 53 push %ebx 10e146: 83 ec 18 sub $0x18,%esp uint32_t signo; uint32_t maximum_queued_signals; maximum_queued_signals = Configuration_POSIX_API.maximum_queued_signals; 10e149: 8b 1d 30 25 12 00 mov 0x122530,%ebx assert( sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors) ); #endif memcpy( 10e14f: b8 4c 47 12 00 mov $0x12474c,%eax 10e154: be 94 ec 11 00 mov $0x11ec94,%esi 10e159: b9 60 00 00 00 mov $0x60,%ecx 10e15e: 89 c7 mov %eax,%edi 10e160: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ); /* * Initialize the set of pending signals for the entire process */ sigemptyset( &_POSIX_signals_Pending ); 10e162: 68 18 49 12 00 push $0x124918 10e167: e8 b0 04 00 00 call 10e61c <== ALWAYS TAKEN /* * Initialize the queue we use to block for signals */ _Thread_queue_Initialize( 10e16c: 6a 0b push $0xb 10e16e: 68 00 80 00 10 push $0x10008000 10e173: 6a 00 push $0x0 10e175: 68 d8 48 12 00 push $0x1248d8 10e17a: e8 1d e1 ff ff call 10c29c <_Thread_queue_Initialize> 10e17f: b8 28 49 12 00 mov $0x124928,%eax /*PAGE * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) 10e184: 83 c4 20 add $0x20,%esp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e187: 8d 50 04 lea 0x4(%eax),%edx 10e18a: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10e18c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10e193: 89 40 08 mov %eax,0x8(%eax) 10e196: 83 c0 0c add $0xc,%eax /* XXX status codes */ /* * Allocate the siginfo pools. */ for ( signo=1 ; signo<= SIGRTMAX ; signo++ ) 10e199: 3d 9c 4a 12 00 cmp $0x124a9c,%eax 10e19e: 75 e7 jne 10e187 <_POSIX_signals_Manager_Initialization+0x47> _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] ); if ( maximum_queued_signals ) { 10e1a0: 85 db test %ebx,%ebx 10e1a2: 74 1f je 10e1c3 <_POSIX_signals_Manager_Initialization+0x83> _Chain_Initialize( 10e1a4: 83 ec 0c sub $0xc,%esp 10e1a7: 6b c3 14 imul $0x14,%ebx,%eax 10e1aa: 50 push %eax 10e1ab: e8 e8 e9 ff ff call 10cb98 <_Workspace_Allocate_or_fatal_error> 10e1b0: 6a 14 push $0x14 10e1b2: 53 push %ebx 10e1b3: 50 push %eax 10e1b4: 68 cc 48 12 00 push $0x1248cc 10e1b9: e8 02 0a 00 00 call 10ebc0 <_Chain_Initialize> <== ALWAYS TAKEN 10e1be: 83 c4 20 add $0x20,%esp 10e1c1: eb 1e jmp 10e1e1 <_POSIX_signals_Manager_Initialization+0xa1> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e1c3: c7 05 cc 48 12 00 d0 movl $0x1248d0,0x1248cc 10e1ca: 48 12 00 the_chain->permanent_null = NULL; 10e1cd: c7 05 d0 48 12 00 00 movl $0x0,0x1248d0 10e1d4: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e1d7: c7 05 d4 48 12 00 cc movl $0x1248cc,0x1248d4 10e1de: 48 12 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10e1e1: c7 05 58 4b 12 00 00 movl $0x0,0x124b58 10e1e8: 00 00 00 the_watchdog->routine = routine; 10e1eb: c7 05 6c 4b 12 00 00 movl $0x0,0x124b6c 10e1f2: 00 00 00 the_watchdog->id = id; 10e1f5: c7 05 70 4b 12 00 00 movl $0x0,0x124b70 10e1fc: 00 00 00 the_watchdog->user_data = user_data; 10e1ff: c7 05 74 4b 12 00 00 movl $0x0,0x124b74 10e206: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10e209: c7 05 a4 4a 12 00 00 movl $0x0,0x124aa4 10e210: 00 00 00 the_watchdog->routine = routine; 10e213: c7 05 b8 4a 12 00 00 movl $0x0,0x124ab8 10e21a: 00 00 00 the_watchdog->id = id; 10e21d: c7 05 bc 4a 12 00 00 movl $0x0,0x124abc 10e224: 00 00 00 the_watchdog->user_data = user_data; 10e227: c7 05 c0 4a 12 00 00 movl $0x0,0x124ac0 10e22e: 00 00 00 /* * Initialize the Alarm Timer */ _Watchdog_Initialize( &_POSIX_signals_Alarm_timer, NULL, 0, NULL ); _Watchdog_Initialize( &_POSIX_signals_Ualarm_timer, NULL, 0, NULL ); } 10e231: 8d 65 f4 lea -0xc(%ebp),%esp 10e234: 5b pop %ebx 10e235: 5e pop %esi 10e236: 5f pop %edi 10e237: c9 leave 10e238: c3 ret 0010e239 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10e239: 55 push %ebp 10e23a: 89 e5 mov %esp,%ebp 10e23c: 56 push %esi 10e23d: 53 push %ebx POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e23e: 8b 45 08 mov 0x8(%ebp),%eax 10e241: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx * * 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 ); 10e247: 9c pushf 10e248: fa cli 10e249: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 10e24a: 8b 15 18 49 12 00 mov 0x124918,%edx 10e250: 0b 93 c8 00 00 00 or 0xc8(%ebx),%edx * 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 & 10e256: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax 10e25c: f7 d0 not %eax 10e25e: 85 c2 test %eax,%edx 10e260: 75 09 jne 10e26b <_POSIX_signals_Post_switch_extension+0x32> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10e262: 51 push %ecx 10e263: 9d popf for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 10e264: 8d 65 f8 lea -0x8(%ebp),%esp 10e267: 5b pop %ebx 10e268: 5e pop %esi 10e269: c9 leave 10e26a: c3 ret if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 10e26b: 51 push %ecx 10e26c: 9d popf 10e26d: be 1b 00 00 00 mov $0x1b,%esi for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10e272: 52 push %edx 10e273: 6a 00 push $0x0 10e275: 56 push %esi 10e276: 53 push %ebx 10e277: e8 d4 21 00 00 call 110450 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10e27c: 83 c4 0c add $0xc,%esp 10e27f: 6a 01 push $0x1 10e281: 56 push %esi 10e282: 53 push %ebx 10e283: e8 c8 21 00 00 call 110450 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10e288: 46 inc %esi 10e289: 83 c4 10 add $0x10,%esp 10e28c: 83 fe 20 cmp $0x20,%esi 10e28f: 75 e1 jne 10e272 <_POSIX_signals_Post_switch_extension+0x39> 10e291: 66 be 01 00 mov $0x1,%si _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 ); 10e295: 50 push %eax 10e296: 6a 00 push $0x0 10e298: 56 push %esi 10e299: 53 push %ebx 10e29a: e8 b1 21 00 00 call 110450 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10e29f: 83 c4 0c add $0xc,%esp 10e2a2: 6a 01 push $0x1 10e2a4: 56 push %esi 10e2a5: 53 push %ebx 10e2a6: e8 a5 21 00 00 call 110450 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10e2ab: 46 inc %esi 10e2ac: 83 c4 10 add $0x10,%esp 10e2af: 83 fe 1b cmp $0x1b,%esi 10e2b2: 75 e1 jne 10e295 <_POSIX_signals_Post_switch_extension+0x5c> 10e2b4: eb 91 jmp 10e247 <_POSIX_signals_Post_switch_extension+0xe> <== ALWAYS TAKEN 0010e726 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 10e726: 55 push %ebp 10e727: 89 e5 mov %esp,%ebp 10e729: 83 ec 08 sub $0x8,%esp /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 10e72c: e8 33 1b 00 00 call 110264 10e731: 52 push %edx 10e732: 52 push %edx 10e733: 6a 0e push $0xe 10e735: 50 push %eax 10e736: e8 fd 1c 00 00 call 110438 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 10e73b: c7 04 24 9c 4a 12 00 movl $0x124a9c,(%esp) 10e742: e8 81 e3 ff ff call 10cac8 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10e747: 83 c4 10 add $0x10,%esp 10e74a: c7 45 0c 9c 4a 12 00 movl $0x124a9c,0xc(%ebp) 10e751: c7 45 08 c8 42 12 00 movl $0x1242c8,0x8(%ebp) /* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); } 10e758: c9 leave 10e759: e9 52 e2 ff ff jmp 10c9b0 <_Watchdog_Insert> 001112a0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 1112a0: 55 push %ebp 1112a1: 89 e5 mov %esp,%ebp 1112a3: 57 push %edi 1112a4: 56 push %esi 1112a5: 53 push %ebx 1112a6: 83 ec 0c sub $0xc,%esp 1112a9: 8b 5d 08 mov 0x8(%ebp),%ebx 1112ac: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1112af: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 1112b5: 8d 4a ff lea -0x1(%edx),%ecx 1112b8: b8 01 00 00 00 mov $0x1,%eax 1112bd: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1112bf: 8b 4b 10 mov 0x10(%ebx),%ecx 1112c2: 89 cf mov %ecx,%edi 1112c4: 81 e7 00 80 00 10 and $0x10008000,%edi 1112ca: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1112d0: 75 50 jne 111322 <_POSIX_signals_Unblock_thread+0x82> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 1112d2: 85 43 30 test %eax,0x30(%ebx) 1112d5: 75 10 jne 1112e7 <_POSIX_signals_Unblock_thread+0x47> 1112d7: 8b 8e c4 00 00 00 mov 0xc4(%esi),%ecx 1112dd: f7 d1 not %ecx 1112df: 85 c8 test %ecx,%eax 1112e1: 0f 84 a4 00 00 00 je 11138b <_POSIX_signals_Unblock_thread+0xeb> the_thread->Wait.return_code = EINTR; 1112e7: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 1112ee: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 1112f1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1112f5: 75 12 jne 111309 <_POSIX_signals_Unblock_thread+0x69> the_info->si_signo = signo; 1112f7: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 1112f9: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 111300: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 111307: eb 0c jmp 111315 <_POSIX_signals_Unblock_thread+0x75> <== ALWAYS TAKEN } else { *the_info = *info; 111309: b9 03 00 00 00 mov $0x3,%ecx 11130e: 89 c7 mov %eax,%edi 111310: 8b 75 10 mov 0x10(%ebp),%esi 111313: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 111315: 83 ec 0c sub $0xc,%esp 111318: 53 push %ebx 111319: e8 2e af ff ff call 10c24c <_Thread_queue_Extract_with_proxy> 11131e: b0 01 mov $0x1,%al 111320: eb 48 jmp 11136a <_POSIX_signals_Unblock_thread+0xca> <== ALWAYS TAKEN } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 111322: 8b 96 c4 00 00 00 mov 0xc4(%esi),%edx 111328: f7 d2 not %edx 11132a: 85 d0 test %edx,%eax 11132c: 74 5d je 11138b <_POSIX_signals_Unblock_thread+0xeb> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 11132e: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 111332: f7 c1 00 00 00 10 test $0x10000000,%ecx 111338: 74 35 je 11136f <_POSIX_signals_Unblock_thread+0xcf> the_thread->Wait.return_code = EINTR; 11133a: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) #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) ){ 111341: 80 e1 08 and $0x8,%cl 111344: 74 45 je 11138b <_POSIX_signals_Unblock_thread+0xeb> <== ALWAYS TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111346: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11134a: 75 0f jne 11135b <_POSIX_signals_Unblock_thread+0xbb> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 11134c: 83 ec 0c sub $0xc,%esp 11134f: 8d 43 48 lea 0x48(%ebx),%eax 111352: 50 push %eax 111353: e8 70 b7 ff ff call 10cac8 <_Watchdog_Remove> 111358: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11135b: 50 push %eax 11135c: 50 push %eax 11135d: 68 f8 ff 03 10 push $0x1003fff8 111362: 53 push %ebx 111363: e8 0c a5 ff ff call 10b874 <_Thread_Clear_state> 111368: 31 c0 xor %eax,%eax 11136a: 83 c4 10 add $0x10,%esp 11136d: eb 1e jmp 11138d <_POSIX_signals_Unblock_thread+0xed> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 11136f: 85 c9 test %ecx,%ecx 111371: 75 18 jne 11138b <_POSIX_signals_Unblock_thread+0xeb> <== ALWAYS TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 111373: a1 84 42 12 00 mov 0x124284,%eax 111378: 85 c0 test %eax,%eax 11137a: 74 0f je 11138b <_POSIX_signals_Unblock_thread+0xeb> 11137c: 3b 1d a8 42 12 00 cmp 0x1242a8,%ebx 111382: 75 07 jne 11138b <_POSIX_signals_Unblock_thread+0xeb> <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 111384: c6 05 3c 43 12 00 01 movb $0x1,0x12433c 11138b: 31 c0 xor %eax,%eax } } return false; } 11138d: 8d 65 f4 lea -0xc(%ebp),%esp 111390: 5b pop %ebx 111391: 5e pop %esi 111392: 5f pop %edi 111393: c9 leave 111394: c3 ret 0010b690 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 10b690: 55 push %ebp 10b691: 89 e5 mov %esp,%ebp 10b693: 83 ec 24 sub $0x24,%esp void *p; _RTEMS_Lock_allocator(); 10b696: ff 35 a0 42 12 00 pushl 0x1242a0 10b69c: e8 77 f0 ff ff call 10a718 <_API_Mutex_Lock> <== ALWAYS TAKEN p = _Heap_Allocate_aligned_with_boundary( 10b6a1: ff 75 14 pushl 0x14(%ebp) 10b6a4: ff 75 10 pushl 0x10(%ebp) 10b6a7: ff 75 0c pushl 0xc(%ebp) 10b6aa: ff 75 08 pushl 0x8(%ebp) 10b6ad: e8 76 37 00 00 call 10ee28 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 10b6b2: 83 c4 14 add $0x14,%esp 10b6b5: ff 35 a0 42 12 00 pushl 0x1242a0 10b6bb: 89 45 f4 mov %eax,-0xc(%ebp) 10b6be: e8 9d f0 ff ff call 10a760 <_API_Mutex_Unlock> <== ALWAYS TAKEN return p; } 10b6c3: 8b 45 f4 mov -0xc(%ebp),%eax 10b6c6: c9 leave 10b6c7: c3 ret 0010b6c8 <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 10b6c8: 55 push %ebp 10b6c9: 89 e5 mov %esp,%ebp 10b6cb: 83 ec 24 sub $0x24,%esp bool status; _RTEMS_Lock_allocator(); 10b6ce: ff 35 a0 42 12 00 pushl 0x1242a0 10b6d4: e8 3f f0 ff ff call 10a718 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Free( the_heap, start_address ); 10b6d9: 59 pop %ecx 10b6da: 58 pop %eax 10b6db: ff 75 0c pushl 0xc(%ebp) 10b6de: ff 75 08 pushl 0x8(%ebp) 10b6e1: e8 a2 38 00 00 call 10ef88 <_Heap_Free> <== ALWAYS TAKEN _RTEMS_Unlock_allocator(); 10b6e6: 5a pop %edx 10b6e7: ff 35 a0 42 12 00 pushl 0x1242a0 10b6ed: 88 45 f4 mov %al,-0xc(%ebp) 10b6f0: e8 6b f0 ff ff call 10a760 <_API_Mutex_Unlock> <== ALWAYS TAKEN return status; } 10b6f5: 8a 45 f4 mov -0xc(%ebp),%al 10b6f8: c9 leave 10b6f9: c3 ret 00128a24 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 128a24: 55 push %ebp 128a25: 89 e5 mov %esp,%ebp 128a27: 56 push %esi 128a28: 53 push %ebx 128a29: 8b 5d 08 mov 0x8(%ebp),%ebx 128a2c: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 128a2f: 85 db test %ebx,%ebx 128a31: 74 2e je 128a61 <_Protected_heap_Get_information+0x3d> return false; if ( !the_info ) 128a33: 85 f6 test %esi,%esi 128a35: 74 2a je 128a61 <_Protected_heap_Get_information+0x3d> return false; _RTEMS_Lock_allocator(); 128a37: 83 ec 0c sub $0xc,%esp 128a3a: ff 35 80 3c 16 00 pushl 0x163c80 128a40: e8 47 72 fe ff call 10fc8c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 128a45: 5a pop %edx 128a46: 59 pop %ecx 128a47: 56 push %esi 128a48: 53 push %ebx 128a49: e8 ca cb 00 00 call 135618 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 128a4e: 58 pop %eax 128a4f: ff 35 80 3c 16 00 pushl 0x163c80 128a55: e8 7a 72 fe ff call 10fcd4 <_API_Mutex_Unlock> 128a5a: b0 01 mov $0x1,%al return true; 128a5c: 83 c4 10 add $0x10,%esp 128a5f: eb 02 jmp 128a63 <_Protected_heap_Get_information+0x3f> <== ALWAYS TAKEN 128a61: 31 c0 xor %eax,%eax } 128a63: 8d 65 f8 lea -0x8(%ebp),%esp 128a66: 5b pop %ebx 128a67: 5e pop %esi 128a68: c9 leave 128a69: c3 ret 0010eaf8 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 10eaf8: 55 push %ebp 10eaf9: 89 e5 mov %esp,%ebp 10eafb: 56 push %esi 10eafc: 53 push %ebx 10eafd: 8b 5d 0c mov 0xc(%ebp),%ebx void (*dtor)(void *); void *value; dtor = tvp->dtor; 10eb00: 8b 43 10 mov 0x10(%ebx),%eax if (_Thread_Is_executing(the_thread)) { 10eb03: 8b 55 08 mov 0x8(%ebp),%edx 10eb06: 3b 15 a8 42 12 00 cmp 0x1242a8,%edx 10eb0c: 75 0c jne 10eb1a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x22> value = *tvp->ptr; 10eb0e: 8b 4b 04 mov 0x4(%ebx),%ecx 10eb11: 8b 11 mov (%ecx),%edx *tvp->ptr = tvp->gval; 10eb13: 8b 73 08 mov 0x8(%ebx),%esi 10eb16: 89 31 mov %esi,(%ecx) 10eb18: eb 03 jmp 10eb1d <_RTEMS_Tasks_Invoke_task_variable_dtor+0x25> <== ALWAYS TAKEN } else { value = tvp->tval; 10eb1a: 8b 53 0c mov 0xc(%ebx),%edx } if ( dtor ) 10eb1d: 85 c0 test %eax,%eax 10eb1f: 74 09 je 10eb2a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x32> (*dtor)(value); 10eb21: 83 ec 0c sub $0xc,%esp 10eb24: 52 push %edx 10eb25: ff d0 call *%eax 10eb27: 83 c4 10 add $0x10,%esp _Workspace_Free(tvp); 10eb2a: 89 5d 08 mov %ebx,0x8(%ebp) } 10eb2d: 8d 65 f8 lea -0x8(%ebp),%esp 10eb30: 5b pop %ebx 10eb31: 5e pop %esi 10eb32: c9 leave } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 10eb33: e9 a5 e0 ff ff jmp 10cbdd <_Workspace_Free> 0010ea1d <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10ea1d: 55 push %ebp 10ea1e: 89 e5 mov %esp,%ebp 10ea20: 53 push %ebx 10ea21: 83 ec 10 sub $0x10,%esp 10ea24: 8b 5d 0c mov 0xc(%ebp),%ebx /* * 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() ) 10ea27: 80 3d c4 01 12 00 01 cmpb $0x1,0x1201c4 10ea2e: 19 c0 sbb %eax,%eax 10ea30: 83 e0 c0 and $0xffffffc0,%eax 10ea33: 83 c0 60 add $0x60,%eax to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 10ea36: 50 push %eax 10ea37: e8 88 e1 ff ff call 10cbc4 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !api ) 10ea3c: 83 c4 10 add $0x10,%esp 10ea3f: 31 d2 xor %edx,%edx 10ea41: 85 c0 test %eax,%eax 10ea43: 74 5f je 10eaa4 <_RTEMS_tasks_Create_extension+0x87> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 10ea45: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 10ea4b: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 10ea51: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10ea58: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10ea5c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10ea63: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10ea6a: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10ea71: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10ea78: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 10ea7f: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx) 10ea86: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 10ea89: 80 3d c4 01 12 00 00 cmpb $0x0,0x1201c4 10ea90: 74 10 je 10eaa2 <_RTEMS_tasks_Create_extension+0x85> 10ea92: 31 d2 xor %edx,%edx for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 10ea94: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 10ea9b: 00 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++) 10ea9c: 42 inc %edx 10ea9d: 83 fa 10 cmp $0x10,%edx 10eaa0: 75 f2 jne 10ea94 <_RTEMS_tasks_Create_extension+0x77> 10eaa2: b2 01 mov $0x1,%dl api->Notepads[i] = 0; } return true; } 10eaa4: 88 d0 mov %dl,%al 10eaa6: 8b 5d fc mov -0x4(%ebp),%ebx 10eaa9: c9 leave 10eaaa: c3 ret 0010e9cd <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 10e9cd: 55 push %ebp 10e9ce: 89 e5 mov %esp,%ebp 10e9d0: 56 push %esi 10e9d1: 53 push %ebx 10e9d2: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 10e9d5: 8b 83 04 01 00 00 mov 0x104(%ebx),%eax deleted->task_variables = NULL; 10e9db: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx) 10e9e2: 00 00 00 while (tvp) { 10e9e5: eb 10 jmp 10e9f7 <_RTEMS_tasks_Delete_extension+0x2a> <== ALWAYS TAKEN next = (rtems_task_variable_t *)tvp->next; 10e9e7: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 10e9e9: 52 push %edx 10e9ea: 52 push %edx 10e9eb: 50 push %eax 10e9ec: 53 push %ebx 10e9ed: e8 06 01 00 00 call 10eaf8 <_RTEMS_Tasks_Invoke_task_variable_dtor> 10e9f2: 89 f0 mov %esi,%eax 10e9f4: 83 c4 10 add $0x10,%esp * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 10e9f7: 85 c0 test %eax,%eax 10e9f9: 75 ec jne 10e9e7 <_RTEMS_tasks_Delete_extension+0x1a> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 10e9fb: 83 ec 0c sub $0xc,%esp 10e9fe: ff b3 f4 00 00 00 pushl 0xf4(%ebx) 10ea04: e8 d4 e1 ff ff call 10cbdd <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 10ea09: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10ea10: 00 00 00 10ea13: 83 c4 10 add $0x10,%esp } 10ea16: 8d 65 f8 lea -0x8(%ebp),%esp 10ea19: 5b pop %ebx 10ea1a: 5e pop %esi 10ea1b: c9 leave 10ea1c: c3 ret 0010a2a0 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10a2a0: 55 push %ebp 10a2a1: 89 e5 mov %esp,%ebp 10a2a3: 57 push %edi 10a2a4: 56 push %esi 10a2a5: 53 push %ebx 10a2a6: 83 ec 2c sub $0x2c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10a2a9: 8b 1d ec 01 12 00 mov 0x1201ec,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10a2af: a1 e8 01 12 00 mov 0x1201e8,%eax 10a2b4: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10a2b7: 85 db test %ebx,%ebx 10a2b9: 74 4e je 10a309 <_RTEMS_tasks_Initialize_user_tasks_body+0x69> 10a2bb: 31 f6 xor %esi,%esi /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 10a2bd: 8d 7d e4 lea -0x1c(%ebp),%edi 10a2c0: eb 42 jmp 10a304 <_RTEMS_tasks_Initialize_user_tasks_body+0x64> <== ALWAYS TAKEN 10a2c2: 50 push %eax 10a2c3: 50 push %eax 10a2c4: 57 push %edi 10a2c5: ff 73 0c pushl 0xc(%ebx) 10a2c8: ff 73 14 pushl 0x14(%ebx) 10a2cb: ff 73 04 pushl 0x4(%ebx) 10a2ce: ff 73 08 pushl 0x8(%ebx) 10a2d1: ff 33 pushl (%ebx) 10a2d3: e8 d0 fd ff ff call 10a0a8 <== ALWAYS TAKEN user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10a2d8: 83 c4 20 add $0x20,%esp 10a2db: 85 c0 test %eax,%eax 10a2dd: 75 19 jne 10a2f8 <_RTEMS_tasks_Initialize_user_tasks_body+0x58> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10a2df: 51 push %ecx 10a2e0: ff 73 18 pushl 0x18(%ebx) 10a2e3: ff 73 10 pushl 0x10(%ebx) 10a2e6: ff 75 e4 pushl -0x1c(%ebp) 10a2e9: e8 26 00 00 00 call 10a314 <== ALWAYS TAKEN 10a2ee: 83 c3 1c add $0x1c,%ebx id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10a2f1: 83 c4 10 add $0x10,%esp 10a2f4: 85 c0 test %eax,%eax 10a2f6: 74 0b je 10a303 <_RTEMS_tasks_Initialize_user_tasks_body+0x63> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10a2f8: 52 push %edx 10a2f9: 50 push %eax 10a2fa: 6a 01 push $0x1 10a2fc: 6a 01 push $0x1 10a2fe: e8 51 0c 00 00 call 10af54 <_Internal_error_Occurred> <== ALWAYS TAKEN return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10a303: 46 inc %esi 10a304: 3b 75 d4 cmp -0x2c(%ebp),%esi 10a307: 72 b9 jb 10a2c2 <_RTEMS_tasks_Initialize_user_tasks_body+0x22> user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10a309: 8d 65 f4 lea -0xc(%ebp),%esp 10a30c: 5b pop %ebx 10a30d: 5e pop %esi 10a30e: 5f pop %edi 10a30f: c9 leave 10a310: c3 ret 0010e929 <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { 10e929: 55 push %ebp 10e92a: 89 e5 mov %esp,%ebp 10e92c: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10e92f: 6a 04 push $0x4 10e931: 6a 00 push $0x0 10e933: 68 08 01 00 00 push $0x108 10e938: ff 35 c0 01 12 00 pushl 0x1201c0 10e93e: 6a 01 push $0x1 10e940: 6a 02 push $0x2 10e942: 68 74 41 12 00 push $0x124174 10e947: e8 0c cb ff ff call 10b458 <_Objects_Initialize_information> RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); 10e94c: 83 c4 14 add $0x14,%esp 10e94f: 68 b8 1f 12 00 push $0x121fb8 10e954: e8 4f 0c 00 00 call 10f5a8 <_User_extensions_Add_set> <== ALWAYS TAKEN * Add all the extensions for this API */ _User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions ); _API_extensions_Add( &_RTEMS_tasks_API_extensions ); 10e959: c7 04 24 a8 1f 12 00 movl $0x121fa8,(%esp) 10e960: e8 43 bd ff ff call 10a6a8 <_API_extensions_Add> 10e965: 83 c4 10 add $0x10,%esp MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } 10e968: c9 leave 10e969: c3 ret 0010e96a <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e96a: 55 push %ebp 10e96b: 89 e5 mov %esp,%ebp 10e96d: 57 push %edi 10e96e: 56 push %esi 10e96f: 53 push %ebx 10e970: 83 ec 1c sub $0x1c,%esp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10e973: 8b 45 08 mov 0x8(%ebp),%eax 10e976: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 10e97c: 85 db test %ebx,%ebx 10e97e: 74 45 je 10e9c5 <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e980: 9c pushf 10e981: fa cli 10e982: 58 pop %eax signal_set = asr->signals_posted; 10e983: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e986: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e98d: 50 push %eax 10e98e: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e98f: 85 ff test %edi,%edi 10e991: 74 32 je 10e9c5 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10e993: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e996: 50 push %eax 10e997: 8d 75 e4 lea -0x1c(%ebp),%esi 10e99a: 56 push %esi 10e99b: 68 ff ff 00 00 push $0xffff 10e9a0: ff 73 10 pushl 0x10(%ebx) 10e9a3: e8 60 1e 00 00 call 110808 (*asr->handler)( signal_set ); 10e9a8: 89 3c 24 mov %edi,(%esp) 10e9ab: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e9ae: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e9b1: 83 c4 0c add $0xc,%esp 10e9b4: 56 push %esi 10e9b5: 68 ff ff 00 00 push $0xffff 10e9ba: ff 75 e4 pushl -0x1c(%ebp) 10e9bd: e8 46 1e 00 00 call 110808 10e9c2: 83 c4 10 add $0x10,%esp } 10e9c5: 8d 65 f4 lea -0xc(%ebp),%esp 10e9c8: 5b pop %ebx 10e9c9: 5e pop %esi 10e9ca: 5f pop %edi 10e9cb: c9 leave 10e9cc: c3 ret 0010e8d4 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 10e8d4: 55 push %ebp 10e8d5: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 10e8d7: 8b 45 08 mov 0x8(%ebp),%eax 10e8da: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 10e8e0: eb 0f jmp 10e8f1 <_RTEMS_tasks_Switch_extension+0x1d> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; 10e8e2: 8b 50 04 mov 0x4(%eax),%edx 10e8e5: 8b 0a mov (%edx),%ecx 10e8e7: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 10e8ea: 8b 48 08 mov 0x8(%eax),%ecx 10e8ed: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10e8ef: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 10e8f1: 85 c0 test %eax,%eax 10e8f3: 75 ed jne 10e8e2 <_RTEMS_tasks_Switch_extension+0xe> tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 10e8f5: 8b 45 0c mov 0xc(%ebp),%eax 10e8f8: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 10e8fe: eb 0f jmp 10e90f <_RTEMS_tasks_Switch_extension+0x3b> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; 10e900: 8b 50 04 mov 0x4(%eax),%edx 10e903: 8b 0a mov (%edx),%ecx 10e905: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 10e908: 8b 48 0c mov 0xc(%eax),%ecx 10e90b: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10e90d: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 10e90f: 85 c0 test %eax,%eax 10e911: 75 ed jne 10e900 <_RTEMS_tasks_Switch_extension+0x2c> tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 10e913: c9 leave 10e914: c3 ret 00135488 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 135488: 55 push %ebp 135489: 89 e5 mov %esp,%ebp 13548b: 53 push %ebx 13548c: 83 ec 18 sub $0x18,%esp 13548f: 8d 45 f4 lea -0xc(%ebp),%eax 135492: 50 push %eax 135493: ff 75 08 pushl 0x8(%ebp) 135496: 68 50 47 16 00 push $0x164750 13549b: e8 d0 b8 fd ff call 110d70 <_Objects_Get> 1354a0: 89 c3 mov %eax,%ebx /* * 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 ) { 1354a2: 83 c4 10 add $0x10,%esp 1354a5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1354a9: 75 64 jne 13550f <_Rate_monotonic_Timeout+0x87> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 1354ab: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 1354ae: f6 40 11 40 testb $0x40,0x11(%eax) 1354b2: 74 18 je 1354cc <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 1354b4: 8b 50 20 mov 0x20(%eax),%edx 1354b7: 3b 53 08 cmp 0x8(%ebx),%edx 1354ba: 75 10 jne 1354cc <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1354bc: 52 push %edx 1354bd: 52 push %edx 1354be: 68 f8 ff 03 10 push $0x1003fff8 1354c3: 50 push %eax 1354c4: e8 cb bd fd ff call 111294 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 1354c9: 59 pop %ecx 1354ca: eb 10 jmp 1354dc <_Rate_monotonic_Timeout+0x54> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 1354cc: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 1354d0: 75 2b jne 1354fd <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 1354d2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 1354d9: 83 ec 0c sub $0xc,%esp 1354dc: 53 push %ebx 1354dd: e8 52 fc ff ff call 135134 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1354e2: 8b 43 3c mov 0x3c(%ebx),%eax 1354e5: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1354e8: 58 pop %eax 1354e9: 5a pop %edx 1354ea: 83 c3 10 add $0x10,%ebx 1354ed: 53 push %ebx 1354ee: 68 a8 3c 16 00 push $0x163ca8 1354f3: e8 d8 ce fd ff call 1123d0 <_Watchdog_Insert> 1354f8: 83 c4 10 add $0x10,%esp 1354fb: eb 07 jmp 135504 <_Rate_monotonic_Timeout+0x7c> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 1354fd: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 135504: a1 cc 3b 16 00 mov 0x163bcc,%eax 135509: 48 dec %eax 13550a: a3 cc 3b 16 00 mov %eax,0x163bcc case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13550f: 8b 5d fc mov -0x4(%ebp),%ebx 135512: c9 leave 135513: c3 ret 0013522e <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13522e: 55 push %ebp 13522f: 89 e5 mov %esp,%ebp 135231: 56 push %esi 135232: 53 push %ebx 135233: 83 ec 10 sub $0x10,%esp 135236: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 135239: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 13523c: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 135240: 75 03 jne 135245 <_Rate_monotonic_Update_statistics+0x17> stats->missed_count++; 135242: ff 43 58 incl 0x58(%ebx) /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 135245: 52 push %edx 135246: 8d 75 f0 lea -0x10(%ebp),%esi 135249: 56 push %esi 13524a: 8d 45 e8 lea -0x18(%ebp),%eax 13524d: 50 push %eax 13524e: 53 push %ebx 13524f: e8 48 ff ff ff call 13519c <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) 135254: 83 c4 10 add $0x10,%esp 135257: 84 c0 test %al,%al 135259: 0f 84 a3 00 00 00 je 135302 <_Rate_monotonic_Update_statistics+0xd4> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13525f: 50 push %eax 135260: 50 push %eax 135261: 56 push %esi 135262: 8d 43 6c lea 0x6c(%ebx),%eax 135265: 50 push %eax 135266: e8 d1 ce fd ff call 11213c <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 13526b: 5a pop %edx 13526c: 59 pop %ecx 13526d: 8d 43 5c lea 0x5c(%ebx),%eax 135270: 50 push %eax 135271: 56 push %esi 135272: e8 51 05 00 00 call 1357c8 <_Timespec_Less_than> 135277: 83 c4 10 add $0x10,%esp 13527a: 84 c0 test %al,%al 13527c: 74 0c je 13528a <_Rate_monotonic_Update_statistics+0x5c> stats->min_cpu_time = executed; 13527e: 8b 45 f0 mov -0x10(%ebp),%eax 135281: 8b 55 f4 mov -0xc(%ebp),%edx 135284: 89 43 5c mov %eax,0x5c(%ebx) 135287: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 13528a: 50 push %eax 13528b: 50 push %eax 13528c: 8d 43 64 lea 0x64(%ebx),%eax 13528f: 50 push %eax 135290: 8d 45 f0 lea -0x10(%ebp),%eax 135293: 50 push %eax 135294: e8 0b 05 00 00 call 1357a4 <_Timespec_Greater_than> 135299: 83 c4 10 add $0x10,%esp 13529c: 84 c0 test %al,%al 13529e: 74 0c je 1352ac <_Rate_monotonic_Update_statistics+0x7e> stats->max_cpu_time = executed; 1352a0: 8b 45 f0 mov -0x10(%ebp),%eax 1352a3: 8b 55 f4 mov -0xc(%ebp),%edx 1352a6: 89 43 64 mov %eax,0x64(%ebx) 1352a9: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 1352ac: 56 push %esi 1352ad: 56 push %esi 1352ae: 8d 75 e8 lea -0x18(%ebp),%esi 1352b1: 56 push %esi 1352b2: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 1352b8: 50 push %eax 1352b9: e8 7e ce fd ff call 11213c <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 1352be: 5a pop %edx 1352bf: 59 pop %ecx 1352c0: 8d 43 74 lea 0x74(%ebx),%eax 1352c3: 50 push %eax 1352c4: 56 push %esi 1352c5: e8 fe 04 00 00 call 1357c8 <_Timespec_Less_than> 1352ca: 83 c4 10 add $0x10,%esp 1352cd: 84 c0 test %al,%al 1352cf: 74 0c je 1352dd <_Rate_monotonic_Update_statistics+0xaf> stats->min_wall_time = since_last_period; 1352d1: 8b 45 e8 mov -0x18(%ebp),%eax 1352d4: 8b 55 ec mov -0x14(%ebp),%edx 1352d7: 89 43 74 mov %eax,0x74(%ebx) 1352da: 89 53 78 mov %edx,0x78(%ebx) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 1352dd: 50 push %eax 1352de: 50 push %eax 1352df: 8d 43 7c lea 0x7c(%ebx),%eax 1352e2: 50 push %eax 1352e3: 8d 45 e8 lea -0x18(%ebp),%eax 1352e6: 50 push %eax 1352e7: e8 b8 04 00 00 call 1357a4 <_Timespec_Greater_than> 1352ec: 83 c4 10 add $0x10,%esp 1352ef: 84 c0 test %al,%al 1352f1: 74 0f je 135302 <_Rate_monotonic_Update_statistics+0xd4> stats->max_wall_time = since_last_period; 1352f3: 8b 45 e8 mov -0x18(%ebp),%eax 1352f6: 8b 55 ec mov -0x14(%ebp),%edx 1352f9: 89 43 7c mov %eax,0x7c(%ebx) 1352fc: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 135302: 8d 65 f8 lea -0x8(%ebp),%esp 135305: 5b pop %ebx 135306: 5e pop %esi 135307: c9 leave 135308: c3 ret 0011bc6c <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 11bc6c: 55 push %ebp 11bc6d: 89 e5 mov %esp,%ebp 11bc6f: 57 push %edi 11bc70: 56 push %esi 11bc71: 53 push %ebx 11bc72: 83 ec 28 sub $0x28,%esp 11bc75: 8b 75 08 mov 0x8(%ebp),%esi 11bc78: a1 c0 d5 13 00 mov 0x13d5c0,%eax 11bc7d: 40 inc %eax 11bc7e: a3 c0 d5 13 00 mov %eax,0x13d5c0 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 11bc83: ff 35 74 d6 13 00 pushl 0x13d674 11bc89: e8 82 b0 ff ff call 116d10 <_API_Mutex_Unlock> /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 11bc8e: 8d 7e 10 lea 0x10(%esi),%edi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 11bc91: 8d 46 68 lea 0x68(%esi),%eax 11bc94: 89 45 e4 mov %eax,-0x1c(%ebp) 11bc97: 89 3c 24 mov %edi,(%esp) 11bc9a: e8 95 06 00 00 call 11c334 <_Thread_queue_First> <== ALWAYS TAKEN 11bc9f: 89 c3 mov %eax,%ebx if ( the_thread == NULL ) 11bca1: 83 c4 10 add $0x10,%esp 11bca4: 85 c0 test %eax,%eax 11bca6: 74 30 je 11bcd8 <_Region_Process_queue+0x6c> 11bca8: 6a 00 push $0x0 11bcaa: 6a 00 push $0x0 11bcac: ff 70 24 pushl 0x24(%eax) 11bcaf: ff 75 e4 pushl -0x1c(%ebp) 11bcb2: e8 a9 b9 ff ff call 117660 <_Heap_Allocate_aligned_with_boundary> the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 11bcb7: 83 c4 10 add $0x10,%esp 11bcba: 85 c0 test %eax,%eax 11bcbc: 74 1a je 11bcd8 <_Region_Process_queue+0x6c> break; *(void **)the_thread->Wait.return_argument = the_segment; 11bcbe: 8b 53 28 mov 0x28(%ebx),%edx 11bcc1: 89 02 mov %eax,(%edx) the_region->number_of_used_blocks += 1; 11bcc3: ff 46 64 incl 0x64(%esi) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 11bcc6: 50 push %eax 11bcc7: 50 push %eax 11bcc8: 53 push %ebx 11bcc9: 57 push %edi 11bcca: e8 7d 05 00 00 call 11c24c <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 11bccf: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) 11bcd6: eb bf jmp 11bc97 <_Region_Process_queue+0x2b> <== ALWAYS TAKEN } _Thread_Enable_dispatch(); } 11bcd8: 8d 65 f4 lea -0xc(%ebp),%esp 11bcdb: 5b pop %ebx 11bcdc: 5e pop %esi 11bcdd: 5f pop %edi 11bcde: c9 leave *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11bcdf: e9 11 cf ff ff jmp 118bf5 <_Thread_Enable_dispatch> 0010bfcc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10bfcc: 55 push %ebp 10bfcd: 89 e5 mov %esp,%ebp 10bfcf: 53 push %ebx 10bfd0: 83 ec 04 sub $0x4,%esp 10bfd3: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfd6: a1 d0 ef 12 00 mov 0x12efd0,%eax 10bfdb: 40 inc %eax 10bfdc: a3 d0 ef 12 00 mov %eax,0x12efd0 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10bfe1: a1 60 f0 12 00 mov 0x12f060,%eax if ( time->tv_sec < seconds ) 10bfe6: 8b 13 mov (%ebx),%edx 10bfe8: 39 c2 cmp %eax,%edx 10bfea: 7d 08 jge 10bff4 <_TOD_Set+0x28> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10bfec: 51 push %ecx 10bfed: 29 d0 sub %edx,%eax 10bfef: 50 push %eax 10bff0: 6a 01 push $0x1 10bff2: eb 06 jmp 10bffa <_TOD_Set+0x2e> <== ALWAYS TAKEN 10bff4: 51 push %ecx 10bff5: 29 c2 sub %eax,%edx 10bff7: 52 push %edx 10bff8: 6a 00 push $0x0 10bffa: 68 a0 f0 12 00 push $0x12f0a0 10bfff: e8 a4 21 00 00 call 10e1a8 <_Watchdog_Adjust> 10c004: 83 c4 10 add $0x10,%esp _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 ); 10c007: 8b 03 mov (%ebx),%eax 10c009: a3 60 f0 12 00 mov %eax,0x12f060 10c00e: 8b 43 04 mov 0x4(%ebx),%eax 10c011: a3 64 f0 12 00 mov %eax,0x12f064 _TOD_Is_set = true; 10c016: c6 05 e4 ef 12 00 01 movb $0x1,0x12efe4 _TOD_Activate(); _Thread_Enable_dispatch(); } 10c01d: 8b 5d fc mov -0x4(%ebp),%ebx 10c020: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10c021: e9 37 11 00 00 jmp 10d15d <_Thread_Enable_dispatch> 0010abf4 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10abf4: 55 push %ebp 10abf5: 89 e5 mov %esp,%ebp 10abf7: 53 push %ebx 10abf8: 83 ec 1c sub $0x1c,%esp Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 10abfb: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ac02: 69 05 04 02 12 00 e8 imul $0x3e8,0x120204,%eax 10ac09: 03 00 00 10ac0c: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10ac0f: a1 38 43 12 00 mov 0x124338,%eax 10ac14: 40 inc %eax 10ac15: a3 38 43 12 00 mov %eax,0x124338 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10ac1a: 8d 5d f0 lea -0x10(%ebp),%ebx 10ac1d: 53 push %ebx 10ac1e: 68 68 42 12 00 push $0x124268 10ac23: e8 f4 1a 00 00 call 10c71c <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 10ac28: 58 pop %eax 10ac29: 5a pop %edx 10ac2a: 53 push %ebx 10ac2b: 68 7c 42 12 00 push $0x12427c 10ac30: e8 e7 1a 00 00 call 10c71c <_Timespec_Add_to> 10ac35: 89 c3 mov %eax,%ebx 10ac37: eb 0e jmp 10ac47 <_TOD_Tickle_ticks+0x53> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10ac39: 83 ec 0c sub $0xc,%esp 10ac3c: 68 bc 42 12 00 push $0x1242bc 10ac41: e8 ea 1e 00 00 call 10cb30 <_Watchdog_Tickle> while ( seconds ) { _Watchdog_Tickle_seconds(); seconds--; 10ac46: 4b dec %ebx 10ac47: 83 c4 10 add $0x10,%esp _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 10ac4a: 85 db test %ebx,%ebx 10ac4c: 75 eb jne 10ac39 <_TOD_Tickle_ticks+0x45> _Watchdog_Tickle_seconds(); seconds--; } } 10ac4e: 8b 5d fc mov -0x4(%ebp),%ebx 10ac51: c9 leave 10ac52: c3 ret 0010a978 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10a978: 55 push %ebp 10a979: 89 e5 mov %esp,%ebp 10a97b: 56 push %esi 10a97c: 53 push %ebx 10a97d: 8b 45 08 mov 0x8(%ebp),%eax uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10a980: 8b 58 08 mov 0x8(%eax),%ebx 10a983: 4b dec %ebx year_mod_4 = the_tod->year & 3; 10a984: 8b 08 mov (%eax),%ecx if ( year_mod_4 == 0 ) 10a986: 89 ce mov %ecx,%esi 10a988: 83 e6 03 and $0x3,%esi 10a98b: 8b 50 04 mov 0x4(%eax),%edx 10a98e: 75 0a jne 10a99a <_TOD_To_seconds+0x22> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10a990: 0f b7 94 12 6e 0f 12 movzwl 0x120f6e(%edx,%edx,1),%edx 10a997: 00 10a998: eb 08 jmp 10a9a2 <_TOD_To_seconds+0x2a> <== ALWAYS TAKEN else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10a99a: 0f b7 94 12 54 0f 12 movzwl 0x120f54(%edx,%edx,1),%edx 10a9a1: 00 10a9a2: 8d 1c 1a lea (%edx,%ebx,1),%ebx time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10a9a5: 0f b7 94 36 88 0f 12 movzwl 0x120f88(%esi,%esi,1),%edx 10a9ac: 00 10a9ad: 81 e9 c4 07 00 00 sub $0x7c4,%ecx 10a9b3: c1 e9 02 shr $0x2,%ecx 10a9b6: 69 c9 b5 05 00 00 imul $0x5b5,%ecx,%ecx 10a9bc: 01 ca add %ecx,%edx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10a9be: 01 da add %ebx,%edx time *= TOD_SECONDS_PER_DAY; 10a9c0: 69 d2 80 51 01 00 imul $0x15180,%edx,%edx time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10a9c6: 6b 48 0c 3c imul $0x3c,0xc(%eax),%ecx 10a9ca: 03 48 10 add 0x10(%eax),%ecx 10a9cd: 6b c9 3c imul $0x3c,%ecx,%ecx 10a9d0: 03 50 14 add 0x14(%eax),%edx 10a9d3: 8d 84 0a 00 e5 da 21 lea 0x21dae500(%edx,%ecx,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10a9da: 5b pop %ebx 10a9db: 5e pop %esi 10a9dc: c9 leave 10a9dd: c3 ret 0010a9e0 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10a9e0: 55 push %ebp 10a9e1: 89 e5 mov %esp,%ebp 10a9e3: 53 push %ebx 10a9e4: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10a9e7: 8b 1d 04 32 12 00 mov 0x123204,%ebx if ((!the_tod) || 10a9ed: 85 c9 test %ecx,%ecx 10a9ef: 74 59 je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN (the_tod->ticks >= ticks_per_second) || 10a9f1: b8 40 42 0f 00 mov $0xf4240,%eax 10a9f6: 31 d2 xor %edx,%edx 10a9f8: f7 f3 div %ebx 10a9fa: 39 41 18 cmp %eax,0x18(%ecx) 10a9fd: 73 4b jae 10aa4a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10a9ff: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10aa03: 77 45 ja 10aa4a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10aa05: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10aa09: 77 3f ja 10aa4a <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10aa0b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10aa0f: 77 39 ja 10aa4a <_TOD_Validate+0x6a> (the_tod->month == 0) || 10aa11: 8b 41 04 mov 0x4(%ecx),%eax 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) || 10aa14: 85 c0 test %eax,%eax 10aa16: 74 32 je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN 10aa18: 83 f8 0c cmp $0xc,%eax 10aa1b: 77 2d ja 10aa4a <_TOD_Validate+0x6a> (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) || 10aa1d: 8b 19 mov (%ecx),%ebx 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) || 10aa1f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10aa25: 76 23 jbe 10aa4a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10aa27: 8b 51 08 mov 0x8(%ecx),%edx 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) || 10aa2a: 85 d2 test %edx,%edx 10aa2c: 74 1c je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10aa2e: 80 e3 03 and $0x3,%bl 10aa31: 75 09 jne 10aa3c <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10aa33: 8b 04 85 c4 0f 12 00 mov 0x120fc4(,%eax,4),%eax 10aa3a: eb 07 jmp 10aa43 <_TOD_Validate+0x63> <== ALWAYS TAKEN else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10aa3c: 8b 04 85 90 0f 12 00 mov 0x120f90(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10aa43: 39 c2 cmp %eax,%edx 10aa45: 0f 96 c0 setbe %al 10aa48: eb 02 jmp 10aa4c <_TOD_Validate+0x6c> <== ALWAYS TAKEN 10aa4a: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10aa4c: 5b pop %ebx 10aa4d: c9 leave 10aa4e: c3 ret 0010b754 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10b754: 55 push %ebp 10b755: 89 e5 mov %esp,%ebp 10b757: 57 push %edi 10b758: 56 push %esi 10b759: 53 push %ebx 10b75a: 83 ec 28 sub $0x28,%esp 10b75d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b760: 8b 7d 0c mov 0xc(%ebp),%edi 10b763: 8a 45 10 mov 0x10(%ebp),%al 10b766: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10b769: 8b 73 10 mov 0x10(%ebx),%esi /* * 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 ); 10b76c: 53 push %ebx 10b76d: e8 3a 0d 00 00 call 10c4ac <_Thread_Set_transient> <== ALWAYS TAKEN /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 10b772: 83 c4 10 add $0x10,%esp 10b775: 39 7b 14 cmp %edi,0x14(%ebx) 10b778: 74 0c je 10b786 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10b77a: 50 push %eax 10b77b: 50 push %eax 10b77c: 57 push %edi 10b77d: 53 push %ebx 10b77e: e8 f1 0b 00 00 call 10c374 <_Thread_Set_priority> <== ALWAYS TAKEN 10b783: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10b786: 9c pushf 10b787: fa cli 10b788: 59 pop %ecx /* * 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; 10b789: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10b78c: 83 f8 04 cmp $0x4,%eax 10b78f: 74 2f je 10b7c0 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10b791: 83 e6 04 and $0x4,%esi 10b794: 75 08 jne 10b79e <_Thread_Change_priority+0x4a> <== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10b796: 89 c2 mov %eax,%edx 10b798: 83 e2 fb and $0xfffffffb,%edx 10b79b: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10b79e: 51 push %ecx 10b79f: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10b7a0: a9 e0 be 03 00 test $0x3bee0,%eax 10b7a5: 0f 84 c0 00 00 00 je 10b86b <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10b7ab: 89 5d 0c mov %ebx,0xc(%ebp) 10b7ae: 8b 43 44 mov 0x44(%ebx),%eax 10b7b1: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10b7b4: 8d 65 f4 lea -0xc(%ebp),%esp 10b7b7: 5b pop %ebx 10b7b8: 5e pop %esi 10b7b9: 5f pop %edi 10b7ba: c9 leave /* 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 ); 10b7bb: e9 2c 0b 00 00 jmp 10c2ec <_Thread_queue_Requeue> <== ALWAYS TAKEN } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10b7c0: 83 e6 04 and $0x4,%esi 10b7c3: 75 53 jne 10b818 <_Thread_Change_priority+0xc4> <== ALWAYS TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10b7c5: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10b7cc: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10b7d2: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10b7d9: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b7dc: 66 a1 9c 42 12 00 mov 0x12429c,%ax 10b7e2: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10b7e8: 66 a3 9c 42 12 00 mov %ax,0x12429c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10b7ee: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10b7f2: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10b7f8: 74 0e je 10b808 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10b7fa: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10b7fd: 8b 10 mov (%eax),%edx after_node->next = the_node; 10b7ff: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10b801: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10b803: 89 5a 04 mov %ebx,0x4(%edx) 10b806: eb 10 jmp 10b818 <_Thread_Change_priority+0xc4> <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b808: 8d 50 04 lea 0x4(%eax),%edx 10b80b: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10b80d: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10b810: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10b813: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10b815: 89 53 04 mov %edx,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10b818: 51 push %ecx 10b819: 9d popf 10b81a: fa cli 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 ); 10b81b: 66 8b 1d 9c 42 12 00 mov 0x12429c,%bx 10b822: 31 c0 xor %eax,%eax 10b824: 89 c2 mov %eax,%edx 10b826: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10b82a: 0f b7 d2 movzwl %dx,%edx 10b82d: 66 8b 9c 12 14 43 12 mov 0x124314(%edx,%edx,1),%bx 10b834: 00 10b835: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10b839: c1 e2 04 shl $0x4,%edx 10b83c: 0f b7 c0 movzwl %ax,%eax 10b83f: 01 c2 add %eax,%edx 10b841: 6b d2 0c imul $0xc,%edx,%edx 10b844: 8b 1d b4 41 12 00 mov 0x1241b4,%ebx 10b84a: 8b 14 1a mov (%edx,%ebx,1),%edx 10b84d: 89 15 78 42 12 00 mov %edx,0x124278 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10b853: a1 a8 42 12 00 mov 0x1242a8,%eax * 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() && 10b858: 39 d0 cmp %edx,%eax 10b85a: 74 0d je 10b869 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10b85c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b860: 74 07 je 10b869 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10b862: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10b869: 51 push %ecx 10b86a: 9d popf } 10b86b: 8d 65 f4 lea -0xc(%ebp),%esp 10b86e: 5b pop %ebx 10b86f: 5e pop %esi 10b870: 5f pop %edi 10b871: c9 leave 10b872: c3 ret 0010b874 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10b874: 55 push %ebp 10b875: 89 e5 mov %esp,%ebp 10b877: 53 push %ebx 10b878: 8b 45 08 mov 0x8(%ebp),%eax 10b87b: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10b87e: 9c pushf 10b87f: fa cli 10b880: 59 pop %ecx current_state = the_thread->current_state; 10b881: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10b884: 85 da test %ebx,%edx 10b886: 74 71 je 10b8f9 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10b888: f7 d2 not %edx 10b88a: 21 da and %ebx,%edx current_state = 10b88c: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10b88f: 85 d2 test %edx,%edx 10b891: 75 66 jne 10b8f9 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10b893: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10b899: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10b8a0: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b8a3: 66 8b 15 9c 42 12 00 mov 0x12429c,%dx 10b8aa: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10b8b0: 66 89 15 9c 42 12 00 mov %dx,0x12429c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10b8b7: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b8bd: 8d 5a 04 lea 0x4(%edx),%ebx 10b8c0: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10b8c2: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10b8c5: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10b8c8: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10b8ca: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10b8cd: 51 push %ecx 10b8ce: 9d popf 10b8cf: fa cli * 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 ) { 10b8d0: 8b 50 14 mov 0x14(%eax),%edx 10b8d3: 8b 1d 78 42 12 00 mov 0x124278,%ebx 10b8d9: 3b 53 14 cmp 0x14(%ebx),%edx 10b8dc: 73 1b jae 10b8f9 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10b8de: a3 78 42 12 00 mov %eax,0x124278 if ( _Thread_Executing->is_preemptible || 10b8e3: a1 a8 42 12 00 mov 0x1242a8,%eax 10b8e8: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b8ec: 75 04 jne 10b8f2 <_Thread_Clear_state+0x7e> 10b8ee: 85 d2 test %edx,%edx 10b8f0: 75 07 jne 10b8f9 <_Thread_Clear_state+0x85> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10b8f2: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 } } } _ISR_Enable( level ); 10b8f9: 51 push %ecx 10b8fa: 9d popf } 10b8fb: 5b pop %ebx 10b8fc: c9 leave 10b8fd: c3 ret 0010b900 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10b900: 55 push %ebp 10b901: 89 e5 mov %esp,%ebp 10b903: 56 push %esi 10b904: 53 push %ebx 10b905: 8b 75 08 mov 0x8(%ebp),%esi 10b908: 8b 5d 0c mov 0xc(%ebp),%ebx 10b90b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b90f: 8b 46 1c mov 0x1c(%esi),%eax 10b912: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b919: a1 ec 41 12 00 mov 0x1241ec,%eax 10b91e: 48 dec %eax 10b91f: a3 ec 41 12 00 mov %eax,0x1241ec * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10b924: 83 ec 0c sub $0xc,%esp 10b927: 53 push %ebx 10b928: e8 df 0f 00 00 call 10c90c <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b92d: a1 ec 41 12 00 mov 0x1241ec,%eax 10b932: 40 inc %eax 10b933: a3 ec 41 12 00 mov %eax,0x1241ec /* * 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 ); 10b938: 59 pop %ecx 10b939: 58 pop %eax 10b93a: 53 push %ebx 10b93b: 56 push %esi 10b93c: e8 17 f7 ff ff call 10b058 <_Objects_Close> <== ALWAYS TAKEN /* * 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 ); 10b941: 58 pop %eax 10b942: 5a pop %edx 10b943: 6a 01 push $0x1 10b945: 53 push %ebx 10b946: e8 91 0a 00 00 call 10c3dc <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10b94b: 89 1c 24 mov %ebx,(%esp) 10b94e: e8 f9 08 00 00 call 10c24c <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN 10b953: 83 c4 10 add $0x10,%esp 10b956: 84 c0 test %al,%al 10b958: 75 15 jne 10b96f <_Thread_Close+0x6f> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10b95a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b95e: 75 0f jne 10b96f <_Thread_Close+0x6f> (void) _Watchdog_Remove( &the_thread->Timer ); 10b960: 83 ec 0c sub $0xc,%esp 10b963: 8d 43 48 lea 0x48(%ebx),%eax 10b966: 50 push %eax 10b967: e8 5c 11 00 00 call 10cac8 <_Watchdog_Remove> 10b96c: 83 c4 10 add $0x10,%esp /* * 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 ) ) 10b96f: 3b 1d 70 42 12 00 cmp 0x124270,%ebx 10b975: 75 0a jne 10b981 <_Thread_Close+0x81> */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10b977: c7 05 70 42 12 00 00 movl $0x0,0x124270 10b97e: 00 00 00 _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10b981: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10b988: 00 00 00 if ( the_thread->Start.fp_context ) 10b98b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10b991: 85 c0 test %eax,%eax 10b993: 74 0c je 10b9a1 <_Thread_Close+0xa1> (void) _Workspace_Free( the_thread->Start.fp_context ); 10b995: 83 ec 0c sub $0xc,%esp 10b998: 50 push %eax 10b999: e8 3f 12 00 00 call 10cbdd <_Workspace_Free> 10b99e: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10b9a1: 83 ec 0c sub $0xc,%esp 10b9a4: 53 push %ebx 10b9a5: e8 c6 0b 00 00 call 10c570 <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; 10b9aa: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10b9b1: 00 00 00 if ( the_thread->extensions ) 10b9b4: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10b9ba: 83 c4 10 add $0x10,%esp 10b9bd: 85 c0 test %eax,%eax 10b9bf: 74 0c je 10b9cd <_Thread_Close+0xcd> (void) _Workspace_Free( the_thread->extensions ); 10b9c1: 83 ec 0c sub $0xc,%esp 10b9c4: 50 push %eax 10b9c5: e8 13 12 00 00 call 10cbdd <_Workspace_Free> 10b9ca: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10b9cd: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10b9d4: 00 00 00 } 10b9d7: 8d 65 f8 lea -0x8(%ebp),%esp 10b9da: 5b pop %ebx 10b9db: 5e pop %esi 10b9dc: c9 leave 10b9dd: c3 ret 0010b9e0 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10b9e0: 55 push %ebp 10b9e1: 89 e5 mov %esp,%ebp 10b9e3: 83 ec 14 sub $0x14,%esp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 10b9e6: 68 44 43 12 00 push $0x124344 10b9eb: e8 fc f5 ff ff call 10afec <_Objects_Allocate> <== ALWAYS TAKEN /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 10b9f0: a3 8c 43 12 00 mov %eax,0x12438c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b9f5: a1 ec 41 12 00 mov 0x1241ec,%eax 10b9fa: 40 inc %eax 10b9fb: a3 ec 41 12 00 mov %eax,0x1241ec * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10ba00: 8b 15 10 02 12 00 mov 0x120210,%edx 10ba06: 83 c4 0c add $0xc,%esp 10ba09: 68 45 4c 44 49 push $0x49444c45 10ba0e: 6a 00 push $0x0 10ba10: 6a 00 push $0x0 10ba12: 6a 00 push $0x0 10ba14: 6a 01 push $0x1 10ba16: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10ba1d: 50 push %eax 10ba1e: 6a 00 push $0x0 10ba20: a1 f0 01 12 00 mov 0x1201f0,%eax 10ba25: 39 d0 cmp %edx,%eax 10ba27: 73 02 jae 10ba2b <_Thread_Create_idle+0x4b> 10ba29: 89 d0 mov %edx,%eax 10ba2b: 50 push %eax 10ba2c: 6a 00 push $0x0 10ba2e: ff 35 8c 43 12 00 pushl 0x12438c 10ba34: 68 44 43 12 00 push $0x124344 10ba39: e8 4a 02 00 00 call 10bc88 <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ba3e: a1 ec 41 12 00 mov 0x1241ec,%eax 10ba43: 48 dec %eax 10ba44: a3 ec 41 12 00 mov %eax,0x1241ec /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 10ba49: a1 8c 43 12 00 mov 0x12438c,%eax /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10ba4e: a3 a8 42 12 00 mov %eax,0x1242a8 10ba53: a3 78 42 12 00 mov %eax,0x124278 _Thread_Executing = _Thread_Idle; _Thread_Start( 10ba58: 83 c4 24 add $0x24,%esp 10ba5b: 6a 00 push $0x0 10ba5d: 6a 00 push $0x0 10ba5f: ff 35 0c 02 12 00 pushl 0x12020c 10ba65: 6a 00 push $0x0 10ba67: 50 push %eax 10ba68: e8 8f 0b 00 00 call 10c5fc <_Thread_Start> <== ALWAYS TAKEN 10ba6d: 83 c4 20 add $0x20,%esp Configuration.idle_task, NULL, 0 ); } 10ba70: c9 leave 10ba71: c3 ret 0010ba74 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10ba74: 55 push %ebp 10ba75: 89 e5 mov %esp,%ebp 10ba77: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ba7a: 8d 45 f4 lea -0xc(%ebp),%eax 10ba7d: 50 push %eax 10ba7e: ff 75 08 pushl 0x8(%ebp) 10ba81: e8 8e 01 00 00 call 10bc14 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10ba86: 83 c4 10 add $0x10,%esp 10ba89: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ba8d: 75 1b jne 10baaa <_Thread_Delay_ended+0x36> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10ba8f: 52 push %edx 10ba90: 52 push %edx 10ba91: 68 18 00 00 10 push $0x10000018 10ba96: 50 push %eax 10ba97: e8 d8 fd ff ff call 10b874 <_Thread_Clear_state> <== ALWAYS TAKEN 10ba9c: a1 ec 41 12 00 mov 0x1241ec,%eax 10baa1: 48 dec %eax 10baa2: a3 ec 41 12 00 mov %eax,0x1241ec 10baa7: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10baaa: c9 leave 10baab: c3 ret 0010baac <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10baac: 55 push %ebp 10baad: 89 e5 mov %esp,%ebp 10baaf: 57 push %edi 10bab0: 56 push %esi 10bab1: 53 push %ebx 10bab2: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10bab5: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx _ISR_Disable( level ); 10babb: 9c pushf 10babc: fa cli 10babd: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10babe: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10bac1: e9 f1 00 00 00 jmp 10bbb7 <_Thread_Dispatch+0x10b> <== ALWAYS TAKEN heir = _Thread_Heir; 10bac6: 8b 35 78 42 12 00 mov 0x124278,%esi _Thread_Dispatch_disable_level = 1; 10bacc: c7 05 ec 41 12 00 01 movl $0x1,0x1241ec 10bad3: 00 00 00 _Context_Switch_necessary = false; 10bad6: c6 05 b8 42 12 00 00 movb $0x0,0x1242b8 _Thread_Executing = heir; 10badd: 89 35 a8 42 12 00 mov %esi,0x1242a8 #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 ) 10bae3: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10bae7: 75 09 jne 10baf2 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10bae9: 8b 15 b8 41 12 00 mov 0x1241b8,%edx 10baef: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10baf2: 50 push %eax 10baf3: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10baf4: 83 ec 0c sub $0xc,%esp 10baf7: 8d 45 e0 lea -0x20(%ebp),%eax 10bafa: 50 push %eax 10bafb: e8 cc 32 00 00 call 10edcc <_TOD_Get_uptime> _Timestamp_Subtract( 10bb00: 83 c4 0c add $0xc,%esp 10bb03: 57 push %edi 10bb04: 8d 45 e0 lea -0x20(%ebp),%eax 10bb07: 50 push %eax 10bb08: 68 b0 42 12 00 push $0x1242b0 10bb0d: e8 3a 0c 00 00 call 10c74c <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10bb12: 58 pop %eax 10bb13: 5a pop %edx 10bb14: 57 push %edi 10bb15: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10bb1b: 50 push %eax 10bb1c: e8 fb 0b 00 00 call 10c71c <_Timespec_Add_to> <== ALWAYS TAKEN _Thread_Time_of_last_context_switch = uptime; 10bb21: 8b 45 e0 mov -0x20(%ebp),%eax 10bb24: 8b 55 e4 mov -0x1c(%ebp),%edx 10bb27: a3 b0 42 12 00 mov %eax,0x1242b0 10bb2c: 89 15 b4 42 12 00 mov %edx,0x1242b4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10bb32: a1 74 42 12 00 mov 0x124274,%eax 10bb37: 83 c4 10 add $0x10,%esp 10bb3a: 85 c0 test %eax,%eax 10bb3c: 74 10 je 10bb4e <_Thread_Dispatch+0xa2> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 10bb3e: 8b 10 mov (%eax),%edx 10bb40: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10bb46: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10bb4c: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10bb4e: 51 push %ecx 10bb4f: 51 push %ecx 10bb50: 56 push %esi 10bb51: 53 push %ebx 10bb52: e8 25 0e 00 00 call 10c97c <_User_extensions_Thread_switch> <== ALWAYS TAKEN if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10bb57: 58 pop %eax 10bb58: 5a pop %edx 10bb59: 81 c6 d4 00 00 00 add $0xd4,%esi 10bb5f: 56 push %esi 10bb60: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10bb66: 50 push %eax 10bb67: e8 d4 10 00 00 call 10cc40 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10bb6c: 83 c4 10 add $0x10,%esp 10bb6f: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10bb76: 74 36 je 10bbae <_Thread_Dispatch+0x102> #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 ); 10bb78: a1 70 42 12 00 mov 0x124270,%eax 10bb7d: 39 c3 cmp %eax,%ebx 10bb7f: 74 2d je 10bbae <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10bb81: 85 c0 test %eax,%eax 10bb83: 74 11 je 10bb96 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10bb85: 83 ec 0c sub $0xc,%esp 10bb88: 05 ec 00 00 00 add $0xec,%eax 10bb8d: 50 push %eax 10bb8e: e8 e1 10 00 00 call 10cc74 <_CPU_Context_save_fp> 10bb93: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10bb96: 83 ec 0c sub $0xc,%esp 10bb99: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10bb9f: 50 push %eax 10bba0: e8 d9 10 00 00 call 10cc7e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10bba5: 89 1d 70 42 12 00 mov %ebx,0x124270 10bbab: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10bbae: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx _ISR_Disable( level ); 10bbb4: 9c pushf 10bbb5: fa cli 10bbb6: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10bbb7: 8a 15 b8 42 12 00 mov 0x1242b8,%dl 10bbbd: 84 d2 test %dl,%dl 10bbbf: 0f 85 01 ff ff ff jne 10bac6 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10bbc5: c7 05 ec 41 12 00 00 movl $0x0,0x1241ec 10bbcc: 00 00 00 _ISR_Enable( level ); 10bbcf: 50 push %eax 10bbd0: 9d popf if ( _Thread_Do_post_task_switch_extension || 10bbd1: 83 3d 8c 42 12 00 00 cmpl $0x0,0x12428c 10bbd8: 75 06 jne 10bbe0 <_Thread_Dispatch+0x134> executing->do_post_task_switch_extension ) { 10bbda: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10bbde: 74 09 je 10bbe9 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10bbe0: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10bbe4: e8 92 ea ff ff call 10a67b <_API_extensions_Run_postswitch> } } 10bbe9: 8d 65 f4 lea -0xc(%ebp),%esp 10bbec: 5b pop %ebx 10bbed: 5e pop %esi 10bbee: 5f pop %edi 10bbef: c9 leave 10bbf0: c3 ret 0010bbf1 <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { 10bbf1: 55 push %ebp 10bbf2: 89 e5 mov %esp,%ebp 10bbf4: 83 ec 08 sub $0x8,%esp if ( --_Thread_Dispatch_disable_level ) 10bbf7: a1 ec 41 12 00 mov 0x1241ec,%eax 10bbfc: 48 dec %eax 10bbfd: a3 ec 41 12 00 mov %eax,0x1241ec 10bc02: a1 ec 41 12 00 mov 0x1241ec,%eax 10bc07: 85 c0 test %eax,%eax 10bc09: 75 06 jne 10bc11 <_Thread_Enable_dispatch+0x20> return; _Thread_Dispatch(); } 10bc0b: c9 leave (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 10bc0c: e9 9b fe ff ff jmp 10baac <_Thread_Dispatch> <== ALWAYS TAKEN } 10bc11: c9 leave 10bc12: c3 ret 00110b0c <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 110b0c: 55 push %ebp 110b0d: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 110b0f: a1 a8 42 12 00 mov 0x1242a8,%eax if ( !_States_Is_ready( executing->current_state ) || 110b14: 83 78 10 00 cmpl $0x0,0x10(%eax) 110b18: 75 0e jne 110b28 <_Thread_Evaluate_mode+0x1c> <== ALWAYS TAKEN 110b1a: 3b 05 78 42 12 00 cmp 0x124278,%eax 110b20: 74 11 je 110b33 <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 110b22: 80 78 75 00 cmpb $0x0,0x75(%eax) 110b26: 74 0b je 110b33 <_Thread_Evaluate_mode+0x27> <== ALWAYS TAKEN _Context_Switch_necessary = true; 110b28: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 110b2f: b0 01 mov $0x1,%al return true; 110b31: eb 02 jmp 110b35 <_Thread_Evaluate_mode+0x29> <== ALWAYS TAKEN 110b33: 31 c0 xor %eax,%eax } return false; } 110b35: c9 leave 110b36: c3 ret 0010bc14 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10bc14: 55 push %ebp 10bc15: 89 e5 mov %esp,%ebp 10bc17: 53 push %ebx 10bc18: 83 ec 04 sub $0x4,%esp 10bc1b: 8b 55 08 mov 0x8(%ebp),%edx 10bc1e: 8b 45 0c mov 0xc(%ebp),%eax 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 ) ) { 10bc21: 85 d2 test %edx,%edx 10bc23: 75 1a jne 10bc3f <_Thread_Get+0x2b> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bc25: 8b 15 ec 41 12 00 mov 0x1241ec,%edx 10bc2b: 42 inc %edx 10bc2c: 89 15 ec 41 12 00 mov %edx,0x1241ec _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10bc32: c7 00 00 00 00 00 movl $0x0,(%eax) tp = _Thread_Executing; 10bc38: a1 a8 42 12 00 mov 0x1242a8,%eax goto done; 10bc3d: eb 3a jmp 10bc79 <_Thread_Get+0x65> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10bc3f: 89 d1 mov %edx,%ecx 10bc41: c1 e9 18 shr $0x18,%ecx 10bc44: 83 e1 07 and $0x7,%ecx */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10bc47: 8d 59 ff lea -0x1(%ecx),%ebx 10bc4a: 83 fb 03 cmp $0x3,%ebx 10bc4d: 76 2f jbe 10bc7e <_Thread_Get+0x6a> 10bc4f: eb 12 jmp 10bc63 <_Thread_Get+0x4f> <== ALWAYS TAKEN if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10bc51: 8b 0c 8d c0 41 12 00 mov 0x1241c0(,%ecx,4),%ecx if ( !api_information ) { 10bc58: 85 c9 test %ecx,%ecx 10bc5a: 74 07 je 10bc63 <_Thread_Get+0x4f> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10bc5c: 8b 49 04 mov 0x4(%ecx),%ecx if ( !information ) { 10bc5f: 85 c9 test %ecx,%ecx 10bc61: 75 0a jne 10bc6d <_Thread_Get+0x59> *location = OBJECTS_ERROR; 10bc63: c7 00 01 00 00 00 movl $0x1,(%eax) 10bc69: 31 c0 xor %eax,%eax goto done; 10bc6b: eb 0c jmp 10bc79 <_Thread_Get+0x65> <== ALWAYS TAKEN } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10bc6d: 53 push %ebx 10bc6e: 50 push %eax 10bc6f: 52 push %edx 10bc70: 51 push %ecx 10bc71: e8 8a f7 ff ff call 10b400 <_Objects_Get> <== ALWAYS TAKEN 10bc76: 83 c4 10 add $0x10,%esp done: return tp; } 10bc79: 8b 5d fc mov -0x4(%ebp),%ebx 10bc7c: c9 leave 10bc7d: c3 ret *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10bc7e: 89 d3 mov %edx,%ebx 10bc80: c1 eb 1b shr $0x1b,%ebx 10bc83: 4b dec %ebx 10bc84: 74 cb je 10bc51 <_Thread_Get+0x3d> 10bc86: eb db jmp 10bc63 <_Thread_Get+0x4f> <== ALWAYS TAKEN 00110b38 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 110b38: 55 push %ebp 110b39: 89 e5 mov %esp,%ebp 110b3b: 53 push %ebx 110b3c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 110b3f: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 110b45: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 110b4b: 85 c0 test %eax,%eax 110b4d: 74 03 je 110b52 <_Thread_Handler+0x1a> 110b4f: fa cli 110b50: eb 01 jmp 110b53 <_Thread_Handler+0x1b> <== ALWAYS TAKEN 110b52: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 110b53: a0 98 3e 12 00 mov 0x123e98,%al 110b58: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 110b5b: c6 05 98 3e 12 00 01 movb $0x1,0x123e98 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 110b62: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 110b69: 74 24 je 110b8f <_Thread_Handler+0x57> #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 ); 110b6b: a1 70 42 12 00 mov 0x124270,%eax 110b70: 39 c3 cmp %eax,%ebx 110b72: 74 1b je 110b8f <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 110b74: 85 c0 test %eax,%eax 110b76: 74 11 je 110b89 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 110b78: 83 ec 0c sub $0xc,%esp 110b7b: 05 ec 00 00 00 add $0xec,%eax 110b80: 50 push %eax 110b81: e8 ee c0 ff ff call 10cc74 <_CPU_Context_save_fp> 110b86: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 110b89: 89 1d 70 42 12 00 mov %ebx,0x124270 /* * 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 ); 110b8f: 83 ec 0c sub $0xc,%esp 110b92: 53 push %ebx 110b93: e8 98 bc ff ff call 10c830 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 110b98: e8 54 b0 ff ff call 10bbf1 <_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) */ { 110b9d: 83 c4 10 add $0x10,%esp 110ba0: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 110ba4: 75 05 jne 110bab <_Thread_Handler+0x73> INIT_NAME (); 110ba6: e8 25 c4 00 00 call 11cfd0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 110bab: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 110bb1: 85 c0 test %eax,%eax 110bb3: 75 0b jne 110bc0 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 110bb5: 83 ec 0c sub $0xc,%esp 110bb8: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 110bbe: eb 0c jmp 110bcc <_Thread_Handler+0x94> <== ALWAYS TAKEN executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 110bc0: 48 dec %eax 110bc1: 75 15 jne 110bd8 <_Thread_Handler+0xa0> <== ALWAYS TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 110bc3: 83 ec 0c sub $0xc,%esp 110bc6: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 110bcc: ff 93 9c 00 00 00 call *0x9c(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 110bd2: 89 43 28 mov %eax,0x28(%ebx) 110bd5: 83 c4 10 add $0x10,%esp * 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 ); 110bd8: 83 ec 0c sub $0xc,%esp 110bdb: 53 push %ebx 110bdc: e8 80 bc ff ff call 10c861 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 110be1: 83 c4 0c add $0xc,%esp 110be4: 6a 06 push $0x6 110be6: 6a 01 push $0x1 110be8: 6a 00 push $0x0 110bea: e8 65 a3 ff ff call 10af54 <_Internal_error_Occurred> 0010beb0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10beb0: 55 push %ebp 10beb1: 89 e5 mov %esp,%ebp 10beb3: 53 push %ebx 10beb4: 83 ec 04 sub $0x4,%esp uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 10beb7: a1 08 02 12 00 mov 0x120208,%eax maximum_extensions = Configuration.maximum_extensions; 10bebc: 8b 15 00 02 12 00 mov 0x120200,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10bec2: 83 3d 1c 02 12 00 00 cmpl $0x0,0x12021c 10bec9: 0f 94 c3 sete %bl 10becc: 83 3d 18 02 12 00 00 cmpl $0x0,0x120218 10bed3: 0f 94 c1 sete %cl 10bed6: 38 cb cmp %cl,%bl 10bed8: 74 0c je 10bee6 <_Thread_Handler_initialization+0x36> == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10beda: 52 push %edx 10bedb: 6a 0f push $0xf 10bedd: 6a 01 push $0x1 10bedf: 6a 00 push $0x0 10bee1: e8 6e f0 ff ff call 10af54 <_Internal_error_Occurred> <== ALWAYS TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10bee6: c6 05 b8 42 12 00 00 movb $0x0,0x1242b8 _Thread_Executing = NULL; 10beed: c7 05 a8 42 12 00 00 movl $0x0,0x1242a8 10bef4: 00 00 00 _Thread_Heir = NULL; 10bef7: c7 05 78 42 12 00 00 movl $0x0,0x124278 10befe: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10bf01: c7 05 70 42 12 00 00 movl $0x0,0x124270 10bf08: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10bf0b: c7 05 8c 42 12 00 00 movl $0x0,0x12428c 10bf12: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10bf15: 89 15 88 42 12 00 mov %edx,0x124288 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10bf1b: a3 b8 41 12 00 mov %eax,0x1241b8 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10bf20: 83 ec 0c sub $0xc,%esp 10bf23: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10bf2a: 40 inc %eax 10bf2b: 6b c0 0c imul $0xc,%eax,%eax 10bf2e: 50 push %eax 10bf2f: e8 64 0c 00 00 call 10cb98 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10bf34: a3 b4 41 12 00 mov %eax,0x1241b4 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10bf39: 0f b6 0d f4 01 12 00 movzbl 0x1201f4,%ecx 10bf40: 31 d2 xor %edx,%edx 10bf42: 83 c4 10 add $0x10,%esp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10bf45: 8d 58 04 lea 0x4(%eax),%ebx 10bf48: 89 18 mov %ebx,(%eax) the_chain->permanent_null = NULL; 10bf4a: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10bf51: 89 40 08 mov %eax,0x8(%eax) 10bf54: 42 inc %edx 10bf55: 83 c0 0c add $0xc,%eax 10bf58: 39 ca cmp %ecx,%edx 10bf5a: 76 e9 jbe 10bf45 <_Thread_Handler_initialization+0x95> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10bf5c: 50 push %eax 10bf5d: 6a 08 push $0x8 10bf5f: 6a 00 push $0x0 10bf61: 68 08 01 00 00 push $0x108 10bf66: 6a 01 push $0x1 10bf68: 6a 01 push $0x1 10bf6a: 6a 01 push $0x1 10bf6c: 68 44 43 12 00 push $0x124344 10bf71: e8 e2 f4 ff ff call 10b458 <_Objects_Initialize_information> <== ALWAYS TAKEN 10bf76: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10bf79: 8b 5d fc mov -0x4(%ebp),%ebx 10bf7c: c9 leave 10bf7d: c3 ret 0010bc88 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10bc88: 55 push %ebp 10bc89: 89 e5 mov %esp,%ebp 10bc8b: 57 push %edi 10bc8c: 56 push %esi 10bc8d: 53 push %ebx 10bc8e: 83 ec 1c sub $0x1c,%esp 10bc91: 8b 5d 0c mov 0xc(%ebp),%ebx 10bc94: 8b 4d 10 mov 0x10(%ebp),%ecx 10bc97: 8b 75 14 mov 0x14(%ebp),%esi 10bc9a: 8a 55 18 mov 0x18(%ebp),%dl 10bc9d: 8a 45 20 mov 0x20(%ebp),%al 10bca0: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10bca3: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10bcaa: 00 00 00 10bcad: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10bcb4: 00 00 00 10bcb7: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10bcbe: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bcc1: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10bcc8: 00 00 00 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 10bccb: 85 c9 test %ecx,%ecx 10bccd: 75 30 jne 10bcff <_Thread_Initialize+0x77> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10bccf: 51 push %ecx 10bcd0: 51 push %ecx 10bcd1: 56 push %esi 10bcd2: 53 push %ebx 10bcd3: 88 55 e0 mov %dl,-0x20(%ebp) 10bcd6: e8 45 08 00 00 call 10c520 <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) 10bcdb: 83 c4 10 add $0x10,%esp 10bcde: 39 f0 cmp %esi,%eax 10bce0: 8a 55 e0 mov -0x20(%ebp),%dl 10bce3: 72 04 jb 10bce9 <_Thread_Initialize+0x61> 10bce5: 85 c0 test %eax,%eax 10bce7: 75 07 jne 10bcf0 <_Thread_Initialize+0x68> <== NEVER TAKEN 10bce9: 31 c0 xor %eax,%eax 10bceb: e9 b8 01 00 00 jmp 10bea8 <_Thread_Initialize+0x220> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10bcf0: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10bcf6: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10bcfd: eb 09 jmp 10bd08 <_Thread_Initialize+0x80> <== ALWAYS TAKEN } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10bcff: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10bd06: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bd08: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10bd0e: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10bd14: 31 ff xor %edi,%edi 10bd16: 84 d2 test %dl,%dl 10bd18: 74 19 je 10bd33 <_Thread_Initialize+0xab> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bd1a: 83 ec 0c sub $0xc,%esp 10bd1d: 6a 6c push $0x6c 10bd1f: e8 a0 0e 00 00 call 10cbc4 <_Workspace_Allocate> <== ALWAYS TAKEN 10bd24: 89 c7 mov %eax,%edi if ( !fp_area ) 10bd26: 83 c4 10 add $0x10,%esp 10bd29: 31 f6 xor %esi,%esi 10bd2b: 85 c0 test %eax,%eax 10bd2d: 0f 84 0c 01 00 00 je 10be3f <_Thread_Initialize+0x1b7> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bd33: 89 bb ec 00 00 00 mov %edi,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10bd39: 89 bb cc 00 00 00 mov %edi,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bd3f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bd46: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10bd4d: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10bd54: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bd5b: a1 88 42 12 00 mov 0x124288,%eax 10bd60: 31 f6 xor %esi,%esi 10bd62: 85 c0 test %eax,%eax 10bd64: 74 1d je 10bd83 <_Thread_Initialize+0xfb> extensions_area = _Workspace_Allocate( 10bd66: 83 ec 0c sub $0xc,%esp 10bd69: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10bd70: 50 push %eax 10bd71: e8 4e 0e 00 00 call 10cbc4 <_Workspace_Allocate> 10bd76: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10bd78: 83 c4 10 add $0x10,%esp 10bd7b: 85 c0 test %eax,%eax 10bd7d: 0f 84 bc 00 00 00 je 10be3f <_Thread_Initialize+0x1b7> goto failed; } the_thread->extensions = (void **) extensions_area; 10bd83: 89 b3 00 01 00 00 mov %esi,0x100(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10bd89: 85 f6 test %esi,%esi 10bd8b: 74 1c je 10bda9 <_Thread_Initialize+0x121> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bd8d: 8b 0d 88 42 12 00 mov 0x124288,%ecx 10bd93: 31 c0 xor %eax,%eax 10bd95: eb 0e jmp 10bda5 <_Thread_Initialize+0x11d> <== ALWAYS TAKEN the_thread->extensions[i] = NULL; 10bd97: 8b 93 00 01 00 00 mov 0x100(%ebx),%edx 10bd9d: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,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++ ) 10bda4: 40 inc %eax 10bda5: 39 c8 cmp %ecx,%eax 10bda7: 76 ee jbe 10bd97 <_Thread_Initialize+0x10f> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10bda9: 8a 45 e7 mov -0x19(%ebp),%al 10bdac: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10bdb2: 8b 45 24 mov 0x24(%ebp),%eax 10bdb5: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10bdbb: 8b 45 28 mov 0x28(%ebp),%eax 10bdbe: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10bdc4: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10bdc8: 75 08 jne 10bdd2 <_Thread_Initialize+0x14a> 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; 10bdca: a1 b8 41 12 00 mov 0x1241b8,%eax 10bdcf: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10bdd2: 8b 45 2c mov 0x2c(%ebp),%eax 10bdd5: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10bddb: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10bde2: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10bde9: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 10bdf0: 8b 45 1c mov 0x1c(%ebp),%eax 10bdf3: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10bdf6: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10bdfc: 52 push %edx 10bdfd: 52 push %edx 10bdfe: 50 push %eax 10bdff: 53 push %ebx 10be00: e8 6f 05 00 00 call 10c374 <_Thread_Set_priority> <== ALWAYS TAKEN /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10be05: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10be0c: 00 00 00 10be0f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10be16: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10be19: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10be1d: 8b 45 08 mov 0x8(%ebp),%eax 10be20: 8b 40 1c mov 0x1c(%eax),%eax 10be23: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10be26: 8b 45 30 mov 0x30(%ebp),%eax 10be29: 89 43 0c mov %eax,0xc(%ebx) * 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 ); 10be2c: 89 1c 24 mov %ebx,(%esp) 10be2f: e8 9c 0a 00 00 call 10c8d0 <_User_extensions_Thread_create> <== ALWAYS TAKEN 10be34: 88 c2 mov %al,%dl if ( extension_status ) 10be36: 83 c4 10 add $0x10,%esp 10be39: b0 01 mov $0x1,%al 10be3b: 84 d2 test %dl,%dl 10be3d: 75 69 jne 10bea8 <_Thread_Initialize+0x220> return true; failed: if ( the_thread->libc_reent ) 10be3f: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10be45: 85 c0 test %eax,%eax 10be47: 74 0c je 10be55 <_Thread_Initialize+0x1cd> _Workspace_Free( the_thread->libc_reent ); 10be49: 83 ec 0c sub $0xc,%esp 10be4c: 50 push %eax 10be4d: e8 8b 0d 00 00 call 10cbdd <_Workspace_Free> 10be52: 83 c4 10 add $0x10,%esp 10be55: 31 d2 xor %edx,%edx for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10be57: 8b 84 93 f4 00 00 00 mov 0xf4(%ebx,%edx,4),%eax 10be5e: 85 c0 test %eax,%eax 10be60: 74 12 je 10be74 <_Thread_Initialize+0x1ec> _Workspace_Free( the_thread->API_Extensions[i] ); 10be62: 83 ec 0c sub $0xc,%esp 10be65: 50 push %eax 10be66: 89 55 e0 mov %edx,-0x20(%ebp) 10be69: e8 6f 0d 00 00 call 10cbdd <_Workspace_Free> 10be6e: 83 c4 10 add $0x10,%esp 10be71: 8b 55 e0 mov -0x20(%ebp),%edx failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 10be74: 42 inc %edx 10be75: 83 fa 03 cmp $0x3,%edx 10be78: 75 dd jne 10be57 <_Thread_Initialize+0x1cf> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10be7a: 85 f6 test %esi,%esi 10be7c: 74 0c je 10be8a <_Thread_Initialize+0x202> (void) _Workspace_Free( extensions_area ); 10be7e: 83 ec 0c sub $0xc,%esp 10be81: 56 push %esi 10be82: e8 56 0d 00 00 call 10cbdd <_Workspace_Free> 10be87: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10be8a: 85 ff test %edi,%edi 10be8c: 74 0c je 10be9a <_Thread_Initialize+0x212> (void) _Workspace_Free( fp_area ); 10be8e: 83 ec 0c sub $0xc,%esp 10be91: 57 push %edi 10be92: e8 46 0d 00 00 call 10cbdd <_Workspace_Free> 10be97: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10be9a: 83 ec 0c sub $0xc,%esp 10be9d: 53 push %ebx 10be9e: e8 cd 06 00 00 call 10c570 <_Thread_Stack_Free> <== ALWAYS TAKEN 10bea3: 31 c0 xor %eax,%eax return false; 10bea5: 83 c4 10 add $0x10,%esp } 10bea8: 8d 65 f4 lea -0xc(%ebp),%esp 10beab: 5b pop %ebx 10beac: 5e pop %esi 10bead: 5f pop %edi 10beae: c9 leave 10beaf: c3 ret 0010f418 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10f418: 55 push %ebp 10f419: 89 e5 mov %esp,%ebp 10f41b: 56 push %esi 10f41c: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10f41d: a1 a8 42 12 00 mov 0x1242a8,%eax ready = executing->ready; 10f422: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10f428: 9c pushf 10f429: fa cli 10f42a: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 10f42b: 8b 1a mov (%edx),%ebx 10f42d: 3b 5a 08 cmp 0x8(%edx),%ebx 10f430: 75 04 jne 10f436 <_Thread_Reset_timeslice+0x1e> _ISR_Enable( level ); 10f432: 51 push %ecx 10f433: 9d popf return; 10f434: eb 35 jmp 10f46b <_Thread_Reset_timeslice+0x53> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10f436: 8b 30 mov (%eax),%esi previous = the_node->previous; 10f438: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10f43b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10f43e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f440: 8d 5a 04 lea 0x4(%edx),%ebx 10f443: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f445: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f448: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f44b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f44d: 89 58 04 mov %ebx,0x4(%eax) } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10f450: 51 push %ecx 10f451: 9d popf 10f452: fa cli if ( _Thread_Is_heir( executing ) ) 10f453: 3b 05 78 42 12 00 cmp 0x124278,%eax 10f459: 75 07 jne 10f462 <_Thread_Reset_timeslice+0x4a> _Thread_Heir = (Thread_Control *) ready->first; 10f45b: 8b 02 mov (%edx),%eax 10f45d: a3 78 42 12 00 mov %eax,0x124278 _Context_Switch_necessary = true; 10f462: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10f469: 51 push %ecx 10f46a: 9d popf } 10f46b: 5b pop %ebx 10f46c: 5e pop %esi 10f46d: c9 leave 10f46e: c3 ret 0010cd74 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10cd74: 55 push %ebp 10cd75: 89 e5 mov %esp,%ebp 10cd77: 53 push %ebx 10cd78: 83 ec 04 sub $0x4,%esp 10cd7b: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10cd7e: 31 c0 xor %eax,%eax 10cd80: f6 43 10 01 testb $0x1,0x10(%ebx) 10cd84: 75 6b jne 10cdf1 <_Thread_Restart+0x7d> _Thread_Set_transient( the_thread ); 10cd86: 83 ec 0c sub $0xc,%esp 10cd89: 53 push %ebx 10cd8a: e8 a1 01 00 00 call 10cf30 <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10cd8f: 83 c4 0c add $0xc,%esp 10cd92: ff 75 10 pushl 0x10(%ebp) 10cd95: ff 75 0c pushl 0xc(%ebp) 10cd98: 53 push %ebx 10cd99: e8 b2 31 00 00 call 10ff50 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10cd9e: 89 1c 24 mov %ebx,(%esp) 10cda1: e8 a2 2e 00 00 call 10fc48 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10cda6: 89 1c 24 mov %ebx,(%esp) 10cda9: e8 fe 30 00 00 call 10feac <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10cdae: 89 1c 24 mov %ebx,(%esp) 10cdb1: e8 12 06 00 00 call 10d3c8 <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) 10cdb6: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10cdb9: b0 01 mov $0x1,%al 10cdbb: 3b 1d f4 62 12 00 cmp 0x1262f4,%ebx 10cdc1: 75 2e jne 10cdf1 <_Thread_Restart+0x7d> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10cdc3: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10cdca: 74 12 je 10cdde <_Thread_Restart+0x6a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10cdcc: 83 ec 0c sub $0xc,%esp 10cdcf: 81 c3 ec 00 00 00 add $0xec,%ebx 10cdd5: 53 push %ebx 10cdd6: e8 63 09 00 00 call 10d73e <_CPU_Context_restore_fp> 10cddb: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10cdde: 83 ec 0c sub $0xc,%esp 10cde1: a1 f4 62 12 00 mov 0x1262f4,%eax 10cde6: 05 d4 00 00 00 add $0xd4,%eax 10cdeb: 50 push %eax 10cdec: e8 3c 09 00 00 call 10d72d <_CPU_Context_restore> return true; } return false; } 10cdf1: 8b 5d fc mov -0x4(%ebp),%ebx 10cdf4: c9 leave 10cdf5: c3 ret 0010f5f4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f5f4: 55 push %ebp 10f5f5: 89 e5 mov %esp,%ebp 10f5f7: 53 push %ebx 10f5f8: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f5fb: 9c pushf 10f5fc: fa cli 10f5fd: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f5fe: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f601: f6 c2 02 test $0x2,%dl 10f604: 74 70 je 10f676 <_Thread_Resume+0x82> <== ALWAYS TAKEN 10f606: 83 e2 fd and $0xfffffffd,%edx current_state = 10f609: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f60c: 85 d2 test %edx,%edx 10f60e: 75 66 jne 10f676 <_Thread_Resume+0x82> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f610: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f616: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f61d: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f620: 66 8b 15 6c 93 12 00 mov 0x12936c,%dx 10f627: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f62d: 66 89 15 6c 93 12 00 mov %dx,0x12936c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f634: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f63a: 8d 5a 04 lea 0x4(%edx),%ebx 10f63d: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f63f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f642: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f645: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f647: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f64a: 51 push %ecx 10f64b: 9d popf 10f64c: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f64d: 8b 50 14 mov 0x14(%eax),%edx 10f650: 8b 1d 48 93 12 00 mov 0x129348,%ebx 10f656: 3b 53 14 cmp 0x14(%ebx),%edx 10f659: 73 1b jae 10f676 <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f65b: a3 48 93 12 00 mov %eax,0x129348 if ( _Thread_Executing->is_preemptible || 10f660: a1 78 93 12 00 mov 0x129378,%eax 10f665: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f669: 75 04 jne 10f66f <_Thread_Resume+0x7b> 10f66b: 85 d2 test %edx,%edx 10f66d: 75 07 jne 10f676 <_Thread_Resume+0x82> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f66f: c6 05 88 93 12 00 01 movb $0x1,0x129388 } } } _ISR_Enable( level ); 10f676: 51 push %ecx 10f677: 9d popf } 10f678: 5b pop %ebx 10f679: c9 leave 10f67a: c3 ret 0010c3dc <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10c3dc: 55 push %ebp 10c3dd: 89 e5 mov %esp,%ebp 10c3df: 56 push %esi 10c3e0: 53 push %ebx 10c3e1: 8b 45 08 mov 0x8(%ebp),%eax 10c3e4: 8b 4d 0c mov 0xc(%ebp),%ecx ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10c3e7: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c3ed: 9c pushf 10c3ee: fa cli 10c3ef: 5b pop %ebx if ( !_States_Is_ready( the_thread->current_state ) ) { 10c3f0: 8b 70 10 mov 0x10(%eax),%esi 10c3f3: 85 f6 test %esi,%esi 10c3f5: 74 0c je 10c403 <_Thread_Set_state+0x27> the_thread->current_state = 10c3f7: 09 f1 or %esi,%ecx 10c3f9: 89 48 10 mov %ecx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10c3fc: 53 push %ebx 10c3fd: 9d popf return; 10c3fe: e9 a3 00 00 00 jmp 10c4a6 <_Thread_Set_state+0xca> <== ALWAYS TAKEN } the_thread->current_state = state; 10c403: 89 48 10 mov %ecx,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10c406: 8b 0a mov (%edx),%ecx 10c408: 3b 4a 08 cmp 0x8(%edx),%ecx 10c40b: 75 3b jne 10c448 <_Thread_Set_state+0x6c> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c40d: 8d 4a 04 lea 0x4(%edx),%ecx 10c410: 89 0a mov %ecx,(%edx) the_chain->permanent_null = NULL; 10c412: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10c419: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10c41c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10c422: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10c429: 66 21 0a and %cx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10c42c: 66 83 3a 00 cmpw $0x0,(%edx) 10c430: 75 20 jne 10c452 <_Thread_Set_state+0x76> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10c432: 66 8b 15 9c 42 12 00 mov 0x12429c,%dx 10c439: 23 90 98 00 00 00 and 0x98(%eax),%edx 10c43f: 66 89 15 9c 42 12 00 mov %dx,0x12429c 10c446: eb 0a jmp 10c452 <_Thread_Set_state+0x76> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c448: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10c44a: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10c44d: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10c450: 89 0a mov %ecx,(%edx) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10c452: 53 push %ebx 10c453: 9d popf 10c454: fa cli if ( _Thread_Is_heir( the_thread ) ) 10c455: 3b 05 78 42 12 00 cmp 0x124278,%eax 10c45b: 75 38 jne 10c495 <_Thread_Set_state+0xb9> 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 ); 10c45d: 66 8b 35 9c 42 12 00 mov 0x12429c,%si 10c464: 31 d2 xor %edx,%edx 10c466: 89 d1 mov %edx,%ecx 10c468: 66 0f bc ce bsf %si,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10c46c: 0f b7 c9 movzwl %cx,%ecx 10c46f: 66 8b b4 09 14 43 12 mov 0x124314(%ecx,%ecx,1),%si 10c476: 00 10c477: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10c47b: c1 e1 04 shl $0x4,%ecx 10c47e: 0f b7 d2 movzwl %dx,%edx 10c481: 01 d1 add %edx,%ecx 10c483: 6b c9 0c imul $0xc,%ecx,%ecx 10c486: 8b 35 b4 41 12 00 mov 0x1241b4,%esi 10c48c: 8b 14 31 mov (%ecx,%esi,1),%edx 10c48f: 89 15 78 42 12 00 mov %edx,0x124278 _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10c495: 3b 05 a8 42 12 00 cmp 0x1242a8,%eax 10c49b: 75 07 jne 10c4a4 <_Thread_Set_state+0xc8> _Context_Switch_necessary = true; 10c49d: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10c4a4: 53 push %ebx 10c4a5: 9d popf } 10c4a6: 5b pop %ebx 10c4a7: 5e pop %esi 10c4a8: c9 leave 10c4a9: c3 ret 0010c4ac <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10c4ac: 55 push %ebp 10c4ad: 89 e5 mov %esp,%ebp 10c4af: 56 push %esi 10c4b0: 53 push %ebx 10c4b1: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10c4b4: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c4ba: 9c pushf 10c4bb: fa cli 10c4bc: 59 pop %ecx old_state = the_thread->current_state; 10c4bd: 8b 58 10 mov 0x10(%eax),%ebx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10c4c0: 89 de mov %ebx,%esi 10c4c2: 83 ce 04 or $0x4,%esi 10c4c5: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10c4c8: 85 db test %ebx,%ebx 10c4ca: 75 4c jne 10c518 <_Thread_Set_transient+0x6c> if ( _Chain_Has_only_one_node( ready ) ) { 10c4cc: 8b 1a mov (%edx),%ebx 10c4ce: 3b 5a 08 cmp 0x8(%edx),%ebx 10c4d1: 75 3b jne 10c50e <_Thread_Set_transient+0x62> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c4d3: 8d 5a 04 lea 0x4(%edx),%ebx 10c4d6: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10c4d8: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10c4df: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10c4e2: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10c4e8: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10c4ef: 66 21 1a and %bx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10c4f2: 66 83 3a 00 cmpw $0x0,(%edx) 10c4f6: 75 20 jne 10c518 <_Thread_Set_transient+0x6c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10c4f8: 66 8b 15 9c 42 12 00 mov 0x12429c,%dx 10c4ff: 23 90 98 00 00 00 and 0x98(%eax),%edx 10c505: 66 89 15 9c 42 12 00 mov %dx,0x12429c 10c50c: eb 0a jmp 10c518 <_Thread_Set_transient+0x6c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c50e: 8b 10 mov (%eax),%edx previous = the_node->previous; 10c510: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10c513: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10c516: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10c518: 51 push %ecx 10c519: 9d popf } 10c51a: 5b pop %ebx 10c51b: 5e pop %esi 10c51c: c9 leave 10c51d: c3 ret 0010c520 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10c520: 55 push %ebp 10c521: 89 e5 mov %esp,%ebp 10c523: 53 push %ebx 10c524: 83 ec 04 sub $0x4,%esp 10c527: a1 f0 01 12 00 mov 0x1201f0,%eax 10c52c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c52f: 39 c3 cmp %eax,%ebx 10c531: 73 02 jae 10c535 <_Thread_Stack_Allocate+0x15> 10c533: 89 c3 mov %eax,%ebx * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 10c535: a1 18 02 12 00 mov 0x120218,%eax 10c53a: 85 c0 test %eax,%eax 10c53c: 74 08 je 10c546 <_Thread_Stack_Allocate+0x26> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10c53e: 83 ec 0c sub $0xc,%esp 10c541: 53 push %ebx 10c542: ff d0 call *%eax 10c544: eb 0c jmp 10c552 <_Thread_Stack_Allocate+0x32> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10c546: 83 c3 10 add $0x10,%ebx * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 10c549: 83 ec 0c sub $0xc,%esp 10c54c: 53 push %ebx 10c54d: e8 72 06 00 00 call 10cbc4 <_Workspace_Allocate> <== ALWAYS TAKEN 10c552: 83 c4 10 add $0x10,%esp } if ( !stack_addr ) 10c555: 31 d2 xor %edx,%edx 10c557: 85 c0 test %eax,%eax 10c559: 0f 95 c2 setne %dl 10c55c: f7 da neg %edx 10c55e: 21 d3 and %edx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10c560: 8b 55 08 mov 0x8(%ebp),%edx 10c563: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10c569: 89 d8 mov %ebx,%eax 10c56b: 8b 5d fc mov -0x4(%ebp),%ebx 10c56e: c9 leave 10c56f: c3 ret 0010c570 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10c570: 55 push %ebp 10c571: 89 e5 mov %esp,%ebp 10c573: 83 ec 08 sub $0x8,%esp 10c576: 8b 45 08 mov 0x8(%ebp),%eax #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 10c579: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10c580: 74 1f je 10c5a1 <_Thread_Stack_Free+0x31> * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10c582: 8b 15 1c 02 12 00 mov 0x12021c,%edx 10c588: 85 d2 test %edx,%edx 10c58a: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10c590: 74 06 je 10c598 <_Thread_Stack_Free+0x28> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10c592: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10c595: c9 leave * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10c596: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10c598: 89 45 08 mov %eax,0x8(%ebp) } 10c59b: c9 leave */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10c59c: e9 3c 06 00 00 jmp 10cbdd <_Workspace_Free> <== ALWAYS TAKEN } 10c5a1: c9 leave 10c5a2: c3 ret 0010c5fc <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10c5fc: 55 push %ebp 10c5fd: 89 e5 mov %esp,%ebp 10c5ff: 53 push %ebx 10c600: 83 ec 04 sub $0x4,%esp 10c603: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10c606: 31 c0 xor %eax,%eax 10c608: f6 43 10 01 testb $0x1,0x10(%ebx) 10c60c: 74 42 je 10c650 <_Thread_Start+0x54> the_thread->Start.entry_point = (Thread_Entry) entry_point; 10c60e: 8b 45 10 mov 0x10(%ebp),%eax 10c611: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10c617: 8b 45 0c mov 0xc(%ebp),%eax 10c61a: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10c620: 8b 45 14 mov 0x14(%ebp),%eax 10c623: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10c629: 8b 45 18 mov 0x18(%ebp),%eax 10c62c: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10c632: 83 ec 0c sub $0xc,%esp 10c635: 53 push %ebx 10c636: e8 d5 2a 00 00 call 10f110 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10c63b: 89 1c 24 mov %ebx,(%esp) 10c63e: e8 31 2d 00 00 call 10f374 <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_start( the_thread ); 10c643: 89 1c 24 mov %ebx,(%esp) 10c646: e8 f9 02 00 00 call 10c944 <_User_extensions_Thread_start> <== ALWAYS TAKEN 10c64b: b0 01 mov $0x1,%al return true; 10c64d: 83 c4 10 add $0x10,%esp } return false; } 10c650: 8b 5d fc mov -0x4(%ebp),%ebx 10c653: c9 leave 10c654: c3 ret 0010c5a4 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 10c5a4: 55 push %ebp 10c5a5: 89 e5 mov %esp,%ebp 10c5a7: 83 ec 08 sub $0x8,%esp 10c5aa: c7 05 84 43 12 00 03 movl $0x3,0x124384 10c5b1: 00 00 00 * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 10c5b4: c6 05 b8 42 12 00 00 movb $0x0,0x1242b8 _Thread_Executing = _Thread_Heir; 10c5bb: a1 78 42 12 00 mov 0x124278,%eax 10c5c0: a3 a8 42 12 00 mov %eax,0x1242a8 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) 10c5c5: 83 b8 ec 00 00 00 00 cmpl $0x0,0xec(%eax) 10c5cc: 74 11 je 10c5df <_Thread_Start_multitasking+0x3b> _Context_Restore_fp( &_Thread_Heir->fp_context ); 10c5ce: 83 ec 0c sub $0xc,%esp 10c5d1: 05 ec 00 00 00 add $0xec,%eax 10c5d6: 50 push %eax 10c5d7: e8 a2 06 00 00 call 10cc7e <_CPU_Context_restore_fp> <== ALWAYS TAKEN 10c5dc: 83 c4 10 add $0x10,%esp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 10c5df: 50 push %eax 10c5e0: 50 push %eax 10c5e1: a1 78 42 12 00 mov 0x124278,%eax 10c5e6: 05 d4 00 00 00 add $0xd4,%eax 10c5eb: 50 push %eax 10c5ec: 68 d4 41 12 00 push $0x1241d4 10c5f1: e8 4a 06 00 00 call 10cc40 <_CPU_Context_switch> <== ALWAYS TAKEN 10c5f6: 83 c4 10 add $0x10,%esp } 10c5f9: c9 leave 10c5fa: c3 ret 0010f470 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 10f470: 55 push %ebp 10f471: 89 e5 mov %esp,%ebp 10f473: 56 push %esi 10f474: 53 push %ebx 10f475: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10f478: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10f47e: 9c pushf 10f47f: fa cli 10f480: 5b pop %ebx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 10f481: 8b 48 10 mov 0x10(%eax),%ecx 10f484: 85 c9 test %ecx,%ecx 10f486: 74 0d je 10f495 <_Thread_Suspend+0x25> the_thread->current_state = 10f488: 83 c9 02 or $0x2,%ecx 10f48b: 89 48 10 mov %ecx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 10f48e: 53 push %ebx 10f48f: 9d popf return; 10f490: e9 a7 00 00 00 jmp 10f53c <_Thread_Suspend+0xcc> <== ALWAYS TAKEN } the_thread->current_state = STATES_SUSPENDED; 10f495: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10f49c: 8b 0a mov (%edx),%ecx 10f49e: 3b 4a 08 cmp 0x8(%edx),%ecx 10f4a1: 75 3b jne 10f4de <_Thread_Suspend+0x6e> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10f4a3: 8d 4a 04 lea 0x4(%edx),%ecx 10f4a6: 89 0a mov %ecx,(%edx) the_chain->permanent_null = NULL; 10f4a8: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10f4af: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10f4b2: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f4b8: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10f4bf: 66 21 0a and %cx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10f4c2: 66 83 3a 00 cmpw $0x0,(%edx) 10f4c6: 75 20 jne 10f4e8 <_Thread_Suspend+0x78> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10f4c8: 66 8b 15 9c 42 12 00 mov 0x12429c,%dx 10f4cf: 23 90 98 00 00 00 and 0x98(%eax),%edx 10f4d5: 66 89 15 9c 42 12 00 mov %dx,0x12429c 10f4dc: eb 0a jmp 10f4e8 <_Thread_Suspend+0x78> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10f4de: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10f4e0: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10f4e3: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10f4e6: 89 0a mov %ecx,(%edx) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10f4e8: 53 push %ebx 10f4e9: 9d popf 10f4ea: fa cli if ( _Thread_Is_heir( the_thread ) ) 10f4eb: 3b 05 78 42 12 00 cmp 0x124278,%eax 10f4f1: 75 38 jne 10f52b <_Thread_Suspend+0xbb> 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 ); 10f4f3: 66 8b 35 9c 42 12 00 mov 0x12429c,%si 10f4fa: 31 d2 xor %edx,%edx 10f4fc: 89 d1 mov %edx,%ecx 10f4fe: 66 0f bc ce bsf %si,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10f502: 0f b7 c9 movzwl %cx,%ecx 10f505: 66 8b b4 09 14 43 12 mov 0x124314(%ecx,%ecx,1),%si 10f50c: 00 10f50d: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10f511: c1 e1 04 shl $0x4,%ecx 10f514: 0f b7 d2 movzwl %dx,%edx 10f517: 01 d1 add %edx,%ecx 10f519: 6b c9 0c imul $0xc,%ecx,%ecx 10f51c: 8b 35 b4 41 12 00 mov 0x1241b4,%esi 10f522: 8b 14 31 mov (%ecx,%esi,1),%edx 10f525: 89 15 78 42 12 00 mov %edx,0x124278 _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10f52b: 3b 05 a8 42 12 00 cmp 0x1242a8,%eax 10f531: 75 07 jne 10f53a <_Thread_Suspend+0xca> _Context_Switch_necessary = true; 10f533: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10f53a: 53 push %ebx 10f53b: 9d popf } 10f53c: 5b pop %ebx 10f53d: 5e pop %esi 10f53e: c9 leave 10f53f: c3 ret 0010c658 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10c658: 55 push %ebp 10c659: 89 e5 mov %esp,%ebp 10c65b: 53 push %ebx 10c65c: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10c65f: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10c665: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10c669: 74 4c je 10c6b7 <_Thread_Tickle_timeslice+0x5f> return; if ( !_States_Is_ready( executing->current_state ) ) 10c66b: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10c66f: 75 46 jne 10c6b7 <_Thread_Tickle_timeslice+0x5f> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10c671: 8b 43 7c mov 0x7c(%ebx),%eax 10c674: 83 f8 01 cmp $0x1,%eax 10c677: 72 3e jb 10c6b7 <_Thread_Tickle_timeslice+0x5f> 10c679: 83 f8 02 cmp $0x2,%eax 10c67c: 76 07 jbe 10c685 <_Thread_Tickle_timeslice+0x2d> 10c67e: 83 f8 03 cmp $0x3,%eax 10c681: 75 34 jne 10c6b7 <_Thread_Tickle_timeslice+0x5f> <== ALWAYS TAKEN 10c683: eb 1a jmp 10c69f <_Thread_Tickle_timeslice+0x47> <== ALWAYS TAKEN 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 ) { 10c685: 8b 43 78 mov 0x78(%ebx),%eax 10c688: 48 dec %eax 10c689: 89 43 78 mov %eax,0x78(%ebx) 10c68c: 85 c0 test %eax,%eax 10c68e: 7f 27 jg 10c6b7 <_Thread_Tickle_timeslice+0x5f> _Thread_Reset_timeslice(); 10c690: e8 83 2d 00 00 call 10f418 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c695: a1 b8 41 12 00 mov 0x1241b8,%eax 10c69a: 89 43 78 mov %eax,0x78(%ebx) 10c69d: eb 18 jmp 10c6b7 <_Thread_Tickle_timeslice+0x5f> <== ALWAYS TAKEN } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10c69f: 8b 43 78 mov 0x78(%ebx),%eax 10c6a2: 48 dec %eax 10c6a3: 89 43 78 mov %eax,0x78(%ebx) 10c6a6: 85 c0 test %eax,%eax 10c6a8: 75 0d jne 10c6b7 <_Thread_Tickle_timeslice+0x5f> (*executing->budget_callout)( executing ); 10c6aa: 83 ec 0c sub $0xc,%esp 10c6ad: 53 push %ebx 10c6ae: ff 93 80 00 00 00 call *0x80(%ebx) 10c6b4: 83 c4 10 add $0x10,%esp break; #endif } } 10c6b7: 8b 5d fc mov -0x4(%ebp),%ebx 10c6ba: c9 leave 10c6bb: c3 ret 0010c6bc <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10c6bc: 55 push %ebp 10c6bd: 89 e5 mov %esp,%ebp 10c6bf: 56 push %esi 10c6c0: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c6c1: a1 a8 42 12 00 mov 0x1242a8,%eax ready = executing->ready; 10c6c6: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c6cc: 9c pushf 10c6cd: fa cli 10c6ce: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c6cf: 8b 1a mov (%edx),%ebx 10c6d1: 3b 5a 08 cmp 0x8(%edx),%ebx 10c6d4: 74 2e je 10c704 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c6d6: 8b 30 mov (%eax),%esi previous = the_node->previous; 10c6d8: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10c6db: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10c6de: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10c6e0: 8d 5a 04 lea 0x4(%edx),%ebx 10c6e3: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10c6e5: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10c6e8: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10c6eb: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10c6ed: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c6f0: 51 push %ecx 10c6f1: 9d popf 10c6f2: fa cli if ( _Thread_Is_heir( executing ) ) 10c6f3: 3b 05 78 42 12 00 cmp 0x124278,%eax 10c6f9: 75 11 jne 10c70c <_Thread_Yield_processor+0x50> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10c6fb: 8b 02 mov (%edx),%eax 10c6fd: a3 78 42 12 00 mov %eax,0x124278 10c702: eb 08 jmp 10c70c <_Thread_Yield_processor+0x50> <== ALWAYS TAKEN _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c704: 3b 05 78 42 12 00 cmp 0x124278,%eax 10c70a: 74 07 je 10c713 <_Thread_Yield_processor+0x57> <== NEVER TAKEN _Context_Switch_necessary = true; 10c70c: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10c713: 51 push %ecx 10c714: 9d popf } 10c715: 5b pop %ebx 10c716: 5e pop %esi 10c717: c9 leave 10c718: c3 ret 0010b708 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10b708: 55 push %ebp 10b709: 89 e5 mov %esp,%ebp 10b70b: 53 push %ebx 10b70c: 83 ec 04 sub $0x4,%esp 10b70f: 8b 5d 0c mov 0xc(%ebp),%ebx 10b712: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10b715: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) /* * 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 ) ) { 10b71c: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b720: 75 1a jne 10b73c <_Thread_blocking_operation_Cancel+0x34> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b722: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b729: 50 push %eax 10b72a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b72b: 83 ec 0c sub $0xc,%esp 10b72e: 8d 43 48 lea 0x48(%ebx),%eax 10b731: 50 push %eax 10b732: e8 91 13 00 00 call 10cac8 <_Watchdog_Remove> 10b737: 83 c4 10 add $0x10,%esp 10b73a: eb 02 jmp 10b73e <_Thread_blocking_operation_Cancel+0x36> <== ALWAYS TAKEN } else _ISR_Enable( level ); 10b73c: 50 push %eax 10b73d: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b73e: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10b745: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10b748: 8b 5d fc mov -0x4(%ebp),%ebx 10b74b: c9 leave 10b74c: e9 23 01 00 00 jmp 10b874 <_Thread_Clear_state> <== ALWAYS TAKEN 0010f1a0 <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 10f1a0: 55 push %ebp 10f1a1: 89 e5 mov %esp,%ebp 10f1a3: 53 push %ebx 10f1a4: 83 ec 04 sub $0x4,%esp 10f1a7: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 10f1aa: 9c pushf 10f1ab: fa cli 10f1ac: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10f1ad: 8b 18 mov (%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f1af: 8d 48 04 lea 0x4(%eax),%ecx 10f1b2: 39 cb cmp %ecx,%ebx 10f1b4: 74 41 je 10f1f7 <_Thread_queue_Dequeue_fifo+0x57> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10f1b6: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 10f1b8: 89 08 mov %ecx,(%eax) new_first->previous = _Chain_Head(the_chain); 10f1ba: 89 41 04 mov %eax,0x4(%ecx) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; 10f1bd: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10f1c4: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10f1c8: 74 06 je 10f1d0 <_Thread_queue_Dequeue_fifo+0x30> _ISR_Enable( level ); 10f1ca: 52 push %edx 10f1cb: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10f1cc: 51 push %ecx 10f1cd: 51 push %ecx 10f1ce: eb 17 jmp 10f1e7 <_Thread_queue_Dequeue_fifo+0x47> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10f1d0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10f1d7: 52 push %edx 10f1d8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10f1d9: 83 ec 0c sub $0xc,%esp 10f1dc: 8d 43 48 lea 0x48(%ebx),%eax 10f1df: 50 push %eax 10f1e0: e8 e3 d8 ff ff call 10cac8 <_Watchdog_Remove> 10f1e5: 58 pop %eax 10f1e6: 5a pop %edx 10f1e7: 68 f8 ff 03 10 push $0x1003fff8 10f1ec: 53 push %ebx 10f1ed: e8 82 c6 ff ff call 10b874 <_Thread_Clear_state> 10f1f2: 83 c4 10 add $0x10,%esp 10f1f5: eb 04 jmp 10f1fb <_Thread_queue_Dequeue_fifo+0x5b> <== ALWAYS TAKEN #endif return the_thread; } _ISR_Enable( level ); 10f1f7: 52 push %edx 10f1f8: 9d popf 10f1f9: 31 db xor %ebx,%ebx return NULL; } 10f1fb: 89 d8 mov %ebx,%eax 10f1fd: 8b 5d fc mov -0x4(%ebp),%ebx 10f200: c9 leave 10f201: c3 ret 0010bfc8 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10bfc8: 55 push %ebp 10bfc9: 89 e5 mov %esp,%ebp 10bfcb: 57 push %edi 10bfcc: 56 push %esi 10bfcd: 53 push %ebx 10bfce: 83 ec 1c sub $0x1c,%esp 10bfd1: 8b 4d 08 mov 0x8(%ebp),%ecx Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10bfd4: 9c pushf 10bfd5: fa cli 10bfd6: 8f 45 e4 popl -0x1c(%ebp) 10bfd9: 89 ca mov %ecx,%edx 10bfdb: 31 c0 xor %eax,%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bfdd: 8d 5a 04 lea 0x4(%edx),%ebx 10bfe0: 39 1a cmp %ebx,(%edx) 10bfe2: 74 1e je 10c002 <_Thread_queue_Dequeue_priority+0x3a> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10bfe4: 6b c0 0c imul $0xc,%eax,%eax 10bfe7: 8b 1c 08 mov (%eax,%ecx,1),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10bfea: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10bff1: 8b 43 38 mov 0x38(%ebx),%eax new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10bff4: 8b 13 mov (%ebx),%edx previous_node = the_thread->Object.Node.previous; 10bff6: 8b 4b 04 mov 0x4(%ebx),%ecx 10bff9: 8d 73 3c lea 0x3c(%ebx),%esi 10bffc: 39 f0 cmp %esi,%eax 10bffe: 75 13 jne 10c013 <_Thread_queue_Dequeue_priority+0x4b> 10c000: eb 3b jmp 10c03d <_Thread_queue_Dequeue_priority+0x75> <== ALWAYS TAKEN Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10c002: 40 inc %eax 10c003: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10c006: 83 f8 04 cmp $0x4,%eax 10c009: 75 d2 jne 10bfdd <_Thread_queue_Dequeue_priority+0x15> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10c00b: ff 75 e4 pushl -0x1c(%ebp) 10c00e: 9d popf 10c00f: 31 db xor %ebx,%ebx return NULL; 10c011: eb 64 jmp 10c077 <_Thread_queue_Dequeue_priority+0xaf> <== ALWAYS TAKEN new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10c013: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10c016: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10c018: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10c01a: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10c01d: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10c01f: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10c022: 8b 53 38 mov 0x38(%ebx),%edx 10c025: 3b 53 40 cmp 0x40(%ebx),%edx 10c028: 74 18 je 10c042 <_Thread_queue_Dequeue_priority+0x7a> /* > two threads on 2-n */ new_second_node->previous = 10c02a: 8d 50 38 lea 0x38(%eax),%edx 10c02d: 89 57 04 mov %edx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10c030: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10c033: 89 70 40 mov %esi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10c036: 83 c0 3c add $0x3c,%eax 10c039: 89 06 mov %eax,(%esi) 10c03b: eb 05 jmp 10c042 <_Thread_queue_Dequeue_priority+0x7a> <== ALWAYS TAKEN } } else { previous_node->next = next_node; 10c03d: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10c03f: 89 4a 04 mov %ecx,0x4(%edx) } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10c042: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10c046: 74 08 je 10c050 <_Thread_queue_Dequeue_priority+0x88> _ISR_Enable( level ); 10c048: ff 75 e4 pushl -0x1c(%ebp) 10c04b: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10c04c: 51 push %ecx 10c04d: 51 push %ecx 10c04e: eb 19 jmp 10c069 <_Thread_queue_Dequeue_priority+0xa1> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10c050: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10c057: ff 75 e4 pushl -0x1c(%ebp) 10c05a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10c05b: 83 ec 0c sub $0xc,%esp 10c05e: 8d 43 48 lea 0x48(%ebx),%eax 10c061: 50 push %eax 10c062: e8 61 0a 00 00 call 10cac8 <_Watchdog_Remove> 10c067: 58 pop %eax 10c068: 5a pop %edx 10c069: 68 f8 ff 03 10 push $0x1003fff8 10c06e: 53 push %ebx 10c06f: e8 00 f8 ff ff call 10b874 <_Thread_Clear_state> <== ALWAYS TAKEN 10c074: 83 c4 10 add $0x10,%esp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10c077: 89 d8 mov %ebx,%eax 10c079: 8d 65 f4 lea -0xc(%ebp),%esp 10c07c: 5b pop %ebx 10c07d: 5e pop %esi 10c07e: 5f pop %edi 10c07f: c9 leave 10c080: c3 ret 0010f204 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10f204: 55 push %ebp 10f205: 89 e5 mov %esp,%ebp 10f207: 56 push %esi 10f208: 53 push %ebx 10f209: 8b 55 08 mov 0x8(%ebp),%edx 10f20c: 8b 4d 0c mov 0xc(%ebp),%ecx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 10f20f: 9c pushf 10f210: fa cli 10f211: 5b pop %ebx sync_state = the_thread_queue->sync_state; 10f212: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10f215: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 10f21c: 83 f8 01 cmp $0x1,%eax 10f21f: 75 17 jne 10f238 <_Thread_queue_Enqueue_fifo+0x34> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f221: 8d 72 04 lea 0x4(%edx),%esi 10f224: 89 31 mov %esi,(%ecx) old_last_node = the_chain->last; 10f226: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 10f229: 89 4a 08 mov %ecx,0x8(%edx) old_last_node->next = the_node; 10f22c: 89 0e mov %ecx,(%esi) the_node->previous = old_last_node; 10f22e: 89 71 04 mov %esi,0x4(%ecx) _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 10f231: 89 51 44 mov %edx,0x44(%ecx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 10f234: 53 push %ebx 10f235: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10f236: eb 05 jmp 10f23d <_Thread_queue_Enqueue_fifo+0x39> <== ALWAYS TAKEN * 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; 10f238: 8b 55 10 mov 0x10(%ebp),%edx 10f23b: 89 1a mov %ebx,(%edx) return sync_state; } 10f23d: 5b pop %ebx 10f23e: 5e pop %esi 10f23f: c9 leave 10f240: c3 ret 0010c110 <_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 ) { 10c110: 55 push %ebp 10c111: 89 e5 mov %esp,%ebp 10c113: 57 push %edi 10c114: 56 push %esi 10c115: 53 push %ebx 10c116: 83 ec 10 sub $0x10,%esp 10c119: 8b 4d 08 mov 0x8(%ebp),%ecx 10c11c: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c11f: 8d 50 3c lea 0x3c(%eax),%edx 10c122: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c125: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c12c: 8d 50 38 lea 0x38(%eax),%edx 10c12f: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c132: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c135: 89 de mov %ebx,%esi 10c137: c1 ee 06 shr $0x6,%esi 10c13a: 6b f6 0c imul $0xc,%esi,%esi 10c13d: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c140: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c143: f6 c3 20 test $0x20,%bl 10c146: 75 70 jne 10c1b8 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c148: 8d 56 04 lea 0x4(%esi),%edx 10c14b: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c14e: 9c pushf 10c14f: fa cli 10c150: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c153: 8b 16 mov (%esi),%edx 10c155: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c15c: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c15f: eb 1f jmp 10c180 <_Thread_queue_Enqueue_priority+0x70> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 10c161: 8b 72 14 mov 0x14(%edx),%esi 10c164: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c167: 39 f3 cmp %esi,%ebx 10c169: 76 1a jbe 10c185 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c16b: ff 75 f0 pushl -0x10(%ebp) 10c16e: 9d popf 10c16f: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c170: 85 7a 10 test %edi,0x10(%edx) 10c173: 75 09 jne 10c17e <_Thread_queue_Enqueue_priority+0x6e> <== NEVER TAKEN 10c175: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c178: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c17b: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c17c: eb d0 jmp 10c14e <_Thread_queue_Enqueue_priority+0x3e> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c17e: 8b 12 mov (%edx),%edx 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 ) ) { 10c180: 3b 55 e8 cmp -0x18(%ebp),%edx 10c183: 75 dc jne 10c161 <_Thread_queue_Enqueue_priority+0x51> 10c185: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c188: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c18c: 0f 85 a9 00 00 00 jne 10c23b <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c192: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c199: 3b 5d ec cmp -0x14(%ebp),%ebx 10c19c: 0f 84 82 00 00 00 je 10c224 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c1a2: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c1a5: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c1a7: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c1aa: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c1ac: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c1af: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c1b2: ff 75 f0 pushl -0x10(%ebp) 10c1b5: 9d popf 10c1b6: eb 65 jmp 10c21d <_Thread_queue_Enqueue_priority+0x10d> <== ALWAYS TAKEN return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c1b8: 0f b6 15 f4 01 12 00 movzbl 0x1201f4,%edx 10c1bf: 42 inc %edx 10c1c0: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c1c3: 9c pushf 10c1c4: fa cli 10c1c5: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c1c8: 8b 56 08 mov 0x8(%esi),%edx 10c1cb: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c1ce: eb 20 jmp 10c1f0 <_Thread_queue_Enqueue_priority+0xe0> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 10c1d0: 8b 72 14 mov 0x14(%edx),%esi 10c1d3: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c1d6: 39 f3 cmp %esi,%ebx 10c1d8: 73 1b jae 10c1f5 <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c1da: ff 75 f0 pushl -0x10(%ebp) 10c1dd: 9d popf 10c1de: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c1df: 85 7a 10 test %edi,0x10(%edx) 10c1e2: 75 09 jne 10c1ed <_Thread_queue_Enqueue_priority+0xdd> 10c1e4: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c1e7: ff 75 f0 pushl -0x10(%ebp) 10c1ea: 9d popf goto restart_reverse_search; 10c1eb: eb cb jmp 10c1b8 <_Thread_queue_Enqueue_priority+0xa8> <== ALWAYS TAKEN } search_thread = (Thread_Control *) 10c1ed: 8b 52 04 mov 0x4(%edx),%edx 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 ) ) { 10c1f0: 3b 55 e8 cmp -0x18(%ebp),%edx 10c1f3: 75 db jne 10c1d0 <_Thread_queue_Enqueue_priority+0xc0> 10c1f5: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c1f8: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c1fc: 75 3d jne 10c23b <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c1fe: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c205: 3b 5d ec cmp -0x14(%ebp),%ebx 10c208: 74 1a je 10c224 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c20a: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c20c: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c20e: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c211: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c213: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c216: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c219: ff 75 f0 pushl -0x10(%ebp) 10c21c: 9d popf 10c21d: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c222: eb 1f jmp 10c243 <_Thread_queue_Enqueue_priority+0x133> <== ALWAYS TAKEN 10c224: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c227: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c22a: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c22c: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c22f: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c231: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c234: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c237: 56 push %esi 10c238: 9d popf 10c239: eb e2 jmp 10c21d <_Thread_queue_Enqueue_priority+0x10d> <== ALWAYS TAKEN * 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; 10c23b: 8b 45 10 mov 0x10(%ebp),%eax 10c23e: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c240: 8b 41 30 mov 0x30(%ecx),%eax } 10c243: 83 c4 10 add $0x10,%esp 10c246: 5b pop %ebx 10c247: 5e pop %esi 10c248: 5f pop %edi 10c249: c9 leave 10c24a: c3 ret 0010c084 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 10c084: 55 push %ebp 10c085: 89 e5 mov %esp,%ebp 10c087: 57 push %edi 10c088: 56 push %esi 10c089: 53 push %ebx 10c08a: 83 ec 24 sub $0x24,%esp 10c08d: 8b 75 08 mov 0x8(%ebp),%esi 10c090: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10c093: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10c099: ff 76 38 pushl 0x38(%esi) 10c09c: 53 push %ebx 10c09d: e8 3a 03 00 00 call 10c3dc <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10c0a2: 83 c4 10 add $0x10,%esp 10c0a5: 85 ff test %edi,%edi 10c0a7: 74 30 je 10c0d9 <_Thread_queue_Enqueue_with_handler+0x55> _Watchdog_Initialize( 10c0a9: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c0ac: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c0b3: 8b 55 10 mov 0x10(%ebp),%edx 10c0b6: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10c0b9: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10c0bc: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c0c3: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c0c6: 57 push %edi 10c0c7: 57 push %edi 10c0c8: 8d 43 48 lea 0x48(%ebx),%eax 10c0cb: 50 push %eax 10c0cc: 68 c8 42 12 00 push $0x1242c8 10c0d1: e8 da 08 00 00 call 10c9b0 <_Watchdog_Insert> <== ALWAYS TAKEN 10c0d6: 83 c4 10 add $0x10,%esp } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10c0d9: b8 10 c1 10 00 mov $0x10c110,%eax 10c0de: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c0e2: 74 05 je 10c0e9 <_Thread_queue_Enqueue_with_handler+0x65> 10c0e4: b8 04 f2 10 00 mov $0x10f204,%eax enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10c0e9: 51 push %ecx 10c0ea: 8d 55 e4 lea -0x1c(%ebp),%edx 10c0ed: 52 push %edx 10c0ee: 53 push %ebx 10c0ef: 56 push %esi 10c0f0: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10c0f2: 83 c4 10 add $0x10,%esp 10c0f5: 83 f8 01 cmp $0x1,%eax 10c0f8: 74 0e je 10c108 <_Thread_queue_Enqueue_with_handler+0x84> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10c0fa: 52 push %edx 10c0fb: ff 75 e4 pushl -0x1c(%ebp) 10c0fe: 53 push %ebx 10c0ff: 50 push %eax 10c100: e8 03 f6 ff ff call 10b708 <_Thread_blocking_operation_Cancel> 10c105: 83 c4 10 add $0x10,%esp } 10c108: 8d 65 f4 lea -0xc(%ebp),%esp 10c10b: 5b pop %ebx 10c10c: 5e pop %esi 10c10d: 5f pop %edi 10c10e: c9 leave 10c10f: c3 ret 0010f244 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10f244: 55 push %ebp 10f245: 89 e5 mov %esp,%ebp 10f247: 83 ec 08 sub $0x8,%esp 10f24a: 8b 45 08 mov 0x8(%ebp),%eax 10f24d: 8b 55 0c mov 0xc(%ebp),%edx /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10f250: 83 78 34 01 cmpl $0x1,0x34(%eax) 10f254: 75 0f jne 10f265 <_Thread_queue_Extract+0x21> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 10f256: 51 push %ecx 10f257: 6a 00 push $0x0 10f259: 52 push %edx 10f25a: 50 push %eax 10f25b: e8 14 00 00 00 call 10f274 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN 10f260: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 10f263: c9 leave 10f264: c3 ret * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 10f265: 89 55 0c mov %edx,0xc(%ebp) 10f268: 89 45 08 mov %eax,0x8(%ebp) } 10f26b: c9 leave * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 10f26c: e9 7f 19 00 00 jmp 110bf0 <_Thread_queue_Extract_fifo> 00110bf0 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 110bf0: 55 push %ebp 110bf1: 89 e5 mov %esp,%ebp 110bf3: 53 push %ebx 110bf4: 83 ec 04 sub $0x4,%esp 110bf7: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110bfa: 9c pushf 110bfb: fa cli 110bfc: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110bfd: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110c04: 75 07 jne 110c0d <_Thread_queue_Extract_fifo+0x1d> _ISR_Enable( level ); 110c06: 50 push %eax 110c07: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110c08: 8b 5d fc mov -0x4(%ebp),%ebx 110c0b: c9 leave 110c0c: c3 ret ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110c0d: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 110c0f: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 110c12: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 110c15: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 110c17: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110c1e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110c22: 74 04 je 110c28 <_Thread_queue_Extract_fifo+0x38> _ISR_Enable( level ); 110c24: 50 push %eax 110c25: 9d popf 110c26: eb 18 jmp 110c40 <_Thread_queue_Extract_fifo+0x50> <== ALWAYS TAKEN 110c28: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 110c2f: 50 push %eax 110c30: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110c31: 83 ec 0c sub $0xc,%esp 110c34: 8d 43 48 lea 0x48(%ebx),%eax 110c37: 50 push %eax 110c38: e8 8b be ff ff call 10cac8 <_Watchdog_Remove> 110c3d: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 110c40: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110c47: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110c4a: 8b 5d fc mov -0x4(%ebp),%ebx 110c4d: c9 leave 110c4e: e9 21 ac ff ff jmp 10b874 <_Thread_Clear_state> 0010f274 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 10f274: 55 push %ebp 10f275: 89 e5 mov %esp,%ebp 10f277: 57 push %edi 10f278: 56 push %esi 10f279: 53 push %ebx 10f27a: 83 ec 1c sub $0x1c,%esp 10f27d: 8b 5d 0c mov 0xc(%ebp),%ebx 10f280: 8a 45 10 mov 0x10(%ebp),%al 10f283: 88 45 e3 mov %al,-0x1d(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 10f286: 9c pushf 10f287: fa cli 10f288: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10f28b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10f292: 75 09 jne 10f29d <_Thread_queue_Extract_priority_helper+0x29> _ISR_Enable( level ); 10f294: ff 75 e4 pushl -0x1c(%ebp) 10f297: 9d popf return; 10f298: e9 86 00 00 00 jmp 10f323 <_Thread_queue_Extract_priority_helper+0xaf> <== ALWAYS TAKEN /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 10f29d: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 10f29f: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10f2a2: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f2a5: 8d 73 3c lea 0x3c(%ebx),%esi 10f2a8: 39 f0 cmp %esi,%eax 10f2aa: 74 2a je 10f2d6 <_Thread_queue_Extract_priority_helper+0x62> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 10f2ac: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10f2af: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10f2b1: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10f2b3: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10f2b6: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10f2b8: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10f2bb: 8b 53 38 mov 0x38(%ebx),%edx 10f2be: 3b 53 40 cmp 0x40(%ebx),%edx 10f2c1: 74 18 je 10f2db <_Thread_queue_Extract_priority_helper+0x67> /* > two threads on 2-n */ new_second_node->previous = 10f2c3: 8d 50 38 lea 0x38(%eax),%edx 10f2c6: 89 57 04 mov %edx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10f2c9: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10f2cc: 89 70 40 mov %esi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10f2cf: 83 c0 3c add $0x3c,%eax 10f2d2: 89 06 mov %eax,(%esi) 10f2d4: eb 05 jmp 10f2db <_Thread_queue_Extract_priority_helper+0x67> <== ALWAYS TAKEN } } else { previous_node->next = next_node; 10f2d6: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10f2d8: 89 4a 04 mov %ecx,0x4(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 10f2db: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10f2df: 74 06 je 10f2e7 <_Thread_queue_Extract_priority_helper+0x73> _ISR_Enable( level ); 10f2e1: ff 75 e4 pushl -0x1c(%ebp) 10f2e4: 9d popf 10f2e5: eb 3c jmp 10f323 <_Thread_queue_Extract_priority_helper+0xaf> <== ALWAYS TAKEN return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10f2e7: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10f2eb: 74 06 je 10f2f3 <_Thread_queue_Extract_priority_helper+0x7f> _ISR_Enable( level ); 10f2ed: ff 75 e4 pushl -0x1c(%ebp) 10f2f0: 9d popf 10f2f1: eb 1a jmp 10f30d <_Thread_queue_Extract_priority_helper+0x99> <== ALWAYS TAKEN 10f2f3: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10f2fa: ff 75 e4 pushl -0x1c(%ebp) 10f2fd: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10f2fe: 83 ec 0c sub $0xc,%esp 10f301: 8d 43 48 lea 0x48(%ebx),%eax 10f304: 50 push %eax 10f305: e8 be d7 ff ff call 10cac8 <_Watchdog_Remove> 10f30a: 83 c4 10 add $0x10,%esp 10f30d: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10f314: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10f317: 8d 65 f4 lea -0xc(%ebp),%esp 10f31a: 5b pop %ebx 10f31b: 5e pop %esi 10f31c: 5f pop %edi 10f31d: c9 leave 10f31e: e9 51 c5 ff ff jmp 10b874 <_Thread_Clear_state> 10f323: 8d 65 f4 lea -0xc(%ebp),%esp 10f326: 5b pop %ebx 10f327: 5e pop %esi 10f328: 5f pop %edi 10f329: c9 leave 10f32a: c3 ret 0010df40 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 10df40: 55 push %ebp 10df41: 89 e5 mov %esp,%ebp 10df43: 53 push %ebx 10df44: 8b 4d 08 mov 0x8(%ebp),%ecx 10df47: 89 ca mov %ecx,%edx 10df49: 31 c0 xor %eax,%eax 10df4b: 8d 5a 04 lea 0x4(%edx),%ebx 10df4e: 39 1a cmp %ebx,(%edx) 10df50: 74 08 je 10df5a <_Thread_queue_First_priority+0x1a> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) 10df52: 6b c0 0c imul $0xc,%eax,%eax 10df55: 8b 04 08 mov (%eax,%ecx,1),%eax 10df58: eb 0b jmp 10df65 <_Thread_queue_First_priority+0x25> <== ALWAYS TAKEN { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10df5a: 40 inc %eax 10df5b: 83 c2 0c add $0xc,%edx Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 10df5e: 83 f8 04 cmp $0x4,%eax 10df61: 75 e8 jne 10df4b <_Thread_queue_First_priority+0xb> 10df63: 30 c0 xor %al,%al if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 10df65: 5b pop %ebx 10df66: c9 leave 10df67: c3 ret 0010c274 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10c274: 55 push %ebp 10c275: 89 e5 mov %esp,%ebp 10c277: 56 push %esi 10c278: 53 push %ebx 10c279: 8b 75 08 mov 0x8(%ebp),%esi 10c27c: 8b 5d 10 mov 0x10(%ebp),%ebx Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10c27f: eb 03 jmp 10c284 <_Thread_queue_Flush+0x10> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10c281: 89 58 34 mov %ebx,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10c284: 83 ec 0c sub $0xc,%esp 10c287: 56 push %esi 10c288: e8 f3 fc ff ff call 10bf80 <_Thread_queue_Dequeue> <== ALWAYS TAKEN 10c28d: 83 c4 10 add $0x10,%esp 10c290: 85 c0 test %eax,%eax 10c292: 75 ed jne 10c281 <_Thread_queue_Flush+0xd> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10c294: 8d 65 f8 lea -0x8(%ebp),%esp 10c297: 5b pop %ebx 10c298: 5e pop %esi 10c299: c9 leave 10c29a: c3 ret 0010c29c <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10c29c: 55 push %ebp 10c29d: 89 e5 mov %esp,%ebp 10c29f: 8b 45 08 mov 0x8(%ebp),%eax 10c2a2: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10c2a5: 8b 4d 10 mov 0x10(%ebp),%ecx 10c2a8: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10c2ab: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10c2ae: 8b 4d 14 mov 0x14(%ebp),%ecx 10c2b1: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c2b4: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10c2bb: 4a dec %edx 10c2bc: 75 1b jne 10c2d9 <_Thread_queue_Initialize+0x3d> * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10c2be: 8d 50 30 lea 0x30(%eax),%edx */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c2c1: 8d 48 04 lea 0x4(%eax),%ecx 10c2c4: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10c2c6: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10c2cd: 89 40 08 mov %eax,0x8(%eax) 10c2d0: 83 c0 0c add $0xc,%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10c2d3: 39 d0 cmp %edx,%eax 10c2d5: 75 ea jne 10c2c1 <_Thread_queue_Initialize+0x25> 10c2d7: eb 0f jmp 10c2e8 <_Thread_queue_Initialize+0x4c> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c2d9: 8d 50 04 lea 0x4(%eax),%edx 10c2dc: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10c2de: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10c2e5: 89 40 08 mov %eax,0x8(%eax) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10c2e8: c9 leave 10c2e9: c3 ret 0010f32c <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 10f32c: 55 push %ebp 10f32d: 89 e5 mov %esp,%ebp 10f32f: 83 ec 08 sub $0x8,%esp 10f332: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 10f335: 8b 50 44 mov 0x44(%eax),%edx * 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 && 10f338: 8b 4a 30 mov 0x30(%edx),%ecx 10f33b: 85 c9 test %ecx,%ecx 10f33d: 74 1c je 10f35b <_Thread_queue_Process_timeout+0x2f> 10f33f: 3b 05 a8 42 12 00 cmp 0x1242a8,%eax 10f345: 75 14 jne 10f35b <_Thread_queue_Process_timeout+0x2f> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 10f347: 83 f9 03 cmp $0x3,%ecx 10f34a: 74 23 je 10f36f <_Thread_queue_Process_timeout+0x43> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10f34c: 8b 4a 3c mov 0x3c(%edx),%ecx 10f34f: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10f352: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) 10f359: eb 14 jmp 10f36f <_Thread_queue_Process_timeout+0x43> <== ALWAYS TAKEN } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10f35b: 8b 52 3c mov 0x3c(%edx),%edx 10f35e: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10f361: 52 push %edx 10f362: 52 push %edx 10f363: 50 push %eax 10f364: ff 70 44 pushl 0x44(%eax) 10f367: e8 d8 fe ff ff call 10f244 <_Thread_queue_Extract> <== ALWAYS TAKEN 10f36c: 83 c4 10 add $0x10,%esp } } 10f36f: c9 leave 10f370: c3 ret 0010c2ec <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c2ec: 55 push %ebp 10c2ed: 89 e5 mov %esp,%ebp 10c2ef: 57 push %edi 10c2f0: 56 push %esi 10c2f1: 53 push %ebx 10c2f2: 83 ec 1c sub $0x1c,%esp 10c2f5: 8b 75 08 mov 0x8(%ebp),%esi 10c2f8: 8b 7d 0c mov 0xc(%ebp),%edi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10c2fb: 85 f6 test %esi,%esi 10c2fd: 74 36 je 10c335 <_Thread_queue_Requeue+0x49> <== ALWAYS 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 ) { 10c2ff: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c303: 75 30 jne 10c335 <_Thread_queue_Requeue+0x49> <== ALWAYS TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c305: 9c pushf 10c306: fa cli 10c307: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c308: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c30f: 74 22 je 10c333 <_Thread_queue_Requeue+0x47> <== ALWAYS TAKEN 10c311: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10c318: 50 push %eax 10c319: 6a 01 push $0x1 10c31b: 57 push %edi 10c31c: 56 push %esi 10c31d: e8 52 2f 00 00 call 10f274 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c322: 83 c4 0c add $0xc,%esp 10c325: 8d 45 e4 lea -0x1c(%ebp),%eax 10c328: 50 push %eax 10c329: 57 push %edi 10c32a: 56 push %esi 10c32b: e8 e0 fd ff ff call 10c110 <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN 10c330: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c333: 53 push %ebx 10c334: 9d popf } } 10c335: 8d 65 f4 lea -0xc(%ebp),%esp 10c338: 5b pop %ebx 10c339: 5e pop %esi 10c33a: 5f pop %edi 10c33b: c9 leave 10c33c: c3 ret 0010c340 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c340: 55 push %ebp 10c341: 89 e5 mov %esp,%ebp 10c343: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c346: 8d 45 f4 lea -0xc(%ebp),%eax 10c349: 50 push %eax 10c34a: ff 75 08 pushl 0x8(%ebp) 10c34d: e8 c2 f8 ff ff call 10bc14 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10c352: 83 c4 10 add $0x10,%esp 10c355: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c359: 75 17 jne 10c372 <_Thread_queue_Timeout+0x32> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c35b: 83 ec 0c sub $0xc,%esp 10c35e: 50 push %eax 10c35f: e8 c8 2f 00 00 call 10f32c <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c364: a1 ec 41 12 00 mov 0x1241ec,%eax 10c369: 48 dec %eax 10c36a: a3 ec 41 12 00 mov %eax,0x1241ec 10c36f: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c372: c9 leave 10c373: c3 ret 00116570 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116570: 55 push %ebp 116571: 89 e5 mov %esp,%ebp 116573: 57 push %edi 116574: 56 push %esi 116575: 53 push %ebx 116576: 83 ec 4c sub $0x4c,%esp 116579: 8b 5d 08 mov 0x8(%ebp),%ebx 11657c: 8d 45 dc lea -0x24(%ebp),%eax 11657f: 8d 55 e0 lea -0x20(%ebp),%edx 116582: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 116585: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 116588: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 11658f: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116592: 8d 75 d0 lea -0x30(%ebp),%esi 116595: 8d 55 d4 lea -0x2c(%ebp),%edx 116598: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11659b: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 11659e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 1165a5: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1165a8: 8d 53 30 lea 0x30(%ebx),%edx 1165ab: 89 55 c0 mov %edx,-0x40(%ebp) /* * 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 ); 1165ae: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1165b1: 8d 4b 08 lea 0x8(%ebx),%ecx 1165b4: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1165b7: 8d 53 40 lea 0x40(%ebx),%edx 1165ba: 89 55 bc mov %edx,-0x44(%ebp) { /* * 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; 1165bd: 8d 4d dc lea -0x24(%ebp),%ecx 1165c0: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 1165c3: a1 0c d7 13 00 mov 0x13d70c,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1165c8: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1165cb: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1165ce: 51 push %ecx 1165cf: 8d 4d d0 lea -0x30(%ebp),%ecx 1165d2: 51 push %ecx 1165d3: 29 d0 sub %edx,%eax 1165d5: 50 push %eax 1165d6: ff 75 c0 pushl -0x40(%ebp) 1165d9: e8 ca 36 00 00 call 119ca8 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1165de: a1 50 d6 13 00 mov 0x13d650,%eax 1165e3: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1165e6: 8b 43 74 mov 0x74(%ebx),%eax /* * 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 ) { 1165e9: 83 c4 10 add $0x10,%esp 1165ec: 39 45 c4 cmp %eax,-0x3c(%ebp) 1165ef: 76 13 jbe 116604 <_Timer_server_Body+0x94> /* * 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 ); 1165f1: 52 push %edx 1165f2: 8d 55 d0 lea -0x30(%ebp),%edx 1165f5: 52 push %edx 1165f6: 8b 4d c4 mov -0x3c(%ebp),%ecx 1165f9: 29 c1 sub %eax,%ecx 1165fb: 51 push %ecx 1165fc: 57 push %edi 1165fd: e8 a6 36 00 00 call 119ca8 <_Watchdog_Adjust_to_chain> 116602: eb 0f jmp 116613 <_Timer_server_Body+0xa3> <== ALWAYS TAKEN } else if ( snapshot < last_snapshot ) { 116604: 73 10 jae 116616 <_Timer_server_Body+0xa6> /* * 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 ); 116606: 51 push %ecx 116607: 2b 45 c4 sub -0x3c(%ebp),%eax 11660a: 50 push %eax 11660b: 6a 01 push $0x1 11660d: 57 push %edi 11660e: e8 29 36 00 00 call 119c3c <_Watchdog_Adjust> 116613: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 116616: 8b 45 c4 mov -0x3c(%ebp),%eax 116619: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 11661c: 8b 43 78 mov 0x78(%ebx),%eax 11661f: 83 ec 0c sub $0xc,%esp 116622: 50 push %eax 116623: e8 3c 07 00 00 call 116d64 <_Chain_Get> <== ALWAYS TAKEN if ( timer == NULL ) { 116628: 83 c4 10 add $0x10,%esp 11662b: 85 c0 test %eax,%eax 11662d: 74 29 je 116658 <_Timer_server_Body+0xe8> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11662f: 8b 50 38 mov 0x38(%eax),%edx 116632: 83 fa 01 cmp $0x1,%edx 116635: 75 0b jne 116642 <_Timer_server_Body+0xd2> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116637: 52 push %edx 116638: 52 push %edx 116639: 83 c0 10 add $0x10,%eax 11663c: 50 push %eax 11663d: ff 75 c0 pushl -0x40(%ebp) 116640: eb 0c jmp 11664e <_Timer_server_Body+0xde> <== ALWAYS TAKEN } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116642: 83 fa 03 cmp $0x3,%edx 116645: 75 d5 jne 11661c <_Timer_server_Body+0xac> <== ALWAYS TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116647: 51 push %ecx 116648: 51 push %ecx 116649: 83 c0 10 add $0x10,%eax 11664c: 50 push %eax 11664d: 57 push %edi 11664e: e8 dd 36 00 00 call 119d30 <_Watchdog_Insert> 116653: 83 c4 10 add $0x10,%esp 116656: eb c4 jmp 11661c <_Timer_server_Body+0xac> <== ALWAYS TAKEN * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 116658: 9c pushf 116659: fa cli 11665a: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 11665b: 8b 55 b4 mov -0x4c(%ebp),%edx 11665e: 39 55 dc cmp %edx,-0x24(%ebp) 116661: 75 13 jne 116676 <_Timer_server_Body+0x106> <== ALWAYS TAKEN ts->insert_chain = NULL; 116663: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 11666a: 50 push %eax 11666b: 9d popf _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 ) ) { 11666c: 8b 4d b0 mov -0x50(%ebp),%ecx 11666f: 39 4d d0 cmp %ecx,-0x30(%ebp) 116672: 75 09 jne 11667d <_Timer_server_Body+0x10d> 116674: eb 3e jmp 1166b4 <_Timer_server_Body+0x144> <== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 116676: 50 push %eax <== NOT EXECUTED 116677: 9d popf <== NOT EXECUTED 116678: e9 46 ff ff ff jmp 1165c3 <_Timer_server_Body+0x53> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 11667d: 9c pushf 11667e: fa cli 11667f: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116680: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 116683: 3b 45 b0 cmp -0x50(%ebp),%eax 116686: 74 25 je 1166ad <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 116688: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 11668a: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 11668d: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 116690: 85 c0 test %eax,%eax 116692: 74 19 je 1166ad <_Timer_server_Body+0x13d> <== ALWAYS TAKEN watchdog->state = WATCHDOG_INACTIVE; 116694: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 11669b: 52 push %edx 11669c: 9d popf /* * 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 ); 11669d: 52 push %edx 11669e: 52 push %edx 11669f: ff 70 24 pushl 0x24(%eax) 1166a2: ff 70 20 pushl 0x20(%eax) 1166a5: ff 50 1c call *0x1c(%eax) } 1166a8: 83 c4 10 add $0x10,%esp 1166ab: eb d0 jmp 11667d <_Timer_server_Body+0x10d> <== ALWAYS TAKEN watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 1166ad: 52 push %edx 1166ae: 9d popf 1166af: e9 09 ff ff ff jmp 1165bd <_Timer_server_Body+0x4d> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 1166b4: c6 43 7c 00 movb $0x0,0x7c(%ebx) 1166b8: a1 c0 d5 13 00 mov 0x13d5c0,%eax 1166bd: 40 inc %eax 1166be: a3 c0 d5 13 00 mov %eax,0x13d5c0 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 1166c3: 50 push %eax 1166c4: 50 push %eax 1166c5: 6a 08 push $0x8 1166c7: ff 33 pushl (%ebx) 1166c9: e8 4a 2e 00 00 call 119518 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1166ce: 89 d8 mov %ebx,%eax 1166d0: e8 0f fe ff ff call 1164e4 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 1166d5: 89 d8 mov %ebx,%eax 1166d7: e8 4e fe ff ff call 11652a <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1166dc: e8 14 25 00 00 call 118bf5 <_Thread_Enable_dispatch> ts->active = true; 1166e1: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1166e5: 59 pop %ecx 1166e6: ff 75 b8 pushl -0x48(%ebp) 1166e9: e8 5a 37 00 00 call 119e48 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1166ee: 5a pop %edx 1166ef: ff 75 bc pushl -0x44(%ebp) 1166f2: e8 51 37 00 00 call 119e48 <_Watchdog_Remove> 1166f7: 83 c4 10 add $0x10,%esp 1166fa: e9 be fe ff ff jmp 1165bd <_Timer_server_Body+0x4d> <== ALWAYS TAKEN 001164e4 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 1164e4: 55 push %ebp 1164e5: 89 e5 mov %esp,%ebp 1164e7: 56 push %esi 1164e8: 53 push %ebx 1164e9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1164eb: 8d 70 08 lea 0x8(%eax),%esi 1164ee: 83 ec 0c sub $0xc,%esp 1164f1: 56 push %esi 1164f2: e8 51 39 00 00 call 119e48 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 1164f7: 9c pushf 1164f8: fa cli 1164f9: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1164fa: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1164fd: 8d 4b 34 lea 0x34(%ebx),%ecx 116500: 83 c4 10 add $0x10,%esp 116503: 39 ca cmp %ecx,%edx 116505: 74 1a je 116521 <_Timer_server_Reset_interval_system_watchdog+0x3d> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 116507: 8b 52 10 mov 0x10(%edx),%edx _ISR_Enable( level ); 11650a: 50 push %eax 11650b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11650c: 89 53 14 mov %edx,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11650f: 53 push %ebx 116510: 53 push %ebx 116511: 56 push %esi 116512: 68 9c d6 13 00 push $0x13d69c 116517: e8 14 38 00 00 call 119d30 <_Watchdog_Insert> 11651c: 83 c4 10 add $0x10,%esp 11651f: eb 02 jmp 116523 <_Timer_server_Reset_interval_system_watchdog+0x3f> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 116521: 50 push %eax 116522: 9d popf } } 116523: 8d 65 f8 lea -0x8(%ebp),%esp 116526: 5b pop %ebx 116527: 5e pop %esi 116528: c9 leave 116529: c3 ret 0011652a <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 11652a: 55 push %ebp 11652b: 89 e5 mov %esp,%ebp 11652d: 56 push %esi 11652e: 53 push %ebx 11652f: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116531: 8d 70 40 lea 0x40(%eax),%esi 116534: 83 ec 0c sub $0xc,%esp 116537: 56 push %esi 116538: e8 0b 39 00 00 call 119e48 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 11653d: 9c pushf 11653e: fa cli 11653f: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116540: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116543: 8d 4b 6c lea 0x6c(%ebx),%ecx 116546: 83 c4 10 add $0x10,%esp 116549: 39 ca cmp %ecx,%edx 11654b: 74 1a je 116567 <_Timer_server_Reset_tod_system_watchdog+0x3d> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 11654d: 8b 52 10 mov 0x10(%edx),%edx _ISR_Enable( level ); 116550: 50 push %eax 116551: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 116552: 89 53 4c mov %edx,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 116555: 50 push %eax 116556: 50 push %eax 116557: 56 push %esi 116558: 68 90 d6 13 00 push $0x13d690 11655d: e8 ce 37 00 00 call 119d30 <_Watchdog_Insert> 116562: 83 c4 10 add $0x10,%esp 116565: eb 02 jmp 116569 <_Timer_server_Reset_tod_system_watchdog+0x3f> <== ALWAYS TAKEN _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 116567: 50 push %eax 116568: 9d popf } } 116569: 8d 65 f8 lea -0x8(%ebp),%esp 11656c: 5b pop %ebx 11656d: 5e pop %esi 11656e: c9 leave 11656f: c3 ret 001166ff <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1166ff: 55 push %ebp 116700: 89 e5 mov %esp,%ebp 116702: 57 push %edi 116703: 56 push %esi 116704: 53 push %ebx 116705: 83 ec 2c sub $0x2c,%esp 116708: 8b 5d 08 mov 0x8(%ebp),%ebx 11670b: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 11670e: 8b 53 78 mov 0x78(%ebx),%edx 116711: 85 d2 test %edx,%edx 116713: 0f 85 e6 00 00 00 jne 1167ff <_Timer_server_Schedule_operation_method+0x100> 116719: 8b 15 c0 d5 13 00 mov 0x13d5c0,%edx 11671f: 42 inc %edx 116720: 89 15 c0 d5 13 00 mov %edx,0x13d5c0 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116726: 8b 50 38 mov 0x38(%eax),%edx 116729: 83 fa 01 cmp $0x1,%edx 11672c: 75 5a jne 116788 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 11672e: 9c pushf 11672f: fa cli 116730: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116733: 8b 0d 0c d7 13 00 mov 0x13d70c,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 116739: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11673c: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11673f: 8d 7b 34 lea 0x34(%ebx),%edi 116742: 39 fa cmp %edi,%edx 116744: 74 19 je 11675f <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116746: 89 cf mov %ecx,%edi 116748: 29 f7 sub %esi,%edi 11674a: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 11674d: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 116750: 31 f6 xor %esi,%esi 116752: 3b 7d e4 cmp -0x1c(%ebp),%edi 116755: 76 05 jbe 11675c <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 116757: 89 fe mov %edi,%esi 116759: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 11675c: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 11675f: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 116762: ff 75 e0 pushl -0x20(%ebp) 116765: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116766: 57 push %edi 116767: 57 push %edi 116768: 83 c0 10 add $0x10,%eax 11676b: 50 push %eax 11676c: 8d 43 30 lea 0x30(%ebx),%eax 11676f: 50 push %eax 116770: e8 bb 35 00 00 call 119d30 <_Watchdog_Insert> if ( !ts->active ) { 116775: 8a 43 7c mov 0x7c(%ebx),%al 116778: 83 c4 10 add $0x10,%esp 11677b: 84 c0 test %al,%al 11677d: 75 74 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 11677f: 89 d8 mov %ebx,%eax 116781: e8 5e fd ff ff call 1164e4 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN 116786: eb 6b jmp 1167f3 <_Timer_server_Schedule_operation_method+0xf4> <== ALWAYS TAKEN } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116788: 83 fa 03 cmp $0x3,%edx 11678b: 75 66 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> <== ALWAYS TAKEN /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 11678d: 9c pushf 11678e: fa cli 11678f: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116792: 8b 0d 50 d6 13 00 mov 0x13d650,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 116798: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11679b: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11679e: 8d 7b 6c lea 0x6c(%ebx),%edi 1167a1: 39 fe cmp %edi,%esi 1167a3: 74 27 je 1167cc <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1167a5: 8b 7e 10 mov 0x10(%esi),%edi 1167a8: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 1167ab: 39 d1 cmp %edx,%ecx 1167ad: 76 15 jbe 1167c4 <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1167af: 89 cf mov %ecx,%edi 1167b1: 29 d7 sub %edx,%edi 1167b3: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 1167b6: 31 d2 xor %edx,%edx 1167b8: 39 7d d4 cmp %edi,-0x2c(%ebp) 1167bb: 76 0c jbe 1167c9 <_Timer_server_Schedule_operation_method+0xca> <== ALWAYS TAKEN delta_interval -= delta; 1167bd: 8b 55 d4 mov -0x2c(%ebp),%edx 1167c0: 29 fa sub %edi,%edx 1167c2: eb 05 jmp 1167c9 <_Timer_server_Schedule_operation_method+0xca> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1167c4: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 1167c7: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 1167c9: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 1167cc: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 1167cf: ff 75 e0 pushl -0x20(%ebp) 1167d2: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1167d3: 56 push %esi 1167d4: 56 push %esi 1167d5: 83 c0 10 add $0x10,%eax 1167d8: 50 push %eax 1167d9: 8d 43 68 lea 0x68(%ebx),%eax 1167dc: 50 push %eax 1167dd: e8 4e 35 00 00 call 119d30 <_Watchdog_Insert> if ( !ts->active ) { 1167e2: 8a 43 7c mov 0x7c(%ebx),%al 1167e5: 83 c4 10 add $0x10,%esp 1167e8: 84 c0 test %al,%al 1167ea: 75 07 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 1167ec: 89 d8 mov %ebx,%eax 1167ee: e8 37 fd ff ff call 11652a <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN * 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 ); } } 1167f3: 8d 65 f4 lea -0xc(%ebp),%esp 1167f6: 5b pop %ebx 1167f7: 5e pop %esi 1167f8: 5f pop %edi 1167f9: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1167fa: e9 f6 23 00 00 jmp 118bf5 <_Thread_Enable_dispatch> * 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 ); 1167ff: 8b 53 78 mov 0x78(%ebx),%edx 116802: 89 45 0c mov %eax,0xc(%ebp) 116805: 89 55 08 mov %edx,0x8(%ebp) } } 116808: 8d 65 f4 lea -0xc(%ebp),%esp 11680b: 5b pop %ebx 11680c: 5e pop %esi 11680d: 5f pop %edi 11680e: c9 leave * 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 ); 11680f: e9 2c 05 00 00 jmp 116d40 <_Chain_Append> <== ALWAYS TAKEN 0010c71c <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10c71c: 55 push %ebp 10c71d: 89 e5 mov %esp,%ebp 10c71f: 8b 55 08 mov 0x8(%ebp),%edx 10c722: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t seconds = add->tv_sec; 10c725: 8b 01 mov (%ecx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10c727: 01 02 add %eax,(%edx) time->tv_nsec += add->tv_nsec; 10c729: 8b 49 04 mov 0x4(%ecx),%ecx 10c72c: 03 4a 04 add 0x4(%edx),%ecx 10c72f: 89 4a 04 mov %ecx,0x4(%edx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10c732: eb 09 jmp 10c73d <_Timespec_Add_to+0x21> <== ALWAYS TAKEN time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 10c734: ff 02 incl (%edx) seconds++; 10c736: 40 inc %eax 10c737: 81 e9 00 ca 9a 3b sub $0x3b9aca00,%ecx /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10c73d: 81 f9 ff c9 9a 3b cmp $0x3b9ac9ff,%ecx 10c743: 77 ef ja 10c734 <_Timespec_Add_to+0x18> 10c745: 89 4a 04 mov %ecx,0x4(%edx) time->tv_sec++; seconds++; } return seconds; } 10c748: c9 leave 10c749: c3 ret 0010de3c <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10de3c: 55 push %ebp 10de3d: 89 e5 mov %esp,%ebp 10de3f: 57 push %edi 10de40: 56 push %esi 10de41: 53 push %ebx 10de42: 83 ec 2c sub $0x2c,%esp 10de45: 8b 45 08 mov 0x8(%ebp),%eax 10de48: 8b 75 0c mov 0xc(%ebp),%esi /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10de4b: 8b 10 mov (%eax),%edx 10de4d: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10de50: 8b 58 04 mov 0x4(%eax),%ebx right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10de53: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10de58: 8b 06 mov (%esi),%eax 10de5a: f7 e9 imul %ecx 10de5c: 89 45 d0 mov %eax,-0x30(%ebp) 10de5f: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10de62: 8b 76 04 mov 0x4(%esi),%esi 10de65: 89 f7 mov %esi,%edi 10de67: c1 ff 1f sar $0x1f,%edi 10de6a: 01 75 d0 add %esi,-0x30(%ebp) 10de6d: 11 7d d4 adc %edi,-0x2c(%ebp) if ( right == 0 ) { 10de70: 8b 55 d4 mov -0x2c(%ebp),%edx 10de73: 0b 55 d0 or -0x30(%ebp),%edx 10de76: 75 14 jne 10de8c <_Timespec_Divide+0x50> *ival_percentage = 0; 10de78: 8b 45 10 mov 0x10(%ebp),%eax 10de7b: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10de81: 8b 55 14 mov 0x14(%ebp),%edx 10de84: c7 02 00 00 00 00 movl $0x0,(%edx) return; 10de8a: eb 73 jmp 10deff <_Timespec_Divide+0xc3> <== ALWAYS TAKEN /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10de8c: 8b 45 e0 mov -0x20(%ebp),%eax 10de8f: f7 e9 imul %ecx 10de91: 89 45 e0 mov %eax,-0x20(%ebp) 10de94: 89 55 e4 mov %edx,-0x1c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10de97: 89 de mov %ebx,%esi 10de99: c1 fe 1f sar $0x1f,%esi 10de9c: 01 5d e0 add %ebx,-0x20(%ebp) 10de9f: 11 75 e4 adc %esi,-0x1c(%ebp) 10dea2: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10dea9: b9 a0 86 01 00 mov $0x186a0,%ecx 10deae: 8b 45 e0 mov -0x20(%ebp),%eax 10deb1: f7 e1 mul %ecx 10deb3: 89 45 e0 mov %eax,-0x20(%ebp) 10deb6: 01 da add %ebx,%edx 10deb8: 89 55 e4 mov %edx,-0x1c(%ebp) 10debb: ff 75 d4 pushl -0x2c(%ebp) 10debe: ff 75 d0 pushl -0x30(%ebp) 10dec1: ff 75 e4 pushl -0x1c(%ebp) 10dec4: ff 75 e0 pushl -0x20(%ebp) 10dec7: e8 d0 05 01 00 call 11e49c <__udivdi3> 10decc: 83 c4 10 add $0x10,%esp 10decf: 89 c3 mov %eax,%ebx 10ded1: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10ded3: 6a 00 push $0x0 10ded5: 68 e8 03 00 00 push $0x3e8 10deda: 52 push %edx 10dedb: 50 push %eax 10dedc: e8 bb 05 01 00 call 11e49c <__udivdi3> 10dee1: 83 c4 10 add $0x10,%esp 10dee4: 8b 55 10 mov 0x10(%ebp),%edx 10dee7: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10dee9: 6a 00 push $0x0 10deeb: 68 e8 03 00 00 push $0x3e8 10def0: 56 push %esi 10def1: 53 push %ebx 10def2: e8 b5 06 01 00 call 11e5ac <__umoddi3> 10def7: 83 c4 10 add $0x10,%esp 10defa: 8b 55 14 mov 0x14(%ebp),%edx 10defd: 89 02 mov %eax,(%edx) } 10deff: 8d 65 f4 lea -0xc(%ebp),%esp 10df02: 5b pop %ebx 10df03: 5e pop %esi 10df04: 5f pop %edi 10df05: c9 leave 10df06: c3 ret 001357a4 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 1357a4: 55 push %ebp 1357a5: 89 e5 mov %esp,%ebp 1357a7: 53 push %ebx 1357a8: 8b 4d 08 mov 0x8(%ebp),%ecx 1357ab: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec > rhs->tv_sec ) 1357ae: 8b 1a mov (%edx),%ebx 1357b0: b0 01 mov $0x1,%al 1357b2: 39 19 cmp %ebx,(%ecx) 1357b4: 7f 0f jg 1357c5 <_Timespec_Greater_than+0x21> return true; if ( lhs->tv_sec < rhs->tv_sec ) 1357b6: 7d 04 jge 1357bc <_Timespec_Greater_than+0x18> 1357b8: 31 c0 xor %eax,%eax 1357ba: eb 09 jmp 1357c5 <_Timespec_Greater_than+0x21> <== ALWAYS TAKEN #include #include #include bool _Timespec_Greater_than( 1357bc: 8b 41 04 mov 0x4(%ecx),%eax 1357bf: 3b 42 04 cmp 0x4(%edx),%eax 1357c2: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 1357c5: 5b pop %ebx 1357c6: c9 leave 1357c7: c3 ret 00124f68 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 124f68: 55 push %ebp 124f69: 89 e5 mov %esp,%ebp 124f6b: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 124f6e: 85 c0 test %eax,%eax 124f70: 74 16 je 124f88 <_Timespec_Is_valid+0x20> return false; if ( time->tv_sec < 0 ) 124f72: 83 38 00 cmpl $0x0,(%eax) 124f75: 78 11 js 124f88 <_Timespec_Is_valid+0x20> return false; if ( time->tv_nsec < 0 ) 124f77: 8b 40 04 mov 0x4(%eax),%eax 124f7a: 85 c0 test %eax,%eax 124f7c: 78 0a js 124f88 <_Timespec_Is_valid+0x20> #include #include #include bool _Timespec_Is_valid( 124f7e: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 124f83: 0f 96 c0 setbe %al 124f86: eb 02 jmp 124f8a <_Timespec_Is_valid+0x22> <== ALWAYS TAKEN 124f88: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 124f8a: c9 leave 124f8b: c3 ret 001357c8 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 1357c8: 55 push %ebp 1357c9: 89 e5 mov %esp,%ebp 1357cb: 53 push %ebx 1357cc: 8b 4d 08 mov 0x8(%ebp),%ecx 1357cf: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec < rhs->tv_sec ) 1357d2: 8b 1a mov (%edx),%ebx 1357d4: b0 01 mov $0x1,%al 1357d6: 39 19 cmp %ebx,(%ecx) 1357d8: 7c 0f jl 1357e9 <_Timespec_Less_than+0x21> return true; if ( lhs->tv_sec > rhs->tv_sec ) 1357da: 7e 04 jle 1357e0 <_Timespec_Less_than+0x18> 1357dc: 31 c0 xor %eax,%eax 1357de: eb 09 jmp 1357e9 <_Timespec_Less_than+0x21> <== ALWAYS TAKEN #include #include #include bool _Timespec_Less_than( 1357e0: 8b 41 04 mov 0x4(%ecx),%eax 1357e3: 3b 42 04 cmp 0x4(%edx),%eax 1357e6: 0f 9c c0 setl %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 1357e9: 5b pop %ebx 1357ea: c9 leave 1357eb: c3 ret 0010c74c <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10c74c: 55 push %ebp 10c74d: 89 e5 mov %esp,%ebp 10c74f: 53 push %ebx 10c750: 8b 45 08 mov 0x8(%ebp),%eax 10c753: 8b 5d 0c mov 0xc(%ebp),%ebx 10c756: 8b 55 10 mov 0x10(%ebp),%edx if (end->tv_nsec < start->tv_nsec) { 10c759: 8b 4b 04 mov 0x4(%ebx),%ecx 10c75c: 3b 48 04 cmp 0x4(%eax),%ecx 10c75f: 8b 1b mov (%ebx),%ebx 10c761: 7d 0d jge 10c770 <_Timespec_Subtract+0x24> result->tv_sec = end->tv_sec - start->tv_sec - 1; 10c763: 4b dec %ebx 10c764: 2b 18 sub (%eax),%ebx 10c766: 89 1a mov %ebx,(%edx) result->tv_nsec = 10c768: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10c76e: eb 04 jmp 10c774 <_Timespec_Subtract+0x28> <== ALWAYS TAKEN (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 10c770: 2b 18 sub (%eax),%ebx 10c772: 89 1a mov %ebx,(%edx) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10c774: 2b 48 04 sub 0x4(%eax),%ecx 10c777: 89 4a 04 mov %ecx,0x4(%edx) } } 10c77a: 5b pop %ebx 10c77b: c9 leave 10c77c: c3 ret 0010c893 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c893: 55 push %ebp 10c894: 89 e5 mov %esp,%ebp 10c896: 57 push %edi 10c897: 56 push %esi 10c898: 53 push %ebx 10c899: 83 ec 0c sub $0xc,%esp 10c89c: 8b 7d 10 mov 0x10(%ebp),%edi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c89f: 8b 1d 04 44 12 00 mov 0x124404,%ebx 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 ); 10c8a5: 0f b6 75 0c movzbl 0xc(%ebp),%esi ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c8a9: eb 15 jmp 10c8c0 <_User_extensions_Fatal+0x2d> <== ALWAYS 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.fatal != NULL ) 10c8ab: 8b 43 30 mov 0x30(%ebx),%eax 10c8ae: 85 c0 test %eax,%eax 10c8b0: 74 0b je 10c8bd <_User_extensions_Fatal+0x2a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10c8b2: 52 push %edx 10c8b3: 57 push %edi 10c8b4: 56 push %esi 10c8b5: ff 75 08 pushl 0x8(%ebp) 10c8b8: ff d0 call *%eax 10c8ba: 83 c4 10 add $0x10,%esp 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 ) { 10c8bd: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c8c0: 81 fb fc 43 12 00 cmp $0x1243fc,%ebx 10c8c6: 75 e3 jne 10c8ab <_User_extensions_Fatal+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10c8c8: 8d 65 f4 lea -0xc(%ebp),%esp 10c8cb: 5b pop %ebx 10c8cc: 5e pop %esi 10c8cd: 5f pop %edi 10c8ce: c9 leave 10c8cf: c3 ret 0010c780 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10c780: 55 push %ebp 10c781: 89 e5 mov %esp,%ebp 10c783: 57 push %edi 10c784: 56 push %esi 10c785: 53 push %ebx 10c786: 83 ec 1c sub $0x1c,%esp 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; 10c789: a1 30 02 12 00 mov 0x120230,%eax 10c78e: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10c791: 8b 35 34 02 12 00 mov 0x120234,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c797: c7 05 fc 43 12 00 00 movl $0x124400,0x1243fc 10c79e: 44 12 00 the_chain->permanent_null = NULL; 10c7a1: c7 05 00 44 12 00 00 movl $0x0,0x124400 10c7a8: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c7ab: c7 05 04 44 12 00 fc movl $0x1243fc,0x124404 10c7b2: 43 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c7b5: c7 05 f0 41 12 00 f4 movl $0x1241f4,0x1241f0 10c7bc: 41 12 00 the_chain->permanent_null = NULL; 10c7bf: c7 05 f4 41 12 00 00 movl $0x0,0x1241f4 10c7c6: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c7c9: c7 05 f8 41 12 00 f0 movl $0x1241f0,0x1241f8 10c7d0: 41 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10c7d3: 85 f6 test %esi,%esi 10c7d5: 74 50 je 10c827 <_User_extensions_Handler_initialization+0xa7> extension = (User_extensions_Control *) 10c7d7: 6b c8 34 imul $0x34,%eax,%ecx 10c7da: 83 ec 0c sub $0xc,%esp 10c7dd: 51 push %ecx 10c7de: 89 4d e0 mov %ecx,-0x20(%ebp) 10c7e1: e8 b2 03 00 00 call 10cb98 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10c7e6: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10c7e8: 31 c0 xor %eax,%eax 10c7ea: 8b 4d e0 mov -0x20(%ebp),%ecx 10c7ed: 89 df mov %ebx,%edi 10c7ef: f3 aa rep stos %al,%es:(%edi) 10c7f1: 89 f0 mov %esi,%eax 10c7f3: 31 d2 xor %edx,%edx 10c7f5: eb 28 jmp 10c81f <_User_extensions_Handler_initialization+0x9f> <== ALWAYS 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; 10c7f7: 8d 7b 14 lea 0x14(%ebx),%edi 10c7fa: 89 c6 mov %eax,%esi 10c7fc: b9 08 00 00 00 mov $0x8,%ecx 10c801: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10c803: 83 ec 0c sub $0xc,%esp 10c806: 53 push %ebx 10c807: 89 45 e0 mov %eax,-0x20(%ebp) 10c80a: 89 55 dc mov %edx,-0x24(%ebp) 10c80d: e8 96 2d 00 00 call 10f5a8 <_User_extensions_Add_set> <== ALWAYS TAKEN number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10c812: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10c815: 8b 55 dc mov -0x24(%ebp),%edx 10c818: 42 inc %edx 10c819: 8b 45 e0 mov -0x20(%ebp),%eax 10c81c: 83 c0 20 add $0x20,%eax 10c81f: 83 c4 10 add $0x10,%esp 10c822: 3b 55 e4 cmp -0x1c(%ebp),%edx 10c825: 72 d0 jb 10c7f7 <_User_extensions_Handler_initialization+0x77> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10c827: 8d 65 f4 lea -0xc(%ebp),%esp 10c82a: 5b pop %ebx 10c82b: 5e pop %esi 10c82c: 5f pop %edi 10c82d: c9 leave 10c82e: c3 ret 0010c830 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10c830: 55 push %ebp 10c831: 89 e5 mov %esp,%ebp 10c833: 56 push %esi 10c834: 53 push %ebx 10c835: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10c838: 8b 1d fc 43 12 00 mov 0x1243fc,%ebx 10c83e: eb 12 jmp 10c852 <_User_extensions_Thread_begin+0x22> <== ALWAYS 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 ) 10c840: 8b 43 28 mov 0x28(%ebx),%eax 10c843: 85 c0 test %eax,%eax 10c845: 74 09 je 10c850 <_User_extensions_Thread_begin+0x20> (*the_extension->Callouts.thread_begin)( executing ); 10c847: 83 ec 0c sub $0xc,%esp 10c84a: 56 push %esi 10c84b: ff d0 call *%eax 10c84d: 83 c4 10 add $0x10,%esp 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 ) { 10c850: 8b 1b mov (%ebx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c852: 81 fb 00 44 12 00 cmp $0x124400,%ebx 10c858: 75 e6 jne 10c840 <_User_extensions_Thread_begin+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10c85a: 8d 65 f8 lea -0x8(%ebp),%esp 10c85d: 5b pop %ebx 10c85e: 5e pop %esi 10c85f: c9 leave 10c860: c3 ret 0010c8d0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10c8d0: 55 push %ebp 10c8d1: 89 e5 mov %esp,%ebp 10c8d3: 56 push %esi 10c8d4: 53 push %ebx 10c8d5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10c8d8: 8b 1d fc 43 12 00 mov 0x1243fc,%ebx 10c8de: eb 1b jmp 10c8fb <_User_extensions_Thread_create+0x2b> <== ALWAYS 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 ) { 10c8e0: 8b 43 14 mov 0x14(%ebx),%eax 10c8e3: 85 c0 test %eax,%eax 10c8e5: 74 12 je 10c8f9 <_User_extensions_Thread_create+0x29> status = (*the_extension->Callouts.thread_create)( 10c8e7: 52 push %edx 10c8e8: 52 push %edx 10c8e9: 56 push %esi 10c8ea: ff 35 a8 42 12 00 pushl 0x1242a8 10c8f0: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10c8f2: 83 c4 10 add $0x10,%esp 10c8f5: 84 c0 test %al,%al 10c8f7: 74 0c je 10c905 <_User_extensions_Thread_create+0x35> 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 ) { 10c8f9: 8b 1b mov (%ebx),%ebx 10c8fb: 81 fb 00 44 12 00 cmp $0x124400,%ebx 10c901: 75 dd jne 10c8e0 <_User_extensions_Thread_create+0x10> 10c903: b0 01 mov $0x1,%al return false; } } return true; } 10c905: 8d 65 f8 lea -0x8(%ebp),%esp 10c908: 5b pop %ebx 10c909: 5e pop %esi 10c90a: c9 leave 10c90b: c3 ret 0010c90c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10c90c: 55 push %ebp 10c90d: 89 e5 mov %esp,%ebp 10c90f: 56 push %esi 10c910: 53 push %ebx 10c911: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c914: 8b 1d 04 44 12 00 mov 0x124404,%ebx 10c91a: eb 18 jmp 10c934 <_User_extensions_Thread_delete+0x28> <== ALWAYS 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 ) 10c91c: 8b 43 20 mov 0x20(%ebx),%eax 10c91f: 85 c0 test %eax,%eax 10c921: 74 0e je 10c931 <_User_extensions_Thread_delete+0x25> (*the_extension->Callouts.thread_delete)( 10c923: 52 push %edx 10c924: 52 push %edx 10c925: 56 push %esi 10c926: ff 35 a8 42 12 00 pushl 0x1242a8 10c92c: ff d0 call *%eax 10c92e: 83 c4 10 add $0x10,%esp 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 ) { 10c931: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c934: 81 fb fc 43 12 00 cmp $0x1243fc,%ebx 10c93a: 75 e0 jne 10c91c <_User_extensions_Thread_delete+0x10> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10c93c: 8d 65 f8 lea -0x8(%ebp),%esp 10c93f: 5b pop %ebx 10c940: 5e pop %esi 10c941: c9 leave 10c942: c3 ret 0010c861 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10c861: 55 push %ebp 10c862: 89 e5 mov %esp,%ebp 10c864: 56 push %esi 10c865: 53 push %ebx 10c866: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c869: 8b 1d 04 44 12 00 mov 0x124404,%ebx 10c86f: eb 13 jmp 10c884 <_User_extensions_Thread_exitted+0x23> <== ALWAYS 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 ) 10c871: 8b 43 2c mov 0x2c(%ebx),%eax 10c874: 85 c0 test %eax,%eax 10c876: 74 09 je 10c881 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10c878: 83 ec 0c sub $0xc,%esp 10c87b: 56 push %esi 10c87c: ff d0 call *%eax 10c87e: 83 c4 10 add $0x10,%esp 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 ) { 10c881: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c884: 81 fb fc 43 12 00 cmp $0x1243fc,%ebx 10c88a: 75 e5 jne 10c871 <_User_extensions_Thread_exitted+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10c88c: 8d 65 f8 lea -0x8(%ebp),%esp 10c88f: 5b pop %ebx 10c890: 5e pop %esi 10c891: c9 leave 10c892: c3 ret 0010d3c8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10d3c8: 55 push %ebp 10d3c9: 89 e5 mov %esp,%ebp 10d3cb: 56 push %esi 10d3cc: 53 push %ebx 10d3cd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10d3d0: 8b 1d 48 64 12 00 mov 0x126448,%ebx 10d3d6: eb 17 jmp 10d3ef <_User_extensions_Thread_restart+0x27> <== ALWAYS 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 ) 10d3d8: 8b 43 1c mov 0x1c(%ebx),%eax 10d3db: 85 c0 test %eax,%eax 10d3dd: 74 0e je 10d3ed <_User_extensions_Thread_restart+0x25> (*the_extension->Callouts.thread_restart)( 10d3df: 52 push %edx 10d3e0: 52 push %edx 10d3e1: 56 push %esi 10d3e2: ff 35 f4 62 12 00 pushl 0x1262f4 10d3e8: ff d0 call *%eax 10d3ea: 83 c4 10 add $0x10,%esp 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 ) { 10d3ed: 8b 1b mov (%ebx),%ebx 10d3ef: 81 fb 4c 64 12 00 cmp $0x12644c,%ebx 10d3f5: 75 e1 jne 10d3d8 <_User_extensions_Thread_restart+0x10> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10d3f7: 8d 65 f8 lea -0x8(%ebp),%esp 10d3fa: 5b pop %ebx 10d3fb: 5e pop %esi 10d3fc: c9 leave 10d3fd: c3 ret 0010c944 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10c944: 55 push %ebp 10c945: 89 e5 mov %esp,%ebp 10c947: 56 push %esi 10c948: 53 push %ebx 10c949: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10c94c: 8b 1d fc 43 12 00 mov 0x1243fc,%ebx 10c952: eb 17 jmp 10c96b <_User_extensions_Thread_start+0x27> <== ALWAYS 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 ) 10c954: 8b 43 18 mov 0x18(%ebx),%eax 10c957: 85 c0 test %eax,%eax 10c959: 74 0e je 10c969 <_User_extensions_Thread_start+0x25> (*the_extension->Callouts.thread_start)( 10c95b: 52 push %edx 10c95c: 52 push %edx 10c95d: 56 push %esi 10c95e: ff 35 a8 42 12 00 pushl 0x1242a8 10c964: ff d0 call *%eax 10c966: 83 c4 10 add $0x10,%esp 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 ) { 10c969: 8b 1b mov (%ebx),%ebx 10c96b: 81 fb 00 44 12 00 cmp $0x124400,%ebx 10c971: 75 e1 jne 10c954 <_User_extensions_Thread_start+0x10> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10c973: 8d 65 f8 lea -0x8(%ebp),%esp 10c976: 5b pop %ebx 10c977: 5e pop %esi 10c978: c9 leave 10c979: c3 ret 0010c97c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10c97c: 55 push %ebp 10c97d: 89 e5 mov %esp,%ebp 10c97f: 57 push %edi 10c980: 56 push %esi 10c981: 53 push %ebx 10c982: 83 ec 0c sub $0xc,%esp 10c985: 8b 7d 08 mov 0x8(%ebp),%edi 10c988: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10c98b: 8b 1d f0 41 12 00 mov 0x1241f0,%ebx 10c991: eb 0c jmp 10c99f <_User_extensions_Thread_switch+0x23> <== ALWAYS 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 ); 10c993: 50 push %eax 10c994: 50 push %eax 10c995: 56 push %esi 10c996: 57 push %edi 10c997: ff 53 08 call *0x8(%ebx) 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 ) { 10c99a: 8b 1b mov (%ebx),%ebx 10c99c: 83 c4 10 add $0x10,%esp 10c99f: 81 fb f4 41 12 00 cmp $0x1241f4,%ebx 10c9a5: 75 ec jne 10c993 <_User_extensions_Thread_switch+0x17> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10c9a7: 8d 65 f4 lea -0xc(%ebp),%esp 10c9aa: 5b pop %ebx 10c9ab: 5e pop %esi 10c9ac: 5f pop %edi 10c9ad: c9 leave 10c9ae: c3 ret 0010e1a8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e1a8: 55 push %ebp 10e1a9: 89 e5 mov %esp,%ebp 10e1ab: 57 push %edi 10e1ac: 56 push %esi 10e1ad: 53 push %ebx 10e1ae: 83 ec 1c sub $0x1c,%esp 10e1b1: 8b 75 08 mov 0x8(%ebp),%esi 10e1b4: 8b 7d 0c mov 0xc(%ebp),%edi 10e1b7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e1ba: 9c pushf 10e1bb: fa cli 10e1bc: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e1bd: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e1bf: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e1c2: 39 ca cmp %ecx,%edx 10e1c4: 74 44 je 10e20a <_Watchdog_Adjust+0x62> switch ( direction ) { 10e1c6: 85 ff test %edi,%edi 10e1c8: 74 3c je 10e206 <_Watchdog_Adjust+0x5e> 10e1ca: 4f dec %edi 10e1cb: 75 3d jne 10e20a <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e1cd: 01 5a 10 add %ebx,0x10(%edx) break; 10e1d0: eb 38 jmp 10e20a <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e1d2: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e1d4: 8b 7a 10 mov 0x10(%edx),%edi 10e1d7: 39 fb cmp %edi,%ebx 10e1d9: 73 07 jae 10e1e2 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e1db: 29 df sub %ebx,%edi 10e1dd: 89 7a 10 mov %edi,0x10(%edx) break; 10e1e0: eb 28 jmp 10e20a <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e1e2: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e1e9: 50 push %eax 10e1ea: 9d popf _Watchdog_Tickle( header ); 10e1eb: 83 ec 0c sub $0xc,%esp 10e1ee: 56 push %esi 10e1ef: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e1f2: e8 9d 01 00 00 call 10e394 <_Watchdog_Tickle> <== ALWAYS TAKEN _ISR_Disable( level ); 10e1f7: 9c pushf 10e1f8: fa cli 10e1f9: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e1fa: 83 c4 10 add $0x10,%esp 10e1fd: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e200: 39 0e cmp %ecx,(%esi) 10e202: 74 06 je 10e20a <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e204: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e206: 85 db test %ebx,%ebx 10e208: 75 c8 jne 10e1d2 <_Watchdog_Adjust+0x2a> <== NEVER TAKEN } break; } } _ISR_Enable( level ); 10e20a: 50 push %eax 10e20b: 9d popf } 10e20c: 8d 65 f4 lea -0xc(%ebp),%esp 10e20f: 5b pop %ebx 10e210: 5e pop %esi 10e211: 5f pop %edi 10e212: c9 leave 10e213: c3 ret 00119ca8 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 119ca8: 55 push %ebp 119ca9: 89 e5 mov %esp,%ebp 119cab: 57 push %edi 119cac: 56 push %esi 119cad: 53 push %ebx 119cae: 83 ec 0c sub $0xc,%esp 119cb1: 8b 7d 08 mov 0x8(%ebp),%edi 119cb4: 8b 4d 0c mov 0xc(%ebp),%ecx 119cb7: 8b 75 10 mov 0x10(%ebp),%esi Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 119cba: 85 c9 test %ecx,%ecx 119cbc: 74 69 je 119d27 <_Watchdog_Adjust_to_chain+0x7f> return; } _ISR_Disable( level ); 119cbe: 9c pushf 119cbf: fa cli 119cc0: 8f 45 ec popl -0x14(%ebp) 119cc3: 8d 47 04 lea 0x4(%edi),%eax 119cc6: 89 45 f0 mov %eax,-0x10(%ebp) 119cc9: 8d 56 04 lea 0x4(%esi),%edx 119ccc: 89 55 e8 mov %edx,-0x18(%ebp) 119ccf: eb 04 jmp 119cd5 <_Watchdog_Adjust_to_chain+0x2d> <== ALWAYS TAKEN while ( 1 ) { if ( units <= 0 ) { 119cd1: 85 c9 test %ecx,%ecx 119cd3: 74 4e je 119d23 <_Watchdog_Adjust_to_chain+0x7b> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119cd5: 8b 17 mov (%edi),%edx break; } if ( _Chain_Is_empty( header ) ) { 119cd7: 3b 55 f0 cmp -0x10(%ebp),%edx 119cda: 74 47 je 119d23 <_Watchdog_Adjust_to_chain+0x7b> 119cdc: 89 d0 mov %edx,%eax /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 119cde: 8b 5a 10 mov 0x10(%edx),%ebx 119ce1: 39 d9 cmp %ebx,%ecx 119ce3: 73 07 jae 119cec <_Watchdog_Adjust_to_chain+0x44> first->delta_interval -= units; 119ce5: 29 cb sub %ecx,%ebx 119ce7: 89 5a 10 mov %ebx,0x10(%edx) break; 119cea: eb 37 jmp 119d23 <_Watchdog_Adjust_to_chain+0x7b> <== ALWAYS TAKEN /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 119cec: 29 d9 sub %ebx,%ecx first->delta_interval = 0; 119cee: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 119cf5: 8b 18 mov (%eax),%ebx previous = the_node->previous; 119cf7: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 119cfa: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 119cfd: 89 1a mov %ebx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 119cff: 8b 55 e8 mov -0x18(%ebp),%edx 119d02: 89 10 mov %edx,(%eax) old_last_node = the_chain->last; 119d04: 8b 56 08 mov 0x8(%esi),%edx the_chain->last = the_node; 119d07: 89 46 08 mov %eax,0x8(%esi) old_last_node->next = the_node; 119d0a: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 119d0c: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 119d0f: ff 75 ec pushl -0x14(%ebp) 119d12: 9d popf 119d13: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119d14: 8b 07 mov (%edi),%eax if ( _Chain_Is_empty( header ) ) 119d16: 3b 45 f0 cmp -0x10(%ebp),%eax 119d19: 74 b6 je 119cd1 <_Watchdog_Adjust_to_chain+0x29> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 119d1b: 83 78 10 00 cmpl $0x0,0x10(%eax) 119d1f: 74 d4 je 119cf5 <_Watchdog_Adjust_to_chain+0x4d> 119d21: eb ae jmp 119cd1 <_Watchdog_Adjust_to_chain+0x29> <== ALWAYS TAKEN break; } } _ISR_Enable( level ); 119d23: ff 75 ec pushl -0x14(%ebp) 119d26: 9d popf } 119d27: 83 c4 0c add $0xc,%esp 119d2a: 5b pop %ebx 119d2b: 5e pop %esi 119d2c: 5f pop %edi 119d2d: c9 leave 119d2e: c3 ret 0010c9b0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10c9b0: 55 push %ebp 10c9b1: 89 e5 mov %esp,%ebp 10c9b3: 57 push %edi 10c9b4: 56 push %esi 10c9b5: 53 push %ebx 10c9b6: 83 ec 08 sub $0x8,%esp 10c9b9: 8b 45 0c mov 0xc(%ebp),%eax Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10c9bc: 8b 35 84 42 12 00 mov 0x124284,%esi _ISR_Disable( level ); 10c9c2: 9c pushf 10c9c3: fa cli 10c9c4: 5b pop %ebx /* * 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 ) { 10c9c5: 83 78 08 00 cmpl $0x0,0x8(%eax) 10c9c9: 74 07 je 10c9d2 <_Watchdog_Insert+0x22> _ISR_Enable( level ); 10c9cb: 53 push %ebx 10c9cc: 9d popf return; 10c9cd: e9 8d 00 00 00 jmp 10ca5f <_Watchdog_Insert+0xaf> <== ALWAYS TAKEN } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10c9d2: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) _Watchdog_Sync_count++; 10c9d9: 8b 15 34 43 12 00 mov 0x124334,%edx 10c9df: 42 inc %edx 10c9e0: 89 15 34 43 12 00 mov %edx,0x124334 restart: delta_interval = the_watchdog->initial; 10c9e6: 8b 48 0c mov 0xc(%eax),%ecx * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10c9e9: 8b 7d 08 mov 0x8(%ebp),%edi 10c9ec: 8b 17 mov (%edi),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10c9ee: 85 c9 test %ecx,%ecx 10c9f0: 74 38 je 10ca2a <_Watchdog_Insert+0x7a> 10c9f2: 83 3a 00 cmpl $0x0,(%edx) 10c9f5: 74 33 je 10ca2a <_Watchdog_Insert+0x7a> break; if ( delta_interval < after->delta_interval ) { 10c9f7: 8b 7a 10 mov 0x10(%edx),%edi 10c9fa: 89 7d ec mov %edi,-0x14(%ebp) 10c9fd: 39 f9 cmp %edi,%ecx 10c9ff: 73 07 jae 10ca08 <_Watchdog_Insert+0x58> after->delta_interval -= delta_interval; 10ca01: 29 cf sub %ecx,%edi 10ca03: 89 7a 10 mov %edi,0x10(%edx) break; 10ca06: eb 22 jmp 10ca2a <_Watchdog_Insert+0x7a> <== ALWAYS TAKEN * 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 ); 10ca08: 53 push %ebx 10ca09: 9d popf 10ca0a: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10ca0b: 83 78 08 01 cmpl $0x1,0x8(%eax) 10ca0f: 75 3b jne 10ca4c <_Watchdog_Insert+0x9c> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10ca11: 8b 3d a4 42 12 00 mov 0x1242a4,%edi 10ca17: 39 f7 cmp %esi,%edi 10ca19: 76 08 jbe 10ca23 <_Watchdog_Insert+0x73> _Watchdog_Sync_level = insert_isr_nest_level; 10ca1b: 89 35 a4 42 12 00 mov %esi,0x1242a4 goto restart; 10ca21: eb c3 jmp 10c9e6 <_Watchdog_Insert+0x36> <== ALWAYS TAKEN if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10ca23: 2b 4d ec sub -0x14(%ebp),%ecx RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10ca26: 8b 12 mov (%edx),%edx if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; goto restart; } } 10ca28: eb c4 jmp 10c9ee <_Watchdog_Insert+0x3e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10ca2a: c7 40 08 02 00 00 00 movl $0x2,0x8(%eax) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10ca31: 89 48 10 mov %ecx,0x10(%eax) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10ca34: 8b 52 04 mov 0x4(%edx),%edx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ca37: 89 50 04 mov %edx,0x4(%eax) before_node = after_node->next; 10ca3a: 8b 0a mov (%edx),%ecx after_node->next = the_node; 10ca3c: 89 02 mov %eax,(%edx) the_node->next = before_node; 10ca3e: 89 08 mov %ecx,(%eax) before_node->previous = the_node; 10ca40: 89 41 04 mov %eax,0x4(%ecx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10ca43: 8b 15 38 43 12 00 mov 0x124338,%edx 10ca49: 89 50 14 mov %edx,0x14(%eax) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10ca4c: 89 35 a4 42 12 00 mov %esi,0x1242a4 _Watchdog_Sync_count--; 10ca52: a1 34 43 12 00 mov 0x124334,%eax 10ca57: 48 dec %eax 10ca58: a3 34 43 12 00 mov %eax,0x124334 _ISR_Enable( level ); 10ca5d: 53 push %ebx 10ca5e: 9d popf } 10ca5f: 58 pop %eax 10ca60: 5a pop %edx 10ca61: 5b pop %ebx 10ca62: 5e pop %esi 10ca63: 5f pop %edi 10ca64: c9 leave 10ca65: c3 ret 0010cac8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10cac8: 55 push %ebp 10cac9: 89 e5 mov %esp,%ebp 10cacb: 56 push %esi 10cacc: 53 push %ebx 10cacd: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10cad0: 9c pushf 10cad1: fa cli 10cad2: 5e pop %esi previous_state = the_watchdog->state; 10cad3: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10cad6: 83 f8 01 cmp $0x1,%eax 10cad9: 74 09 je 10cae4 <_Watchdog_Remove+0x1c> 10cadb: 72 44 jb 10cb21 <_Watchdog_Remove+0x59> 10cadd: 83 f8 03 cmp $0x3,%eax 10cae0: 77 3f ja 10cb21 <_Watchdog_Remove+0x59> <== ALWAYS TAKEN 10cae2: eb 09 jmp 10caed <_Watchdog_Remove+0x25> <== ALWAYS TAKEN /* * 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; 10cae4: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10caeb: eb 34 jmp 10cb21 <_Watchdog_Remove+0x59> <== ALWAYS TAKEN case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10caed: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10caf4: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10caf6: 83 39 00 cmpl $0x0,(%ecx) 10caf9: 74 06 je 10cb01 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10cafb: 8b 5a 10 mov 0x10(%edx),%ebx 10cafe: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10cb01: 8b 0d 34 43 12 00 mov 0x124334,%ecx 10cb07: 85 c9 test %ecx,%ecx 10cb09: 74 0c je 10cb17 <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10cb0b: 8b 0d 84 42 12 00 mov 0x124284,%ecx 10cb11: 89 0d a4 42 12 00 mov %ecx,0x1242a4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10cb17: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10cb19: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10cb1c: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10cb1f: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10cb21: 8b 0d 38 43 12 00 mov 0x124338,%ecx 10cb27: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10cb2a: 56 push %esi 10cb2b: 9d popf return( previous_state ); } 10cb2c: 5b pop %ebx 10cb2d: 5e pop %esi 10cb2e: c9 leave 10cb2f: c3 ret 0010dd2c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10dd2c: 55 push %ebp 10dd2d: 89 e5 mov %esp,%ebp 10dd2f: 57 push %edi 10dd30: 56 push %esi 10dd31: 53 push %ebx 10dd32: 83 ec 20 sub $0x20,%esp 10dd35: 8b 7d 08 mov 0x8(%ebp),%edi 10dd38: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10dd3b: 9c pushf 10dd3c: fa cli 10dd3d: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10dd40: 56 push %esi 10dd41: 57 push %edi 10dd42: 68 44 0b 12 00 push $0x120b44 10dd47: e8 cc aa ff ff call 108818 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10dd4c: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dd4e: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10dd51: 83 c4 10 add $0x10,%esp 10dd54: 39 f3 cmp %esi,%ebx 10dd56: 74 1d je 10dd75 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10dd58: 52 push %edx 10dd59: 52 push %edx 10dd5a: 53 push %ebx 10dd5b: 6a 00 push $0x0 10dd5d: e8 32 00 00 00 call 10dd94 <_Watchdog_Report> <== ALWAYS TAKEN _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 ) 10dd62: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 10dd64: 83 c4 10 add $0x10,%esp 10dd67: 39 f3 cmp %esi,%ebx 10dd69: 75 ed jne 10dd58 <_Watchdog_Report_chain+0x2c> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10dd6b: 50 push %eax 10dd6c: 50 push %eax 10dd6d: 57 push %edi 10dd6e: 68 5b 0b 12 00 push $0x120b5b 10dd73: eb 08 jmp 10dd7d <_Watchdog_Report_chain+0x51> <== ALWAYS TAKEN } else { printk( "Chain is empty\n" ); 10dd75: 83 ec 0c sub $0xc,%esp 10dd78: 68 6a 0b 12 00 push $0x120b6a 10dd7d: e8 96 aa ff ff call 108818 10dd82: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10dd85: ff 75 e4 pushl -0x1c(%ebp) 10dd88: 9d popf } 10dd89: 8d 65 f4 lea -0xc(%ebp),%esp 10dd8c: 5b pop %ebx 10dd8d: 5e pop %esi 10dd8e: 5f pop %edi 10dd8f: c9 leave 10dd90: c3 ret 0010cb30 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10cb30: 55 push %ebp 10cb31: 89 e5 mov %esp,%ebp 10cb33: 57 push %edi 10cb34: 56 push %esi 10cb35: 53 push %ebx 10cb36: 83 ec 1c sub $0x1c,%esp 10cb39: 8b 7d 08 mov 0x8(%ebp),%edi * 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 ); 10cb3c: 9c pushf 10cb3d: fa cli 10cb3e: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10cb3f: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10cb41: 8d 47 04 lea 0x4(%edi),%eax 10cb44: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10cb47: 39 c3 cmp %eax,%ebx 10cb49: 74 40 je 10cb8b <_Watchdog_Tickle+0x5b> * 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) { 10cb4b: 8b 43 10 mov 0x10(%ebx),%eax 10cb4e: 85 c0 test %eax,%eax 10cb50: 74 08 je 10cb5a <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10cb52: 48 dec %eax 10cb53: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10cb56: 85 c0 test %eax,%eax 10cb58: 75 31 jne 10cb8b <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10cb5a: 83 ec 0c sub $0xc,%esp 10cb5d: 53 push %ebx 10cb5e: e8 65 ff ff ff call 10cac8 <_Watchdog_Remove> <== ALWAYS TAKEN _ISR_Enable( level ); 10cb63: 56 push %esi 10cb64: 9d popf switch( watchdog_state ) { 10cb65: 83 c4 10 add $0x10,%esp 10cb68: 83 f8 02 cmp $0x2,%eax 10cb6b: 75 0e jne 10cb7b <_Watchdog_Tickle+0x4b> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10cb6d: 50 push %eax 10cb6e: 50 push %eax 10cb6f: ff 73 24 pushl 0x24(%ebx) 10cb72: ff 73 20 pushl 0x20(%ebx) 10cb75: ff 53 1c call *0x1c(%ebx) 10cb78: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10cb7b: 9c pushf 10cb7c: fa cli 10cb7d: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10cb7e: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10cb80: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10cb83: 74 06 je 10cb8b <_Watchdog_Tickle+0x5b> 10cb85: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cb89: eb cd jmp 10cb58 <_Watchdog_Tickle+0x28> <== ALWAYS TAKEN leave: _ISR_Enable(level); 10cb8b: 56 push %esi 10cb8c: 9d popf } 10cb8d: 8d 65 f4 lea -0xc(%ebp),%esp 10cb90: 5b pop %ebx 10cb91: 5e pop %esi 10cb92: 5f pop %edi 10cb93: c9 leave 10cb94: c3 ret 00109e4c : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 109e4c: 55 push %ebp 109e4d: 89 e5 mov %esp,%ebp 109e4f: 56 push %esi 109e50: 53 push %ebx 109e51: 83 ec 10 sub $0x10,%esp 109e54: 8b 5d 08 mov 0x8(%ebp),%ebx 109e57: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 109e5a: 85 db test %ebx,%ebx 109e5c: 74 09 je 109e67 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 109e5e: 81 7b 04 3f 42 0f 00 cmpl $0xf423f,0x4(%ebx) 109e65: 76 13 jbe 109e7a rtems_set_errno_and_return_minus_one( EINVAL ); 109e67: e8 fc 7e 00 00 call 111d68 <__errno> 109e6c: c7 00 16 00 00 00 movl $0x16,(%eax) 109e72: 83 c8 ff or $0xffffffff,%eax 109e75: e9 9a 00 00 00 jmp 109f14 <== ALWAYS TAKEN if ( olddelta ) { 109e7a: 85 f6 test %esi,%esi 109e7c: 74 0d je 109e8b olddelta->tv_sec = 0; 109e7e: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 109e84: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 109e8b: 69 03 40 42 0f 00 imul $0xf4240,(%ebx),%eax adjustment += delta->tv_usec; 109e91: 03 43 04 add 0x4(%ebx),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 109e94: 3b 05 04 12 12 00 cmp 0x121204,%eax 109e9a: 72 76 jb 109f12 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109e9c: a1 14 53 12 00 mov 0x125314,%eax 109ea1: 40 inc %eax 109ea2: a3 14 53 12 00 mov %eax,0x125314 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 109ea7: 83 ec 0c sub $0xc,%esp 109eaa: 8d 45 f0 lea -0x10(%ebp),%eax 109ead: 50 push %eax 109eae: e8 dd 14 00 00 call 10b390 <_TOD_Get> ts.tv_sec += delta->tv_sec; 109eb3: 8b 03 mov (%ebx),%eax 109eb5: 01 45 f0 add %eax,-0x10(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 109eb8: 69 43 04 e8 03 00 00 imul $0x3e8,0x4(%ebx),%eax 109ebf: 8b 4d f0 mov -0x10(%ebp),%ecx 109ec2: 03 45 f4 add -0xc(%ebp),%eax /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 109ec5: 83 c4 10 add $0x10,%esp 109ec8: eb 05 jmp 109ecf <== ALWAYS TAKEN 109eca: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax 109ecf: 89 ca mov %ecx,%edx 109ed1: 41 inc %ecx 109ed2: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 109ed7: 77 f1 ja 109eca 109ed9: eb 05 jmp 109ee0 <== ALWAYS TAKEN 109edb: 05 00 ca 9a 3b add $0x3b9aca00,%eax 109ee0: 89 d1 mov %edx,%ecx 109ee2: 4a dec %edx 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) ) { 109ee3: 3d 00 36 65 c4 cmp $0xc4653600,%eax 109ee8: 76 f1 jbe 109edb 109eea: 89 45 f4 mov %eax,-0xc(%ebp) 109eed: 89 4d f0 mov %ecx,-0x10(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 109ef0: 83 ec 0c sub $0xc,%esp 109ef3: 8d 45 f0 lea -0x10(%ebp),%eax 109ef6: 50 push %eax 109ef7: e8 24 15 00 00 call 10b420 <_TOD_Set> _Thread_Enable_dispatch(); 109efc: e8 78 25 00 00 call 10c479 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 109f01: 83 c4 10 add $0x10,%esp 109f04: 85 f6 test %esi,%esi 109f06: 74 0a je 109f12 <== ALWAYS TAKEN *olddelta = *delta; 109f08: 8b 03 mov (%ebx),%eax 109f0a: 8b 53 04 mov 0x4(%ebx),%edx 109f0d: 89 06 mov %eax,(%esi) 109f0f: 89 56 04 mov %edx,0x4(%esi) 109f12: 31 c0 xor %eax,%eax return 0; } 109f14: 8d 65 f8 lea -0x8(%ebp),%esp 109f17: 5b pop %ebx 109f18: 5e pop %esi 109f19: c9 leave 109f1a: c3 ret 00110278 : } unsigned int alarm( unsigned int seconds ) { 110278: 55 push %ebp 110279: 89 e5 mov %esp,%ebp 11027b: 57 push %edi 11027c: 56 push %esi 11027d: 53 push %ebx 11027e: 83 ec 0c sub $0xc,%esp 110281: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 110284: 83 3d 6c 4b 12 00 00 cmpl $0x0,0x124b6c 11028b: 75 2c jne 1102b9 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11028d: c7 05 58 4b 12 00 00 movl $0x0,0x124b58 110294: 00 00 00 the_watchdog->routine = routine; 110297: c7 05 6c 4b 12 00 1c movl $0x11031c,0x124b6c 11029e: 03 11 00 the_watchdog->id = id; 1102a1: c7 05 70 4b 12 00 00 movl $0x0,0x124b70 1102a8: 00 00 00 the_watchdog->user_data = user_data; 1102ab: c7 05 74 4b 12 00 00 movl $0x0,0x124b74 1102b2: 00 00 00 1102b5: 31 db xor %ebx,%ebx 1102b7: eb 3b jmp 1102f4 <== ALWAYS TAKEN _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 1102b9: 83 ec 0c sub $0xc,%esp 1102bc: 68 50 4b 12 00 push $0x124b50 1102c1: e8 02 c8 ff ff call 10cac8 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 1102c6: 83 e8 02 sub $0x2,%eax 1102c9: 83 c4 10 add $0x10,%esp 1102cc: 31 db xor %ebx,%ebx 1102ce: 83 f8 01 cmp $0x1,%eax 1102d1: 77 21 ja 1102f4 * 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 - 1102d3: 8b 1d 5c 4b 12 00 mov 0x124b5c,%ebx ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 1102d9: 8b 3d 68 4b 12 00 mov 0x124b68,%edi 1102df: 2b 3d 64 4b 12 00 sub 0x124b64,%edi 1102e5: e8 0e 08 00 00 call 110af8 1102ea: 89 c1 mov %eax,%ecx * 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 - 1102ec: 89 f8 mov %edi,%eax 1102ee: 31 d2 xor %edx,%edx 1102f0: f7 f1 div %ecx 1102f2: 29 c3 sub %eax,%ebx ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 1102f4: 85 f6 test %esi,%esi 1102f6: 74 1a je 110312 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1102f8: 89 35 5c 4b 12 00 mov %esi,0x124b5c _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1102fe: 50 push %eax 1102ff: 50 push %eax 110300: 68 50 4b 12 00 push $0x124b50 110305: 68 bc 42 12 00 push $0x1242bc 11030a: e8 a1 c6 ff ff call 10c9b0 <_Watchdog_Insert> 11030f: 83 c4 10 add $0x10,%esp _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 110312: 89 d8 mov %ebx,%eax 110314: 8d 65 f4 lea -0xc(%ebp),%esp 110317: 5b pop %ebx 110318: 5e pop %esi 110319: 5f pop %edi 11031a: c9 leave 11031b: c3 ret 0010a218 : int clock_getres( clockid_t clock_id, struct timespec *res ) { 10a218: 55 push %ebp 10a219: 89 e5 mov %esp,%ebp 10a21b: 56 push %esi 10a21c: 53 push %ebx 10a21d: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !res ) 10a220: 85 c9 test %ecx,%ecx 10a222: 74 29 je 10a24d rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 10a224: 8b 45 08 mov 0x8(%ebp),%eax 10a227: 48 dec %eax 10a228: 83 f8 02 cmp $0x2,%eax 10a22b: 77 20 ja 10a24d case CLOCK_REALTIME: case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: if ( res ) { res->tv_sec = rtems_configuration_get_microseconds_per_tick() / 10a22d: 8b 1d 04 22 12 00 mov 0x122204,%ebx 10a233: be 40 42 0f 00 mov $0xf4240,%esi 10a238: 89 d8 mov %ebx,%eax 10a23a: 31 d2 xor %edx,%edx 10a23c: f7 f6 div %esi 10a23e: 89 01 mov %eax,(%ecx) TOD_MICROSECONDS_PER_SECOND; res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); 10a240: 69 db e8 03 00 00 imul $0x3e8,%ebx,%ebx 10a246: 89 59 04 mov %ebx,0x4(%ecx) 10a249: 31 c0 xor %eax,%eax 10a24b: eb 0e jmp 10a25b <== ALWAYS TAKEN } break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10a24d: e8 02 7f 00 00 call 112154 <__errno> 10a252: c7 00 16 00 00 00 movl $0x16,(%eax) 10a258: 83 c8 ff or $0xffffffff,%eax } return 0; } 10a25b: 5b pop %ebx 10a25c: 5e pop %esi 10a25d: c9 leave 10a25e: c3 ret 00109d58 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 109d58: 55 push %ebp 109d59: 89 e5 mov %esp,%ebp 109d5b: 83 ec 08 sub $0x8,%esp 109d5e: 8b 45 08 mov 0x8(%ebp),%eax 109d61: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 109d64: 85 d2 test %edx,%edx 109d66: 74 3c je 109da4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 109d68: 83 f8 01 cmp $0x1,%eax 109d6b: 75 0b jne 109d78 _TOD_Get(tp); 109d6d: 83 ec 0c sub $0xc,%esp 109d70: 52 push %edx 109d71: e8 4e 1b 00 00 call 10b8c4 <_TOD_Get> 109d76: eb 13 jmp 109d8b <== ALWAYS TAKEN return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 109d78: 83 f8 04 cmp $0x4,%eax 109d7b: 74 05 je 109d82 <== ALWAYS TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 109d7d: 83 f8 02 cmp $0x2,%eax 109d80: 75 10 jne 109d92 _TOD_Get_uptime_as_timespec( tp ); 109d82: 83 ec 0c sub $0xc,%esp 109d85: 52 push %edx 109d86: e8 95 1b 00 00 call 10b920 <_TOD_Get_uptime_as_timespec> 109d8b: 31 c0 xor %eax,%eax return 0; 109d8d: 83 c4 10 add $0x10,%esp 109d90: eb 20 jmp 109db2 <== ALWAYS TAKEN } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 109d92: 83 f8 03 cmp $0x3,%eax 109d95: 75 0d jne 109da4 rtems_set_errno_and_return_minus_one( ENOSYS ); 109d97: e8 b4 83 00 00 call 112150 <__errno> 109d9c: c7 00 58 00 00 00 movl $0x58,(%eax) 109da2: eb 0b jmp 109daf <== ALWAYS TAKEN #endif rtems_set_errno_and_return_minus_one( EINVAL ); 109da4: e8 a7 83 00 00 call 112150 <__errno> 109da9: c7 00 16 00 00 00 movl $0x16,(%eax) 109daf: 83 c8 ff or $0xffffffff,%eax return 0; } 109db2: c9 leave 109db3: c3 ret 00126c2c : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 126c2c: 55 push %ebp 126c2d: 89 e5 mov %esp,%ebp 126c2f: 83 ec 08 sub $0x8,%esp 126c32: 8b 45 08 mov 0x8(%ebp),%eax 126c35: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 126c38: 85 d2 test %edx,%edx 126c3a: 74 44 je 126c80 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 126c3c: 83 f8 01 cmp $0x1,%eax 126c3f: 75 28 jne 126c69 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 126c41: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 126c47: 76 37 jbe 126c80 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 126c49: a1 cc 3b 16 00 mov 0x163bcc,%eax 126c4e: 40 inc %eax 126c4f: a3 cc 3b 16 00 mov %eax,0x163bcc rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 126c54: 83 ec 0c sub $0xc,%esp 126c57: 52 push %edx 126c58: e8 f3 18 00 00 call 128550 <_TOD_Set> _Thread_Enable_dispatch(); 126c5d: e8 af a9 fe ff call 111611 <_Thread_Enable_dispatch> 126c62: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 126c64: 83 c4 10 add $0x10,%esp 126c67: eb 25 jmp 126c8e <== ALWAYS TAKEN _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 126c69: 83 f8 02 cmp $0x2,%eax 126c6c: 74 05 je 126c73 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 126c6e: 83 f8 03 cmp $0x3,%eax 126c71: 75 0d jne 126c80 rtems_set_errno_and_return_minus_one( ENOSYS ); 126c73: e8 c4 29 01 00 call 13963c <__errno> 126c78: c7 00 58 00 00 00 movl $0x58,(%eax) 126c7e: eb 0b jmp 126c8b <== ALWAYS TAKEN #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 126c80: e8 b7 29 01 00 call 13963c <__errno> 126c85: c7 00 16 00 00 00 movl $0x16,(%eax) 126c8b: 83 c8 ff or $0xffffffff,%eax return 0; } 126c8e: c9 leave 126c8f: c3 ret 00109b78 : int getitimer( int which, struct itimerval *value ) { 109b78: 55 push %ebp 109b79: 89 e5 mov %esp,%ebp 109b7b: 83 ec 08 sub $0x8,%esp if ( !value ) 109b7e: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 109b82: 75 0d jne 109b91 rtems_set_errno_and_return_minus_one( EFAULT ); 109b84: e8 a3 7f 00 00 call 111b2c <__errno> 109b89: c7 00 0e 00 00 00 movl $0xe,(%eax) 109b8f: eb 1e jmp 109baf <== ALWAYS TAKEN switch ( which ) { 109b91: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 109b95: 77 0d ja 109ba4 case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 109b97: e8 90 7f 00 00 call 111b2c <__errno> 109b9c: c7 00 58 00 00 00 movl $0x58,(%eax) 109ba2: eb 0b jmp 109baf <== ALWAYS TAKEN default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 109ba4: e8 83 7f 00 00 call 111b2c <__errno> 109ba9: c7 00 16 00 00 00 movl $0x16,(%eax) } 109baf: 83 c8 ff or $0xffffffff,%eax 109bb2: c9 leave 109bb3: c3 ret 00111008 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 111008: 55 push %ebp 111009: 89 e5 mov %esp,%ebp 11100b: 57 push %edi 11100c: 56 push %esi 11100d: 53 push %ebx 11100e: 83 ec 3c sub $0x3c,%esp 111011: 8b 5d 0c mov 0xc(%ebp),%ebx 111014: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 111017: e8 48 f2 ff ff call 110264 <== ALWAYS TAKEN 11101c: 39 45 08 cmp %eax,0x8(%ebp) 11101f: 74 0d je 11102e rtems_set_errno_and_return_minus_one( ESRCH ); 111021: e8 9e 04 00 00 call 1114c4 <__errno> 111026: c7 00 03 00 00 00 movl $0x3,(%eax) 11102c: eb 0f jmp 11103d <== ALWAYS TAKEN /* * Validate the signal passed. */ if ( !sig ) 11102e: 85 db test %ebx,%ebx 111030: 75 13 jne 111045 rtems_set_errno_and_return_minus_one( EINVAL ); 111032: e8 8d 04 00 00 call 1114c4 <__errno> 111037: c7 00 16 00 00 00 movl $0x16,(%eax) 11103d: 83 c8 ff or $0xffffffff,%eax 111040: e9 e7 01 00 00 jmp 11122c <== ALWAYS TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 111045: 8d 4b ff lea -0x1(%ebx),%ecx if ( !is_valid_signo(sig) ) 111048: 83 f9 1f cmp $0x1f,%ecx 11104b: 77 e5 ja 111032 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 ) 11104d: 6b d3 0c imul $0xc,%ebx,%edx 111050: 31 c0 xor %eax,%eax 111052: 83 ba 54 47 12 00 01 cmpl $0x1,0x124754(%edx) 111059: 0f 84 cd 01 00 00 je 11122c <== ALWAYS TAKEN /* * 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 ) ) 11105f: 83 fb 04 cmp $0x4,%ebx 111062: 74 0a je 11106e 111064: 83 fb 08 cmp $0x8,%ebx 111067: 74 05 je 11106e 111069: 83 fb 0b cmp $0xb,%ebx 11106c: 75 16 jne 111084 return pthread_kill( pthread_self(), sig ); 11106e: e8 d1 03 00 00 call 111444 111073: 56 push %esi 111074: 56 push %esi 111075: 53 push %ebx 111076: 50 push %eax 111077: e8 1c 03 00 00 call 111398 11107c: 83 c4 10 add $0x10,%esp 11107f: e9 a8 01 00 00 jmp 11122c <== ALWAYS TAKEN static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 111084: be 01 00 00 00 mov $0x1,%esi 111089: d3 e6 shl %cl,%esi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 11108b: 89 5d dc mov %ebx,-0x24(%ebp) siginfo->si_code = SI_USER; 11108e: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 111095: 85 ff test %edi,%edi 111097: 75 09 jne 1110a2 siginfo->si_value.sival_int = 0; 111099: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1110a0: eb 05 jmp 1110a7 <== ALWAYS TAKEN } else { siginfo->si_value = *value; 1110a2: 8b 07 mov (%edi),%eax 1110a4: 89 45 e4 mov %eax,-0x1c(%ebp) 1110a7: a1 ec 41 12 00 mov 0x1241ec,%eax 1110ac: 40 inc %eax 1110ad: a3 ec 41 12 00 mov %eax,0x1241ec /* * 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; 1110b2: 8b 15 a8 42 12 00 mov 0x1242a8,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1110b8: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax 1110be: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 1110c4: f7 d0 not %eax 1110c6: 85 c6 test %eax,%esi 1110c8: 0f 85 e0 00 00 00 jne 1111ae /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 1110ce: a1 d8 48 12 00 mov 0x1248d8,%eax 1110d3: eb 23 jmp 1110f8 <== ALWAYS TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 1110d5: 89 c2 mov %eax,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1110d7: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 1110dd: 85 70 30 test %esi,0x30(%eax) 1110e0: 0f 85 c8 00 00 00 jne 1111ae /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 1110e6: 8b 89 c4 00 00 00 mov 0xc4(%ecx),%ecx 1110ec: f7 d1 not %ecx 1110ee: 85 ce test %ecx,%esi 1110f0: 0f 85 b8 00 00 00 jne 1111ae 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 ) { 1110f6: 8b 00 mov (%eax),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1110f8: 3d dc 48 12 00 cmp $0x1248dc,%eax 1110fd: 75 d6 jne 1110d5 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 1110ff: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 111106: 40 inc %eax 111107: 89 45 d4 mov %eax,-0x2c(%ebp) 11110a: 31 d2 xor %edx,%edx 11110c: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 111113: 8b 4d cc mov -0x34(%ebp),%ecx 111116: 8b 04 8d c0 41 12 00 mov 0x1241c0(,%ecx,4),%eax 11111d: 85 c0 test %eax,%eax 11111f: 74 7c je 11119d continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 111121: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 111124: 0f b7 78 10 movzwl 0x10(%eax),%edi 111128: 89 7d c0 mov %edi,-0x40(%ebp) object_table = the_info->local_table; 11112b: 8b 40 1c mov 0x1c(%eax),%eax 11112e: 89 45 c4 mov %eax,-0x3c(%ebp) 111131: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 111138: eb 5b jmp 111195 <== ALWAYS TAKEN the_thread = (Thread_Control *) object_table[ index ]; 11113a: 8b 4d d0 mov -0x30(%ebp),%ecx 11113d: 8b 7d c4 mov -0x3c(%ebp),%edi 111140: 8b 04 8f mov (%edi,%ecx,4),%eax if ( !the_thread ) 111143: 85 c0 test %eax,%eax 111145: 74 41 je 111188 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 111147: 8b 48 14 mov 0x14(%eax),%ecx 11114a: 3b 4d d4 cmp -0x2c(%ebp),%ecx 11114d: 77 39 ja 111188 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11114f: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi 111155: 8b bf c4 00 00 00 mov 0xc4(%edi),%edi 11115b: f7 d7 not %edi 11115d: 85 fe test %edi,%esi 11115f: 74 27 je 111188 * * 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 ) { 111161: 3b 4d d4 cmp -0x2c(%ebp),%ecx 111164: 72 27 jb 11118d * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 111166: 8b 7a 10 mov 0x10(%edx),%edi 111169: 89 7d c8 mov %edi,-0x38(%ebp) 11116c: 85 ff test %edi,%edi 11116e: 74 18 je 111188 <== ALWAYS TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 111170: 8b 78 10 mov 0x10(%eax),%edi 111173: 85 ff test %edi,%edi 111175: 74 16 je 11118d continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 111177: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp) 11117e: 75 08 jne 111188 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 111180: 81 e7 00 00 00 10 and $0x10000000,%edi 111186: 75 05 jne 11118d 111188: 8b 4d d4 mov -0x2c(%ebp),%ecx 11118b: eb 02 jmp 11118f <== ALWAYS TAKEN 11118d: 89 c2 mov %eax,%edx #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11118f: ff 45 d0 incl -0x30(%ebp) 111192: 89 4d d4 mov %ecx,-0x2c(%ebp) 111195: 8b 45 c0 mov -0x40(%ebp),%eax 111198: 39 45 d0 cmp %eax,-0x30(%ebp) 11119b: 76 9d jbe 11113a * + 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++) { 11119d: ff 45 cc incl -0x34(%ebp) 1111a0: 83 7d cc 05 cmpl $0x5,-0x34(%ebp) 1111a4: 0f 85 69 ff ff ff jne 111113 } } } } if ( interested ) { 1111aa: 85 d2 test %edx,%edx 1111ac: 74 17 je 1111c5 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 1111ae: c6 42 74 01 movb $0x1,0x74(%edx) /* * 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 ) ) { 1111b2: 51 push %ecx 1111b3: 8d 45 dc lea -0x24(%ebp),%eax 1111b6: 50 push %eax 1111b7: 53 push %ebx 1111b8: 52 push %edx 1111b9: e8 e2 00 00 00 call 1112a0 <_POSIX_signals_Unblock_thread> <== ALWAYS TAKEN 1111be: 83 c4 10 add $0x10,%esp 1111c1: 84 c0 test %al,%al 1111c3: 75 60 jne 111225 /* * 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 ); 1111c5: 83 ec 0c sub $0xc,%esp 1111c8: 56 push %esi 1111c9: e8 ae 00 00 00 call 11127c <_POSIX_signals_Set_process_signals> <== ALWAYS TAKEN if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 1111ce: 6b db 0c imul $0xc,%ebx,%ebx 1111d1: 83 c4 10 add $0x10,%esp 1111d4: 83 bb 4c 47 12 00 02 cmpl $0x2,0x12474c(%ebx) 1111db: 75 48 jne 111225 psiginfo = (POSIX_signals_Siginfo_node *) 1111dd: 83 ec 0c sub $0xc,%esp 1111e0: 68 cc 48 12 00 push $0x1248cc 1111e5: e8 ca 95 ff ff call 10a7b4 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 1111ea: 83 c4 10 add $0x10,%esp 1111ed: 85 c0 test %eax,%eax 1111ef: 75 15 jne 111206 _Thread_Enable_dispatch(); 1111f1: e8 fb a9 ff ff call 10bbf1 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 1111f6: e8 c9 02 00 00 call 1114c4 <__errno> 1111fb: c7 00 0b 00 00 00 movl $0xb,(%eax) 111201: e9 37 fe ff ff jmp 11103d } psiginfo->Info = *siginfo; 111206: 8d 78 08 lea 0x8(%eax),%edi 111209: 8d 75 dc lea -0x24(%ebp),%esi 11120c: b9 03 00 00 00 mov $0x3,%ecx 111211: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 111213: 52 push %edx 111214: 52 push %edx 111215: 50 push %eax 111216: 81 c3 1c 49 12 00 add $0x12491c,%ebx 11121c: 53 push %ebx 11121d: e8 6e 95 ff ff call 10a790 <_Chain_Append> 111222: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 111225: e8 c7 a9 ff ff call 10bbf1 <_Thread_Enable_dispatch> 11122a: 31 c0 xor %eax,%eax return 0; } 11122c: 8d 65 f4 lea -0xc(%ebp),%esp 11122f: 5b pop %ebx 111230: 5e pop %esi 111231: 5f pop %edi 111232: c9 leave 111233: c3 ret 0010db78 : */ int mq_close( mqd_t mqdes ) { 10db78: 55 push %ebp 10db79: 89 e5 mov %esp,%ebp 10db7b: 53 push %ebx 10db7c: 83 ec 18 sub $0x18,%esp 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( 10db7f: 8d 45 f4 lea -0xc(%ebp),%eax 10db82: 50 push %eax 10db83: ff 75 08 pushl 0x8(%ebp) 10db86: 68 20 d3 12 00 push $0x12d320 10db8b: e8 d4 2d 00 00 call 110964 <_Objects_Get> 10db90: 89 c3 mov %eax,%ebx POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); if ( location == OBJECTS_LOCAL ) { 10db92: 83 c4 10 add $0x10,%esp 10db95: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10db99: 75 35 jne 10dbd0 * First update the actual message queue to reflect this descriptor * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; 10db9b: 8b 40 10 mov 0x10(%eax),%eax the_mq->open_count -= 1; 10db9e: ff 48 18 decl 0x18(%eax) _POSIX_Message_queue_Delete( the_mq ); 10dba1: 83 ec 0c sub $0xc,%esp 10dba4: 50 push %eax 10dba5: e8 3a 00 00 00 call 10dbe4 <_POSIX_Message_queue_Delete> <== ALWAYS TAKEN /* * Now close this file descriptor. */ _Objects_Close( 10dbaa: 59 pop %ecx 10dbab: 58 pop %eax 10dbac: 53 push %ebx 10dbad: 68 20 d3 12 00 push $0x12d320 10dbb2: e8 05 2a 00 00 call 1105bc <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10dbb7: 58 pop %eax 10dbb8: 5a pop %edx 10dbb9: 53 push %ebx 10dbba: 68 20 d3 12 00 push $0x12d320 10dbbf: e8 78 2c 00 00 call 11083c <_Objects_Free> &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10dbc4: e8 d4 35 00 00 call 11119d <_Thread_Enable_dispatch> 10dbc9: 31 c0 xor %eax,%eax return 0; 10dbcb: 83 c4 10 add $0x10,%esp 10dbce: eb 0e jmp 10dbde <== ALWAYS TAKEN /* * OBJECTS_REMOTE: * OBJECTS_ERROR: */ rtems_set_errno_and_return_minus_one( EBADF ); 10dbd0: e8 83 8f 00 00 call 116b58 <__errno> 10dbd5: c7 00 09 00 00 00 movl $0x9,(%eax) 10dbdb: 83 c8 ff or $0xffffffff,%eax } 10dbde: 8b 5d fc mov -0x4(%ebp),%ebx 10dbe1: c9 leave 10dbe2: c3 ret 0010dc2c : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 10dc2c: 55 push %ebp 10dc2d: 89 e5 mov %esp,%ebp 10dc2f: 53 push %ebx 10dc30: 83 ec 14 sub $0x14,%esp 10dc33: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 10dc36: 85 db test %ebx,%ebx 10dc38: 75 0d jne 10dc47 rtems_set_errno_and_return_minus_one( EINVAL ); 10dc3a: e8 19 8f 00 00 call 116b58 <__errno> 10dc3f: c7 00 16 00 00 00 movl $0x16,(%eax) 10dc45: eb 49 jmp 10dc90 <== ALWAYS TAKEN 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( 10dc47: 50 push %eax 10dc48: 8d 45 f4 lea -0xc(%ebp),%eax 10dc4b: 50 push %eax 10dc4c: ff 75 08 pushl 0x8(%ebp) 10dc4f: 68 20 d3 12 00 push $0x12d320 10dc54: e8 0b 2d 00 00 call 110964 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10dc59: 83 c4 10 add $0x10,%esp 10dc5c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10dc60: 75 23 jne 10dc85 case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10dc62: 8b 50 10 mov 0x10(%eax),%edx * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 10dc65: 8b 40 14 mov 0x14(%eax),%eax 10dc68: 89 03 mov %eax,(%ebx) mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 10dc6a: 8b 42 68 mov 0x68(%edx),%eax 10dc6d: 89 43 08 mov %eax,0x8(%ebx) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 10dc70: 8b 42 60 mov 0x60(%edx),%eax 10dc73: 89 43 04 mov %eax,0x4(%ebx) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 10dc76: 8b 42 64 mov 0x64(%edx),%eax 10dc79: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 10dc7c: e8 1c 35 00 00 call 11119d <_Thread_Enable_dispatch> 10dc81: 31 c0 xor %eax,%eax return 0; 10dc83: eb 0e jmp 10dc93 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10dc85: e8 ce 8e 00 00 call 116b58 <__errno> 10dc8a: c7 00 09 00 00 00 movl $0x9,(%eax) 10dc90: 83 c8 ff or $0xffffffff,%eax } 10dc93: 8b 5d fc mov -0x4(%ebp),%ebx 10dc96: c9 leave 10dc97: c3 ret 0010dc98 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10dc98: 55 push %ebp 10dc99: 89 e5 mov %esp,%ebp 10dc9b: 57 push %edi 10dc9c: 56 push %esi 10dc9d: 83 ec 14 sub $0x14,%esp 10dca0: 8b 75 0c mov 0xc(%ebp),%esi 10dca3: 8d 45 f4 lea -0xc(%ebp),%eax 10dca6: 50 push %eax 10dca7: ff 75 08 pushl 0x8(%ebp) 10dcaa: 68 20 d3 12 00 push $0x12d320 10dcaf: e8 b0 2c 00 00 call 110964 <_Objects_Get> POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10dcb4: 83 c4 10 add $0x10,%esp 10dcb7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10dcbb: 75 5f jne 10dd1c case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10dcbd: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10dcc0: 85 f6 test %esi,%esi 10dcc2: 74 3e je 10dd02 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10dcc4: 83 78 7c 00 cmpl $0x0,0x7c(%eax) 10dcc8: 74 12 je 10dcdc _Thread_Enable_dispatch(); 10dcca: e8 ce 34 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10dccf: e8 84 8e 00 00 call 116b58 <__errno> 10dcd4: c7 00 10 00 00 00 movl $0x10,(%eax) 10dcda: eb 4b jmp 10dd27 <== ALWAYS TAKEN CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; the_message_queue->notify_argument = the_argument; 10dcdc: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10dce3: 00 00 00 } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 10dce6: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10dcec: b9 05 00 00 00 mov $0x5,%ecx 10dcf1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10dcf3: c7 40 7c 31 dd 10 00 movl $0x10dd31,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10dcfa: 89 80 80 00 00 00 mov %eax,0x80(%eax) 10dd00: eb 11 jmp 10dd13 <== ALWAYS TAKEN CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10dd02: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10dd09: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10dd10: 00 00 00 _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10dd13: e8 85 34 00 00 call 11119d <_Thread_Enable_dispatch> 10dd18: 31 c0 xor %eax,%eax return 0; 10dd1a: eb 0e jmp 10dd2a <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10dd1c: e8 37 8e 00 00 call 116b58 <__errno> 10dd21: c7 00 09 00 00 00 movl $0x9,(%eax) 10dd27: 83 c8 ff or $0xffffffff,%eax } 10dd2a: 8d 65 f8 lea -0x8(%ebp),%esp 10dd2d: 5e pop %esi 10dd2e: 5f pop %edi 10dd2f: c9 leave 10dd30: c3 ret 0010dd68 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10dd68: 55 push %ebp 10dd69: 89 e5 mov %esp,%ebp 10dd6b: 57 push %edi 10dd6c: 56 push %esi 10dd6d: 53 push %ebx 10dd6e: 83 ec 2c sub $0x2c,%esp 10dd71: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dd74: a1 2c ce 12 00 mov 0x12ce2c,%eax 10dd79: 40 inc %eax 10dd7a: a3 2c ce 12 00 mov %eax,0x12ce2c POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10dd7f: 89 f0 mov %esi,%eax 10dd81: 25 00 02 00 00 and $0x200,%eax 10dd86: 89 45 d0 mov %eax,-0x30(%ebp) 10dd89: 75 09 jne 10dd94 10dd8b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 10dd92: eb 06 jmp 10dd9a <== ALWAYS TAKEN va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 10dd94: 8b 45 14 mov 0x14(%ebp),%eax 10dd97: 89 45 d4 mov %eax,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 10dd9a: 83 ec 0c sub $0xc,%esp 10dd9d: 68 20 d3 12 00 push $0x12d320 10dda2: e8 a9 27 00 00 call 110550 <_Objects_Allocate> 10dda7: 89 c3 mov %eax,%ebx va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 10dda9: 83 c4 10 add $0x10,%esp 10ddac: 85 c0 test %eax,%eax 10ddae: 75 18 jne 10ddc8 _Thread_Enable_dispatch(); 10ddb0: e8 e8 33 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10ddb5: e8 9e 8d 00 00 call 116b58 <__errno> 10ddba: c7 00 17 00 00 00 movl $0x17,(%eax) 10ddc0: 83 c8 ff or $0xffffffff,%eax 10ddc3: e9 03 01 00 00 jmp 10decb <== ALWAYS TAKEN } the_mq_fd->oflag = oflag; 10ddc8: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10ddcb: 57 push %edi 10ddcc: 57 push %edi 10ddcd: 8d 45 e4 lea -0x1c(%ebp),%eax 10ddd0: 50 push %eax 10ddd1: ff 75 08 pushl 0x8(%ebp) 10ddd4: e8 f3 5a 00 00 call 1138cc <_POSIX_Message_queue_Name_to_id> 10ddd9: 89 c7 mov %eax,%edi * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 10dddb: 83 c4 10 add $0x10,%esp 10ddde: 85 c0 test %eax,%eax 10dde0: 74 2a je 10de0c /* * 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) ) ) { 10dde2: 83 f8 02 cmp $0x2,%eax 10dde5: 75 0a jne 10ddf1 10dde7: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10ddeb: 0f 85 8e 00 00 00 jne 10de7f RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10ddf1: 56 push %esi 10ddf2: 56 push %esi 10ddf3: 53 push %ebx 10ddf4: 68 20 d3 12 00 push $0x12d320 10ddf9: e8 3e 2a 00 00 call 11083c <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10ddfe: e8 9a 33 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10de03: e8 50 8d 00 00 call 116b58 <__errno> 10de08: 89 38 mov %edi,(%eax) 10de0a: eb 2b jmp 10de37 <== ALWAYS TAKEN } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10de0c: 81 e6 00 0a 00 00 and $0xa00,%esi 10de12: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10de18: 75 28 jne 10de42 10de1a: 51 push %ecx 10de1b: 51 push %ecx 10de1c: 53 push %ebx 10de1d: 68 20 d3 12 00 push $0x12d320 10de22: e8 15 2a 00 00 call 11083c <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10de27: e8 71 33 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10de2c: e8 27 8d 00 00 call 116b58 <__errno> 10de31: c7 00 11 00 00 00 movl $0x11,(%eax) 10de37: 83 c8 ff or $0xffffffff,%eax 10de3a: 83 c4 10 add $0x10,%esp 10de3d: e9 89 00 00 00 jmp 10decb <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 10de42: 52 push %edx 10de43: 8d 45 dc lea -0x24(%ebp),%eax 10de46: 50 push %eax 10de47: ff 75 e4 pushl -0x1c(%ebp) 10de4a: 68 94 d1 12 00 push $0x12d194 10de4f: e8 10 2b 00 00 call 110964 <_Objects_Get> /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 10de54: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10de57: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10de5a: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10de5d: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10de61: a1 3c d3 12 00 mov 0x12d33c,%eax 10de66: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 10de69: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10de70: e8 28 33 00 00 call 11119d <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10de75: e8 23 33 00 00 call 11119d <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10de7a: 8b 43 08 mov 0x8(%ebx),%eax 10de7d: eb bb jmp 10de3a <== ALWAYS TAKEN /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 10de7f: 8d 45 e0 lea -0x20(%ebp),%eax 10de82: 50 push %eax 10de83: ff 75 d4 pushl -0x2c(%ebp) 10de86: 6a 01 push $0x1 10de88: ff 75 08 pushl 0x8(%ebp) 10de8b: e8 d4 58 00 00 call 113764 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10de90: 83 c4 10 add $0x10,%esp 10de93: 40 inc %eax 10de94: 75 14 jne 10deaa RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10de96: 50 push %eax 10de97: 50 push %eax 10de98: 53 push %ebx 10de99: 68 20 d3 12 00 push $0x12d320 10de9e: e8 99 29 00 00 call 11083c <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10dea3: e8 f5 32 00 00 call 11119d <_Thread_Enable_dispatch> 10dea8: eb 8d jmp 10de37 <== ALWAYS TAKEN return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10deaa: 8b 45 e0 mov -0x20(%ebp),%eax 10dead: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10deb0: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10deb4: a1 3c d3 12 00 mov 0x12d33c,%eax 10deb9: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 10debc: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10dec3: e8 d5 32 00 00 call 11119d <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10dec8: 8b 43 08 mov 0x8(%ebx),%eax } 10decb: 8d 65 f4 lea -0xc(%ebp),%esp 10dece: 5b pop %ebx 10decf: 5e pop %esi 10ded0: 5f pop %edi 10ded1: c9 leave 10ded2: c3 ret 0010ded4 : mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio ) { 10ded4: 55 push %ebp 10ded5: 89 e5 mov %esp,%ebp 10ded7: 83 ec 10 sub $0x10,%esp return _POSIX_Message_queue_Receive_support( 10deda: 6a 00 push $0x0 10dedc: 6a 01 push $0x1 10dede: ff 75 14 pushl 0x14(%ebp) 10dee1: ff 75 10 pushl 0x10(%ebp) 10dee4: ff 75 0c pushl 0xc(%ebp) 10dee7: ff 75 08 pushl 0x8(%ebp) 10deea: e8 05 00 00 00 call 10def4 <_POSIX_Message_queue_Receive_support> <== ALWAYS TAKEN msg_len, msg_prio, true, THREAD_QUEUE_WAIT_FOREVER ); } 10deef: c9 leave 10def0: c3 ret 0010dff0 : mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio ) { 10dff0: 55 push %ebp 10dff1: 89 e5 mov %esp,%ebp 10dff3: 83 ec 10 sub $0x10,%esp return _POSIX_Message_queue_Send_support( 10dff6: 6a 00 push $0x0 10dff8: 6a 01 push $0x1 10dffa: ff 75 14 pushl 0x14(%ebp) 10dffd: ff 75 10 pushl 0x10(%ebp) 10e000: ff 75 0c pushl 0xc(%ebp) 10e003: ff 75 08 pushl 0x8(%ebp) 10e006: e8 05 00 00 00 call 10e010 <_POSIX_Message_queue_Send_support> <== ALWAYS TAKEN msg_len, msg_prio, true, THREAD_QUEUE_WAIT_FOREVER ); } 10e00b: c9 leave 10e00c: c3 ret 0010e0e8 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10e0e8: 55 push %ebp 10e0e9: 89 e5 mov %esp,%ebp 10e0eb: 56 push %esi 10e0ec: 53 push %ebx 10e0ed: 83 ec 10 sub $0x10,%esp 10e0f0: 8b 75 0c mov 0xc(%ebp),%esi 10e0f3: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 10e0f6: 85 f6 test %esi,%esi 10e0f8: 75 0d jne 10e107 rtems_set_errno_and_return_minus_one( EINVAL ); 10e0fa: e8 59 8a 00 00 call 116b58 <__errno> 10e0ff: c7 00 16 00 00 00 movl $0x16,(%eax) 10e105: eb 52 jmp 10e159 <== ALWAYS TAKEN 10e107: 50 push %eax 10e108: 8d 45 f4 lea -0xc(%ebp),%eax 10e10b: 50 push %eax 10e10c: ff 75 08 pushl 0x8(%ebp) 10e10f: 68 20 d3 12 00 push $0x12d320 10e114: e8 4b 28 00 00 call 110964 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10e119: 83 c4 10 add $0x10,%esp 10e11c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e120: 75 2c jne 10e14e case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10e122: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10e125: 85 db test %ebx,%ebx 10e127: 74 17 je 10e140 omqstat->mq_flags = the_mq_fd->oflag; 10e129: 8b 48 14 mov 0x14(%eax),%ecx 10e12c: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10e12e: 8b 4a 68 mov 0x68(%edx),%ecx 10e131: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10e134: 8b 4a 60 mov 0x60(%edx),%ecx 10e137: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10e13a: 8b 52 64 mov 0x64(%edx),%edx 10e13d: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10e140: 8b 16 mov (%esi),%edx 10e142: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10e145: e8 53 30 00 00 call 11119d <_Thread_Enable_dispatch> 10e14a: 31 c0 xor %eax,%eax return 0; 10e14c: eb 0e jmp 10e15c <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e14e: e8 05 8a 00 00 call 116b58 <__errno> 10e153: c7 00 09 00 00 00 movl $0x9,(%eax) 10e159: 83 c8 ff or $0xffffffff,%eax } 10e15c: 8d 65 f8 lea -0x8(%ebp),%esp 10e15f: 5b pop %ebx 10e160: 5e pop %esi 10e161: c9 leave 10e162: c3 ret 0010e164 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 10e164: 55 push %ebp 10e165: 89 e5 mov %esp,%ebp 10e167: 83 ec 20 sub $0x20,%esp * * 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 ); 10e16a: 8d 45 f4 lea -0xc(%ebp),%eax 10e16d: 50 push %eax 10e16e: ff 75 18 pushl 0x18(%ebp) 10e171: e8 d2 00 00 00 call 10e248 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; return _POSIX_Message_queue_Receive_support( 10e176: 5a pop %edx 10e177: 59 pop %ecx 10e178: ff 75 f4 pushl -0xc(%ebp) 10e17b: 83 f8 03 cmp $0x3,%eax 10e17e: 0f 94 c0 sete %al 10e181: 0f b6 c0 movzbl %al,%eax 10e184: 50 push %eax 10e185: ff 75 14 pushl 0x14(%ebp) 10e188: ff 75 10 pushl 0x10(%ebp) 10e18b: ff 75 0c pushl 0xc(%ebp) 10e18e: ff 75 08 pushl 0x8(%ebp) 10e191: e8 5e fd ff ff call 10def4 <_POSIX_Message_queue_Receive_support> msg_len, msg_prio, do_wait, ticks ); } 10e196: c9 leave 10e197: c3 ret 0010e198 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 10e198: 55 push %ebp 10e199: 89 e5 mov %esp,%ebp 10e19b: 83 ec 20 sub $0x20,%esp * * 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 ); 10e19e: 8d 45 f4 lea -0xc(%ebp),%eax 10e1a1: 50 push %eax 10e1a2: ff 75 18 pushl 0x18(%ebp) 10e1a5: e8 9e 00 00 00 call 10e248 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; return _POSIX_Message_queue_Send_support( 10e1aa: 5a pop %edx 10e1ab: 59 pop %ecx 10e1ac: ff 75 f4 pushl -0xc(%ebp) 10e1af: 83 f8 03 cmp $0x3,%eax 10e1b2: 0f 94 c0 sete %al 10e1b5: 0f b6 c0 movzbl %al,%eax 10e1b8: 50 push %eax 10e1b9: ff 75 14 pushl 0x14(%ebp) 10e1bc: ff 75 10 pushl 0x10(%ebp) 10e1bf: ff 75 0c pushl 0xc(%ebp) 10e1c2: ff 75 08 pushl 0x8(%ebp) 10e1c5: e8 46 fe ff ff call 10e010 <_POSIX_Message_queue_Send_support> <== ALWAYS TAKEN msg_len, msg_prio, do_wait, ticks ); } 10e1ca: c9 leave 10e1cb: c3 ret 0010e1dc : */ int mq_unlink( const char *name ) { 10e1dc: 55 push %ebp 10e1dd: 89 e5 mov %esp,%ebp 10e1df: 53 push %ebx 10e1e0: 83 ec 1c sub $0x1c,%esp 10e1e3: a1 2c ce 12 00 mov 0x12ce2c,%eax 10e1e8: 40 inc %eax 10e1e9: a3 2c ce 12 00 mov %eax,0x12ce2c 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 ); 10e1ee: 8d 45 f4 lea -0xc(%ebp),%eax 10e1f1: 50 push %eax 10e1f2: ff 75 08 pushl 0x8(%ebp) 10e1f5: e8 d2 56 00 00 call 1138cc <_POSIX_Message_queue_Name_to_id> 10e1fa: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10e1fc: 83 c4 10 add $0x10,%esp 10e1ff: 85 c0 test %eax,%eax 10e201: 74 11 je 10e214 _Thread_Enable_dispatch(); 10e203: e8 95 2f 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10e208: e8 4b 89 00 00 call 116b58 <__errno> 10e20d: 89 18 mov %ebx,(%eax) 10e20f: 83 c8 ff or $0xffffffff,%eax 10e212: eb 2f jmp 10e243 <== ALWAYS TAKEN } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 10e214: 0f b7 55 f4 movzwl -0xc(%ebp),%edx 10e218: a1 b0 d1 12 00 mov 0x12d1b0,%eax 10e21d: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = false; 10e220: c6 43 15 00 movb $0x0,0x15(%ebx) RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove ( POSIX_Message_queue_Control *the_mq ) { _Objects_Namespace_remove( 10e224: 50 push %eax 10e225: 50 push %eax 10e226: 53 push %ebx 10e227: 68 94 d1 12 00 push $0x12d194 10e22c: e8 77 28 00 00 call 110aa8 <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 10e231: 89 1c 24 mov %ebx,(%esp) 10e234: e8 ab f9 ff ff call 10dbe4 <_POSIX_Message_queue_Delete> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10e239: e8 5f 2f 00 00 call 11119d <_Thread_Enable_dispatch> 10e23e: 31 c0 xor %eax,%eax return 0; 10e240: 83 c4 10 add $0x10,%esp } 10e243: 8b 5d fc mov -0x4(%ebp),%ebx 10e246: c9 leave 10e247: c3 ret 00124e60 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 124e60: 55 push %ebp 124e61: 89 e5 mov %esp,%ebp 124e63: 56 push %esi 124e64: 53 push %ebx 124e65: 8b 75 08 mov 0x8(%ebp),%esi 124e68: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 124e6b: 83 ec 0c sub $0xc,%esp 124e6e: 56 push %esi 124e6f: e8 f4 00 00 00 call 124f68 <_Timespec_Is_valid> <== ALWAYS TAKEN 124e74: 83 c4 10 add $0x10,%esp 124e77: 84 c0 test %al,%al 124e79: 74 0b je 124e86 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 124e7b: 83 3e 00 cmpl $0x0,(%esi) 124e7e: 78 06 js 124e86 <== ALWAYS TAKEN 124e80: 83 7e 04 00 cmpl $0x0,0x4(%esi) 124e84: 79 10 jns 124e96 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 124e86: e8 01 2f ff ff call 117d8c <__errno> 124e8b: c7 00 16 00 00 00 movl $0x16,(%eax) 124e91: e9 c4 00 00 00 jmp 124f5a <== ALWAYS TAKEN ticks = _Timespec_To_ticks( rqtp ); 124e96: 83 ec 0c sub $0xc,%esp 124e99: 56 push %esi 124e9a: e8 d5 03 ff ff call 115274 <_Timespec_To_ticks> 124e9f: 89 c6 mov %eax,%esi * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 124ea1: 83 c4 10 add $0x10,%esp 124ea4: 85 c0 test %eax,%eax 124ea6: 75 2f jne 124ed7 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 124ea8: a1 d0 fa 12 00 mov 0x12fad0,%eax 124ead: 40 inc %eax 124eae: a3 d0 fa 12 00 mov %eax,0x12fad0 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 124eb3: e8 94 ae fe ff call 10fd4c <_Thread_Yield_processor> _Thread_Enable_dispatch(); 124eb8: e8 98 a3 fe ff call 10f255 <_Thread_Enable_dispatch> if ( rmtp ) { 124ebd: 85 db test %ebx,%ebx 124ebf: 0f 84 9a 00 00 00 je 124f5f rmtp->tv_sec = 0; 124ec5: c7 03 00 00 00 00 movl $0x0,(%ebx) rmtp->tv_nsec = 0; 124ecb: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 124ed2: e9 88 00 00 00 jmp 124f5f <== ALWAYS TAKEN 124ed7: a1 d0 fa 12 00 mov 0x12fad0,%eax 124edc: 40 inc %eax 124edd: a3 d0 fa 12 00 mov %eax,0x12fad0 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 124ee2: 52 push %edx 124ee3: 52 push %edx 124ee4: 68 08 00 00 10 push $0x10000008 124ee9: ff 35 8c fb 12 00 pushl 0x12fb8c 124eef: e8 78 ab fe ff call 10fa6c <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 124ef4: 8b 15 8c fb 12 00 mov 0x12fb8c,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 124efa: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 124efd: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 124f04: c7 42 64 d8 f0 10 00 movl $0x10f0d8,0x64(%edx) the_watchdog->id = id; 124f0b: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 124f0e: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 124f15: 89 72 54 mov %esi,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 124f18: 59 pop %ecx 124f19: 58 pop %eax 124f1a: 83 c2 48 add $0x48,%edx 124f1d: 52 push %edx 124f1e: 68 ac fb 12 00 push $0x12fbac 124f23: e8 84 b1 fe ff call 1100ac <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 124f28: e8 28 a3 fe ff call 10f255 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 124f2d: 83 c4 10 add $0x10,%esp 124f30: 85 db test %ebx,%ebx 124f32: 74 2b je 124f5f ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 124f34: a1 8c fb 12 00 mov 0x12fb8c,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 124f39: 03 70 5c add 0x5c(%eax),%esi 124f3c: 2b 70 60 sub 0x60(%eax),%esi _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 124f3f: 50 push %eax 124f40: 50 push %eax 124f41: 53 push %ebx 124f42: 56 push %esi 124f43: e8 04 03 ff ff call 11524c <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 124f48: 83 c4 10 add $0x10,%esp 124f4b: 85 f6 test %esi,%esi 124f4d: 74 10 je 124f5f rtems_set_errno_and_return_minus_one( EINTR ); 124f4f: e8 38 2e ff ff call 117d8c <__errno> 124f54: c7 00 04 00 00 00 movl $0x4,(%eax) 124f5a: 83 c8 ff or $0xffffffff,%eax 124f5d: eb 02 jmp 124f61 <== ALWAYS TAKEN 124f5f: 31 c0 xor %eax,%eax #endif } return 0; } 124f61: 8d 65 f8 lea -0x8(%ebp),%esp 124f64: 5b pop %ebx 124f65: 5e pop %esi 124f66: c9 leave 124f67: c3 ret 0010e170 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10e170: 55 push %ebp 10e171: 89 e5 mov %esp,%ebp 10e173: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10e176: 85 c0 test %eax,%eax 10e178: 74 0f je 10e189 10e17a: 83 38 00 cmpl $0x0,(%eax) 10e17d: 74 0a je 10e189 return EINVAL; attr->is_initialized = false; 10e17f: c7 00 00 00 00 00 movl $0x0,(%eax) 10e185: 31 c0 xor %eax,%eax return 0; 10e187: eb 05 jmp 10e18e <== ALWAYS TAKEN 10e189: b8 16 00 00 00 mov $0x16,%eax } 10e18e: c9 leave 10e18f: c3 ret 0010e6bc : int pthread_attr_getcputime( pthread_attr_t *attr, int *clock_allowed ) { 10e6bc: 55 push %ebp 10e6bd: 89 e5 mov %esp,%ebp 10e6bf: 8b 45 08 mov 0x8(%ebp),%eax 10e6c2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !clock_allowed ) 10e6c5: 85 c0 test %eax,%eax 10e6c7: 74 12 je 10e6db 10e6c9: 85 d2 test %edx,%edx 10e6cb: 74 0e je 10e6db 10e6cd: 83 38 00 cmpl $0x0,(%eax) 10e6d0: 74 09 je 10e6db return EINVAL; *clock_allowed = attr->cputime_clock_allowed; 10e6d2: 8b 40 30 mov 0x30(%eax),%eax 10e6d5: 89 02 mov %eax,(%edx) 10e6d7: 31 c0 xor %eax,%eax return 0; 10e6d9: eb 05 jmp 10e6e0 <== ALWAYS TAKEN 10e6db: b8 16 00 00 00 mov $0x16,%eax } 10e6e0: c9 leave 10e6e1: c3 ret 0010e190 : int pthread_attr_getdetachstate( const pthread_attr_t *attr, int *detachstate ) { 10e190: 55 push %ebp 10e191: 89 e5 mov %esp,%ebp 10e193: 8b 45 08 mov 0x8(%ebp),%eax 10e196: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !detachstate ) 10e199: 85 c0 test %eax,%eax 10e19b: 74 12 je 10e1af 10e19d: 85 d2 test %edx,%edx 10e19f: 74 0e je 10e1af 10e1a1: 83 38 00 cmpl $0x0,(%eax) 10e1a4: 74 09 je 10e1af return EINVAL; *detachstate = attr->detachstate; 10e1a6: 8b 40 34 mov 0x34(%eax),%eax 10e1a9: 89 02 mov %eax,(%edx) 10e1ab: 31 c0 xor %eax,%eax return 0; 10e1ad: eb 05 jmp 10e1b4 <== ALWAYS TAKEN 10e1af: b8 16 00 00 00 mov $0x16,%eax } 10e1b4: c9 leave 10e1b5: c3 ret 0010e1b8 : int pthread_attr_getinheritsched( const pthread_attr_t *attr, int *inheritsched ) { 10e1b8: 55 push %ebp 10e1b9: 89 e5 mov %esp,%ebp 10e1bb: 8b 45 08 mov 0x8(%ebp),%eax 10e1be: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !inheritsched ) 10e1c1: 85 c0 test %eax,%eax 10e1c3: 74 12 je 10e1d7 10e1c5: 85 d2 test %edx,%edx 10e1c7: 74 0e je 10e1d7 10e1c9: 83 38 00 cmpl $0x0,(%eax) 10e1cc: 74 09 je 10e1d7 return EINVAL; *inheritsched = attr->inheritsched; 10e1ce: 8b 40 10 mov 0x10(%eax),%eax 10e1d1: 89 02 mov %eax,(%edx) 10e1d3: 31 c0 xor %eax,%eax return 0; 10e1d5: eb 05 jmp 10e1dc <== ALWAYS TAKEN 10e1d7: b8 16 00 00 00 mov $0x16,%eax } 10e1dc: c9 leave 10e1dd: c3 ret 0010e1e0 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 10e1e0: 55 push %ebp 10e1e1: 89 e5 mov %esp,%ebp 10e1e3: 57 push %edi 10e1e4: 56 push %esi 10e1e5: 8b 75 08 mov 0x8(%ebp),%esi 10e1e8: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 10e1eb: 85 f6 test %esi,%esi 10e1ed: 74 19 je 10e208 10e1ef: 85 c0 test %eax,%eax 10e1f1: 74 15 je 10e208 10e1f3: 83 3e 00 cmpl $0x0,(%esi) 10e1f6: 74 10 je 10e208 return EINVAL; *param = attr->schedparam; 10e1f8: 83 c6 18 add $0x18,%esi 10e1fb: b9 06 00 00 00 mov $0x6,%ecx 10e200: 89 c7 mov %eax,%edi 10e202: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10e204: 31 c0 xor %eax,%eax return 0; 10e206: eb 05 jmp 10e20d <== ALWAYS TAKEN 10e208: b8 16 00 00 00 mov $0x16,%eax } 10e20d: 5e pop %esi 10e20e: 5f pop %edi 10e20f: c9 leave 10e210: c3 ret 0010e214 : int pthread_attr_getschedpolicy( const pthread_attr_t *attr, int *policy ) { 10e214: 55 push %ebp 10e215: 89 e5 mov %esp,%ebp 10e217: 8b 45 08 mov 0x8(%ebp),%eax 10e21a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !policy ) 10e21d: 85 c0 test %eax,%eax 10e21f: 74 12 je 10e233 10e221: 85 d2 test %edx,%edx 10e223: 74 0e je 10e233 10e225: 83 38 00 cmpl $0x0,(%eax) 10e228: 74 09 je 10e233 return EINVAL; *policy = attr->schedpolicy; 10e22a: 8b 40 14 mov 0x14(%eax),%eax 10e22d: 89 02 mov %eax,(%edx) 10e22f: 31 c0 xor %eax,%eax return 0; 10e231: eb 05 jmp 10e238 <== ALWAYS TAKEN 10e233: b8 16 00 00 00 mov $0x16,%eax } 10e238: c9 leave 10e239: c3 ret 0010e23c : int pthread_attr_getscope( const pthread_attr_t *attr, int *contentionscope ) { 10e23c: 55 push %ebp 10e23d: 89 e5 mov %esp,%ebp 10e23f: 8b 45 08 mov 0x8(%ebp),%eax 10e242: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !contentionscope ) 10e245: 85 c0 test %eax,%eax 10e247: 74 12 je 10e25b 10e249: 85 d2 test %edx,%edx 10e24b: 74 0e je 10e25b 10e24d: 83 38 00 cmpl $0x0,(%eax) 10e250: 74 09 je 10e25b return EINVAL; *contentionscope = attr->contentionscope; 10e252: 8b 40 0c mov 0xc(%eax),%eax 10e255: 89 02 mov %eax,(%edx) 10e257: 31 c0 xor %eax,%eax return 0; 10e259: eb 05 jmp 10e260 <== ALWAYS TAKEN 10e25b: b8 16 00 00 00 mov $0x16,%eax } 10e260: c9 leave 10e261: c3 ret 0010e264 : int pthread_attr_getstackaddr( const pthread_attr_t *attr, void **stackaddr ) { 10e264: 55 push %ebp 10e265: 89 e5 mov %esp,%ebp 10e267: 8b 45 08 mov 0x8(%ebp),%eax 10e26a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !stackaddr ) 10e26d: 85 c0 test %eax,%eax 10e26f: 74 12 je 10e283 10e271: 85 d2 test %edx,%edx 10e273: 74 0e je 10e283 10e275: 83 38 00 cmpl $0x0,(%eax) 10e278: 74 09 je 10e283 return EINVAL; *stackaddr = attr->stackaddr; 10e27a: 8b 40 04 mov 0x4(%eax),%eax 10e27d: 89 02 mov %eax,(%edx) 10e27f: 31 c0 xor %eax,%eax return 0; 10e281: eb 05 jmp 10e288 <== ALWAYS TAKEN 10e283: b8 16 00 00 00 mov $0x16,%eax } 10e288: c9 leave 10e289: c3 ret 0010e28c : int pthread_attr_getstacksize( const pthread_attr_t *attr, size_t *stacksize ) { 10e28c: 55 push %ebp 10e28d: 89 e5 mov %esp,%ebp 10e28f: 8b 45 08 mov 0x8(%ebp),%eax 10e292: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !stacksize ) 10e295: 85 c0 test %eax,%eax 10e297: 74 12 je 10e2ab 10e299: 85 d2 test %edx,%edx 10e29b: 74 0e je 10e2ab 10e29d: 83 38 00 cmpl $0x0,(%eax) 10e2a0: 74 09 je 10e2ab return EINVAL; *stacksize = attr->stacksize; 10e2a2: 8b 40 08 mov 0x8(%eax),%eax 10e2a5: 89 02 mov %eax,(%edx) 10e2a7: 31 c0 xor %eax,%eax return 0; 10e2a9: eb 05 jmp 10e2b0 <== ALWAYS TAKEN 10e2ab: b8 16 00 00 00 mov $0x16,%eax } 10e2b0: c9 leave 10e2b1: c3 ret 0010eb54 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 10eb54: 55 push %ebp 10eb55: 89 e5 mov %esp,%ebp 10eb57: 8b 45 08 mov 0x8(%ebp),%eax 10eb5a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10eb5d: 85 c0 test %eax,%eax 10eb5f: 74 11 je 10eb72 10eb61: 83 38 00 cmpl $0x0,(%eax) 10eb64: 74 0c je 10eb72 return EINVAL; switch ( clock_allowed ) { 10eb66: 83 fa 01 cmp $0x1,%edx 10eb69: 77 07 ja 10eb72 case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 10eb6b: 89 50 30 mov %edx,0x30(%eax) 10eb6e: 31 c0 xor %eax,%eax return 0; 10eb70: eb 05 jmp 10eb77 <== ALWAYS TAKEN 10eb72: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10eb77: c9 leave 10eb78: c3 ret 0010e2dc : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 10e2dc: 55 push %ebp 10e2dd: 89 e5 mov %esp,%ebp 10e2df: 8b 45 08 mov 0x8(%ebp),%eax 10e2e2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10e2e5: 85 c0 test %eax,%eax 10e2e7: 74 11 je 10e2fa 10e2e9: 83 38 00 cmpl $0x0,(%eax) 10e2ec: 74 0c je 10e2fa return EINVAL; switch ( detachstate ) { 10e2ee: 83 fa 01 cmp $0x1,%edx 10e2f1: 77 07 ja 10e2fa case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 10e2f3: 89 50 34 mov %edx,0x34(%eax) 10e2f6: 31 c0 xor %eax,%eax return 0; 10e2f8: eb 05 jmp 10e2ff <== ALWAYS TAKEN 10e2fa: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10e2ff: c9 leave 10e300: c3 ret 0010f45c : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 10f45c: 55 push %ebp 10f45d: 89 e5 mov %esp,%ebp 10f45f: 53 push %ebx 10f460: 8b 55 08 mov 0x8(%ebp),%edx 10f463: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) 10f466: 85 d2 test %edx,%edx 10f468: 74 19 je 10f483 10f46a: 83 3a 00 cmpl $0x0,(%edx) 10f46d: 74 14 je 10f483 return EINVAL; switch ( inheritsched ) { 10f46f: 8d 59 ff lea -0x1(%ecx),%ebx 10f472: b8 86 00 00 00 mov $0x86,%eax 10f477: 83 fb 01 cmp $0x1,%ebx 10f47a: 77 0c ja 10f488 case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 10f47c: 89 4a 10 mov %ecx,0x10(%edx) 10f47f: 30 c0 xor %al,%al return 0; 10f481: eb 05 jmp 10f488 <== ALWAYS TAKEN 10f483: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10f488: 5b pop %ebx 10f489: c9 leave 10f48a: c3 ret 0010e334 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 10e334: 55 push %ebp 10e335: 89 e5 mov %esp,%ebp 10e337: 57 push %edi 10e338: 56 push %esi 10e339: 8b 7d 08 mov 0x8(%ebp),%edi 10e33c: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 10e33f: 85 ff test %edi,%edi 10e341: 74 17 je 10e35a 10e343: 85 f6 test %esi,%esi 10e345: 74 13 je 10e35a 10e347: 83 3f 00 cmpl $0x0,(%edi) 10e34a: 74 0e je 10e35a return EINVAL; attr->schedparam = *param; 10e34c: 83 c7 18 add $0x18,%edi 10e34f: b9 06 00 00 00 mov $0x6,%ecx 10e354: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10e356: 31 c0 xor %eax,%eax return 0; 10e358: eb 05 jmp 10e35f <== ALWAYS TAKEN 10e35a: b8 16 00 00 00 mov $0x16,%eax } 10e35f: 5e pop %esi 10e360: 5f pop %edi 10e361: c9 leave 10e362: c3 ret 0010e364 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10e364: 55 push %ebp 10e365: 89 e5 mov %esp,%ebp 10e367: 8b 55 08 mov 0x8(%ebp),%edx 10e36a: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) 10e36d: 85 d2 test %edx,%edx 10e36f: 74 16 je 10e387 10e371: 83 3a 00 cmpl $0x0,(%edx) 10e374: 74 11 je 10e387 return EINVAL; switch ( policy ) { 10e376: b8 86 00 00 00 mov $0x86,%eax 10e37b: 83 f9 03 cmp $0x3,%ecx 10e37e: 77 0c ja 10e38c case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10e380: 89 4a 14 mov %ecx,0x14(%edx) 10e383: 30 c0 xor %al,%al return 0; 10e385: eb 05 jmp 10e38c <== ALWAYS TAKEN 10e387: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10e38c: c9 leave 10e38d: c3 ret 0010e390 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 10e390: 55 push %ebp 10e391: 89 e5 mov %esp,%ebp 10e393: 8b 45 08 mov 0x8(%ebp),%eax 10e396: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10e399: 85 c0 test %eax,%eax 10e39b: 74 1e je 10e3bb 10e39d: 83 38 00 cmpl $0x0,(%eax) 10e3a0: 74 19 je 10e3bb return EINVAL; switch ( contentionscope ) { 10e3a2: 85 d2 test %edx,%edx 10e3a4: 74 0a je 10e3b0 10e3a6: b8 86 00 00 00 mov $0x86,%eax 10e3ab: 4a dec %edx 10e3ac: 75 0d jne 10e3bb 10e3ae: eb 10 jmp 10e3c0 <== ALWAYS TAKEN case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 10e3b0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10e3b7: 31 c0 xor %eax,%eax return 0; 10e3b9: eb 05 jmp 10e3c0 <== ALWAYS TAKEN 10e3bb: b8 16 00 00 00 mov $0x16,%eax return ENOTSUP; default: return EINVAL; } } 10e3c0: c9 leave 10e3c1: c3 ret 0010e3c4 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 10e3c4: 55 push %ebp 10e3c5: 89 e5 mov %esp,%ebp 10e3c7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10e3ca: 85 c0 test %eax,%eax 10e3cc: 74 0f je 10e3dd 10e3ce: 83 38 00 cmpl $0x0,(%eax) 10e3d1: 74 0a je 10e3dd return EINVAL; attr->stackaddr = stackaddr; 10e3d3: 8b 55 0c mov 0xc(%ebp),%edx 10e3d6: 89 50 04 mov %edx,0x4(%eax) 10e3d9: 31 c0 xor %eax,%eax return 0; 10e3db: eb 05 jmp 10e3e2 <== ALWAYS TAKEN 10e3dd: b8 16 00 00 00 mov $0x16,%eax } 10e3e2: c9 leave 10e3e3: c3 ret 0010f48c : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 10f48c: 55 push %ebp 10f48d: 89 e5 mov %esp,%ebp 10f48f: 8b 45 08 mov 0x8(%ebp),%eax 10f492: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10f495: 85 c0 test %eax,%eax 10f497: 74 1d je 10f4b6 10f499: 83 38 00 cmpl $0x0,(%eax) 10f49c: 74 18 je 10f4b6 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 10f49e: 8b 0d 14 12 12 00 mov 0x121214,%ecx 10f4a4: d1 e1 shl %ecx 10f4a6: 39 ca cmp %ecx,%edx 10f4a8: 73 05 jae 10f4af attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 10f4aa: 89 48 08 mov %ecx,0x8(%eax) 10f4ad: eb 03 jmp 10f4b2 <== ALWAYS TAKEN else attr->stacksize = stacksize; 10f4af: 89 50 08 mov %edx,0x8(%eax) 10f4b2: 31 c0 xor %eax,%eax 10f4b4: eb 05 jmp 10f4bb <== ALWAYS TAKEN 10f4b6: b8 16 00 00 00 mov $0x16,%eax return 0; } 10f4bb: c9 leave 10f4bc: c3 ret 0010a234 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10a234: 55 push %ebp 10a235: 89 e5 mov %esp,%ebp 10a237: 53 push %ebx 10a238: 83 ec 14 sub $0x14,%esp 10a23b: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10a23e: 85 c0 test %eax,%eax 10a240: 74 54 je 10a296 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10a242: 53 push %ebx 10a243: 8d 55 f4 lea -0xc(%ebp),%edx 10a246: 52 push %edx 10a247: ff 30 pushl (%eax) 10a249: 68 6c 66 12 00 push $0x12666c 10a24e: e8 f5 21 00 00 call 10c448 <_Objects_Get> 10a253: 89 c3 mov %eax,%ebx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10a255: 83 c4 10 add $0x10,%esp 10a258: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a25c: 75 38 jne 10a296 case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10a25e: 83 78 58 00 cmpl $0x0,0x58(%eax) 10a262: 74 0c je 10a270 _Thread_Enable_dispatch(); 10a264: e8 d0 29 00 00 call 10cc39 <_Thread_Enable_dispatch> 10a269: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10a26e: eb 2b jmp 10a29b <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); 10a270: 51 push %ecx 10a271: 51 push %ecx 10a272: 50 push %eax 10a273: 68 6c 66 12 00 push $0x12666c 10a278: e8 23 1e 00 00 call 10c0a0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10a27d: 58 pop %eax 10a27e: 5a pop %edx 10a27f: 53 push %ebx 10a280: 68 6c 66 12 00 push $0x12666c 10a285: e8 96 20 00 00 call 10c320 <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10a28a: e8 aa 29 00 00 call 10cc39 <_Thread_Enable_dispatch> 10a28f: 31 c0 xor %eax,%eax return 0; 10a291: 83 c4 10 add $0x10,%esp 10a294: eb 05 jmp 10a29b <== ALWAYS TAKEN 10a296: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a29b: 8b 5d fc mov -0x4(%ebp),%ebx 10a29e: c9 leave 10a29f: c3 ret 0010a2a0 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10a2a0: 55 push %ebp 10a2a1: 89 e5 mov %esp,%ebp 10a2a3: 57 push %edi 10a2a4: 56 push %esi 10a2a5: 53 push %ebx 10a2a6: 83 ec 1c sub $0x1c,%esp 10a2a9: 8b 5d 08 mov 0x8(%ebp),%ebx 10a2ac: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10a2af: 85 db test %ebx,%ebx 10a2b1: 0f 84 93 00 00 00 je 10a34a return EINVAL; if ( count == 0 ) 10a2b7: 85 f6 test %esi,%esi 10a2b9: 0f 84 8b 00 00 00 je 10a34a return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10a2bf: 8b 7d 0c mov 0xc(%ebp),%edi 10a2c2: 85 ff test %edi,%edi 10a2c4: 75 0f jne 10a2d5 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10a2c6: 83 ec 0c sub $0xc,%esp 10a2c9: 8d 7d d8 lea -0x28(%ebp),%edi 10a2cc: 57 push %edi 10a2cd: e8 1a ff ff ff call 10a1ec <== ALWAYS TAKEN 10a2d2: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10a2d5: 83 3f 00 cmpl $0x0,(%edi) 10a2d8: 74 70 je 10a34a return EINVAL; switch ( the_attr->process_shared ) { 10a2da: 83 7f 04 00 cmpl $0x0,0x4(%edi) 10a2de: 75 6a jne 10a34a <== ALWAYS TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10a2e0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10a2e7: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a2ea: a1 84 62 12 00 mov 0x126284,%eax 10a2ef: 40 inc %eax 10a2f0: a3 84 62 12 00 mov %eax,0x126284 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 10a2f5: 83 ec 0c sub $0xc,%esp 10a2f8: 68 6c 66 12 00 push $0x12666c 10a2fd: e8 32 1d 00 00 call 10c034 <_Objects_Allocate> 10a302: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10a304: 83 c4 10 add $0x10,%esp 10a307: 85 c0 test %eax,%eax 10a309: 75 0c jne 10a317 _Thread_Enable_dispatch(); 10a30b: e8 29 29 00 00 call 10cc39 <_Thread_Enable_dispatch> 10a310: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10a315: eb 38 jmp 10a34f <== ALWAYS TAKEN } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10a317: 50 push %eax 10a318: 50 push %eax 10a319: 8d 45 e0 lea -0x20(%ebp),%eax 10a31c: 50 push %eax 10a31d: 8d 46 10 lea 0x10(%esi),%eax 10a320: 50 push %eax 10a321: e8 42 14 00 00 call 10b768 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a326: 8b 46 08 mov 0x8(%esi),%eax 10a329: 0f b7 c8 movzwl %ax,%ecx 10a32c: 8b 15 88 66 12 00 mov 0x126688,%edx 10a332: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a335: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10a33c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10a33e: e8 f6 28 00 00 call 10cc39 <_Thread_Enable_dispatch> 10a343: 31 c0 xor %eax,%eax return 0; 10a345: 83 c4 10 add $0x10,%esp 10a348: eb 05 jmp 10a34f <== ALWAYS TAKEN 10a34a: b8 16 00 00 00 mov $0x16,%eax } 10a34f: 8d 65 f4 lea -0xc(%ebp),%esp 10a352: 5b pop %ebx 10a353: 5e pop %esi 10a354: 5f pop %edi 10a355: c9 leave 10a356: c3 ret 0010a358 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10a358: 55 push %ebp 10a359: 89 e5 mov %esp,%ebp 10a35b: 83 ec 18 sub $0x18,%esp 10a35e: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10a361: 85 c0 test %eax,%eax 10a363: 74 4c je 10a3b1 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10a365: 52 push %edx 10a366: 8d 55 f4 lea -0xc(%ebp),%edx 10a369: 52 push %edx 10a36a: ff 30 pushl (%eax) 10a36c: 68 6c 66 12 00 push $0x12666c 10a371: e8 d2 20 00 00 call 10c448 <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10a376: 83 c4 10 add $0x10,%esp 10a379: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a37d: 75 32 jne 10a3b1 case OBJECTS_LOCAL: _CORE_barrier_Wait( 10a37f: 83 ec 0c sub $0xc,%esp 10a382: 6a 00 push $0x0 10a384: 6a 00 push $0x0 10a386: 6a 01 push $0x1 10a388: ff 70 08 pushl 0x8(%eax) 10a38b: 83 c0 10 add $0x10,%eax 10a38e: 50 push %eax 10a38f: e8 08 14 00 00 call 10b79c <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10a394: 83 c4 20 add $0x20,%esp 10a397: e8 9d 28 00 00 call 10cc39 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10a39c: 83 ec 0c sub $0xc,%esp 10a39f: a1 40 63 12 00 mov 0x126340,%eax 10a3a4: ff 70 34 pushl 0x34(%eax) 10a3a7: e8 2c 4f 00 00 call 10f2d8 <_POSIX_Barrier_Translate_core_barrier_return_code> 10a3ac: 83 c4 10 add $0x10,%esp 10a3af: eb 05 jmp 10a3b6 <== ALWAYS TAKEN 10a3b1: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a3b6: c9 leave 10a3b7: c3 ret 0010a1a8 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10a1a8: 55 push %ebp 10a1a9: 89 e5 mov %esp,%ebp 10a1ab: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10a1ae: 85 c0 test %eax,%eax 10a1b0: 74 0f je 10a1c1 10a1b2: 83 38 00 cmpl $0x0,(%eax) 10a1b5: 74 0a je 10a1c1 return EINVAL; attr->is_initialized = false; 10a1b7: c7 00 00 00 00 00 movl $0x0,(%eax) 10a1bd: 31 c0 xor %eax,%eax return 0; 10a1bf: eb 05 jmp 10a1c6 <== ALWAYS TAKEN 10a1c1: b8 16 00 00 00 mov $0x16,%eax } 10a1c6: c9 leave 10a1c7: c3 ret 0010a1c8 : int pthread_barrierattr_getpshared( const pthread_barrierattr_t *attr, int *pshared ) { 10a1c8: 55 push %ebp 10a1c9: 89 e5 mov %esp,%ebp 10a1cb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10a1ce: 85 c0 test %eax,%eax 10a1d0: 74 11 je 10a1e3 return EINVAL; if ( !attr->is_initialized ) 10a1d2: 83 38 00 cmpl $0x0,(%eax) 10a1d5: 74 0c je 10a1e3 return EINVAL; *pshared = attr->process_shared; 10a1d7: 8b 50 04 mov 0x4(%eax),%edx 10a1da: 8b 45 0c mov 0xc(%ebp),%eax 10a1dd: 89 10 mov %edx,(%eax) 10a1df: 31 c0 xor %eax,%eax return 0; 10a1e1: eb 05 jmp 10a1e8 <== ALWAYS TAKEN 10a1e3: b8 16 00 00 00 mov $0x16,%eax } 10a1e8: c9 leave 10a1e9: c3 ret 0010a20c : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10a20c: 55 push %ebp 10a20d: 89 e5 mov %esp,%ebp 10a20f: 8b 45 08 mov 0x8(%ebp),%eax 10a212: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10a215: 85 c0 test %eax,%eax 10a217: 74 11 je 10a22a return EINVAL; if ( !attr->is_initialized ) 10a219: 83 38 00 cmpl $0x0,(%eax) 10a21c: 74 0c je 10a22a return EINVAL; switch ( pshared ) { 10a21e: 83 fa 01 cmp $0x1,%edx 10a221: 77 07 ja 10a22a case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10a223: 89 50 04 mov %edx,0x4(%eax) 10a226: 31 c0 xor %eax,%eax return 0; 10a228: eb 05 jmp 10a22f <== ALWAYS TAKEN 10a22a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a22f: c9 leave 10a230: c3 ret 001098f8 : */ void pthread_cleanup_pop( int execute ) { 1098f8: 55 push %ebp 1098f9: 89 e5 mov %esp,%ebp 1098fb: 57 push %edi 1098fc: 56 push %esi 1098fd: 53 push %ebx 1098fe: 83 ec 1c sub $0x1c,%esp 109901: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109904: a1 70 42 12 00 mov 0x124270,%eax 109909: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10990f: a1 b4 41 12 00 mov 0x1241b4,%eax 109914: 40 inc %eax 109915: a3 b4 41 12 00 mov %eax,0x1241b4 * ensure that we do not get prempted and deleted while we are holding * memory that needs to be freed. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10991a: 9c pushf 10991b: fa cli 10991c: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10991d: 8d 82 dc 00 00 00 lea 0xdc(%edx),%eax POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 109923: 39 82 d8 00 00 00 cmp %eax,0xd8(%edx) 109929: 75 09 jne 109934 _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10992b: e8 7d 23 00 00 call 10bcad <_Thread_Enable_dispatch> _ISR_Enable( level ); 109930: 56 push %esi 109931: 9d popf return; 109932: eb 44 jmp 109978 <== ALWAYS TAKEN } handler = (POSIX_Cancel_Handler_control *) 109934: 8b 40 04 mov 0x4(%eax),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 109937: 8b 08 mov (%eax),%ecx previous = the_node->previous; 109939: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10993c: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10993f: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 109941: 56 push %esi 109942: 9d popf tmp_handler = *handler; 109943: 8d 7d d8 lea -0x28(%ebp),%edi 109946: b9 04 00 00 00 mov $0x4,%ecx 10994b: 89 c6 mov %eax,%esi 10994d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10994f: 8b 75 e0 mov -0x20(%ebp),%esi 109952: 8b 7d e4 mov -0x1c(%ebp),%edi _Workspace_Free( handler ); 109955: 83 ec 0c sub $0xc,%esp 109958: 50 push %eax 109959: e8 3b 33 00 00 call 10cc99 <_Workspace_Free> _Thread_Enable_dispatch(); 10995e: e8 4a 23 00 00 call 10bcad <_Thread_Enable_dispatch> if ( execute ) 109963: 83 c4 10 add $0x10,%esp 109966: 85 db test %ebx,%ebx 109968: 74 0e je 109978 (*tmp_handler.routine)( tmp_handler.arg ); 10996a: 89 7d 08 mov %edi,0x8(%ebp) 10996d: 89 f0 mov %esi,%eax } 10996f: 8d 65 f4 lea -0xc(%ebp),%esp 109972: 5b pop %ebx 109973: 5e pop %esi 109974: 5f pop %edi 109975: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 109976: ff e0 jmp *%eax } 109978: 8d 65 f4 lea -0xc(%ebp),%esp 10997b: 5b pop %ebx 10997c: 5e pop %esi 10997d: 5f pop %edi 10997e: c9 leave 10997f: c3 ret 00109c60 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 109c60: 55 push %ebp 109c61: 89 e5 mov %esp,%ebp 109c63: 56 push %esi 109c64: 53 push %ebx 109c65: 8b 5d 08 mov 0x8(%ebp),%ebx 109c68: 8b 75 0c mov 0xc(%ebp),%esi /* * 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 ) 109c6b: 85 db test %ebx,%ebx 109c6d: 74 4b je 109cba rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109c6f: a1 dc 61 12 00 mov 0x1261dc,%eax 109c74: 40 inc %eax 109c75: a3 dc 61 12 00 mov %eax,0x1261dc return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 109c7a: 83 ec 0c sub $0xc,%esp 109c7d: 6a 10 push $0x10 109c7f: e8 28 3a 00 00 call 10d6ac <_Workspace_Allocate> if ( handler ) { 109c84: 83 c4 10 add $0x10,%esp 109c87: 85 c0 test %eax,%eax 109c89: 74 24 je 109caf <== ALWAYS TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 109c8b: 8b 15 98 62 12 00 mov 0x126298,%edx 109c91: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 109c97: 81 c2 d8 00 00 00 add $0xd8,%edx handler->routine = routine; 109c9d: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 109ca0: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 109ca3: 51 push %ecx 109ca4: 51 push %ecx 109ca5: 50 push %eax 109ca6: 52 push %edx 109ca7: e8 50 15 00 00 call 10b1fc <_Chain_Append> 109cac: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 109caf: 8d 65 f8 lea -0x8(%ebp),%esp 109cb2: 5b pop %ebx 109cb3: 5e pop %esi 109cb4: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 109cb5: e9 a3 29 00 00 jmp 10c65d <_Thread_Enable_dispatch> } 109cba: 8d 65 f8 lea -0x8(%ebp),%esp 109cbd: 5b pop %ebx 109cbe: 5e pop %esi 109cbf: c9 leave 109cc0: c3 ret 0010a928 : */ int pthread_cond_broadcast( pthread_cond_t *cond ) { 10a928: 55 push %ebp 10a929: 89 e5 mov %esp,%ebp 10a92b: 83 ec 10 sub $0x10,%esp return _POSIX_Condition_variables_Signal_support( cond, true ); 10a92e: 6a 01 push $0x1 10a930: ff 75 08 pushl 0x8(%ebp) 10a933: e8 6c 01 00 00 call 10aaa4 <_POSIX_Condition_variables_Signal_support> <== ALWAYS TAKEN } 10a938: c9 leave 10a939: c3 ret 0010a93c : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10a93c: 55 push %ebp 10a93d: 89 e5 mov %esp,%ebp 10a93f: 53 push %ebx 10a940: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10a943: 8d 45 f4 lea -0xc(%ebp),%eax 10a946: 50 push %eax 10a947: ff 75 08 pushl 0x8(%ebp) 10a94a: e8 59 00 00 00 call 10a9a8 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10a94f: 89 c3 mov %eax,%ebx switch ( location ) { 10a951: 83 c4 10 add $0x10,%esp 10a954: b8 16 00 00 00 mov $0x16,%eax 10a959: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a95d: 75 43 jne 10a9a2 case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10a95f: 83 ec 0c sub $0xc,%esp 10a962: 8d 43 18 lea 0x18(%ebx),%eax 10a965: 50 push %eax 10a966: e8 b5 35 00 00 call 10df20 <_Thread_queue_First> 10a96b: 83 c4 10 add $0x10,%esp 10a96e: 85 c0 test %eax,%eax 10a970: 74 0c je 10a97e _Thread_Enable_dispatch(); 10a972: e8 26 2f 00 00 call 10d89d <_Thread_Enable_dispatch> 10a977: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10a97c: eb 24 jmp 10a9a2 <== ALWAYS TAKEN } _Objects_Close( 10a97e: 51 push %ecx 10a97f: 51 push %ecx 10a980: 53 push %ebx 10a981: 68 ac 76 12 00 push $0x1276ac 10a986: e8 79 23 00 00 call 10cd04 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10a98b: 58 pop %eax 10a98c: 5a pop %edx 10a98d: 53 push %ebx 10a98e: 68 ac 76 12 00 push $0x1276ac 10a993: e8 ec 25 00 00 call 10cf84 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10a998: e8 00 2f 00 00 call 10d89d <_Thread_Enable_dispatch> 10a99d: 31 c0 xor %eax,%eax return 0; 10a99f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10a9a2: 8b 5d fc mov -0x4(%ebp),%ebx 10a9a5: c9 leave 10a9a6: c3 ret 0010a9f0 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10a9f0: 55 push %ebp 10a9f1: 89 e5 mov %esp,%ebp 10a9f3: 56 push %esi 10a9f4: 53 push %ebx 10a9f5: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10a9f8: bb e8 0b 12 00 mov $0x120be8,%ebx 10a9fd: 85 c0 test %eax,%eax 10a9ff: 74 02 je 10aa03 10aa01: 89 c3 mov %eax,%ebx /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10aa03: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10aa07: 74 78 je 10aa81 <== ALWAYS TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10aa09: 83 3b 00 cmpl $0x0,(%ebx) 10aa0c: 74 73 je 10aa81 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aa0e: a1 2c 72 12 00 mov 0x12722c,%eax 10aa13: 40 inc %eax 10aa14: a3 2c 72 12 00 mov %eax,0x12722c */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10aa19: 83 ec 0c sub $0xc,%esp 10aa1c: 68 ac 76 12 00 push $0x1276ac 10aa21: e8 72 22 00 00 call 10cc98 <_Objects_Allocate> 10aa26: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10aa28: 83 c4 10 add $0x10,%esp 10aa2b: 85 c0 test %eax,%eax 10aa2d: 75 0c jne 10aa3b _Thread_Enable_dispatch(); 10aa2f: e8 69 2e 00 00 call 10d89d <_Thread_Enable_dispatch> 10aa34: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10aa39: eb 4b jmp 10aa86 <== ALWAYS TAKEN } the_cond->process_shared = the_attr->process_shared; 10aa3b: 8b 43 04 mov 0x4(%ebx),%eax 10aa3e: 89 46 10 mov %eax,0x10(%esi) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10aa41: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10aa48: 6a 74 push $0x74 10aa4a: 68 00 08 00 00 push $0x800 10aa4f: 6a 00 push $0x0 10aa51: 8d 46 18 lea 0x18(%esi),%eax 10aa54: 50 push %eax 10aa55: e8 36 35 00 00 call 10df90 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10aa5a: 8b 46 08 mov 0x8(%esi),%eax 10aa5d: 0f b7 c8 movzwl %ax,%ecx 10aa60: 8b 15 c8 76 12 00 mov 0x1276c8,%edx 10aa66: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10aa69: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10aa70: 8b 55 08 mov 0x8(%ebp),%edx 10aa73: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10aa75: e8 23 2e 00 00 call 10d89d <_Thread_Enable_dispatch> 10aa7a: 31 c0 xor %eax,%eax return 0; 10aa7c: 83 c4 10 add $0x10,%esp 10aa7f: eb 05 jmp 10aa86 <== ALWAYS TAKEN 10aa81: b8 16 00 00 00 mov $0x16,%eax } 10aa86: 8d 65 f8 lea -0x8(%ebp),%esp 10aa89: 5b pop %ebx 10aa8a: 5e pop %esi 10aa8b: c9 leave 10aa8c: c3 ret 0010aa90 : */ int pthread_cond_signal( pthread_cond_t *cond ) { 10aa90: 55 push %ebp 10aa91: 89 e5 mov %esp,%ebp 10aa93: 83 ec 10 sub $0x10,%esp return _POSIX_Condition_variables_Signal_support( cond, false ); 10aa96: 6a 00 push $0x0 10aa98: ff 75 08 pushl 0x8(%ebp) 10aa9b: e8 04 00 00 00 call 10aaa4 <_POSIX_Condition_variables_Signal_support> <== ALWAYS TAKEN } 10aaa0: c9 leave 10aaa1: c3 ret 0010ab00 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 10ab00: 55 push %ebp 10ab01: 89 e5 mov %esp,%ebp 10ab03: 83 ec 20 sub $0x20,%esp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 10ab06: 8d 45 f4 lea -0xc(%ebp),%eax 10ab09: 50 push %eax 10ab0a: ff 75 10 pushl 0x10(%ebp) 10ab0d: e8 16 04 00 00 call 10af28 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN 10ab12: 89 c2 mov %eax,%edx 10ab14: 83 c4 10 add $0x10,%esp 10ab17: b8 16 00 00 00 mov $0x16,%eax 10ab1c: 85 d2 test %edx,%edx 10ab1e: 74 1a je 10ab3a default: /* only to silence warnings */ already_timedout = false; break; } return _POSIX_Condition_variables_Wait_support( 10ab20: 31 c0 xor %eax,%eax 10ab22: 83 fa 02 cmp $0x2,%edx 10ab25: 0f 96 c0 setbe %al 10ab28: 50 push %eax 10ab29: ff 75 f4 pushl -0xc(%ebp) 10ab2c: ff 75 0c pushl 0xc(%ebp) 10ab2f: ff 75 08 pushl 0x8(%ebp) 10ab32: e8 1d 00 00 00 call 10ab54 <_POSIX_Condition_variables_Wait_support> <== ALWAYS TAKEN 10ab37: 83 c4 10 add $0x10,%esp cond, mutex, ticks, already_timedout ); } 10ab3a: c9 leave 10ab3b: c3 ret 0010ab3c : int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ) { 10ab3c: 55 push %ebp 10ab3d: 89 e5 mov %esp,%ebp 10ab3f: 83 ec 08 sub $0x8,%esp return _POSIX_Condition_variables_Wait_support( 10ab42: 6a 00 push $0x0 10ab44: 6a 00 push $0x0 10ab46: ff 75 0c pushl 0xc(%ebp) 10ab49: ff 75 08 pushl 0x8(%ebp) 10ab4c: e8 03 00 00 00 call 10ab54 <_POSIX_Condition_variables_Wait_support> <== ALWAYS TAKEN cond, mutex, THREAD_QUEUE_WAIT_FOREVER, false ); } 10ab51: c9 leave 10ab52: c3 ret 0010a8a4 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10a8a4: 55 push %ebp 10a8a5: 89 e5 mov %esp,%ebp 10a8a7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10a8aa: 85 c0 test %eax,%eax 10a8ac: 74 0f je 10a8bd 10a8ae: 83 38 00 cmpl $0x0,(%eax) 10a8b1: 74 0a je 10a8bd <== ALWAYS TAKEN return EINVAL; attr->is_initialized = false; 10a8b3: c7 00 00 00 00 00 movl $0x0,(%eax) 10a8b9: 31 c0 xor %eax,%eax return 0; 10a8bb: eb 05 jmp 10a8c2 <== ALWAYS TAKEN 10a8bd: b8 16 00 00 00 mov $0x16,%eax } 10a8c2: c9 leave 10a8c3: c3 ret 0010a908 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10a908: 55 push %ebp 10a909: 89 e5 mov %esp,%ebp 10a90b: 8b 45 08 mov 0x8(%ebp),%eax 10a90e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10a911: 85 c0 test %eax,%eax 10a913: 74 0c je 10a921 return EINVAL; switch ( pshared ) { 10a915: 83 fa 01 cmp $0x1,%edx 10a918: 77 07 ja 10a921 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10a91a: 89 50 04 mov %edx,0x4(%eax) 10a91d: 31 c0 xor %eax,%eax return 0; 10a91f: eb 05 jmp 10a926 <== ALWAYS TAKEN 10a921: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a926: c9 leave 10a927: c3 ret 00109fcc : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 109fcc: 55 push %ebp 109fcd: 89 e5 mov %esp,%ebp 109fcf: 57 push %edi 109fd0: 56 push %esi 109fd1: 53 push %ebx 109fd2: 83 ec 3c sub $0x3c,%esp 109fd5: 8b 45 0c mov 0xc(%ebp),%eax int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 109fd8: c7 45 c0 0e 00 00 00 movl $0xe,-0x40(%ebp) 109fdf: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 109fe3: 0f 84 fc 01 00 00 je 10a1e5 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 109fe9: bb 34 f7 11 00 mov $0x11f734,%ebx 109fee: 85 c0 test %eax,%eax 109ff0: 74 02 je 109ff4 109ff2: 89 c3 mov %eax,%ebx if ( !the_attr->is_initialized ) 109ff4: 83 3b 00 cmpl $0x0,(%ebx) 109ff7: 0f 84 e1 01 00 00 je 10a1de * 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) ) 109ffd: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a001: 74 0f je 10a012 10a003: 8b 43 08 mov 0x8(%ebx),%eax 10a006: 3b 05 14 12 12 00 cmp 0x121214,%eax 10a00c: 0f 82 cc 01 00 00 jb 10a1de * 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 ) { 10a012: 8b 43 10 mov 0x10(%ebx),%eax 10a015: 83 f8 01 cmp $0x1,%eax 10a018: 74 0b je 10a025 10a01a: 83 f8 02 cmp $0x2,%eax 10a01d: 0f 85 bb 01 00 00 jne 10a1de 10a023: eb 19 jmp 10a03e <== ALWAYS TAKEN case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a025: a1 98 52 12 00 mov 0x125298,%eax 10a02a: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10a030: 8b 46 7c mov 0x7c(%esi),%eax 10a033: 89 45 bc mov %eax,-0x44(%ebp) schedparam = api->schedparam; 10a036: 8d 7d c8 lea -0x38(%ebp),%edi 10a039: 83 ee 80 sub $0xffffff80,%esi 10a03c: eb 0c jmp 10a04a <== ALWAYS TAKEN break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10a03e: 8b 53 14 mov 0x14(%ebx),%edx 10a041: 89 55 bc mov %edx,-0x44(%ebp) schedparam = the_attr->schedparam; 10a044: 8d 7d c8 lea -0x38(%ebp),%edi 10a047: 8d 73 18 lea 0x18(%ebx),%esi 10a04a: b9 06 00 00 00 mov $0x6,%ecx 10a04f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 10a051: c7 45 c0 86 00 00 00 movl $0x86,-0x40(%ebp) 10a058: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10a05c: 0f 85 83 01 00 00 jne 10a1e5 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10a062: 83 ec 0c sub $0xc,%esp 10a065: ff 75 c8 pushl -0x38(%ebp) 10a068: e8 df 52 00 00 call 10f34c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10a06d: 83 c4 10 add $0x10,%esp 10a070: 84 c0 test %al,%al 10a072: 0f 84 66 01 00 00 je 10a1de <== ALWAYS TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10a078: 8b 7d c8 mov -0x38(%ebp),%edi RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10a07b: 0f b6 35 18 12 12 00 movzbl 0x121218,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10a082: 8d 45 e0 lea -0x20(%ebp),%eax 10a085: 50 push %eax 10a086: 8d 45 e4 lea -0x1c(%ebp),%eax 10a089: 50 push %eax 10a08a: 8d 45 c8 lea -0x38(%ebp),%eax 10a08d: 50 push %eax 10a08e: ff 75 bc pushl -0x44(%ebp) 10a091: e8 d6 52 00 00 call 10f36c <_POSIX_Thread_Translate_sched_param> <== ALWAYS TAKEN 10a096: 89 45 c0 mov %eax,-0x40(%ebp) schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10a099: 83 c4 10 add $0x10,%esp 10a09c: 85 c0 test %eax,%eax 10a09e: 0f 85 41 01 00 00 jne 10a1e5 <== ALWAYS TAKEN #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a0a4: 83 ec 0c sub $0xc,%esp 10a0a7: ff 35 90 52 12 00 pushl 0x125290 10a0ad: e8 fa 14 00 00 call 10b5ac <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10a0b2: c7 04 24 44 54 12 00 movl $0x125444,(%esp) 10a0b9: e8 c2 1d 00 00 call 10be80 <_Objects_Allocate> 10a0be: 89 c2 mov %eax,%edx * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10a0c0: 83 c4 10 add $0x10,%esp 10a0c3: 85 c0 test %eax,%eax 10a0c5: 75 05 jne 10a0cc _RTEMS_Unlock_allocator(); 10a0c7: 83 ec 0c sub $0xc,%esp 10a0ca: eb 53 jmp 10a11f <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10a0cc: 8b 43 08 mov 0x8(%ebx),%eax 10a0cf: 51 push %ecx 10a0d0: 6a 00 push $0x0 10a0d2: 6a 00 push $0x0 10a0d4: ff 75 e0 pushl -0x20(%ebp) 10a0d7: ff 75 e4 pushl -0x1c(%ebp) 10a0da: 6a 01 push $0x1 10a0dc: 81 e6 ff 00 00 00 and $0xff,%esi 10a0e2: 29 fe sub %edi,%esi 10a0e4: 56 push %esi 10a0e5: 6a 01 push $0x1 10a0e7: 8b 0d 14 12 12 00 mov 0x121214,%ecx 10a0ed: d1 e1 shl %ecx 10a0ef: 39 c1 cmp %eax,%ecx 10a0f1: 73 02 jae 10a0f5 10a0f3: 89 c1 mov %eax,%ecx 10a0f5: 51 push %ecx 10a0f6: ff 73 04 pushl 0x4(%ebx) 10a0f9: 52 push %edx 10a0fa: 68 44 54 12 00 push $0x125444 10a0ff: 89 55 b8 mov %edx,-0x48(%ebp) 10a102: e8 41 2a 00 00 call 10cb48 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10a107: 83 c4 30 add $0x30,%esp 10a10a: 84 c0 test %al,%al 10a10c: 8b 55 b8 mov -0x48(%ebp),%edx 10a10f: 75 25 jne 10a136 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10a111: 53 push %ebx 10a112: 53 push %ebx 10a113: 52 push %edx 10a114: 68 44 54 12 00 push $0x125444 10a119: e8 4e 20 00 00 call 10c16c <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a11e: 59 pop %ecx 10a11f: ff 35 90 52 12 00 pushl 0x125290 10a125: e8 ca 14 00 00 call 10b5f4 <_API_Mutex_Unlock> 10a12a: c7 45 c0 0b 00 00 00 movl $0xb,-0x40(%ebp) 10a131: e9 a3 00 00 00 jmp 10a1d9 <== ALWAYS TAKEN } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10a136: 8b 8a f8 00 00 00 mov 0xf8(%edx),%ecx 10a13c: 89 4d c4 mov %ecx,-0x3c(%ebp) api->Attributes = *the_attr; 10a13f: b9 0e 00 00 00 mov $0xe,%ecx 10a144: 8b 7d c4 mov -0x3c(%ebp),%edi 10a147: 89 de mov %ebx,%esi 10a149: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10a14b: 8b 43 34 mov 0x34(%ebx),%eax 10a14e: 8b 4d c4 mov -0x3c(%ebp),%ecx 10a151: 89 41 38 mov %eax,0x38(%ecx) api->schedpolicy = schedpolicy; 10a154: 8b 45 bc mov -0x44(%ebp),%eax 10a157: 89 41 7c mov %eax,0x7c(%ecx) api->schedparam = schedparam; 10a15a: 89 cf mov %ecx,%edi 10a15c: 83 ef 80 sub $0xffffff80,%edi 10a15f: 8d 75 c8 lea -0x38(%ebp),%esi 10a162: b9 06 00 00 00 mov $0x6,%ecx 10a167: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 10a169: c6 42 74 01 movb $0x1,0x74(%edx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10a16d: 83 ec 0c sub $0xc,%esp 10a170: 6a 00 push $0x0 10a172: ff 75 14 pushl 0x14(%ebp) 10a175: ff 75 10 pushl 0x10(%ebp) 10a178: 6a 01 push $0x1 10a17a: 52 push %edx 10a17b: 89 55 b8 mov %edx,-0x48(%ebp) 10a17e: e8 39 33 00 00 call 10d4bc <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10a183: 83 c4 20 add $0x20,%esp 10a186: 83 7d bc 03 cmpl $0x3,-0x44(%ebp) 10a18a: 8b 55 b8 mov -0x48(%ebp),%edx 10a18d: 75 34 jne 10a1c3 _Watchdog_Insert_ticks( 10a18f: 83 ec 0c sub $0xc,%esp 10a192: 8b 45 c4 mov -0x3c(%ebp),%eax 10a195: 05 88 00 00 00 add $0x88,%eax 10a19a: 50 push %eax 10a19b: e8 c8 34 00 00 call 10d668 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a1a0: 8b 4d c4 mov -0x3c(%ebp),%ecx 10a1a3: 89 81 a8 00 00 00 mov %eax,0xa8(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a1a9: 58 pop %eax 10a1aa: 5a pop %edx 10a1ab: 89 c8 mov %ecx,%eax 10a1ad: 05 9c 00 00 00 add $0x9c,%eax 10a1b2: 50 push %eax 10a1b3: 68 b8 52 12 00 push $0x1252b8 10a1b8: e8 57 37 00 00 call 10d914 <_Watchdog_Insert> 10a1bd: 83 c4 10 add $0x10,%esp 10a1c0: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10a1c3: 8b 52 08 mov 0x8(%edx),%edx 10a1c6: 8b 45 08 mov 0x8(%ebp),%eax 10a1c9: 89 10 mov %edx,(%eax) _RTEMS_Unlock_allocator(); 10a1cb: 83 ec 0c sub $0xc,%esp 10a1ce: ff 35 90 52 12 00 pushl 0x125290 10a1d4: e8 1b 14 00 00 call 10b5f4 <_API_Mutex_Unlock> return 0; 10a1d9: 83 c4 10 add $0x10,%esp 10a1dc: eb 07 jmp 10a1e5 <== ALWAYS TAKEN 10a1de: c7 45 c0 16 00 00 00 movl $0x16,-0x40(%ebp) } 10a1e5: 8b 45 c0 mov -0x40(%ebp),%eax 10a1e8: 8d 65 f4 lea -0xc(%ebp),%esp 10a1eb: 5b pop %ebx 10a1ec: 5e pop %esi 10a1ed: 5f pop %edi 10a1ee: c9 leave 10a1ef: c3 ret 0011061c : } void pthread_exit( void *value_ptr ) { 11061c: 55 push %ebp 11061d: 89 e5 mov %esp,%ebp 11061f: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 110622: ff 75 08 pushl 0x8(%ebp) 110625: ff 35 a8 42 12 00 pushl 0x1242a8 11062b: e8 88 ff ff ff call 1105b8 <_POSIX_Thread_Exit> <== ALWAYS TAKEN 110630: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 110633: c9 leave <== NOT EXECUTED 110634: c3 ret <== NOT EXECUTED 0010c120 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10c120: 55 push %ebp 10c121: 89 e5 mov %esp,%ebp 10c123: 57 push %edi 10c124: 56 push %esi 10c125: 53 push %ebx 10c126: 83 ec 1c sub $0x1c,%esp 10c129: 8b 7d 0c mov 0xc(%ebp),%edi 10c12c: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10c12f: 85 db test %ebx,%ebx 10c131: 74 04 je 10c137 10c133: 85 ff test %edi,%edi 10c135: 75 07 jne 10c13e 10c137: ba 16 00 00 00 mov $0x16,%edx 10c13c: eb 4a jmp 10c188 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10c13e: 50 push %eax 10c13f: 8d 45 e4 lea -0x1c(%ebp),%eax 10c142: 50 push %eax 10c143: ff 75 08 pushl 0x8(%ebp) 10c146: 68 a4 94 12 00 push $0x1294a4 10c14b: e8 0c 20 00 00 call 10e15c <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10c150: 83 c4 10 add $0x10,%esp 10c153: ba 03 00 00 00 mov $0x3,%edx 10c158: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10c15c: 75 2a jne 10c188 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c15e: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10c164: 8b 56 7c mov 0x7c(%esi),%edx 10c167: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10c169: 83 ee 80 sub $0xffffff80,%esi 10c16c: b9 06 00 00 00 mov $0x6,%ecx 10c171: 89 df mov %ebx,%edi 10c173: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10c175: 0f b6 15 18 52 12 00 movzbl 0x125218,%edx 10c17c: 2b 50 14 sub 0x14(%eax),%edx 10c17f: 89 13 mov %edx,(%ebx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10c181: e8 c7 27 00 00 call 10e94d <_Thread_Enable_dispatch> 10c186: 31 d2 xor %edx,%edx break; } return ESRCH; } 10c188: 89 d0 mov %edx,%eax 10c18a: 8d 65 f4 lea -0xc(%ebp),%esp 10c18d: 5b pop %ebx 10c18e: 5e pop %esi 10c18f: 5f pop %edi 10c190: c9 leave 10c191: c3 ret 0010e7d0 : int pthread_join( pthread_t thread, void **value_ptr ) { 10e7d0: 55 push %ebp 10e7d1: 89 e5 mov %esp,%ebp 10e7d3: 56 push %esi 10e7d4: 53 push %ebx 10e7d5: 83 ec 14 sub $0x14,%esp 10e7d8: 8b 5d 0c mov 0xc(%ebp),%ebx 10e7db: 8d 45 f4 lea -0xc(%ebp),%eax 10e7de: 50 push %eax 10e7df: ff 75 08 pushl 0x8(%ebp) 10e7e2: 68 b8 d4 12 00 push $0x12d4b8 10e7e7: e8 bc 1f 00 00 call 1107a8 <_Objects_Get> 10e7ec: 89 c6 mov %eax,%esi POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10e7ee: 83 c4 10 add $0x10,%esp 10e7f1: b8 03 00 00 00 mov $0x3,%eax 10e7f6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e7fa: 75 61 jne 10e85d case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e7fc: 8b 96 f8 00 00 00 mov 0xf8(%esi),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 10e802: 83 7a 38 00 cmpl $0x0,0x38(%edx) 10e806: 75 0c jne 10e814 _Thread_Enable_dispatch(); 10e808: e8 8c 27 00 00 call 110f99 <_Thread_Enable_dispatch> 10e80d: b8 16 00 00 00 mov $0x16,%eax return EINVAL; 10e812: eb 49 jmp 10e85d <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 10e814: 8b 0d 0c d3 12 00 mov 0x12d30c,%ecx } if ( _Thread_Is_executing( the_thread ) ) { 10e81a: 39 ce cmp %ecx,%esi 10e81c: 75 0c jne 10e82a _Thread_Enable_dispatch(); 10e81e: e8 76 27 00 00 call 110f99 <_Thread_Enable_dispatch> 10e823: b8 2d 00 00 00 mov $0x2d,%eax return EDEADLK; 10e828: eb 33 jmp 10e85d <== ALWAYS TAKEN /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 10e82a: 8d 45 f0 lea -0x10(%ebp),%eax 10e82d: 89 41 28 mov %eax,0x28(%ecx) 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; 10e830: c7 42 6c 01 00 00 00 movl $0x1,0x6c(%edx) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 10e837: 50 push %eax 10e838: 68 e8 16 11 00 push $0x1116e8 10e83d: 6a 00 push $0x0 10e83f: 83 c2 3c add $0x3c,%edx 10e842: 52 push %edx 10e843: e8 e4 2b 00 00 call 11142c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10e848: e8 4c 27 00 00 call 110f99 <_Thread_Enable_dispatch> if ( value_ptr ) 10e84d: 83 c4 10 add $0x10,%esp 10e850: 31 c0 xor %eax,%eax 10e852: 85 db test %ebx,%ebx 10e854: 74 07 je 10e85d *value_ptr = return_pointer; 10e856: 8b 45 f0 mov -0x10(%ebp),%eax 10e859: 89 03 mov %eax,(%ebx) 10e85b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10e85d: 8d 65 f8 lea -0x8(%ebp),%esp 10e860: 5b pop %ebx 10e861: 5e pop %esi 10e862: c9 leave 10e863: c3 ret 00109e4c : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 109e4c: 55 push %ebp 109e4d: 89 e5 mov %esp,%ebp 109e4f: 57 push %edi 109e50: 56 push %esi 109e51: 53 push %ebx 109e52: 83 ec 28 sub $0x28,%esp 109e55: a1 3c 62 12 00 mov 0x12623c,%eax 109e5a: 40 inc %eax 109e5b: a3 3c 62 12 00 mov %eax,0x12623c * 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 ); 109e60: 68 7c 66 12 00 push $0x12667c 109e65: e8 a2 1e 00 00 call 10bd0c <_Objects_Allocate> 109e6a: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 109e6c: 83 c4 10 add $0x10,%esp 109e6f: 85 c0 test %eax,%eax 109e71: 75 0f jne 109e82 _Thread_Enable_dispatch(); 109e73: e8 99 2a 00 00 call 10c911 <_Thread_Enable_dispatch> 109e78: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 109e7d: e9 b4 00 00 00 jmp 109f36 <== ALWAYS TAKEN } the_key->destructor = destructor; 109e82: 8b 45 0c mov 0xc(%ebp),%eax 109e85: 89 43 10 mov %eax,0x10(%ebx) 109e88: be 01 00 00 00 mov $0x1,%esi for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 109e8d: 8b 04 b5 10 62 12 00 mov 0x126210(,%esi,4),%eax 109e94: 85 c0 test %eax,%eax 109e96: 74 6a je 109f02 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 109e98: 8b 40 04 mov 0x4(%eax),%eax 109e9b: 0f b7 40 10 movzwl 0x10(%eax),%eax 109e9f: 8d 0c 85 04 00 00 00 lea 0x4(,%eax,4),%ecx (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 109ea6: 83 ec 0c sub $0xc,%esp 109ea9: 51 push %ecx 109eaa: 89 4d e4 mov %ecx,-0x1c(%ebp) 109ead: e8 1a 3b 00 00 call 10d9cc <_Workspace_Allocate> if ( !table ) { 109eb2: 83 c4 10 add $0x10,%esp 109eb5: 85 c0 test %eax,%eax 109eb7: 8b 4d e4 mov -0x1c(%ebp),%ecx 109eba: 75 3a jne 109ef6 for ( --the_api; 109ebc: 8d 7e ff lea -0x1(%esi),%edi 109ebf: 8d 74 b3 10 lea 0x10(%ebx,%esi,4),%esi 109ec3: eb 11 jmp 109ed6 <== ALWAYS TAKEN the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 109ec5: 83 ec 0c sub $0xc,%esp 109ec8: ff 36 pushl (%esi) 109eca: e8 16 3b 00 00 call 10d9e5 <_Workspace_Free> (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 109ecf: 4f dec %edi 109ed0: 83 ee 04 sub $0x4,%esi 109ed3: 83 c4 10 add $0x10,%esp #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; 109ed6: 85 ff test %edi,%edi 109ed8: 75 eb jne 109ec5 */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 109eda: 50 push %eax 109edb: 50 push %eax 109edc: 53 push %ebx 109edd: 68 7c 66 12 00 push $0x12667c 109ee2: e8 11 21 00 00 call 10bff8 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 109ee7: e8 25 2a 00 00 call 10c911 <_Thread_Enable_dispatch> 109eec: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 109ef1: 83 c4 10 add $0x10,%esp 109ef4: eb 40 jmp 109f36 <== ALWAYS TAKEN } the_key->Values[ the_api ] = table; 109ef6: 89 44 b3 14 mov %eax,0x14(%ebx,%esi,4) memset( table, '\0', bytes_to_allocate ); 109efa: 89 c7 mov %eax,%edi 109efc: 31 c0 xor %eax,%eax 109efe: f3 aa rep stos %al,%es:(%edi) 109f00: eb 08 jmp 109f0a <== ALWAYS TAKEN } else { the_key->Values[ the_api ] = NULL; 109f02: c7 44 b3 14 00 00 00 movl $0x0,0x14(%ebx,%esi,4) 109f09: 00 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 109f0a: 46 inc %esi * This is a bit more complex than one might initially expect because * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; 109f0b: 83 fe 05 cmp $0x5,%esi 109f0e: 0f 85 79 ff ff ff jne 109e8d #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 109f14: 8b 43 08 mov 0x8(%ebx),%eax 109f17: 0f b7 c8 movzwl %ax,%ecx 109f1a: 8b 15 98 66 12 00 mov 0x126698,%edx 109f20: 89 1c 8a mov %ebx,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 109f23: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 109f2a: 8b 55 08 mov 0x8(%ebp),%edx 109f2d: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 109f2f: e8 dd 29 00 00 call 10c911 <_Thread_Enable_dispatch> 109f34: 31 c0 xor %eax,%eax return 0; } 109f36: 8d 65 f4 lea -0xc(%ebp),%esp 109f39: 5b pop %ebx 109f3a: 5e pop %esi 109f3b: 5f pop %edi 109f3c: c9 leave 109f3d: c3 ret 00111398 : int pthread_kill( pthread_t thread, int sig ) { 111398: 55 push %ebp 111399: 89 e5 mov %esp,%ebp 11139b: 57 push %edi 11139c: 56 push %esi 11139d: 53 push %ebx 11139e: 83 ec 1c sub $0x1c,%esp 1113a1: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1113a4: 85 f6 test %esi,%esi 1113a6: 74 08 je 1113b0 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1113a8: 8d 7e ff lea -0x1(%esi),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1113ab: 83 ff 1f cmp $0x1f,%edi 1113ae: 76 0d jbe 1113bd rtems_set_errno_and_return_minus_one( EINVAL ); 1113b0: e8 0f 01 00 00 call 1114c4 <__errno> 1113b5: c7 00 16 00 00 00 movl $0x16,(%eax) 1113bb: eb 7b jmp 111438 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 1113bd: 52 push %edx 1113be: 8d 45 e4 lea -0x1c(%ebp),%eax 1113c1: 50 push %eax 1113c2: ff 75 08 pushl 0x8(%ebp) 1113c5: 68 54 44 12 00 push $0x124454 1113ca: e8 31 a0 ff ff call 10b400 <_Objects_Get> 1113cf: 89 c3 mov %eax,%ebx the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 1113d1: 83 c4 10 add $0x10,%esp 1113d4: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1113d8: 75 53 jne 11142d case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1113da: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1113e0: 6b c6 0c imul $0xc,%esi,%eax 1113e3: 83 b8 54 47 12 00 01 cmpl $0x1,0x124754(%eax) 1113ea: 74 38 je 111424 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 1113ec: b8 01 00 00 00 mov $0x1,%eax 1113f1: 89 f9 mov %edi,%ecx 1113f3: d3 e0 shl %cl,%eax 1113f5: 09 82 c8 00 00 00 or %eax,0xc8(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 1113fb: 50 push %eax 1113fc: 6a 00 push $0x0 1113fe: 56 push %esi 1113ff: 53 push %ebx 111400: e8 9b fe ff ff call 1112a0 <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 111405: c6 43 74 01 movb $0x1,0x74(%ebx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 111409: a1 84 42 12 00 mov 0x124284,%eax 11140e: 83 c4 10 add $0x10,%esp 111411: 85 c0 test %eax,%eax 111413: 74 0f je 111424 111415: 3b 1d a8 42 12 00 cmp 0x1242a8,%ebx 11141b: 75 07 jne 111424 _ISR_Signals_to_thread_executing = true; 11141d: c6 05 3c 43 12 00 01 movb $0x1,0x12433c } _Thread_Enable_dispatch(); 111424: e8 c8 a7 ff ff call 10bbf1 <_Thread_Enable_dispatch> 111429: 31 c0 xor %eax,%eax return 0; 11142b: eb 0e jmp 11143b <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 11142d: e8 92 00 00 00 call 1114c4 <__errno> 111432: c7 00 03 00 00 00 movl $0x3,(%eax) 111438: 83 c8 ff or $0xffffffff,%eax } 11143b: 8d 65 f4 lea -0xc(%ebp),%esp 11143e: 5b pop %ebx 11143f: 5e pop %esi 111440: 5f pop %edi 111441: c9 leave 111442: c3 ret 0010b9e8 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10b9e8: 55 push %ebp 10b9e9: 89 e5 mov %esp,%ebp 10b9eb: 53 push %ebx 10b9ec: 83 ec 1c sub $0x1c,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10b9ef: 8d 45 f4 lea -0xc(%ebp),%eax 10b9f2: 50 push %eax 10b9f3: ff 75 08 pushl 0x8(%ebp) 10b9f6: e8 a6 00 00 00 call 10baa1 <_POSIX_Mutex_Get> <== ALWAYS TAKEN 10b9fb: 89 c3 mov %eax,%ebx switch ( location ) { 10b9fd: 83 c4 10 add $0x10,%esp 10ba00: b8 16 00 00 00 mov $0x16,%eax 10ba05: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ba09: 75 46 jne 10ba51 /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 10ba0b: 83 7b 64 00 cmpl $0x0,0x64(%ebx) 10ba0f: 75 0c jne 10ba1d _Thread_Enable_dispatch(); 10ba11: e8 37 2f 00 00 call 10e94d <_Thread_Enable_dispatch> 10ba16: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10ba1b: eb 34 jmp 10ba51 <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 10ba1d: 51 push %ecx 10ba1e: 51 push %ecx 10ba1f: 53 push %ebx 10ba20: 68 e4 95 12 00 push $0x1295e4 10ba25: e8 8a 23 00 00 call 10ddb4 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10ba2a: 83 c4 0c add $0xc,%esp 10ba2d: 6a 16 push $0x16 10ba2f: 6a 00 push $0x0 10ba31: 8d 43 14 lea 0x14(%ebx),%eax 10ba34: 50 push %eax 10ba35: e8 3a 1b 00 00 call 10d574 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 10ba3a: 58 pop %eax 10ba3b: 5a pop %edx 10ba3c: 53 push %ebx 10ba3d: 68 e4 95 12 00 push $0x1295e4 10ba42: e8 ed 25 00 00 call 10e034 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10ba47: e8 01 2f 00 00 call 10e94d <_Thread_Enable_dispatch> 10ba4c: 31 c0 xor %eax,%eax return 0; 10ba4e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10ba51: 8b 5d fc mov -0x4(%ebp),%ebx 10ba54: c9 leave 10ba55: c3 ret 0010bae8 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10bae8: 55 push %ebp 10bae9: 89 e5 mov %esp,%ebp 10baeb: 53 push %ebx 10baec: 83 ec 14 sub $0x14,%esp 10baef: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10baf2: 85 db test %ebx,%ebx 10baf4: 74 2c je 10bb22 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10baf6: 50 push %eax 10baf7: 50 push %eax 10baf8: 8d 45 f4 lea -0xc(%ebp),%eax 10bafb: 50 push %eax 10bafc: ff 75 08 pushl 0x8(%ebp) 10baff: e8 9d ff ff ff call 10baa1 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10bb04: 83 c4 10 add $0x10,%esp 10bb07: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bb0b: 75 15 jne 10bb22 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 10bb0d: 0f b6 15 18 52 12 00 movzbl 0x125218,%edx 10bb14: 2b 50 60 sub 0x60(%eax),%edx 10bb17: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10bb19: e8 2f 2e 00 00 call 10e94d <_Thread_Enable_dispatch> 10bb1e: 31 c0 xor %eax,%eax return 0; 10bb20: eb 05 jmp 10bb27 <== ALWAYS TAKEN 10bb22: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bb27: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2a: c9 leave 10bb2b: c3 ret 0010bb2c : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10bb2c: 55 push %ebp 10bb2d: 89 e5 mov %esp,%ebp 10bb2f: 57 push %edi 10bb30: 56 push %esi 10bb31: 53 push %ebx 10bb32: 83 ec 0c sub $0xc,%esp 10bb35: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Mutex_Control *the_mutex; CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr; 10bb38: be 64 96 12 00 mov $0x129664,%esi 10bb3d: 85 c0 test %eax,%eax 10bb3f: 74 02 je 10bb43 10bb41: 89 c6 mov %eax,%esi else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10bb43: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10bb47: 0f 84 f0 00 00 00 je 10bc3d } } } #endif if ( !the_attr->is_initialized ) 10bb4d: 83 3e 00 cmpl $0x0,(%esi) 10bb50: 0f 84 e7 00 00 00 je 10bc3d return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10bb56: 8b 56 04 mov 0x4(%esi),%edx 10bb59: b8 58 00 00 00 mov $0x58,%eax 10bb5e: 83 fa 01 cmp $0x1,%edx 10bb61: 0f 84 db 00 00 00 je 10bc42 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10bb67: 85 d2 test %edx,%edx 10bb69: 0f 85 ce 00 00 00 jne 10bc3d return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10bb6f: 8b 46 0c mov 0xc(%esi),%eax 10bb72: 83 f8 01 cmp $0x1,%eax 10bb75: 74 10 je 10bb87 10bb77: 83 f8 02 cmp $0x2,%eax 10bb7a: 74 12 je 10bb8e 10bb7c: 31 ff xor %edi,%edi 10bb7e: 85 c0 test %eax,%eax 10bb80: 74 11 je 10bb93 10bb82: e9 b6 00 00 00 jmp 10bc3d <== ALWAYS TAKEN 10bb87: bf 02 00 00 00 mov $0x2,%edi 10bb8c: eb 05 jmp 10bb93 <== ALWAYS TAKEN 10bb8e: bf 03 00 00 00 mov $0x3,%edi } /* * Validate the priority ceiling field -- should always be valid. */ if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 10bb93: 83 ec 0c sub $0xc,%esp 10bb96: ff 76 08 pushl 0x8(%esi) 10bb99: e8 be 02 00 00 call 10be5c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10bb9e: 83 c4 10 add $0x10,%esp 10bba1: 84 c0 test %al,%al 10bba3: 0f 84 94 00 00 00 je 10bc3d #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10bba9: 83 7e 10 03 cmpl $0x3,0x10(%esi) 10bbad: 0f 87 8a 00 00 00 ja 10bc3d 10bbb3: a1 3c 92 12 00 mov 0x12923c,%eax 10bbb8: 40 inc %eax 10bbb9: a3 3c 92 12 00 mov %eax,0x12923c * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10bbbe: 83 ec 0c sub $0xc,%esp 10bbc1: 68 e4 95 12 00 push $0x1295e4 10bbc6: e8 7d 21 00 00 call 10dd48 <_Objects_Allocate> 10bbcb: 89 c3 mov %eax,%ebx */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10bbcd: 83 c4 10 add $0x10,%esp 10bbd0: 85 c0 test %eax,%eax 10bbd2: 75 0c jne 10bbe0 _Thread_Enable_dispatch(); 10bbd4: e8 74 2d 00 00 call 10e94d <_Thread_Enable_dispatch> 10bbd9: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10bbde: eb 62 jmp 10bc42 <== ALWAYS TAKEN } the_mutex->process_shared = the_attr->process_shared; 10bbe0: 8b 46 04 mov 0x4(%esi),%eax 10bbe3: 89 43 10 mov %eax,0x10(%ebx) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10bbe6: 31 c0 xor %eax,%eax 10bbe8: 83 7e 14 00 cmpl $0x0,0x14(%esi) 10bbec: 0f 94 c0 sete %al 10bbef: 89 43 54 mov %eax,0x54(%ebx) else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 10bbf2: c6 43 58 01 movb $0x1,0x58(%ebx) the_mutex_attr->priority_ceiling = 10bbf6: 0f b6 05 18 52 12 00 movzbl 0x125218,%eax 10bbfd: 2b 46 08 sub 0x8(%esi),%eax 10bc00: 89 43 60 mov %eax,0x60(%ebx) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10bc03: 89 7b 5c mov %edi,0x5c(%ebx) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10bc06: 50 push %eax 10bc07: 6a 01 push $0x1 10bc09: 8d 43 54 lea 0x54(%ebx),%eax 10bc0c: 50 push %eax 10bc0d: 8d 43 14 lea 0x14(%ebx),%eax 10bc10: 50 push %eax 10bc11: e8 6a 19 00 00 call 10d580 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bc16: 8b 43 08 mov 0x8(%ebx),%eax 10bc19: 0f b7 c8 movzwl %ax,%ecx 10bc1c: 8b 15 00 96 12 00 mov 0x129600,%edx 10bc22: 89 1c 8a mov %ebx,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10bc25: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 10bc2c: 8b 55 08 mov 0x8(%ebp),%edx 10bc2f: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10bc31: e8 17 2d 00 00 call 10e94d <_Thread_Enable_dispatch> 10bc36: 31 c0 xor %eax,%eax return 0; 10bc38: 83 c4 10 add $0x10,%esp 10bc3b: eb 05 jmp 10bc42 <== ALWAYS TAKEN 10bc3d: b8 16 00 00 00 mov $0x16,%eax } 10bc42: 8d 65 f4 lea -0xc(%ebp),%esp 10bc45: 5b pop %ebx 10bc46: 5e pop %esi 10bc47: 5f pop %edi 10bc48: c9 leave 10bc49: c3 ret 0010bc4c : */ int pthread_mutex_lock( pthread_mutex_t *mutex ) { 10bc4c: 55 push %ebp 10bc4d: 89 e5 mov %esp,%ebp 10bc4f: 83 ec 0c sub $0xc,%esp return _POSIX_Mutex_Lock_support( mutex, true, THREAD_QUEUE_WAIT_FOREVER ); 10bc52: 6a 00 push $0x0 10bc54: 6a 01 push $0x1 10bc56: ff 75 08 pushl 0x8(%ebp) 10bc59: e8 02 00 00 00 call 10bc60 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN } 10bc5e: c9 leave 10bc5f: c3 ret 0010bcbc : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10bcbc: 55 push %ebp 10bcbd: 89 e5 mov %esp,%ebp 10bcbf: 57 push %edi 10bcc0: 56 push %esi 10bcc1: 53 push %ebx 10bcc2: 83 ec 2c sub $0x2c,%esp 10bcc5: 8b 7d 08 mov 0x8(%ebp),%edi 10bcc8: 8b 5d 0c mov 0xc(%ebp),%ebx 10bccb: 8b 75 10 mov 0x10(%ebp),%esi register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10bcce: 85 f6 test %esi,%esi 10bcd0: 74 66 je 10bd38 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10bcd2: 83 ec 0c sub $0xc,%esp 10bcd5: 53 push %ebx 10bcd6: e8 81 01 00 00 call 10be5c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10bcdb: 83 c4 10 add $0x10,%esp 10bcde: 84 c0 test %al,%al 10bce0: 74 56 je 10bd38 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10bce2: a0 18 52 12 00 mov 0x125218,%al 10bce7: 88 45 d7 mov %al,-0x29(%ebp) /* * Must acquire the mutex before we can change it's ceiling. * POSIX says block until we acquire it. */ (void) pthread_mutex_lock( mutex ); 10bcea: 83 ec 0c sub $0xc,%esp 10bced: 57 push %edi 10bcee: e8 59 ff ff ff call 10bc4c <== ALWAYS TAKEN * 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 ); 10bcf3: 59 pop %ecx 10bcf4: 58 pop %eax 10bcf5: 8d 45 e4 lea -0x1c(%ebp),%eax 10bcf8: 50 push %eax 10bcf9: 57 push %edi 10bcfa: e8 a2 fd ff ff call 10baa1 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10bcff: 83 c4 10 add $0x10,%esp 10bd02: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10bd06: 75 30 jne 10bd38 case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 10bd08: 0f b6 15 18 52 12 00 movzbl 0x125218,%edx 10bd0f: 2b 50 60 sub 0x60(%eax),%edx 10bd12: 89 16 mov %edx,(%esi) the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 10bd14: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10bd18: 29 da sub %ebx,%edx 10bd1a: 89 50 60 mov %edx,0x60(%eax) /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 10bd1d: 52 push %edx 10bd1e: 6a 00 push $0x0 10bd20: ff 70 08 pushl 0x8(%eax) 10bd23: 83 c0 14 add $0x14,%eax 10bd26: 50 push %eax 10bd27: e8 d4 19 00 00 call 10d700 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10bd2c: e8 1c 2c 00 00 call 10e94d <_Thread_Enable_dispatch> 10bd31: 31 c0 xor %eax,%eax return 0; 10bd33: 83 c4 10 add $0x10,%esp 10bd36: eb 05 jmp 10bd3d <== ALWAYS TAKEN 10bd38: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bd3d: 8d 65 f4 lea -0xc(%ebp),%esp 10bd40: 5b pop %ebx 10bd41: 5e pop %esi 10bd42: 5f pop %edi 10bd43: c9 leave 10bd44: c3 ret 0010bd48 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10bd48: 55 push %ebp 10bd49: 89 e5 mov %esp,%ebp 10bd4b: 83 ec 20 sub $0x20,%esp * * 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 ); 10bd4e: 8d 45 f4 lea -0xc(%ebp),%eax 10bd51: 50 push %eax 10bd52: ff 75 0c pushl 0xc(%ebp) 10bd55: e8 8a 00 00 00 call 10bde4 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10bd5a: 83 c4 0c add $0xc,%esp 10bd5d: ff 75 f4 pushl -0xc(%ebp) 10bd60: 83 f8 03 cmp $0x3,%eax 10bd63: 0f 94 c0 sete %al 10bd66: 0f b6 c0 movzbl %al,%eax 10bd69: 50 push %eax 10bd6a: ff 75 08 pushl 0x8(%ebp) 10bd6d: e8 ee fe ff ff call 10bc60 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN break; } } return lock_status; } 10bd72: c9 leave 10bd73: c3 ret 0010bd84 : */ int pthread_mutex_trylock( pthread_mutex_t *mutex ) { 10bd84: 55 push %ebp 10bd85: 89 e5 mov %esp,%ebp 10bd87: 83 ec 0c sub $0xc,%esp return _POSIX_Mutex_Lock_support( mutex, false, THREAD_QUEUE_WAIT_FOREVER ); 10bd8a: 6a 00 push $0x0 10bd8c: 6a 00 push $0x0 10bd8e: ff 75 08 pushl 0x8(%ebp) 10bd91: e8 ca fe ff ff call 10bc60 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN } 10bd96: c9 leave 10bd97: c3 ret 0010bd98 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10bd98: 55 push %ebp 10bd99: 89 e5 mov %esp,%ebp 10bd9b: 53 push %ebx 10bd9c: 83 ec 1c sub $0x1c,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10bd9f: 8d 45 f4 lea -0xc(%ebp),%eax 10bda2: 50 push %eax 10bda3: ff 75 08 pushl 0x8(%ebp) 10bda6: e8 f6 fc ff ff call 10baa1 <_POSIX_Mutex_Get> <== ALWAYS TAKEN 10bdab: 89 c2 mov %eax,%edx switch ( location ) { 10bdad: 83 c4 10 add $0x10,%esp 10bdb0: b8 16 00 00 00 mov $0x16,%eax 10bdb5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bdb9: 75 21 jne 10bddc case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10bdbb: 50 push %eax 10bdbc: 6a 00 push $0x0 10bdbe: ff 72 08 pushl 0x8(%edx) 10bdc1: 83 c2 14 add $0x14,%edx 10bdc4: 52 push %edx 10bdc5: e8 36 19 00 00 call 10d700 <_CORE_mutex_Surrender> 10bdca: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10bdcc: e8 7c 2b 00 00 call 10e94d <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10bdd1: 89 1c 24 mov %ebx,(%esp) 10bdd4: e8 9b ff ff ff call 10bd74 <_POSIX_Mutex_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10bdd9: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10bddc: 8b 5d fc mov -0x4(%ebp),%ebx 10bddf: c9 leave 10bde0: c3 ret 0010b8a0 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10b8a0: 55 push %ebp 10b8a1: 89 e5 mov %esp,%ebp 10b8a3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10b8a6: 85 c0 test %eax,%eax 10b8a8: 74 0f je 10b8b9 10b8aa: 83 38 00 cmpl $0x0,(%eax) 10b8ad: 74 0a je 10b8b9 return EINVAL; attr->is_initialized = false; 10b8af: c7 00 00 00 00 00 movl $0x0,(%eax) 10b8b5: 31 c0 xor %eax,%eax return 0; 10b8b7: eb 05 jmp 10b8be <== ALWAYS TAKEN 10b8b9: b8 16 00 00 00 mov $0x16,%eax } 10b8be: c9 leave 10b8bf: c3 ret 0010b8c0 : int pthread_mutexattr_getprioceiling( const pthread_mutexattr_t *attr, int *prioceiling ) { 10b8c0: 55 push %ebp 10b8c1: 89 e5 mov %esp,%ebp 10b8c3: 8b 45 08 mov 0x8(%ebp),%eax 10b8c6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !prioceiling ) 10b8c9: 85 c0 test %eax,%eax 10b8cb: 74 12 je 10b8df 10b8cd: 85 d2 test %edx,%edx 10b8cf: 74 0e je 10b8df 10b8d1: 83 38 00 cmpl $0x0,(%eax) 10b8d4: 74 09 je 10b8df return EINVAL; *prioceiling = attr->prio_ceiling; 10b8d6: 8b 40 08 mov 0x8(%eax),%eax 10b8d9: 89 02 mov %eax,(%edx) 10b8db: 31 c0 xor %eax,%eax return 0; 10b8dd: eb 05 jmp 10b8e4 <== ALWAYS TAKEN 10b8df: b8 16 00 00 00 mov $0x16,%eax } 10b8e4: c9 leave 10b8e5: c3 ret 0010b8e8 : int pthread_mutexattr_getprotocol( const pthread_mutexattr_t *attr, int *protocol ) { 10b8e8: 55 push %ebp 10b8e9: 89 e5 mov %esp,%ebp 10b8eb: 8b 45 08 mov 0x8(%ebp),%eax 10b8ee: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !protocol ) 10b8f1: 85 c0 test %eax,%eax 10b8f3: 74 12 je 10b907 10b8f5: 85 d2 test %edx,%edx 10b8f7: 74 0e je 10b907 10b8f9: 83 38 00 cmpl $0x0,(%eax) 10b8fc: 74 09 je 10b907 return EINVAL; *protocol = attr->protocol; 10b8fe: 8b 40 0c mov 0xc(%eax),%eax 10b901: 89 02 mov %eax,(%edx) 10b903: 31 c0 xor %eax,%eax return 0; 10b905: eb 05 jmp 10b90c <== ALWAYS TAKEN 10b907: b8 16 00 00 00 mov $0x16,%eax } 10b90c: c9 leave 10b90d: c3 ret 0010b910 : int pthread_mutexattr_getpshared( const pthread_mutexattr_t *attr, int *pshared ) { 10b910: 55 push %ebp 10b911: 89 e5 mov %esp,%ebp 10b913: 8b 45 08 mov 0x8(%ebp),%eax 10b916: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !pshared ) 10b919: 85 c0 test %eax,%eax 10b91b: 74 12 je 10b92f 10b91d: 85 d2 test %edx,%edx 10b91f: 74 0e je 10b92f 10b921: 83 38 00 cmpl $0x0,(%eax) 10b924: 74 09 je 10b92f return EINVAL; *pshared = attr->process_shared; 10b926: 8b 40 04 mov 0x4(%eax),%eax 10b929: 89 02 mov %eax,(%edx) 10b92b: 31 c0 xor %eax,%eax return 0; 10b92d: eb 05 jmp 10b934 <== ALWAYS TAKEN 10b92f: b8 16 00 00 00 mov $0x16,%eax } 10b934: c9 leave 10b935: c3 ret 00109b28 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 109b28: 55 push %ebp 109b29: 89 e5 mov %esp,%ebp 109b2b: 8b 45 08 mov 0x8(%ebp),%eax 109b2e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 109b31: 85 c0 test %eax,%eax 109b33: 74 12 je 109b47 return EINVAL; if ( !attr->is_initialized ) 109b35: 83 38 00 cmpl $0x0,(%eax) 109b38: 74 0d je 109b47 return EINVAL; if ( !type ) 109b3a: 85 d2 test %edx,%edx 109b3c: 74 09 je 109b47 <== ALWAYS TAKEN return EINVAL; *type = attr->type; 109b3e: 8b 40 10 mov 0x10(%eax),%eax 109b41: 89 02 mov %eax,(%edx) 109b43: 31 c0 xor %eax,%eax return 0; 109b45: eb 05 jmp 109b4c <== ALWAYS TAKEN 109b47: b8 16 00 00 00 mov $0x16,%eax } 109b4c: c9 leave 109b4d: c3 ret 0010b960 : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10b960: 55 push %ebp 10b961: 89 e5 mov %esp,%ebp 10b963: 56 push %esi 10b964: 53 push %ebx 10b965: 8b 5d 08 mov 0x8(%ebp),%ebx 10b968: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10b96b: 85 db test %ebx,%ebx 10b96d: 74 1c je 10b98b 10b96f: 83 3b 00 cmpl $0x0,(%ebx) 10b972: 74 17 je 10b98b return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10b974: 83 ec 0c sub $0xc,%esp 10b977: 56 push %esi 10b978: e8 df 04 00 00 call 10be5c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10b97d: 83 c4 10 add $0x10,%esp 10b980: 84 c0 test %al,%al 10b982: 74 07 je 10b98b return EINVAL; attr->prio_ceiling = prioceiling; 10b984: 89 73 08 mov %esi,0x8(%ebx) 10b987: 31 c0 xor %eax,%eax return 0; 10b989: eb 05 jmp 10b990 <== ALWAYS TAKEN 10b98b: b8 16 00 00 00 mov $0x16,%eax } 10b990: 8d 65 f8 lea -0x8(%ebp),%esp 10b993: 5b pop %ebx 10b994: 5e pop %esi 10b995: c9 leave 10b996: c3 ret 0010b998 : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10b998: 55 push %ebp 10b999: 89 e5 mov %esp,%ebp 10b99b: 8b 45 08 mov 0x8(%ebp),%eax 10b99e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b9a1: 85 c0 test %eax,%eax 10b9a3: 74 11 je 10b9b6 10b9a5: 83 38 00 cmpl $0x0,(%eax) 10b9a8: 74 0c je 10b9b6 return EINVAL; switch ( protocol ) { 10b9aa: 83 fa 02 cmp $0x2,%edx 10b9ad: 77 07 ja 10b9b6 case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10b9af: 89 50 0c mov %edx,0xc(%eax) 10b9b2: 31 c0 xor %eax,%eax return 0; 10b9b4: eb 05 jmp 10b9bb <== ALWAYS TAKEN 10b9b6: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b9bb: c9 leave 10b9bc: c3 ret 0010b9c0 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10b9c0: 55 push %ebp 10b9c1: 89 e5 mov %esp,%ebp 10b9c3: 8b 45 08 mov 0x8(%ebp),%eax 10b9c6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b9c9: 85 c0 test %eax,%eax 10b9cb: 74 11 je 10b9de 10b9cd: 83 38 00 cmpl $0x0,(%eax) 10b9d0: 74 0c je 10b9de return EINVAL; switch ( pshared ) { 10b9d2: 83 fa 01 cmp $0x1,%edx 10b9d5: 77 07 ja 10b9de <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b9d7: 89 50 04 mov %edx,0x4(%eax) 10b9da: 31 c0 xor %eax,%eax return 0; 10b9dc: eb 05 jmp 10b9e3 <== ALWAYS TAKEN 10b9de: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b9e3: c9 leave 10b9e4: c3 ret 00109b78 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 109b78: 55 push %ebp 109b79: 89 e5 mov %esp,%ebp 109b7b: 8b 45 08 mov 0x8(%ebp),%eax 109b7e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 109b81: 85 c0 test %eax,%eax 109b83: 74 11 je 109b96 109b85: 83 38 00 cmpl $0x0,(%eax) 109b88: 74 0c je 109b96 <== ALWAYS TAKEN return EINVAL; switch ( type ) { 109b8a: 83 fa 03 cmp $0x3,%edx 109b8d: 77 07 ja 109b96 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 109b8f: 89 50 10 mov %edx,0x10(%eax) 109b92: 31 c0 xor %eax,%eax return 0; 109b94: eb 05 jmp 109b9b <== ALWAYS TAKEN 109b96: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 109b9b: c9 leave 109b9c: c3 ret 0010a5dc : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10a5dc: 55 push %ebp 10a5dd: 89 e5 mov %esp,%ebp 10a5df: 56 push %esi 10a5e0: 53 push %ebx 10a5e1: 83 ec 10 sub $0x10,%esp 10a5e4: 8b 5d 08 mov 0x8(%ebp),%ebx 10a5e7: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10a5ea: 85 f6 test %esi,%esi 10a5ec: 74 04 je 10a5f2 10a5ee: 85 db test %ebx,%ebx 10a5f0: 75 07 jne 10a5f9 10a5f2: b8 16 00 00 00 mov $0x16,%eax 10a5f7: eb 4b jmp 10a644 <== ALWAYS TAKEN return EINVAL; if ( !once_control->init_executed ) { 10a5f9: 31 c0 xor %eax,%eax 10a5fb: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a5ff: 75 43 jne 10a644 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10a601: 52 push %edx 10a602: 8d 45 f4 lea -0xc(%ebp),%eax 10a605: 50 push %eax 10a606: 68 00 01 00 00 push $0x100 10a60b: 68 00 01 00 00 push $0x100 10a610: e8 7b 0a 00 00 call 10b090 if ( !once_control->init_executed ) { 10a615: 83 c4 10 add $0x10,%esp 10a618: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a61c: 75 0f jne 10a62d <== ALWAYS TAKEN once_control->is_initialized = true; 10a61e: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10a624: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10a62b: ff d6 call *%esi } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10a62d: 50 push %eax 10a62e: 8d 45 f4 lea -0xc(%ebp),%eax 10a631: 50 push %eax 10a632: 68 00 01 00 00 push $0x100 10a637: ff 75 f4 pushl -0xc(%ebp) 10a63a: e8 51 0a 00 00 call 10b090 10a63f: 31 c0 xor %eax,%eax 10a641: 83 c4 10 add $0x10,%esp } return 0; } 10a644: 8d 65 f8 lea -0x8(%ebp),%esp 10a647: 5b pop %ebx 10a648: 5e pop %esi 10a649: c9 leave 10a64a: c3 ret 0010ab64 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10ab64: 55 push %ebp 10ab65: 89 e5 mov %esp,%ebp 10ab67: 53 push %ebx 10ab68: 83 ec 14 sub $0x14,%esp 10ab6b: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10ab6e: 85 c0 test %eax,%eax 10ab70: 74 61 je 10abd3 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10ab72: 53 push %ebx 10ab73: 8d 55 f4 lea -0xc(%ebp),%edx 10ab76: 52 push %edx 10ab77: ff 30 pushl (%eax) 10ab79: 68 2c 74 12 00 push $0x12742c 10ab7e: e8 69 27 00 00 call 10d2ec <_Objects_Get> 10ab83: 89 c3 mov %eax,%ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ab85: 83 c4 10 add $0x10,%esp 10ab88: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ab8c: 75 45 jne 10abd3 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 10ab8e: 83 ec 0c sub $0xc,%esp 10ab91: 8d 40 10 lea 0x10(%eax),%eax 10ab94: 50 push %eax 10ab95: e8 ae 36 00 00 call 10e248 <_Thread_queue_First> 10ab9a: 83 c4 10 add $0x10,%esp 10ab9d: 85 c0 test %eax,%eax 10ab9f: 74 0c je 10abad _Thread_Enable_dispatch(); 10aba1: e8 37 2f 00 00 call 10dadd <_Thread_Enable_dispatch> 10aba6: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10abab: eb 2b jmp 10abd8 <== ALWAYS TAKEN /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10abad: 51 push %ecx 10abae: 51 push %ecx 10abaf: 53 push %ebx 10abb0: 68 2c 74 12 00 push $0x12742c 10abb5: e8 8a 23 00 00 call 10cf44 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10abba: 58 pop %eax 10abbb: 5a pop %edx 10abbc: 53 push %ebx 10abbd: 68 2c 74 12 00 push $0x12742c 10abc2: e8 fd 25 00 00 call 10d1c4 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10abc7: e8 11 2f 00 00 call 10dadd <_Thread_Enable_dispatch> 10abcc: 31 c0 xor %eax,%eax return 0; 10abce: 83 c4 10 add $0x10,%esp 10abd1: eb 05 jmp 10abd8 <== ALWAYS TAKEN 10abd3: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10abd8: 8b 5d fc mov -0x4(%ebp),%ebx 10abdb: c9 leave 10abdc: c3 ret 0010abe0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10abe0: 55 push %ebp 10abe1: 89 e5 mov %esp,%ebp 10abe3: 56 push %esi 10abe4: 53 push %ebx 10abe5: 83 ec 10 sub $0x10,%esp 10abe8: 8b 5d 08 mov 0x8(%ebp),%ebx const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10abeb: 85 db test %ebx,%ebx 10abed: 0f 84 81 00 00 00 je 10ac74 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10abf3: 8b 75 0c mov 0xc(%ebp),%esi 10abf6: 85 f6 test %esi,%esi 10abf8: 75 0f jne 10ac09 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10abfa: 83 ec 0c sub $0xc,%esp 10abfd: 8d 75 ec lea -0x14(%ebp),%esi 10ac00: 56 push %esi 10ac01: e8 06 09 00 00 call 10b50c 10ac06: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10ac09: 83 3e 00 cmpl $0x0,(%esi) 10ac0c: 74 66 je 10ac74 <== ALWAYS TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10ac0e: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10ac12: 75 60 jne 10ac74 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ac14: a1 04 72 12 00 mov 0x127204,%eax 10ac19: 40 inc %eax 10ac1a: a3 04 72 12 00 mov %eax,0x127204 * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 10ac1f: 83 ec 0c sub $0xc,%esp 10ac22: 68 2c 74 12 00 push $0x12742c 10ac27: e8 ac 22 00 00 call 10ced8 <_Objects_Allocate> 10ac2c: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10ac2e: 83 c4 10 add $0x10,%esp 10ac31: 85 c0 test %eax,%eax 10ac33: 75 0c jne 10ac41 _Thread_Enable_dispatch(); 10ac35: e8 a3 2e 00 00 call 10dadd <_Thread_Enable_dispatch> 10ac3a: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10ac3f: eb 38 jmp 10ac79 <== ALWAYS TAKEN } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10ac41: 50 push %eax 10ac42: 50 push %eax 10ac43: 8d 45 f4 lea -0xc(%ebp),%eax 10ac46: 50 push %eax 10ac47: 8d 46 10 lea 0x10(%esi),%eax 10ac4a: 50 push %eax 10ac4b: e8 14 1b 00 00 call 10c764 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ac50: 8b 46 08 mov 0x8(%esi),%eax 10ac53: 0f b7 c8 movzwl %ax,%ecx 10ac56: 8b 15 48 74 12 00 mov 0x127448,%edx 10ac5c: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10ac5f: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10ac66: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10ac68: e8 70 2e 00 00 call 10dadd <_Thread_Enable_dispatch> 10ac6d: 31 c0 xor %eax,%eax return 0; 10ac6f: 83 c4 10 add $0x10,%esp 10ac72: eb 05 jmp 10ac79 <== ALWAYS TAKEN 10ac74: b8 16 00 00 00 mov $0x16,%eax } 10ac79: 8d 65 f8 lea -0x8(%ebp),%esp 10ac7c: 5b pop %ebx 10ac7d: 5e pop %esi 10ac7e: c9 leave 10ac7f: c3 ret 0010ac80 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10ac80: 55 push %ebp 10ac81: 89 e5 mov %esp,%ebp 10ac83: 53 push %ebx 10ac84: 83 ec 14 sub $0x14,%esp 10ac87: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10ac8a: 85 db test %ebx,%ebx 10ac8c: 74 4b je 10acd9 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10ac8e: 50 push %eax 10ac8f: 8d 45 f4 lea -0xc(%ebp),%eax 10ac92: 50 push %eax 10ac93: ff 33 pushl (%ebx) 10ac95: 68 2c 74 12 00 push $0x12742c 10ac9a: e8 4d 26 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ac9f: 83 c4 10 add $0x10,%esp 10aca2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aca6: 75 31 jne 10acd9 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10aca8: 83 ec 0c sub $0xc,%esp 10acab: 6a 00 push $0x0 10acad: 6a 00 push $0x0 10acaf: 6a 01 push $0x1 10acb1: ff 33 pushl (%ebx) 10acb3: 83 c0 10 add $0x10,%eax 10acb6: 50 push %eax 10acb7: e8 dc 1a 00 00 call 10c798 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10acbc: 83 c4 20 add $0x20,%esp 10acbf: e8 19 2e 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10acc4: 83 ec 0c sub $0xc,%esp 10acc7: a1 c0 72 12 00 mov 0x1272c0,%eax 10accc: ff 70 34 pushl 0x34(%eax) 10accf: e8 60 01 00 00 call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10acd4: 83 c4 10 add $0x10,%esp 10acd7: eb 05 jmp 10acde <== ALWAYS TAKEN 10acd9: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10acde: 8b 5d fc mov -0x4(%ebp),%ebx 10ace1: c9 leave 10ace2: c3 ret 0010ace4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10ace4: 55 push %ebp 10ace5: 89 e5 mov %esp,%ebp 10ace7: 56 push %esi 10ace8: 53 push %ebx 10ace9: 83 ec 20 sub $0x20,%esp 10acec: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10acef: 85 f6 test %esi,%esi 10acf1: 0f 84 89 00 00 00 je 10ad80 * * 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 ); 10acf7: 50 push %eax 10acf8: 50 push %eax 10acf9: 8d 45 f0 lea -0x10(%ebp),%eax 10acfc: 50 push %eax 10acfd: ff 75 0c pushl 0xc(%ebp) 10ad00: e8 f3 55 00 00 call 1102f8 <_POSIX_Absolute_timeout_to_ticks> 10ad05: 89 c3 mov %eax,%ebx 10ad07: 83 c4 0c add $0xc,%esp 10ad0a: 8d 45 f4 lea -0xc(%ebp),%eax 10ad0d: 50 push %eax 10ad0e: ff 36 pushl (%esi) 10ad10: 68 2c 74 12 00 push $0x12742c 10ad15: e8 d2 25 00 00 call 10d2ec <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ad1a: 83 c4 10 add $0x10,%esp 10ad1d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ad21: 75 5d jne 10ad80 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, 10ad23: 83 fb 03 cmp $0x3,%ebx 10ad26: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10ad29: 83 ec 0c sub $0xc,%esp 10ad2c: 6a 00 push $0x0 10ad2e: ff 75 f0 pushl -0x10(%ebp) 10ad31: 0f b6 ca movzbl %dl,%ecx 10ad34: 51 push %ecx 10ad35: ff 36 pushl (%esi) 10ad37: 83 c0 10 add $0x10,%eax 10ad3a: 50 push %eax 10ad3b: 88 55 e4 mov %dl,-0x1c(%ebp) 10ad3e: e8 55 1a 00 00 call 10c798 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10ad43: 83 c4 20 add $0x20,%esp 10ad46: e8 92 2d 00 00 call 10dadd <_Thread_Enable_dispatch> if ( !do_wait ) { 10ad4b: 8a 55 e4 mov -0x1c(%ebp),%dl 10ad4e: 84 d2 test %dl,%dl 10ad50: 75 19 jne 10ad6b if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10ad52: a1 c0 72 12 00 mov 0x1272c0,%eax 10ad57: 83 78 34 02 cmpl $0x2,0x34(%eax) 10ad5b: 75 0e jne 10ad6b switch (status) { 10ad5d: 85 db test %ebx,%ebx 10ad5f: 74 1f je 10ad80 <== ALWAYS TAKEN 10ad61: b8 74 00 00 00 mov $0x74,%eax 10ad66: 83 fb 02 cmp $0x2,%ebx 10ad69: 76 1a jbe 10ad85 <== NEVER TAKEN break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ad6b: 83 ec 0c sub $0xc,%esp 10ad6e: a1 c0 72 12 00 mov 0x1272c0,%eax 10ad73: ff 70 34 pushl 0x34(%eax) 10ad76: e8 b9 00 00 00 call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10ad7b: 83 c4 10 add $0x10,%esp 10ad7e: eb 05 jmp 10ad85 <== ALWAYS TAKEN 10ad80: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ad85: 8d 65 f8 lea -0x8(%ebp),%esp 10ad88: 5b pop %ebx 10ad89: 5e pop %esi 10ad8a: c9 leave 10ad8b: c3 ret 0010ad8c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10ad8c: 55 push %ebp 10ad8d: 89 e5 mov %esp,%ebp 10ad8f: 56 push %esi 10ad90: 53 push %ebx 10ad91: 83 ec 20 sub $0x20,%esp 10ad94: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10ad97: 85 f6 test %esi,%esi 10ad99: 0f 84 89 00 00 00 je 10ae28 * * 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 ); 10ad9f: 50 push %eax 10ada0: 50 push %eax 10ada1: 8d 45 f0 lea -0x10(%ebp),%eax 10ada4: 50 push %eax 10ada5: ff 75 0c pushl 0xc(%ebp) 10ada8: e8 4b 55 00 00 call 1102f8 <_POSIX_Absolute_timeout_to_ticks> 10adad: 89 c3 mov %eax,%ebx 10adaf: 83 c4 0c add $0xc,%esp 10adb2: 8d 45 f4 lea -0xc(%ebp),%eax 10adb5: 50 push %eax 10adb6: ff 36 pushl (%esi) 10adb8: 68 2c 74 12 00 push $0x12742c 10adbd: e8 2a 25 00 00 call 10d2ec <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10adc2: 83 c4 10 add $0x10,%esp 10adc5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10adc9: 75 5d jne 10ae28 (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, 10adcb: 83 fb 03 cmp $0x3,%ebx 10adce: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10add1: 83 ec 0c sub $0xc,%esp 10add4: 6a 00 push $0x0 10add6: ff 75 f0 pushl -0x10(%ebp) 10add9: 0f b6 ca movzbl %dl,%ecx 10addc: 51 push %ecx 10addd: ff 36 pushl (%esi) 10addf: 83 c0 10 add $0x10,%eax 10ade2: 50 push %eax 10ade3: 88 55 e4 mov %dl,-0x1c(%ebp) 10ade6: e8 65 1a 00 00 call 10c850 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10adeb: 83 c4 20 add $0x20,%esp 10adee: e8 ea 2c 00 00 call 10dadd <_Thread_Enable_dispatch> if ( !do_wait && 10adf3: 8a 55 e4 mov -0x1c(%ebp),%dl 10adf6: 84 d2 test %dl,%dl 10adf8: 75 19 jne 10ae13 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10adfa: a1 c0 72 12 00 mov 0x1272c0,%eax 10adff: 83 78 34 02 cmpl $0x2,0x34(%eax) 10ae03: 75 0e jne 10ae13 switch (status) { 10ae05: 85 db test %ebx,%ebx 10ae07: 74 1f je 10ae28 <== ALWAYS TAKEN 10ae09: b8 74 00 00 00 mov $0x74,%eax 10ae0e: 83 fb 02 cmp $0x2,%ebx 10ae11: 76 1a jbe 10ae2d <== NEVER TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ae13: 83 ec 0c sub $0xc,%esp 10ae16: a1 c0 72 12 00 mov 0x1272c0,%eax 10ae1b: ff 70 34 pushl 0x34(%eax) 10ae1e: e8 11 00 00 00 call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10ae23: 83 c4 10 add $0x10,%esp 10ae26: eb 05 jmp 10ae2d <== ALWAYS TAKEN 10ae28: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ae2d: 8d 65 f8 lea -0x8(%ebp),%esp 10ae30: 5b pop %ebx 10ae31: 5e pop %esi 10ae32: c9 leave 10ae33: c3 ret 0010ae44 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10ae44: 55 push %ebp 10ae45: 89 e5 mov %esp,%ebp 10ae47: 53 push %ebx 10ae48: 83 ec 14 sub $0x14,%esp 10ae4b: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10ae4e: 85 db test %ebx,%ebx 10ae50: 74 4b je 10ae9d 10ae52: 50 push %eax 10ae53: 8d 45 f4 lea -0xc(%ebp),%eax 10ae56: 50 push %eax 10ae57: ff 33 pushl (%ebx) 10ae59: 68 2c 74 12 00 push $0x12742c 10ae5e: e8 89 24 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ae63: 83 c4 10 add $0x10,%esp 10ae66: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ae6a: 75 31 jne 10ae9d case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10ae6c: 83 ec 0c sub $0xc,%esp 10ae6f: 6a 00 push $0x0 10ae71: 6a 00 push $0x0 10ae73: 6a 00 push $0x0 10ae75: ff 33 pushl (%ebx) 10ae77: 83 c0 10 add $0x10,%eax 10ae7a: 50 push %eax 10ae7b: e8 18 19 00 00 call 10c798 <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10ae80: 83 c4 20 add $0x20,%esp 10ae83: e8 55 2c 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ae88: 83 ec 0c sub $0xc,%esp 10ae8b: a1 c0 72 12 00 mov 0x1272c0,%eax 10ae90: ff 70 34 pushl 0x34(%eax) 10ae93: e8 9c ff ff ff call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10ae98: 83 c4 10 add $0x10,%esp 10ae9b: eb 05 jmp 10aea2 <== ALWAYS TAKEN 10ae9d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10aea2: 8b 5d fc mov -0x4(%ebp),%ebx 10aea5: c9 leave 10aea6: c3 ret 0010aea8 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10aea8: 55 push %ebp 10aea9: 89 e5 mov %esp,%ebp 10aeab: 53 push %ebx 10aeac: 83 ec 14 sub $0x14,%esp 10aeaf: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10aeb2: 85 db test %ebx,%ebx 10aeb4: 74 4b je 10af01 10aeb6: 50 push %eax 10aeb7: 8d 45 f4 lea -0xc(%ebp),%eax 10aeba: 50 push %eax 10aebb: ff 33 pushl (%ebx) 10aebd: 68 2c 74 12 00 push $0x12742c 10aec2: e8 25 24 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10aec7: 83 c4 10 add $0x10,%esp 10aeca: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aece: 75 31 jne 10af01 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10aed0: 83 ec 0c sub $0xc,%esp 10aed3: 6a 00 push $0x0 10aed5: 6a 00 push $0x0 10aed7: 6a 00 push $0x0 10aed9: ff 33 pushl (%ebx) 10aedb: 83 c0 10 add $0x10,%eax 10aede: 50 push %eax 10aedf: e8 6c 19 00 00 call 10c850 <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10aee4: 83 c4 20 add $0x20,%esp 10aee7: e8 f1 2b 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10aeec: 83 ec 0c sub $0xc,%esp 10aeef: a1 c0 72 12 00 mov 0x1272c0,%eax 10aef4: ff 70 34 pushl 0x34(%eax) 10aef7: e8 38 ff ff ff call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10aefc: 83 c4 10 add $0x10,%esp 10aeff: eb 05 jmp 10af06 <== ALWAYS TAKEN 10af01: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10af06: 8b 5d fc mov -0x4(%ebp),%ebx 10af09: c9 leave 10af0a: c3 ret 0010af0c : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10af0c: 55 push %ebp 10af0d: 89 e5 mov %esp,%ebp 10af0f: 53 push %ebx 10af10: 83 ec 14 sub $0x14,%esp 10af13: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10af16: 85 c0 test %eax,%eax 10af18: 74 3a je 10af54 10af1a: 52 push %edx 10af1b: 8d 55 f4 lea -0xc(%ebp),%edx 10af1e: 52 push %edx 10af1f: ff 30 pushl (%eax) 10af21: 68 2c 74 12 00 push $0x12742c 10af26: e8 c1 23 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10af2b: 83 c4 10 add $0x10,%esp 10af2e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10af32: 75 20 jne 10af54 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10af34: 83 ec 0c sub $0xc,%esp 10af37: 83 c0 10 add $0x10,%eax 10af3a: 50 push %eax 10af3b: e8 94 19 00 00 call 10c8d4 <_CORE_RWLock_Release> 10af40: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10af42: e8 96 2b 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10af47: 89 1c 24 mov %ebx,(%esp) 10af4a: e8 e5 fe ff ff call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10af4f: 83 c4 10 add $0x10,%esp 10af52: eb 05 jmp 10af59 <== ALWAYS TAKEN 10af54: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10af59: 8b 5d fc mov -0x4(%ebp),%ebx 10af5c: c9 leave 10af5d: c3 ret 0010af60 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10af60: 55 push %ebp 10af61: 89 e5 mov %esp,%ebp 10af63: 53 push %ebx 10af64: 83 ec 14 sub $0x14,%esp 10af67: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10af6a: 85 db test %ebx,%ebx 10af6c: 74 4b je 10afb9 10af6e: 50 push %eax 10af6f: 8d 45 f4 lea -0xc(%ebp),%eax 10af72: 50 push %eax 10af73: ff 33 pushl (%ebx) 10af75: 68 2c 74 12 00 push $0x12742c 10af7a: e8 6d 23 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10af7f: 83 c4 10 add $0x10,%esp 10af82: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10af86: 75 31 jne 10afb9 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10af88: 83 ec 0c sub $0xc,%esp 10af8b: 6a 00 push $0x0 10af8d: 6a 00 push $0x0 10af8f: 6a 01 push $0x1 10af91: ff 33 pushl (%ebx) 10af93: 83 c0 10 add $0x10,%eax 10af96: 50 push %eax 10af97: e8 b4 18 00 00 call 10c850 <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10af9c: 83 c4 20 add $0x20,%esp 10af9f: e8 39 2b 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10afa4: 83 ec 0c sub $0xc,%esp 10afa7: a1 c0 72 12 00 mov 0x1272c0,%eax 10afac: ff 70 34 pushl 0x34(%eax) 10afaf: e8 80 fe ff ff call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10afb4: 83 c4 10 add $0x10,%esp 10afb7: eb 05 jmp 10afbe <== ALWAYS TAKEN 10afb9: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10afbe: 8b 5d fc mov -0x4(%ebp),%ebx 10afc1: c9 leave 10afc2: c3 ret 0010b4c8 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10b4c8: 55 push %ebp 10b4c9: 89 e5 mov %esp,%ebp 10b4cb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b4ce: 85 c0 test %eax,%eax 10b4d0: 74 0f je 10b4e1 10b4d2: 83 38 00 cmpl $0x0,(%eax) 10b4d5: 74 0a je 10b4e1 return EINVAL; attr->is_initialized = false; 10b4d7: c7 00 00 00 00 00 movl $0x0,(%eax) 10b4dd: 31 c0 xor %eax,%eax return 0; 10b4df: eb 05 jmp 10b4e6 <== ALWAYS TAKEN 10b4e1: b8 16 00 00 00 mov $0x16,%eax } 10b4e6: c9 leave 10b4e7: c3 ret 0010b4e8 : int pthread_rwlockattr_getpshared( const pthread_rwlockattr_t *attr, int *pshared ) { 10b4e8: 55 push %ebp 10b4e9: 89 e5 mov %esp,%ebp 10b4eb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b4ee: 85 c0 test %eax,%eax 10b4f0: 74 11 je 10b503 return EINVAL; if ( !attr->is_initialized ) 10b4f2: 83 38 00 cmpl $0x0,(%eax) 10b4f5: 74 0c je 10b503 return EINVAL; *pshared = attr->process_shared; 10b4f7: 8b 50 04 mov 0x4(%eax),%edx 10b4fa: 8b 45 0c mov 0xc(%ebp),%eax 10b4fd: 89 10 mov %edx,(%eax) 10b4ff: 31 c0 xor %eax,%eax return 0; 10b501: eb 05 jmp 10b508 <== ALWAYS TAKEN 10b503: b8 16 00 00 00 mov $0x16,%eax } 10b508: c9 leave 10b509: c3 ret 0010b52c : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10b52c: 55 push %ebp 10b52d: 89 e5 mov %esp,%ebp 10b52f: 8b 45 08 mov 0x8(%ebp),%eax 10b532: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b535: 85 c0 test %eax,%eax 10b537: 74 11 je 10b54a return EINVAL; if ( !attr->is_initialized ) 10b539: 83 38 00 cmpl $0x0,(%eax) 10b53c: 74 0c je 10b54a return EINVAL; switch ( pshared ) { 10b53e: 83 fa 01 cmp $0x1,%edx 10b541: 77 07 ja 10b54a <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b543: 89 50 04 mov %edx,0x4(%eax) 10b546: 31 c0 xor %eax,%eax return 0; 10b548: eb 05 jmp 10b54f <== ALWAYS TAKEN 10b54a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b54f: c9 leave 10b550: c3 ret 00109b38 : int pthread_setcancelstate( int state, int *oldstate ) { 109b38: 55 push %ebp 109b39: 89 e5 mov %esp,%ebp 109b3b: 53 push %ebx 109b3c: 83 ec 04 sub $0x4,%esp 109b3f: 8b 55 08 mov 0x8(%ebp),%edx 109b42: 8b 4d 0c mov 0xc(%ebp),%ecx * 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() ) 109b45: 8b 1d 7c 52 12 00 mov 0x12527c,%ebx 109b4b: b8 47 00 00 00 mov $0x47,%eax 109b50: 85 db test %ebx,%ebx 109b52: 75 49 jne 109b9d return EPROTO; if ( !oldstate ) 109b54: 85 c9 test %ecx,%ecx 109b56: 74 40 je 109b98 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 109b58: 83 fa 01 cmp $0x1,%edx 109b5b: 77 3b ja 109b98 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109b5d: a1 a0 52 12 00 mov 0x1252a0,%eax 109b62: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109b68: 8b 1d e4 51 12 00 mov 0x1251e4,%ebx 109b6e: 43 inc %ebx 109b6f: 89 1d e4 51 12 00 mov %ebx,0x1251e4 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 109b75: 8b 98 cc 00 00 00 mov 0xcc(%eax),%ebx 109b7b: 89 19 mov %ebx,(%ecx) thread_support->cancelability_state = state; 109b7d: 89 90 cc 00 00 00 mov %edx,0xcc(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 109b83: 83 ec 0c sub $0xc,%esp 109b86: ff 35 a0 52 12 00 pushl 0x1252a0 109b8c: e8 0b 48 00 00 call 10e39c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 109b91: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 109b93: 83 c4 10 add $0x10,%esp 109b96: eb 05 jmp 109b9d <== ALWAYS TAKEN 109b98: b8 16 00 00 00 mov $0x16,%eax } 109b9d: 8b 5d fc mov -0x4(%ebp),%ebx 109ba0: c9 leave 109ba1: c3 ret 00109ba4 : int pthread_setcanceltype( int type, int *oldtype ) { 109ba4: 55 push %ebp 109ba5: 89 e5 mov %esp,%ebp 109ba7: 53 push %ebx 109ba8: 83 ec 04 sub $0x4,%esp 109bab: 8b 55 08 mov 0x8(%ebp),%edx 109bae: 8b 4d 0c mov 0xc(%ebp),%ecx * 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() ) 109bb1: 8b 1d 7c 52 12 00 mov 0x12527c,%ebx 109bb7: b8 47 00 00 00 mov $0x47,%eax 109bbc: 85 db test %ebx,%ebx 109bbe: 75 49 jne 109c09 return EPROTO; if ( !oldtype ) 109bc0: 85 c9 test %ecx,%ecx 109bc2: 74 40 je 109c04 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 109bc4: 83 fa 01 cmp $0x1,%edx 109bc7: 77 3b ja 109c04 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109bc9: a1 a0 52 12 00 mov 0x1252a0,%eax 109bce: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 109bd4: 8b 1d e4 51 12 00 mov 0x1251e4,%ebx 109bda: 43 inc %ebx 109bdb: 89 1d e4 51 12 00 mov %ebx,0x1251e4 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 109be1: 8b 98 d0 00 00 00 mov 0xd0(%eax),%ebx 109be7: 89 19 mov %ebx,(%ecx) thread_support->cancelability_type = type; 109be9: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 109bef: 83 ec 0c sub $0xc,%esp 109bf2: ff 35 a0 52 12 00 pushl 0x1252a0 109bf8: e8 9f 47 00 00 call 10e39c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 109bfd: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 109bff: 83 c4 10 add $0x10,%esp 109c02: eb 05 jmp 109c09 <== ALWAYS TAKEN 109c04: b8 16 00 00 00 mov $0x16,%eax } 109c09: 8b 5d fc mov -0x4(%ebp),%ebx 109c0c: c9 leave 109c0d: c3 ret 0010c4fc : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 57 push %edi 10c500: 56 push %esi 10c501: 53 push %ebx 10c502: 83 ec 2c sub $0x2c,%esp 10c505: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10c508: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp) 10c50f: 85 f6 test %esi,%esi 10c511: 0f 84 f9 00 00 00 je 10c610 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10c517: 8d 45 e0 lea -0x20(%ebp),%eax 10c51a: 50 push %eax 10c51b: 8d 45 e4 lea -0x1c(%ebp),%eax 10c51e: 50 push %eax 10c51f: 56 push %esi 10c520: ff 75 0c pushl 0xc(%ebp) 10c523: e8 e0 4c 00 00 call 111208 <_POSIX_Thread_Translate_sched_param> 10c528: 89 45 d4 mov %eax,-0x2c(%ebp) policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10c52b: 83 c4 10 add $0x10,%esp 10c52e: 85 c0 test %eax,%eax 10c530: 0f 85 da 00 00 00 jne 10c610 10c536: 53 push %ebx 10c537: 8d 45 dc lea -0x24(%ebp),%eax 10c53a: 50 push %eax 10c53b: ff 75 08 pushl 0x8(%ebp) 10c53e: 68 a4 94 12 00 push $0x1294a4 10c543: e8 14 1c 00 00 call 10e15c <_Objects_Get> 10c548: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10c54a: 83 c4 10 add $0x10,%esp 10c54d: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10c551: 74 0c je 10c55f 10c553: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp) 10c55a: e9 b1 00 00 00 jmp 10c610 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c55f: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx if ( api->schedpolicy == SCHED_SPORADIC ) 10c565: 83 7b 7c 03 cmpl $0x3,0x7c(%ebx) 10c569: 75 18 jne 10c583 (void) _Watchdog_Remove( &api->Sporadic_timer ); 10c56b: 83 ec 0c sub $0xc,%esp 10c56e: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax 10c574: 50 push %eax 10c575: 89 55 d0 mov %edx,-0x30(%ebp) 10c578: e8 d7 33 00 00 call 10f954 <_Watchdog_Remove> 10c57d: 83 c4 10 add $0x10,%esp 10c580: 8b 55 d0 mov -0x30(%ebp),%edx api->schedpolicy = policy; 10c583: 8b 45 0c mov 0xc(%ebp),%eax 10c586: 89 43 7c mov %eax,0x7c(%ebx) api->schedparam = *param; 10c589: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 10c58f: b9 06 00 00 00 mov $0x6,%ecx 10c594: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10c596: 8b 45 e4 mov -0x1c(%ebp),%eax 10c599: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10c59c: 8b 45 e0 mov -0x20(%ebp),%eax 10c59f: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10c5a5: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10c5a9: 78 60 js 10c60b <== ALWAYS TAKEN 10c5ab: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10c5af: 7e 08 jle 10c5b9 10c5b1: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10c5b5: 75 54 jne 10c60b <== ALWAYS TAKEN 10c5b7: eb 24 jmp 10c5dd <== ALWAYS TAKEN case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c5b9: a1 08 92 12 00 mov 0x129208,%eax 10c5be: 89 42 78 mov %eax,0x78(%edx) 10c5c1: 0f b6 05 18 52 12 00 movzbl 0x125218,%eax 10c5c8: 2b 83 80 00 00 00 sub 0x80(%ebx),%eax the_thread->real_priority = 10c5ce: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10c5d1: 51 push %ecx 10c5d2: 6a 01 push $0x1 10c5d4: 50 push %eax 10c5d5: 52 push %edx 10c5d6: e8 d5 1e 00 00 call 10e4b0 <_Thread_Change_priority> 10c5db: eb 2b jmp 10c608 <== ALWAYS TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10c5dd: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10c5e3: 89 83 98 00 00 00 mov %eax,0x98(%ebx) _Watchdog_Remove( &api->Sporadic_timer ); 10c5e9: 83 ec 0c sub $0xc,%esp 10c5ec: 81 c3 9c 00 00 00 add $0x9c,%ebx 10c5f2: 53 push %ebx 10c5f3: 89 55 d0 mov %edx,-0x30(%ebp) 10c5f6: e8 59 33 00 00 call 10f954 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10c5fb: 58 pop %eax 10c5fc: 5a pop %edx 10c5fd: 8b 55 d0 mov -0x30(%ebp),%edx 10c600: 52 push %edx 10c601: 6a 00 push $0x0 10c603: e8 63 fe ff ff call 10c46b <_POSIX_Threads_Sporadic_budget_TSR> 10c608: 83 c4 10 add $0x10,%esp break; } _Thread_Enable_dispatch(); 10c60b: e8 3d 23 00 00 call 10e94d <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10c610: 8b 45 d4 mov -0x2c(%ebp),%eax 10c613: 8d 65 f4 lea -0xc(%ebp),%esp 10c616: 5b pop %ebx 10c617: 5e pop %esi 10c618: 5f pop %edi 10c619: c9 leave 10c61a: c3 ret 0010f630 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 10f630: 55 push %ebp 10f631: 89 e5 mov %esp,%ebp 10f633: 57 push %edi 10f634: 56 push %esi 10f635: 53 push %ebx 10f636: 83 ec 1c sub $0x1c,%esp 10f639: 8b 4d 08 mov 0x8(%ebp),%ecx 10f63c: 8b 55 0c mov 0xc(%ebp),%edx 10f63f: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 10f642: 85 d2 test %edx,%edx 10f644: 0f 94 45 e7 sete -0x19(%ebp) 10f648: 85 db test %ebx,%ebx 10f64a: 75 06 jne 10f652 10f64c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10f650: 75 4e jne 10f6a0 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10f652: 8b 35 e8 62 12 00 mov 0x1262e8,%esi 10f658: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax if ( oset ) 10f65e: 85 db test %ebx,%ebx 10f660: 74 08 je 10f66a *oset = api->signals_blocked; 10f662: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 10f668: 89 3b mov %edi,(%ebx) if ( !set ) 10f66a: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10f66e: 75 61 jne 10f6d1 return 0; switch ( how ) { 10f670: 83 f9 01 cmp $0x1,%ecx 10f673: 74 0b je 10f680 10f675: 83 f9 02 cmp $0x2,%ecx 10f678: 74 10 je 10f68a 10f67a: 85 c9 test %ecx,%ecx 10f67c: 74 18 je 10f696 10f67e: eb 20 jmp 10f6a0 <== ALWAYS TAKEN case SIG_BLOCK: api->signals_blocked |= *set; 10f680: 8b 12 mov (%edx),%edx 10f682: 09 90 c4 00 00 00 or %edx,0xc4(%eax) break; 10f688: eb 26 jmp 10f6b0 <== ALWAYS TAKEN case SIG_UNBLOCK: api->signals_blocked &= ~*set; 10f68a: 8b 12 mov (%edx),%edx 10f68c: f7 d2 not %edx 10f68e: 21 90 c4 00 00 00 and %edx,0xc4(%eax) break; 10f694: eb 1a jmp 10f6b0 <== ALWAYS TAKEN case SIG_SETMASK: api->signals_blocked = *set; 10f696: 8b 12 mov (%edx),%edx 10f698: 89 90 c4 00 00 00 mov %edx,0xc4(%eax) break; 10f69e: eb 10 jmp 10f6b0 <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); 10f6a0: e8 ab 2a 00 00 call 112150 <__errno> 10f6a5: c7 00 16 00 00 00 movl $0x16,(%eax) 10f6ab: 83 c8 ff or $0xffffffff,%eax 10f6ae: eb 23 jmp 10f6d3 <== ALWAYS TAKEN /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 10f6b0: 8b 15 58 69 12 00 mov 0x126958,%edx 10f6b6: 0b 90 c8 00 00 00 or 0xc8(%eax),%edx /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 10f6bc: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 10f6c2: f7 d0 not %eax 10f6c4: 85 c2 test %eax,%edx 10f6c6: 74 09 je 10f6d1 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 10f6c8: c6 46 74 01 movb $0x1,0x74(%esi) _Thread_Dispatch(); 10f6cc: e8 bb d1 ff ff call 10c88c <_Thread_Dispatch> 10f6d1: 31 c0 xor %eax,%eax } return 0; } 10f6d3: 83 c4 1c add $0x1c,%esp 10f6d6: 5b pop %ebx 10f6d7: 5e pop %esi 10f6d8: 5f pop %edi 10f6d9: c9 leave 10f6da: c3 ret 0010a038 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10a038: 55 push %ebp 10a039: 89 e5 mov %esp,%ebp 10a03b: 53 push %ebx 10a03c: 83 ec 14 sub $0x14,%esp 10a03f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10a042: 85 c0 test %eax,%eax 10a044: 74 55 je 10a09b RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10a046: 53 push %ebx 10a047: 8d 55 f4 lea -0xc(%ebp),%edx 10a04a: 52 push %edx 10a04b: ff 30 pushl (%eax) 10a04d: 68 a4 54 12 00 push $0x1254a4 10a052: e8 b9 1d 00 00 call 10be10 <_Objects_Get> 10a057: 89 c3 mov %eax,%ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a059: 83 c4 10 add $0x10,%esp 10a05c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a060: 75 39 jne 10a09b */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10a062: 8b 40 18 mov 0x18(%eax),%eax case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10a065: 85 c0 test %eax,%eax 10a067: 74 0c je 10a075 _Thread_Enable_dispatch(); 10a069: e8 93 25 00 00 call 10c601 <_Thread_Enable_dispatch> 10a06e: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10a073: eb 2b jmp 10a0a0 <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10a075: 51 push %ecx 10a076: 51 push %ecx 10a077: 53 push %ebx 10a078: 68 a4 54 12 00 push $0x1254a4 10a07d: e8 e6 19 00 00 call 10ba68 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10a082: 58 pop %eax 10a083: 5a pop %edx 10a084: 53 push %ebx 10a085: 68 a4 54 12 00 push $0x1254a4 10a08a: e8 59 1c 00 00 call 10bce8 <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10a08f: e8 6d 25 00 00 call 10c601 <_Thread_Enable_dispatch> 10a094: 31 c0 xor %eax,%eax return 0; 10a096: 83 c4 10 add $0x10,%esp 10a099: eb 05 jmp 10a0a0 <== ALWAYS TAKEN 10a09b: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a0a0: 8b 5d fc mov -0x4(%ebp),%ebx 10a0a3: c9 leave 10a0a4: c3 ret 0010a0a8 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 10a0a8: 55 push %ebp 10a0a9: 89 e5 mov %esp,%ebp 10a0ab: 56 push %esi 10a0ac: 53 push %ebx 10a0ad: 83 ec 10 sub $0x10,%esp 10a0b0: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 10a0b3: 85 db test %ebx,%ebx 10a0b5: 74 66 je 10a11d return EINVAL; switch ( pshared ) { 10a0b7: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10a0bb: 75 60 jne 10a11d rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a0bd: a1 fc 51 12 00 mov 0x1251fc,%eax 10a0c2: 40 inc %eax 10a0c3: a3 fc 51 12 00 mov %eax,0x1251fc * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 10a0c8: 83 ec 0c sub $0xc,%esp 10a0cb: 68 a4 54 12 00 push $0x1254a4 10a0d0: e8 27 19 00 00 call 10b9fc <_Objects_Allocate> 10a0d5: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 10a0d7: 83 c4 10 add $0x10,%esp 10a0da: 85 c0 test %eax,%eax 10a0dc: 75 0c jne 10a0ea _Thread_Enable_dispatch(); 10a0de: e8 1e 25 00 00 call 10c601 <_Thread_Enable_dispatch> 10a0e3: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10a0e8: eb 38 jmp 10a122 <== ALWAYS TAKEN } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 10a0ea: 50 push %eax 10a0eb: 50 push %eax 10a0ec: 8d 45 f4 lea -0xc(%ebp),%eax 10a0ef: 50 push %eax 10a0f0: 8d 46 10 lea 0x10(%esi),%eax 10a0f3: 50 push %eax 10a0f4: e8 d3 13 00 00 call 10b4cc <_CORE_spinlock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a0f9: 8b 46 08 mov 0x8(%esi),%eax 10a0fc: 0f b7 c8 movzwl %ax,%ecx 10a0ff: 8b 15 c0 54 12 00 mov 0x1254c0,%edx 10a105: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a108: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 10a10f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10a111: e8 eb 24 00 00 call 10c601 <_Thread_Enable_dispatch> 10a116: 31 c0 xor %eax,%eax return 0; 10a118: 83 c4 10 add $0x10,%esp 10a11b: eb 05 jmp 10a122 <== ALWAYS TAKEN 10a11d: b8 16 00 00 00 mov $0x16,%eax } 10a122: 8d 65 f8 lea -0x8(%ebp),%esp 10a125: 5b pop %ebx 10a126: 5e pop %esi 10a127: c9 leave 10a128: c3 ret 0010a12c : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10a12c: 55 push %ebp 10a12d: 89 e5 mov %esp,%ebp 10a12f: 53 push %ebx 10a130: 83 ec 14 sub $0x14,%esp 10a133: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10a136: 85 c0 test %eax,%eax 10a138: 74 3c je 10a176 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10a13a: 51 push %ecx 10a13b: 8d 55 f4 lea -0xc(%ebp),%edx 10a13e: 52 push %edx 10a13f: ff 30 pushl (%eax) 10a141: 68 a4 54 12 00 push $0x1254a4 10a146: e8 c5 1c 00 00 call 10be10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a14b: 83 c4 10 add $0x10,%esp 10a14e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a152: 75 22 jne 10a176 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); 10a154: 52 push %edx 10a155: 6a 00 push $0x0 10a157: 6a 01 push $0x1 10a159: 83 c0 10 add $0x10,%eax 10a15c: 50 push %eax 10a15d: e8 de 13 00 00 call 10b540 <_CORE_spinlock_Wait> 10a162: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10a164: e8 98 24 00 00 call 10c601 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10a169: 89 1c 24 mov %ebx,(%esp) 10a16c: e8 0f 00 00 00 call 10a180 <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10a171: 83 c4 10 add $0x10,%esp 10a174: eb 05 jmp 10a17b <== ALWAYS TAKEN 10a176: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a17b: 8b 5d fc mov -0x4(%ebp),%ebx 10a17e: c9 leave 10a17f: c3 ret 0010a190 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10a190: 55 push %ebp 10a191: 89 e5 mov %esp,%ebp 10a193: 53 push %ebx 10a194: 83 ec 14 sub $0x14,%esp 10a197: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10a19a: 85 c0 test %eax,%eax 10a19c: 74 3c je 10a1da 10a19e: 51 push %ecx 10a19f: 8d 55 f4 lea -0xc(%ebp),%edx 10a1a2: 52 push %edx 10a1a3: ff 30 pushl (%eax) 10a1a5: 68 a4 54 12 00 push $0x1254a4 10a1aa: e8 61 1c 00 00 call 10be10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a1af: 83 c4 10 add $0x10,%esp 10a1b2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a1b6: 75 22 jne 10a1da case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 10a1b8: 52 push %edx 10a1b9: 6a 00 push $0x0 10a1bb: 6a 00 push $0x0 10a1bd: 83 c0 10 add $0x10,%eax 10a1c0: 50 push %eax 10a1c1: e8 7a 13 00 00 call 10b540 <_CORE_spinlock_Wait> 10a1c6: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10a1c8: e8 34 24 00 00 call 10c601 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10a1cd: 89 1c 24 mov %ebx,(%esp) 10a1d0: e8 ab ff ff ff call 10a180 <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10a1d5: 83 c4 10 add $0x10,%esp 10a1d8: eb 05 jmp 10a1df <== ALWAYS TAKEN 10a1da: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a1df: 8b 5d fc mov -0x4(%ebp),%ebx 10a1e2: c9 leave 10a1e3: c3 ret 0010a1e4 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10a1e4: 55 push %ebp 10a1e5: 89 e5 mov %esp,%ebp 10a1e7: 53 push %ebx 10a1e8: 83 ec 14 sub $0x14,%esp 10a1eb: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10a1ee: 85 c0 test %eax,%eax 10a1f0: 74 3a je 10a22c 10a1f2: 52 push %edx 10a1f3: 8d 55 f4 lea -0xc(%ebp),%edx 10a1f6: 52 push %edx 10a1f7: ff 30 pushl (%eax) 10a1f9: 68 a4 54 12 00 push $0x1254a4 10a1fe: e8 0d 1c 00 00 call 10be10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a203: 83 c4 10 add $0x10,%esp 10a206: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a20a: 75 20 jne 10a22c case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10a20c: 83 ec 0c sub $0xc,%esp 10a20f: 83 c0 10 add $0x10,%eax 10a212: 50 push %eax 10a213: e8 d8 12 00 00 call 10b4f0 <_CORE_spinlock_Release> 10a218: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10a21a: e8 e2 23 00 00 call 10c601 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10a21f: 89 1c 24 mov %ebx,(%esp) 10a222: e8 59 ff ff ff call 10a180 <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10a227: 83 c4 10 add $0x10,%esp 10a22a: eb 05 jmp 10a231 <== ALWAYS TAKEN 10a22c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a231: 8b 5d fc mov -0x4(%ebp),%ebx 10a234: c9 leave 10a235: c3 ret 0010a3ac : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10a3ac: 55 push %ebp 10a3ad: 89 e5 mov %esp,%ebp 10a3af: 53 push %ebx 10a3b0: 83 ec 04 sub $0x4,%esp * 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() ) 10a3b3: a1 74 62 12 00 mov 0x126274,%eax 10a3b8: 85 c0 test %eax,%eax 10a3ba: 75 48 jne 10a404 <== ALWAYS TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a3bc: a1 98 62 12 00 mov 0x126298,%eax 10a3c1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10a3c7: 8b 15 dc 61 12 00 mov 0x1261dc,%edx 10a3cd: 42 inc %edx 10a3ce: 89 15 dc 61 12 00 mov %edx,0x1261dc _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a3d4: 31 db xor %ebx,%ebx 10a3d6: 83 b8 cc 00 00 00 00 cmpl $0x0,0xcc(%eax) 10a3dd: 75 0a jne 10a3e9 <== ALWAYS TAKEN /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 10a3df: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10a3e6: 0f 95 c3 setne %bl thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a3e9: e8 6f 22 00 00 call 10c65d <_Thread_Enable_dispatch> if ( cancel ) 10a3ee: 84 db test %bl,%bl 10a3f0: 74 12 je 10a404 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10a3f2: 50 push %eax 10a3f3: 50 push %eax 10a3f4: 6a ff push $0xffffffff 10a3f6: ff 35 98 62 12 00 pushl 0x126298 10a3fc: e8 9b 4c 00 00 call 10f09c <_POSIX_Thread_Exit> 10a401: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a404: 8b 5d fc mov -0x4(%ebp),%ebx 10a407: c9 leave 10a408: c3 ret 00110638 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 110638: 55 push %ebp 110639: 89 e5 mov %esp,%ebp 11063b: 57 push %edi 11063c: 56 push %esi 11063d: 53 push %ebx 11063e: 83 ec 2c sub $0x2c,%esp 110641: 8b 75 08 mov 0x8(%ebp),%esi 110644: 8b 7d 0c mov 0xc(%ebp),%edi 110647: 8b 55 10 mov 0x10(%ebp),%edx 11064a: 8b 5d 14 mov 0x14(%ebp),%ebx Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 11064d: b8 03 00 00 00 mov $0x3,%eax 110652: 85 f6 test %esi,%esi 110654: 0f 84 8c 00 00 00 je 1106e6 return RTEMS_INVALID_NAME; if ( !id ) 11065a: b0 09 mov $0x9,%al 11065c: 85 db test %ebx,%ebx 11065e: 0f 84 82 00 00 00 je 1106e6 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 110664: f7 c7 10 00 00 00 test $0x10,%edi 11066a: 74 0f je 11067b the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 11066c: b0 0a mov $0xa,%al 11066e: 85 d2 test %edx,%edx 110670: 74 74 je 1106e6 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 110672: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 110679: eb 07 jmp 110682 <== ALWAYS TAKEN if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 11067b: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) the_attributes.maximum_count = maximum_waiters; 110682: 89 55 e4 mov %edx,-0x1c(%ebp) 110685: a1 ec 41 12 00 mov 0x1241ec,%eax 11068a: 40 inc %eax 11068b: a3 ec 41 12 00 mov %eax,0x1241ec * 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 ); 110690: 83 ec 0c sub $0xc,%esp 110693: 68 78 4b 12 00 push $0x124b78 110698: e8 4f a9 ff ff call 10afec <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 11069d: 83 c4 10 add $0x10,%esp 1106a0: 85 c0 test %eax,%eax 1106a2: 75 0c jne 1106b0 _Thread_Enable_dispatch(); 1106a4: e8 48 b5 ff ff call 10bbf1 <_Thread_Enable_dispatch> 1106a9: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1106ae: eb 36 jmp 1106e6 <== ALWAYS TAKEN } the_barrier->attribute_set = attribute_set; 1106b0: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 1106b3: 52 push %edx 1106b4: 52 push %edx 1106b5: 8d 55 e0 lea -0x20(%ebp),%edx 1106b8: 52 push %edx 1106b9: 8d 50 14 lea 0x14(%eax),%edx 1106bc: 52 push %edx 1106bd: 89 45 d4 mov %eax,-0x2c(%ebp) 1106c0: e8 4b 03 00 00 call 110a10 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1106c5: 8b 45 d4 mov -0x2c(%ebp),%eax 1106c8: 8b 50 08 mov 0x8(%eax),%edx 1106cb: 0f b7 fa movzwl %dx,%edi 1106ce: 8b 0d 94 4b 12 00 mov 0x124b94,%ecx 1106d4: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1106d7: 89 70 0c mov %esi,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 1106da: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 1106dc: e8 10 b5 ff ff call 10bbf1 <_Thread_Enable_dispatch> 1106e1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1106e3: 83 c4 10 add $0x10,%esp } 1106e6: 8d 65 f4 lea -0xc(%ebp),%esp 1106e9: 5b pop %ebx 1106ea: 5e pop %esi 1106eb: 5f pop %edi 1106ec: c9 leave 1106ed: c3 ret 0010eb64 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 10eb64: 55 push %ebp 10eb65: 89 e5 mov %esp,%ebp 10eb67: 53 push %ebx 10eb68: 83 ec 04 sub $0x4,%esp 10eb6b: 8b 55 08 mov 0x8(%ebp),%edx 10eb6e: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 10eb71: b8 09 00 00 00 mov $0x9,%eax 10eb76: 85 db test %ebx,%ebx 10eb78: 74 50 je 10ebca return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 10eb7a: 85 d2 test %edx,%edx 10eb7c: 75 0b jne 10eb89 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 10eb7e: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 10eb81: 58 pop %eax 10eb82: 5b pop %ebx 10eb83: c9 leave { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 10eb84: e9 8f 00 00 00 jmp 10ec18 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 10eb89: 83 fa 01 cmp $0x1,%edx 10eb8c: 75 0b jne 10eb99 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 10eb8e: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 10eb91: 5b pop %ebx 10eb92: 5b pop %ebx 10eb93: c9 leave if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 10eb94: e9 37 00 00 00 jmp 10ebd0 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 10eb99: 83 fa 02 cmp $0x2,%edx 10eb9c: 75 07 jne 10eba5 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 10eb9e: e8 69 00 00 00 call 10ec0c <== ALWAYS TAKEN 10eba3: eb 0a jmp 10ebaf <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 10eba5: 83 fa 03 cmp $0x3,%edx 10eba8: 75 0b jne 10ebb5 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 10ebaa: e8 49 00 00 00 call 10ebf8 <== ALWAYS TAKEN 10ebaf: 89 03 mov %eax,(%ebx) 10ebb1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ebb3: eb 15 jmp 10ebca <== ALWAYS TAKEN } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 10ebb5: b8 0a 00 00 00 mov $0xa,%eax 10ebba: 83 fa 04 cmp $0x4,%edx 10ebbd: 75 0b jne 10ebca return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 10ebbf: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 10ebc2: 59 pop %ecx 10ebc3: 5b pop %ebx 10ebc4: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 10ebc5: e9 e6 00 00 00 jmp 10ecb0 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; } 10ebca: 5a pop %edx 10ebcb: 5b pop %ebx 10ebcc: c9 leave 10ebcd: c3 ret 0010a8cc : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10a8cc: 55 push %ebp 10a8cd: 89 e5 mov %esp,%ebp 10a8cf: 53 push %ebx 10a8d0: 83 ec 14 sub $0x14,%esp 10a8d3: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10a8d6: b8 09 00 00 00 mov $0x9,%eax 10a8db: 85 db test %ebx,%ebx 10a8dd: 74 56 je 10a935 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10a8df: 83 ec 0c sub $0xc,%esp 10a8e2: 53 push %ebx 10a8e3: e8 f8 00 00 00 call 10a9e0 <_TOD_Validate> <== ALWAYS TAKEN 10a8e8: 88 c2 mov %al,%dl 10a8ea: 83 c4 10 add $0x10,%esp 10a8ed: b8 14 00 00 00 mov $0x14,%eax 10a8f2: 84 d2 test %dl,%dl 10a8f4: 74 3f je 10a935 newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10a8f6: 83 ec 0c sub $0xc,%esp 10a8f9: 53 push %ebx 10a8fa: e8 79 00 00 00 call 10a978 <_TOD_To_seconds> <== ALWAYS TAKEN 10a8ff: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10a902: 8b 43 18 mov 0x18(%ebx),%eax 10a905: 0f af 05 04 32 12 00 imul 0x123204,%eax 10a90c: 69 c0 e8 03 00 00 imul $0x3e8,%eax,%eax 10a912: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a915: a1 d0 ef 12 00 mov 0x12efd0,%eax 10a91a: 40 inc %eax 10a91b: a3 d0 ef 12 00 mov %eax,0x12efd0 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10a920: 8d 45 f0 lea -0x10(%ebp),%eax 10a923: 89 04 24 mov %eax,(%esp) 10a926: e8 a1 16 00 00 call 10bfcc <_TOD_Set> _Thread_Enable_dispatch(); 10a92b: e8 2d 28 00 00 call 10d15d <_Thread_Enable_dispatch> 10a930: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a932: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10a935: 8b 5d fc mov -0x4(%ebp),%ebx 10a938: c9 leave 10a939: c3 ret 00109960 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 109960: 55 push %ebp 109961: 89 e5 mov %esp,%ebp 109963: 83 ec 08 sub $0x8,%esp 109966: 8b 4d 08 mov 0x8(%ebp),%ecx 109969: 8b 55 14 mov 0x14(%ebp),%edx RTEMS_API_Control *api; if ( !event_out ) 10996c: b8 09 00 00 00 mov $0x9,%eax 109971: 85 d2 test %edx,%edx 109973: 74 3f je 1099b4 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 109975: a1 a8 42 12 00 mov 0x1242a8,%eax 10997a: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax if ( _Event_sets_Is_empty( event_in ) ) { 109980: 85 c9 test %ecx,%ecx 109982: 75 08 jne 10998c *event_out = api->pending_events; 109984: 8b 00 mov (%eax),%eax 109986: 89 02 mov %eax,(%edx) 109988: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10998a: eb 28 jmp 1099b4 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10998c: a1 ec 41 12 00 mov 0x1241ec,%eax 109991: 40 inc %eax 109992: a3 ec 41 12 00 mov %eax,0x1241ec } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 109997: 52 push %edx 109998: ff 75 10 pushl 0x10(%ebp) 10999b: ff 75 0c pushl 0xc(%ebp) 10999e: 51 push %ecx 10999f: e8 14 00 00 00 call 1099b8 <_Event_Seize> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1099a4: e8 48 22 00 00 call 10bbf1 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 1099a9: a1 a8 42 12 00 mov 0x1242a8,%eax 1099ae: 8b 40 34 mov 0x34(%eax),%eax 1099b1: 83 c4 10 add $0x10,%esp } 1099b4: c9 leave 1099b5: c3 ret 00109ac0 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 109ac0: 55 push %ebp 109ac1: 89 e5 mov %esp,%ebp 109ac3: 53 push %ebx 109ac4: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 109ac7: 8d 45 f4 lea -0xc(%ebp),%eax 109aca: 50 push %eax 109acb: ff 75 08 pushl 0x8(%ebp) 109ace: e8 41 21 00 00 call 10bc14 <_Thread_Get> 109ad3: 89 c2 mov %eax,%edx switch ( location ) { 109ad5: 83 c4 10 add $0x10,%esp 109ad8: b8 04 00 00 00 mov $0x4,%eax 109add: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ae1: 75 23 jne 109b06 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 109ae3: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 109ae9: 9c pushf 109aea: fa cli 109aeb: 59 pop %ecx *the_event_set |= the_new_events; 109aec: 8b 5d 0c mov 0xc(%ebp),%ebx 109aef: 09 18 or %ebx,(%eax) _ISR_Enable( level ); 109af1: 51 push %ecx 109af2: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 109af3: 83 ec 0c sub $0xc,%esp 109af6: 52 push %edx 109af7: e8 10 00 00 00 call 109b0c <_Event_Surrender> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 109afc: e8 f0 20 00 00 call 10bbf1 <_Thread_Enable_dispatch> 109b01: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109b03: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109b06: 8b 5d fc mov -0x4(%ebp),%ebx 109b09: c9 leave 109b0a: c3 ret 0010d9c4 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d9c4: 55 push %ebp 10d9c5: 89 e5 mov %esp,%ebp 10d9c7: 57 push %edi 10d9c8: 56 push %esi 10d9c9: 53 push %ebx 10d9ca: 83 ec 0c sub $0xc,%esp 10d9cd: 8b 75 0c mov 0xc(%ebp),%esi Extension_Control *the_extension; if ( !id ) 10d9d0: b8 09 00 00 00 mov $0x9,%eax 10d9d5: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10d9d9: 74 6f je 10da4a return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d9db: b0 03 mov $0x3,%al 10d9dd: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10d9e1: 74 67 je 10da4a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d9e3: a1 d0 fa 12 00 mov 0x12fad0,%eax 10d9e8: 40 inc %eax 10d9e9: a3 d0 fa 12 00 mov %eax,0x12fad0 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d9ee: 83 ec 0c sub $0xc,%esp 10d9f1: 68 f8 fc 12 00 push $0x12fcf8 10d9f6: e8 e1 0b 00 00 call 10e5dc <_Objects_Allocate> 10d9fb: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d9fd: 83 c4 10 add $0x10,%esp 10da00: 85 c0 test %eax,%eax 10da02: 75 0c jne 10da10 _Thread_Enable_dispatch(); 10da04: e8 4c 18 00 00 call 10f255 <_Thread_Enable_dispatch> 10da09: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10da0e: eb 3a jmp 10da4a <== ALWAYS 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; 10da10: 8d 78 24 lea 0x24(%eax),%edi 10da13: b9 08 00 00 00 mov $0x8,%ecx 10da18: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10da1a: 83 ec 0c sub $0xc,%esp 10da1d: 8d 40 10 lea 0x10(%eax),%eax 10da20: 50 push %eax 10da21: e8 ea 23 00 00 call 10fe10 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10da26: 8b 43 08 mov 0x8(%ebx),%eax 10da29: 0f b7 c8 movzwl %ax,%ecx 10da2c: 8b 15 14 fd 12 00 mov 0x12fd14,%edx 10da32: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10da35: 8b 55 08 mov 0x8(%ebp),%edx 10da38: 89 53 0c mov %edx,0xc(%ebx) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10da3b: 8b 55 10 mov 0x10(%ebp),%edx 10da3e: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10da40: e8 10 18 00 00 call 10f255 <_Thread_Enable_dispatch> 10da45: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10da47: 83 c4 10 add $0x10,%esp } 10da4a: 8d 65 f4 lea -0xc(%ebp),%esp 10da4d: 5b pop %ebx 10da4e: 5e pop %esi 10da4f: 5f pop %edi 10da50: c9 leave 10da51: c3 ret 0010a4ec : */ void rtems_fatal_error_occurred( uint32_t the_error ) { 10a4ec: 55 push %ebp 10a4ed: 89 e5 mov %esp,%ebp 10a4ef: 83 ec 0c sub $0xc,%esp _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error ); 10a4f2: ff 75 08 pushl 0x8(%ebp) 10a4f5: 6a 00 push $0x0 10a4f7: 6a 01 push $0x1 10a4f9: e8 56 0a 00 00 call 10af54 <_Internal_error_Occurred> <== ALWAYS TAKEN 0010a418 : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 10a418: 55 push %ebp 10a419: 89 e5 mov %esp,%ebp 10a41b: 83 ec 08 sub $0x8,%esp 10a41e: c7 05 84 43 12 00 00 movl $0x0,0x124384 10a425: 00 00 00 #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 10a428: e8 e3 29 00 00 call 10ce10 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 10a42d: e8 06 47 00 00 call 10eb38 <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); 10a432: e8 01 02 00 00 call 10a638 <_API_extensions_Initialization> <== ALWAYS TAKEN * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 10a437: c7 05 ec 41 12 00 01 movl $0x1,0x1241ec 10a43e: 00 00 00 /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); 10a441: e8 ac 27 00 00 call 10cbf2 <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 10a446: e8 35 23 00 00 call 10c780 <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 10a44b: e8 44 0b 00 00 call 10af94 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 10a450: c7 05 c4 41 12 00 04 movl $0x124204,0x1241c4 10a457: 42 12 00 _API_Mutex_Initialization( 1 ); 10a45a: 83 ec 0c sub $0xc,%esp 10a45d: 6a 01 push $0x1 10a45f: e8 d8 02 00 00 call 10a73c <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 10a464: c7 04 24 a0 42 12 00 movl $0x1242a0,(%esp) 10a46b: e8 50 02 00 00 call 10a6c0 <_API_Mutex_Allocate> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 10a470: 66 c7 05 9c 42 12 00 movw $0x0,0x12429c 10a477: 00 00 10a479: 31 c0 xor %eax,%eax 10a47b: 83 c4 10 add $0x10,%esp for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 10a47e: 66 c7 84 00 14 43 12 movw $0x0,0x124314(%eax,%eax,1) 10a485: 00 00 00 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 10a488: 40 inc %eax 10a489: 83 f8 10 cmp $0x10,%eax 10a48c: 75 f0 jne 10a47e _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 10a48e: e8 d5 25 00 00 call 10ca68 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 10a493: e8 28 07 00 00 call 10abc0 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); 10a498: e8 13 1a 00 00 call 10beb0 <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 10a49d: e8 4e 01 00 00 call 10a5f0 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); 10a4a2: e8 1d 00 00 00 call 10a4c4 <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); 10a4a7: e8 7b 00 00 00 call 10a527 <_IO_Manager_initialization> <== ALWAYS TAKEN #ifdef RTEMS_POSIX_API _POSIX_API_Initialize(); 10a4ac: e8 f7 00 00 00 call 10a5a8 <_POSIX_API_Initialize> <== ALWAYS TAKEN 10a4b1: c7 05 84 43 12 00 01 movl $0x1,0x124384 10a4b8: 00 00 00 _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 10a4bb: c9 leave * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 10a4bc: e9 1f 15 00 00 jmp 10b9e0 <_Thread_Create_idle> 0010a407 : _API_extensions_Run_predriver(); #endif } void rtems_initialize_device_drivers(void) { 10a407: 55 push %ebp 10a408: 89 e5 mov %esp,%ebp 10a40a: 83 ec 08 sub $0x8,%esp * Initialize all the device drivers and initialize the MPCI layer. * * NOTE: The MPCI may be build upon a device driver. */ _IO_Initialize_all_drivers(); 10a40d: e8 ee 00 00 00 call 10a500 <_IO_Initialize_all_drivers> <== ALWAYS TAKEN * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); } 10a412: c9 leave /* * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); 10a413: e9 43 02 00 00 jmp 10a65b <_API_extensions_Run_postdriver> <== ALWAYS TAKEN 0010ba20 : 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 ) { 10ba20: 55 push %ebp 10ba21: 89 e5 mov %esp,%ebp 10ba23: 57 push %edi 10ba24: 56 push %esi 10ba25: 53 push %ebx 10ba26: 83 ec 0c sub $0xc,%esp 10ba29: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba2c: 8b 75 0c mov 0xc(%ebp),%esi 10ba2f: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10ba32: 8b 0d 48 9c 12 00 mov 0x129c48,%ecx if ( rtems_interrupt_is_in_progress() ) 10ba38: 8b 3d 44 93 12 00 mov 0x129344,%edi 10ba3e: b8 12 00 00 00 mov $0x12,%eax 10ba43: 85 ff test %edi,%edi 10ba45: 0f 85 cc 00 00 00 jne 10bb17 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10ba4b: 85 d2 test %edx,%edx 10ba4d: 0f 84 bf 00 00 00 je 10bb12 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10ba53: 89 0a mov %ecx,(%edx) if ( driver_table == NULL ) 10ba55: 85 f6 test %esi,%esi 10ba57: 0f 84 b5 00 00 00 je 10bb12 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10ba5d: 83 3e 00 cmpl $0x0,(%esi) 10ba60: 0f 85 b9 00 00 00 jne 10bb1f 10ba66: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10ba6a: 0f 85 af 00 00 00 jne 10bb1f 10ba70: e9 9d 00 00 00 jmp 10bb12 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ba75: a1 ac 92 12 00 mov 0x1292ac,%eax 10ba7a: 40 inc %eax 10ba7b: a3 ac 92 12 00 mov %eax,0x1292ac if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10ba80: 85 db test %ebx,%ebx 10ba82: 75 31 jne 10bab5 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10ba84: 8b 0d 48 9c 12 00 mov 0x129c48,%ecx 10ba8a: a1 4c 9c 12 00 mov 0x129c4c,%eax 10ba8f: eb 15 jmp 10baa6 <== ALWAYS TAKEN static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10ba91: 83 38 00 cmpl $0x0,(%eax) 10ba94: 0f 85 94 00 00 00 jne 10bb2e 10ba9a: 83 78 04 00 cmpl $0x0,0x4(%eax) 10ba9e: 0f 85 8a 00 00 00 jne 10bb2e 10baa4: eb 04 jmp 10baaa <== ALWAYS TAKEN 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 ) { 10baa6: 39 cb cmp %ecx,%ebx 10baa8: 72 e7 jb 10ba91 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10baaa: 89 1a mov %ebx,(%edx) if ( m != n ) 10baac: 39 cb cmp %ecx,%ebx 10baae: 75 30 jne 10bae0 10bab0: e9 82 00 00 00 jmp 10bb37 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10bab5: 6b c3 18 imul $0x18,%ebx,%eax 10bab8: 03 05 4c 9c 12 00 add 0x129c4c,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10babe: 31 c9 xor %ecx,%ecx 10bac0: 83 38 00 cmpl $0x0,(%eax) 10bac3: 75 09 jne 10bace 10bac5: 31 c9 xor %ecx,%ecx 10bac7: 83 78 04 00 cmpl $0x0,0x4(%eax) 10bacb: 0f 94 c1 sete %cl } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 10bace: 85 c9 test %ecx,%ecx 10bad0: 75 0c jne 10bade _Thread_Enable_dispatch(); 10bad2: e8 fa 17 00 00 call 10d2d1 <_Thread_Enable_dispatch> 10bad7: b8 0c 00 00 00 mov $0xc,%eax return RTEMS_RESOURCE_IN_USE; 10badc: eb 39 jmp 10bb17 <== ALWAYS TAKEN } *registered_major = major; 10bade: 89 1a mov %ebx,(%edx) } _IO_Driver_address_table [major] = *driver_table; 10bae0: 6b fb 18 imul $0x18,%ebx,%edi 10bae3: 03 3d 4c 9c 12 00 add 0x129c4c,%edi 10bae9: b9 06 00 00 00 mov $0x6,%ecx 10baee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10baf0: e8 dc 17 00 00 call 10d2d1 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10baf5: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10bafc: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10bb03: 89 5d 08 mov %ebx,0x8(%ebp) } 10bb06: 83 c4 0c add $0xc,%esp 10bb09: 5b pop %ebx 10bb0a: 5e pop %esi 10bb0b: 5f pop %edi 10bb0c: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10bb0d: e9 de 76 00 00 jmp 1131f0 <== ALWAYS TAKEN 10bb12: b8 09 00 00 00 mov $0x9,%eax } 10bb17: 83 c4 0c add $0xc,%esp 10bb1a: 5b pop %ebx 10bb1b: 5e pop %esi 10bb1c: 5f pop %edi 10bb1d: c9 leave 10bb1e: c3 ret return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10bb1f: b8 0a 00 00 00 mov $0xa,%eax 10bb24: 39 cb cmp %ecx,%ebx 10bb26: 0f 82 49 ff ff ff jb 10ba75 10bb2c: eb e9 jmp 10bb17 <== ALWAYS TAKEN 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 ) { 10bb2e: 43 inc %ebx 10bb2f: 83 c0 18 add $0x18,%eax 10bb32: e9 6f ff ff ff jmp 10baa6 <== ALWAYS TAKEN if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10bb37: e8 95 17 00 00 call 10d2d1 <_Thread_Enable_dispatch> 10bb3c: b8 05 00 00 00 mov $0x5,%eax return sc; 10bb41: eb d4 jmp 10bb17 <== ALWAYS TAKEN 0010c420 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c420: 55 push %ebp 10c421: 89 e5 mov %esp,%ebp 10c423: 57 push %edi 10c424: 56 push %esi 10c425: 53 push %ebx 10c426: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c429: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c42d: 74 41 je 10c470 <== ALWAYS TAKEN 10c42f: bb 01 00 00 00 mov $0x1,%ebx return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10c434: 8b 04 9d a4 ef 12 00 mov 0x12efa4(,%ebx,4),%eax 10c43b: 85 c0 test %eax,%eax 10c43d: 74 2b je 10c46a continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10c43f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c442: be 01 00 00 00 mov $0x1,%esi 10c447: 85 ff test %edi,%edi 10c449: 75 17 jne 10c462 10c44b: eb 1d jmp 10c46a <== ALWAYS TAKEN continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c44d: 8b 47 1c mov 0x1c(%edi),%eax 10c450: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c453: 85 c0 test %eax,%eax 10c455: 74 0a je 10c461 <== ALWAYS TAKEN continue; (*routine)(the_thread); 10c457: 83 ec 0c sub $0xc,%esp 10c45a: 50 push %eax 10c45b: ff 55 08 call *0x8(%ebp) 10c45e: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c461: 46 inc %esi 10c462: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c466: 39 c6 cmp %eax,%esi 10c468: 76 e3 jbe 10c44d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c46a: 43 inc %ebx 10c46b: 83 fb 05 cmp $0x5,%ebx 10c46e: 75 c4 jne 10c434 (*routine)(the_thread); } } } 10c470: 8d 65 f4 lea -0xc(%ebp),%esp 10c473: 5b pop %ebx 10c474: 5e pop %esi 10c475: 5f pop %edi 10c476: c9 leave 10c477: c3 ret 00113e58 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 113e58: 55 push %ebp 113e59: 89 e5 mov %esp,%ebp 113e5b: 57 push %edi 113e5c: 56 push %esi 113e5d: 53 push %ebx 113e5e: 83 ec 1c sub $0x1c,%esp 113e61: 8b 75 08 mov 0x8(%ebp),%esi 113e64: 8b 5d 0c mov 0xc(%ebp),%ebx 113e67: 8b 7d 14 mov 0x14(%ebp),%edi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 113e6a: 85 db test %ebx,%ebx 113e6c: 74 4f je 113ebd return RTEMS_INVALID_ADDRESS; if ( !count ) 113e6e: 85 ff test %edi,%edi 113e70: 74 4b je 113ebd RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 113e72: 52 push %edx 113e73: 8d 45 e4 lea -0x1c(%ebp),%eax 113e76: 50 push %eax 113e77: 56 push %esi 113e78: 68 a4 de 13 00 push $0x13dea4 113e7d: e8 0e 45 00 00 call 118390 <_Objects_Get> 113e82: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113e84: 83 c4 10 add $0x10,%esp 113e87: b8 04 00 00 00 mov $0x4,%eax 113e8c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 113e90: 75 30 jne 113ec2 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 113e92: 50 push %eax 113e93: 50 push %eax 113e94: 57 push %edi 113e95: 6a 00 push $0x0 113e97: 56 push %esi 113e98: ff 75 10 pushl 0x10(%ebp) 113e9b: 53 push %ebx 113e9c: 8d 42 14 lea 0x14(%edx),%eax 113e9f: 50 push %eax 113ea0: e8 1b 2f 00 00 call 116dc0 <_CORE_message_queue_Broadcast> <== ALWAYS TAKEN 113ea5: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 113ea7: 83 c4 20 add $0x20,%esp 113eaa: e8 46 4d 00 00 call 118bf5 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 113eaf: 83 ec 0c sub $0xc,%esp 113eb2: 53 push %ebx 113eb3: e8 f8 02 00 00 call 1141b0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN #endif count ); _Thread_Enable_dispatch(); return 113eb8: 83 c4 10 add $0x10,%esp 113ebb: eb 05 jmp 113ec2 <== ALWAYS TAKEN 113ebd: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113ec2: 8d 65 f4 lea -0xc(%ebp),%esp 113ec5: 5b pop %ebx 113ec6: 5e pop %esi 113ec7: 5f pop %edi 113ec8: c9 leave 113ec9: c3 ret 00111228 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 111228: 55 push %ebp 111229: 89 e5 mov %esp,%ebp 11122b: 57 push %edi 11122c: 56 push %esi 11122d: 53 push %ebx 11122e: 83 ec 2c sub $0x2c,%esp 111231: 8b 75 08 mov 0x8(%ebp),%esi 111234: 8b 7d 0c mov 0xc(%ebp),%edi 111237: 8b 55 10 mov 0x10(%ebp),%edx CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 11123a: b8 03 00 00 00 mov $0x3,%eax 11123f: 85 f6 test %esi,%esi 111241: 0f 84 a9 00 00 00 je 1112f0 return RTEMS_INVALID_NAME; if ( !id ) 111247: b0 09 mov $0x9,%al 111249: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 11124d: 0f 84 9d 00 00 00 je 1112f0 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 111253: b0 0a mov $0xa,%al 111255: 85 ff test %edi,%edi 111257: 0f 84 93 00 00 00 je 1112f0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 11125d: b0 08 mov $0x8,%al 11125f: 85 d2 test %edx,%edx 111261: 0f 84 89 00 00 00 je 1112f0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 111267: a1 bc d4 12 00 mov 0x12d4bc,%eax 11126c: 40 inc %eax 11126d: a3 bc d4 12 00 mov %eax,0x12d4bc #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 111272: 89 55 d4 mov %edx,-0x2c(%ebp) 111275: e8 d2 51 00 00 call 11644c <_Message_queue_Allocate> 11127a: 89 c3 mov %eax,%ebx if ( !the_message_queue ) { 11127c: 85 c0 test %eax,%eax 11127e: 8b 55 d4 mov -0x2c(%ebp),%edx 111281: 75 0c jne 11128f _Thread_Enable_dispatch(); 111283: e8 e1 25 00 00 call 113869 <_Thread_Enable_dispatch> 111288: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 11128d: eb 61 jmp 1112f0 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 11128f: 8b 45 14 mov 0x14(%ebp),%eax 111292: 89 43 10 mov %eax,0x10(%ebx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 111295: a8 04 test $0x4,%al 111297: 0f 95 c0 setne %al 11129a: 0f b6 c0 movzbl %al,%eax 11129d: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1112a0: 52 push %edx 1112a1: 57 push %edi 1112a2: 8d 45 e4 lea -0x1c(%ebp),%eax 1112a5: 50 push %eax 1112a6: 8d 43 14 lea 0x14(%ebx),%eax 1112a9: 50 push %eax 1112aa: e8 55 0f 00 00 call 112204 <_CORE_message_queue_Initialize> <== ALWAYS TAKEN 1112af: 83 c4 10 add $0x10,%esp 1112b2: 84 c0 test %al,%al 1112b4: 75 1c jne 1112d2 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1112b6: 50 push %eax 1112b7: 50 push %eax 1112b8: 53 push %ebx 1112b9: 68 98 dd 12 00 push $0x12dd98 1112be: e8 0d 1c 00 00 call 112ed0 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 1112c3: e8 a1 25 00 00 call 113869 <_Thread_Enable_dispatch> 1112c8: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 1112cd: 83 c4 10 add $0x10,%esp 1112d0: eb 1e jmp 1112f0 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1112d2: 8b 43 08 mov 0x8(%ebx),%eax 1112d5: 0f b7 c8 movzwl %ax,%ecx 1112d8: 8b 15 b4 dd 12 00 mov 0x12ddb4,%edx 1112de: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1112e1: 89 73 0c mov %esi,0xc(%ebx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 1112e4: 8b 55 18 mov 0x18(%ebp),%edx 1112e7: 89 02 mov %eax,(%edx) name, 0 ); #endif _Thread_Enable_dispatch(); 1112e9: e8 7b 25 00 00 call 113869 <_Thread_Enable_dispatch> 1112ee: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1112f0: 8d 65 f4 lea -0xc(%ebp),%esp 1112f3: 5b pop %ebx 1112f4: 5e pop %esi 1112f5: 5f pop %edi 1112f6: c9 leave 1112f7: c3 ret 001140fc : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 1140fc: 55 push %ebp 1140fd: 89 e5 mov %esp,%ebp 1140ff: 53 push %ebx 114100: 83 ec 18 sub $0x18,%esp 114103: 8d 45 f4 lea -0xc(%ebp),%eax 114106: 50 push %eax 114107: ff 75 08 pushl 0x8(%ebp) 11410a: 68 0c 04 13 00 push $0x13040c 11410f: e8 dc a8 ff ff call 10e9f0 <_Objects_Get> 114114: 89 c3 mov %eax,%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 114116: 83 c4 10 add $0x10,%esp 114119: b8 04 00 00 00 mov $0x4,%eax 11411e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114122: 75 34 jne 114158 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 114124: 51 push %ecx 114125: 51 push %ecx 114126: 53 push %ebx 114127: 68 0c 04 13 00 push $0x13040c 11412c: e8 17 a5 ff ff call 10e648 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 114131: 83 c4 0c add $0xc,%esp 114134: 6a 05 push $0x5 114136: 6a 00 push $0x0 114138: 8d 43 14 lea 0x14(%ebx),%eax 11413b: 50 push %eax 11413c: e8 bb 04 00 00 call 1145fc <_CORE_message_queue_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 114141: 58 pop %eax 114142: 5a pop %edx 114143: 53 push %ebx 114144: 68 0c 04 13 00 push $0x13040c 114149: e8 7a a7 ff ff call 10e8c8 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11414e: e8 02 b1 ff ff call 10f255 <_Thread_Enable_dispatch> 114153: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114155: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114158: 8b 5d fc mov -0x4(%ebp),%ebx 11415b: c9 leave 11415c: c3 ret 00114000 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 114000: 55 push %ebp 114001: 89 e5 mov %esp,%ebp 114003: 53 push %ebx 114004: 83 ec 14 sub $0x14,%esp 114007: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11400a: b8 09 00 00 00 mov $0x9,%eax 11400f: 85 db test %ebx,%ebx 114011: 74 3a je 11404d RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 114013: 50 push %eax 114014: 8d 45 f4 lea -0xc(%ebp),%eax 114017: 50 push %eax 114018: ff 75 08 pushl 0x8(%ebp) 11401b: 68 a4 de 13 00 push $0x13dea4 114020: e8 6b 43 00 00 call 118390 <_Objects_Get> 114025: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 114027: 83 c4 10 add $0x10,%esp 11402a: b8 04 00 00 00 mov $0x4,%eax 11402f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114033: 75 18 jne 11404d case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 114035: 83 ec 0c sub $0xc,%esp 114038: 8d 42 14 lea 0x14(%edx),%eax 11403b: 50 push %eax 11403c: e8 2b 2e 00 00 call 116e6c <_CORE_message_queue_Flush> <== ALWAYS TAKEN 114041: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 114043: e8 ad 4b 00 00 call 118bf5 <_Thread_Enable_dispatch> 114048: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11404a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11404d: 8b 5d fc mov -0x4(%ebp),%ebx 114050: c9 leave 114051: c3 ret 0011131c : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 11131c: 55 push %ebp 11131d: 89 e5 mov %esp,%ebp 11131f: 56 push %esi 111320: 53 push %ebx 111321: 83 ec 10 sub $0x10,%esp 111324: 8b 5d 0c mov 0xc(%ebp),%ebx 111327: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 11132a: 85 db test %ebx,%ebx 11132c: 74 60 je 11138e return RTEMS_INVALID_ADDRESS; if ( !size ) 11132e: 85 f6 test %esi,%esi 111330: 74 5c je 11138e RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 111332: 52 push %edx 111333: 8d 45 f4 lea -0xc(%ebp),%eax 111336: 50 push %eax 111337: ff 75 08 pushl 0x8(%ebp) 11133a: 68 98 dd 12 00 push $0x12dd98 11133f: e8 b4 1c 00 00 call 112ff8 <_Objects_Get> 111344: 89 c1 mov %eax,%ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 111346: 83 c4 10 add $0x10,%esp 111349: b8 04 00 00 00 mov $0x4,%eax 11134e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 111352: 75 3f jne 111393 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 111354: 50 push %eax 111355: 50 push %eax 111356: ff 75 18 pushl 0x18(%ebp) 111359: 8b 55 14 mov 0x14(%ebp),%edx 11135c: 83 e2 01 and $0x1,%edx 11135f: 83 f2 01 xor $0x1,%edx 111362: 52 push %edx 111363: 56 push %esi 111364: 53 push %ebx 111365: ff 71 08 pushl 0x8(%ecx) 111368: 83 c1 14 add $0x14,%ecx 11136b: 51 push %ecx 11136c: e8 3b 0f 00 00 call 1122ac <_CORE_message_queue_Seize> <== ALWAYS TAKEN buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 111371: 83 c4 20 add $0x20,%esp 111374: e8 f0 24 00 00 call 113869 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 111379: 83 ec 0c sub $0xc,%esp 11137c: a1 78 d5 12 00 mov 0x12d578,%eax 111381: ff 70 34 pushl 0x34(%eax) 111384: e8 83 00 00 00 call 11140c <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 111389: 83 c4 10 add $0x10,%esp 11138c: eb 05 jmp 111393 <== ALWAYS TAKEN 11138e: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111393: 8d 65 f8 lea -0x8(%ebp),%esp 111396: 5b pop %ebx 111397: 5e pop %esi 111398: c9 leave 111399: c3 ret 00109c80 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 109c80: 55 push %ebp 109c81: 89 e5 mov %esp,%ebp 109c83: 56 push %esi 109c84: 53 push %ebx 109c85: 83 ec 10 sub $0x10,%esp 109c88: 8b 75 08 mov 0x8(%ebp),%esi 109c8b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 109c8e: b8 09 00 00 00 mov $0x9,%eax 109c93: 85 db test %ebx,%ebx 109c95: 74 4f je 109ce6 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 109c97: 50 push %eax 109c98: 8d 45 f4 lea -0xc(%ebp),%eax 109c9b: 50 push %eax 109c9c: 56 push %esi 109c9d: 68 c8 4a 12 00 push $0x124ac8 109ca2: e8 59 17 00 00 call 10b400 <_Objects_Get> 109ca7: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 109ca9: 83 c4 10 add $0x10,%esp 109cac: b8 04 00 00 00 mov $0x4,%eax 109cb1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109cb5: 75 2f jne 109ce6 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 109cb7: 6a 00 push $0x0 109cb9: 6a 00 push $0x0 109cbb: 68 ff ff ff 7f push $0x7fffffff 109cc0: 6a 00 push $0x0 109cc2: 56 push %esi 109cc3: ff 75 10 pushl 0x10(%ebp) 109cc6: 53 push %ebx 109cc7: 8d 42 14 lea 0x14(%edx),%eax 109cca: 50 push %eax 109ccb: e8 08 0b 00 00 call 10a7d8 <_CORE_message_queue_Submit> <== ALWAYS TAKEN 109cd0: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 109cd2: 83 c4 20 add $0x20,%esp 109cd5: e8 17 1f 00 00 call 10bbf1 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 109cda: 83 ec 0c sub $0xc,%esp 109cdd: 53 push %ebx 109cde: e8 0d 00 00 00 call 109cf0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 109ce3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109ce6: 8d 65 f8 lea -0x8(%ebp),%esp 109ce9: 5b pop %ebx 109cea: 5e pop %esi 109ceb: c9 leave 109cec: c3 ret 001141c0 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1141c0: 55 push %ebp 1141c1: 89 e5 mov %esp,%ebp 1141c3: 56 push %esi 1141c4: 53 push %ebx 1141c5: 83 ec 10 sub $0x10,%esp 1141c8: 8b 75 08 mov 0x8(%ebp),%esi 1141cb: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1141ce: b8 09 00 00 00 mov $0x9,%eax 1141d3: 85 db test %ebx,%ebx 1141d5: 74 4f je 114226 1141d7: 50 push %eax 1141d8: 8d 45 f4 lea -0xc(%ebp),%eax 1141db: 50 push %eax 1141dc: 56 push %esi 1141dd: 68 a4 de 13 00 push $0x13dea4 1141e2: e8 a9 41 00 00 call 118390 <_Objects_Get> 1141e7: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1141e9: 83 c4 10 add $0x10,%esp 1141ec: b8 04 00 00 00 mov $0x4,%eax 1141f1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1141f5: 75 2f jne 114226 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1141f7: 6a 00 push $0x0 1141f9: 6a 00 push $0x0 1141fb: 68 00 00 00 80 push $0x80000000 114200: 6a 00 push $0x0 114202: 56 push %esi 114203: ff 75 10 pushl 0x10(%ebp) 114206: 53 push %ebx 114207: 8d 42 14 lea 0x14(%edx),%eax 11420a: 50 push %eax 11420b: e8 8c 2e 00 00 call 11709c <_CORE_message_queue_Submit> 114210: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 114212: 83 c4 20 add $0x20,%esp 114215: e8 db 49 00 00 call 118bf5 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 11421a: 83 ec 0c sub $0xc,%esp 11421d: 53 push %ebx 11421e: e8 8d ff ff ff call 1141b0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 114223: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114226: 8d 65 f8 lea -0x8(%ebp),%esp 114229: 5b pop %ebx 11422a: 5e pop %esi 11422b: c9 leave 11422c: c3 ret 0010b684 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10b684: 55 push %ebp 10b685: 89 e5 mov %esp,%ebp 10b687: 57 push %edi 10b688: 56 push %esi 10b689: 53 push %ebx 10b68a: 83 ec 0c sub $0xc,%esp 10b68d: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10b690: ba 09 00 00 00 mov $0x9,%edx 10b695: 85 db test %ebx,%ebx 10b697: 74 4e je 10b6e7 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10b699: 50 push %eax 10b69a: 50 push %eax 10b69b: ff 75 0c pushl 0xc(%ebp) 10b69e: ff 75 08 pushl 0x8(%ebp) 10b6a1: e8 12 18 00 00 call 10ceb8 <_Objects_Get_information> if ( !obj_info ) 10b6a6: 83 c4 10 add $0x10,%esp 10b6a9: ba 0a 00 00 00 mov $0xa,%edx 10b6ae: 85 c0 test %eax,%eax 10b6b0: 74 35 je 10b6e7 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10b6b2: 8b 50 08 mov 0x8(%eax),%edx 10b6b5: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10b6b7: 8b 50 0c mov 0xc(%eax),%edx 10b6ba: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10b6bd: 8a 50 12 mov 0x12(%eax),%dl 10b6c0: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10b6c3: 0f b7 70 10 movzwl 0x10(%eax),%esi 10b6c7: 89 73 08 mov %esi,0x8(%ebx) 10b6ca: ba 01 00 00 00 mov $0x1,%edx 10b6cf: 31 c9 xor %ecx,%ecx for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10b6d1: eb 0b jmp 10b6de <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) 10b6d3: 8b 78 1c mov 0x1c(%eax),%edi unallocated++; 10b6d6: 83 3c 97 01 cmpl $0x1,(%edi,%edx,4) 10b6da: 83 d1 00 adc $0x0,%ecx 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++ ) 10b6dd: 42 inc %edx 10b6de: 39 f2 cmp %esi,%edx 10b6e0: 76 f1 jbe 10b6d3 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10b6e2: 89 4b 10 mov %ecx,0x10(%ebx) 10b6e5: 31 d2 xor %edx,%edx return RTEMS_SUCCESSFUL; } 10b6e7: 89 d0 mov %edx,%eax 10b6e9: 8d 65 f4 lea -0xc(%ebp),%esp 10b6ec: 5b pop %ebx 10b6ed: 5e pop %esi 10b6ee: 5f pop %edi 10b6ef: c9 leave 10b6f0: c3 ret 0010a20c : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10a20c: 55 push %ebp 10a20d: 89 e5 mov %esp,%ebp 10a20f: 57 push %edi 10a210: 56 push %esi 10a211: 53 push %ebx 10a212: 83 ec 1c sub $0x1c,%esp 10a215: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10a218: b8 09 00 00 00 mov $0x9,%eax 10a21d: 85 ff test %edi,%edi 10a21f: 74 50 je 10a271 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10a221: 8b 5d 08 mov 0x8(%ebp),%ebx 10a224: 85 db test %ebx,%ebx 10a226: 75 08 jne 10a230 10a228: a1 14 64 12 00 mov 0x126414,%eax 10a22d: 8b 58 08 mov 0x8(%eax),%ebx information = _Objects_Get_information_id( tmpId ); 10a230: 83 ec 0c sub $0xc,%esp 10a233: 53 push %ebx 10a234: e8 13 16 00 00 call 10b84c <_Objects_Get_information_id> 10a239: 89 c6 mov %eax,%esi if ( !information ) 10a23b: 83 c4 10 add $0x10,%esp 10a23e: 85 c0 test %eax,%eax 10a240: 74 2a je 10a26c return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10a242: 51 push %ecx 10a243: 8d 45 e4 lea -0x1c(%ebp),%eax 10a246: 50 push %eax 10a247: 53 push %ebx 10a248: 56 push %esi 10a249: e8 96 17 00 00 call 10b9e4 <_Objects_Get> switch ( location ) { 10a24e: 83 c4 10 add $0x10,%esp 10a251: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10a255: 75 15 jne 10a26c case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10a257: 52 push %edx 10a258: 57 push %edi 10a259: 50 push %eax 10a25a: 56 push %esi 10a25b: e8 68 19 00 00 call 10bbc8 <_Objects_Set_name> _Thread_Enable_dispatch(); 10a260: e8 48 20 00 00 call 10c2ad <_Thread_Enable_dispatch> 10a265: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a267: 83 c4 10 add $0x10,%esp 10a26a: eb 05 jmp 10a271 <== ALWAYS TAKEN 10a26c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a271: 8d 65 f4 lea -0xc(%ebp),%esp 10a274: 5b pop %ebx 10a275: 5e pop %esi 10a276: 5f pop %edi 10a277: c9 leave 10a278: c3 ret 00114230 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114230: 55 push %ebp 114231: 89 e5 mov %esp,%ebp 114233: 57 push %edi 114234: 56 push %esi 114235: 53 push %ebx 114236: 83 ec 1c sub $0x1c,%esp 114239: 8b 75 0c mov 0xc(%ebp),%esi 11423c: 8b 55 10 mov 0x10(%ebp),%edx 11423f: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114242: b8 03 00 00 00 mov $0x3,%eax 114247: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 11424b: 0f 84 cf 00 00 00 je 114320 return RTEMS_INVALID_NAME; if ( !starting_address ) 114251: 85 f6 test %esi,%esi 114253: 0f 84 bb 00 00 00 je 114314 return RTEMS_INVALID_ADDRESS; if ( !id ) 114259: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 11425d: 0f 84 b1 00 00 00 je 114314 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114263: 85 ff test %edi,%edi 114265: 0f 84 b0 00 00 00 je 11431b 11426b: 85 d2 test %edx,%edx 11426d: 0f 84 a8 00 00 00 je 11431b 114273: 39 fa cmp %edi,%edx 114275: 0f 82 a0 00 00 00 jb 11431b 11427b: f7 c7 03 00 00 00 test $0x3,%edi 114281: 0f 85 94 00 00 00 jne 11431b !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114287: f7 c6 03 00 00 00 test $0x3,%esi 11428d: 0f 85 81 00 00 00 jne 114314 114293: a1 c0 d5 13 00 mov 0x13d5c0,%eax 114298: 40 inc %eax 114299: a3 c0 d5 13 00 mov %eax,0x13d5c0 * 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 ); 11429e: 83 ec 0c sub $0xc,%esp 1142a1: 68 48 d4 13 00 push $0x13d448 1142a6: 89 55 e4 mov %edx,-0x1c(%ebp) 1142a9: e8 92 3c 00 00 call 117f40 <_Objects_Allocate> 1142ae: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1142b0: 83 c4 10 add $0x10,%esp 1142b3: 85 c0 test %eax,%eax 1142b5: 8b 55 e4 mov -0x1c(%ebp),%edx 1142b8: 75 0c jne 1142c6 _Thread_Enable_dispatch(); 1142ba: e8 36 49 00 00 call 118bf5 <_Thread_Enable_dispatch> 1142bf: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1142c4: eb 5a jmp 114320 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1142c6: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1142c9: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1142cc: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1142cf: 8b 45 18 mov 0x18(%ebp),%eax 1142d2: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 1142d5: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 1142dc: 57 push %edi 1142dd: 89 d0 mov %edx,%eax 1142df: 31 d2 xor %edx,%edx 1142e1: f7 f7 div %edi 1142e3: 50 push %eax 1142e4: 56 push %esi 1142e5: 8d 43 24 lea 0x24(%ebx),%eax 1142e8: 50 push %eax 1142e9: e8 9a 2a 00 00 call 116d88 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1142ee: 8b 43 08 mov 0x8(%ebx),%eax 1142f1: 0f b7 c8 movzwl %ax,%ecx 1142f4: 8b 15 64 d4 13 00 mov 0x13d464,%edx 1142fa: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1142fd: 8b 55 08 mov 0x8(%ebp),%edx 114300: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 114303: 8b 55 1c mov 0x1c(%ebp),%edx 114306: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 114308: e8 e8 48 00 00 call 118bf5 <_Thread_Enable_dispatch> 11430d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11430f: 83 c4 10 add $0x10,%esp 114312: eb 0c jmp 114320 <== ALWAYS TAKEN 114314: b8 09 00 00 00 mov $0x9,%eax 114319: eb 05 jmp 114320 <== ALWAYS TAKEN 11431b: b8 08 00 00 00 mov $0x8,%eax } 114320: 8d 65 f4 lea -0xc(%ebp),%esp 114323: 5b pop %ebx 114324: 5e pop %esi 114325: 5f pop %edi 114326: c9 leave 114327: c3 ret 00114328 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 114328: 55 push %ebp 114329: 89 e5 mov %esp,%ebp 11432b: 53 push %ebx 11432c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 11432f: 8d 45 f4 lea -0xc(%ebp),%eax 114332: 50 push %eax 114333: ff 75 08 pushl 0x8(%ebp) 114336: 68 48 d4 13 00 push $0x13d448 11433b: e8 50 40 00 00 call 118390 <_Objects_Get> 114340: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 114342: 83 c4 10 add $0x10,%esp 114345: b8 04 00 00 00 mov $0x4,%eax 11434a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11434e: 75 36 jne 114386 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 114350: 83 7b 20 00 cmpl $0x0,0x20(%ebx) 114354: 75 26 jne 11437c _Objects_Close( &_Partition_Information, &the_partition->Object ); 114356: 51 push %ecx 114357: 51 push %ecx 114358: 53 push %ebx 114359: 68 48 d4 13 00 push $0x13d448 11435e: e8 49 3c 00 00 call 117fac <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 114363: 58 pop %eax 114364: 5a pop %edx 114365: 53 push %ebx 114366: 68 48 d4 13 00 push $0x13d448 11436b: e8 bc 3e 00 00 call 11822c <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 114370: e8 80 48 00 00 call 118bf5 <_Thread_Enable_dispatch> 114375: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114377: 83 c4 10 add $0x10,%esp 11437a: eb 0a jmp 114386 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 11437c: e8 74 48 00 00 call 118bf5 <_Thread_Enable_dispatch> 114381: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114386: 8b 5d fc mov -0x4(%ebp),%ebx 114389: c9 leave 11438a: c3 ret 0011438c : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 11438c: 55 push %ebp 11438d: 89 e5 mov %esp,%ebp 11438f: 57 push %edi 114390: 56 push %esi 114391: 53 push %ebx 114392: 83 ec 1c sub $0x1c,%esp 114395: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 114398: b8 09 00 00 00 mov $0x9,%eax 11439d: 85 f6 test %esi,%esi 11439f: 74 4f je 1143f0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1143a1: 50 push %eax 1143a2: 8d 45 e4 lea -0x1c(%ebp),%eax 1143a5: 50 push %eax 1143a6: ff 75 08 pushl 0x8(%ebp) 1143a9: 68 48 d4 13 00 push $0x13d448 1143ae: e8 dd 3f 00 00 call 118390 <_Objects_Get> 1143b3: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1143b5: 83 c4 10 add $0x10,%esp 1143b8: b8 04 00 00 00 mov $0x4,%eax 1143bd: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1143c1: 75 2d jne 1143f0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 1143c3: 83 ec 0c sub $0xc,%esp 1143c6: 8d 43 24 lea 0x24(%ebx),%eax 1143c9: 50 push %eax 1143ca: e8 95 29 00 00 call 116d64 <_Chain_Get> 1143cf: 89 c7 mov %eax,%edi case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 1143d1: 83 c4 10 add $0x10,%esp 1143d4: 85 c0 test %eax,%eax 1143d6: 74 0e je 1143e6 the_partition->number_of_used_blocks += 1; 1143d8: ff 43 20 incl 0x20(%ebx) _Thread_Enable_dispatch(); 1143db: e8 15 48 00 00 call 118bf5 <_Thread_Enable_dispatch> *buffer = the_buffer; 1143e0: 89 3e mov %edi,(%esi) 1143e2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1143e4: eb 0a jmp 1143f0 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 1143e6: e8 0a 48 00 00 call 118bf5 <_Thread_Enable_dispatch> 1143eb: b8 0d 00 00 00 mov $0xd,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1143f0: 8d 65 f4 lea -0xc(%ebp),%esp 1143f3: 5b pop %ebx 1143f4: 5e pop %esi 1143f5: 5f pop %edi 1143f6: c9 leave 1143f7: c3 ret 0011441c : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 11441c: 55 push %ebp 11441d: 89 e5 mov %esp,%ebp 11441f: 56 push %esi 114420: 53 push %ebx 114421: 83 ec 14 sub $0x14,%esp 114424: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 114427: 8d 45 f4 lea -0xc(%ebp),%eax 11442a: 50 push %eax 11442b: ff 75 08 pushl 0x8(%ebp) 11442e: 68 48 d4 13 00 push $0x13d448 114433: e8 58 3f 00 00 call 118390 <_Objects_Get> 114438: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11443a: 83 c4 10 add $0x10,%esp 11443d: b8 04 00 00 00 mov $0x4,%eax 114442: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114446: 75 40 jne 114488 ) { void *starting; void *ending; starting = the_partition->starting_address; 114448: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11444b: 8b 53 14 mov 0x14(%ebx),%edx 11444e: 01 c2 add %eax,%edx 114450: 39 d6 cmp %edx,%esi 114452: 0f 96 c2 setbe %dl 114455: 31 c9 xor %ecx,%ecx 114457: 39 c6 cmp %eax,%esi 114459: 0f 93 c1 setae %cl 11445c: 85 d1 test %edx,%ecx 11445e: 74 2f je 11448f return ( 114460: 89 f2 mov %esi,%edx 114462: 29 c2 sub %eax,%edx 114464: 89 d0 mov %edx,%eax 114466: 31 d2 xor %edx,%edx 114468: f7 73 18 divl 0x18(%ebx) 11446b: 85 d2 test %edx,%edx 11446d: 75 20 jne 11448f RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 11446f: 50 push %eax 114470: 50 push %eax 114471: 56 push %esi 114472: 8d 43 24 lea 0x24(%ebx),%eax 114475: 50 push %eax 114476: e8 c5 28 00 00 call 116d40 <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 11447b: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 11447e: e8 72 47 00 00 call 118bf5 <_Thread_Enable_dispatch> 114483: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114485: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114488: 8d 65 f8 lea -0x8(%ebp),%esp 11448b: 5b pop %ebx 11448c: 5e pop %esi 11448d: c9 leave 11448e: c3 ret _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11448f: e8 61 47 00 00 call 118bf5 <_Thread_Enable_dispatch> 114494: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_ADDRESS; 114499: eb ed jmp 114488 <== ALWAYS TAKEN 0011399c : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 11399c: 55 push %ebp 11399d: 89 e5 mov %esp,%ebp 11399f: 57 push %edi 1139a0: 56 push %esi 1139a1: 53 push %ebx 1139a2: 83 ec 0c sub $0xc,%esp 1139a5: 8b 75 08 mov 0x8(%ebp),%esi 1139a8: 8b 7d 10 mov 0x10(%ebp),%edi 1139ab: 8b 5d 18 mov 0x18(%ebp),%ebx register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1139ae: b8 03 00 00 00 mov $0x3,%eax 1139b3: 85 f6 test %esi,%esi 1139b5: 74 6a je 113a21 return RTEMS_INVALID_NAME; if ( !id ) 1139b7: 85 db test %ebx,%ebx 1139b9: 74 61 je 113a1c return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 1139bb: 8b 45 0c mov 0xc(%ebp),%eax 1139be: 09 f8 or %edi,%eax 1139c0: a8 03 test $0x3,%al 1139c2: 75 58 jne 113a1c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1139c4: a1 c0 d5 13 00 mov 0x13d5c0,%eax 1139c9: 40 inc %eax 1139ca: a3 c0 d5 13 00 mov %eax,0x13d5c0 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 1139cf: 83 ec 0c sub $0xc,%esp 1139d2: 68 08 d4 13 00 push $0x13d408 1139d7: e8 64 45 00 00 call 117f40 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 1139dc: 83 c4 10 add $0x10,%esp 1139df: 85 c0 test %eax,%eax 1139e1: 75 0c jne 1139ef _Thread_Enable_dispatch(); 1139e3: e8 0d 52 00 00 call 118bf5 <_Thread_Enable_dispatch> 1139e8: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1139ed: eb 32 jmp 113a21 <== ALWAYS TAKEN } the_port->internal_base = internal_start; 1139ef: 8b 55 0c mov 0xc(%ebp),%edx 1139f2: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 1139f5: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 1139f8: 8b 55 14 mov 0x14(%ebp),%edx 1139fb: 4a dec %edx 1139fc: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1139ff: 8b 50 08 mov 0x8(%eax),%edx 113a02: 0f b7 fa movzwl %dx,%edi 113a05: 8b 0d 24 d4 13 00 mov 0x13d424,%ecx 113a0b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113a0e: 89 70 0c mov %esi,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 113a11: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 113a13: e8 dd 51 00 00 call 118bf5 <_Thread_Enable_dispatch> 113a18: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113a1a: eb 05 jmp 113a21 <== ALWAYS TAKEN 113a1c: b8 09 00 00 00 mov $0x9,%eax } 113a21: 8d 65 f4 lea -0xc(%ebp),%esp 113a24: 5b pop %ebx 113a25: 5e pop %esi 113a26: 5f pop %edi 113a27: c9 leave 113a28: c3 ret 00113a80 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 113a80: 55 push %ebp 113a81: 89 e5 mov %esp,%ebp 113a83: 56 push %esi 113a84: 53 push %ebx 113a85: 83 ec 10 sub $0x10,%esp 113a88: 8b 75 0c mov 0xc(%ebp),%esi 113a8b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 113a8e: b8 09 00 00 00 mov $0x9,%eax 113a93: 85 db test %ebx,%ebx 113a95: 74 3c je 113ad3 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 113a97: 50 push %eax 113a98: 8d 45 f4 lea -0xc(%ebp),%eax 113a9b: 50 push %eax 113a9c: ff 75 08 pushl 0x8(%ebp) 113a9f: 68 08 d4 13 00 push $0x13d408 113aa4: e8 e7 48 00 00 call 118390 <_Objects_Get> 113aa9: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 113aab: 83 c4 10 add $0x10,%esp 113aae: b8 04 00 00 00 mov $0x4,%eax 113ab3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 113ab7: 75 1a jne 113ad3 case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 113ab9: 89 f0 mov %esi,%eax 113abb: 2b 42 14 sub 0x14(%edx),%eax if ( ending > the_port->length ) 113abe: 3b 42 18 cmp 0x18(%edx),%eax 113ac1: 76 04 jbe 113ac7 *internal = external; 113ac3: 89 33 mov %esi,(%ebx) 113ac5: eb 05 jmp 113acc <== ALWAYS TAKEN else *internal = _Addresses_Add_offset( the_port->internal_base, 113ac7: 03 42 10 add 0x10(%edx),%eax 113aca: 89 03 mov %eax,(%ebx) ending ); _Thread_Enable_dispatch(); 113acc: e8 24 51 00 00 call 118bf5 <_Thread_Enable_dispatch> 113ad1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113ad3: 8d 65 f8 lea -0x8(%ebp),%esp 113ad6: 5b pop %ebx 113ad7: 5e pop %esi 113ad8: c9 leave 113ad9: c3 ret 00113b00 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 113b00: 55 push %ebp 113b01: 89 e5 mov %esp,%ebp 113b03: 56 push %esi 113b04: 53 push %ebx 113b05: 83 ec 10 sub $0x10,%esp 113b08: 8b 75 0c mov 0xc(%ebp),%esi 113b0b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 113b0e: b8 09 00 00 00 mov $0x9,%eax 113b13: 85 db test %ebx,%ebx 113b15: 74 3c je 113b53 113b17: 50 push %eax 113b18: 8d 45 f4 lea -0xc(%ebp),%eax 113b1b: 50 push %eax 113b1c: ff 75 08 pushl 0x8(%ebp) 113b1f: 68 08 d4 13 00 push $0x13d408 113b24: e8 67 48 00 00 call 118390 <_Objects_Get> 113b29: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 113b2b: 83 c4 10 add $0x10,%esp 113b2e: b8 04 00 00 00 mov $0x4,%eax 113b33: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 113b37: 75 1a jne 113b53 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 113b39: 89 f0 mov %esi,%eax 113b3b: 2b 42 10 sub 0x10(%edx),%eax if ( ending > the_port->length ) 113b3e: 3b 42 18 cmp 0x18(%edx),%eax 113b41: 76 04 jbe 113b47 *external = internal; 113b43: 89 33 mov %esi,(%ebx) 113b45: eb 05 jmp 113b4c <== ALWAYS TAKEN else *external = _Addresses_Add_offset( the_port->external_base, 113b47: 03 42 14 add 0x14(%edx),%eax 113b4a: 89 03 mov %eax,(%ebx) ending ); _Thread_Enable_dispatch(); 113b4c: e8 a4 50 00 00 call 118bf5 <_Thread_Enable_dispatch> 113b51: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113b53: 8d 65 f8 lea -0x8(%ebp),%esp 113b56: 5b pop %ebx 113b57: 5e pop %esi 113b58: c9 leave 113b59: c3 ret 0011449c : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 11449c: 55 push %ebp 11449d: 89 e5 mov %esp,%ebp 11449f: 53 push %ebx 1144a0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 1144a3: 8d 45 f4 lea -0xc(%ebp),%eax 1144a6: 50 push %eax 1144a7: ff 75 08 pushl 0x8(%ebp) 1144aa: 68 88 d4 13 00 push $0x13d488 1144af: e8 dc 3e 00 00 call 118390 <_Objects_Get> 1144b4: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1144b6: 83 c4 10 add $0x10,%esp 1144b9: b8 04 00 00 00 mov $0x4,%eax 1144be: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1144c2: 75 34 jne 1144f8 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 1144c4: 8b 43 40 mov 0x40(%ebx),%eax 1144c7: 3b 05 7c d6 13 00 cmp 0x13d67c,%eax 1144cd: 74 0c je 1144db _Thread_Enable_dispatch(); 1144cf: e8 21 47 00 00 call 118bf5 <_Thread_Enable_dispatch> 1144d4: b8 17 00 00 00 mov $0x17,%eax return RTEMS_NOT_OWNER_OF_RESOURCE; 1144d9: eb 1d jmp 1144f8 <== ALWAYS TAKEN } (void) _Watchdog_Remove( &the_period->Timer ); 1144db: 83 ec 0c sub $0xc,%esp 1144de: 8d 43 10 lea 0x10(%ebx),%eax 1144e1: 50 push %eax 1144e2: e8 61 59 00 00 call 119e48 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1144e7: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1144ee: e8 02 47 00 00 call 118bf5 <_Thread_Enable_dispatch> 1144f3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1144f5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1144f8: 8b 5d fc mov -0x4(%ebp),%ebx 1144fb: c9 leave 1144fc: c3 ret 0010aaa4 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10aaa4: 55 push %ebp 10aaa5: 89 e5 mov %esp,%ebp 10aaa7: 57 push %edi 10aaa8: 56 push %esi 10aaa9: 53 push %ebx 10aaaa: 83 ec 0c sub $0xc,%esp 10aaad: 8b 75 08 mov 0x8(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10aab0: b8 03 00 00 00 mov $0x3,%eax 10aab5: 85 f6 test %esi,%esi 10aab7: 0f 84 ac 00 00 00 je 10ab69 return RTEMS_INVALID_NAME; if ( !id ) 10aabd: b0 09 mov $0x9,%al 10aabf: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10aac3: 0f 84 a0 00 00 00 je 10ab69 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aac9: a1 f0 72 12 00 mov 0x1272f0,%eax 10aace: 40 inc %eax 10aacf: a3 f0 72 12 00 mov %eax,0x1272f0 * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 10aad4: 83 ec 0c sub $0xc,%esp 10aad7: 68 f8 71 12 00 push $0x1271f8 10aadc: e8 2f 1b 00 00 call 10c610 <_Objects_Allocate> 10aae1: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10aae3: 83 c4 10 add $0x10,%esp 10aae6: 85 c0 test %eax,%eax 10aae8: 75 0c jne 10aaf6 _Thread_Enable_dispatch(); 10aaea: e8 06 28 00 00 call 10d2f5 <_Thread_Enable_dispatch> 10aaef: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10aaf4: eb 73 jmp 10ab69 <== ALWAYS TAKEN } the_period->owner = _Thread_Executing; 10aaf6: a1 ac 73 12 00 mov 0x1273ac,%eax 10aafb: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10aafe: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ab05: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10ab0c: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10ab13: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10ab1a: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 10ab21: 8d 5a 54 lea 0x54(%edx),%ebx 10ab24: b9 0e 00 00 00 mov $0xe,%ecx 10ab29: 31 c0 xor %eax,%eax 10ab2b: 89 df mov %ebx,%edi 10ab2d: f3 ab rep stos %eax,%es:(%edi) 10ab2f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ab36: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ab3d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ab44: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ab4b: 8b 42 08 mov 0x8(%edx),%eax 10ab4e: 0f b7 d8 movzwl %ax,%ebx 10ab51: 8b 0d 14 72 12 00 mov 0x127214,%ecx 10ab57: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10ab5a: 89 72 0c mov %esi,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10ab5d: 8b 55 0c mov 0xc(%ebp),%edx 10ab60: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10ab62: e8 8e 27 00 00 call 10d2f5 <_Thread_Enable_dispatch> 10ab67: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10ab69: 8d 65 f4 lea -0xc(%ebp),%esp 10ab6c: 5b pop %ebx 10ab6d: 5e pop %esi 10ab6e: 5f pop %edi 10ab6f: c9 leave 10ab70: c3 ret 00135084 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 135084: 55 push %ebp 135085: 89 e5 mov %esp,%ebp 135087: 53 push %ebx 135088: 83 ec 24 sub $0x24,%esp 13508b: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 13508e: b8 09 00 00 00 mov $0x9,%eax 135093: 85 db test %ebx,%ebx 135095: 0f 84 93 00 00 00 je 13512e 13509b: 52 push %edx 13509c: 8d 45 f4 lea -0xc(%ebp),%eax 13509f: 50 push %eax 1350a0: ff 75 08 pushl 0x8(%ebp) 1350a3: 68 50 47 16 00 push $0x164750 1350a8: e8 c3 bc fd ff call 110d70 <_Objects_Get> 1350ad: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1350af: 83 c4 10 add $0x10,%esp 1350b2: b8 04 00 00 00 mov $0x4,%eax 1350b7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1350bb: 75 71 jne 13512e case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 1350bd: 8b 42 40 mov 0x40(%edx),%eax 1350c0: 8b 40 08 mov 0x8(%eax),%eax 1350c3: 89 03 mov %eax,(%ebx) status->state = the_period->state; 1350c5: 8b 42 38 mov 0x38(%edx),%eax 1350c8: 89 43 04 mov %eax,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 1350cb: 85 c0 test %eax,%eax 1350cd: 75 1e jne 1350ed #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 1350cf: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1350d6: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 1350dd: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 1350e4: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) 1350eb: eb 3a jmp 135127 <== ALWAYS TAKEN /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 1350ed: 50 push %eax 1350ee: 8d 45 ec lea -0x14(%ebp),%eax 1350f1: 50 push %eax 1350f2: 8d 45 e4 lea -0x1c(%ebp),%eax 1350f5: 50 push %eax 1350f6: 52 push %edx 1350f7: e8 a0 00 00 00 call 13519c <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { 1350fc: 83 c4 10 add $0x10,%esp 1350ff: 84 c0 test %al,%al 135101: 75 0c jne 13510f _Thread_Enable_dispatch(); 135103: e8 09 c5 fd ff call 111611 <_Thread_Enable_dispatch> 135108: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 13510d: eb 1f jmp 13512e <== ALWAYS TAKEN } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 13510f: 8b 45 e4 mov -0x1c(%ebp),%eax 135112: 8b 55 e8 mov -0x18(%ebp),%edx 135115: 89 43 08 mov %eax,0x8(%ebx) 135118: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 13511b: 8b 45 ec mov -0x14(%ebp),%eax 13511e: 8b 55 f0 mov -0x10(%ebp),%edx 135121: 89 43 10 mov %eax,0x10(%ebx) 135124: 89 53 14 mov %edx,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 135127: e8 e5 c4 fd ff call 111611 <_Thread_Enable_dispatch> 13512c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13512e: 8b 5d fc mov -0x4(%ebp),%ebx 135131: c9 leave 135132: c3 ret 00135309 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 135309: 55 push %ebp 13530a: 89 e5 mov %esp,%ebp 13530c: 57 push %edi 13530d: 56 push %esi 13530e: 53 push %ebx 13530f: 83 ec 30 sub $0x30,%esp 135312: 8b 75 08 mov 0x8(%ebp),%esi 135315: 8b 5d 0c mov 0xc(%ebp),%ebx 135318: 8d 45 e4 lea -0x1c(%ebp),%eax 13531b: 50 push %eax 13531c: 56 push %esi 13531d: 68 50 47 16 00 push $0x164750 135322: e8 49 ba fd ff call 110d70 <_Objects_Get> 135327: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 135329: 83 c4 10 add $0x10,%esp 13532c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 135330: 0f 85 40 01 00 00 jne 135476 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 135336: 8b 40 40 mov 0x40(%eax),%eax 135339: 3b 05 88 3c 16 00 cmp 0x163c88,%eax 13533f: 74 0f je 135350 _Thread_Enable_dispatch(); 135341: e8 cb c2 fd ff call 111611 <_Thread_Enable_dispatch> 135346: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 13534b: e9 2b 01 00 00 jmp 13547b <== ALWAYS TAKEN } if ( length == RTEMS_PERIOD_STATUS ) { 135350: 85 db test %ebx,%ebx 135352: 75 19 jne 13536d switch ( the_period->state ) { 135354: 8b 47 38 mov 0x38(%edi),%eax 135357: 83 f8 04 cmp $0x4,%eax 13535a: 77 07 ja 135363 <== ALWAYS TAKEN 13535c: 8b 1c 85 28 97 15 00 mov 0x159728(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 135363: e8 a9 c2 fd ff call 111611 <_Thread_Enable_dispatch> return( return_value ); 135368: e9 0e 01 00 00 jmp 13547b <== ALWAYS TAKEN } _ISR_Disable( level ); 13536d: 9c pushf 13536e: fa cli 13536f: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 135372: 8b 47 38 mov 0x38(%edi),%eax 135375: 83 f8 02 cmp $0x2,%eax 135378: 74 5f je 1353d9 13537a: 83 f8 04 cmp $0x4,%eax 13537d: 0f 84 ba 00 00 00 je 13543d 135383: 85 c0 test %eax,%eax 135385: 0f 85 eb 00 00 00 jne 135476 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13538b: ff 75 d4 pushl -0x2c(%ebp) 13538e: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13538f: 83 ec 0c sub $0xc,%esp 135392: 57 push %edi 135393: e8 9c fd ff ff call 135134 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; 135398: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 13539f: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 1353a6: c7 47 2c 88 54 13 00 movl $0x135488,0x2c(%edi) the_watchdog->id = id; 1353ad: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 1353b0: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 1353b7: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1353ba: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1353bd: 5b pop %ebx 1353be: 5e pop %esi 1353bf: 83 c7 10 add $0x10,%edi 1353c2: 57 push %edi 1353c3: 68 a8 3c 16 00 push $0x163ca8 1353c8: e8 03 d0 fd ff call 1123d0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 1353cd: e8 3f c2 fd ff call 111611 <_Thread_Enable_dispatch> 1353d2: 31 db xor %ebx,%ebx 1353d4: e9 98 00 00 00 jmp 135471 <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 1353d9: 83 ec 0c sub $0xc,%esp 1353dc: 57 push %edi 1353dd: e8 4c fe ff ff call 13522e <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN /* * 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; 1353e2: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 1353e9: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 1353ec: ff 75 d4 pushl -0x2c(%ebp) 1353ef: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 1353f0: a1 88 3c 16 00 mov 0x163c88,%eax 1353f5: 8b 57 08 mov 0x8(%edi),%edx 1353f8: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 1353fb: 5a pop %edx 1353fc: 59 pop %ecx 1353fd: 68 00 40 00 00 push $0x4000 135402: 50 push %eax 135403: e8 f4 c9 fd ff call 111dfc <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 135408: 9c pushf 135409: fa cli 13540a: 5a pop %edx local_state = the_period->state; 13540b: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 13540e: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 135415: 52 push %edx 135416: 9d popf /* * 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 ) 135417: 83 c4 10 add $0x10,%esp 13541a: 83 f8 03 cmp $0x3,%eax 13541d: 75 15 jne 135434 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13541f: 56 push %esi 135420: 56 push %esi 135421: 68 00 40 00 00 push $0x4000 135426: ff 35 88 3c 16 00 pushl 0x163c88 13542c: e8 63 be fd ff call 111294 <_Thread_Clear_state> 135431: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 135434: e8 d8 c1 fd ff call 111611 <_Thread_Enable_dispatch> 135439: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 13543b: eb 3e jmp 13547b <== ALWAYS TAKEN case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 13543d: 83 ec 0c sub $0xc,%esp 135440: 57 push %edi 135441: e8 e8 fd ff ff call 13522e <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN _ISR_Enable( level ); 135446: ff 75 d4 pushl -0x2c(%ebp) 135449: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13544a: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 135451: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 135454: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 135457: 59 pop %ecx 135458: 5b pop %ebx 135459: 83 c7 10 add $0x10,%edi 13545c: 57 push %edi 13545d: 68 a8 3c 16 00 push $0x163ca8 135462: e8 69 cf fd ff call 1123d0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 135467: e8 a5 c1 fd ff call 111611 <_Thread_Enable_dispatch> 13546c: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 135471: 83 c4 10 add $0x10,%esp 135474: eb 05 jmp 13547b <== ALWAYS TAKEN 135476: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13547b: 89 d8 mov %ebx,%eax 13547d: 8d 65 f4 lea -0xc(%ebp),%esp 135480: 5b pop %ebx 135481: 5e pop %esi 135482: 5f pop %edi 135483: c9 leave 135484: c3 ret 0012794c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12794c: 55 push %ebp 12794d: 89 e5 mov %esp,%ebp 12794f: 57 push %edi 127950: 56 push %esi 127951: 53 push %ebx 127952: 83 ec 7c sub $0x7c,%esp 127955: 8b 5d 08 mov 0x8(%ebp),%ebx 127958: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 12795b: 85 ff test %edi,%edi 12795d: 0f 84 2b 01 00 00 je 127a8e <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 127963: 52 push %edx 127964: 52 push %edx 127965: 68 20 61 15 00 push $0x156120 12796a: 53 push %ebx 12796b: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12796d: 5e pop %esi 12796e: 58 pop %eax 12796f: 68 3e 61 15 00 push $0x15613e 127974: 53 push %ebx 127975: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 127977: 5a pop %edx 127978: 59 pop %ecx 127979: 68 60 61 15 00 push $0x156160 12797e: 53 push %ebx 12797f: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 127981: 5e pop %esi 127982: 58 pop %eax 127983: 68 83 61 15 00 push $0x156183 127988: 53 push %ebx 127989: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12798b: 5a pop %edx 12798c: 59 pop %ecx 12798d: 68 ce 61 15 00 push $0x1561ce 127992: 53 push %ebx 127993: ff d7 call *%edi /* * 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 ; 127995: 8b 35 58 47 16 00 mov 0x164758,%esi 12799b: 83 c4 10 add $0x10,%esp 12799e: e9 df 00 00 00 jmp 127a82 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1279a3: 50 push %eax 1279a4: 50 push %eax 1279a5: 8d 45 88 lea -0x78(%ebp),%eax 1279a8: 50 push %eax 1279a9: 56 push %esi 1279aa: e8 31 d6 00 00 call 134fe0 if ( status != RTEMS_SUCCESSFUL ) 1279af: 83 c4 10 add $0x10,%esp 1279b2: 85 c0 test %eax,%eax 1279b4: 0f 85 c7 00 00 00 jne 127a81 <== ALWAYS TAKEN continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 1279ba: 51 push %ecx 1279bb: 51 push %ecx 1279bc: 8d 55 c0 lea -0x40(%ebp),%edx 1279bf: 52 push %edx 1279c0: 56 push %esi 1279c1: e8 be d6 00 00 call 135084 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 1279c6: 83 c4 0c add $0xc,%esp 1279c9: 8d 45 e3 lea -0x1d(%ebp),%eax 1279cc: 50 push %eax 1279cd: 6a 05 push $0x5 1279cf: ff 75 c0 pushl -0x40(%ebp) 1279d2: e8 d5 78 fe ff call 10f2ac /* * Print part of report line that is not dependent on granularity */ (*print)( context, 1279d7: 58 pop %eax 1279d8: 5a pop %edx 1279d9: ff 75 8c pushl -0x74(%ebp) 1279dc: ff 75 88 pushl -0x78(%ebp) 1279df: 8d 55 e3 lea -0x1d(%ebp),%edx 1279e2: 52 push %edx 1279e3: 56 push %esi 1279e4: 68 1a 62 15 00 push $0x15621a 1279e9: 53 push %ebx 1279ea: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1279ec: 8b 45 88 mov -0x78(%ebp),%eax 1279ef: 83 c4 20 add $0x20,%esp 1279f2: 85 c0 test %eax,%eax 1279f4: 75 0f jne 127a05 (*print)( context, "\n" ); 1279f6: 51 push %ecx 1279f7: 51 push %ecx 1279f8: 68 d5 7b 15 00 push $0x157bd5 1279fd: 53 push %ebx 1279fe: ff d7 call *%edi continue; 127a00: 83 c4 10 add $0x10,%esp 127a03: eb 7c jmp 127a81 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 ); 127a05: 52 push %edx 127a06: 8d 55 d8 lea -0x28(%ebp),%edx 127a09: 52 push %edx 127a0a: 50 push %eax 127a0b: 8d 45 a0 lea -0x60(%ebp),%eax 127a0e: 50 push %eax 127a0f: e8 b4 14 00 00 call 128ec8 <_Timespec_Divide_by_integer> (*print)( context, 127a14: 8b 45 dc mov -0x24(%ebp),%eax 127a17: b9 e8 03 00 00 mov $0x3e8,%ecx 127a1c: 99 cltd 127a1d: f7 f9 idiv %ecx 127a1f: 50 push %eax 127a20: ff 75 d8 pushl -0x28(%ebp) 127a23: 8b 45 9c mov -0x64(%ebp),%eax 127a26: 99 cltd 127a27: f7 f9 idiv %ecx 127a29: 50 push %eax 127a2a: ff 75 98 pushl -0x68(%ebp) 127a2d: 8b 45 94 mov -0x6c(%ebp),%eax 127a30: 99 cltd 127a31: f7 f9 idiv %ecx 127a33: 50 push %eax 127a34: ff 75 90 pushl -0x70(%ebp) 127a37: 68 31 62 15 00 push $0x156231 127a3c: 53 push %ebx 127a3d: 89 4d 84 mov %ecx,-0x7c(%ebp) 127a40: ff d7 call *%edi 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); 127a42: 83 c4 2c add $0x2c,%esp 127a45: 8d 55 d8 lea -0x28(%ebp),%edx 127a48: 52 push %edx 127a49: ff 75 88 pushl -0x78(%ebp) 127a4c: 8d 45 b8 lea -0x48(%ebp),%eax 127a4f: 50 push %eax 127a50: e8 73 14 00 00 call 128ec8 <_Timespec_Divide_by_integer> (*print)( context, 127a55: 8b 45 dc mov -0x24(%ebp),%eax 127a58: 8b 4d 84 mov -0x7c(%ebp),%ecx 127a5b: 99 cltd 127a5c: f7 f9 idiv %ecx 127a5e: 50 push %eax 127a5f: ff 75 d8 pushl -0x28(%ebp) 127a62: 8b 45 b4 mov -0x4c(%ebp),%eax 127a65: 99 cltd 127a66: f7 f9 idiv %ecx 127a68: 50 push %eax 127a69: ff 75 b0 pushl -0x50(%ebp) 127a6c: 8b 45 ac mov -0x54(%ebp),%eax 127a6f: 99 cltd 127a70: f7 f9 idiv %ecx 127a72: 50 push %eax 127a73: ff 75 a8 pushl -0x58(%ebp) 127a76: 68 50 62 15 00 push $0x156250 127a7b: 53 push %ebx 127a7c: ff d7 call *%edi 127a7e: 83 c4 30 add $0x30,%esp * 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++ ) { 127a81: 46 inc %esi /* * 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 ; 127a82: 3b 35 5c 47 16 00 cmp 0x16475c,%esi 127a88: 0f 86 15 ff ff ff jbe 1279a3 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 127a8e: 8d 65 f4 lea -0xc(%ebp),%esp 127a91: 5b pop %ebx 127a92: 5e pop %esi 127a93: 5f pop %edi 127a94: c9 leave 127a95: c3 ret 00127ab0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 127ab0: 55 push %ebp 127ab1: 89 e5 mov %esp,%ebp 127ab3: 53 push %ebx 127ab4: 83 ec 04 sub $0x4,%esp 127ab7: a1 cc 3b 16 00 mov 0x163bcc,%eax 127abc: 40 inc %eax 127abd: a3 cc 3b 16 00 mov %eax,0x163bcc /* * 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 ; 127ac2: 8b 1d 58 47 16 00 mov 0x164758,%ebx 127ac8: eb 0d jmp 127ad7 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 127aca: 83 ec 0c sub $0xc,%esp 127acd: 53 push %ebx 127ace: e8 15 00 00 00 call 127ae8 <== ALWAYS TAKEN * 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++ ) { 127ad3: 43 inc %ebx 127ad4: 83 c4 10 add $0x10,%esp /* * 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 ; 127ad7: 3b 1d 5c 47 16 00 cmp 0x16475c,%ebx 127add: 76 eb jbe 127aca /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 127adf: 8b 5d fc mov -0x4(%ebp),%ebx 127ae2: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 127ae3: e9 29 9b fe ff jmp 111611 <_Thread_Enable_dispatch> 00114b8c : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 114b8c: 55 push %ebp 114b8d: 89 e5 mov %esp,%ebp 114b8f: 57 push %edi 114b90: 56 push %esi 114b91: 53 push %ebx 114b92: 83 ec 1c sub $0x1c,%esp 114b95: 8b 75 0c mov 0xc(%ebp),%esi 114b98: 8b 7d 14 mov 0x14(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 114b9b: b8 03 00 00 00 mov $0x3,%eax 114ba0: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114ba4: 0f 84 de 00 00 00 je 114c88 return RTEMS_INVALID_NAME; if ( !starting_address ) 114baa: 85 f6 test %esi,%esi 114bac: 0f 84 d1 00 00 00 je 114c83 return RTEMS_INVALID_ADDRESS; if ( !id ) 114bb2: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 114bb6: 0f 84 c7 00 00 00 je 114c83 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 114bbc: f7 c6 03 00 00 00 test $0x3,%esi 114bc2: 0f 85 bb 00 00 00 jne 114c83 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 114bc8: 83 ec 0c sub $0xc,%esp 114bcb: ff 35 74 d6 13 00 pushl 0x13d674 114bd1: e8 f2 20 00 00 call 116cc8 <_API_Mutex_Lock> <== ALWAYS TAKEN * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 114bd6: c7 04 24 c8 d4 13 00 movl $0x13d4c8,(%esp) 114bdd: e8 5e 33 00 00 call 117f40 <_Objects_Allocate> 114be2: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 114be4: 83 c4 10 add $0x10,%esp 114be7: b8 05 00 00 00 mov $0x5,%eax 114bec: 85 db test %ebx,%ebx 114bee: 74 7a je 114c6a return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 114bf0: 57 push %edi 114bf1: ff 75 10 pushl 0x10(%ebp) 114bf4: 56 push %esi 114bf5: 8d 43 68 lea 0x68(%ebx),%eax 114bf8: 50 push %eax 114bf9: e8 6a 2e 00 00 call 117a68 <_Heap_Initialize> 114bfe: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 114c01: 83 c4 10 add $0x10,%esp 114c04: 85 c0 test %eax,%eax 114c06: 75 14 jne 114c1c */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 114c08: 50 push %eax 114c09: 50 push %eax 114c0a: 53 push %ebx 114c0b: 68 c8 d4 13 00 push $0x13d4c8 114c10: e8 17 36 00 00 call 11822c <_Objects_Free> 114c15: b8 08 00 00 00 mov $0x8,%eax 114c1a: eb 4b jmp 114c67 <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 114c1c: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 114c1f: 8b 45 10 mov 0x10(%ebp),%eax 114c22: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 114c25: 89 7b 58 mov %edi,0x58(%ebx) the_region->attribute_set = attribute_set; 114c28: 8b 55 18 mov 0x18(%ebp),%edx 114c2b: 89 53 60 mov %edx,0x60(%ebx) the_region->number_of_used_blocks = 0; 114c2e: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 114c35: 6a 06 push $0x6 114c37: 6a 40 push $0x40 114c39: 89 d0 mov %edx,%eax 114c3b: c1 e8 02 shr $0x2,%eax 114c3e: 83 e0 01 and $0x1,%eax 114c41: 50 push %eax 114c42: 8d 43 10 lea 0x10(%ebx),%eax 114c45: 50 push %eax 114c46: e8 81 46 00 00 call 1192cc <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114c4b: 8b 43 08 mov 0x8(%ebx),%eax 114c4e: 0f b7 c8 movzwl %ax,%ecx 114c51: 8b 15 e4 d4 13 00 mov 0x13d4e4,%edx 114c57: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114c5a: 8b 55 08 mov 0x8(%ebp),%edx 114c5d: 89 53 0c mov %edx,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 114c60: 8b 55 1c mov 0x1c(%ebp),%edx 114c63: 89 02 mov %eax,(%edx) 114c65: 31 c0 xor %eax,%eax 114c67: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 114c6a: 83 ec 0c sub $0xc,%esp 114c6d: ff 35 74 d6 13 00 pushl 0x13d674 114c73: 89 45 e4 mov %eax,-0x1c(%ebp) 114c76: e8 95 20 00 00 call 116d10 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 114c7b: 83 c4 10 add $0x10,%esp 114c7e: 8b 45 e4 mov -0x1c(%ebp),%eax 114c81: eb 05 jmp 114c88 <== ALWAYS TAKEN 114c83: b8 09 00 00 00 mov $0x9,%eax } 114c88: 8d 65 f4 lea -0xc(%ebp),%esp 114c8b: 5b pop %ebx 114c8c: 5e pop %esi 114c8d: 5f pop %edi 114c8e: c9 leave 114c8f: c3 ret 00114c90 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 114c90: 55 push %ebp 114c91: 89 e5 mov %esp,%ebp 114c93: 56 push %esi 114c94: 53 push %ebx 114c95: 83 ec 1c sub $0x1c,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 114c98: ff 35 74 d6 13 00 pushl 0x13d674 114c9e: e8 25 20 00 00 call 116cc8 <_API_Mutex_Lock> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 114ca3: 83 c4 0c add $0xc,%esp 114ca6: 8d 45 f4 lea -0xc(%ebp),%eax 114ca9: 50 push %eax 114caa: ff 75 08 pushl 0x8(%ebp) 114cad: 68 c8 d4 13 00 push $0x13d4c8 114cb2: e8 9d 36 00 00 call 118354 <_Objects_Get_no_protection> 114cb7: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 114cb9: 83 c4 10 add $0x10,%esp 114cbc: bb 04 00 00 00 mov $0x4,%ebx 114cc1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114cc5: 75 27 jne 114cee case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 114cc7: b3 0c mov $0xc,%bl 114cc9: 83 78 64 00 cmpl $0x0,0x64(%eax) 114ccd: 75 1f jne 114cee return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 114ccf: 51 push %ecx 114cd0: 51 push %ecx 114cd1: 50 push %eax 114cd2: 68 c8 d4 13 00 push $0x13d4c8 114cd7: e8 d0 32 00 00 call 117fac <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 114cdc: 58 pop %eax 114cdd: 5a pop %edx 114cde: 56 push %esi 114cdf: 68 c8 d4 13 00 push $0x13d4c8 114ce4: e8 43 35 00 00 call 11822c <_Objects_Free> 114ce9: 30 db xor %bl,%bl 114ceb: 83 c4 10 add $0x10,%esp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114cee: 83 ec 0c sub $0xc,%esp 114cf1: ff 35 74 d6 13 00 pushl 0x13d674 114cf7: e8 14 20 00 00 call 116d10 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } 114cfc: 89 d8 mov %ebx,%eax 114cfe: 8d 65 f8 lea -0x8(%ebp),%esp 114d01: 5b pop %ebx 114d02: 5e pop %esi 114d03: c9 leave 114d04: c3 ret 00114d08 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 114d08: 55 push %ebp 114d09: 89 e5 mov %esp,%ebp 114d0b: 57 push %edi 114d0c: 56 push %esi 114d0d: 53 push %ebx 114d0e: 83 ec 1c sub $0x1c,%esp 114d11: 8b 75 0c mov 0xc(%ebp),%esi Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 114d14: bf 09 00 00 00 mov $0x9,%edi 114d19: 85 f6 test %esi,%esi 114d1b: 74 76 je 114d93 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 114d1d: 83 ec 0c sub $0xc,%esp 114d20: ff 35 74 d6 13 00 pushl 0x13d674 114d26: e8 9d 1f 00 00 call 116cc8 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 114d2b: 83 c4 0c add $0xc,%esp 114d2e: 8d 45 e0 lea -0x20(%ebp),%eax 114d31: 50 push %eax 114d32: ff 75 08 pushl 0x8(%ebp) 114d35: 68 c8 d4 13 00 push $0x13d4c8 114d3a: e8 15 36 00 00 call 118354 <_Objects_Get_no_protection> 114d3f: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 114d41: 83 c4 10 add $0x10,%esp 114d44: 66 bf 04 00 mov $0x4,%di 114d48: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 114d4c: 75 34 jne 114d82 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 114d4e: 8d 45 e4 lea -0x1c(%ebp),%eax 114d51: 50 push %eax 114d52: ff 75 10 pushl 0x10(%ebp) 114d55: 56 push %esi 114d56: 8d 43 68 lea 0x68(%ebx),%eax 114d59: 50 push %eax 114d5a: e8 61 2a 00 00 call 1177c0 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 114d5f: 83 c4 10 add $0x10,%esp 114d62: 85 c0 test %eax,%eax 114d64: 75 0e jne 114d74 the_region->length += amount_extended; 114d66: 8b 45 e4 mov -0x1c(%ebp),%eax 114d69: 01 43 54 add %eax,0x54(%ebx) the_region->maximum_segment_size += amount_extended; 114d6c: 01 43 5c add %eax,0x5c(%ebx) 114d6f: 66 31 ff xor %di,%di 114d72: eb 0e jmp 114d82 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 114d74: 48 dec %eax 114d75: 0f 95 c0 setne %al 114d78: 0f b6 f8 movzbl %al,%edi 114d7b: 4f dec %edi 114d7c: 83 e7 f1 and $0xfffffff1,%edi 114d7f: 83 c7 18 add $0x18,%edi default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114d82: 83 ec 0c sub $0xc,%esp 114d85: ff 35 74 d6 13 00 pushl 0x13d674 114d8b: e8 80 1f 00 00 call 116d10 <_API_Mutex_Unlock> return return_status; 114d90: 83 c4 10 add $0x10,%esp } 114d93: 89 f8 mov %edi,%eax 114d95: 8d 65 f4 lea -0xc(%ebp),%esp 114d98: 5b pop %ebx 114d99: 5e pop %esi 114d9a: 5f pop %edi 114d9b: c9 leave 114d9c: c3 ret 00114e94 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 114e94: 55 push %ebp 114e95: 89 e5 mov %esp,%ebp 114e97: 57 push %edi 114e98: 56 push %esi 114e99: 53 push %ebx 114e9a: 83 ec 2c sub $0x2c,%esp 114e9d: 8b 7d 18 mov 0x18(%ebp),%edi Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 114ea0: b8 09 00 00 00 mov $0x9,%eax 114ea5: 85 ff test %edi,%edi 114ea7: 0f 84 eb 00 00 00 je 114f98 return RTEMS_INVALID_ADDRESS; *segment = NULL; 114ead: c7 07 00 00 00 00 movl $0x0,(%edi) if ( size == 0 ) 114eb3: b0 08 mov $0x8,%al 114eb5: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 114eb9: 0f 84 d9 00 00 00 je 114f98 return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 114ebf: 83 ec 0c sub $0xc,%esp 114ec2: ff 35 74 d6 13 00 pushl 0x13d674 114ec8: e8 fb 1d 00 00 call 116cc8 <_API_Mutex_Lock> <== ALWAYS TAKEN executing = _Thread_Executing; 114ecd: 8b 35 7c d6 13 00 mov 0x13d67c,%esi 114ed3: 83 c4 0c add $0xc,%esp 114ed6: 8d 45 e4 lea -0x1c(%ebp),%eax 114ed9: 50 push %eax 114eda: ff 75 08 pushl 0x8(%ebp) 114edd: 68 c8 d4 13 00 push $0x13d4c8 114ee2: e8 6d 34 00 00 call 118354 <_Objects_Get_no_protection> 114ee7: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 114ee9: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 114eec: b8 04 00 00 00 mov $0x4,%eax _RTEMS_Lock_allocator(); executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { 114ef1: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 114ef5: 0f 85 86 00 00 00 jne 114f81 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 114efb: b0 08 mov $0x8,%al 114efd: 8b 55 0c mov 0xc(%ebp),%edx 114f00: 3b 53 5c cmp 0x5c(%ebx),%edx 114f03: 77 7c ja 114f81 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 114f05: 6a 00 push $0x0 114f07: 6a 00 push $0x0 114f09: 52 push %edx 114f0a: 8d 43 68 lea 0x68(%ebx),%eax 114f0d: 50 push %eax 114f0e: e8 4d 27 00 00 call 117660 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 114f13: 83 c4 10 add $0x10,%esp 114f16: 85 c0 test %eax,%eax 114f18: 74 09 je 114f23 the_region->number_of_used_blocks += 1; 114f1a: ff 43 64 incl 0x64(%ebx) *segment = the_segment; 114f1d: 89 07 mov %eax,(%edi) 114f1f: 31 c0 xor %eax,%eax 114f21: eb 5e jmp 114f81 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 114f23: b8 0d 00 00 00 mov $0xd,%eax 114f28: f6 45 10 01 testb $0x1,0x10(%ebp) 114f2c: 75 53 jne 114f81 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 114f2e: a1 c0 d5 13 00 mov 0x13d5c0,%eax 114f33: 40 inc %eax 114f34: a3 c0 d5 13 00 mov %eax,0x13d5c0 * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 114f39: 83 ec 0c sub $0xc,%esp 114f3c: ff 35 74 d6 13 00 pushl 0x13d674 114f42: e8 c9 1d 00 00 call 116d10 <_API_Mutex_Unlock> <== ALWAYS TAKEN executing->Wait.queue = &the_region->Wait_queue; 114f47: 8d 43 10 lea 0x10(%ebx),%eax 114f4a: 89 46 44 mov %eax,0x44(%esi) executing->Wait.id = id; 114f4d: 8b 55 08 mov 0x8(%ebp),%edx 114f50: 89 56 20 mov %edx,0x20(%esi) executing->Wait.count = size; 114f53: 8b 55 0c mov 0xc(%ebp),%edx 114f56: 89 56 24 mov %edx,0x24(%esi) executing->Wait.return_argument = segment; 114f59: 89 7e 28 mov %edi,0x28(%esi) 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; 114f5c: c7 43 40 01 00 00 00 movl $0x1,0x40(%ebx) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 114f63: 83 c4 0c add $0xc,%esp 114f66: 68 70 93 11 00 push $0x119370 114f6b: ff 75 14 pushl 0x14(%ebp) 114f6e: 50 push %eax 114f6f: e8 40 41 00 00 call 1190b4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 114f74: e8 7c 3c 00 00 call 118bf5 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 114f79: 8b 46 34 mov 0x34(%esi),%eax 114f7c: 83 c4 10 add $0x10,%esp 114f7f: eb 17 jmp 114f98 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114f81: 83 ec 0c sub $0xc,%esp 114f84: ff 35 74 d6 13 00 pushl 0x13d674 114f8a: 89 45 d4 mov %eax,-0x2c(%ebp) 114f8d: e8 7e 1d 00 00 call 116d10 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 114f92: 83 c4 10 add $0x10,%esp 114f95: 8b 45 d4 mov -0x2c(%ebp),%eax } 114f98: 8d 65 f4 lea -0xc(%ebp),%esp 114f9b: 5b pop %ebx 114f9c: 5e pop %esi 114f9d: 5f pop %edi 114f9e: c9 leave 114f9f: c3 ret 00114fa0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 114fa0: 55 push %ebp 114fa1: 89 e5 mov %esp,%ebp 114fa3: 56 push %esi 114fa4: 53 push %ebx 114fa5: 83 ec 10 sub $0x10,%esp 114fa8: 8b 5d 0c mov 0xc(%ebp),%ebx 114fab: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 114fae: 85 db test %ebx,%ebx 114fb0: 74 65 je 115017 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !size ) 114fb2: 85 f6 test %esi,%esi 114fb4: 74 61 je 115017 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 114fb6: 83 ec 0c sub $0xc,%esp 114fb9: ff 35 74 d6 13 00 pushl 0x13d674 114fbf: e8 04 1d 00 00 call 116cc8 <_API_Mutex_Lock> <== ALWAYS TAKEN 114fc4: 83 c4 0c add $0xc,%esp 114fc7: 8d 45 f4 lea -0xc(%ebp),%eax 114fca: 50 push %eax 114fcb: ff 75 08 pushl 0x8(%ebp) 114fce: 68 c8 d4 13 00 push $0x13d4c8 114fd3: e8 7c 33 00 00 call 118354 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 114fd8: 83 c4 10 add $0x10,%esp 114fdb: 8b 55 f4 mov -0xc(%ebp),%edx 114fde: 85 d2 test %edx,%edx 114fe0: 74 08 je 114fea 114fe2: bb 04 00 00 00 mov $0x4,%ebx 114fe7: 4a dec %edx 114fe8: eb 16 jmp 115000 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 114fea: 52 push %edx 114feb: 56 push %esi 114fec: 53 push %ebx 114fed: 83 c0 68 add $0x68,%eax 114ff0: 50 push %eax 114ff1: e8 52 2e 00 00 call 117e48 <_Heap_Size_of_alloc_area> 114ff6: 83 c4 10 add $0x10,%esp 114ff9: bb 09 00 00 00 mov $0x9,%ebx 114ffe: 84 c0 test %al,%al 115000: 74 02 je 115004 115002: 31 db xor %ebx,%ebx case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 115004: 83 ec 0c sub $0xc,%esp 115007: ff 35 74 d6 13 00 pushl 0x13d674 11500d: e8 fe 1c 00 00 call 116d10 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 115012: 83 c4 10 add $0x10,%esp 115015: eb 05 jmp 11501c <== ALWAYS TAKEN 115017: bb 09 00 00 00 mov $0x9,%ebx } 11501c: 89 d8 mov %ebx,%eax 11501e: 8d 65 f8 lea -0x8(%ebp),%esp 115021: 5b pop %ebx 115022: 5e pop %esi 115023: c9 leave 115024: c3 ret 0011504c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 11504c: 55 push %ebp 11504d: 89 e5 mov %esp,%ebp 11504f: 57 push %edi 115050: 56 push %esi 115051: 53 push %ebx 115052: 83 ec 1c sub $0x1c,%esp 115055: 8b 75 14 mov 0x14(%ebp),%esi uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 115058: 85 f6 test %esi,%esi 11505a: 0f 84 95 00 00 00 je 1150f5 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 115060: 83 ec 0c sub $0xc,%esp 115063: ff 35 74 d6 13 00 pushl 0x13d674 115069: e8 5a 1c 00 00 call 116cc8 <_API_Mutex_Lock> 11506e: 83 c4 0c add $0xc,%esp 115071: 8d 45 e0 lea -0x20(%ebp),%eax 115074: 50 push %eax 115075: ff 75 08 pushl 0x8(%ebp) 115078: 68 c8 d4 13 00 push $0x13d4c8 11507d: e8 d2 32 00 00 call 118354 <_Objects_Get_no_protection> 115082: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 115084: 83 c4 10 add $0x10,%esp 115087: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 11508b: 75 50 jne 1150dd case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 11508d: 83 ec 0c sub $0xc,%esp 115090: 8d 45 e4 lea -0x1c(%ebp),%eax 115093: 50 push %eax 115094: 8d 45 dc lea -0x24(%ebp),%eax 115097: 50 push %eax 115098: ff 75 10 pushl 0x10(%ebp) 11509b: ff 75 0c pushl 0xc(%ebp) 11509e: 8d 43 68 lea 0x68(%ebx),%eax 1150a1: 50 push %eax 1150a2: e8 b1 2c 00 00 call 117d58 <_Heap_Resize_block> 1150a7: 89 c7 mov %eax,%edi segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1150a9: 8b 45 dc mov -0x24(%ebp),%eax 1150ac: 89 06 mov %eax,(%esi) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1150ae: 83 c4 20 add $0x20,%esp 1150b1: 85 ff test %edi,%edi 1150b3: 75 0d jne 1150c2 _Region_Process_queue( the_region ); /* unlocks allocator */ 1150b5: 83 ec 0c sub $0xc,%esp 1150b8: 53 push %ebx 1150b9: e8 ae 6b 00 00 call 11bc6c <_Region_Process_queue> 1150be: 31 c0 xor %eax,%eax 1150c0: eb 2e jmp 1150f0 <== ALWAYS TAKEN else _RTEMS_Unlock_allocator(); 1150c2: 83 ec 0c sub $0xc,%esp 1150c5: ff 35 74 d6 13 00 pushl 0x13d674 1150cb: e8 40 1c 00 00 call 116d10 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1150d0: 83 c4 10 add $0x10,%esp 1150d3: b8 0d 00 00 00 mov $0xd,%eax 1150d8: 4f dec %edi 1150d9: 75 1a jne 1150f5 1150db: eb 1d jmp 1150fa <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1150dd: 83 ec 0c sub $0xc,%esp 1150e0: ff 35 74 d6 13 00 pushl 0x13d674 1150e6: e8 25 1c 00 00 call 116d10 <_API_Mutex_Unlock> 1150eb: b8 04 00 00 00 mov $0x4,%eax return return_status; 1150f0: 83 c4 10 add $0x10,%esp 1150f3: eb 05 jmp 1150fa <== ALWAYS TAKEN 1150f5: b8 09 00 00 00 mov $0x9,%eax } 1150fa: 8d 65 f4 lea -0xc(%ebp),%esp 1150fd: 5b pop %ebx 1150fe: 5e pop %esi 1150ff: 5f pop %edi 115100: c9 leave 115101: c3 ret 00115104 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 115104: 55 push %ebp 115105: 89 e5 mov %esp,%ebp 115107: 56 push %esi 115108: 53 push %ebx 115109: 83 ec 1c sub $0x1c,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11510c: ff 35 74 d6 13 00 pushl 0x13d674 115112: e8 b1 1b 00 00 call 116cc8 <_API_Mutex_Lock> <== ALWAYS TAKEN 115117: 83 c4 0c add $0xc,%esp 11511a: 8d 45 f4 lea -0xc(%ebp),%eax 11511d: 50 push %eax 11511e: ff 75 08 pushl 0x8(%ebp) 115121: 68 c8 d4 13 00 push $0x13d4c8 115126: e8 29 32 00 00 call 118354 <_Objects_Get_no_protection> 11512b: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 11512d: 83 c4 10 add $0x10,%esp 115130: be 04 00 00 00 mov $0x4,%esi 115135: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115139: 75 2a jne 115165 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11513b: 50 push %eax 11513c: 50 push %eax 11513d: ff 75 0c pushl 0xc(%ebp) 115140: 8d 43 68 lea 0x68(%ebx),%eax 115143: 50 push %eax 115144: e8 ff 26 00 00 call 117848 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 115149: 83 c4 10 add $0x10,%esp else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 11514c: 66 be 09 00 mov $0x9,%si #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 115150: 84 c0 test %al,%al 115152: 74 11 je 115165 return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 115154: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 115157: 83 ec 0c sub $0xc,%esp 11515a: 53 push %ebx 11515b: e8 0c 6b 00 00 call 11bc6c <_Region_Process_queue> 115160: 66 31 f6 xor %si,%si 115163: eb 0e jmp 115173 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 115165: 83 ec 0c sub $0xc,%esp 115168: ff 35 74 d6 13 00 pushl 0x13d674 11516e: e8 9d 1b 00 00 call 116d10 <_API_Mutex_Unlock> return return_status; 115173: 83 c4 10 add $0x10,%esp } 115176: 89 f0 mov %esi,%eax 115178: 8d 65 f8 lea -0x8(%ebp),%esp 11517b: 5b pop %ebx 11517c: 5e pop %esi 11517d: c9 leave 11517e: c3 ret 00109d00 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 109d00: 55 push %ebp 109d01: 89 e5 mov %esp,%ebp 109d03: 57 push %edi 109d04: 56 push %esi 109d05: 53 push %ebx 109d06: 83 ec 3c sub $0x3c,%esp 109d09: 8b 7d 0c mov 0xc(%ebp),%edi 109d0c: 8b 5d 10 mov 0x10(%ebp),%ebx register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 109d0f: b8 03 00 00 00 mov $0x3,%eax 109d14: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 109d18: 0f 84 74 01 00 00 je 109e92 return RTEMS_INVALID_NAME; if ( !id ) 109d1e: b0 09 mov $0x9,%al 109d20: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 109d24: 0f 84 68 01 00 00 je 109e92 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 109d2a: 89 d8 mov %ebx,%eax 109d2c: 25 c0 00 00 00 and $0xc0,%eax 109d31: 74 22 je 109d55 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 109d33: 89 da mov %ebx,%edx 109d35: 83 e2 30 and $0x30,%edx 109d38: 83 fa 10 cmp $0x10,%edx 109d3b: 0f 85 4c 01 00 00 jne 109e8d 109d41: f6 c3 04 test $0x4,%bl 109d44: 0f 84 43 01 00 00 je 109e8d _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 109d4a: 3d c0 00 00 00 cmp $0xc0,%eax 109d4f: 0f 84 38 01 00 00 je 109e8d _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 109d55: 89 da mov %ebx,%edx 109d57: 83 e2 30 and $0x30,%edx 109d5a: 74 0e je 109d6a 109d5c: b8 0a 00 00 00 mov $0xa,%eax 109d61: 83 ff 01 cmp $0x1,%edi 109d64: 0f 87 28 01 00 00 ja 109e92 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109d6a: a1 ec 41 12 00 mov 0x1241ec,%eax 109d6f: 40 inc %eax 109d70: a3 ec 41 12 00 mov %eax,0x1241ec * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 109d75: 83 ec 0c sub $0xc,%esp 109d78: 68 34 41 12 00 push $0x124134 109d7d: 89 55 c4 mov %edx,-0x3c(%ebp) 109d80: e8 67 12 00 00 call 10afec <_Objects_Allocate> 109d85: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 109d87: 83 c4 10 add $0x10,%esp 109d8a: 85 c0 test %eax,%eax 109d8c: 8b 55 c4 mov -0x3c(%ebp),%edx 109d8f: 75 0f jne 109da0 _Thread_Enable_dispatch(); 109d91: e8 5b 1e 00 00 call 10bbf1 <_Thread_Enable_dispatch> 109d96: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 109d9b: e9 f2 00 00 00 jmp 109e92 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 109da0: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 109da3: 85 d2 test %edx,%edx 109da5: 75 37 jne 109dde /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 109da7: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 109dae: 31 c0 xor %eax,%eax 109db0: f6 c3 04 test $0x4,%bl 109db3: 0f 95 c0 setne %al 109db6: 89 45 e4 mov %eax,-0x1c(%ebp) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109db9: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 109dc0: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 109dc7: 51 push %ecx 109dc8: 57 push %edi 109dc9: 8d 45 e0 lea -0x20(%ebp),%eax 109dcc: 50 push %eax 109dcd: 8d 46 14 lea 0x14(%esi),%eax 109dd0: 50 push %eax 109dd1: e8 72 0d 00 00 call 10ab48 <_CORE_semaphore_Initialize> <== ALWAYS TAKEN 109dd6: 83 c4 10 add $0x10,%esp 109dd9: e9 8c 00 00 00 jmp 109e6a <== ALWAYS TAKEN /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 109dde: 31 c0 xor %eax,%eax 109de0: f6 c3 04 test $0x4,%bl 109de3: 0f 95 c0 setne %al 109de6: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 109de9: 83 fa 10 cmp $0x10,%edx 109dec: 75 36 jne 109e24 the_mutex_attr.priority_ceiling = priority_ceiling; 109dee: 8b 45 14 mov 0x14(%ebp),%eax 109df1: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109df4: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 109dfb: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 109dff: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 109e03: 75 2a jne 109e2f if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 109e05: f6 c3 40 test $0x40,%bl 109e08: 74 09 je 109e13 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 109e0a: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) 109e11: eb 0b jmp 109e1e <== ALWAYS TAKEN the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 109e13: 84 db test %bl,%bl 109e15: 79 18 jns 109e2f the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 109e17: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 109e1e: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 109e22: eb 0b jmp 109e2f <== ALWAYS TAKEN } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 109e24: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 109e2b: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 109e2f: 52 push %edx 109e30: 31 c0 xor %eax,%eax 109e32: 83 ff 01 cmp $0x1,%edi 109e35: 0f 94 c0 sete %al 109e38: 50 push %eax 109e39: 8d 45 d0 lea -0x30(%ebp),%eax 109e3c: 50 push %eax 109e3d: 8d 46 14 lea 0x14(%esi),%eax 109e40: 50 push %eax 109e41: e8 96 0a 00 00 call 10a8dc <_CORE_mutex_Initialize> <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 109e46: 83 c4 10 add $0x10,%esp 109e49: 83 f8 06 cmp $0x6,%eax 109e4c: 75 1c jne 109e6a */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 109e4e: 50 push %eax 109e4f: 50 push %eax 109e50: 56 push %esi 109e51: 68 34 41 12 00 push $0x124134 109e56: e8 7d 14 00 00 call 10b2d8 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 109e5b: e8 91 1d 00 00 call 10bbf1 <_Thread_Enable_dispatch> 109e60: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 109e65: 83 c4 10 add $0x10,%esp 109e68: eb 28 jmp 109e92 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 109e6a: 8b 46 08 mov 0x8(%esi),%eax 109e6d: 0f b7 c8 movzwl %ax,%ecx 109e70: 8b 15 50 41 12 00 mov 0x124150,%edx 109e76: 89 34 8a mov %esi,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 109e79: 8b 55 08 mov 0x8(%ebp),%edx 109e7c: 89 56 0c mov %edx,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 109e7f: 8b 55 18 mov 0x18(%ebp),%edx 109e82: 89 02 mov %eax,(%edx) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 109e84: e8 68 1d 00 00 call 10bbf1 <_Thread_Enable_dispatch> 109e89: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109e8b: eb 05 jmp 109e92 <== ALWAYS TAKEN 109e8d: b8 0b 00 00 00 mov $0xb,%eax } 109e92: 8d 65 f4 lea -0xc(%ebp),%esp 109e95: 5b pop %ebx 109e96: 5e pop %esi 109e97: 5f pop %edi 109e98: c9 leave 109e99: c3 ret 00109e9c : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 109e9c: 55 push %ebp 109e9d: 89 e5 mov %esp,%ebp 109e9f: 53 push %ebx 109ea0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 109ea3: 8d 45 f4 lea -0xc(%ebp),%eax 109ea6: 50 push %eax 109ea7: ff 75 08 pushl 0x8(%ebp) 109eaa: 68 34 41 12 00 push $0x124134 109eaf: e8 4c 15 00 00 call 10b400 <_Objects_Get> 109eb4: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 109eb6: 83 c4 10 add $0x10,%esp 109eb9: b8 04 00 00 00 mov $0x4,%eax 109ebe: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ec2: 75 61 jne 109f25 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 109ec4: 8b 43 10 mov 0x10(%ebx),%eax case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 109ec7: 83 e0 30 and $0x30,%eax 109eca: 74 27 je 109ef3 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 109ecc: 83 7b 64 00 cmpl $0x0,0x64(%ebx) 109ed0: 75 11 jne 109ee3 109ed2: 83 f8 20 cmp $0x20,%eax 109ed5: 74 0c je 109ee3 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 109ed7: e8 15 1d 00 00 call 10bbf1 <_Thread_Enable_dispatch> 109edc: b8 0c 00 00 00 mov $0xc,%eax return RTEMS_RESOURCE_IN_USE; 109ee1: eb 42 jmp 109f25 <== ALWAYS TAKEN } _CORE_mutex_Flush( 109ee3: 51 push %ecx 109ee4: 6a 04 push $0x4 109ee6: 6a 00 push $0x0 109ee8: 8d 43 14 lea 0x14(%ebx),%eax 109eeb: 50 push %eax 109eec: e8 df 09 00 00 call 10a8d0 <_CORE_mutex_Flush> <== ALWAYS TAKEN 109ef1: eb 0e jmp 109f01 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 109ef3: 52 push %edx 109ef4: 6a 02 push $0x2 109ef6: 6a 00 push $0x0 109ef8: 8d 43 14 lea 0x14(%ebx),%eax 109efb: 50 push %eax 109efc: e8 3b 0c 00 00 call 10ab3c <_CORE_semaphore_Flush> <== ALWAYS TAKEN 109f01: 59 pop %ecx 109f02: 58 pop %eax SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 109f03: 53 push %ebx 109f04: 68 34 41 12 00 push $0x124134 109f09: e8 4a 11 00 00 call 10b058 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 109f0e: 58 pop %eax 109f0f: 5a pop %edx 109f10: 53 push %ebx 109f11: 68 34 41 12 00 push $0x124134 109f16: e8 bd 13 00 00 call 10b2d8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 109f1b: e8 d1 1c 00 00 call 10bbf1 <_Thread_Enable_dispatch> 109f20: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109f22: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109f25: 8b 5d fc mov -0x4(%ebp),%ebx 109f28: c9 leave 109f29: c3 ret 00112d8c : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 112d8c: 55 push %ebp 112d8d: 89 e5 mov %esp,%ebp 112d8f: 83 ec 1c sub $0x1c,%esp 112d92: 8d 45 f4 lea -0xc(%ebp),%eax 112d95: 50 push %eax 112d96: ff 75 08 pushl 0x8(%ebp) 112d99: 68 f4 91 12 00 push $0x1291f4 112d9e: e8 bd 9c ff ff call 10ca60 <_Objects_Get> 112da3: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 112da5: 83 c4 10 add $0x10,%esp 112da8: b8 04 00 00 00 mov $0x4,%eax 112dad: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 112db1: 75 2b jne 112dde case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 112db3: f6 42 10 30 testb $0x30,0x10(%edx) 112db7: 8d 42 14 lea 0x14(%edx),%eax 112dba: 74 0d je 112dc9 _CORE_mutex_Flush( 112dbc: 51 push %ecx 112dbd: 6a 01 push $0x1 112dbf: 6a 00 push $0x0 112dc1: 50 push %eax 112dc2: e8 0d 91 ff ff call 10bed4 <_CORE_mutex_Flush> <== ALWAYS TAKEN 112dc7: eb 0b jmp 112dd4 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 112dc9: 52 push %edx 112dca: 6a 01 push $0x1 112dcc: 6a 00 push $0x0 112dce: 50 push %eax 112dcf: e8 6c 93 ff ff call 10c140 <_CORE_semaphore_Flush> 112dd4: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 112dd7: e8 f5 a4 ff ff call 10d2d1 <_Thread_Enable_dispatch> 112ddc: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112dde: c9 leave 112ddf: c3 ret 00109f2c : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 109f2c: 55 push %ebp 109f2d: 89 e5 mov %esp,%ebp 109f2f: 57 push %edi 109f30: 56 push %esi 109f31: 53 push %ebx 109f32: 83 ec 1c sub $0x1c,%esp 109f35: 8b 5d 08 mov 0x8(%ebp),%ebx 109f38: 8b 7d 0c mov 0xc(%ebp),%edi 109f3b: 8b 75 10 mov 0x10(%ebp),%esi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 109f3e: 8d 45 e0 lea -0x20(%ebp),%eax 109f41: 50 push %eax 109f42: 8d 45 e4 lea -0x1c(%ebp),%eax 109f45: 50 push %eax 109f46: 53 push %ebx 109f47: 68 34 41 12 00 push $0x124134 109f4c: e8 5f 14 00 00 call 10b3b0 <_Objects_Get_isr_disable> 109f51: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 109f53: 83 c4 10 add $0x10,%esp 109f56: b8 04 00 00 00 mov $0x4,%eax 109f5b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 109f5f: 0f 85 a8 00 00 00 jne 10a00d case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 109f65: f6 42 10 30 testb $0x30,0x10(%edx) 109f69: 74 2a je 109f95 _CORE_mutex_Seize( 109f6b: 83 ec 0c sub $0xc,%esp 109f6e: ff 75 e0 pushl -0x20(%ebp) 109f71: 56 push %esi 109f72: 83 e7 01 and $0x1,%edi 109f75: 83 f7 01 xor $0x1,%edi 109f78: 57 push %edi 109f79: 53 push %ebx 109f7a: 83 c2 14 add $0x14,%edx 109f7d: 52 push %edx 109f7e: e8 42 0a 00 00 call 10a9c5 <_CORE_mutex_Seize> <== ALWAYS TAKEN id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 109f83: 83 c4 14 add $0x14,%esp 109f86: a1 a8 42 12 00 mov 0x1242a8,%eax 109f8b: ff 70 34 pushl 0x34(%eax) 109f8e: e8 f5 00 00 00 call 10a088 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 109f93: eb 75 jmp 10a00a <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 109f95: a1 a8 42 12 00 mov 0x1242a8,%eax executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 109f9a: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) if ( the_semaphore->count != 0 ) { 109fa1: 8b 4a 5c mov 0x5c(%edx),%ecx 109fa4: 85 c9 test %ecx,%ecx 109fa6: 74 0a je 109fb2 the_semaphore->count -= 1; 109fa8: 49 dec %ecx 109fa9: 89 4a 5c mov %ecx,0x5c(%edx) _ISR_Enable( *level_p ); 109fac: ff 75 e0 pushl -0x20(%ebp) 109faf: 9d popf 109fb0: eb 48 jmp 109ffa <== ALWAYS TAKEN return; } if ( !wait ) { 109fb2: 83 e7 01 and $0x1,%edi 109fb5: 74 0d je 109fc4 _ISR_Enable( *level_p ); 109fb7: ff 75 e0 pushl -0x20(%ebp) 109fba: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 109fbb: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 109fc2: eb 36 jmp 109ffa <== ALWAYS TAKEN 109fc4: 8b 0d ec 41 12 00 mov 0x1241ec,%ecx 109fca: 41 inc %ecx 109fcb: 89 0d ec 41 12 00 mov %ecx,0x1241ec 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; 109fd1: c7 42 44 01 00 00 00 movl $0x1,0x44(%edx) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 109fd8: 83 c2 14 add $0x14,%edx 109fdb: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 109fde: 89 58 20 mov %ebx,0x20(%eax) _ISR_Enable( *level_p ); 109fe1: ff 75 e0 pushl -0x20(%ebp) 109fe4: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 109fe5: 50 push %eax 109fe6: 68 40 c3 10 00 push $0x10c340 109feb: 56 push %esi 109fec: 52 push %edx 109fed: e8 92 20 00 00 call 10c084 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 109ff2: e8 fa 1b 00 00 call 10bbf1 <_Thread_Enable_dispatch> 109ff7: 83 c4 10 add $0x10,%esp id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 109ffa: 83 ec 0c sub $0xc,%esp 109ffd: a1 a8 42 12 00 mov 0x1242a8,%eax 10a002: ff 70 34 pushl 0x34(%eax) 10a005: e8 8d 00 00 00 call 10a097 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN 10a00a: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10a00d: 8d 65 f4 lea -0xc(%ebp),%esp 10a010: 5b pop %ebx 10a011: 5e pop %esi 10a012: 5f pop %edi 10a013: c9 leave 10a014: c3 ret 0010a018 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10a018: 55 push %ebp 10a019: 89 e5 mov %esp,%ebp 10a01b: 53 push %ebx 10a01c: 83 ec 18 sub $0x18,%esp 10a01f: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10a022: 8d 45 f4 lea -0xc(%ebp),%eax 10a025: 50 push %eax 10a026: 53 push %ebx 10a027: 68 34 41 12 00 push $0x124134 10a02c: e8 cf 13 00 00 call 10b400 <_Objects_Get> 10a031: 89 c2 mov %eax,%edx Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10a033: 83 c4 10 add $0x10,%esp 10a036: b8 04 00 00 00 mov $0x4,%eax 10a03b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a03f: 75 40 jne 10a081 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10a041: f6 42 10 30 testb $0x30,0x10(%edx) 10a045: 8d 42 14 lea 0x14(%edx),%eax 10a048: 74 1b je 10a065 mutex_status = _CORE_mutex_Surrender( 10a04a: 51 push %ecx 10a04b: 6a 00 push $0x0 10a04d: 53 push %ebx 10a04e: 50 push %eax 10a04f: e8 08 0a 00 00 call 10aa5c <_CORE_mutex_Surrender> <== ALWAYS TAKEN 10a054: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a056: e8 96 1b 00 00 call 10bbf1 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10a05b: 89 1c 24 mov %ebx,(%esp) 10a05e: e8 25 00 00 00 call 10a088 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10a063: eb 19 jmp 10a07e <== ALWAYS TAKEN } else { semaphore_status = _CORE_semaphore_Surrender( 10a065: 52 push %edx 10a066: 6a 00 push $0x0 10a068: 53 push %ebx 10a069: 50 push %eax 10a06a: e8 19 0b 00 00 call 10ab88 <_CORE_semaphore_Surrender> 10a06f: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a071: e8 7b 1b 00 00 call 10bbf1 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10a076: 89 1c 24 mov %ebx,(%esp) 10a079: e8 19 00 00 00 call 10a097 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10a07e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a081: 8b 5d fc mov -0x4(%ebp),%ebx 10a084: c9 leave 10a085: c3 ret 0010ae7c : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10ae7c: 55 push %ebp 10ae7d: 89 e5 mov %esp,%ebp 10ae7f: 83 ec 08 sub $0x8,%esp 10ae82: 8b 55 08 mov 0x8(%ebp),%edx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 10ae85: a1 14 63 12 00 mov 0x126314,%eax 10ae8a: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10ae90: 8b 0d 58 62 12 00 mov 0x126258,%ecx 10ae96: 41 inc %ecx 10ae97: 89 0d 58 62 12 00 mov %ecx,0x126258 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10ae9d: 85 d2 test %edx,%edx 10ae9f: 74 0b je 10aeac asr->mode_set = mode_set; 10aea1: 8b 4d 0c mov 0xc(%ebp),%ecx 10aea4: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10aea7: 89 50 0c mov %edx,0xc(%eax) 10aeaa: eb 27 jmp 10aed3 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10aeac: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10aeb0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10aeb7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10aebe: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10aec5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10aecc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10aed3: e8 11 1e 00 00 call 10cce9 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10aed8: 31 c0 xor %eax,%eax 10aeda: c9 leave 10aedb: c3 ret 001155d8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 1155d8: 55 push %ebp 1155d9: 89 e5 mov %esp,%ebp 1155db: 53 push %ebx 1155dc: 83 ec 14 sub $0x14,%esp 1155df: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 1155e2: b8 0a 00 00 00 mov $0xa,%eax 1155e7: 85 db test %ebx,%ebx 1155e9: 74 71 je 11565c return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1155eb: 50 push %eax 1155ec: 50 push %eax 1155ed: 8d 45 f4 lea -0xc(%ebp),%eax 1155f0: 50 push %eax 1155f1: ff 75 08 pushl 0x8(%ebp) 1155f4: e8 4b 36 00 00 call 118c44 <_Thread_Get> 1155f9: 89 c1 mov %eax,%ecx switch ( location ) { 1155fb: 83 c4 10 add $0x10,%esp 1155fe: b8 04 00 00 00 mov $0x4,%eax 115603: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115607: 75 53 jne 11565c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 115609: 8b 91 f4 00 00 00 mov 0xf4(%ecx),%edx asr = &api->Signal; 11560f: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 115613: 74 3d je 115652 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 115615: 80 7a 08 00 cmpb $0x0,0x8(%edx) 115619: 74 26 je 115641 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 11561b: 9c pushf 11561c: fa cli 11561d: 58 pop %eax *signal_set |= signals; 11561e: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 115621: 50 push %eax 115622: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 115623: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 115627: a1 58 d6 13 00 mov 0x13d658,%eax 11562c: 85 c0 test %eax,%eax 11562e: 74 19 je 115649 115630: 3b 0d 7c d6 13 00 cmp 0x13d67c,%ecx 115636: 75 11 jne 115649 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 115638: c6 05 10 d7 13 00 01 movb $0x1,0x13d710 11563f: eb 08 jmp 115649 <== ALWAYS TAKEN rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115641: 9c pushf 115642: fa cli 115643: 58 pop %eax *signal_set |= signals; 115644: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115647: 50 push %eax 115648: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115649: e8 a7 35 00 00 call 118bf5 <_Thread_Enable_dispatch> 11564e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115650: eb 0a jmp 11565c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 115652: e8 9e 35 00 00 call 118bf5 <_Thread_Enable_dispatch> 115657: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11565c: 8b 5d fc mov -0x4(%ebp),%ebx 11565f: c9 leave 115660: c3 ret 0010a0a8 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10a0a8: 55 push %ebp 10a0a9: 89 e5 mov %esp,%ebp 10a0ab: 57 push %edi 10a0ac: 56 push %esi 10a0ad: 53 push %ebx 10a0ae: 83 ec 1c sub $0x1c,%esp 10a0b1: 8b 55 08 mov 0x8(%ebp),%edx 10a0b4: 8b 7d 0c mov 0xc(%ebp),%edi 10a0b7: 8b 75 14 mov 0x14(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10a0ba: b8 09 00 00 00 mov $0x9,%eax 10a0bf: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 10a0c3: 0f 84 07 01 00 00 je 10a1d0 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10a0c9: b0 03 mov $0x3,%al 10a0cb: 85 d2 test %edx,%edx 10a0cd: 0f 84 fd 00 00 00 je 10a1d0 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10a0d3: 66 83 7d 18 00 cmpw $0x0,0x18(%ebp) 10a0d8: 78 21 js 10a0fb */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10a0da: 31 c9 xor %ecx,%ecx 10a0dc: 85 ff test %edi,%edi 10a0de: 74 0e je 10a0ee 10a0e0: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10a0e7: 31 c9 xor %ecx,%ecx 10a0e9: 39 c7 cmp %eax,%edi 10a0eb: 0f 96 c1 setbe %cl if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) 10a0ee: b8 13 00 00 00 mov $0x13,%eax 10a0f3: 85 c9 test %ecx,%ecx 10a0f5: 0f 84 d5 00 00 00 je 10a1d0 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a0fb: 83 ec 0c sub $0xc,%esp 10a0fe: ff 35 a0 42 12 00 pushl 0x1242a0 10a104: 89 55 e4 mov %edx,-0x1c(%ebp) 10a107: e8 0c 06 00 00 call 10a718 <_API_Mutex_Lock> <== ALWAYS TAKEN * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 10a10c: c7 04 24 74 41 12 00 movl $0x124174,(%esp) 10a113: e8 d4 0e 00 00 call 10afec <_Objects_Allocate> <== ALWAYS TAKEN 10a118: 89 c3 mov %eax,%ebx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10a11a: 83 c4 10 add $0x10,%esp 10a11d: 85 c0 test %eax,%eax 10a11f: 8b 55 e4 mov -0x1c(%ebp),%edx 10a122: 75 18 jne 10a13c _RTEMS_Unlock_allocator(); 10a124: 83 ec 0c sub $0xc,%esp 10a127: ff 35 a0 42 12 00 pushl 0x1242a0 10a12d: e8 2e 06 00 00 call 10a760 <_API_Mutex_Unlock> 10a132: b8 05 00 00 00 mov $0x5,%eax 10a137: e9 91 00 00 00 jmp 10a1cd <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10a13c: 50 push %eax 10a13d: 52 push %edx 10a13e: 89 f0 mov %esi,%eax 10a140: 83 e0 01 and $0x1,%eax 10a143: 50 push %eax 10a144: 6a 00 push $0x0 10a146: 89 f0 mov %esi,%eax 10a148: c1 e8 09 shr $0x9,%eax 10a14b: 83 e0 01 and $0x1,%eax 10a14e: 50 push %eax 10a14f: 89 f0 mov %esi,%eax 10a151: c1 e8 08 shr $0x8,%eax 10a154: 83 f0 01 xor $0x1,%eax 10a157: 83 e0 01 and $0x1,%eax 10a15a: 50 push %eax 10a15b: 57 push %edi 10a15c: 8b 45 18 mov 0x18(%ebp),%eax 10a15f: 83 e0 01 and $0x1,%eax 10a162: 50 push %eax 10a163: ff 75 10 pushl 0x10(%ebp) 10a166: 6a 00 push $0x0 10a168: 53 push %ebx 10a169: 68 74 41 12 00 push $0x124174 10a16e: e8 15 1b 00 00 call 10bc88 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10a173: 83 c4 30 add $0x30,%esp 10a176: 84 c0 test %al,%al 10a178: 75 27 jne 10a1a1 */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10a17a: 83 ec 0c sub $0xc,%esp 10a17d: ff 73 08 pushl 0x8(%ebx) 10a180: e8 c3 11 00 00 call 10b348 <_Objects_Get_information_id> 10a185: 5a pop %edx 10a186: 59 pop %ecx 10a187: 53 push %ebx 10a188: 50 push %eax 10a189: e8 4a 11 00 00 call 10b2d8 <_Objects_Free> #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a18e: 58 pop %eax 10a18f: ff 35 a0 42 12 00 pushl 0x1242a0 10a195: e8 c6 05 00 00 call 10a760 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10a19a: b8 0d 00 00 00 mov $0xd,%eax 10a19f: eb 2c jmp 10a1cd <== ALWAYS TAKEN } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10a1a1: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10a1a7: c1 ee 0a shr $0xa,%esi 10a1aa: 83 f6 01 xor $0x1,%esi 10a1ad: 83 e6 01 and $0x1,%esi 10a1b0: 89 f2 mov %esi,%edx 10a1b2: 88 50 08 mov %dl,0x8(%eax) *id = the_thread->Object.id; 10a1b5: 8b 43 08 mov 0x8(%ebx),%eax 10a1b8: 8b 55 1c mov 0x1c(%ebp),%edx 10a1bb: 89 02 mov %eax,(%edx) ); } #endif _RTEMS_Unlock_allocator(); 10a1bd: 83 ec 0c sub $0xc,%esp 10a1c0: ff 35 a0 42 12 00 pushl 0x1242a0 10a1c6: e8 95 05 00 00 call 10a760 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10a1cb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a1cd: 83 c4 10 add $0x10,%esp } 10a1d0: 8d 65 f4 lea -0xc(%ebp),%esp 10a1d3: 5b pop %ebx 10a1d4: 5e pop %esi 10a1d5: 5f pop %edi 10a1d6: c9 leave 10a1d7: c3 ret 0010a1d8 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10a1d8: 55 push %ebp 10a1d9: 89 e5 mov %esp,%ebp 10a1db: 53 push %ebx 10a1dc: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10a1df: ff 35 a0 42 12 00 pushl 0x1242a0 10a1e5: e8 2e 05 00 00 call 10a718 <_API_Mutex_Lock> <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); 10a1ea: 5b pop %ebx 10a1eb: 58 pop %eax 10a1ec: 8d 45 f4 lea -0xc(%ebp),%eax 10a1ef: 50 push %eax 10a1f0: ff 75 08 pushl 0x8(%ebp) 10a1f3: e8 1c 1a 00 00 call 10bc14 <_Thread_Get> 10a1f8: 89 c3 mov %eax,%ebx switch ( location ) { 10a1fa: 83 c4 10 add $0x10,%esp 10a1fd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a201: 75 3b jne 10a23e case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10a203: 83 ec 0c sub $0xc,%esp 10a206: ff 70 08 pushl 0x8(%eax) 10a209: e8 3a 11 00 00 call 10b348 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10a20e: 5a pop %edx 10a20f: 59 pop %ecx 10a210: 53 push %ebx 10a211: 50 push %eax 10a212: e8 e9 16 00 00 call 10b900 <_Thread_Close> 10a217: 58 pop %eax 10a218: ff 73 08 pushl 0x8(%ebx) 10a21b: e8 28 11 00 00 call 10b348 <_Objects_Get_information_id> 10a220: 5a pop %edx 10a221: 59 pop %ecx 10a222: 53 push %ebx 10a223: 50 push %eax 10a224: e8 af 10 00 00 call 10b2d8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a229: 58 pop %eax 10a22a: ff 35 a0 42 12 00 pushl 0x1242a0 10a230: e8 2b 05 00 00 call 10a760 <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10a235: e8 b7 19 00 00 call 10bbf1 <_Thread_Enable_dispatch> 10a23a: 31 c0 xor %eax,%eax 10a23c: eb 13 jmp 10a251 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10a23e: 83 ec 0c sub $0xc,%esp 10a241: ff 35 a0 42 12 00 pushl 0x1242a0 10a247: e8 14 05 00 00 call 10a760 <_API_Mutex_Unlock> 10a24c: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10a251: 83 c4 10 add $0x10,%esp } 10a254: 8b 5d fc mov -0x4(%ebp),%ebx 10a257: c9 leave 10a258: c3 ret 0010ba00 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10ba00: 55 push %ebp 10ba01: 89 e5 mov %esp,%ebp 10ba03: 56 push %esi 10ba04: 53 push %ebx 10ba05: 83 ec 10 sub $0x10,%esp 10ba08: 8b 55 08 mov 0x8(%ebp),%edx 10ba0b: 8b 75 0c mov 0xc(%ebp),%esi 10ba0e: 8b 5d 10 mov 0x10(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10ba11: b8 16 00 00 00 mov $0x16,%eax 10ba16: 80 3d c4 41 12 00 00 cmpb $0x0,0x1241c4 10ba1d: 74 5d je 10ba7c return RTEMS_NOT_CONFIGURED; if ( !note ) 10ba1f: b0 09 mov $0x9,%al 10ba21: 85 db test %ebx,%ebx 10ba23: 74 57 je 10ba7c /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10ba25: b0 0a mov $0xa,%al 10ba27: 83 fe 0f cmp $0xf,%esi 10ba2a: 77 50 ja 10ba7c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10ba2c: 85 d2 test %edx,%edx 10ba2e: 74 0a je 10ba3a _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10ba30: a1 3c 85 12 00 mov 0x12853c,%eax 10ba35: 3b 50 08 cmp 0x8(%eax),%edx 10ba38: 75 13 jne 10ba4d api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10ba3a: a1 3c 85 12 00 mov 0x12853c,%eax 10ba3f: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10ba45: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10ba49: 89 03 mov %eax,(%ebx) 10ba4b: eb 2d jmp 10ba7a <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10ba4d: 50 push %eax 10ba4e: 50 push %eax 10ba4f: 8d 45 f4 lea -0xc(%ebp),%eax 10ba52: 50 push %eax 10ba53: 52 push %edx 10ba54: e8 7b 1c 00 00 call 10d6d4 <_Thread_Get> 10ba59: 89 c2 mov %eax,%edx switch ( location ) { 10ba5b: 83 c4 10 add $0x10,%esp 10ba5e: b8 04 00 00 00 mov $0x4,%eax 10ba63: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ba67: 75 13 jne 10ba7c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10ba69: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10ba6f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10ba73: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10ba75: e8 37 1c 00 00 call 10d6b1 <_Thread_Enable_dispatch> 10ba7a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba7c: 8d 65 f8 lea -0x8(%ebp),%esp 10ba7f: 5b pop %ebx 10ba80: 5e pop %esi 10ba81: c9 leave 10ba82: c3 ret 0010a25c : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10a25c: 55 push %ebp 10a25d: 89 e5 mov %esp,%ebp 10a25f: 83 ec 08 sub $0x8,%esp 10a262: 8b 4d 08 mov 0x8(%ebp),%ecx 10a265: 8b 55 10 mov 0x10(%ebp),%edx Objects_Name_or_id_lookup_errors status; if ( !id ) 10a268: b8 09 00 00 00 mov $0x9,%eax 10a26d: 85 d2 test %edx,%edx 10a26f: 74 2b je 10a29c return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10a271: 85 c9 test %ecx,%ecx 10a273: 75 0e jne 10a283 *id = _Thread_Executing->Object.id; 10a275: a1 a8 42 12 00 mov 0x1242a8,%eax 10a27a: 8b 40 08 mov 0x8(%eax),%eax 10a27d: 89 02 mov %eax,(%edx) 10a27f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a281: eb 19 jmp 10a29c <== ALWAYS TAKEN } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10a283: 52 push %edx 10a284: ff 75 0c pushl 0xc(%ebp) 10a287: 51 push %ecx 10a288: 68 74 41 12 00 push $0x124174 10a28d: e8 e6 12 00 00 call 10b578 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10a292: 8b 04 85 ac e7 11 00 mov 0x11e7ac(,%eax,4),%eax 10a299: 83 c4 10 add $0x10,%esp } 10a29c: c9 leave 10a29d: c3 ret 00115954 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 115954: 55 push %ebp 115955: 89 e5 mov %esp,%ebp 115957: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11595a: 8d 45 f4 lea -0xc(%ebp),%eax 11595d: 50 push %eax 11595e: ff 75 08 pushl 0x8(%ebp) 115961: e8 de 32 00 00 call 118c44 <_Thread_Get> 115966: 89 c2 mov %eax,%edx switch ( location ) { 115968: 83 c4 10 add $0x10,%esp 11596b: b8 04 00 00 00 mov $0x4,%eax 115970: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115974: 75 19 jne 11598f case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 115976: f6 42 10 02 testb $0x2,0x10(%edx) 11597a: 75 09 jne 115985 _Thread_Enable_dispatch(); 11597c: e8 74 32 00 00 call 118bf5 <_Thread_Enable_dispatch> 115981: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115983: eb 0a jmp 11598f <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 115985: e8 6b 32 00 00 call 118bf5 <_Thread_Enable_dispatch> 11598a: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11598f: c9 leave 115990: c3 ret 00110808 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 110808: 55 push %ebp 110809: 89 e5 mov %esp,%ebp 11080b: 57 push %edi 11080c: 56 push %esi 11080d: 53 push %ebx 11080e: 83 ec 1c sub $0x1c,%esp 110811: 8b 4d 10 mov 0x10(%ebp),%ecx ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 110814: b8 09 00 00 00 mov $0x9,%eax 110819: 85 c9 test %ecx,%ecx 11081b: 0f 84 f4 00 00 00 je 110915 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 110821: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 110827: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 11082d: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 110831: 19 ff sbb %edi,%edi 110833: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 110839: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 11083d: 74 06 je 110845 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 11083f: 81 cf 00 02 00 00 or $0x200,%edi if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 110845: 80 7e 08 01 cmpb $0x1,0x8(%esi) 110849: 19 d2 sbb %edx,%edx 11084b: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 110851: 89 55 e4 mov %edx,-0x1c(%ebp) 110854: 89 4d e0 mov %ecx,-0x20(%ebp) 110857: e8 cf c5 ff ff call 10ce2b <_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; 11085c: 8b 55 e4 mov -0x1c(%ebp),%edx 11085f: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 110861: 09 f8 or %edi,%eax 110863: 8b 4d e0 mov -0x20(%ebp),%ecx 110866: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 110868: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 11086f: 74 0f je 110880 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 110871: 8b 45 08 mov 0x8(%ebp),%eax 110874: c1 e8 08 shr $0x8,%eax 110877: 83 f0 01 xor $0x1,%eax 11087a: 83 e0 01 and $0x1,%eax 11087d: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 110880: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 110887: 74 21 je 1108aa if ( _Modes_Is_timeslice(mode_set) ) { 110889: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 110890: 74 11 je 1108a3 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 110892: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 110899: a1 b8 41 12 00 mov 0x1241b8,%eax 11089e: 89 43 78 mov %eax,0x78(%ebx) 1108a1: eb 07 jmp 1108aa <== ALWAYS TAKEN } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1108a3: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 1108aa: f6 45 0c 01 testb $0x1,0xc(%ebp) 1108ae: 74 0a je 1108ba */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 1108b0: f6 45 08 01 testb $0x1,0x8(%ebp) 1108b4: 74 03 je 1108b9 1108b6: fa cli 1108b7: eb 01 jmp 1108ba <== ALWAYS TAKEN 1108b9: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1108ba: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1108c1: 74 33 je 1108f6 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 1108c3: 8b 45 08 mov 0x8(%ebp),%eax 1108c6: c1 e8 0a shr $0xa,%eax 1108c9: 83 f0 01 xor $0x1,%eax 1108cc: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1108cf: 3a 46 08 cmp 0x8(%esi),%al 1108d2: 74 22 je 1108f6 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 1108d4: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 1108d7: 9c pushf 1108d8: fa cli 1108d9: 58 pop %eax _signals = information->signals_pending; 1108da: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 1108dd: 8b 4e 14 mov 0x14(%esi),%ecx 1108e0: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 1108e3: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 1108e6: 50 push %eax 1108e7: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1108e8: 83 7e 14 00 cmpl $0x0,0x14(%esi) 1108ec: 74 08 je 1108f6 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 1108ee: c6 43 74 01 movb $0x1,0x74(%ebx) 1108f2: b3 01 mov $0x1,%bl 1108f4: eb 02 jmp 1108f8 <== ALWAYS TAKEN 1108f6: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 1108f8: 83 3d 84 43 12 00 03 cmpl $0x3,0x124384 1108ff: 75 12 jne 110913 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 110901: e8 06 02 00 00 call 110b0c <_Thread_Evaluate_mode> <== ALWAYS TAKEN 110906: 84 c0 test %al,%al 110908: 75 04 jne 11090e 11090a: 84 db test %bl,%bl 11090c: 74 05 je 110913 _Thread_Dispatch(); 11090e: e8 99 b1 ff ff call 10baac <_Thread_Dispatch> 110913: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110915: 83 c4 1c add $0x1c,%esp 110918: 5b pop %ebx 110919: 5e pop %esi 11091a: 5f pop %edi 11091b: c9 leave 11091c: c3 ret 0010ac24 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10ac24: 55 push %ebp 10ac25: 89 e5 mov %esp,%ebp 10ac27: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ac2a: 8d 45 f4 lea -0xc(%ebp),%eax 10ac2d: 50 push %eax 10ac2e: ff 75 08 pushl 0x8(%ebp) 10ac31: e8 de 19 00 00 call 10c614 <_Thread_Get> 10ac36: 89 c2 mov %eax,%edx switch ( location ) { 10ac38: 83 c4 10 add $0x10,%esp 10ac3b: b8 04 00 00 00 mov $0x4,%eax 10ac40: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ac44: 75 26 jne 10ac6c case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10ac46: 50 push %eax 10ac47: ff 75 0c pushl 0xc(%ebp) 10ac4a: 6a 00 push $0x0 10ac4c: 52 push %edx 10ac4d: e8 22 21 00 00 call 10cd74 <_Thread_Restart> 10ac52: 83 c4 10 add $0x10,%esp 10ac55: 84 c0 test %al,%al 10ac57: 74 09 je 10ac62 _Thread_Enable_dispatch(); 10ac59: e8 93 19 00 00 call 10c5f1 <_Thread_Enable_dispatch> 10ac5e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ac60: eb 0a jmp 10ac6c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10ac62: e8 8a 19 00 00 call 10c5f1 <_Thread_Enable_dispatch> 10ac67: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ac6c: c9 leave 10ac6d: c3 ret 0010d3ac : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10d3ac: 55 push %ebp 10d3ad: 89 e5 mov %esp,%ebp 10d3af: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d3b2: 8d 45 f4 lea -0xc(%ebp),%eax 10d3b5: 50 push %eax 10d3b6: ff 75 08 pushl 0x8(%ebp) 10d3b9: e8 d6 1a 00 00 call 10ee94 <_Thread_Get> 10d3be: 89 c2 mov %eax,%edx switch ( location ) { 10d3c0: 83 c4 10 add $0x10,%esp 10d3c3: b8 04 00 00 00 mov $0x4,%eax 10d3c8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10d3cc: 75 26 jne 10d3f4 case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10d3ce: f6 42 10 02 testb $0x2,0x10(%edx) 10d3d2: 74 16 je 10d3ea _Thread_Resume( the_thread, true ); 10d3d4: 50 push %eax 10d3d5: 50 push %eax 10d3d6: 6a 01 push $0x1 10d3d8: 52 push %edx 10d3d9: e8 16 22 00 00 call 10f5f4 <_Thread_Resume> _Thread_Enable_dispatch(); 10d3de: e8 62 1a 00 00 call 10ee45 <_Thread_Enable_dispatch> 10d3e3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d3e5: 83 c4 10 add $0x10,%esp 10d3e8: eb 0a jmp 10d3f4 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10d3ea: e8 56 1a 00 00 call 10ee45 <_Thread_Enable_dispatch> 10d3ef: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d3f4: c9 leave 10d3f5: c3 ret 0010bb54 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10bb54: 55 push %ebp 10bb55: 89 e5 mov %esp,%ebp 10bb57: 56 push %esi 10bb58: 53 push %ebx 10bb59: 83 ec 10 sub $0x10,%esp 10bb5c: 8b 55 08 mov 0x8(%ebp),%edx 10bb5f: 8b 5d 0c mov 0xc(%ebp),%ebx 10bb62: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10bb65: b8 16 00 00 00 mov $0x16,%eax 10bb6a: 80 3d c4 41 12 00 00 cmpb $0x0,0x1241c4 10bb71: 74 53 je 10bbc6 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10bb73: b0 0a mov $0xa,%al 10bb75: 83 fb 0f cmp $0xf,%ebx 10bb78: 77 4c ja 10bbc6 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10bb7a: 85 d2 test %edx,%edx 10bb7c: 74 0a je 10bb88 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10bb7e: a1 3c 85 12 00 mov 0x12853c,%eax 10bb83: 3b 50 08 cmp 0x8(%eax),%edx 10bb86: 75 11 jne 10bb99 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10bb88: a1 3c 85 12 00 mov 0x12853c,%eax 10bb8d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10bb93: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10bb97: eb 2b jmp 10bbc4 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10bb99: 50 push %eax 10bb9a: 50 push %eax 10bb9b: 8d 45 f4 lea -0xc(%ebp),%eax 10bb9e: 50 push %eax 10bb9f: 52 push %edx 10bba0: e8 2f 1b 00 00 call 10d6d4 <_Thread_Get> 10bba5: 89 c2 mov %eax,%edx switch ( location ) { 10bba7: 83 c4 10 add $0x10,%esp 10bbaa: b8 04 00 00 00 mov $0x4,%eax 10bbaf: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bbb3: 75 11 jne 10bbc6 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10bbb5: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10bbbb: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10bbbf: e8 ed 1a 00 00 call 10d6b1 <_Thread_Enable_dispatch> 10bbc4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbc6: 8d 65 f8 lea -0x8(%ebp),%esp 10bbc9: 5b pop %ebx 10bbca: 5e pop %esi 10bbcb: c9 leave 10bbcc: c3 ret 0010dfe8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10dfe8: 55 push %ebp 10dfe9: 89 e5 mov %esp,%ebp 10dfeb: 56 push %esi 10dfec: 53 push %ebx 10dfed: 83 ec 10 sub $0x10,%esp 10dff0: 8b 5d 0c mov 0xc(%ebp),%ebx 10dff3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10dff6: 85 db test %ebx,%ebx 10dff8: 74 10 je 10e00a 10dffa: 0f b6 05 f4 51 12 00 movzbl 0x1251f4,%eax 10e001: ba 13 00 00 00 mov $0x13,%edx 10e006: 39 c3 cmp %eax,%ebx 10e008: 77 50 ja 10e05a !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e00a: ba 09 00 00 00 mov $0x9,%edx 10e00f: 85 f6 test %esi,%esi 10e011: 74 47 je 10e05a return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e013: 51 push %ecx 10e014: 51 push %ecx 10e015: 8d 45 f4 lea -0xc(%ebp),%eax 10e018: 50 push %eax 10e019: ff 75 08 pushl 0x8(%ebp) 10e01c: e8 f3 1b 00 00 call 10fc14 <_Thread_Get> switch ( location ) { 10e021: 83 c4 10 add $0x10,%esp 10e024: ba 04 00 00 00 mov $0x4,%edx 10e029: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e02d: 75 2b jne 10e05a case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e02f: 8b 50 14 mov 0x14(%eax),%edx 10e032: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e034: 85 db test %ebx,%ebx 10e036: 74 1b je 10e053 the_thread->real_priority = new_priority; 10e038: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e03b: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e03f: 74 05 je 10e046 the_thread->current_priority > new_priority ) 10e041: 39 58 14 cmp %ebx,0x14(%eax) 10e044: 76 0d jbe 10e053 <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e046: 52 push %edx 10e047: 6a 00 push $0x0 10e049: 53 push %ebx 10e04a: 50 push %eax 10e04b: e8 d8 16 00 00 call 10f728 <_Thread_Change_priority> 10e050: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e053: e8 6d 1b 00 00 call 10fbc5 <_Thread_Enable_dispatch> 10e058: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e05a: 89 d0 mov %edx,%eax 10e05c: 8d 65 f8 lea -0x8(%ebp),%esp 10e05f: 5b pop %ebx 10e060: 5e pop %esi 10e061: c9 leave 10e062: c3 ret 0010a314 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10a314: 55 push %ebp 10a315: 89 e5 mov %esp,%ebp 10a317: 53 push %ebx 10a318: 83 ec 14 sub $0x14,%esp 10a31b: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10a31e: b8 09 00 00 00 mov $0x9,%eax 10a323: 85 db test %ebx,%ebx 10a325: 74 49 je 10a370 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10a327: 50 push %eax 10a328: 50 push %eax 10a329: 8d 45 f4 lea -0xc(%ebp),%eax 10a32c: 50 push %eax 10a32d: ff 75 08 pushl 0x8(%ebp) 10a330: e8 df 18 00 00 call 10bc14 <_Thread_Get> 10a335: 89 c2 mov %eax,%edx switch ( location ) { 10a337: 83 c4 10 add $0x10,%esp 10a33a: b8 04 00 00 00 mov $0x4,%eax 10a33f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a343: 75 2b jne 10a370 case OBJECTS_LOCAL: if ( _Thread_Start( 10a345: 83 ec 0c sub $0xc,%esp 10a348: ff 75 10 pushl 0x10(%ebp) 10a34b: 6a 00 push $0x0 10a34d: 53 push %ebx 10a34e: 6a 00 push $0x0 10a350: 52 push %edx 10a351: e8 a6 22 00 00 call 10c5fc <_Thread_Start> 10a356: 83 c4 20 add $0x20,%esp 10a359: 84 c0 test %al,%al 10a35b: 74 09 je 10a366 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10a35d: e8 8f 18 00 00 call 10bbf1 <_Thread_Enable_dispatch> 10a362: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a364: eb 0a jmp 10a370 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10a366: e8 86 18 00 00 call 10bbf1 <_Thread_Enable_dispatch> 10a36b: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a370: 8b 5d fc mov -0x4(%ebp),%ebx 10a373: c9 leave 10a374: c3 ret 0010eaac : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 10eaac: 55 push %ebp 10eaad: 89 e5 mov %esp,%ebp 10eaaf: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10eab2: 8d 45 f4 lea -0xc(%ebp),%eax 10eab5: 50 push %eax 10eab6: ff 75 08 pushl 0x8(%ebp) 10eab9: e8 56 d1 ff ff call 10bc14 <_Thread_Get> 10eabe: 89 c2 mov %eax,%edx switch ( location ) { 10eac0: 83 c4 10 add $0x10,%esp 10eac3: b8 04 00 00 00 mov $0x4,%eax 10eac8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10eacc: 75 25 jne 10eaf3 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10eace: f6 42 10 02 testb $0x2,0x10(%edx) 10ead2: 75 15 jne 10eae9 _Thread_Suspend( the_thread ); 10ead4: 83 ec 0c sub $0xc,%esp 10ead7: 52 push %edx 10ead8: e8 93 09 00 00 call 10f470 <_Thread_Suspend> _Thread_Enable_dispatch(); 10eadd: e8 0f d1 ff ff call 10bbf1 <_Thread_Enable_dispatch> 10eae2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10eae4: 83 c4 10 add $0x10,%esp 10eae7: eb 0a jmp 10eaf3 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10eae9: e8 03 d1 ff ff call 10bbf1 <_Thread_Enable_dispatch> 10eaee: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10eaf3: c9 leave 10eaf4: c3 ret 00127fc8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 127fc8: 55 push %ebp 127fc9: 89 e5 mov %esp,%ebp 127fcb: 57 push %edi 127fcc: 56 push %esi 127fcd: 53 push %ebx 127fce: 83 ec 1c sub $0x1c,%esp 127fd1: 8b 5d 0c mov 0xc(%ebp),%ebx 127fd4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 127fd7: b8 09 00 00 00 mov $0x9,%eax 127fdc: 85 db test %ebx,%ebx 127fde: 74 73 je 128053 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 127fe0: 50 push %eax 127fe1: 50 push %eax 127fe2: 8d 45 e4 lea -0x1c(%ebp),%eax 127fe5: 50 push %eax 127fe6: ff 75 08 pushl 0x8(%ebp) 127fe9: e8 46 96 fe ff call 111634 <_Thread_Get> 127fee: 89 c6 mov %eax,%esi switch (location) { 127ff0: 83 c4 10 add $0x10,%esp 127ff3: b8 04 00 00 00 mov $0x4,%eax 127ff8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 127ffc: 75 55 jne 128053 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 127ffe: 8b 86 04 01 00 00 mov 0x104(%esi),%eax while (tvp) { 128004: eb 0c jmp 128012 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 128006: 39 58 04 cmp %ebx,0x4(%eax) 128009: 75 05 jne 128010 tvp->dtor = dtor; 12800b: 89 78 10 mov %edi,0x10(%eax) 12800e: eb 3c jmp 12804c <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 128010: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 128012: 85 c0 test %eax,%eax 128014: 75 f0 jne 128006 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 128016: 83 ec 0c sub $0xc,%esp 128019: 6a 14 push $0x14 12801b: e8 c4 a5 fe ff call 1125e4 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 128020: 83 c4 10 add $0x10,%esp 128023: 85 c0 test %eax,%eax 128025: 75 0c jne 128033 _Thread_Enable_dispatch(); 128027: e8 e5 95 fe ff call 111611 <_Thread_Enable_dispatch> 12802c: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 128031: eb 20 jmp 128053 <== ALWAYS TAKEN } new->gval = *ptr; 128033: 8b 13 mov (%ebx),%edx 128035: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 128038: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12803b: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12803e: 8b 96 04 01 00 00 mov 0x104(%esi),%edx 128044: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 128046: 89 86 04 01 00 00 mov %eax,0x104(%esi) _Thread_Enable_dispatch(); 12804c: e8 c0 95 fe ff call 111611 <_Thread_Enable_dispatch> 128051: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 128053: 8d 65 f4 lea -0xc(%ebp),%esp 128056: 5b pop %ebx 128057: 5e pop %esi 128058: 5f pop %edi 128059: c9 leave 12805a: c3 ret 0012805c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12805c: 55 push %ebp 12805d: 89 e5 mov %esp,%ebp 12805f: 53 push %ebx 128060: 83 ec 14 sub $0x14,%esp 128063: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 128066: b8 09 00 00 00 mov $0x9,%eax 12806b: 85 db test %ebx,%ebx 12806d: 74 64 je 1280d3 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12806f: 52 push %edx 128070: 52 push %edx 128071: 8d 45 f4 lea -0xc(%ebp),%eax 128074: 50 push %eax 128075: ff 75 08 pushl 0x8(%ebp) 128078: e8 b7 95 fe ff call 111634 <_Thread_Get> 12807d: 89 c1 mov %eax,%ecx switch (location) { 12807f: 83 c4 10 add $0x10,%esp 128082: b8 04 00 00 00 mov $0x4,%eax 128087: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 12808b: 75 46 jne 1280d3 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 12808d: 8b 91 04 01 00 00 mov 0x104(%ecx),%edx 128093: 30 c0 xor %al,%al while (tvp) { 128095: eb 2e jmp 1280c5 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 128097: 39 5a 04 cmp %ebx,0x4(%edx) 12809a: 75 25 jne 1280c1 if (prev) 12809c: 85 c0 test %eax,%eax 12809e: 8b 1a mov (%edx),%ebx 1280a0: 74 04 je 1280a6 prev->next = tvp->next; 1280a2: 89 18 mov %ebx,(%eax) 1280a4: eb 06 jmp 1280ac <== ALWAYS TAKEN else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 1280a6: 89 99 04 01 00 00 mov %ebx,0x104(%ecx) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 1280ac: 50 push %eax 1280ad: 50 push %eax 1280ae: 52 push %edx 1280af: 51 push %ecx 1280b0: e8 8b 00 00 00 call 128140 <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1280b5: e8 57 95 fe ff call 111611 <_Thread_Enable_dispatch> 1280ba: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1280bc: 83 c4 10 add $0x10,%esp 1280bf: eb 12 jmp 1280d3 <== ALWAYS TAKEN } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 1280c1: 89 d0 mov %edx,%eax 1280c3: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 1280c5: 85 d2 test %edx,%edx 1280c7: 75 ce jne 128097 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1280c9: e8 43 95 fe ff call 111611 <_Thread_Enable_dispatch> 1280ce: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1280d3: 8b 5d fc mov -0x4(%ebp),%ebx 1280d6: c9 leave 1280d7: c3 ret 001280d8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1280d8: 55 push %ebp 1280d9: 89 e5 mov %esp,%ebp 1280db: 56 push %esi 1280dc: 53 push %ebx 1280dd: 83 ec 10 sub $0x10,%esp 1280e0: 8b 75 0c mov 0xc(%ebp),%esi 1280e3: 8b 5d 10 mov 0x10(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1280e6: 85 f6 test %esi,%esi 1280e8: 74 48 je 128132 return RTEMS_INVALID_ADDRESS; if ( !result ) 1280ea: 85 db test %ebx,%ebx 1280ec: 74 44 je 128132 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1280ee: 50 push %eax 1280ef: 50 push %eax 1280f0: 8d 45 f4 lea -0xc(%ebp),%eax 1280f3: 50 push %eax 1280f4: ff 75 08 pushl 0x8(%ebp) 1280f7: e8 38 95 fe ff call 111634 <_Thread_Get> 1280fc: 89 c2 mov %eax,%edx switch (location) { 1280fe: 83 c4 10 add $0x10,%esp 128101: b8 04 00 00 00 mov $0x4,%eax 128106: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 12810a: 75 2b jne 128137 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 12810c: 8b 82 04 01 00 00 mov 0x104(%edx),%eax while (tvp) { 128112: eb 15 jmp 128129 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 128114: 39 70 04 cmp %esi,0x4(%eax) 128117: 75 0e jne 128127 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 128119: 8b 40 0c mov 0xc(%eax),%eax 12811c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 12811e: e8 ee 94 fe ff call 111611 <_Thread_Enable_dispatch> 128123: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 128125: eb 10 jmp 128137 <== ALWAYS TAKEN } tvp = (rtems_task_variable_t *)tvp->next; 128127: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 128129: 85 c0 test %eax,%eax 12812b: 75 e7 jne 128114 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12812d: e8 df 94 fe ff call 111611 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 128132: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 128137: 8d 65 f8 lea -0x8(%ebp),%esp 12813a: 5b pop %ebx 12813b: 5e pop %esi 12813c: c9 leave 12813d: c3 ret 0010a378 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10a378: 55 push %ebp 10a379: 89 e5 mov %esp,%ebp 10a37b: 53 push %ebx 10a37c: 83 ec 04 sub $0x4,%esp 10a37f: 8b 5d 08 mov 0x8(%ebp),%ebx 10a382: a1 ec 41 12 00 mov 0x1241ec,%eax 10a387: 40 inc %eax 10a388: a3 ec 41 12 00 mov %eax,0x1241ec _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10a38d: 85 db test %ebx,%ebx 10a38f: 75 07 jne 10a398 _Thread_Yield_processor(); 10a391: e8 26 23 00 00 call 10c6bc <_Thread_Yield_processor> 10a396: eb 45 jmp 10a3dd <== ALWAYS TAKEN } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10a398: 50 push %eax 10a399: 50 push %eax 10a39a: 6a 08 push $0x8 10a39c: ff 35 a8 42 12 00 pushl 0x1242a8 10a3a2: e8 35 20 00 00 call 10c3dc <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10a3a7: a1 a8 42 12 00 mov 0x1242a8,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10a3ac: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a3af: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10a3b6: c7 40 64 74 ba 10 00 movl $0x10ba74,0x64(%eax) the_watchdog->id = id; 10a3bd: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10a3c0: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a3c7: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a3ca: 5a pop %edx 10a3cb: 59 pop %ecx 10a3cc: 83 c0 48 add $0x48,%eax 10a3cf: 50 push %eax 10a3d0: 68 c8 42 12 00 push $0x1242c8 10a3d5: e8 d6 25 00 00 call 10c9b0 <_Watchdog_Insert> 10a3da: 83 c4 10 add $0x10,%esp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10a3dd: e8 0f 18 00 00 call 10bbf1 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10a3e2: 31 c0 xor %eax,%eax 10a3e4: 8b 5d fc mov -0x4(%ebp),%ebx 10a3e7: c9 leave 10a3e8: c3 ret 0010b04c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10b04c: 55 push %ebp 10b04d: 89 e5 mov %esp,%ebp 10b04f: 53 push %ebx 10b050: 83 ec 04 sub $0x4,%esp 10b053: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10b056: b8 0b 00 00 00 mov $0xb,%eax 10b05b: 80 3d ec 73 12 00 00 cmpb $0x0,0x1273ec 10b062: 0f 84 9c 00 00 00 je 10b104 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10b068: b0 09 mov $0x9,%al 10b06a: 85 db test %ebx,%ebx 10b06c: 0f 84 92 00 00 00 je 10b104 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10b072: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10b079: 83 ec 0c sub $0xc,%esp 10b07c: 53 push %ebx 10b07d: e8 12 f5 ff ff call 10a594 <_TOD_Validate> <== ALWAYS TAKEN 10b082: 83 c4 10 add $0x10,%esp 10b085: 84 c0 test %al,%al 10b087: 74 76 je 10b0ff return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10b089: 83 ec 0c sub $0xc,%esp 10b08c: 53 push %ebx 10b08d: e8 9a f4 ff ff call 10a52c <_TOD_To_seconds> <== ALWAYS TAKEN 10b092: 89 c3 mov %eax,%ebx if ( seconds <= _TOD_Seconds_since_epoch() ) 10b094: 83 c4 10 add $0x10,%esp 10b097: 3b 05 68 74 12 00 cmp 0x127468,%eax 10b09d: 76 60 jbe 10b0ff 10b09f: a1 d8 73 12 00 mov 0x1273d8,%eax 10b0a4: 40 inc %eax 10b0a5: a3 d8 73 12 00 mov %eax,0x1273d8 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10b0aa: 50 push %eax 10b0ab: 50 push %eax 10b0ac: 6a 10 push $0x10 10b0ae: ff 35 94 74 12 00 pushl 0x127494 10b0b4: e8 23 21 00 00 call 10d1dc <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10b0b9: 8b 15 94 74 12 00 mov 0x127494,%edx if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 10b0bf: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b0c2: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10b0c9: c7 42 64 74 c8 10 00 movl $0x10c874,0x64(%edx) the_watchdog->id = id; 10b0d0: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 10b0d3: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b0da: 2b 1d 68 74 12 00 sub 0x127468,%ebx 10b0e0: 89 5a 54 mov %ebx,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10b0e3: 58 pop %eax 10b0e4: 59 pop %ecx 10b0e5: 83 c2 48 add $0x48,%edx 10b0e8: 52 push %edx 10b0e9: 68 a8 74 12 00 push $0x1274a8 10b0ee: e8 29 27 00 00 call 10d81c <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10b0f3: e8 f9 18 00 00 call 10c9f1 <_Thread_Enable_dispatch> 10b0f8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b0fa: 83 c4 10 add $0x10,%esp 10b0fd: eb 05 jmp 10b104 <== ALWAYS TAKEN 10b0ff: b8 14 00 00 00 mov $0x14,%eax } 10b104: 8b 5d fc mov -0x4(%ebp),%ebx 10b107: c9 leave 10b108: c3 ret 00115e20 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 115e20: 55 push %ebp 115e21: 89 e5 mov %esp,%ebp 115e23: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 115e26: 8d 45 f4 lea -0xc(%ebp),%eax 115e29: 50 push %eax 115e2a: ff 75 08 pushl 0x8(%ebp) 115e2d: 68 e4 de 13 00 push $0x13dee4 115e32: e8 59 25 00 00 call 118390 <_Objects_Get> 115e37: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 115e39: 83 c4 10 add $0x10,%esp 115e3c: b8 04 00 00 00 mov $0x4,%eax 115e41: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115e45: 75 1c jne 115e63 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 115e47: 83 7a 38 04 cmpl $0x4,0x38(%edx) 115e4b: 74 0f je 115e5c <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 115e4d: 83 ec 0c sub $0xc,%esp 115e50: 83 c2 10 add $0x10,%edx 115e53: 52 push %edx 115e54: e8 ef 3f 00 00 call 119e48 <_Watchdog_Remove> 115e59: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 115e5c: e8 94 2d 00 00 call 118bf5 <_Thread_Enable_dispatch> 115e61: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115e63: c9 leave 115e64: c3 ret 0010a65c : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10a65c: 55 push %ebp 10a65d: 89 e5 mov %esp,%ebp 10a65f: 57 push %edi 10a660: 56 push %esi 10a661: 53 push %ebx 10a662: 83 ec 0c sub $0xc,%esp 10a665: 8b 75 08 mov 0x8(%ebp),%esi 10a668: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10a66b: b8 03 00 00 00 mov $0x3,%eax 10a670: 85 f6 test %esi,%esi 10a672: 74 6f je 10a6e3 return RTEMS_INVALID_NAME; if ( !id ) 10a674: b0 09 mov $0x9,%al 10a676: 85 db test %ebx,%ebx 10a678: 74 69 je 10a6e3 10a67a: a1 e4 51 12 00 mov 0x1251e4,%eax 10a67f: 40 inc %eax 10a680: a3 e4 51 12 00 mov %eax,0x1251e4 * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 10a685: 83 ec 0c sub $0xc,%esp 10a688: 68 00 5b 12 00 push $0x125b00 10a68d: e8 06 0d 00 00 call 10b398 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10a692: 83 c4 10 add $0x10,%esp 10a695: 85 c0 test %eax,%eax 10a697: 75 0c jne 10a6a5 _Thread_Enable_dispatch(); 10a699: e8 ff 18 00 00 call 10bf9d <_Thread_Enable_dispatch> 10a69e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10a6a3: eb 3e jmp 10a6e3 <== ALWAYS TAKEN } the_timer->the_class = TIMER_DORMANT; 10a6a5: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a6ac: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10a6b3: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10a6ba: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10a6c1: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a6c8: 8b 50 08 mov 0x8(%eax),%edx 10a6cb: 0f b7 fa movzwl %dx,%edi 10a6ce: 8b 0d 1c 5b 12 00 mov 0x125b1c,%ecx 10a6d4: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10a6d7: 89 70 0c mov %esi,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10a6da: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10a6dc: e8 bc 18 00 00 call 10bf9d <_Thread_Enable_dispatch> 10a6e1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10a6e3: 8d 65 f4 lea -0xc(%ebp),%esp 10a6e6: 5b pop %ebx 10a6e7: 5e pop %esi 10a6e8: 5f pop %edi 10a6e9: c9 leave 10a6ea: c3 ret 0010a6ec : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10a6ec: 55 push %ebp 10a6ed: 89 e5 mov %esp,%ebp 10a6ef: 57 push %edi 10a6f0: 56 push %esi 10a6f1: 53 push %ebx 10a6f2: 83 ec 1c sub $0x1c,%esp 10a6f5: 8b 7d 08 mov 0x8(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10a6f8: b8 0a 00 00 00 mov $0xa,%eax 10a6fd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10a701: 0f 84 87 00 00 00 je 10a78e return RTEMS_INVALID_NUMBER; if ( !routine ) 10a707: b0 09 mov $0x9,%al 10a709: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a70d: 74 7f je 10a78e RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 10a70f: 52 push %edx 10a710: 8d 45 e4 lea -0x1c(%ebp),%eax 10a713: 50 push %eax 10a714: 57 push %edi 10a715: 68 00 5b 12 00 push $0x125b00 10a71a: e8 8d 10 00 00 call 10b7ac <_Objects_Get> 10a71f: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10a721: 83 c4 10 add $0x10,%esp 10a724: b8 04 00 00 00 mov $0x4,%eax 10a729: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10a72d: 75 5f jne 10a78e case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10a72f: 8d 73 10 lea 0x10(%ebx),%esi 10a732: 83 ec 0c sub $0xc,%esp 10a735: 56 push %esi 10a736: e8 39 27 00 00 call 10ce74 <_Watchdog_Remove> _ISR_Disable( level ); 10a73b: 9c pushf 10a73c: fa cli 10a73d: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 10a73e: 83 c4 10 add $0x10,%esp 10a741: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10a745: 74 0b je 10a752 _ISR_Enable( level ); 10a747: 50 push %eax 10a748: 9d popf _Thread_Enable_dispatch(); 10a749: e8 4f 18 00 00 call 10bf9d <_Thread_Enable_dispatch> 10a74e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a750: eb 3c jmp 10a78e <== ALWAYS TAKEN /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 10a752: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a759: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 10a760: 8b 55 10 mov 0x10(%ebp),%edx 10a763: 89 53 2c mov %edx,0x2c(%ebx) the_watchdog->id = id; 10a766: 89 7b 30 mov %edi,0x30(%ebx) the_watchdog->user_data = user_data; 10a769: 8b 55 14 mov 0x14(%ebp),%edx 10a76c: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10a76f: 50 push %eax 10a770: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a771: 8b 45 0c mov 0xc(%ebp),%eax 10a774: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a777: 50 push %eax 10a778: 50 push %eax 10a779: 56 push %esi 10a77a: 68 c0 52 12 00 push $0x1252c0 10a77f: e8 d8 25 00 00 call 10cd5c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10a784: e8 14 18 00 00 call 10bf9d <_Thread_Enable_dispatch> 10a789: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a78b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a78e: 8d 65 f4 lea -0xc(%ebp),%esp 10a791: 5b pop %ebx 10a792: 5e pop %esi 10a793: 5f pop %edi 10a794: c9 leave 10a795: c3 ret 00116000 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116000: 55 push %ebp 116001: 89 e5 mov %esp,%ebp 116003: 57 push %edi 116004: 56 push %esi 116005: 53 push %ebx 116006: 83 ec 1c sub $0x1c,%esp 116009: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 11600c: b8 0b 00 00 00 mov $0xb,%eax 116011: 80 3d d4 d5 13 00 00 cmpb $0x0,0x13d5d4 116018: 0f 84 ae 00 00 00 je 1160cc return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11601e: 83 ec 0c sub $0xc,%esp 116021: 53 push %ebx 116022: e8 05 d9 ff ff call 11392c <_TOD_Validate> 116027: 83 c4 10 add $0x10,%esp 11602a: 84 c0 test %al,%al 11602c: 0f 84 95 00 00 00 je 1160c7 return RTEMS_INVALID_CLOCK; if ( !routine ) 116032: b8 09 00 00 00 mov $0x9,%eax 116037: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11603b: 0f 84 8b 00 00 00 je 1160cc return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 116041: 83 ec 0c sub $0xc,%esp 116044: 53 push %ebx 116045: e8 7a d8 ff ff call 1138c4 <_TOD_To_seconds> 11604a: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11604c: 83 c4 10 add $0x10,%esp 11604f: 3b 05 50 d6 13 00 cmp 0x13d650,%eax 116055: 76 70 jbe 1160c7 116057: 51 push %ecx 116058: 8d 45 e4 lea -0x1c(%ebp),%eax 11605b: 50 push %eax 11605c: ff 75 08 pushl 0x8(%ebp) 11605f: 68 e4 de 13 00 push $0x13dee4 116064: e8 27 23 00 00 call 118390 <_Objects_Get> 116069: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11606b: 83 c4 10 add $0x10,%esp 11606e: b8 04 00 00 00 mov $0x4,%eax 116073: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116077: 75 53 jne 1160cc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116079: 8d 73 10 lea 0x10(%ebx),%esi 11607c: 83 ec 0c sub $0xc,%esp 11607f: 56 push %esi 116080: e8 c3 3d 00 00 call 119e48 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 116085: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11608c: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116093: 8b 45 10 mov 0x10(%ebp),%eax 116096: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 116099: 8b 45 08 mov 0x8(%ebp),%eax 11609c: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 11609f: 8b 45 14 mov 0x14(%ebp),%eax 1160a2: 89 43 34 mov %eax,0x34(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1160a5: 2b 3d 50 d6 13 00 sub 0x13d650,%edi 1160ab: 89 7b 1c mov %edi,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1160ae: 58 pop %eax 1160af: 5a pop %edx 1160b0: 56 push %esi 1160b1: 68 90 d6 13 00 push $0x13d690 1160b6: e8 75 3c 00 00 call 119d30 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1160bb: e8 35 2b 00 00 call 118bf5 <_Thread_Enable_dispatch> 1160c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1160c2: 83 c4 10 add $0x10,%esp 1160c5: eb 05 jmp 1160cc <== ALWAYS TAKEN 1160c7: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160cc: 8d 65 f4 lea -0xc(%ebp),%esp 1160cf: 5b pop %ebx 1160d0: 5e pop %esi 1160d1: 5f pop %edi 1160d2: c9 leave 1160d3: c3 ret 00116364 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 116364: 55 push %ebp 116365: 89 e5 mov %esp,%ebp 116367: 53 push %ebx 116368: 83 ec 24 sub $0x24,%esp 11636b: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 11636e: 31 c0 xor %eax,%eax 116370: 85 d2 test %edx,%edx 116372: 74 0f je 116383 116374: 0f b6 05 f4 51 13 00 movzbl 0x1351f4,%eax 11637b: 39 c2 cmp %eax,%edx 11637d: 0f 96 c0 setbe %al 116380: 0f b6 c0 movzbl %al,%eax * Make sure the requested priority is valid. The if is * 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 ) ) { 116383: 89 d3 mov %edx,%ebx 116385: 85 c0 test %eax,%eax 116387: 75 0b jne 116394 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 116389: b0 13 mov $0x13,%al 11638b: 42 inc %edx 11638c: 0f 85 4d 01 00 00 jne 1164df 116392: 31 db xor %ebx,%ebx 116394: a1 c0 d5 13 00 mov 0x13d5c0,%eax 116399: 40 inc %eax 11639a: a3 c0 d5 13 00 mov %eax,0x13d5c0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11639f: 8a 15 e8 8e 13 00 mov 0x138ee8,%dl initialized = true; 1163a5: c6 05 e8 8e 13 00 01 movb $0x1,0x138ee8 _Thread_Enable_dispatch(); 1163ac: 88 55 e4 mov %dl,-0x1c(%ebp) 1163af: e8 41 28 00 00 call 118bf5 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1163b4: b8 0e 00 00 00 mov $0xe,%eax 1163b9: 8a 55 e4 mov -0x1c(%ebp),%dl 1163bc: 84 d2 test %dl,%dl 1163be: 0f 85 1b 01 00 00 jne 1164df * 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( 1163c4: 51 push %ecx 1163c5: 51 push %ecx 1163c6: 8d 45 f4 lea -0xc(%ebp),%eax 1163c9: 50 push %eax 1163ca: 8b 45 10 mov 0x10(%ebp),%eax 1163cd: 80 cc 80 or $0x80,%ah 1163d0: 50 push %eax 1163d1: 68 00 01 00 00 push $0x100 1163d6: ff 75 0c pushl 0xc(%ebp) 1163d9: 53 push %ebx 1163da: 68 45 4d 49 54 push $0x54494d45 1163df: e8 80 f2 ff ff call 115664 <== ALWAYS TAKEN /* 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) { 1163e4: 83 c4 20 add $0x20,%esp 1163e7: 85 c0 test %eax,%eax 1163e9: 74 0c je 1163f7 initialized = false; 1163eb: c6 05 e8 8e 13 00 00 movb $0x0,0x138ee8 return status; 1163f2: e9 e8 00 00 00 jmp 1164df <== ALWAYS TAKEN * 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) 1163f7: 8b 45 f4 mov -0xc(%ebp),%eax /* * 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( 1163fa: 0f b7 c8 movzwl %ax,%ecx 1163fd: 8b 15 64 d5 13 00 mov 0x13d564,%edx 116403: 8b 14 8a mov (%edx,%ecx,4),%edx 116406: 89 15 ec 8e 13 00 mov %edx,0x138eec */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11640c: c7 05 1c 8f 13 00 20 movl $0x138f20,0x138f1c 116413: 8f 13 00 the_chain->permanent_null = NULL; 116416: c7 05 20 8f 13 00 00 movl $0x0,0x138f20 11641d: 00 00 00 the_chain->last = _Chain_Head(the_chain); 116420: c7 05 24 8f 13 00 1c movl $0x138f1c,0x138f24 116427: 8f 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11642a: c7 05 54 8f 13 00 58 movl $0x138f58,0x138f54 116431: 8f 13 00 the_chain->permanent_null = NULL; 116434: c7 05 58 8f 13 00 00 movl $0x0,0x138f58 11643b: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11643e: c7 05 5c 8f 13 00 54 movl $0x138f54,0x138f5c 116445: 8f 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116448: c7 05 fc 8e 13 00 00 movl $0x0,0x138efc 11644f: 00 00 00 the_watchdog->routine = routine; 116452: c7 05 10 8f 13 00 78 movl $0x118a78,0x138f10 116459: 8a 11 00 the_watchdog->id = id; 11645c: a3 14 8f 13 00 mov %eax,0x138f14 the_watchdog->user_data = user_data; 116461: c7 05 18 8f 13 00 00 movl $0x0,0x138f18 116468: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11646b: c7 05 34 8f 13 00 00 movl $0x0,0x138f34 116472: 00 00 00 the_watchdog->routine = routine; 116475: c7 05 48 8f 13 00 78 movl $0x118a78,0x138f48 11647c: 8a 11 00 the_watchdog->id = id; 11647f: a3 4c 8f 13 00 mov %eax,0x138f4c the_watchdog->user_data = user_data; 116484: c7 05 50 8f 13 00 00 movl $0x0,0x138f50 11648b: 00 00 00 /* * 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; 11648e: c7 05 f0 8e 13 00 ff movl $0x1166ff,0x138ef0 116495: 66 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 116498: 8b 15 0c d7 13 00 mov 0x13d70c,%edx 11649e: 89 15 28 8f 13 00 mov %edx,0x138f28 ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1164a4: 8b 15 50 d6 13 00 mov 0x13d650,%edx 1164aa: 89 15 60 8f 13 00 mov %edx,0x138f60 ts->insert_chain = NULL; 1164b0: c7 05 64 8f 13 00 00 movl $0x0,0x138f64 1164b7: 00 00 00 ts->active = false; 1164ba: c6 05 68 8f 13 00 00 movb $0x0,0x138f68 /* * The default timer server is now available. */ _Timer_server = ts; 1164c1: c7 05 24 df 13 00 ec movl $0x138eec,0x13df24 1164c8: 8e 13 00 /* * Start the timer server */ status = rtems_task_start( 1164cb: 52 push %edx 1164cc: 68 ec 8e 13 00 push $0x138eec 1164d1: 68 70 65 11 00 push $0x116570 1164d6: 50 push %eax 1164d7: e8 60 f7 ff ff call 115c3c <== ALWAYS TAKEN if (status) { initialized = false; } #endif return status; 1164dc: 83 c4 10 add $0x10,%esp } 1164df: 8b 5d fc mov -0x4(%ebp),%ebx 1164e2: c9 leave 1164e3: c3 ret 00116150 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 116150: 55 push %ebp 116151: 89 e5 mov %esp,%ebp 116153: 56 push %esi 116154: 53 push %ebx 116155: 83 ec 14 sub $0x14,%esp 116158: 8d 45 f4 lea -0xc(%ebp),%eax 11615b: 50 push %eax 11615c: ff 75 08 pushl 0x8(%ebp) 11615f: 68 e4 de 13 00 push $0x13dee4 116164: e8 27 22 00 00 call 118390 <_Objects_Get> 116169: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11616b: 83 c4 10 add $0x10,%esp 11616e: be 04 00 00 00 mov $0x4,%esi 116173: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116177: 75 50 jne 1161c9 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 116179: 8b 40 38 mov 0x38(%eax),%eax 11617c: 85 c0 test %eax,%eax 11617e: 75 1e jne 11619e _Watchdog_Remove( &the_timer->Ticker ); 116180: 83 c3 10 add $0x10,%ebx 116183: 83 ec 0c sub $0xc,%esp 116186: 53 push %ebx 116187: e8 bc 3c 00 00 call 119e48 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 11618c: 59 pop %ecx 11618d: 58 pop %eax 11618e: 53 push %ebx 11618f: 68 9c d6 13 00 push $0x13d69c 116194: e8 97 3b 00 00 call 119d30 <_Watchdog_Insert> 116199: 66 31 f6 xor %si,%si 11619c: eb 23 jmp 1161c1 <== ALWAYS TAKEN } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11619e: be 0b 00 00 00 mov $0xb,%esi 1161a3: 48 dec %eax 1161a4: 75 1e jne 1161c4 Timer_server_Control *timer_server = _Timer_server; 1161a6: 8b 35 24 df 13 00 mov 0x13df24,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1161ac: 83 ec 0c sub $0xc,%esp 1161af: 8d 43 10 lea 0x10(%ebx),%eax 1161b2: 50 push %eax 1161b3: e8 90 3c 00 00 call 119e48 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 1161b8: 58 pop %eax 1161b9: 5a pop %edx 1161ba: 53 push %ebx 1161bb: 56 push %esi 1161bc: ff 56 04 call *0x4(%esi) 1161bf: 31 f6 xor %esi,%esi 1161c1: 83 c4 10 add $0x10,%esp * 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(); 1161c4: e8 2c 2a 00 00 call 118bf5 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161c9: 89 f0 mov %esi,%eax 1161cb: 8d 65 f8 lea -0x8(%ebp),%esp 1161ce: 5b pop %ebx 1161cf: 5e pop %esi 1161d0: c9 leave 1161d1: c3 ret 001161d4 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1161d4: 55 push %ebp 1161d5: 89 e5 mov %esp,%ebp 1161d7: 57 push %edi 1161d8: 56 push %esi 1161d9: 53 push %ebx 1161da: 83 ec 1c sub $0x1c,%esp 1161dd: 8b 7d 08 mov 0x8(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 1161e0: 8b 35 24 df 13 00 mov 0x13df24,%esi if ( !timer_server ) 1161e6: b8 0e 00 00 00 mov $0xe,%eax 1161eb: 85 f6 test %esi,%esi 1161ed: 0f 84 8d 00 00 00 je 116280 return RTEMS_INCORRECT_STATE; if ( !routine ) 1161f3: b0 09 mov $0x9,%al 1161f5: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1161f9: 0f 84 81 00 00 00 je 116280 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 1161ff: b0 0a mov $0xa,%al 116201: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 116205: 74 79 je 116280 116207: 52 push %edx 116208: 8d 45 e4 lea -0x1c(%ebp),%eax 11620b: 50 push %eax 11620c: 57 push %edi 11620d: 68 e4 de 13 00 push $0x13dee4 116212: e8 79 21 00 00 call 118390 <_Objects_Get> 116217: 89 c3 mov %eax,%ebx return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116219: 83 c4 10 add $0x10,%esp 11621c: b8 04 00 00 00 mov $0x4,%eax 116221: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116225: 75 59 jne 116280 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116227: 83 ec 0c sub $0xc,%esp 11622a: 8d 43 10 lea 0x10(%ebx),%eax 11622d: 50 push %eax 11622e: e8 15 3c 00 00 call 119e48 <_Watchdog_Remove> _ISR_Disable( level ); 116233: 9c pushf 116234: fa cli 116235: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 116236: 83 c4 10 add $0x10,%esp 116239: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 11623d: 74 0b je 11624a _ISR_Enable( level ); 11623f: 50 push %eax 116240: 9d popf _Thread_Enable_dispatch(); 116241: e8 af 29 00 00 call 118bf5 <_Thread_Enable_dispatch> 116246: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116248: eb 36 jmp 116280 <== ALWAYS TAKEN /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 11624a: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116251: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116258: 8b 55 10 mov 0x10(%ebp),%edx 11625b: 89 53 2c mov %edx,0x2c(%ebx) the_watchdog->id = id; 11625e: 89 7b 30 mov %edi,0x30(%ebx) the_watchdog->user_data = user_data; 116261: 8b 55 14 mov 0x14(%ebp),%edx 116264: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 116267: 8b 55 0c mov 0xc(%ebp),%edx 11626a: 89 53 1c mov %edx,0x1c(%ebx) _ISR_Enable( level ); 11626d: 50 push %eax 11626e: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 11626f: 50 push %eax 116270: 50 push %eax 116271: 53 push %ebx 116272: 56 push %esi 116273: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 116276: e8 7a 29 00 00 call 118bf5 <_Thread_Enable_dispatch> 11627b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11627d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116280: 8d 65 f4 lea -0xc(%ebp),%esp 116283: 5b pop %ebx 116284: 5e pop %esi 116285: 5f pop %edi 116286: c9 leave 116287: c3 ret 00116288 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116288: 55 push %ebp 116289: 89 e5 mov %esp,%ebp 11628b: 57 push %edi 11628c: 56 push %esi 11628d: 53 push %ebx 11628e: 83 ec 1c sub $0x1c,%esp 116291: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116294: 8b 35 24 df 13 00 mov 0x13df24,%esi if ( !timer_server ) 11629a: b8 0e 00 00 00 mov $0xe,%eax 11629f: 85 f6 test %esi,%esi 1162a1: 0f 84 b4 00 00 00 je 11635b return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1162a7: b0 0b mov $0xb,%al 1162a9: 80 3d d4 d5 13 00 00 cmpb $0x0,0x13d5d4 1162b0: 0f 84 a5 00 00 00 je 11635b <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 1162b6: b0 09 mov $0x9,%al 1162b8: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1162bc: 0f 84 99 00 00 00 je 11635b return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1162c2: 83 ec 0c sub $0xc,%esp 1162c5: 53 push %ebx 1162c6: e8 61 d6 ff ff call 11392c <_TOD_Validate> 1162cb: 83 c4 10 add $0x10,%esp 1162ce: 84 c0 test %al,%al 1162d0: 0f 84 80 00 00 00 je 116356 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1162d6: 83 ec 0c sub $0xc,%esp 1162d9: 53 push %ebx 1162da: e8 e5 d5 ff ff call 1138c4 <_TOD_To_seconds> 1162df: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1162e1: 83 c4 10 add $0x10,%esp 1162e4: 3b 05 50 d6 13 00 cmp 0x13d650,%eax 1162ea: 76 6a jbe 116356 1162ec: 51 push %ecx 1162ed: 8d 45 e4 lea -0x1c(%ebp),%eax 1162f0: 50 push %eax 1162f1: ff 75 08 pushl 0x8(%ebp) 1162f4: 68 e4 de 13 00 push $0x13dee4 1162f9: e8 92 20 00 00 call 118390 <_Objects_Get> 1162fe: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116300: 83 c4 10 add $0x10,%esp 116303: b8 04 00 00 00 mov $0x4,%eax 116308: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 11630c: 75 4d jne 11635b case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11630e: 83 ec 0c sub $0xc,%esp 116311: 8d 43 10 lea 0x10(%ebx),%eax 116314: 50 push %eax 116315: e8 2e 3b 00 00 call 119e48 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 11631a: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116321: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116328: 8b 45 10 mov 0x10(%ebp),%eax 11632b: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 11632e: 8b 45 08 mov 0x8(%ebp),%eax 116331: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 116334: 8b 45 14 mov 0x14(%ebp),%eax 116337: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 11633a: 2b 3d 50 d6 13 00 sub 0x13d650,%edi 116340: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 116343: 58 pop %eax 116344: 5a pop %edx 116345: 53 push %ebx 116346: 56 push %esi 116347: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 11634a: e8 a6 28 00 00 call 118bf5 <_Thread_Enable_dispatch> 11634f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116351: 83 c4 10 add $0x10,%esp 116354: eb 05 jmp 11635b <== ALWAYS TAKEN 116356: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11635b: 8d 65 f4 lea -0xc(%ebp),%esp 11635e: 5b pop %ebx 11635f: 5e pop %esi 116360: 5f pop %edi 116361: c9 leave 116362: c3 ret 0010ab1d : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 10ab1d: 55 push %ebp 10ab1e: 89 e5 mov %esp,%ebp 10ab20: 53 push %ebx 10ab21: 83 ec 04 sub $0x4,%esp 10ab24: 8b 45 08 mov 0x8(%ebp),%eax 10ab27: 8b 5d 0c mov 0xc(%ebp),%ebx void *ptr; /* * check the arguments */ if ( !pointer ) 10ab2a: 85 db test %ebx,%ebx 10ab2c: 74 20 je 10ab4e return false; if ( !bytes ) 10ab2e: 85 c0 test %eax,%eax 10ab30: 74 1c je 10ab4e RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 10ab32: 6a 00 push $0x0 10ab34: 6a 00 push $0x0 10ab36: 50 push %eax 10ab37: 68 04 7d 12 00 push $0x127d04 10ab3c: e8 5f 13 00 00 call 10bea0 <_Protected_heap_Allocate_aligned_with_boundary> /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 10ab41: 83 c4 10 add $0x10,%esp 10ab44: 85 c0 test %eax,%eax 10ab46: 74 06 je 10ab4e return false; *pointer = ptr; 10ab48: 89 03 mov %eax,(%ebx) 10ab4a: b0 01 mov $0x1,%al return true; 10ab4c: eb 02 jmp 10ab50 <== ALWAYS TAKEN 10ab4e: 31 c0 xor %eax,%eax } 10ab50: 8b 5d fc mov -0x4(%ebp),%ebx 10ab53: c9 leave 10ab54: c3 ret 0010a65c : #include int sched_get_priority_max( int policy ) { 10a65c: 55 push %ebp 10a65d: 89 e5 mov %esp,%ebp 10a65f: 83 ec 08 sub $0x8,%esp switch ( policy ) { 10a662: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10a666: 76 10 jbe 10a678 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10a668: e8 bf 79 00 00 call 11202c <__errno> 10a66d: c7 00 16 00 00 00 movl $0x16,(%eax) 10a673: 83 c8 ff or $0xffffffff,%eax 10a676: eb 08 jmp 10a680 <== ALWAYS TAKEN } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10a678: 0f b6 05 18 12 12 00 movzbl 0x121218,%eax 10a67f: 48 dec %eax } 10a680: c9 leave 10a681: c3 ret 0010a6a8 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10a6a8: 55 push %ebp 10a6a9: 89 e5 mov %esp,%ebp 10a6ab: 56 push %esi 10a6ac: 53 push %ebx 10a6ad: 8b 75 08 mov 0x8(%ebp),%esi 10a6b0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10a6b3: 85 f6 test %esi,%esi 10a6b5: 74 16 je 10a6cd <== ALWAYS TAKEN 10a6b7: e8 3c d1 ff ff call 1077f8 10a6bc: 39 c6 cmp %eax,%esi 10a6be: 74 0d je 10a6cd rtems_set_errno_and_return_minus_one( ESRCH ); 10a6c0: e8 67 79 00 00 call 11202c <__errno> 10a6c5: c7 00 03 00 00 00 movl $0x3,(%eax) 10a6cb: eb 0f jmp 10a6dc <== ALWAYS TAKEN if ( !interval ) 10a6cd: 85 db test %ebx,%ebx 10a6cf: 75 10 jne 10a6e1 rtems_set_errno_and_return_minus_one( EINVAL ); 10a6d1: e8 56 79 00 00 call 11202c <__errno> 10a6d6: c7 00 16 00 00 00 movl $0x16,(%eax) 10a6dc: 83 c8 ff or $0xffffffff,%eax 10a6df: eb 13 jmp 10a6f4 <== ALWAYS TAKEN _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10a6e1: 50 push %eax 10a6e2: 50 push %eax 10a6e3: 53 push %ebx 10a6e4: ff 35 a8 51 12 00 pushl 0x1251a8 10a6ea: e8 1d 2f 00 00 call 10d60c <_Timespec_From_ticks> 10a6ef: 31 c0 xor %eax,%eax return 0; 10a6f1: 83 c4 10 add $0x10,%esp } 10a6f4: 8d 65 f8 lea -0x8(%ebp),%esp 10a6f7: 5b pop %ebx 10a6f8: 5e pop %esi 10a6f9: c9 leave 10a6fa: c3 ret 0010cb40 : */ int sem_close( sem_t *sem ) { 10cb40: 55 push %ebp 10cb41: 89 e5 mov %esp,%ebp 10cb43: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 10cb46: 8d 45 f4 lea -0xc(%ebp),%eax 10cb49: 50 push %eax 10cb4a: 8b 45 08 mov 0x8(%ebp),%eax 10cb4d: ff 30 pushl (%eax) 10cb4f: 68 e4 a6 12 00 push $0x12a6e4 10cb54: e8 bf 1d 00 00 call 10e918 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cb59: 83 c4 10 add $0x10,%esp 10cb5c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cb60: 75 18 jne 10cb7a case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 10cb62: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10cb65: 83 ec 0c sub $0xc,%esp 10cb68: 50 push %eax 10cb69: e8 fa 53 00 00 call 111f68 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10cb6e: e8 de 25 00 00 call 10f151 <_Thread_Enable_dispatch> 10cb73: 31 c0 xor %eax,%eax return 0; 10cb75: 83 c4 10 add $0x10,%esp 10cb78: eb 0e jmp 10cb88 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cb7a: e8 6d 86 00 00 call 1151ec <__errno> 10cb7f: c7 00 16 00 00 00 movl $0x16,(%eax) 10cb85: 83 c8 ff or $0xffffffff,%eax } 10cb88: c9 leave 10cb89: c3 ret 0010cb8c : */ int sem_destroy( sem_t *sem ) { 10cb8c: 55 push %ebp 10cb8d: 89 e5 mov %esp,%ebp 10cb8f: 83 ec 1c sub $0x1c,%esp 10cb92: 8d 45 f4 lea -0xc(%ebp),%eax 10cb95: 50 push %eax 10cb96: 8b 45 08 mov 0x8(%ebp),%eax 10cb99: ff 30 pushl (%eax) 10cb9b: 68 e4 a6 12 00 push $0x12a6e4 10cba0: e8 73 1d 00 00 call 10e918 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cba5: 83 c4 10 add $0x10,%esp 10cba8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cbac: 75 22 jne 10cbd0 case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10cbae: 80 78 14 00 cmpb $0x0,0x14(%eax) 10cbb2: 74 07 je 10cbbb _Thread_Enable_dispatch(); 10cbb4: e8 98 25 00 00 call 10f151 <_Thread_Enable_dispatch> 10cbb9: eb 15 jmp 10cbd0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10cbbb: 83 ec 0c sub $0xc,%esp 10cbbe: 50 push %eax 10cbbf: e8 a4 53 00 00 call 111f68 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10cbc4: e8 88 25 00 00 call 10f151 <_Thread_Enable_dispatch> 10cbc9: 31 c0 xor %eax,%eax return 0; 10cbcb: 83 c4 10 add $0x10,%esp 10cbce: eb 0e jmp 10cbde <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cbd0: e8 17 86 00 00 call 1151ec <__errno> 10cbd5: c7 00 16 00 00 00 movl $0x16,(%eax) 10cbdb: 83 c8 ff or $0xffffffff,%eax } 10cbde: c9 leave 10cbdf: c3 ret 0010cbe0 : int sem_getvalue( sem_t *sem, int *sval ) { 10cbe0: 55 push %ebp 10cbe1: 89 e5 mov %esp,%ebp 10cbe3: 83 ec 1c sub $0x1c,%esp 10cbe6: 8d 45 f4 lea -0xc(%ebp),%eax 10cbe9: 50 push %eax 10cbea: 8b 45 08 mov 0x8(%ebp),%eax 10cbed: ff 30 pushl (%eax) 10cbef: 68 e4 a6 12 00 push $0x12a6e4 10cbf4: e8 1f 1d 00 00 call 10e918 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cbf9: 83 c4 10 add $0x10,%esp 10cbfc: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cc00: 75 11 jne 10cc13 case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 10cc02: 8b 50 64 mov 0x64(%eax),%edx 10cc05: 8b 45 0c mov 0xc(%ebp),%eax 10cc08: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10cc0a: e8 42 25 00 00 call 10f151 <_Thread_Enable_dispatch> 10cc0f: 31 c0 xor %eax,%eax return 0; 10cc11: eb 0e jmp 10cc21 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cc13: e8 d4 85 00 00 call 1151ec <__errno> 10cc18: c7 00 16 00 00 00 movl $0x16,(%eax) 10cc1e: 83 c8 ff or $0xffffffff,%eax } 10cc21: c9 leave 10cc22: c3 ret 0010cc24 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 10cc24: 55 push %ebp 10cc25: 89 e5 mov %esp,%ebp 10cc27: 53 push %ebx 10cc28: 83 ec 14 sub $0x14,%esp 10cc2b: 8b 5d 08 mov 0x8(%ebp),%ebx int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 10cc2e: 85 db test %ebx,%ebx 10cc30: 75 10 jne 10cc42 rtems_set_errno_and_return_minus_one( EINVAL ); 10cc32: e8 b5 85 00 00 call 1151ec <__errno> 10cc37: c7 00 16 00 00 00 movl $0x16,(%eax) 10cc3d: 83 c8 ff or $0xffffffff,%eax 10cc40: eb 21 jmp 10cc63 <== ALWAYS TAKEN status = _POSIX_Semaphore_Create_support( 10cc42: 8d 45 f4 lea -0xc(%ebp),%eax 10cc45: 50 push %eax 10cc46: ff 75 10 pushl 0x10(%ebp) 10cc49: ff 75 0c pushl 0xc(%ebp) 10cc4c: 6a 00 push $0x0 10cc4e: e8 29 52 00 00 call 111e7c <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 10cc53: 83 c4 10 add $0x10,%esp 10cc56: 83 f8 ff cmp $0xffffffff,%eax 10cc59: 74 08 je 10cc63 *sem = the_semaphore->Object.id; 10cc5b: 8b 55 f4 mov -0xc(%ebp),%edx 10cc5e: 8b 52 08 mov 0x8(%edx),%edx 10cc61: 89 13 mov %edx,(%ebx) return status; } 10cc63: 8b 5d fc mov -0x4(%ebp),%ebx 10cc66: c9 leave 10cc67: c3 ret 0010cc68 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10cc68: 55 push %ebp 10cc69: 89 e5 mov %esp,%ebp 10cc6b: 57 push %edi 10cc6c: 56 push %esi 10cc6d: 53 push %ebx 10cc6e: 83 ec 2c sub $0x2c,%esp 10cc71: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cc74: a1 fc a3 12 00 mov 0x12a3fc,%eax 10cc79: 40 inc %eax 10cc7a: a3 fc a3 12 00 mov %eax,0x12a3fc POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10cc7f: 8b 45 0c mov 0xc(%ebp),%eax 10cc82: 25 00 02 00 00 and $0x200,%eax 10cc87: 89 45 d4 mov %eax,-0x2c(%ebp) 10cc8a: 75 04 jne 10cc90 10cc8c: 31 ff xor %edi,%edi 10cc8e: eb 03 jmp 10cc93 <== ALWAYS TAKEN va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10cc90: 8b 7d 14 mov 0x14(%ebp),%edi va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10cc93: 52 push %edx 10cc94: 52 push %edx 10cc95: 8d 45 e4 lea -0x1c(%ebp),%eax 10cc98: 50 push %eax 10cc99: 56 push %esi 10cc9a: e8 11 53 00 00 call 111fb0 <_POSIX_Semaphore_Name_to_id> 10cc9f: 89 c3 mov %eax,%ebx * 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 ) { 10cca1: 83 c4 10 add $0x10,%esp 10cca4: 85 c0 test %eax,%eax 10cca6: 74 19 je 10ccc1 /* * 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) ) ) { 10cca8: 83 f8 02 cmp $0x2,%eax 10ccab: 75 06 jne 10ccb3 <== ALWAYS TAKEN 10ccad: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10ccb1: 75 59 jne 10cd0c _Thread_Enable_dispatch(); 10ccb3: e8 99 24 00 00 call 10f151 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10ccb8: e8 2f 85 00 00 call 1151ec <__errno> 10ccbd: 89 18 mov %ebx,(%eax) 10ccbf: eb 1f jmp 10cce0 <== ALWAYS TAKEN /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10ccc1: 8b 45 0c mov 0xc(%ebp),%eax 10ccc4: 25 00 0a 00 00 and $0xa00,%eax 10ccc9: 3d 00 0a 00 00 cmp $0xa00,%eax 10ccce: 75 15 jne 10cce5 _Thread_Enable_dispatch(); 10ccd0: e8 7c 24 00 00 call 10f151 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10ccd5: e8 12 85 00 00 call 1151ec <__errno> 10ccda: c7 00 11 00 00 00 movl $0x11,(%eax) 10cce0: 83 c8 ff or $0xffffffff,%eax 10cce3: eb 4a jmp 10cd2f <== ALWAYS TAKEN 10cce5: 50 push %eax 10cce6: 8d 45 dc lea -0x24(%ebp),%eax 10cce9: 50 push %eax 10ccea: ff 75 e4 pushl -0x1c(%ebp) 10cced: 68 e4 a6 12 00 push $0x12a6e4 10ccf2: e8 21 1c 00 00 call 10e918 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10ccf7: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10ccfa: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10ccfd: e8 4f 24 00 00 call 10f151 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10cd02: e8 4a 24 00 00 call 10f151 <_Thread_Enable_dispatch> goto return_id; 10cd07: 83 c4 10 add $0x10,%esp 10cd0a: eb 1d jmp 10cd29 <== ALWAYS TAKEN /* * 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( 10cd0c: 8d 45 e0 lea -0x20(%ebp),%eax 10cd0f: 50 push %eax 10cd10: 57 push %edi 10cd11: 6a 00 push $0x0 10cd13: 56 push %esi 10cd14: e8 63 51 00 00 call 111e7c <_POSIX_Semaphore_Create_support> 10cd19: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10cd1b: e8 31 24 00 00 call 10f151 <_Thread_Enable_dispatch> if ( status == -1 ) 10cd20: 83 c4 10 add $0x10,%esp 10cd23: 83 c8 ff or $0xffffffff,%eax 10cd26: 43 inc %ebx 10cd27: 74 06 je 10cd2f 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; 10cd29: 8b 45 e0 mov -0x20(%ebp),%eax 10cd2c: 83 c0 08 add $0x8,%eax #endif return id; } 10cd2f: 8d 65 f4 lea -0xc(%ebp),%esp 10cd32: 5b pop %ebx 10cd33: 5e pop %esi 10cd34: 5f pop %edi 10cd35: c9 leave 10cd36: c3 ret 0010cd38 : */ int sem_post( sem_t *sem ) { 10cd38: 55 push %ebp 10cd39: 89 e5 mov %esp,%ebp 10cd3b: 83 ec 1c sub $0x1c,%esp 10cd3e: 8d 45 f4 lea -0xc(%ebp),%eax 10cd41: 50 push %eax 10cd42: 8b 45 08 mov 0x8(%ebp),%eax 10cd45: ff 30 pushl (%eax) 10cd47: 68 e4 a6 12 00 push $0x12a6e4 10cd4c: e8 c7 1b 00 00 call 10e918 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cd51: 83 c4 10 add $0x10,%esp 10cd54: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cd58: 75 1b jne 10cd75 case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10cd5a: 52 push %edx 10cd5b: 6a 00 push $0x0 10cd5d: ff 70 08 pushl 0x8(%eax) 10cd60: 83 c0 1c add $0x1c,%eax 10cd63: 50 push %eax 10cd64: e8 37 13 00 00 call 10e0a0 <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10cd69: e8 e3 23 00 00 call 10f151 <_Thread_Enable_dispatch> 10cd6e: 31 c0 xor %eax,%eax return 0; 10cd70: 83 c4 10 add $0x10,%esp 10cd73: eb 0e jmp 10cd83 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cd75: e8 72 84 00 00 call 1151ec <__errno> 10cd7a: c7 00 16 00 00 00 movl $0x16,(%eax) 10cd80: 83 c8 ff or $0xffffffff,%eax } 10cd83: c9 leave 10cd84: c3 ret 0010cdc8 : */ int sem_unlink( const char *name ) { 10cdc8: 55 push %ebp 10cdc9: 89 e5 mov %esp,%ebp 10cdcb: 53 push %ebx 10cdcc: 83 ec 1c sub $0x1c,%esp 10cdcf: a1 fc a3 12 00 mov 0x12a3fc,%eax 10cdd4: 40 inc %eax 10cdd5: a3 fc a3 12 00 mov %eax,0x12a3fc register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10cdda: 8d 45 f4 lea -0xc(%ebp),%eax 10cddd: 50 push %eax 10cdde: ff 75 08 pushl 0x8(%ebp) 10cde1: e8 ca 51 00 00 call 111fb0 <_POSIX_Semaphore_Name_to_id> 10cde6: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10cde8: 83 c4 10 add $0x10,%esp 10cdeb: 85 c0 test %eax,%eax 10cded: 74 11 je 10ce00 _Thread_Enable_dispatch(); 10cdef: e8 5d 23 00 00 call 10f151 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10cdf4: e8 f3 83 00 00 call 1151ec <__errno> 10cdf9: 89 18 mov %ebx,(%eax) 10cdfb: 83 c8 ff or $0xffffffff,%eax 10cdfe: eb 2f jmp 10ce2f <== ALWAYS TAKEN } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 10ce00: 0f b7 55 f4 movzwl -0xc(%ebp),%edx 10ce04: a1 00 a7 12 00 mov 0x12a700,%eax 10ce09: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = false; 10ce0c: c6 43 15 00 movb $0x0,0x15(%ebx) RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Namespace_remove( 10ce10: 50 push %eax 10ce11: 50 push %eax 10ce12: 53 push %ebx 10ce13: 68 e4 a6 12 00 push $0x12a6e4 10ce18: e8 3f 1c 00 00 call 10ea5c <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 10ce1d: 89 1c 24 mov %ebx,(%esp) 10ce20: e8 43 51 00 00 call 111f68 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10ce25: e8 27 23 00 00 call 10f151 <_Thread_Enable_dispatch> 10ce2a: 31 c0 xor %eax,%eax return 0; 10ce2c: 83 c4 10 add $0x10,%esp } 10ce2f: 8b 5d fc mov -0x4(%ebp),%ebx 10ce32: c9 leave 10ce33: c3 ret 00109c2c : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 109c2c: 55 push %ebp 109c2d: 89 e5 mov %esp,%ebp 109c2f: 83 ec 08 sub $0x8,%esp if ( !value ) 109c32: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 109c36: 74 06 je 109c3e rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 109c38: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 109c3c: 75 0d jne 109c4b rtems_set_errno_and_return_minus_one( EFAULT ); 109c3e: e8 e9 7e 00 00 call 111b2c <__errno> 109c43: c7 00 0e 00 00 00 movl $0xe,(%eax) 109c49: eb 1e jmp 109c69 <== ALWAYS TAKEN switch ( which ) { 109c4b: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 109c4f: 77 0d ja 109c5e case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 109c51: e8 d6 7e 00 00 call 111b2c <__errno> 109c56: c7 00 58 00 00 00 movl $0x58,(%eax) 109c5c: eb 0b jmp 109c69 <== ALWAYS TAKEN default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 109c5e: e8 c9 7e 00 00 call 111b2c <__errno> 109c63: c7 00 16 00 00 00 movl $0x16,(%eax) } 109c69: 83 c8 ff or $0xffffffff,%eax 109c6c: c9 leave 109c6d: c3 ret 0010a558 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10a558: 55 push %ebp 10a559: 89 e5 mov %esp,%ebp 10a55b: 57 push %edi 10a55c: 56 push %esi 10a55d: 53 push %ebx 10a55e: 83 ec 1c sub $0x1c,%esp 10a561: 8b 5d 08 mov 0x8(%ebp),%ebx 10a564: 8b 55 0c mov 0xc(%ebp),%edx 10a567: 8b 45 10 mov 0x10(%ebp),%eax ISR_Level level; if ( oact ) 10a56a: 85 c0 test %eax,%eax 10a56c: 74 12 je 10a580 *oact = _POSIX_signals_Vectors[ sig ]; 10a56e: 6b f3 0c imul $0xc,%ebx,%esi 10a571: 81 c6 8c 67 12 00 add $0x12678c,%esi 10a577: b9 03 00 00 00 mov $0x3,%ecx 10a57c: 89 c7 mov %eax,%edi 10a57e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10a580: 85 db test %ebx,%ebx 10a582: 74 0d je 10a591 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10a584: 8d 43 ff lea -0x1(%ebx),%eax 10a587: 83 f8 1f cmp $0x1f,%eax 10a58a: 77 05 ja 10a591 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10a58c: 83 fb 09 cmp $0x9,%ebx 10a58f: 75 10 jne 10a5a1 rtems_set_errno_and_return_minus_one( EINVAL ); 10a591: e8 ba 7b 00 00 call 112150 <__errno> 10a596: c7 00 16 00 00 00 movl $0x16,(%eax) 10a59c: 83 c8 ff or $0xffffffff,%eax 10a59f: eb 53 jmp 10a5f4 <== ALWAYS TAKEN /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10a5a1: 31 c0 xor %eax,%eax 10a5a3: 85 d2 test %edx,%edx 10a5a5: 74 4d je 10a5f4 <== ALWAYS 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 ); 10a5a7: 9c pushf 10a5a8: fa cli 10a5a9: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10a5ac: 83 7a 08 00 cmpl $0x0,0x8(%edx) 10a5b0: 75 18 jne 10a5ca _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10a5b2: 6b db 0c imul $0xc,%ebx,%ebx 10a5b5: 8d bb 8c 67 12 00 lea 0x12678c(%ebx),%edi 10a5bb: 8d b3 58 07 12 00 lea 0x120758(%ebx),%esi 10a5c1: b9 03 00 00 00 mov $0x3,%ecx 10a5c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a5c8: eb 24 jmp 10a5ee <== ALWAYS TAKEN } else { _POSIX_signals_Clear_process_signals( sig ); 10a5ca: 83 ec 0c sub $0xc,%esp 10a5cd: 53 push %ebx 10a5ce: 89 55 e0 mov %edx,-0x20(%ebp) 10a5d1: e8 7a 4b 00 00 call 10f150 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10a5d6: 6b db 0c imul $0xc,%ebx,%ebx 10a5d9: 8d bb 8c 67 12 00 lea 0x12678c(%ebx),%edi 10a5df: b9 03 00 00 00 mov $0x3,%ecx 10a5e4: 8b 55 e0 mov -0x20(%ebp),%edx 10a5e7: 89 d6 mov %edx,%esi 10a5e9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a5eb: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10a5ee: ff 75 e4 pushl -0x1c(%ebp) 10a5f1: 9d popf 10a5f2: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10a5f4: 8d 65 f4 lea -0xc(%ebp),%esp 10a5f7: 5b pop %ebx 10a5f8: 5e pop %esi 10a5f9: 5f pop %edi 10a5fa: c9 leave 10a5fb: c3 ret 0010a5fc : int sigaddset( sigset_t *set, int signo ) { 10a5fc: 55 push %ebp 10a5fd: 89 e5 mov %esp,%ebp 10a5ff: 83 ec 08 sub $0x8,%esp 10a602: 8b 45 08 mov 0x8(%ebp),%eax 10a605: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10a608: 85 c0 test %eax,%eax 10a60a: 74 0a je 10a616 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10a60c: 85 c9 test %ecx,%ecx 10a60e: 74 06 je 10a616 10a610: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10a611: 83 f9 1f cmp $0x1f,%ecx 10a614: 76 10 jbe 10a626 rtems_set_errno_and_return_minus_one( EINVAL ); 10a616: e8 35 7b 00 00 call 112150 <__errno> 10a61b: c7 00 16 00 00 00 movl $0x16,(%eax) 10a621: 83 c8 ff or $0xffffffff,%eax 10a624: eb 0b jmp 10a631 <== ALWAYS TAKEN *set |= signo_to_mask(signo); 10a626: ba 01 00 00 00 mov $0x1,%edx 10a62b: d3 e2 shl %cl,%edx 10a62d: 09 10 or %edx,(%eax) 10a62f: 31 c0 xor %eax,%eax return 0; } 10a631: c9 leave 10a632: c3 ret 0010bffc : int sigdelset( sigset_t *set, int signo ) { 10bffc: 55 push %ebp 10bffd: 89 e5 mov %esp,%ebp 10bfff: 83 ec 08 sub $0x8,%esp 10c002: 8b 55 08 mov 0x8(%ebp),%edx 10c005: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10c008: 85 d2 test %edx,%edx 10c00a: 74 0c je 10c018 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10c00c: 31 c0 xor %eax,%eax 10c00e: 85 c9 test %ecx,%ecx 10c010: 74 21 je 10c033 10c012: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10c013: 83 f9 1f cmp $0x1f,%ecx 10c016: 76 10 jbe 10c028 rtems_set_errno_and_return_minus_one( EINVAL ); 10c018: e8 ab 7b 00 00 call 113bc8 <__errno> 10c01d: c7 00 16 00 00 00 movl $0x16,(%eax) 10c023: 83 c8 ff or $0xffffffff,%eax 10c026: eb 0b jmp 10c033 <== ALWAYS TAKEN *set &= ~signo_to_mask(signo); 10c028: b8 fe ff ff ff mov $0xfffffffe,%eax 10c02d: d3 c0 rol %cl,%eax 10c02f: 21 02 and %eax,(%edx) 10c031: 31 c0 xor %eax,%eax return 0; } 10c033: c9 leave 10c034: c3 ret 0010e61c : #include int sigemptyset( sigset_t *set ) { 10e61c: 55 push %ebp 10e61d: 89 e5 mov %esp,%ebp 10e61f: 83 ec 08 sub $0x8,%esp 10e622: 8b 45 08 mov 0x8(%ebp),%eax if ( !set ) 10e625: 85 c0 test %eax,%eax 10e627: 75 10 jne 10e639 rtems_set_errno_and_return_minus_one( EINVAL ); 10e629: e8 96 2e 00 00 call 1114c4 <__errno> 10e62e: c7 00 16 00 00 00 movl $0x16,(%eax) 10e634: 83 c8 ff or $0xffffffff,%eax 10e637: eb 08 jmp 10e641 <== ALWAYS TAKEN *set = 0; 10e639: c7 00 00 00 00 00 movl $0x0,(%eax) 10e63f: 31 c0 xor %eax,%eax return 0; } 10e641: c9 leave 10e642: c3 ret 0010c060 : #include int sigfillset( sigset_t *set ) { 10c060: 55 push %ebp 10c061: 89 e5 mov %esp,%ebp 10c063: 83 ec 08 sub $0x8,%esp 10c066: 8b 45 08 mov 0x8(%ebp),%eax if ( !set ) 10c069: 85 c0 test %eax,%eax 10c06b: 75 10 jne 10c07d rtems_set_errno_and_return_minus_one( EINVAL ); 10c06d: e8 56 7b 00 00 call 113bc8 <__errno> 10c072: c7 00 16 00 00 00 movl $0x16,(%eax) 10c078: 83 c8 ff or $0xffffffff,%eax 10c07b: eb 08 jmp 10c085 <== ALWAYS TAKEN *set = SIGNAL_ALL_MASK; 10c07d: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 10c083: 31 c0 xor %eax,%eax return 0; } 10c085: c9 leave 10c086: c3 ret 0010c088 : int sigismember( const sigset_t *set, int signo ) { 10c088: 55 push %ebp 10c089: 89 e5 mov %esp,%ebp 10c08b: 83 ec 08 sub $0x8,%esp 10c08e: 8b 55 08 mov 0x8(%ebp),%edx 10c091: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10c094: 85 d2 test %edx,%edx 10c096: 74 0c je 10c0a4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10c098: 31 c0 xor %eax,%eax 10c09a: 85 c9 test %ecx,%ecx 10c09c: 74 25 je 10c0c3 10c09e: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10c09f: 83 f9 1f cmp $0x1f,%ecx 10c0a2: 76 10 jbe 10c0b4 rtems_set_errno_and_return_minus_one( EINVAL ); 10c0a4: e8 1f 7b 00 00 call 113bc8 <__errno> 10c0a9: c7 00 16 00 00 00 movl $0x16,(%eax) 10c0af: 83 c8 ff or $0xffffffff,%eax 10c0b2: eb 0f jmp 10c0c3 <== ALWAYS TAKEN 10c0b4: b8 01 00 00 00 mov $0x1,%eax 10c0b9: d3 e0 shl %cl,%eax 10c0bb: 85 02 test %eax,(%edx) 10c0bd: 0f 95 c0 setne %al 10c0c0: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10c0c3: c9 leave 10c0c4: c3 ret 0010a424 : sighandler_t signal( int signum, sighandler_t handler ) { 10a424: 55 push %ebp 10a425: 89 e5 mov %esp,%ebp 10a427: 53 push %ebx 10a428: 83 ec 30 sub $0x30,%esp struct sigaction s; struct sigaction old; s.sa_handler = handler ; 10a42b: 8b 45 0c mov 0xc(%ebp),%eax 10a42e: 89 45 f4 mov %eax,-0xc(%ebp) sigemptyset(&s.sa_mask); 10a431: 8d 5d ec lea -0x14(%ebp),%ebx 10a434: 8d 45 f0 lea -0x10(%ebp),%eax 10a437: 50 push %eax 10a438: e8 bf ff ff ff call 10a3fc <== ALWAYS TAKEN s.sa_flags = SA_RESTART | SA_INTERRUPT | SA_NOMASK; s.sa_restorer= NULL ; #elif defined(signal_like_SVR4) s.sa_flags = SA_RESTART; #else s.sa_flags = 0; 10a43d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) #endif sigaction( signum, &s, &old ); 10a444: 83 c4 0c add $0xc,%esp 10a447: 8d 45 e0 lea -0x20(%ebp),%eax 10a44a: 50 push %eax 10a44b: 53 push %ebx 10a44c: ff 75 08 pushl 0x8(%ebp) 10a44f: e8 cc fe ff ff call 10a320 <== ALWAYS TAKEN return (sighandler_t) old.sa_handler; } 10a454: 8b 45 e8 mov -0x18(%ebp),%eax 10a457: 8b 5d fc mov -0x4(%ebp),%ebx 10a45a: c9 leave 10a45b: c3 ret 0010a65c : #include int sigpending( sigset_t *set ) { 10a65c: 55 push %ebp 10a65d: 89 e5 mov %esp,%ebp 10a65f: 83 ec 08 sub $0x8,%esp 10a662: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *api; if ( !set ) 10a665: 85 d2 test %edx,%edx 10a667: 75 10 jne 10a679 rtems_set_errno_and_return_minus_one( EINVAL ); 10a669: e8 e2 7a 00 00 call 112150 <__errno> 10a66e: c7 00 16 00 00 00 movl $0x16,(%eax) 10a674: 83 c8 ff or $0xffffffff,%eax 10a677: eb 1a jmp 10a693 <== ALWAYS TAKEN api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; 10a679: a1 e8 62 12 00 mov 0x1262e8,%eax 10a67e: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx 10a684: a1 58 69 12 00 mov 0x126958,%eax 10a689: 0b 81 c8 00 00 00 or 0xc8(%ecx),%eax 10a68f: 89 02 mov %eax,(%edx) 10a691: 31 c0 xor %eax,%eax return 0; } 10a693: c9 leave 10a694: c3 ret 0010c128 : #include int sigsuspend( const sigset_t *sigmask ) { 10c128: 55 push %ebp 10c129: 89 e5 mov %esp,%ebp 10c12b: 56 push %esi 10c12c: 53 push %ebx 10c12d: 83 ec 14 sub $0x14,%esp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 10c130: 8d 5d f4 lea -0xc(%ebp),%ebx 10c133: 53 push %ebx 10c134: ff 75 08 pushl 0x8(%ebp) 10c137: 6a 01 push $0x1 10c139: e8 c6 ff ff ff call 10c104 <== ALWAYS TAKEN (void) sigfillset( &all_signals ); 10c13e: 8d 75 f0 lea -0x10(%ebp),%esi 10c141: 89 34 24 mov %esi,(%esp) 10c144: e8 17 ff ff ff call 10c060 <== ALWAYS TAKEN status = sigtimedwait( &all_signals, NULL, NULL ); 10c149: 83 c4 0c add $0xc,%esp 10c14c: 6a 00 push $0x0 10c14e: 6a 00 push $0x0 10c150: 56 push %esi 10c151: e8 69 00 00 00 call 10c1bf <== ALWAYS TAKEN 10c156: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10c158: 83 c4 0c add $0xc,%esp 10c15b: 6a 00 push $0x0 10c15d: 53 push %ebx 10c15e: 6a 00 push $0x0 10c160: e8 9f ff ff ff call 10c104 <== ALWAYS TAKEN /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10c165: 83 c4 10 add $0x10,%esp 10c168: 46 inc %esi 10c169: 74 0b je 10c176 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); 10c16b: e8 58 7a 00 00 call 113bc8 <__errno> 10c170: c7 00 04 00 00 00 movl $0x4,(%eax) return status; } 10c176: 83 c8 ff or $0xffffffff,%eax 10c179: 8d 65 f8 lea -0x8(%ebp),%esp 10c17c: 5b pop %ebx 10c17d: 5e pop %esi 10c17e: c9 leave 10c17f: c3 ret 0010a91b : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10a91b: 55 push %ebp 10a91c: 89 e5 mov %esp,%ebp 10a91e: 57 push %edi 10a91f: 56 push %esi 10a920: 53 push %ebx 10a921: 83 ec 2c sub $0x2c,%esp 10a924: 8b 7d 08 mov 0x8(%ebp),%edi 10a927: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10a92a: 85 ff test %edi,%edi 10a92c: 74 24 je 10a952 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10a92e: 85 db test %ebx,%ebx 10a930: 74 33 je 10a965 if ( !_Timespec_Is_valid( timeout ) ) 10a932: 83 ec 0c sub $0xc,%esp 10a935: 53 push %ebx 10a936: e8 d1 2f 00 00 call 10d90c <_Timespec_Is_valid> 10a93b: 83 c4 10 add $0x10,%esp 10a93e: 84 c0 test %al,%al 10a940: 74 10 je 10a952 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10a942: 83 ec 0c sub $0xc,%esp 10a945: 53 push %ebx 10a946: e8 19 30 00 00 call 10d964 <_Timespec_To_ticks> if ( !interval ) 10a94b: 83 c4 10 add $0x10,%esp 10a94e: 85 c0 test %eax,%eax 10a950: 75 15 jne 10a967 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10a952: e8 35 7b 00 00 call 11248c <__errno> 10a957: c7 00 16 00 00 00 movl $0x16,(%eax) 10a95d: 83 cf ff or $0xffffffff,%edi 10a960: e9 13 01 00 00 jmp 10aa78 <== ALWAYS TAKEN 10a965: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10a967: 8b 5d 0c mov 0xc(%ebp),%ebx 10a96a: 85 db test %ebx,%ebx 10a96c: 75 03 jne 10a971 10a96e: 8d 5d dc lea -0x24(%ebp),%ebx the_thread = _Thread_Executing; 10a971: 8b 15 e8 62 12 00 mov 0x1262e8,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10a977: 8b b2 f8 00 00 00 mov 0xf8(%edx),%esi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10a97d: 9c pushf 10a97e: fa cli 10a97f: 8f 45 d4 popl -0x2c(%ebp) if ( *set & api->signals_pending ) { 10a982: 8b 0f mov (%edi),%ecx 10a984: 89 4d d0 mov %ecx,-0x30(%ebp) 10a987: 8b 8e c8 00 00 00 mov 0xc8(%esi),%ecx 10a98d: 85 4d d0 test %ecx,-0x30(%ebp) 10a990: 74 32 je 10a9c4 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 10a992: 83 ec 0c sub $0xc,%esp 10a995: 51 push %ecx 10a996: e8 41 ff ff ff call 10a8dc <_POSIX_signals_Get_highest> <== ALWAYS TAKEN 10a99b: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10a99d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10a9a4: 6a 00 push $0x0 10a9a6: 53 push %ebx 10a9a7: 50 push %eax 10a9a8: 56 push %esi 10a9a9: e8 d6 4d 00 00 call 10f784 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10a9ae: ff 75 d4 pushl -0x2c(%ebp) 10a9b1: 9d popf the_info->si_code = SI_USER; 10a9b2: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10a9b9: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10a9c0: 8b 3b mov (%ebx),%edi 10a9c2: eb 3b jmp 10a9ff <== ALWAYS TAKEN } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10a9c4: 8b 0d 58 69 12 00 mov 0x126958,%ecx 10a9ca: 85 4d d0 test %ecx,-0x30(%ebp) 10a9cd: 74 35 je 10aa04 signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10a9cf: 83 ec 0c sub $0xc,%esp 10a9d2: 51 push %ecx 10a9d3: e8 04 ff ff ff call 10a8dc <_POSIX_signals_Get_highest> <== ALWAYS TAKEN 10a9d8: 89 c7 mov %eax,%edi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10a9da: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10a9e1: 6a 01 push $0x1 10a9e3: 53 push %ebx 10a9e4: 50 push %eax 10a9e5: 56 push %esi 10a9e6: e8 99 4d 00 00 call 10f784 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10a9eb: ff 75 d4 pushl -0x2c(%ebp) 10a9ee: 9d popf the_info->si_signo = signo; 10a9ef: 89 3b mov %edi,(%ebx) the_info->si_code = SI_USER; 10a9f1: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10a9f8: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10a9ff: 83 c4 20 add $0x20,%esp 10aa02: eb 74 jmp 10aa78 <== ALWAYS TAKEN } the_info->si_signo = -1; 10aa04: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10aa0a: 8b 0d 2c 62 12 00 mov 0x12622c,%ecx 10aa10: 41 inc %ecx 10aa11: 89 0d 2c 62 12 00 mov %ecx,0x12622c _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10aa17: c7 42 44 18 69 12 00 movl $0x126918,0x44(%edx) the_thread->Wait.return_code = EINTR; 10aa1e: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10aa25: 8b 0f mov (%edi),%ecx 10aa27: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10aa2a: 89 5a 28 mov %ebx,0x28(%edx) 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; 10aa2d: c7 05 48 69 12 00 01 movl $0x1,0x126948 10aa34: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10aa37: ff 75 d4 pushl -0x2c(%ebp) 10aa3a: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10aa3b: 52 push %edx 10aa3c: 68 00 d5 10 00 push $0x10d500 10aa41: 50 push %eax 10aa42: 68 18 69 12 00 push $0x126918 10aa47: e8 f8 27 00 00 call 10d244 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10aa4c: e8 60 23 00 00 call 10cdb1 <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); 10aa51: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10aa58: 6a 00 push $0x0 10aa5a: 53 push %ebx 10aa5b: ff 33 pushl (%ebx) 10aa5d: 56 push %esi 10aa5e: e8 21 4d 00 00 call 10f784 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10aa63: 83 c4 20 add $0x20,%esp 10aa66: e8 21 7a 00 00 call 11248c <__errno> 10aa6b: 8b 15 e8 62 12 00 mov 0x1262e8,%edx 10aa71: 8b 52 34 mov 0x34(%edx),%edx 10aa74: 89 10 mov %edx,(%eax) return the_info->si_signo; 10aa76: 8b 3b mov (%ebx),%edi } 10aa78: 89 f8 mov %edi,%eax 10aa7a: 8d 65 f4 lea -0xc(%ebp),%esp 10aa7d: 5b pop %ebx 10aa7e: 5e pop %esi 10aa7f: 5f pop %edi 10aa80: c9 leave 10aa81: c3 ret 0010c340 : int sigwait( const sigset_t *set, int *sig ) { 10c340: 55 push %ebp 10c341: 89 e5 mov %esp,%ebp 10c343: 53 push %ebx 10c344: 83 ec 08 sub $0x8,%esp 10c347: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10c34a: 6a 00 push $0x0 10c34c: 6a 00 push $0x0 10c34e: ff 75 08 pushl 0x8(%ebp) 10c351: e8 69 fe ff ff call 10c1bf <== ALWAYS TAKEN 10c356: 89 c2 mov %eax,%edx if ( status != -1 ) { 10c358: 83 c4 10 add $0x10,%esp 10c35b: 83 f8 ff cmp $0xffffffff,%eax 10c35e: 74 0a je 10c36a if ( sig ) 10c360: 31 c0 xor %eax,%eax 10c362: 85 db test %ebx,%ebx 10c364: 74 0b je 10c371 <== ALWAYS TAKEN *sig = status; 10c366: 89 13 mov %edx,(%ebx) 10c368: eb 07 jmp 10c371 <== ALWAYS TAKEN return 0; } return errno; 10c36a: e8 59 78 00 00 call 113bc8 <__errno> 10c36f: 8b 00 mov (%eax),%eax } 10c371: 8b 5d fc mov -0x4(%ebp),%ebx 10c374: c9 leave 10c375: c3 ret 0010c328 : int sigwaitinfo( const sigset_t *set, siginfo_t *info ) { 10c328: 55 push %ebp 10c329: 89 e5 mov %esp,%ebp 10c32b: 83 ec 0c sub $0xc,%esp return sigtimedwait( set, info, NULL ); 10c32e: 6a 00 push $0x0 10c330: ff 75 0c pushl 0xc(%ebp) 10c333: ff 75 08 pushl 0x8(%ebp) 10c336: e8 84 fe ff ff call 10c1bf <== ALWAYS TAKEN } 10c33b: c9 leave 10c33c: c3 ret 00109aec : */ long sysconf( int name ) { 109aec: 55 push %ebp 109aed: 89 e5 mov %esp,%ebp 109aef: 83 ec 08 sub $0x8,%esp 109af2: 8b 55 08 mov 0x8(%ebp),%edx if ( name == _SC_CLK_TCK ) 109af5: 83 fa 02 cmp $0x2,%edx 109af8: 75 0f jne 109b09 return (TOD_MICROSECONDS_PER_SECOND / 109afa: b8 40 42 0f 00 mov $0xf4240,%eax 109aff: 31 d2 xor %edx,%edx 109b01: f7 35 28 12 12 00 divl 0x121228 109b07: eb 2d jmp 109b36 <== ALWAYS TAKEN rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 109b09: 83 fa 04 cmp $0x4,%edx 109b0c: 75 07 jne 109b15 return rtems_libio_number_iops; 109b0e: a1 44 11 12 00 mov 0x121144,%eax 109b13: eb 21 jmp 109b36 <== ALWAYS TAKEN if ( name == _SC_GETPW_R_SIZE_MAX ) 109b15: b8 00 04 00 00 mov $0x400,%eax 109b1a: 83 fa 33 cmp $0x33,%edx 109b1d: 74 17 je 109b36 return 1024; if ( name == _SC_PAGESIZE ) 109b1f: 66 b8 00 10 mov $0x1000,%ax 109b23: 83 fa 08 cmp $0x8,%edx 109b26: 74 0e je 109b36 #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 109b28: e8 cf 7e 00 00 call 1119fc <__errno> 109b2d: c7 00 16 00 00 00 movl $0x16,(%eax) 109b33: 83 c8 ff or $0xffffffff,%eax } 109b36: c9 leave 109b37: c3 ret 00109dcc : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 109dcc: 55 push %ebp 109dcd: 89 e5 mov %esp,%ebp 109dcf: 56 push %esi 109dd0: 53 push %ebx 109dd1: 8b 5d 0c mov 0xc(%ebp),%ebx 109dd4: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 109dd7: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 109ddb: 75 1d jne 109dfa rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 109ddd: 85 f6 test %esi,%esi 109ddf: 74 19 je 109dfa /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 109de1: 85 db test %ebx,%ebx 109de3: 74 22 je 109e07 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 109de5: 8b 03 mov (%ebx),%eax 109de7: 48 dec %eax 109de8: 83 f8 01 cmp $0x1,%eax 109deb: 77 0d ja 109dfa <== ALWAYS TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 109ded: 8b 43 04 mov 0x4(%ebx),%eax 109df0: 85 c0 test %eax,%eax 109df2: 74 06 je 109dfa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 109df4: 48 dec %eax 109df5: 83 f8 1f cmp $0x1f,%eax 109df8: 76 0d jbe 109e07 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 109dfa: e8 91 80 00 00 call 111e90 <__errno> 109dff: c7 00 16 00 00 00 movl $0x16,(%eax) 109e05: eb 2f jmp 109e36 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109e07: a1 40 62 12 00 mov 0x126240,%eax 109e0c: 40 inc %eax 109e0d: a3 40 62 12 00 mov %eax,0x126240 * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 109e12: 83 ec 0c sub $0xc,%esp 109e15: 68 68 65 12 00 push $0x126568 109e1a: e8 1d 1b 00 00 call 10b93c <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 109e1f: 83 c4 10 add $0x10,%esp 109e22: 85 c0 test %eax,%eax 109e24: 75 18 jne 109e3e _Thread_Enable_dispatch(); 109e26: e8 16 27 00 00 call 10c541 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 109e2b: e8 60 80 00 00 call 111e90 <__errno> 109e30: c7 00 0b 00 00 00 movl $0xb,(%eax) 109e36: 83 c8 ff or $0xffffffff,%eax 109e39: e9 83 00 00 00 jmp 109ec1 <== ALWAYS TAKEN } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 109e3e: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 109e42: 8b 15 fc 62 12 00 mov 0x1262fc,%edx 109e48: 8b 52 08 mov 0x8(%edx),%edx 109e4b: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 109e4e: 85 db test %ebx,%ebx 109e50: 74 11 je 109e63 ptimer->inf.sigev_notify = evp->sigev_notify; 109e52: 8b 13 mov (%ebx),%edx 109e54: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 109e57: 8b 53 04 mov 0x4(%ebx),%edx 109e5a: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 109e5d: 8b 53 08 mov 0x8(%ebx),%edx 109e60: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 109e63: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 109e6a: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 109e71: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 109e78: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 109e7f: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109e86: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 109e8d: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 109e94: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 109e9b: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 109ea2: 8b 50 08 mov 0x8(%eax),%edx 109ea5: 0f b7 da movzwl %dx,%ebx 109ea8: 8b 0d 84 65 12 00 mov 0x126584,%ecx 109eae: 89 04 99 mov %eax,(%ecx,%ebx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 109eb1: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 109eb8: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 109eba: e8 82 26 00 00 call 10c541 <_Thread_Enable_dispatch> 109ebf: 31 c0 xor %eax,%eax return 0; } 109ec1: 8d 65 f8 lea -0x8(%ebp),%esp 109ec4: 5b pop %ebx 109ec5: 5e pop %esi 109ec6: c9 leave 109ec7: c3 ret 0010a298 : int timer_delete( timer_t timerid ) { 10a298: 55 push %ebp 10a299: 89 e5 mov %esp,%ebp 10a29b: 53 push %ebx 10a29c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10a29f: 8d 45 f4 lea -0xc(%ebp),%eax 10a2a2: 50 push %eax 10a2a3: ff 75 08 pushl 0x8(%ebp) 10a2a6: 68 fc 64 12 00 push $0x1264fc 10a2ab: e8 e0 1d 00 00 call 10c090 <_Objects_Get> 10a2b0: 89 c3 mov %eax,%ebx */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10a2b2: 83 c4 10 add $0x10,%esp 10a2b5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a2b9: 75 35 jne 10a2f0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 10a2bb: 51 push %ecx 10a2bc: 51 push %ecx 10a2bd: 50 push %eax 10a2be: 68 fc 64 12 00 push $0x1264fc 10a2c3: e8 20 1a 00 00 call 10bce8 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10a2c8: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10a2cc: 8d 43 10 lea 0x10(%ebx),%eax 10a2cf: 89 04 24 mov %eax,(%esp) 10a2d2: e8 0d 35 00 00 call 10d7e4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10a2d7: 58 pop %eax 10a2d8: 5a pop %edx 10a2d9: 53 push %ebx 10a2da: 68 fc 64 12 00 push $0x1264fc 10a2df: e8 84 1c 00 00 call 10bf68 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10a2e4: e8 98 25 00 00 call 10c881 <_Thread_Enable_dispatch> 10a2e9: 31 c0 xor %eax,%eax return 0; 10a2eb: 83 c4 10 add $0x10,%esp 10a2ee: eb 0e jmp 10a2fe <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a2f0: e8 23 82 00 00 call 112518 <__errno> 10a2f5: c7 00 16 00 00 00 movl $0x16,(%eax) 10a2fb: 83 c8 ff or $0xffffffff,%eax } 10a2fe: 8b 5d fc mov -0x4(%ebp),%ebx 10a301: c9 leave 10a302: c3 ret 0010af48 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10af48: 55 push %ebp 10af49: 89 e5 mov %esp,%ebp 10af4b: 53 push %ebx 10af4c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10af4f: 8d 45 f4 lea -0xc(%ebp),%eax 10af52: 50 push %eax 10af53: ff 75 08 pushl 0x8(%ebp) 10af56: 68 94 75 12 00 push $0x127594 10af5b: e8 74 1d 00 00 call 10ccd4 <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10af60: 83 c4 10 add $0x10,%esp 10af63: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10af67: 75 11 jne 10af7a case OBJECTS_LOCAL: overrun = ptimer->overrun; 10af69: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10af6c: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10af73: e8 4d 25 00 00 call 10d4c5 <_Thread_Enable_dispatch> return overrun; 10af78: eb 0e jmp 10af88 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10af7a: e8 69 7e 00 00 call 112de8 <__errno> 10af7f: c7 00 16 00 00 00 movl $0x16,(%eax) 10af85: 83 cb ff or $0xffffffff,%ebx } 10af88: 89 d8 mov %ebx,%eax 10af8a: 8b 5d fc mov -0x4(%ebp),%ebx 10af8d: c9 leave 10af8e: c3 ret 00109ec8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 109ec8: 55 push %ebp 109ec9: 89 e5 mov %esp,%ebp 109ecb: 57 push %edi 109ecc: 56 push %esi 109ecd: 53 push %ebx 109ece: 83 ec 2c sub $0x2c,%esp 109ed1: 8b 45 0c mov 0xc(%ebp),%eax Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 109ed4: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 109ed8: 0f 84 47 01 00 00 je 10a025 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 109ede: 8b 55 10 mov 0x10(%ebp),%edx 109ee1: 81 7a 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%edx) 109ee8: 0f 87 37 01 00 00 ja 10a025 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 109eee: 81 7a 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%edx) 109ef5: 0f 87 2a 01 00 00 ja 10a025 <== ALWAYS TAKEN ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 109efb: 85 c0 test %eax,%eax 109efd: 74 09 je 109f08 109eff: 83 f8 04 cmp $0x4,%eax 109f02: 0f 85 1d 01 00 00 jne 10a025 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 109f08: 8d 7d cc lea -0x34(%ebp),%edi 109f0b: b9 04 00 00 00 mov $0x4,%ecx 109f10: 8b 75 10 mov 0x10(%ebp),%esi 109f13: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 109f15: 83 f8 04 cmp $0x4,%eax 109f18: 75 2f jne 109f49 struct timespec now; _TOD_Get( &now ); 109f1a: 83 ec 0c sub $0xc,%esp 109f1d: 8d 5d dc lea -0x24(%ebp),%ebx 109f20: 53 push %ebx 109f21: e8 8e 15 00 00 call 10b4b4 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 109f26: 59 pop %ecx 109f27: 5e pop %esi 109f28: 8d 75 d4 lea -0x2c(%ebp),%esi 109f2b: 56 push %esi 109f2c: 53 push %ebx 109f2d: e8 6a 31 00 00 call 10d09c <_Timespec_Greater_than> 109f32: 83 c4 10 add $0x10,%esp 109f35: 84 c0 test %al,%al 109f37: 0f 85 e8 00 00 00 jne 10a025 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 109f3d: 52 push %edx 109f3e: 56 push %esi 109f3f: 56 push %esi 109f40: 53 push %ebx 109f41: e8 7a 31 00 00 call 10d0c0 <_Timespec_Subtract> 109f46: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 109f49: 50 push %eax 109f4a: 8d 45 e4 lea -0x1c(%ebp),%eax 109f4d: 50 push %eax 109f4e: ff 75 08 pushl 0x8(%ebp) 109f51: 68 68 65 12 00 push $0x126568 109f56: e8 f5 1d 00 00 call 10bd50 <_Objects_Get> 109f5b: 89 c3 mov %eax,%ebx * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 109f5d: 83 c4 10 add $0x10,%esp 109f60: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 109f64: 0f 85 bb 00 00 00 jne 10a025 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 109f6a: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 109f6e: 75 3b jne 109fab 109f70: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 109f74: 75 35 jne 109fab /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 109f76: 83 ec 0c sub $0xc,%esp 109f79: 8d 40 10 lea 0x10(%eax),%eax 109f7c: 50 push %eax 109f7d: e8 fa 34 00 00 call 10d47c <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 109f82: 83 c4 10 add $0x10,%esp 109f85: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 109f89: 74 0d je 109f98 *ovalue = ptimer->timer_data; 109f8b: 8d 73 54 lea 0x54(%ebx),%esi 109f8e: b9 04 00 00 00 mov $0x4,%ecx 109f93: 8b 7d 14 mov 0x14(%ebp),%edi 109f96: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 109f98: 8d 7b 54 lea 0x54(%ebx),%edi 109f9b: 8d 75 cc lea -0x34(%ebp),%esi 109f9e: b9 04 00 00 00 mov $0x4,%ecx 109fa3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 109fa5: c6 43 3c 04 movb $0x4,0x3c(%ebx) 109fa9: eb 35 jmp 109fe0 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 109fab: 83 ec 0c sub $0xc,%esp 109fae: ff 75 10 pushl 0x10(%ebp) 109fb1: e8 3e 31 00 00 call 10d0f4 <_Timespec_To_ticks> 109fb6: 89 43 64 mov %eax,0x64(%ebx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 109fb9: 8d 45 d4 lea -0x2c(%ebp),%eax 109fbc: 89 04 24 mov %eax,(%esp) 109fbf: e8 30 31 00 00 call 10d0f4 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 109fc4: 89 1c 24 mov %ebx,(%esp) 109fc7: 68 3c a0 10 00 push $0x10a03c 109fcc: ff 73 08 pushl 0x8(%ebx) 109fcf: 50 push %eax 109fd0: 8d 43 10 lea 0x10(%ebx),%eax 109fd3: 50 push %eax 109fd4: e8 3f 51 00 00 call 10f118 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 109fd9: 83 c4 20 add $0x20,%esp 109fdc: 84 c0 test %al,%al 109fde: 75 09 jne 109fe9 _Thread_Enable_dispatch(); 109fe0: e8 5c 25 00 00 call 10c541 <_Thread_Enable_dispatch> 109fe5: 31 c0 xor %eax,%eax return 0; 109fe7: eb 4a jmp 10a033 <== ALWAYS TAKEN /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 109fe9: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 109fed: 74 0d je 109ffc *ovalue = ptimer->timer_data; 109fef: 8d 73 54 lea 0x54(%ebx),%esi 109ff2: b9 04 00 00 00 mov $0x4,%ecx 109ff7: 8b 7d 14 mov 0x14(%ebp),%edi 109ffa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 109ffc: 8d 7b 54 lea 0x54(%ebx),%edi 109fff: 8d 75 cc lea -0x34(%ebp),%esi 10a002: b9 04 00 00 00 mov $0x4,%ecx 10a007: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a009: c6 43 3c 03 movb $0x3,0x3c(%ebx) _TOD_Get( &ptimer->time ); 10a00d: 83 ec 0c sub $0xc,%esp 10a010: 83 c3 6c add $0x6c,%ebx 10a013: 53 push %ebx 10a014: e8 9b 14 00 00 call 10b4b4 <_TOD_Get> _Thread_Enable_dispatch(); 10a019: e8 23 25 00 00 call 10c541 <_Thread_Enable_dispatch> 10a01e: 31 c0 xor %eax,%eax return 0; 10a020: 83 c4 10 add $0x10,%esp 10a023: eb 0e jmp 10a033 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a025: e8 66 7e 00 00 call 111e90 <__errno> 10a02a: c7 00 16 00 00 00 movl $0x16,(%eax) 10a030: 83 c8 ff or $0xffffffff,%eax } 10a033: 8d 65 f4 lea -0xc(%ebp),%esp 10a036: 5b pop %ebx 10a037: 5e pop %esi 10a038: 5f pop %edi 10a039: c9 leave 10a03a: c3 ret 0010e644 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10e644: 55 push %ebp 10e645: 89 e5 mov %esp,%ebp 10e647: 57 push %edi 10e648: 56 push %esi 10e649: 53 push %ebx 10e64a: 83 ec 1c sub $0x1c,%esp 10e64d: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10e650: 83 3d b8 4a 12 00 00 cmpl $0x0,0x124ab8 10e657: 75 2c jne 10e685 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10e659: c7 05 a4 4a 12 00 00 movl $0x0,0x124aa4 10e660: 00 00 00 the_watchdog->routine = routine; 10e663: c7 05 b8 4a 12 00 26 movl $0x10e726,0x124ab8 10e66a: e7 10 00 the_watchdog->id = id; 10e66d: c7 05 bc 4a 12 00 00 movl $0x0,0x124abc 10e674: 00 00 00 the_watchdog->user_data = user_data; 10e677: c7 05 c0 4a 12 00 00 movl $0x0,0x124ac0 10e67e: 00 00 00 10e681: 31 db xor %ebx,%ebx 10e683: eb 4f jmp 10e6d4 <== ALWAYS TAKEN _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10e685: 83 ec 0c sub $0xc,%esp 10e688: 68 9c 4a 12 00 push $0x124a9c 10e68d: e8 36 e4 ff ff call 10cac8 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10e692: 83 e8 02 sub $0x2,%eax 10e695: 83 c4 10 add $0x10,%esp 10e698: 31 db xor %ebx,%ebx 10e69a: 83 f8 01 cmp $0x1,%eax 10e69d: 77 35 ja 10e6d4 <== ALWAYS TAKEN * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 10e69f: a1 b0 4a 12 00 mov 0x124ab0,%eax 10e6a4: 03 05 a8 4a 12 00 add 0x124aa8,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10e6aa: 51 push %ecx 10e6ab: 51 push %ecx 10e6ac: 8d 55 e0 lea -0x20(%ebp),%edx 10e6af: 52 push %edx 10e6b0: 2b 05 b4 4a 12 00 sub 0x124ab4,%eax 10e6b6: 50 push %eax 10e6b7: e8 84 0e 00 00 call 10f540 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10e6bc: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx remaining += tp.tv_nsec / 1000; 10e6c3: 8b 45 e4 mov -0x1c(%ebp),%eax 10e6c6: bf e8 03 00 00 mov $0x3e8,%edi 10e6cb: 99 cltd 10e6cc: f7 ff idiv %edi 10e6ce: 8d 1c 08 lea (%eax,%ecx,1),%ebx 10e6d1: 83 c4 10 add $0x10,%esp /* * 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 ) { 10e6d4: 85 f6 test %esi,%esi 10e6d6: 74 44 je 10e71c Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10e6d8: b9 40 42 0f 00 mov $0xf4240,%ecx 10e6dd: 89 f0 mov %esi,%eax 10e6df: 31 d2 xor %edx,%edx 10e6e1: f7 f1 div %ecx 10e6e3: 89 45 e0 mov %eax,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10e6e6: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 10e6ec: 89 55 e4 mov %edx,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 10e6ef: 83 ec 0c sub $0xc,%esp 10e6f2: 8d 75 e0 lea -0x20(%ebp),%esi 10e6f5: 56 push %esi 10e6f6: e8 6d 0e 00 00 call 10f568 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10e6fb: 89 34 24 mov %esi,(%esp) 10e6fe: e8 65 0e 00 00 call 10f568 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10e703: a3 a8 4a 12 00 mov %eax,0x124aa8 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10e708: 58 pop %eax 10e709: 5a pop %edx 10e70a: 68 9c 4a 12 00 push $0x124a9c 10e70f: 68 c8 42 12 00 push $0x1242c8 10e714: e8 97 e2 ff ff call 10c9b0 <_Watchdog_Insert> 10e719: 83 c4 10 add $0x10,%esp } return remaining; } 10e71c: 89 d8 mov %ebx,%eax 10e71e: 8d 65 f4 lea -0xc(%ebp),%esp 10e721: 5b pop %ebx 10e722: 5e pop %esi 10e723: 5f pop %edi 10e724: c9 leave 10e725: c3 ret