=============================================================================== 0010accc <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10accc: 55 push %ebp 10accd: 89 e5 mov %esp,%ebp 10accf: 53 push %ebx 10acd0: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10acd3: 8b 1d 58 fb 11 00 mov 0x11fb58,%ebx !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 10acd9: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx 10acdf: 74 16 je 10acf7 <_API_extensions_Run_postdriver+0x2b><== NEVER TAKEN 10ace1: 8d 76 00 lea 0x0(%esi),%esi the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 10ace4: 8b 43 0c mov 0xc(%ebx),%eax 10ace7: 85 c0 test %eax,%eax 10ace9: 74 02 je 10aced <_API_extensions_Run_postdriver+0x21><== NEVER TAKEN (*the_extension->postdriver_hook)(); 10aceb: ff d0 call *%eax 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 ) { 10aced: 8b 1b mov (%ebx),%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 ) ; 10acef: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx 10acf5: 75 ed jne 10ace4 <_API_extensions_Run_postdriver+0x18> the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 10acf7: 5a pop %edx 10acf8: 5b pop %ebx 10acf9: c9 leave 10acfa: c3 ret =============================================================================== 0010acfc <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10acfc: 55 push %ebp 10acfd: 89 e5 mov %esp,%ebp 10acff: 53 push %ebx 10ad00: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10ad03: 8b 1d 58 fb 11 00 mov 0x11fb58,%ebx !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 10ad09: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx 10ad0f: 74 22 je 10ad33 <_API_extensions_Run_postswitch+0x37><== NEVER TAKEN 10ad11: 8d 76 00 lea 0x0(%esi),%esi the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 10ad14: 8b 43 10 mov 0x10(%ebx),%eax 10ad17: 85 c0 test %eax,%eax 10ad19: 74 0e je 10ad29 <_API_extensions_Run_postswitch+0x2d><== NEVER TAKEN (*the_extension->postswitch_hook)( _Thread_Executing ); 10ad1b: 83 ec 0c sub $0xc,%esp 10ad1e: ff 35 bc f9 11 00 pushl 0x11f9bc 10ad24: ff d0 call *%eax 10ad26: 83 c4 10 add $0x10,%esp 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 ) { 10ad29: 8b 1b mov (%ebx),%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 ) ; 10ad2b: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx 10ad31: 75 e1 jne 10ad14 <_API_extensions_Run_postswitch+0x18> the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10ad33: 8b 5d fc mov -0x4(%ebp),%ebx 10ad36: c9 leave 10ad37: c3 ret =============================================================================== 0010ac9c <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 10ac9c: 55 push %ebp 10ac9d: 89 e5 mov %esp,%ebp 10ac9f: 53 push %ebx 10aca0: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10aca3: 8b 1d 58 fb 11 00 mov 0x11fb58,%ebx !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 10aca9: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx 10acaf: 74 16 je 10acc7 <_API_extensions_Run_predriver+0x2b><== NEVER TAKEN 10acb1: 8d 76 00 lea 0x0(%esi),%esi the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 10acb4: 8b 43 08 mov 0x8(%ebx),%eax 10acb7: 85 c0 test %eax,%eax 10acb9: 74 02 je 10acbd <_API_extensions_Run_predriver+0x21><== ALWAYS TAKEN (*the_extension->predriver_hook)(); 10acbb: ff d0 call *%eax <== NOT EXECUTED Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10acbd: 8b 1b mov (%ebx),%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 ) ; 10acbf: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx 10acc5: 75 ed jne 10acb4 <_API_extensions_Run_predriver+0x18> the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 10acc7: 58 pop %eax 10acc8: 5b pop %ebx 10acc9: c9 leave 10acca: c3 ret =============================================================================== 0010ce10 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10ce10: 55 push %ebp 10ce11: 89 e5 mov %esp,%ebp 10ce13: 57 push %edi 10ce14: 56 push %esi 10ce15: 53 push %ebx 10ce16: 83 ec 0c sub $0xc,%esp 10ce19: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce1c: 8b 45 0c mov 0xc(%ebp),%eax 10ce1f: 89 45 f0 mov %eax,-0x10(%ebp) 10ce22: 8b 45 14 mov 0x14(%ebp),%eax 10ce25: 89 45 e8 mov %eax,-0x18(%ebp) 10ce28: 8a 45 10 mov 0x10(%ebp),%al 10ce2b: 88 45 ef mov %al,-0x11(%ebp) ISR_Level level; Thread_Control *executing = _Thread_Executing; 10ce2e: 8b 35 fc 21 12 00 mov 0x1221fc,%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 ); 10ce34: 9c pushf 10ce35: fa cli 10ce36: 5f pop %edi switch ( the_rwlock->current_state ) { 10ce37: 8b 43 44 mov 0x44(%ebx),%eax 10ce3a: 85 c0 test %eax,%eax 10ce3c: 75 1e jne 10ce5c <_CORE_RWLock_Obtain_for_reading+0x4c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10ce3e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10ce45: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10ce48: 57 push %edi 10ce49: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10ce4a: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10ce51: 8d 65 f4 lea -0xc(%ebp),%esp 10ce54: 5b pop %ebx 10ce55: 5e pop %esi 10ce56: 5f pop %edi 10ce57: c9 leave 10ce58: c3 ret 10ce59: 8d 76 00 lea 0x0(%esi),%esi * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 10ce5c: 48 dec %eax 10ce5d: 74 55 je 10ceb4 <_CORE_RWLock_Obtain_for_reading+0xa4> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10ce5f: 80 7d ef 00 cmpb $0x0,-0x11(%ebp) 10ce63: 75 13 jne 10ce78 <_CORE_RWLock_Obtain_for_reading+0x68> _ISR_Enable( level ); 10ce65: 57 push %edi 10ce66: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10ce67: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10ce6e: 8d 65 f4 lea -0xc(%ebp),%esp 10ce71: 5b pop %ebx 10ce72: 5e pop %esi 10ce73: 5f pop %edi 10ce74: c9 leave 10ce75: c3 ret 10ce76: 66 90 xchg %ax,%ax { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10ce78: 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; 10ce7f: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10ce82: 8b 45 f0 mov -0x10(%ebp),%eax 10ce85: 89 46 20 mov %eax,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10ce88: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10ce8f: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10ce96: 57 push %edi 10ce97: 9d popf _Thread_queue_Enqueue_with_handler( 10ce98: c7 45 10 0c d0 10 00 movl $0x10d00c,0x10(%ebp) 10ce9f: 8b 45 e8 mov -0x18(%ebp),%eax 10cea2: 89 45 0c mov %eax,0xc(%ebp) 10cea5: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cea8: 8d 65 f4 lea -0xc(%ebp),%esp 10ceab: 5b pop %ebx 10ceac: 5e pop %esi 10cead: 5f pop %edi 10ceae: 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( 10ceaf: e9 e0 17 00 00 jmp 10e694 <_Thread_queue_Enqueue_with_handler> executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 10ceb4: 83 ec 0c sub $0xc,%esp 10ceb7: 53 push %ebx 10ceb8: e8 13 1b 00 00 call 10e9d0 <_Thread_queue_First> if ( !waiter ) { 10cebd: 83 c4 10 add $0x10,%esp 10cec0: 85 c0 test %eax,%eax 10cec2: 75 9b jne 10ce5f <_CORE_RWLock_Obtain_for_reading+0x4f><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10cec4: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10cec7: 57 push %edi 10cec8: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cec9: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) 10ced0: e9 7c ff ff ff jmp 10ce51 <_CORE_RWLock_Obtain_for_reading+0x41> =============================================================================== 0010ced8 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10ced8: 55 push %ebp 10ced9: 89 e5 mov %esp,%ebp 10cedb: 57 push %edi 10cedc: 56 push %esi 10cedd: 53 push %ebx 10cede: 8b 45 08 mov 0x8(%ebp),%eax 10cee1: 8b 75 0c mov 0xc(%ebp),%esi 10cee4: 8b 7d 14 mov 0x14(%ebp),%edi 10cee7: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10ceea: 8b 15 fc 21 12 00 mov 0x1221fc,%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 ); 10cef0: 9c pushf 10cef1: fa cli 10cef2: 59 pop %ecx switch ( the_rwlock->current_state ) { 10cef3: 83 78 44 00 cmpl $0x0,0x44(%eax) 10cef7: 75 17 jne 10cf10 <_CORE_RWLock_Obtain_for_writing+0x38> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10cef9: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10cf00: 51 push %ecx 10cf01: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cf02: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf09: 5b pop %ebx 10cf0a: 5e pop %esi 10cf0b: 5f pop %edi 10cf0c: c9 leave 10cf0d: c3 ret 10cf0e: 66 90 xchg %ax,%ax /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10cf10: 84 db test %bl,%bl 10cf12: 75 10 jne 10cf24 <_CORE_RWLock_Obtain_for_writing+0x4c> _ISR_Enable( level ); 10cf14: 51 push %ecx 10cf15: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10cf16: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf1d: 5b pop %ebx 10cf1e: 5e pop %esi 10cf1f: 5f pop %edi 10cf20: c9 leave 10cf21: c3 ret 10cf22: 66 90 xchg %ax,%ax 10cf24: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * 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; 10cf2b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10cf2e: 89 72 20 mov %esi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10cf31: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cf38: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10cf3f: 51 push %ecx 10cf40: 9d popf _Thread_queue_Enqueue_with_handler( 10cf41: c7 45 10 0c d0 10 00 movl $0x10d00c,0x10(%ebp) 10cf48: 89 7d 0c mov %edi,0xc(%ebp) 10cf4b: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf4e: 5b pop %ebx 10cf4f: 5e pop %esi 10cf50: 5f pop %edi 10cf51: 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( 10cf52: e9 3d 17 00 00 jmp 10e694 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010cf58 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10cf58: 55 push %ebp 10cf59: 89 e5 mov %esp,%ebp 10cf5b: 53 push %ebx 10cf5c: 83 ec 04 sub $0x4,%esp 10cf5f: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10cf62: 8b 0d fc 21 12 00 mov 0x1221fc,%ecx * 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 ); 10cf68: 9c pushf 10cf69: fa cli 10cf6a: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10cf6b: 8b 43 44 mov 0x44(%ebx),%eax 10cf6e: 85 c0 test %eax,%eax 10cf70: 74 7a je 10cfec <_CORE_RWLock_Release+0x94><== NEVER TAKEN _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10cf72: 48 dec %eax 10cf73: 74 63 je 10cfd8 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cf75: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10cf7c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10cf83: 52 push %edx 10cf84: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10cf85: 83 ec 0c sub $0xc,%esp 10cf88: 53 push %ebx 10cf89: e8 ca 15 00 00 call 10e558 <_Thread_queue_Dequeue> if ( next ) { 10cf8e: 83 c4 10 add $0x10,%esp 10cf91: 85 c0 test %eax,%eax 10cf93: 74 39 je 10cfce <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10cf95: 83 78 30 01 cmpl $0x1,0x30(%eax) 10cf99: 74 61 je 10cffc <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10cf9b: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10cf9e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10cfa5: eb 17 jmp 10cfbe <_CORE_RWLock_Release+0x66> 10cfa7: 90 nop /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 10cfa8: 83 78 30 01 cmpl $0x1,0x30(%eax) 10cfac: 74 20 je 10cfce <_CORE_RWLock_Release+0x76><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10cfae: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10cfb1: 83 ec 08 sub $0x8,%esp 10cfb4: 50 push %eax 10cfb5: 53 push %ebx 10cfb6: e8 f5 18 00 00 call 10e8b0 <_Thread_queue_Extract> 10cfbb: 83 c4 10 add $0x10,%esp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10cfbe: 83 ec 0c sub $0xc,%esp 10cfc1: 53 push %ebx 10cfc2: e8 09 1a 00 00 call 10e9d0 <_Thread_queue_First> if ( !next || 10cfc7: 83 c4 10 add $0x10,%esp 10cfca: 85 c0 test %eax,%eax 10cfcc: 75 da jne 10cfa8 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10cfce: 31 c0 xor %eax,%eax 10cfd0: 8b 5d fc mov -0x4(%ebp),%ebx 10cfd3: c9 leave 10cfd4: c3 ret 10cfd5: 8d 76 00 lea 0x0(%esi),%esi _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 10cfd8: 8b 43 48 mov 0x48(%ebx),%eax 10cfdb: 48 dec %eax 10cfdc: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10cfdf: 85 c0 test %eax,%eax 10cfe1: 74 92 je 10cf75 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10cfe3: 52 push %edx 10cfe4: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10cfe5: 31 c0 xor %eax,%eax 10cfe7: 8b 5d fc mov -0x4(%ebp),%ebx 10cfea: c9 leave 10cfeb: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10cfec: 52 push %edx <== NOT EXECUTED 10cfed: 9d popf <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10cfee: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10cff5: 31 c0 xor %eax,%eax <== NOT EXECUTED 10cff7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10cffa: c9 leave <== NOT EXECUTED 10cffb: c3 ret <== NOT EXECUTED next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10cffc: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10d003: 31 c0 xor %eax,%eax 10d005: 8b 5d fc mov -0x4(%ebp),%ebx 10d008: c9 leave 10d009: c3 ret =============================================================================== 0010d00c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10d00c: 55 push %ebp 10d00d: 89 e5 mov %esp,%ebp 10d00f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d012: 8d 45 fc lea -0x4(%ebp),%eax 10d015: 50 push %eax 10d016: ff 75 08 pushl 0x8(%ebp) 10d019: e8 da 11 00 00 call 10e1f8 <_Thread_Get> switch ( location ) { 10d01e: 83 c4 10 add $0x10,%esp 10d021: 8b 55 fc mov -0x4(%ebp),%edx 10d024: 85 d2 test %edx,%edx 10d026: 75 17 jne 10d03f <_CORE_RWLock_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10d028: 83 ec 0c sub $0xc,%esp 10d02b: 50 push %eax 10d02c: e8 a3 1a 00 00 call 10ead4 <_Thread_queue_Process_timeout> 10d031: a1 38 21 12 00 mov 0x122138,%eax 10d036: 48 dec %eax 10d037: a3 38 21 12 00 mov %eax,0x122138 10d03c: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10d03f: c9 leave 10d040: c3 ret =============================================================================== 0010bfa8 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 10bfa8: 55 push %ebp 10bfa9: 89 e5 mov %esp,%ebp 10bfab: 57 push %edi 10bfac: 56 push %esi 10bfad: 53 push %ebx 10bfae: 83 ec 04 sub $0x4,%esp 10bfb1: 8b 55 08 mov 0x8(%ebp),%edx 10bfb4: 8b 7d 0c mov 0xc(%ebp),%edi 10bfb7: 8b 75 14 mov 0x14(%ebp),%esi 10bfba: 8b 45 18 mov 0x18(%ebp),%eax 10bfbd: 89 45 f0 mov %eax,-0x10(%ebp) Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 10bfc0: 8b 0d 1c 11 12 00 mov 0x12111c,%ecx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 10bfc6: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 10bfcd: 9c pushf 10bfce: fa cli 10bfcf: 5b pop %ebx the_barrier->number_of_waiting_threads++; 10bfd0: 8b 42 48 mov 0x48(%edx),%eax 10bfd3: 40 inc %eax 10bfd4: 89 42 48 mov %eax,0x48(%edx) if ( the_barrier->number_of_waiting_threads == 10bfd7: 3b 42 44 cmp 0x44(%edx),%eax 10bfda: 75 07 jne 10bfe3 <_CORE_barrier_Wait+0x3b> the_barrier->Attributes.maximum_count) { if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 10bfdc: 8b 42 40 mov 0x40(%edx),%eax 10bfdf: 85 c0 test %eax,%eax 10bfe1: 74 29 je 10c00c <_CORE_barrier_Wait+0x64><== ALWAYS TAKEN { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10bfe3: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 10bfea: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 10bfed: 89 79 20 mov %edi,0x20(%ecx) _ISR_Enable( level ); 10bff0: 53 push %ebx 10bff1: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10bff2: c7 45 10 60 dd 10 00 movl $0x10dd60,0x10(%ebp) 10bff9: 89 75 0c mov %esi,0xc(%ebp) 10bffc: 89 55 08 mov %edx,0x8(%ebp) } 10bfff: 58 pop %eax 10c000: 5b pop %ebx 10c001: 5e pop %esi 10c002: 5f pop %edi 10c003: 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 ); 10c004: e9 07 1a 00 00 jmp 10da10 <_Thread_queue_Enqueue_with_handler> 10c009: 8d 76 00 lea 0x0(%esi),%esi _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 10c00c: c7 41 34 01 00 00 00 movl $0x1,0x34(%ecx) _ISR_Enable( level ); 10c013: 53 push %ebx 10c014: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10c015: 8b 45 f0 mov -0x10(%ebp),%eax 10c018: 89 45 10 mov %eax,0x10(%ebp) 10c01b: 89 7d 0c mov %edi,0xc(%ebp) 10c01e: 89 55 08 mov %edx,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 10c021: 5a pop %edx 10c022: 5b pop %ebx 10c023: 5e pop %esi 10c024: 5f pop %edi 10c025: c9 leave if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10c026: e9 a5 49 00 00 jmp 1109d0 <_CORE_barrier_Release> =============================================================================== 001155e0 <_CORE_message_queue_Broadcast>: size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 1155e0: 55 push %ebp 1155e1: 89 e5 mov %esp,%ebp 1155e3: 57 push %edi 1155e4: 56 push %esi 1155e5: 53 push %ebx 1155e6: 83 ec 0c sub $0xc,%esp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 1155e9: 8b 55 10 mov 0x10(%ebp),%edx 1155ec: 8b 45 08 mov 0x8(%ebp),%eax 1155ef: 39 50 4c cmp %edx,0x4c(%eax) 1155f2: 72 58 jb 11564c <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 1155f4: 8b 75 08 mov 0x8(%ebp),%esi 1155f7: 8b 46 48 mov 0x48(%esi),%eax 1155fa: 85 c0 test %eax,%eax 1155fc: 75 3a jne 115638 <_CORE_message_queue_Broadcast+0x58><== NEVER 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))) { 1155fe: 31 db xor %ebx,%ebx 115600: eb 16 jmp 115618 <_CORE_message_queue_Broadcast+0x38> 115602: 66 90 xchg %ax,%ax waitp = &the_thread->Wait; number_broadcasted += 1; 115604: 43 inc %ebx * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 115605: 8b 78 2c mov 0x2c(%eax),%edi 115608: 8b 75 0c mov 0xc(%ebp),%esi 11560b: 8b 4d 10 mov 0x10(%ebp),%ecx 11560e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 115610: 8b 40 28 mov 0x28(%eax),%eax 115613: 8b 55 10 mov 0x10(%ebp),%edx 115616: 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))) { 115618: 83 ec 0c sub $0xc,%esp 11561b: ff 75 08 pushl 0x8(%ebp) 11561e: e8 29 22 00 00 call 11784c <_Thread_queue_Dequeue> 115623: 83 c4 10 add $0x10,%esp 115626: 85 c0 test %eax,%eax 115628: 75 da jne 115604 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11562a: 8b 75 1c mov 0x1c(%ebp),%esi 11562d: 89 1e mov %ebx,(%esi) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11562f: 8d 65 f4 lea -0xc(%ebp),%esp 115632: 5b pop %ebx 115633: 5e pop %esi 115634: 5f pop %edi 115635: c9 leave 115636: c3 ret 115637: 90 nop * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 115638: 8b 45 1c mov 0x1c(%ebp),%eax <== NOT EXECUTED 11563b: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 115641: 31 c0 xor %eax,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 115643: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 115646: 5b pop %ebx <== NOT EXECUTED 115647: 5e pop %esi <== NOT EXECUTED 115648: 5f pop %edi <== NOT EXECUTED 115649: c9 leave <== NOT EXECUTED 11564a: c3 ret <== NOT EXECUTED 11564b: 90 nop <== NOT EXECUTED { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11564c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 115651: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 115654: 5b pop %ebx <== NOT EXECUTED 115655: 5e pop %esi <== NOT EXECUTED 115656: 5f pop %edi <== NOT EXECUTED 115657: c9 leave <== NOT EXECUTED 115658: c3 ret <== NOT EXECUTED =============================================================================== 00115698 <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { 115698: 55 push %ebp 115699: 89 e5 mov %esp,%ebp 11569b: 8b 45 08 mov 0x8(%ebp),%eax if ( the_message_queue->number_of_pending_messages != 0 ) 11569e: 8b 50 48 mov 0x48(%eax),%edx 1156a1: 85 d2 test %edx,%edx 1156a3: 75 07 jne 1156ac <_CORE_message_queue_Flush+0x14> return _CORE_message_queue_Flush_support( the_message_queue ); else return 0; } 1156a5: 31 c0 xor %eax,%eax 1156a7: c9 leave 1156a8: c3 ret 1156a9: 8d 76 00 lea 0x0(%esi),%esi 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 ); 1156ac: 89 45 08 mov %eax,0x8(%ebp) else return 0; } 1156af: 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 ); 1156b0: e9 03 00 00 00 jmp 1156b8 <_CORE_message_queue_Flush_support> =============================================================================== 00114e10 <_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 ) { 114e10: 55 push %ebp 114e11: 89 e5 mov %esp,%ebp 114e13: 57 push %edi 114e14: 56 push %esi 114e15: 53 push %ebx 114e16: 83 ec 0c sub $0xc,%esp 114e19: 8b 5d 08 mov 0x8(%ebp),%ebx 114e1c: 8b 7d 10 mov 0x10(%ebp),%edi 114e1f: 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; 114e22: 89 7b 44 mov %edi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114e25: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114e2c: 89 53 4c mov %edx,0x4c(%ebx) 114e2f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 114e36: 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)) { 114e3d: f6 c2 03 test $0x3,%dl 114e40: 75 1a jne 114e5c <_CORE_message_queue_Initialize+0x4c> 114e42: 89 d0 mov %edx,%eax /* * 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 * 114e44: 8d 70 14 lea 0x14(%eax),%esi 114e47: 89 f2 mov %esi,%edx 114e49: 0f af d7 imul %edi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114e4c: 39 c2 cmp %eax,%edx 114e4e: 73 18 jae 114e68 <_CORE_message_queue_Initialize+0x58><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114e50: 31 c0 xor %eax,%eax } 114e52: 8d 65 f4 lea -0xc(%ebp),%esp 114e55: 5b pop %ebx 114e56: 5e pop %esi 114e57: 5f pop %edi 114e58: c9 leave 114e59: c3 ret 114e5a: 66 90 xchg %ax,%ax * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 114e5c: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 114e5f: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 114e62: 39 c2 cmp %eax,%edx 114e64: 77 ea ja 114e50 <_CORE_message_queue_Initialize+0x40><== NEVER TAKEN 114e66: eb dc jmp 114e44 <_CORE_message_queue_Initialize+0x34> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114e68: 83 ec 0c sub $0xc,%esp 114e6b: 52 push %edx 114e6c: e8 7b da ff ff call 1128ec <_Workspace_Allocate> 114e71: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114e74: 83 c4 10 add $0x10,%esp 114e77: 85 c0 test %eax,%eax 114e79: 74 d5 je 114e50 <_CORE_message_queue_Initialize+0x40> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114e7b: 56 push %esi 114e7c: 57 push %edi 114e7d: 50 push %eax 114e7e: 8d 43 68 lea 0x68(%ebx),%eax 114e81: 50 push %eax 114e82: e8 5d fe ff ff call 114ce4 <_Chain_Initialize> 114e87: 8d 43 54 lea 0x54(%ebx),%eax 114e8a: 89 43 50 mov %eax,0x50(%ebx) 114e8d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) 114e94: 8d 43 50 lea 0x50(%ebx),%eax 114e97: 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( 114e9a: 6a 06 push $0x6 114e9c: 68 80 00 00 00 push $0x80 114ea1: 8b 45 0c mov 0xc(%ebp),%eax 114ea4: 83 38 01 cmpl $0x1,(%eax) 114ea7: 0f 94 c0 sete %al 114eaa: 0f b6 c0 movzbl %al,%eax 114ead: 50 push %eax 114eae: 53 push %ebx 114eaf: e8 4c cf ff ff call 111e00 <_Thread_queue_Initialize> 114eb4: b0 01 mov $0x1,%al 114eb6: 83 c4 20 add $0x20,%esp STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 114eb9: 8d 65 f4 lea -0xc(%ebp),%esp 114ebc: 5b pop %ebx 114ebd: 5e pop %esi 114ebe: 5f pop %edi 114ebf: c9 leave 114ec0: c3 ret =============================================================================== 0010f7b8 <_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 ) { 10f7b8: 55 push %ebp 10f7b9: 89 e5 mov %esp,%ebp 10f7bb: 57 push %edi 10f7bc: 56 push %esi 10f7bd: 53 push %ebx 10f7be: 83 ec 04 sub $0x4,%esp 10f7c1: 8b 75 08 mov 0x8(%ebp),%esi 10f7c4: 8b 7d 0c mov 0xc(%ebp),%edi 10f7c7: 8b 45 10 mov 0x10(%ebp),%eax ISR_Level level; bool notify = false; the_message->priority = submit_type; 10f7ca: 89 47 08 mov %eax,0x8(%edi) switch ( submit_type ) { 10f7cd: 3d 00 00 00 80 cmp $0x80000000,%eax 10f7d2: 0f 84 94 00 00 00 je 10f86c <_CORE_message_queue_Insert_message+0xb4> 10f7d8: 3d ff ff ff 7f cmp $0x7fffffff,%eax 10f7dd: 74 65 je 10f844 <_CORE_message_queue_Insert_message+0x8c> CORE_message_queue_Buffer_control *this_message; Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 10f7df: 8b 5e 50 mov 0x50(%esi),%ebx * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 10f7e2: 8d 56 54 lea 0x54(%esi),%edx while ( !_Chain_Is_tail( the_header, the_node ) ) { 10f7e5: 39 da cmp %ebx,%edx 10f7e7: 75 49 jne 10f832 <_CORE_message_queue_Insert_message+0x7a> 10f7e9: 8d 76 00 lea 0x0(%esi),%esi 10f7ec: 89 d3 mov %edx,%ebx continue; } break; } _ISR_Disable( level ); 10f7ee: 9c pushf 10f7ef: fa cli 10f7f0: 59 pop %ecx if ( the_message_queue->number_of_pending_messages++ == 0 ) 10f7f1: 8b 56 48 mov 0x48(%esi),%edx 10f7f4: 8d 42 01 lea 0x1(%edx),%eax 10f7f7: 89 46 48 mov %eax,0x48(%esi) 10f7fa: 85 d2 test %edx,%edx 10f7fc: 0f 94 45 f3 sete -0xd(%ebp) notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 10f800: 8b 43 04 mov 0x4(%ebx),%eax 10f803: 89 47 04 mov %eax,0x4(%edi) 10f806: 8b 10 mov (%eax),%edx 10f808: 89 38 mov %edi,(%eax) 10f80a: 89 17 mov %edx,(%edi) 10f80c: 89 7a 04 mov %edi,0x4(%edx) _ISR_Enable( level ); 10f80f: 51 push %ecx 10f810: 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 ) 10f811: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10f815: 74 25 je 10f83c <_CORE_message_queue_Insert_message+0x84> 10f817: 8b 4e 60 mov 0x60(%esi),%ecx 10f81a: 85 c9 test %ecx,%ecx 10f81c: 74 1e je 10f83c <_CORE_message_queue_Insert_message+0x84> (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 10f81e: 8b 46 64 mov 0x64(%esi),%eax 10f821: 89 45 08 mov %eax,0x8(%ebp) } 10f824: 5a pop %edx 10f825: 5b pop %ebx 10f826: 5e pop %esi 10f827: 5f pop %edi 10f828: c9 leave * 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 ); 10f829: ff e1 jmp *%ecx 10f82b: 90 nop while ( !_Chain_Is_tail( the_header, the_node ) ) { this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { the_node = the_node->next; 10f82c: 8b 1b mov (%ebx),%ebx Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 10f82e: 39 da cmp %ebx,%edx 10f830: 74 ba je 10f7ec <_CORE_message_queue_Insert_message+0x34> this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 10f832: 3b 43 08 cmp 0x8(%ebx),%eax 10f835: 7d f5 jge 10f82c <_CORE_message_queue_Insert_message+0x74> 10f837: eb b5 jmp 10f7ee <_CORE_message_queue_Insert_message+0x36> 10f839: 8d 76 00 lea 0x0(%esi),%esi * 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 ); } 10f83c: 58 pop %eax 10f83d: 5b pop %ebx 10f83e: 5e pop %esi 10f83f: 5f pop %edi 10f840: c9 leave 10f841: c3 ret 10f842: 66 90 xchg %ax,%ax the_message->priority = submit_type; switch ( submit_type ) { case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 10f844: 9c pushf 10f845: fa cli 10f846: 59 pop %ecx if ( the_message_queue->number_of_pending_messages++ == 0 ) 10f847: 8b 56 48 mov 0x48(%esi),%edx 10f84a: 8d 42 01 lea 0x1(%edx),%eax 10f84d: 89 46 48 mov %eax,0x48(%esi) 10f850: 85 d2 test %edx,%edx 10f852: 0f 94 45 f3 sete -0xd(%ebp) 10f856: 8d 46 54 lea 0x54(%esi),%eax 10f859: 89 07 mov %eax,(%edi) 10f85b: 8b 46 58 mov 0x58(%esi),%eax 10f85e: 89 7e 58 mov %edi,0x58(%esi) 10f861: 89 38 mov %edi,(%eax) 10f863: 89 47 04 mov %eax,0x4(%edi) notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10f866: 51 push %ecx 10f867: 9d popf 10f868: eb a7 jmp 10f811 <_CORE_message_queue_Insert_message+0x59> 10f86a: 66 90 xchg %ax,%ax break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 10f86c: 9c pushf 10f86d: fa cli 10f86e: 59 pop %ecx if ( the_message_queue->number_of_pending_messages++ == 0 ) 10f86f: 8b 56 48 mov 0x48(%esi),%edx 10f872: 8d 42 01 lea 0x1(%edx),%eax 10f875: 89 46 48 mov %eax,0x48(%esi) 10f878: 85 d2 test %edx,%edx 10f87a: 0f 94 45 f3 sete -0xd(%ebp) size_t size ); /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the 10f87e: 8d 46 50 lea 0x50(%esi),%eax 10f881: 89 47 04 mov %eax,0x4(%edi) 10f884: 8b 46 50 mov 0x50(%esi),%eax 10f887: 89 7e 50 mov %edi,0x50(%esi) 10f88a: 89 07 mov %eax,(%edi) 10f88c: 89 78 04 mov %edi,0x4(%eax) notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10f88f: 51 push %ecx 10f890: 9d popf 10f891: e9 7b ff ff ff jmp 10f811 <_CORE_message_queue_Insert_message+0x59> =============================================================================== 0010ffd4 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 10ffd4: 55 push %ebp 10ffd5: 89 e5 mov %esp,%ebp 10ffd7: 57 push %edi 10ffd8: 56 push %esi 10ffd9: 53 push %ebx 10ffda: 83 ec 1c sub $0x1c,%esp 10ffdd: 8b 45 08 mov 0x8(%ebp),%eax 10ffe0: 89 45 f0 mov %eax,-0x10(%ebp) 10ffe3: 8b 7d 0c mov 0xc(%ebp),%edi 10ffe6: 8b 45 10 mov 0x10(%ebp),%eax 10ffe9: 89 45 ec mov %eax,-0x14(%ebp) 10ffec: 8b 4d 14 mov 0x14(%ebp),%ecx 10ffef: 8b 45 1c mov 0x1c(%ebp),%eax 10fff2: 89 45 e4 mov %eax,-0x1c(%ebp) 10fff5: 8a 45 18 mov 0x18(%ebp),%al 10fff8: 88 45 eb mov %al,-0x15(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 10fffb: 8b 15 1c 7d 12 00 mov 0x127d1c,%edx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 110001: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 110008: 9c pushf 110009: fa cli 11000a: 5e pop %esi * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 11000b: 8b 45 f0 mov -0x10(%ebp),%eax 11000e: 8b 58 50 mov 0x50(%eax),%ebx 110011: 83 c0 54 add $0x54,%eax 110014: 39 c3 cmp %eax,%ebx 110016: 74 7c je 110094 <_CORE_message_queue_Seize+0xc0> 110018: 8b 13 mov (%ebx),%edx 11001a: 8b 7d f0 mov -0x10(%ebp),%edi 11001d: 89 57 50 mov %edx,0x50(%edi) 110020: 89 f8 mov %edi,%eax 110022: 83 c0 50 add $0x50,%eax 110025: 89 42 04 mov %eax,0x4(%edx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 110028: ff 4f 48 decl 0x48(%edi) _ISR_Enable( level ); 11002b: 56 push %esi 11002c: 9d popf *size_p = the_message->Contents.size; 11002d: 8b 43 0c mov 0xc(%ebx),%eax 110030: 89 01 mov %eax,(%ecx) _Thread_Executing->Wait.count = the_message->priority; 110032: 8b 53 08 mov 0x8(%ebx),%edx 110035: a1 1c 7d 12 00 mov 0x127d1c,%eax 11003a: 89 50 24 mov %edx,0x24(%eax) _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p); 11003d: 8d 43 10 lea 0x10(%ebx),%eax 110040: 89 45 d8 mov %eax,-0x28(%ebp) * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 110043: 8b 09 mov (%ecx),%ecx 110045: 8b 7d ec mov -0x14(%ebp),%edi 110048: 89 c6 mov %eax,%esi 11004a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * * 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 ); 11004c: 83 ec 0c sub $0xc,%esp 11004f: ff 75 f0 pushl -0x10(%ebp) 110052: e8 f9 19 00 00 call 111a50 <_Thread_queue_Dequeue> 110057: 89 c2 mov %eax,%edx if ( !the_thread ) { 110059: 83 c4 10 add $0x10,%esp 11005c: 85 c0 test %eax,%eax 11005e: 0f 84 84 00 00 00 je 1100e8 <_CORE_message_queue_Seize+0x114> * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 110064: 8b 40 24 mov 0x24(%eax),%eax 110067: 89 43 08 mov %eax,0x8(%ebx) the_message->Contents.size = (size_t) the_thread->Wait.option; 11006a: 8b 4a 30 mov 0x30(%edx),%ecx 11006d: 89 4b 0c mov %ecx,0xc(%ebx) 110070: 8b 72 2c mov 0x2c(%edx),%esi 110073: 8b 7d d8 mov -0x28(%ebp),%edi 110076: 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( 110078: 8b 43 08 mov 0x8(%ebx),%eax 11007b: 89 45 10 mov %eax,0x10(%ebp) 11007e: 89 5d 0c mov %ebx,0xc(%ebp) 110081: 8b 45 f0 mov -0x10(%ebp),%eax 110084: 89 45 08 mov %eax,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 ); } 110087: 8d 65 f4 lea -0xc(%ebp),%esp 11008a: 5b pop %ebx 11008b: 5e pop %esi 11008c: 5f pop %edi 11008d: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 11008e: e9 9d 4c 00 00 jmp 114d30 <_CORE_message_queue_Insert_message> 110093: 90 nop the_message->priority ); return; } if ( !wait ) { 110094: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 110098: 75 12 jne 1100ac <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 11009a: 56 push %esi 11009b: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 11009c: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) 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 ); } 1100a3: 8d 65 f4 lea -0xc(%ebp),%esp 1100a6: 5b pop %ebx 1100a7: 5e pop %esi 1100a8: 5f pop %edi 1100a9: c9 leave 1100aa: c3 ret 1100ab: 90 nop { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 1100ac: 8b 45 f0 mov -0x10(%ebp),%eax 1100af: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) 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; 1100b6: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1100b9: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.return_argument_second.mutable_object = buffer; 1100bc: 8b 7d ec mov -0x14(%ebp),%edi 1100bf: 89 7a 2c mov %edi,0x2c(%edx) executing->Wait.return_argument = size_p; 1100c2: 89 4a 28 mov %ecx,0x28(%edx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 1100c5: 56 push %esi 1100c6: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 1100c7: c7 45 10 dc 1e 11 00 movl $0x111edc,0x10(%ebp) 1100ce: 8b 45 e4 mov -0x1c(%ebp),%eax 1100d1: 89 45 0c mov %eax,0xc(%ebp) 1100d4: 8b 7d f0 mov -0x10(%ebp),%edi 1100d7: 89 7d 08 mov %edi,0x8(%ebp) } 1100da: 8d 65 f4 lea -0xc(%ebp),%esp 1100dd: 5b pop %ebx 1100de: 5e pop %esi 1100df: 5f pop %edi 1100e0: 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 ); 1100e1: e9 a6 1a 00 00 jmp 111b8c <_Thread_queue_Enqueue_with_handler> 1100e6: 66 90 xchg %ax,%ax * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size 1100e8: 89 5d 0c mov %ebx,0xc(%ebp) 1100eb: 8b 45 f0 mov -0x10(%ebp),%eax 1100ee: 83 c0 68 add $0x68,%eax 1100f1: 89 45 08 mov %eax,0x8(%ebp) } 1100f4: 8d 65 f4 lea -0xc(%ebp),%esp 1100f7: 5b pop %ebx 1100f8: 5e pop %esi 1100f9: 5f pop %edi 1100fa: c9 leave 1100fb: e9 04 fe ff ff jmp 10ff04 <_Chain_Append> =============================================================================== 0010ae6c <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10ae6c: 55 push %ebp 10ae6d: 89 e5 mov %esp,%ebp 10ae6f: 57 push %edi 10ae70: 56 push %esi 10ae71: 53 push %ebx 10ae72: 83 ec 1c sub $0x1c,%esp 10ae75: 8b 5d 08 mov 0x8(%ebp),%ebx 10ae78: 8a 45 20 mov 0x20(%ebp),%al 10ae7b: 88 45 f3 mov %al,-0xd(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10ae7e: 8b 55 10 mov 0x10(%ebp),%edx 10ae81: 39 53 4c cmp %edx,0x4c(%ebx) 10ae84: 72 6e jb 10aef4 <_CORE_message_queue_Submit+0x88> /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10ae86: 8b 43 48 mov 0x48(%ebx),%eax 10ae89: 85 c0 test %eax,%eax 10ae8b: 74 77 je 10af04 <_CORE_message_queue_Submit+0x98> /* * 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 < 10ae8d: 39 43 44 cmp %eax,0x44(%ebx) 10ae90: 0f 87 be 00 00 00 ja 10af54 <_CORE_message_queue_Submit+0xe8> * 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 ) { 10ae96: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10ae9a: 0f 84 9c 00 00 00 je 10af3c <_CORE_message_queue_Submit+0xd0> /* * 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() ) { 10aea0: a1 98 f9 11 00 mov 0x11f998,%eax 10aea5: 85 c0 test %eax,%eax 10aea7: 0f 85 97 00 00 00 jne 10af44 <_CORE_message_queue_Submit+0xd8><== NEVER TAKEN * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 10aead: a1 bc f9 11 00 mov 0x11f9bc,%eax _ISR_Disable( level ); 10aeb2: 9c pushf 10aeb3: fa cli 10aeb4: 5a pop %edx { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10aeb5: 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; 10aebc: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10aebf: 8b 75 14 mov 0x14(%ebp),%esi 10aec2: 89 70 20 mov %esi,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10aec5: 8b 4d 0c mov 0xc(%ebp),%ecx 10aec8: 89 48 2c mov %ecx,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10aecb: 8b 75 10 mov 0x10(%ebp),%esi 10aece: 89 70 30 mov %esi,0x30(%eax) executing->Wait.count = submit_type; 10aed1: 8b 4d 1c mov 0x1c(%ebp),%ecx 10aed4: 89 48 24 mov %ecx,0x24(%eax) _ISR_Enable( level ); 10aed7: 52 push %edx 10aed8: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10aed9: 50 push %eax 10aeda: 68 a0 cb 10 00 push $0x10cba0 10aedf: ff 75 24 pushl 0x24(%ebp) 10aee2: 53 push %ebx 10aee3: e8 68 19 00 00 call 10c850 <_Thread_queue_Enqueue_with_handler> 10aee8: b8 07 00 00 00 mov $0x7,%eax 10aeed: 83 c4 10 add $0x10,%esp 10aef0: eb 07 jmp 10aef9 <_CORE_message_queue_Submit+0x8d> 10aef2: 66 90 xchg %ax,%ax { ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10aef4: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 10aef9: 8d 65 f4 lea -0xc(%ebp),%esp 10aefc: 5b pop %ebx 10aefd: 5e pop %esi 10aefe: 5f pop %edi 10aeff: c9 leave 10af00: c3 ret 10af01: 8d 76 00 lea 0x0(%esi),%esi /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10af04: 83 ec 0c sub $0xc,%esp 10af07: 53 push %ebx 10af08: e8 07 18 00 00 call 10c714 <_Thread_queue_Dequeue> 10af0d: 89 c2 mov %eax,%edx if ( the_thread ) { 10af0f: 83 c4 10 add $0x10,%esp 10af12: 85 c0 test %eax,%eax 10af14: 74 7e je 10af94 <_CORE_message_queue_Submit+0x128> * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 10af16: 8b 78 2c mov 0x2c(%eax),%edi 10af19: 8b 75 0c mov 0xc(%ebp),%esi 10af1c: 8b 4d 10 mov 0x10(%ebp),%ecx 10af1f: 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; 10af21: 8b 40 28 mov 0x28(%eax),%eax 10af24: 8b 4d 10 mov 0x10(%ebp),%ecx 10af27: 89 08 mov %ecx,(%eax) the_thread->Wait.count = submit_type; 10af29: 8b 75 1c mov 0x1c(%ebp),%esi 10af2c: 89 72 24 mov %esi,0x24(%edx) 10af2f: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 10af31: 8d 65 f4 lea -0xc(%ebp),%esp 10af34: 5b pop %ebx 10af35: 5e pop %esi 10af36: 5f pop %edi 10af37: c9 leave 10af38: c3 ret 10af39: 8d 76 00 lea 0x0(%esi),%esi * 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 ) { 10af3c: b8 02 00 00 00 mov $0x2,%eax 10af41: eb b6 jmp 10aef9 <_CORE_message_queue_Submit+0x8d> 10af43: 90 nop _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10af44: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED } 10af49: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10af4c: 5b pop %ebx <== NOT EXECUTED 10af4d: 5e pop %esi <== NOT EXECUTED 10af4e: 5f pop %edi <== NOT EXECUTED 10af4f: c9 leave <== NOT EXECUTED 10af50: c3 ret <== NOT EXECUTED 10af51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. 10af54: 83 ec 0c sub $0xc,%esp 10af57: 8d 43 68 lea 0x68(%ebx),%eax 10af5a: 50 push %eax 10af5b: e8 e4 fe ff ff call 10ae44 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 10af60: 83 c4 10 add $0x10,%esp 10af63: 85 c0 test %eax,%eax 10af65: 74 dd je 10af44 <_CORE_message_queue_Submit+0xd8><== NEVER TAKEN * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 10af67: 8d 78 10 lea 0x10(%eax),%edi 10af6a: 8b 75 0c mov 0xc(%ebp),%esi 10af6d: 8b 4d 10 mov 0x10(%ebp),%ecx 10af70: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10af72: 8b 55 10 mov 0x10(%ebp),%edx 10af75: 89 50 0c mov %edx,0xc(%eax) the_message->priority = submit_type; 10af78: 8b 4d 1c mov 0x1c(%ebp),%ecx 10af7b: 89 48 08 mov %ecx,0x8(%eax) _CORE_message_queue_Insert_message( 10af7e: 52 push %edx 10af7f: 51 push %ecx 10af80: 50 push %eax 10af81: 53 push %ebx 10af82: e8 31 48 00 00 call 10f7b8 <_CORE_message_queue_Insert_message> 10af87: 31 c0 xor %eax,%eax 10af89: 83 c4 10 add $0x10,%esp 10af8c: e9 68 ff ff ff jmp 10aef9 <_CORE_message_queue_Submit+0x8d> 10af91: 8d 76 00 lea 0x0(%esi),%esi * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10af94: 8b 43 48 mov 0x48(%ebx),%eax 10af97: e9 f1 fe ff ff jmp 10ae8d <_CORE_message_queue_Submit+0x21> =============================================================================== 0010afa8 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10afa8: 55 push %ebp 10afa9: 89 e5 mov %esp,%ebp 10afab: 57 push %edi 10afac: 56 push %esi 10afad: 83 ec 10 sub $0x10,%esp 10afb0: 8b 55 08 mov 0x8(%ebp),%edx 10afb3: 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; 10afb6: 8d 7a 40 lea 0x40(%edx),%edi 10afb9: b9 04 00 00 00 mov $0x4,%ecx 10afbe: 8b 75 0c mov 0xc(%ebp),%esi 10afc1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10afc3: 89 42 50 mov %eax,0x50(%edx) the_mutex->blocked_count = 0; 10afc6: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10afcd: 85 c0 test %eax,%eax 10afcf: 75 33 jne 10b004 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10afd1: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx) the_mutex->holder = _Thread_Executing; 10afd8: 8b 0d bc f9 11 00 mov 0x11f9bc,%ecx 10afde: 89 4a 5c mov %ecx,0x5c(%edx) the_mutex->holder_id = _Thread_Executing->Object.id; 10afe1: 8b 41 08 mov 0x8(%ecx),%eax 10afe4: 89 42 60 mov %eax,0x60(%edx) /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. * Any other value of @a alignment is taken "as is", i.e., even odd 10afe7: 8b 42 48 mov 0x48(%edx),%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10afea: 83 f8 02 cmp $0x2,%eax 10afed: 74 05 je 10aff4 <_CORE_mutex_Initialize+0x4c> 10afef: 83 f8 03 cmp $0x3,%eax 10aff2: 75 25 jne 10b019 <_CORE_mutex_Initialize+0x71><== ALWAYS TAKEN _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10aff4: 8b 41 14 mov 0x14(%ecx),%eax 10aff7: 3b 42 4c cmp 0x4c(%edx),%eax 10affa: 72 48 jb 10b044 <_CORE_mutex_Initialize+0x9c><== NEVER TAKEN _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++; 10affc: ff 41 1c incl 0x1c(%ecx) 10afff: eb 18 jmp 10b019 <_CORE_mutex_Initialize+0x71> 10b001: 8d 76 00 lea 0x0(%esi),%esi } } else { the_mutex->nest_count = 0; 10b004: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) the_mutex->holder = NULL; 10b00b: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) the_mutex->holder_id = 0; 10b012: c7 42 60 00 00 00 00 movl $0x0,0x60(%edx) } _Thread_queue_Initialize( 10b019: 6a 05 push $0x5 10b01b: 68 00 04 00 00 push $0x400 10b020: 8b 45 0c mov 0xc(%ebp),%eax 10b023: 8b 40 08 mov 0x8(%eax),%eax 10b026: 85 c0 test %eax,%eax 10b028: 0f 95 c0 setne %al 10b02b: 0f b6 c0 movzbl %al,%eax 10b02e: 50 push %eax 10b02f: 52 push %edx 10b030: e8 8f 1a 00 00 call 10cac4 <_Thread_queue_Initialize> 10b035: 31 c0 xor %eax,%eax 10b037: 83 c4 10 add $0x10,%esp STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b03a: 8d 65 f8 lea -0x8(%ebp),%esp 10b03d: 5e pop %esi 10b03e: 5f pop %edi 10b03f: c9 leave 10b040: c3 ret 10b041: 8d 76 00 lea 0x0(%esi),%esi the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10b044: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b049: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10b04c: 5e pop %esi <== NOT EXECUTED 10b04d: 5f pop %edi <== NOT EXECUTED 10b04e: c9 leave <== NOT EXECUTED 10b04f: c3 ret <== NOT EXECUTED =============================================================================== 0010b0a0 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10b0a0: 55 push %ebp 10b0a1: 89 e5 mov %esp,%ebp 10b0a3: 56 push %esi 10b0a4: 53 push %ebx 10b0a5: 8b 75 08 mov 0x8(%ebp),%esi 10b0a8: 8a 5d 10 mov 0x10(%ebp),%bl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10b0ab: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10b0b0: 85 c0 test %eax,%eax 10b0b2: 74 04 je 10b0b8 <_CORE_mutex_Seize+0x18> 10b0b4: 84 db test %bl,%bl 10b0b6: 75 30 jne 10b0e8 <_CORE_mutex_Seize+0x48><== ALWAYS TAKEN 10b0b8: 83 ec 08 sub $0x8,%esp 10b0bb: 8d 45 18 lea 0x18(%ebp),%eax 10b0be: 50 push %eax 10b0bf: 56 push %esi 10b0c0: e8 d3 47 00 00 call 10f898 <_CORE_mutex_Seize_interrupt_trylock> 10b0c5: 83 c4 10 add $0x10,%esp 10b0c8: 85 c0 test %eax,%eax 10b0ca: 74 14 je 10b0e0 <_CORE_mutex_Seize+0x40> 10b0cc: 84 db test %bl,%bl 10b0ce: 75 30 jne 10b100 <_CORE_mutex_Seize+0x60> 10b0d0: ff 75 18 pushl 0x18(%ebp) 10b0d3: 9d popf 10b0d4: a1 bc f9 11 00 mov 0x11f9bc,%eax 10b0d9: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10b0e0: 8d 65 f8 lea -0x8(%ebp),%esp 10b0e3: 5b pop %ebx 10b0e4: 5e pop %esi 10b0e5: c9 leave 10b0e6: c3 ret 10b0e7: 90 nop bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10b0e8: 83 3d c4 fa 11 00 01 cmpl $0x1,0x11fac4 10b0ef: 76 c7 jbe 10b0b8 <_CORE_mutex_Seize+0x18> 10b0f1: 53 push %ebx 10b0f2: 6a 13 push $0x13 10b0f4: 6a 00 push $0x0 10b0f6: 6a 00 push $0x0 10b0f8: e8 c7 04 00 00 call 10b5c4 <_Internal_error_Occurred> 10b0fd: 8d 76 00 lea 0x0(%esi),%esi { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10b100: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) 10b107: a1 bc f9 11 00 mov 0x11f9bc,%eax 10b10c: 89 70 44 mov %esi,0x44(%eax) 10b10f: 8b 55 0c mov 0xc(%ebp),%edx 10b112: 89 50 20 mov %edx,0x20(%eax) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10b115: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10b11a: 40 inc %eax 10b11b: a3 f8 f8 11 00 mov %eax,0x11f8f8 10b120: ff 75 18 pushl 0x18(%ebp) 10b123: 9d popf 10b124: 83 ec 08 sub $0x8,%esp 10b127: ff 75 14 pushl 0x14(%ebp) 10b12a: 56 push %esi 10b12b: e8 20 ff ff ff call 10b050 <_CORE_mutex_Seize_interrupt_blocking> 10b130: 83 c4 10 add $0x10,%esp } 10b133: 8d 65 f8 lea -0x8(%ebp),%esp 10b136: 5b pop %ebx 10b137: 5e pop %esi 10b138: c9 leave 10b139: c3 ret =============================================================================== 0010f898 <_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 ) { 10f898: 55 push %ebp 10f899: 89 e5 mov %esp,%ebp 10f89b: 53 push %ebx 10f89c: 83 ec 04 sub $0x4,%esp 10f89f: 8b 4d 08 mov 0x8(%ebp),%ecx bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size ); 10f8a2: 8b 45 0c mov 0xc(%ebp),%eax 10f8a5: 8b 18 mov (%eax),%ebx /** * This function tries to resize in place the block that is pointed to by the * @a starting_address to the new @a size. * 10f8a7: 8b 15 bc f9 11 00 mov 0x11f9bc,%edx * @param[in] the_heap is the heap to operate upon 10f8ad: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) * @param[in] starting_address is the starting address of the user block 10f8b4: 8b 41 50 mov 0x50(%ecx),%eax 10f8b7: 85 c0 test %eax,%eax 10f8b9: 74 2d je 10f8e8 <_CORE_mutex_Seize_interrupt_trylock+0x50> * to be resized 10f8bb: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx) * @param[in] size is the new size 10f8c2: 89 51 5c mov %edx,0x5c(%ecx) * 10f8c5: 8b 42 08 mov 0x8(%edx),%eax 10f8c8: 89 41 60 mov %eax,0x60(%ecx) * @return TRUE if successfully able to resize the block. 10f8cb: c7 41 54 01 00 00 00 movl $0x1,0x54(%ecx) /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. * Any other value of @a alignment is taken "as is", i.e., even odd 10f8d2: 8b 41 48 mov 0x48(%ecx),%eax * @param[in] starting_address is the starting address of the user block * to be resized * @param[in] size is the new size * * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. 10f8d5: 83 f8 02 cmp $0x2,%eax 10f8d8: 74 1e je 10f8f8 <_CORE_mutex_Seize_interrupt_trylock+0x60> 10f8da: 83 f8 03 cmp $0x3,%eax 10f8dd: 74 19 je 10f8f8 <_CORE_mutex_Seize_interrupt_trylock+0x60> /** * This routine returns the block of memory which begins * at @a starting_address to @a the_heap. Any coalescing which is * possible with the freeing of this routine is performed. * * @param[in] the_heap is the heap to operate upon 10f8df: 53 push %ebx 10f8e0: 9d popf 10f8e1: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10f8e3: 8b 5d fc mov -0x4(%ebp),%ebx 10f8e6: c9 leave 10f8e7: c3 ret * in the specified heap. * * @param[in] the_heap pointer to heap header. * @param[in] info pointer to the free block information. * * @return free block information filled in. 10f8e8: 3b 51 5c cmp 0x5c(%ecx),%edx 10f8eb: 74 3f je 10f92c <_CORE_mutex_Seize_interrupt_trylock+0x94> Heap_Control *the_heap, Heap_Information *info ); #ifdef __cplusplus } 10f8ed: b8 01 00 00 00 mov $0x1,%eax 10f8f2: 8b 5d fc mov -0x4(%ebp),%ebx 10f8f5: c9 leave 10f8f6: c3 ret 10f8f7: 90 nop void *starting_address, size_t size ); /** * This routine returns the block of memory which begins 10f8f8: ff 42 1c incl 0x1c(%edx) * at @a starting_address to @a the_heap. Any coalescing which is * possible with the freeing of this routine is performed. * 10f8fb: 83 79 48 03 cmpl $0x3,0x48(%ecx) 10f8ff: 75 de jne 10f8df <_CORE_mutex_Seize_interrupt_trylock+0x47> void *start_address ); /** * This routine walks the heap to verify its integrity. * 10f901: 8b 42 14 mov 0x14(%edx),%eax * @param[in] the_heap is the heap to operate upon 10f904: 39 41 4c cmp %eax,0x4c(%ecx) 10f907: 74 47 je 10f950 <_CORE_mutex_Seize_interrupt_trylock+0xb8><== NEVER TAKEN * @param[in] source is a user specified integer which may be used to * indicate where in the application this was invoked from * @param[in] do_dump is set to TRUE if errors should be printed * @return TRUE if the test passed fine, FALSE otherwise. */ 10f909: 72 4d jb 10f958 <_CORE_mutex_Seize_interrupt_trylock+0xc0> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header * @param[in] the_info pointer to a status information area 10f90b: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) * 10f912: c7 41 50 01 00 00 00 movl $0x1,0x50(%ecx) * @return true if successfully able to return information 10f919: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx) */ 10f920: ff 4a 1c decl 0x1c(%edx) bool _Protected_heap_Get_information( 10f923: 53 push %ebx 10f924: 9d popf 10f925: 31 c0 xor %eax,%eax 10f927: eb c9 jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 10f929: 8d 76 00 lea 0x0(%esi),%esi * * @param[in] the_heap pointer to heap header. * @param[in] info pointer to the free block information. * * @return free block information filled in. */ 10f92c: 8b 41 40 mov 0x40(%ecx),%eax 10f92f: 85 c0 test %eax,%eax 10f931: 74 11 je 10f944 <_CORE_mutex_Seize_interrupt_trylock+0xac> 10f933: 48 dec %eax 10f934: 75 b7 jne 10f8ed <_CORE_mutex_Seize_interrupt_trylock+0x55> bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ); #ifdef __cplusplus 10f936: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) } 10f93d: 53 push %ebx 10f93e: 9d popf 10f93f: 31 c0 xor %eax,%eax 10f941: eb af jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 10f943: 90 nop * @param[in] info pointer to the free block information. * * @return free block information filled in. */ bool _Protected_heap_Get_free_information( Heap_Control *the_heap, 10f944: ff 41 54 incl 0x54(%ecx) Heap_Information *info 10f947: 53 push %ebx 10f948: 9d popf 10f949: 31 c0 xor %eax,%eax 10f94b: eb a5 jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 10f94d: 8d 76 00 lea 0x0(%esi),%esi /** * This routine walks the heap to verify its integrity. * * @param[in] the_heap is the heap to operate upon * @param[in] source is a user specified integer which may be used to 10f950: 53 push %ebx <== NOT EXECUTED 10f951: 9d popf <== NOT EXECUTED 10f952: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f954: eb 9c jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 10f956: 66 90 xchg %ax,%ax <== NOT EXECUTED /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10f958: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10f95d: 40 inc %eax 10f95e: a3 f8 f8 11 00 mov %eax,0x11f8f8 * indicate where in the application this was invoked from * @param[in] do_dump is set to TRUE if errors should be printed * @return TRUE if the test passed fine, FALSE otherwise. */ bool _Protected_heap_Walk( Heap_Control *the_heap, 10f963: 53 push %ebx 10f964: 9d popf int source, 10f965: 50 push %eax 10f966: 6a 00 push $0x0 10f968: ff 71 4c pushl 0x4c(%ecx) 10f96b: ff 71 5c pushl 0x5c(%ecx) 10f96e: e8 41 c5 ff ff call 10beb4 <_Thread_Change_priority> bool do_dump ); /** * This routine walks the heap and tots up the free and allocated 10f973: e8 18 ca ff ff call 10c390 <_Thread_Enable_dispatch> 10f978: 31 c0 xor %eax,%eax 10f97a: 83 c4 10 add $0x10,%esp 10f97d: e9 70 ff ff ff jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010b13c <_CORE_mutex_Surrender>: CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 10b13c: 55 push %ebp 10b13d: 89 e5 mov %esp,%ebp 10b13f: 53 push %ebx 10b140: 83 ec 04 sub $0x4,%esp 10b143: 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; 10b146: 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 ) { 10b149: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10b14d: 74 15 je 10b164 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10b14f: 3b 15 bc f9 11 00 cmp 0x11f9bc,%edx 10b155: 74 0d je 10b164 <_CORE_mutex_Surrender+0x28> 10b157: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b15c: 8b 5d fc mov -0x4(%ebp),%ebx 10b15f: c9 leave 10b160: c3 ret 10b161: 8d 76 00 lea 0x0(%esi),%esi return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10b164: 8b 43 54 mov 0x54(%ebx),%eax 10b167: 85 c0 test %eax,%eax 10b169: 74 69 je 10b1d4 <_CORE_mutex_Surrender+0x98> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10b16b: 48 dec %eax 10b16c: 89 43 54 mov %eax,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10b16f: 85 c0 test %eax,%eax 10b171: 75 69 jne 10b1dc <_CORE_mutex_Surrender+0xa0> /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. * Any other value of @a alignment is taken "as is", i.e., even odd 10b173: 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 ) || 10b176: 83 f8 02 cmp $0x2,%eax 10b179: 0f 84 91 00 00 00 je 10b210 <_CORE_mutex_Surrender+0xd4> 10b17f: 83 f8 03 cmp $0x3,%eax 10b182: 0f 84 88 00 00 00 je 10b210 <_CORE_mutex_Surrender+0xd4> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10b188: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10b18f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * 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 ) || 10b196: 83 f8 02 cmp $0x2,%eax 10b199: 74 55 je 10b1f0 <_CORE_mutex_Surrender+0xb4> 10b19b: 83 f8 03 cmp $0x3,%eax 10b19e: 74 50 je 10b1f0 <_CORE_mutex_Surrender+0xb4> /* * 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 ) ) ) { 10b1a0: 83 ec 0c sub $0xc,%esp 10b1a3: 53 push %ebx 10b1a4: e8 6b 15 00 00 call 10c714 <_Thread_queue_Dequeue> 10b1a9: 89 c2 mov %eax,%edx 10b1ab: 83 c4 10 add $0x10,%esp 10b1ae: 85 c0 test %eax,%eax 10b1b0: 0f 84 8e 00 00 00 je 10b244 <_CORE_mutex_Surrender+0x108> } else #endif { the_mutex->holder = the_thread; 10b1b6: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10b1b9: 8b 40 08 mov 0x8(%eax),%eax 10b1bc: 89 43 60 mov %eax,0x60(%ebx) the_mutex->nest_count = 1; 10b1bf: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10b1c6: 8b 43 48 mov 0x48(%ebx),%eax 10b1c9: 83 f8 02 cmp $0x2,%eax 10b1cc: 74 6a je 10b238 <_CORE_mutex_Surrender+0xfc> 10b1ce: 83 f8 03 cmp $0x3,%eax 10b1d1: 74 45 je 10b218 <_CORE_mutex_Surrender+0xdc> 10b1d3: 90 nop } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10b1d4: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b1d6: 8b 5d fc mov -0x4(%ebp),%ebx 10b1d9: c9 leave 10b1da: c3 ret 10b1db: 90 nop return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10b1dc: 8b 43 40 mov 0x40(%ebx),%eax 10b1df: 85 c0 test %eax,%eax 10b1e1: 74 f1 je 10b1d4 <_CORE_mutex_Surrender+0x98><== ALWAYS TAKEN 10b1e3: 48 dec %eax <== NOT EXECUTED 10b1e4: 75 8d jne 10b173 <_CORE_mutex_Surrender+0x37><== NOT EXECUTED 10b1e6: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 10b1eb: e9 6c ff ff ff jmp 10b15c <_CORE_mutex_Surrender+0x20><== NOT EXECUTED _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 && 10b1f0: 8b 42 1c mov 0x1c(%edx),%eax 10b1f3: 85 c0 test %eax,%eax 10b1f5: 75 a9 jne 10b1a0 <_CORE_mutex_Surrender+0x64> 10b1f7: 8b 42 18 mov 0x18(%edx),%eax 10b1fa: 3b 42 14 cmp 0x14(%edx),%eax 10b1fd: 74 a1 je 10b1a0 <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 10b1ff: 51 push %ecx 10b200: 6a 01 push $0x1 10b202: 50 push %eax 10b203: 52 push %edx 10b204: e8 ab 0c 00 00 call 10beb4 <_Thread_Change_priority> 10b209: 83 c4 10 add $0x10,%esp 10b20c: eb 92 jmp 10b1a0 <_CORE_mutex_Surrender+0x64> 10b20e: 66 90 xchg %ax,%ax the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10b210: ff 4a 1c decl 0x1c(%edx) 10b213: e9 70 ff ff ff jmp 10b188 <_CORE_mutex_Surrender+0x4c> 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++; 10b218: ff 42 1c incl 0x1c(%edx) if (the_mutex->Attributes.priority_ceiling < 10b21b: 8b 43 4c mov 0x4c(%ebx),%eax 10b21e: 3b 42 14 cmp 0x14(%edx),%eax 10b221: 73 b1 jae 10b1d4 <_CORE_mutex_Surrender+0x98><== NEVER TAKEN the_thread->current_priority){ _Thread_Change_priority( 10b223: 51 push %ecx 10b224: 6a 00 push $0x0 10b226: 50 push %eax 10b227: 52 push %edx 10b228: e8 87 0c 00 00 call 10beb4 <_Thread_Change_priority> 10b22d: 31 c0 xor %eax,%eax 10b22f: 83 c4 10 add $0x10,%esp 10b232: e9 25 ff ff ff jmp 10b15c <_CORE_mutex_Surrender+0x20> 10b237: 90 nop 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++; 10b238: ff 42 1c incl 0x1c(%edx) 10b23b: 31 c0 xor %eax,%eax 10b23d: e9 1a ff ff ff jmp 10b15c <_CORE_mutex_Surrender+0x20> 10b242: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10b244: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10b24b: 31 c0 xor %eax,%eax 10b24d: e9 0a ff ff ff jmp 10b15c <_CORE_mutex_Surrender+0x20> =============================================================================== 0010b2a0 <_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 ) { 10b2a0: 55 push %ebp 10b2a1: 89 e5 mov %esp,%ebp 10b2a3: 53 push %ebx 10b2a4: 83 ec 10 sub $0x10,%esp 10b2a7: 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)) ) { 10b2aa: 53 push %ebx 10b2ab: e8 64 14 00 00 call 10c714 <_Thread_queue_Dequeue> 10b2b0: 83 c4 10 add $0x10,%esp 10b2b3: 85 c0 test %eax,%eax 10b2b5: 74 09 je 10b2c0 <_CORE_semaphore_Surrender+0x20> 10b2b7: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10b2b9: 8b 5d fc mov -0x4(%ebp),%ebx 10b2bc: c9 leave 10b2bd: c3 ret 10b2be: 66 90 xchg %ax,%ax if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10b2c0: 9c pushf 10b2c1: fa cli 10b2c2: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b2c3: 8b 43 48 mov 0x48(%ebx),%eax 10b2c6: 3b 43 40 cmp 0x40(%ebx),%eax 10b2c9: 72 0d jb 10b2d8 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN 10b2cb: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10b2d0: 52 push %edx 10b2d1: 9d popf } return status; } 10b2d2: 8b 5d fc mov -0x4(%ebp),%ebx 10b2d5: c9 leave 10b2d6: c3 ret 10b2d7: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10b2d8: 40 inc %eax 10b2d9: 89 43 48 mov %eax,0x48(%ebx) 10b2dc: 31 c0 xor %eax,%eax 10b2de: eb f0 jmp 10b2d0 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010bc28 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10bc28: 55 push %ebp 10bc29: 89 e5 mov %esp,%ebp 10bc2b: 53 push %ebx 10bc2c: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10bc2f: 9c pushf 10bc30: fa cli 10bc31: 59 pop %ecx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10bc32: 8b 43 04 mov 0x4(%ebx),%eax 10bc35: 85 c0 test %eax,%eax 10bc37: 75 07 jne 10bc40 <_CORE_spinlock_Release+0x18> _ISR_Enable( level ); 10bc39: 51 push %ecx 10bc3a: 9d popf 10bc3b: b0 06 mov $0x6,%al the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 10bc3d: 5b pop %ebx 10bc3e: c9 leave 10bc3f: c3 ret } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10bc40: 8b 53 0c mov 0xc(%ebx),%edx 10bc43: a1 dc 0a 12 00 mov 0x120adc,%eax 10bc48: 3b 50 08 cmp 0x8(%eax),%edx 10bc4b: 74 0b je 10bc58 <_CORE_spinlock_Release+0x30><== ALWAYS TAKEN _ISR_Enable( level ); 10bc4d: 51 push %ecx <== NOT EXECUTED 10bc4e: 9d popf <== NOT EXECUTED 10bc4f: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 10bc54: 5b pop %ebx <== NOT EXECUTED 10bc55: c9 leave <== NOT EXECUTED 10bc56: c3 ret <== NOT EXECUTED 10bc57: 90 nop <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10bc58: 8b 43 08 mov 0x8(%ebx),%eax 10bc5b: 48 dec %eax 10bc5c: 89 43 08 mov %eax,0x8(%ebx) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10bc5f: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) the_spinlock->holder = 0; 10bc66: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _ISR_Enable( level ); 10bc6d: 51 push %ecx 10bc6e: 9d popf 10bc6f: 31 c0 xor %eax,%eax 10bc71: eb ca jmp 10bc3d <_CORE_spinlock_Release+0x15> =============================================================================== 0010bc74 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10bc74: 55 push %ebp 10bc75: 89 e5 mov %esp,%ebp 10bc77: 57 push %edi 10bc78: 56 push %esi 10bc79: 53 push %ebx 10bc7a: 83 ec 0c sub $0xc,%esp 10bc7d: 8b 5d 08 mov 0x8(%ebp),%ebx 10bc80: 8b 7d 10 mov 0x10(%ebp),%edi 10bc83: 8a 45 0c mov 0xc(%ebp),%al 10bc86: 88 45 f3 mov %al,-0xd(%ebp) ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 10bc89: a1 84 0b 12 00 mov 0x120b84,%eax 10bc8e: 8d 34 07 lea (%edi,%eax,1),%esi _ISR_Disable( level ); 10bc91: 9c pushf 10bc92: fa cli 10bc93: 59 pop %ecx if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10bc94: 8b 43 04 mov 0x4(%ebx),%eax 10bc97: 48 dec %eax 10bc98: 74 76 je 10bd10 <_CORE_spinlock_Wait+0x9c> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10bc9a: 8b 43 08 mov 0x8(%ebx),%eax 10bc9d: 40 inc %eax 10bc9e: 89 43 08 mov %eax,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10bca1: 8b 43 04 mov 0x4(%ebx),%eax 10bca4: 85 c0 test %eax,%eax 10bca6: 74 31 je 10bcd9 <_CORE_spinlock_Wait+0x65> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10bca8: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10bcac: 74 49 je 10bcf7 <_CORE_spinlock_Wait+0x83><== NEVER TAKEN 10bcae: 66 90 xchg %ax,%ax } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 10bcb0: 85 ff test %edi,%edi 10bcb2: 74 09 je 10bcbd <_CORE_spinlock_Wait+0x49><== ALWAYS TAKEN 10bcb4: a1 84 0b 12 00 mov 0x120b84,%eax <== NOT EXECUTED 10bcb9: 39 c6 cmp %eax,%esi <== NOT EXECUTED 10bcbb: 76 6f jbe 10bd2c <_CORE_spinlock_Wait+0xb8><== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10bcbd: 51 push %ecx 10bcbe: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10bcbf: e8 30 11 00 00 call 10cdf4 <_Thread_Enable_dispatch> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10bcc4: a1 18 0a 12 00 mov 0x120a18,%eax 10bcc9: 40 inc %eax 10bcca: a3 18 0a 12 00 mov %eax,0x120a18 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10bccf: 9c pushf 10bcd0: fa cli 10bcd1: 59 pop %ecx _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10bcd2: 8b 43 04 mov 0x4(%ebx),%eax 10bcd5: 85 c0 test %eax,%eax 10bcd7: 75 d7 jne 10bcb0 <_CORE_spinlock_Wait+0x3c> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10bcd9: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10bce0: a1 dc 0a 12 00 mov 0x120adc,%eax 10bce5: 8b 40 08 mov 0x8(%eax),%eax 10bce8: 89 43 0c mov %eax,0xc(%ebx) _ISR_Enable( level ); 10bceb: 51 push %ecx 10bcec: 9d popf 10bced: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10bcef: 83 c4 0c add $0xc,%esp 10bcf2: 5b pop %ebx 10bcf3: 5e pop %esi 10bcf4: 5f pop %edi 10bcf5: c9 leave 10bcf6: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10bcf7: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10bcfa: 48 dec %eax <== NOT EXECUTED 10bcfb: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED _ISR_Enable( level ); 10bcfe: 51 push %ecx <== NOT EXECUTED 10bcff: 9d popf <== NOT EXECUTED 10bd00: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10bd05: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10bd08: 5b pop %ebx <== NOT EXECUTED 10bd09: 5e pop %esi <== NOT EXECUTED 10bd0a: 5f pop %edi <== NOT EXECUTED 10bd0b: c9 leave <== NOT EXECUTED 10bd0c: c3 ret <== NOT EXECUTED 10bd0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10bd10: 8b 53 0c mov 0xc(%ebx),%edx 10bd13: a1 dc 0a 12 00 mov 0x120adc,%eax 10bd18: 3b 50 08 cmp 0x8(%eax),%edx 10bd1b: 0f 85 79 ff ff ff jne 10bc9a <_CORE_spinlock_Wait+0x26> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 10bd21: 51 push %ecx 10bd22: 9d popf 10bd23: b8 01 00 00 00 mov $0x1,%eax 10bd28: eb c5 jmp 10bcef <_CORE_spinlock_Wait+0x7b> 10bd2a: 66 90 xchg %ax,%ax /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 10bd2c: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10bd2f: 48 dec %eax <== NOT EXECUTED 10bd30: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED _ISR_Enable( level ); 10bd33: 51 push %ecx <== NOT EXECUTED 10bd34: 9d popf <== NOT EXECUTED 10bd35: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10bd3a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10bd3d: 5b pop %ebx <== NOT EXECUTED 10bd3e: 5e pop %esi <== NOT EXECUTED 10bd3f: 5f pop %edi <== NOT EXECUTED 10bd40: c9 leave <== NOT EXECUTED 10bd41: c3 ret <== NOT EXECUTED =============================================================================== 0010ae44 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10ae44: 55 push %ebp 10ae45: 89 e5 mov %esp,%ebp 10ae47: 53 push %ebx 10ae48: 8b 4d 08 mov 0x8(%ebp),%ecx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10ae4b: 9c pushf 10ae4c: fa cli 10ae4d: 5b pop %ebx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10ae4e: 8b 11 mov (%ecx),%edx if ( !_Chain_Is_empty( the_chain ) ) 10ae50: 8d 41 04 lea 0x4(%ecx),%eax 10ae53: 39 c2 cmp %eax,%edx 10ae55: 74 11 je 10ae68 <_Chain_Get+0x24> 10ae57: 8b 02 mov (%edx),%eax 10ae59: 89 01 mov %eax,(%ecx) 10ae5b: 89 48 04 mov %ecx,0x4(%eax) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10ae5e: 53 push %ebx 10ae5f: 9d popf return return_node; } 10ae60: 89 d0 mov %edx,%eax 10ae62: 5b pop %ebx 10ae63: c9 leave 10ae64: c3 ret 10ae65: 8d 76 00 lea 0x0(%esi),%esi ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); if ( !_Chain_Is_empty( the_chain ) ) 10ae68: 31 d2 xor %edx,%edx 10ae6a: eb f2 jmp 10ae5e <_Chain_Get+0x1a> =============================================================================== 0010f76c <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 10f76c: 55 push %ebp 10f76d: 89 e5 mov %esp,%ebp 10f76f: 57 push %edi 10f770: 56 push %esi 10f771: 53 push %ebx 10f772: 8b 75 08 mov 0x8(%ebp),%esi 10f775: 8b 45 10 mov 0x10(%ebp),%eax 10f778: 8b 5d 14 mov 0x14(%ebp),%ebx size_t size ); /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the 10f77b: 89 f1 mov %esi,%ecx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 10f77d: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) next = starting_address; while ( count-- ) { 10f784: 85 c0 test %eax,%eax 10f786: 74 22 je 10f7aa <_Chain_Initialize+0x3e><== NEVER TAKEN 10f788: 8d 50 ff lea -0x1(%eax),%edx 10f78b: 89 d7 mov %edx,%edi 10f78d: 8b 45 0c mov 0xc(%ebp),%eax 10f790: eb 03 jmp 10f795 <_Chain_Initialize+0x29> 10f792: 66 90 xchg %ax,%ax 10f794: 4a dec %edx current->next = next; 10f795: 89 01 mov %eax,(%ecx) next->previous = current; 10f797: 89 48 04 mov %ecx,0x4(%eax) Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 10f79a: 89 c1 mov %eax,%ecx 10f79c: 01 d8 add %ebx,%eax count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 10f79e: 85 d2 test %edx,%edx 10f7a0: 75 f2 jne 10f794 <_Chain_Initialize+0x28> 10f7a2: 0f af df imul %edi,%ebx 10f7a5: 8b 4d 0c mov 0xc(%ebp),%ecx 10f7a8: 01 d9 add %ebx,%ecx next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 10f7aa: 8d 46 04 lea 0x4(%esi),%eax 10f7ad: 89 01 mov %eax,(%ecx) the_chain->last = current; 10f7af: 89 4e 08 mov %ecx,0x8(%esi) } 10f7b2: 5b pop %ebx 10f7b3: 5e pop %esi 10f7b4: 5f pop %edi 10f7b5: c9 leave 10f7b6: c3 ret =============================================================================== 0010f700 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 10f700: 55 push %ebp <== NOT EXECUTED 10f701: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f703: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f706: 85 05 c0 f9 11 00 test %eax,0x11f9c0 <== NOT EXECUTED 10f70c: 0f 95 c0 setne %al <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 10f70f: c9 leave <== NOT EXECUTED 10f710: c3 ret <== NOT EXECUTED =============================================================================== 00109d94 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 109d94: 55 push %ebp 109d95: 89 e5 mov %esp,%ebp 109d97: 57 push %edi 109d98: 56 push %esi 109d99: 53 push %ebx 109d9a: 83 ec 0c sub $0xc,%esp 109d9d: 8b 45 08 mov 0x8(%ebp),%eax 109da0: 8b 75 0c mov 0xc(%ebp),%esi 109da3: 8b 55 10 mov 0x10(%ebp),%edx 109da6: 89 55 ec mov %edx,-0x14(%ebp) 109da9: 8b 55 14 mov 0x14(%ebp),%edx 109dac: 89 55 e8 mov %edx,-0x18(%ebp) rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 109daf: 8b 1d bc f9 11 00 mov 0x11f9bc,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 109db5: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 109dbc: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi _ISR_Disable( level ); 109dc2: 9c pushf 109dc3: fa cli 109dc4: 8f 45 f0 popl -0x10(%ebp) pending_events = api->pending_events; 109dc7: 8b 17 mov (%edi),%edx seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 109dc9: 89 c1 mov %eax,%ecx 109dcb: 21 d1 and %edx,%ecx 109dcd: 74 14 je 109de3 <_Event_Seize+0x4f> 109dcf: 39 c8 cmp %ecx,%eax 109dd1: 0f 84 91 00 00 00 je 109e68 <_Event_Seize+0xd4> 109dd7: f7 c6 02 00 00 00 test $0x2,%esi 109ddd: 0f 85 85 00 00 00 jne 109e68 <_Event_Seize+0xd4> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 109de3: f7 c6 01 00 00 00 test $0x1,%esi 109de9: 75 65 jne 109e50 <_Event_Seize+0xbc> executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 109deb: c7 05 c0 02 12 00 01 movl $0x1,0x1202c0 109df2: 00 00 00 executing->Wait.option = (uint32_t) option_set; 109df5: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 109df8: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 109dfb: 8b 45 e8 mov -0x18(%ebp),%eax 109dfe: 89 43 28 mov %eax,0x28(%ebx) _ISR_Enable( level ); 109e01: ff 75 f0 pushl -0x10(%ebp) 109e04: 9d popf if ( ticks ) { 109e05: 8b 45 ec mov -0x14(%ebp),%eax 109e08: 85 c0 test %eax,%eax 109e0a: 0f 85 80 00 00 00 jne 109e90 <_Event_Seize+0xfc> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 109e10: 83 ec 08 sub $0x8,%esp 109e13: 68 00 01 00 00 push $0x100 109e18: 53 push %ebx 109e19: e8 26 2e 00 00 call 10cc44 <_Thread_Set_state> _ISR_Disable( level ); 109e1e: 9c pushf 109e1f: fa cli 109e20: 5a pop %edx sync_state = _Event_Sync_state; 109e21: a1 c0 02 12 00 mov 0x1202c0,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 109e26: c7 05 c0 02 12 00 00 movl $0x0,0x1202c0 109e2d: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 109e30: 83 c4 10 add $0x10,%esp 109e33: 83 f8 01 cmp $0x1,%eax 109e36: 74 4c je 109e84 <_Event_Seize+0xf0> * 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 ); 109e38: 89 55 10 mov %edx,0x10(%ebp) 109e3b: 89 5d 0c mov %ebx,0xc(%ebp) 109e3e: 89 45 08 mov %eax,0x8(%ebp) } 109e41: 8d 65 f4 lea -0xc(%ebp),%esp 109e44: 5b pop %ebx 109e45: 5e pop %esi 109e46: 5f pop %edi 109e47: 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 ); 109e48: e9 1b 20 00 00 jmp 10be68 <_Thread_blocking_operation_Cancel> 109e4d: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 109e50: ff 75 f0 pushl -0x10(%ebp) 109e53: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 109e54: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 109e5b: 8b 55 e8 mov -0x18(%ebp),%edx 109e5e: 89 0a mov %ecx,(%edx) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 109e60: 8d 65 f4 lea -0xc(%ebp),%esp 109e63: 5b pop %ebx 109e64: 5e pop %esi 109e65: 5f pop %edi 109e66: c9 leave 109e67: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 109e68: 89 c8 mov %ecx,%eax 109e6a: f7 d0 not %eax 109e6c: 21 d0 and %edx,%eax 109e6e: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 109e70: ff 75 f0 pushl -0x10(%ebp) 109e73: 9d popf *event_out = seized_events; 109e74: 8b 45 e8 mov -0x18(%ebp),%eax 109e77: 89 08 mov %ecx,(%eax) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 109e79: 8d 65 f4 lea -0xc(%ebp),%esp 109e7c: 5b pop %ebx 109e7d: 5e pop %esi 109e7e: 5f pop %edi 109e7f: c9 leave 109e80: c3 ret 109e81: 8d 76 00 lea 0x0(%esi),%esi _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 109e84: 52 push %edx 109e85: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 109e86: 8d 65 f4 lea -0xc(%ebp),%esp 109e89: 5b pop %ebx 109e8a: 5e pop %esi 109e8b: 5f pop %edi 109e8c: c9 leave 109e8d: c3 ret 109e8e: 66 90 xchg %ax,%ax executing->Wait.return_argument = event_out; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 109e90: 8b 43 08 mov 0x8(%ebx),%eax * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 109e93: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) * @param[in] the_heap is the heap to operate upon 109e9a: c7 43 64 38 a0 10 00 movl $0x10a038,0x64(%ebx) * @param[in] starting_address is the starting address of the memory for 109ea1: 89 43 68 mov %eax,0x68(%ebx) * the heap 109ea4: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 109eab: 8b 55 ec mov -0x14(%ebp),%edx 109eae: 89 53 54 mov %edx,0x54(%ebx) void *starting_address, size_t *size 109eb1: 83 ec 08 sub $0x8,%esp 109eb4: 8d 43 48 lea 0x48(%ebx),%eax 109eb7: 50 push %eax 109eb8: 68 dc f9 11 00 push $0x11f9dc 109ebd: e8 de 33 00 00 call 10d2a0 <_Watchdog_Insert> 109ec2: 83 c4 10 add $0x10,%esp 109ec5: e9 46 ff ff ff jmp 109e10 <_Event_Seize+0x7c> =============================================================================== 00109f20 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109f20: 55 push %ebp 109f21: 89 e5 mov %esp,%ebp 109f23: 57 push %edi 109f24: 56 push %esi 109f25: 53 push %ebx 109f26: 83 ec 0c sub $0xc,%esp 109f29: 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 ]; 109f2c: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi option_set = (rtems_option) the_thread->Wait.option; 109f32: 8b 43 30 mov 0x30(%ebx),%eax 109f35: 89 45 f0 mov %eax,-0x10(%ebp) _ISR_Disable( level ); 109f38: 9c pushf 109f39: fa cli 109f3a: 8f 45 ec popl -0x14(%ebp) pending_events = api->pending_events; 109f3d: 8b 0e mov (%esi),%ecx event_condition = (rtems_event_set) the_thread->Wait.count; 109f3f: 8b 53 24 mov 0x24(%ebx),%edx seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 109f42: 89 d7 mov %edx,%edi 109f44: 21 cf and %ecx,%edi 109f46: 74 70 je 109fb8 <_Event_Surrender+0x98> /* * 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() && 109f48: a1 98 f9 11 00 mov 0x11f998,%eax 109f4d: 85 c0 test %eax,%eax 109f4f: 74 0c je 109f5d <_Event_Surrender+0x3d> 109f51: 3b 1d bc f9 11 00 cmp 0x11f9bc,%ebx 109f57: 0f 84 93 00 00 00 je 109ff0 <_Event_Surrender+0xd0> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109f5d: f6 43 11 01 testb $0x1,0x11(%ebx) 109f61: 75 0d jne 109f70 <_Event_Surrender+0x50> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109f63: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED 109f66: 9d popf <== NOT EXECUTED } 109f67: 8d 65 f4 lea -0xc(%ebp),%esp 109f6a: 5b pop %ebx 109f6b: 5e pop %esi 109f6c: 5f pop %edi 109f6d: c9 leave 109f6e: c3 ret 109f6f: 90 nop /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109f70: 39 fa cmp %edi,%edx 109f72: 74 06 je 109f7a <_Event_Surrender+0x5a> 109f74: f6 45 f0 02 testb $0x2,-0x10(%ebp) 109f78: 74 e9 je 109f63 <_Event_Surrender+0x43> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 109f7a: 89 f8 mov %edi,%eax 109f7c: f7 d0 not %eax 109f7e: 21 c8 and %ecx,%eax 109f80: 89 06 mov %eax,(%esi) the_thread->Wait.count = 0; 109f82: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109f89: 8b 43 28 mov 0x28(%ebx),%eax 109f8c: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 109f8e: ff 75 ec pushl -0x14(%ebp) 109f91: 9d popf 109f92: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109f93: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109f97: 74 2b je 109fc4 <_Event_Surrender+0xa4> _ISR_Enable( level ); 109f99: ff 75 ec pushl -0x14(%ebp) 109f9c: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 109f9d: 83 ec 08 sub $0x8,%esp 109fa0: 68 f8 ff 03 10 push $0x1003fff8 109fa5: 53 push %ebx 109fa6: e8 3d 20 00 00 call 10bfe8 <_Thread_Clear_state> 109fab: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 109fae: 8d 65 f4 lea -0xc(%ebp),%esp 109fb1: 5b pop %ebx 109fb2: 5e pop %esi 109fb3: 5f pop %edi 109fb4: c9 leave 109fb5: c3 ret 109fb6: 66 90 xchg %ax,%ax /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 109fb8: ff 75 ec pushl -0x14(%ebp) 109fbb: 9d popf } return; } } _ISR_Enable( level ); } 109fbc: 8d 65 f4 lea -0xc(%ebp),%esp 109fbf: 5b pop %ebx 109fc0: 5e pop %esi 109fc1: 5f pop %edi 109fc2: c9 leave 109fc3: c3 ret * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 109fc4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109fcb: ff 75 ec pushl -0x14(%ebp) 109fce: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109fcf: 83 ec 0c sub $0xc,%esp 109fd2: 8d 43 48 lea 0x48(%ebx),%eax 109fd5: 50 push %eax 109fd6: e8 f5 33 00 00 call 10d3d0 <_Watchdog_Remove> void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 109fdb: 58 pop %eax 109fdc: 5a pop %edx 109fdd: 68 f8 ff 03 10 push $0x1003fff8 109fe2: 53 push %ebx 109fe3: e8 00 20 00 00 call 10bfe8 <_Thread_Clear_state> 109fe8: 83 c4 10 add $0x10,%esp 109feb: e9 77 ff ff ff jmp 109f67 <_Event_Surrender+0x47> /* * 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() && 109ff0: a1 c0 02 12 00 mov 0x1202c0,%eax 109ff5: 48 dec %eax 109ff6: 74 0e je 10a006 <_Event_Surrender+0xe6> <== ALWAYS TAKEN 109ff8: a1 c0 02 12 00 mov 0x1202c0,%eax <== NOT EXECUTED 109ffd: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10a000: 0f 85 57 ff ff ff jne 109f5d <_Event_Surrender+0x3d> <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10a006: 39 fa cmp %edi,%edx 10a008: 74 06 je 10a010 <_Event_Surrender+0xf0> <== ALWAYS TAKEN 10a00a: f6 45 f0 02 testb $0x2,-0x10(%ebp) <== NOT EXECUTED 10a00e: 74 1e je 10a02e <_Event_Surrender+0x10e><== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10a010: 89 f8 mov %edi,%eax 10a012: f7 d0 not %eax 10a014: 21 c8 and %ecx,%eax 10a016: 89 06 mov %eax,(%esi) the_thread->Wait.count = 0; 10a018: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a01f: 8b 43 28 mov 0x28(%ebx),%eax 10a022: 89 38 mov %edi,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a024: c7 05 c0 02 12 00 03 movl $0x3,0x1202c0 10a02b: 00 00 00 } _ISR_Enable( level ); 10a02e: ff 75 ec pushl -0x14(%ebp) 10a031: 9d popf 10a032: e9 30 ff ff ff jmp 109f67 <_Event_Surrender+0x47> =============================================================================== 0010a038 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a038: 55 push %ebp 10a039: 89 e5 mov %esp,%ebp 10a03b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a03e: 8d 45 fc lea -0x4(%ebp),%eax 10a041: 50 push %eax 10a042: ff 75 08 pushl 0x8(%ebp) 10a045: e8 6a 23 00 00 call 10c3b4 <_Thread_Get> 10a04a: 89 c2 mov %eax,%edx switch ( location ) { 10a04c: 83 c4 10 add $0x10,%esp 10a04f: 8b 4d fc mov -0x4(%ebp),%ecx 10a052: 85 c9 test %ecx,%ecx 10a054: 75 3e jne 10a094 <_Event_Timeout+0x5c> <== NEVER TAKEN * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10a056: 9c pushf 10a057: fa cli 10a058: 59 pop %ecx if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 10a059: 8b 40 24 mov 0x24(%eax),%eax 10a05c: 85 c0 test %eax,%eax 10a05e: 74 38 je 10a098 <_Event_Timeout+0x60> <== NEVER TAKEN _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 10a060: c7 42 24 00 00 00 00 movl $0x0,0x24(%edx) if ( _Thread_Is_executing( the_thread ) ) { 10a067: 3b 15 bc f9 11 00 cmp 0x11f9bc,%edx 10a06d: 74 39 je 10a0a8 <_Event_Timeout+0x70> <== NEVER TAKEN (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10a06f: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) _ISR_Enable( level ); 10a076: 51 push %ecx 10a077: 9d popf 10a078: 83 ec 08 sub $0x8,%esp 10a07b: 68 f8 ff 03 10 push $0x1003fff8 10a080: 52 push %edx 10a081: e8 62 1f 00 00 call 10bfe8 <_Thread_Clear_state> 10a086: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10a08b: 48 dec %eax 10a08c: a3 f8 f8 11 00 mov %eax,0x11f8f8 10a091: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a094: c9 leave 10a095: c3 ret 10a096: 66 90 xchg %ax,%ax 10a098: a1 f8 f8 11 00 mov 0x11f8f8,%eax <== NOT EXECUTED 10a09d: 48 dec %eax <== NOT EXECUTED 10a09e: a3 f8 f8 11 00 mov %eax,0x11f8f8 <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 10a0a3: 51 push %ecx <== NOT EXECUTED 10a0a4: 9d popf <== NOT EXECUTED case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a0a5: c9 leave <== NOT EXECUTED 10a0a6: c3 ret <== NOT EXECUTED 10a0a7: 90 nop <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 10a0a8: a1 c0 02 12 00 mov 0x1202c0,%eax <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 10a0ad: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10a0b0: 77 bd ja 10a06f <_Event_Timeout+0x37> <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a0b2: c7 05 c0 02 12 00 02 movl $0x2,0x1202c0 <== NOT EXECUTED 10a0b9: 00 00 00 10a0bc: eb b1 jmp 10a06f <_Event_Timeout+0x37> <== NOT EXECUTED =============================================================================== 0010f9d8 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 10f9d8: 55 push %ebp 10f9d9: 89 e5 mov %esp,%ebp 10f9db: 57 push %edi 10f9dc: 56 push %esi 10f9dd: 53 push %ebx 10f9de: 83 ec 10 sub $0x10,%esp 10f9e1: 8b 7d 08 mov 0x8(%ebp),%edi Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 10f9e4: ff 77 14 pushl 0x14(%edi) 10f9e7: ff 77 10 pushl 0x10(%edi) 10f9ea: ff 75 0c pushl 0xc(%ebp) 10f9ed: e8 1a bb ff ff call 10b50c <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 10f9f2: 83 c4 10 add $0x10,%esp 10f9f5: 85 c0 test %eax,%eax 10f9f7: 74 3b je 10fa34 <_Heap_Allocate+0x5c> <== NEVER TAKEN * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( 10f9f9: 8b 5f 08 mov 0x8(%edi),%ebx return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 10f9fc: 39 df cmp %ebx,%edi 10f9fe: 74 34 je 10fa34 <_Heap_Allocate+0x5c> /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 10fa00: 3b 43 04 cmp 0x4(%ebx),%eax 10fa03: 76 5c jbe 10fa61 <_Heap_Allocate+0x89> stats->allocs += 1; stats->searches += search_count + 1; _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; 10fa05: 31 f6 xor %esi,%esi 10fa07: eb 08 jmp 10fa11 <_Heap_Allocate+0x39> 10fa09: 8d 76 00 lea 0x0(%esi),%esi /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 10fa0c: 3b 43 04 cmp 0x4(%ebx),%eax 10fa0f: 76 2f jbe 10fa40 <_Heap_Allocate+0x68> return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 10fa11: 8b 5b 08 mov 0x8(%ebx),%ebx 10fa14: 46 inc %esi if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 10fa15: 39 df cmp %ebx,%edi 10fa17: 75 f3 jne 10fa0c <_Heap_Allocate+0x34> 10fa19: 89 75 f0 mov %esi,-0x10(%ebp) 10fa1c: 31 d2 xor %edx,%edx _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 10fa1e: 8b 45 f0 mov -0x10(%ebp),%eax 10fa21: 39 47 44 cmp %eax,0x44(%edi) 10fa24: 73 03 jae 10fa29 <_Heap_Allocate+0x51> stats->max_search = search_count; 10fa26: 89 47 44 mov %eax,0x44(%edi) return ptr; } 10fa29: 89 d0 mov %edx,%eax 10fa2b: 8d 65 f4 lea -0xc(%ebp),%esp 10fa2e: 5b pop %ebx 10fa2f: 5e pop %esi 10fa30: 5f pop %edi 10fa31: c9 leave 10fa32: c3 ret 10fa33: 90 nop break; } } if(stats->max_search < search_count) stats->max_search = search_count; 10fa34: 31 d2 xor %edx,%edx return ptr; } 10fa36: 89 d0 mov %edx,%eax 10fa38: 8d 65 f4 lea -0xc(%ebp),%esp 10fa3b: 5b pop %ebx 10fa3c: 5e pop %esi 10fa3d: 5f pop %edi 10fa3e: c9 leave 10fa3f: c3 ret /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 10fa40: 89 75 f0 mov %esi,-0x10(%ebp) (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 10fa43: 52 push %edx 10fa44: 50 push %eax 10fa45: 53 push %ebx 10fa46: 57 push %edi 10fa47: e8 f4 ba ff ff call 10b540 <_Heap_Block_allocate> * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 10fa4c: 8d 53 08 lea 0x8(%ebx),%edx ptr = _Heap_User_area(the_block); stats->allocs += 1; 10fa4f: ff 47 48 incl 0x48(%edi) stats->searches += search_count + 1; 10fa52: 8b 47 4c mov 0x4c(%edi),%eax 10fa55: 8d 44 06 01 lea 0x1(%esi,%eax,1),%eax 10fa59: 89 47 4c mov %eax,0x4c(%edi) 10fa5c: 83 c4 10 add $0x10,%esp 10fa5f: eb bd jmp 10fa1e <_Heap_Allocate+0x46> /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 10fa61: 31 f6 xor %esi,%esi 10fa63: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10fa6a: eb d7 jmp 10fa43 <_Heap_Allocate+0x6b> =============================================================================== 0010cd04 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 10cd04: 55 push %ebp 10cd05: 89 e5 mov %esp,%ebp 10cd07: 57 push %edi 10cd08: 56 push %esi 10cd09: 53 push %ebx 10cd0a: 83 ec 20 sub $0x20,%esp 10cd0d: 8b 45 0c mov 0xc(%ebp),%eax uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 10cd10: 8b 55 08 mov 0x8(%ebp),%edx 10cd13: 8b 52 10 mov 0x10(%edx),%edx 10cd16: 89 55 dc mov %edx,-0x24(%ebp) Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 10cd19: 8d 48 fc lea -0x4(%eax),%ecx 10cd1c: 89 4d e0 mov %ecx,-0x20(%ebp) uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 10cd1f: 8b 7d 08 mov 0x8(%ebp),%edi 10cd22: ff 77 14 pushl 0x14(%edi) 10cd25: 52 push %edx 10cd26: 50 push %eax 10cd27: e8 8c 04 00 00 call 10d1b8 <_Heap_Calc_block_size> 10cd2c: 89 45 e4 mov %eax,-0x1c(%ebp) if(the_size == 0) 10cd2f: 83 c4 10 add $0x10,%esp 10cd32: 85 c0 test %eax,%eax 10cd34: 0f 84 1a 01 00 00 je 10ce54 <_Heap_Allocate_aligned+0x150><== NEVER TAKEN return NULL; if(alignment == 0) 10cd3a: 8b 45 10 mov 0x10(%ebp),%eax 10cd3d: 85 c0 test %eax,%eax 10cd3f: 0f 84 03 01 00 00 je 10ce48 <_Heap_Allocate_aligned+0x144> ) { return ( the_thread == _Thread_Heir ); } /** 10cd45: 8b 45 08 mov 0x8(%ebp),%eax 10cd48: 8b 48 08 mov 0x8(%eax),%ecx alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 10cd4b: 39 c8 cmp %ecx,%eax 10cd4d: 0f 84 01 01 00 00 je 10ce54 <_Heap_Allocate_aligned+0x150><== NEVER TAKEN 10cd53: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10cd5a: eb 17 jmp 10cd73 <_Heap_Allocate_aligned+0x6f> 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 10cd5c: 89 f2 mov %esi,%edx <== NOT EXECUTED aligned_user_addr = 0; } } } if(aligned_user_addr) { 10cd5e: 85 ff test %edi,%edi 10cd60: 75 7a jne 10cddc <_Heap_Allocate_aligned+0xd8><== ALWAYS TAKEN 10cd62: 66 90 xchg %ax,%ax /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 10cd64: 8b 49 08 mov 0x8(%ecx),%ecx 10cd67: ff 45 f0 incl -0x10(%ebp) alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 10cd6a: 39 4d 08 cmp %ecx,0x8(%ebp) 10cd6d: 0f 84 ed 00 00 00 je 10ce60 <_Heap_Allocate_aligned+0x15c> 10cd73: 8b 59 04 mov 0x4(%ecx),%ebx 10cd76: 83 e3 fe and $0xfffffffe,%ebx uint32_t const block_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)); if(block_size >= the_size) { /* the_block is large enough. */ 10cd79: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10cd7c: 77 e6 ja 10cd64 <_Heap_Allocate_aligned+0x60> _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 10cd7e: 8d 71 08 lea 0x8(%ecx),%esi /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 10cd81: 8d 14 19 lea (%ecx,%ebx,1),%edx 10cd84: 89 55 e8 mov %edx,-0x18(%ebp) aligned_user_addr = block_end - end_to_user_offs; 10cd87: 89 d7 mov %edx,%edi 10cd89: 2b 7d e0 sub -0x20(%ebp),%edi RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; } 10cd8c: 89 f8 mov %edi,%eax 10cd8e: 31 d2 xor %edx,%edx 10cd90: f7 75 10 divl 0x10(%ebp) 10cd93: 29 d7 sub %edx,%edi 10cd95: 89 f8 mov %edi,%eax 10cd97: 31 d2 xor %edx,%edx 10cd99: f7 75 dc divl -0x24(%ebp) 10cd9c: 89 f8 mov %edi,%eax 10cd9e: 29 d0 sub %edx,%eax 10cda0: 89 c2 mov %eax,%edx only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 10cda2: 39 c6 cmp %eax,%esi 10cda4: 77 be ja 10cd64 <_Heap_Allocate_aligned+0x60> /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 10cda6: 8b 45 08 mov 0x8(%ebp),%eax 10cda9: 8b 40 14 mov 0x14(%eax),%eax 10cdac: 89 45 ec mov %eax,-0x14(%ebp) 10cdaf: 89 d0 mov %edx,%eax 10cdb1: 29 f0 sub %esi,%eax 10cdb3: 3b 45 ec cmp -0x14(%ebp),%eax 10cdb6: 73 a6 jae 10cd5e <_Heap_Allocate_aligned+0x5a> 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 10cdb8: 89 f8 mov %edi,%eax 10cdba: 29 f0 sub %esi,%eax 10cdbc: 39 45 dc cmp %eax,-0x24(%ebp) 10cdbf: 77 9b ja 10cd5c <_Heap_Allocate_aligned+0x58><== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); } /** 10cdc1: 89 f0 mov %esi,%eax 10cdc3: 31 d2 xor %edx,%edx 10cdc5: f7 75 10 divl 0x10(%ebp) * This function returns TRUE if dispatching is disabled, and FALSE 10cdc8: 85 d2 test %edx,%edx 10cdca: 75 6c jne 10ce38 <_Heap_Allocate_aligned+0x134> 10cdcc: 89 f0 mov %esi,%eax /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 10cdce: 39 55 dc cmp %edx,-0x24(%ebp) 10cdd1: 76 91 jbe 10cd64 <_Heap_Allocate_aligned+0x60> 10cdd3: 89 f2 mov %esi,%edx 10cdd5: 89 c7 mov %eax,%edi aligned_user_addr = 0; } } } if(aligned_user_addr) { 10cdd7: 85 ff test %edi,%edi 10cdd9: 74 89 je 10cd64 <_Heap_Allocate_aligned+0x60><== NEVER TAKEN 10cddb: 90 nop /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 10cddc: 8b 75 e8 mov -0x18(%ebp),%esi 10cddf: 83 c6 08 add $0x8,%esi 10cde2: 29 d6 sub %edx,%esi Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 10cde4: 89 da mov %ebx,%edx 10cde6: 29 f2 sub %esi,%edx _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 10cde8: 3b 55 ec cmp -0x14(%ebp),%edx 10cdeb: 0f 82 87 00 00 00 jb 10ce78 <_Heap_Allocate_aligned+0x174> /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 10cdf1: 89 d0 mov %edx,%eax 10cdf3: 83 c8 01 or $0x1,%eax 10cdf6: 89 41 04 mov %eax,0x4(%ecx) Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 10cdf9: 8d 04 11 lea (%ecx,%edx,1),%eax /** @brief _Thread_Is_proxy_blocking * * status which indicates that a proxy is blocking, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking ( uint32_t code 10cdfc: 89 c1 mov %eax,%ecx the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 10cdfe: 89 10 mov %edx,(%eax) the_block->size = alloc_size; 10ce00: 89 70 04 mov %esi,0x4(%eax) _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 10ce03: 83 4c 31 04 01 orl $0x1,0x4(%ecx,%esi,1) /* Update statistics */ stats->free_size -= alloc_size; 10ce08: 8b 55 08 mov 0x8(%ebp),%edx 10ce0b: 8b 42 30 mov 0x30(%edx),%eax 10ce0e: 29 f0 sub %esi,%eax 10ce10: 89 42 30 mov %eax,0x30(%edx) if(stats->min_free_size > stats->free_size) 10ce13: 3b 42 34 cmp 0x34(%edx),%eax 10ce16: 73 03 jae 10ce1b <_Heap_Allocate_aligned+0x117> stats->min_free_size = stats->free_size; 10ce18: 89 42 34 mov %eax,0x34(%edx) stats->used_blocks += 1; 10ce1b: 8b 4d 08 mov 0x8(%ebp),%ecx 10ce1e: ff 41 40 incl 0x40(%ecx) _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 10ce21: 8b 41 4c mov 0x4c(%ecx),%eax 10ce24: 8b 55 f0 mov -0x10(%ebp),%edx 10ce27: 8d 44 02 01 lea 0x1(%edx,%eax,1),%eax 10ce2b: 89 41 4c mov %eax,0x4c(%ecx) stats->allocs += 1; 10ce2e: ff 41 48 incl 0x48(%ecx) check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 10ce31: 89 f8 mov %edi,%eax 10ce33: eb 2d jmp 10ce62 <_Heap_Allocate_aligned+0x15e> 10ce35: 8d 76 00 lea 0x0(%esi),%esi { return ( _Thread_Dispatch_disable_level == 0 ); } /** * This function returns TRUE if dispatching is disabled, and FALSE 10ce38: 8b 7d 10 mov 0x10(%ebp),%edi 10ce3b: 8d 04 3e lea (%esi,%edi,1),%eax 10ce3e: 29 d0 sub %edx,%eax 10ce40: 89 c2 mov %eax,%edx 10ce42: 29 f2 sub %esi,%edx 10ce44: eb 88 jmp 10cdce <_Heap_Allocate_aligned+0xca> 10ce46: 66 90 xchg %ax,%ax _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); if(the_size == 0) return NULL; if(alignment == 0) 10ce48: c7 45 10 04 00 00 00 movl $0x4,0x10(%ebp) 10ce4f: e9 f1 fe ff ff jmp 10cd45 <_Heap_Allocate_aligned+0x41> } } } if(stats->max_search < search_count) stats->max_search = search_count; 10ce54: 31 c0 xor %eax,%eax return user_ptr; } 10ce56: 8d 65 f4 lea -0xc(%ebp),%esp 10ce59: 5b pop %ebx 10ce5a: 5e pop %esi 10ce5b: 5f pop %edi 10ce5c: c9 leave 10ce5d: c3 ret 10ce5e: 66 90 xchg %ax,%ax alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 10ce60: 31 c0 xor %eax,%eax } } } } if(stats->max_search < search_count) 10ce62: 8b 4d f0 mov -0x10(%ebp),%ecx 10ce65: 8b 7d 08 mov 0x8(%ebp),%edi 10ce68: 39 4f 44 cmp %ecx,0x44(%edi) 10ce6b: 73 e9 jae 10ce56 <_Heap_Allocate_aligned+0x152> stats->max_search = search_count; 10ce6d: 89 4f 44 mov %ecx,0x44(%edi) return user_ptr; } 10ce70: 8d 65 f4 lea -0xc(%ebp),%esp 10ce73: 5b pop %ebx 10ce74: 5e pop %esi 10ce75: 5f pop %edi 10ce76: c9 leave 10ce77: c3 ret * This routine resets the current context of the calling thread * to that of its initial state. */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { 10ce78: 8b 51 08 mov 0x8(%ecx),%edx #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 10ce7b: 8b 41 0c mov 0xc(%ecx),%eax if ( _Thread_Executing->fp_context != NULL ) 10ce7e: 89 50 08 mov %edx,0x8(%eax) _Context_Restore_fp( &_Thread_Executing->fp_context ); 10ce81: 89 42 0c mov %eax,0xc(%edx) /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 10ce84: 8b 45 08 mov 0x8(%ebp),%eax 10ce87: ff 48 38 decl 0x38(%eax) 10ce8a: 89 de mov %ebx,%esi 10ce8c: e9 72 ff ff ff jmp 10ce03 <_Heap_Allocate_aligned+0xff> =============================================================================== 0010b540 <_Heap_Block_allocate>: uint32_t _Heap_Block_allocate( Heap_Control* the_heap, Heap_Block* the_block, uint32_t alloc_size ) { 10b540: 55 push %ebp 10b541: 89 e5 mov %esp,%ebp 10b543: 57 push %edi 10b544: 56 push %esi 10b545: 53 push %ebx 10b546: 8b 75 0c mov 0xc(%ebp),%esi 10b549: 8b 7d 10 mov 0x10(%ebp),%edi 10b54c: 8b 4e 04 mov 0x4(%esi),%ecx 10b54f: 83 e1 fe and $0xfffffffe,%ecx Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 10b552: 89 cb mov %ecx,%ebx 10b554: 29 fb sub %edi,%ebx _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 10b556: 8b 45 08 mov 0x8(%ebp),%eax 10b559: 3b 58 14 cmp 0x14(%eax),%ebx 10b55c: 72 4a jb 10b5a8 <_Heap_Block_allocate+0x68> 10b55e: 8d 14 3e lea (%esi,%edi,1),%edx * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ 10b561: 8b 4e 08 mov 0x8(%esi),%ecx bool _Protected_heap_Get_block_size( 10b564: 8b 46 0c mov 0xc(%esi),%eax Heap_Control *the_heap, void *starting_address, size_t *size 10b567: 89 4a 08 mov %ecx,0x8(%edx) ); 10b56a: 89 42 0c mov %eax,0xc(%edx) 10b56d: 89 50 08 mov %edx,0x8(%eax) 10b570: 89 51 0c mov %edx,0xc(%ecx) becomes used. This is slightly less optimal than leaving lower part free as it requires replacing block in the free blocks list, but it makes it possible to reuse this code in the _Heap_Resize_block(). */ Heap_Block *next_block = _Heap_Block_at(the_block, alloc_size); _Heap_Block_replace(the_block, next_block); the_block->size = alloc_size | HEAP_PREV_USED; 10b573: 89 f8 mov %edi,%eax 10b575: 83 c8 01 or $0x1,%eax 10b578: 89 46 04 mov %eax,0x4(%esi) next_block->size = the_rest | HEAP_PREV_USED; 10b57b: 89 d8 mov %ebx,%eax 10b57d: 83 c8 01 or $0x1,%eax 10b580: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_at(next_block, the_rest)->prev_size = the_rest; 10b583: 89 1c 1a mov %ebx,(%edx,%ebx,1) alloc_size = block_size; _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; stats->free_blocks -= 1; } /* Update statistics */ stats->free_size -= alloc_size; 10b586: 8b 55 08 mov 0x8(%ebp),%edx 10b589: 8b 42 30 mov 0x30(%edx),%eax 10b58c: 29 f8 sub %edi,%eax 10b58e: 89 42 30 mov %eax,0x30(%edx) if(stats->min_free_size > stats->free_size) 10b591: 3b 42 34 cmp 0x34(%edx),%eax 10b594: 73 03 jae 10b599 <_Heap_Block_allocate+0x59> stats->min_free_size = stats->free_size; 10b596: 89 42 34 mov %eax,0x34(%edx) stats->used_blocks += 1; 10b599: 8b 45 08 mov 0x8(%ebp),%eax 10b59c: ff 40 40 incl 0x40(%eax) return alloc_size; } 10b59f: 89 f8 mov %edi,%eax 10b5a1: 5b pop %ebx 10b5a2: 5e pop %esi 10b5a3: 5f pop %edi 10b5a4: c9 leave 10b5a5: c3 ret 10b5a6: 66 90 xchg %ax,%ax * Any other value of @a alignment is taken "as is", i.e., even odd * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon 10b5a8: 8b 56 08 mov 0x8(%esi),%edx * @param[in] size is the amount of memory to allocate in bytes 10b5ab: 8b 46 0c mov 0xc(%esi),%eax * @param[in] alignment the required alignment 10b5ae: 89 50 08 mov %edx,0x8(%eax) * @return NULL if unsuccessful and a pointer to the block if successful 10b5b1: 89 42 0c mov %eax,0xc(%edx) /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 10b5b4: 83 4c 0e 04 01 orl $0x1,0x4(%esi,%ecx,1) stats->free_blocks -= 1; 10b5b9: 8b 55 08 mov 0x8(%ebp),%edx 10b5bc: ff 4a 38 decl 0x38(%edx) 10b5bf: 89 cf mov %ecx,%edi 10b5c1: eb c3 jmp 10b586 <_Heap_Block_allocate+0x46> =============================================================================== 0010b50c <_Heap_Calc_block_size>: */ size_t _Heap_Calc_block_size( size_t size, uint32_t page_size, uint32_t min_size) { 10b50c: 55 push %ebp 10b50d: 89 e5 mov %esp,%ebp 10b50f: 53 push %ebx 10b510: 83 ec 04 sub $0x4,%esp 10b513: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t block_size = size + HEAP_BLOCK_USED_OVERHEAD; 10b516: 8d 59 04 lea 0x4(%ecx),%ebx * sizes. * * @param[in] the_heap pointer to heap header * @param[in] the_info pointer to a status information area * * @return true if successfully able to return information 10b519: 89 d8 mov %ebx,%eax 10b51b: 31 d2 xor %edx,%edx 10b51d: f7 75 0c divl 0xc(%ebp) */ 10b520: 85 d2 test %edx,%edx 10b522: 74 05 je 10b529 <_Heap_Calc_block_size+0x1d> 10b524: 03 5d 0c add 0xc(%ebp),%ebx 10b527: 29 d3 sub %edx,%ebx 10b529: 89 d8 mov %ebx,%eax 10b52b: 3b 5d 10 cmp 0x10(%ebp),%ebx 10b52e: 73 03 jae 10b533 <_Heap_Calc_block_size+0x27> 10b530: 8b 45 10 mov 0x10(%ebp),%eax _Heap_Align_up(&block_size, page_size); if (block_size < min_size) block_size = min_size; /* 'block_size' becomes <= 'size' if and only if overflow occured. */ return (block_size > size) ? block_size : 0; 10b533: 39 c1 cmp %eax,%ecx 10b535: 72 02 jb 10b539 <_Heap_Calc_block_size+0x2d><== ALWAYS TAKEN 10b537: 31 c0 xor %eax,%eax } 10b539: 5a pop %edx 10b53a: 5b pop %ebx 10b53b: c9 leave 10b53c: c3 ret =============================================================================== 00111b70 <_Heap_Extend>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t *amount_extended ) { 111b70: 55 push %ebp 111b71: 89 e5 mov %esp,%ebp 111b73: 56 push %esi 111b74: 53 push %ebx 111b75: 83 ec 10 sub $0x10,%esp 111b78: 8b 4d 08 mov 0x8(%ebp),%ecx 111b7b: 8b 45 0c mov 0xc(%ebp),%eax * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( starting_address >= the_heap->begin && /* case 3 */ 111b7e: 39 41 18 cmp %eax,0x18(%ecx) 111b81: 76 15 jbe 111b98 <_Heap_Extend+0x28> 111b83: 8b 51 1c mov 0x1c(%ecx),%edx starting_address < the_heap->end ) return HEAP_EXTEND_ERROR; if ( starting_address != the_heap->end ) 111b86: 39 d0 cmp %edx,%eax 111b88: 74 22 je 111bac <_Heap_Extend+0x3c> 111b8a: b8 02 00 00 00 mov $0x2,%eax stats->frees -= 1; /* Don't count subsequent call as actual free() */ _Heap_Free( the_heap, _Heap_User_area( old_final ) ); return HEAP_EXTEND_SUCCESSFUL; } 111b8f: 8d 65 f8 lea -0x8(%ebp),%esp 111b92: 5b pop %ebx 111b93: 5e pop %esi 111b94: c9 leave 111b95: c3 ret 111b96: 66 90 xchg %ax,%ax * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( starting_address >= the_heap->begin && /* case 3 */ 111b98: 8b 51 1c mov 0x1c(%ecx),%edx 111b9b: 39 d0 cmp %edx,%eax 111b9d: 73 e7 jae 111b86 <_Heap_Extend+0x16> 111b9f: b8 01 00 00 00 mov $0x1,%eax stats->frees -= 1; /* Don't count subsequent call as actual free() */ _Heap_Free( the_heap, _Heap_User_area( old_final ) ); return HEAP_EXTEND_SUCCESSFUL; } 111ba4: 8d 65 f8 lea -0x8(%ebp),%esp 111ba7: 5b pop %ebx 111ba8: 5e pop %esi 111ba9: c9 leave 111baa: c3 ret 111bab: 90 nop * 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. */ old_final = the_heap->final; 111bac: 8b 59 24 mov 0x24(%ecx),%ebx Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 111baf: 03 45 10 add 0x10(%ebp),%eax the_heap->end = _Addresses_Add_offset( the_heap->end, size ); 111bb2: 89 41 1c mov %eax,0x1c(%ecx) the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD; 111bb5: 29 d8 sub %ebx,%eax 111bb7: 8d 70 f8 lea -0x8(%eax),%esi * the outer most dispatching critical section, then a dispatching * operation will be performed and, if necessary, control of the * processor will be transferred to the heir thread. */ #if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \ 111bba: 89 f0 mov %esi,%eax 111bbc: 31 d2 xor %edx,%edx 111bbe: f7 71 10 divl 0x10(%ecx) 111bc1: 29 d6 sub %edx,%esi 111bc3: 89 f2 mov %esi,%edx _Heap_Align_down( &the_size, the_heap->page_size ); *amount_extended = size; 111bc5: 8b 45 10 mov 0x10(%ebp),%eax 111bc8: 8b 75 14 mov 0x14(%ebp),%esi 111bcb: 89 06 mov %eax,(%esi) if( the_size < the_heap->min_block_size ) 111bcd: 39 51 14 cmp %edx,0x14(%ecx) 111bd0: 76 06 jbe 111bd8 <_Heap_Extend+0x68> <== ALWAYS TAKEN 111bd2: 31 c0 xor %eax,%eax 111bd4: eb b9 jmp 111b8f <_Heap_Extend+0x1f> <== NOT EXECUTED 111bd6: 66 90 xchg %ax,%ax <== NOT EXECUTED return HEAP_EXTEND_SUCCESSFUL; old_final->size = the_size | (old_final->size & HEAP_PREV_USED); 111bd8: 8b 43 04 mov 0x4(%ebx),%eax 111bdb: 83 e0 01 and $0x1,%eax 111bde: 09 d0 or %edx,%eax 111be0: 89 43 04 mov %eax,0x4(%ebx) /** @brief _Thread_Is_proxy_blocking * * status which indicates that a proxy is blocking, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking ( uint32_t code 111be3: 8d 04 13 lea (%ebx,%edx,1),%eax new_final = _Heap_Block_at( old_final, the_size ); new_final->size = HEAP_PREV_USED; 111be6: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_heap->final = new_final; 111bed: 89 41 24 mov %eax,0x24(%ecx) stats->size += size; 111bf0: 8b 55 10 mov 0x10(%ebp),%edx 111bf3: 01 51 2c add %edx,0x2c(%ecx) stats->used_blocks += 1; 111bf6: ff 41 40 incl 0x40(%ecx) stats->frees -= 1; /* Don't count subsequent call as actual free() */ 111bf9: ff 49 50 decl 0x50(%ecx) _Heap_Free( the_heap, _Heap_User_area( old_final ) ); 111bfc: 83 ec 08 sub $0x8,%esp 111bff: 8d 43 08 lea 0x8(%ebx),%eax 111c02: 50 push %eax 111c03: 51 push %ecx 111c04: e8 1f b3 ff ff call 10cf28 <_Heap_Free> 111c09: 31 c0 xor %eax,%eax 111c0b: 83 c4 10 add $0x10,%esp 111c0e: e9 7c ff ff ff jmp 111b8f <_Heap_Extend+0x1f> =============================================================================== 0010fa6c <_Heap_Free>: bool _Heap_Free( Heap_Control *the_heap, void *starting_address ) { 10fa6c: 55 push %ebp 10fa6d: 89 e5 mov %esp,%ebp 10fa6f: 57 push %edi 10fa70: 56 push %esi 10fa71: 53 push %ebx 10fa72: 83 ec 18 sub $0x18,%esp 10fa75: 8b 7d 08 mov 0x8(%ebp),%edi 10fa78: 8b 45 0c mov 0xc(%ebp),%eax uint32_t the_size; uint32_t next_size; Heap_Statistics *const stats = &the_heap->stats; bool next_is_free; if ( !_Addresses_Is_in_range( 10fa7b: 8b 77 24 mov 0x24(%edi),%esi 10fa7e: 8b 4f 20 mov 0x20(%edi),%ecx Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10fa81: 39 c1 cmp %eax,%ecx 10fa83: 77 04 ja 10fa89 <_Heap_Free+0x1d> 10fa85: 39 c6 cmp %eax,%esi 10fa87: 73 0b jae 10fa94 <_Heap_Free+0x28> <== ALWAYS TAKEN stats->used_blocks -= 1; stats->free_size += the_size; stats->frees += 1; return( TRUE ); 10fa89: 31 c0 xor %eax,%eax } 10fa8b: 83 c4 18 add $0x18,%esp 10fa8e: 5b pop %ebx 10fa8f: 5e pop %esi 10fa90: 5f pop %edi 10fa91: c9 leave 10fa92: c3 ret 10fa93: 90 nop 10fa94: 8d 58 f8 lea -0x8(%eax),%ebx 10fa97: 31 d2 xor %edx,%edx 10fa99: f7 77 10 divl 0x10(%edi) 10fa9c: 29 d3 sub %edx,%ebx Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10fa9e: 39 d9 cmp %ebx,%ecx 10faa0: 77 e7 ja 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN 10faa2: 39 de cmp %ebx,%esi 10faa4: 72 e3 jb 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN 10faa6: 8b 43 04 mov 0x4(%ebx),%eax 10faa9: 89 45 dc mov %eax,-0x24(%ebp) 10faac: 83 e0 fe and $0xfffffffe,%eax 10faaf: 89 45 e8 mov %eax,-0x18(%ebp) 10fab2: 01 d8 add %ebx,%eax 10fab4: 89 45 e4 mov %eax,-0x1c(%ebp) Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10fab7: 39 c1 cmp %eax,%ecx 10fab9: 77 ce ja 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN 10fabb: 39 c6 cmp %eax,%esi 10fabd: 72 ca jb 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN 10fabf: 8b 50 04 mov 0x4(%eax),%edx 10fac2: 89 55 e0 mov %edx,-0x20(%ebp) if ( !_Heap_Is_block_in( the_heap, next_block ) ) { _HAssert( FALSE ); return( FALSE ); } if ( !_Heap_Is_prev_used( next_block ) ) { 10fac5: f6 c2 01 test $0x1,%dl 10fac8: 74 bf je 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN 10faca: 83 e2 fe and $0xfffffffe,%edx 10facd: 89 55 ec mov %edx,-0x14(%ebp) _HAssert( FALSE ); return( FALSE ); } next_size = _Heap_Block_size( next_block ); next_is_free = next_block < the_heap->final && 10fad0: 39 c6 cmp %eax,%esi 10fad2: 76 74 jbe 10fb48 <_Heap_Free+0xdc> 10fad4: 8b 55 e4 mov -0x1c(%ebp),%edx 10fad7: 8b 45 ec mov -0x14(%ebp),%eax 10fada: 8b 44 02 04 mov 0x4(%edx,%eax,1),%eax 10fade: 83 f0 01 xor $0x1,%eax 10fae1: 89 45 e0 mov %eax,-0x20(%ebp) 10fae4: 8a 45 e0 mov -0x20(%ebp),%al 10fae7: 83 e0 01 and $0x1,%eax !_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size)); if ( !_Heap_Is_prev_used( the_block ) ) { 10faea: f6 45 dc 01 testb $0x1,-0x24(%ebp) 10faee: 75 5c jne 10fb4c <_Heap_Free+0xe0> uint32_t const prev_size = the_block->prev_size; 10faf0: 8b 13 mov (%ebx),%edx 10faf2: 89 55 f0 mov %edx,-0x10(%ebp) 10faf5: 29 d3 sub %edx,%ebx Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10faf7: 39 d9 cmp %ebx,%ecx 10faf9: 77 8e ja 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN 10fafb: 39 de cmp %ebx,%esi 10fafd: 72 8a jb 10fa89 <_Heap_Free+0x1d> <== NEVER 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) ) { 10faff: f6 43 04 01 testb $0x1,0x4(%ebx) 10fb03: 74 84 je 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN _HAssert( FALSE ); return( FALSE ); } if ( next_is_free ) { /* coalesce both */ 10fb05: 84 c0 test %al,%al 10fb07: 0f 84 a0 00 00 00 je 10fbad <_Heap_Free+0x141> uint32_t const size = the_size + prev_size + next_size; 10fb0d: 8b 55 e8 mov -0x18(%ebp),%edx 10fb10: 03 55 ec add -0x14(%ebp),%edx 10fb13: 03 55 f0 add -0x10(%ebp),%edx * Any other value of @a alignment is taken "as is", i.e., even odd * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon 10fb16: 8b 75 e4 mov -0x1c(%ebp),%esi 10fb19: 8b 4e 08 mov 0x8(%esi),%ecx * @param[in] size is the amount of memory to allocate in bytes 10fb1c: 8b 46 0c mov 0xc(%esi),%eax * @param[in] alignment the required alignment 10fb1f: 89 48 08 mov %ecx,0x8(%eax) * @return NULL if unsuccessful and a pointer to the block if successful 10fb22: 89 41 0c mov %eax,0xc(%ecx) _Heap_Block_remove( next_block ); stats->free_blocks -= 1; 10fb25: ff 4f 38 decl 0x38(%edi) prev_block->size = size | HEAP_PREV_USED; 10fb28: 89 d0 mov %edx,%eax 10fb2a: 83 c8 01 or $0x1,%eax 10fb2d: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 10fb30: 89 14 13 mov %edx,(%ebx,%edx,1) 10fb33: 90 nop stats->free_blocks += 1; if ( stats->max_free_blocks < stats->free_blocks ) stats->max_free_blocks = stats->free_blocks; } stats->used_blocks -= 1; 10fb34: ff 4f 40 decl 0x40(%edi) stats->free_size += the_size; 10fb37: 8b 75 e8 mov -0x18(%ebp),%esi 10fb3a: 01 77 30 add %esi,0x30(%edi) stats->frees += 1; 10fb3d: ff 47 50 incl 0x50(%edi) 10fb40: b0 01 mov $0x1,%al 10fb42: e9 44 ff ff ff jmp 10fa8b <_Heap_Free+0x1f> 10fb47: 90 nop _HAssert( FALSE ); return( FALSE ); } next_size = _Heap_Block_size( next_block ); next_is_free = next_block < the_heap->final && 10fb48: 31 c0 xor %eax,%eax 10fb4a: eb 9e jmp 10faea <_Heap_Free+0x7e> prev_block->size = size | HEAP_PREV_USED; next_block->size &= ~HEAP_PREV_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 10fb4c: 84 c0 test %al,%al 10fb4e: 74 28 je 10fb78 <_Heap_Free+0x10c> uint32_t const size = the_size + next_size; 10fb50: 8b 55 ec mov -0x14(%ebp),%edx 10fb53: 03 55 e8 add -0x18(%ebp),%edx * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ 10fb56: 8b 75 e4 mov -0x1c(%ebp),%esi 10fb59: 8b 4e 08 mov 0x8(%esi),%ecx bool _Protected_heap_Get_block_size( 10fb5c: 8b 46 0c mov 0xc(%esi),%eax Heap_Control *the_heap, void *starting_address, size_t *size 10fb5f: 89 4b 08 mov %ecx,0x8(%ebx) ); 10fb62: 89 43 0c mov %eax,0xc(%ebx) 10fb65: 89 58 08 mov %ebx,0x8(%eax) 10fb68: 89 59 0c mov %ebx,0xc(%ecx) _Heap_Block_replace( next_block, the_block ); the_block->size = size | HEAP_PREV_USED; 10fb6b: 89 d0 mov %edx,%eax 10fb6d: 83 c8 01 or $0x1,%eax 10fb70: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( the_block, size ); next_block->prev_size = size; 10fb73: 89 14 13 mov %edx,(%ebx,%edx,1) 10fb76: eb bc jmp 10fb34 <_Heap_Free+0xc8> bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, size_t size ); 10fb78: 8b 47 08 mov 0x8(%edi),%eax /** 10fb7b: 89 43 08 mov %eax,0x8(%ebx) * This routine returns the block of memory which begins 10fb7e: 89 7b 0c mov %edi,0xc(%ebx) * at @a starting_address to @a the_heap. Any coalescing which is 10fb81: 89 5f 08 mov %ebx,0x8(%edi) 10fb84: 89 58 0c mov %ebx,0xc(%eax) } else { /* no coalesce */ /* Add 'the_block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Block_insert_after( _Heap_Head( the_heap), the_block ); the_block->size = the_size | HEAP_PREV_USED; 10fb87: 8b 45 e8 mov -0x18(%ebp),%eax 10fb8a: 83 c8 01 or $0x1,%eax 10fb8d: 89 43 04 mov %eax,0x4(%ebx) next_block->size &= ~HEAP_PREV_USED; 10fb90: 8b 45 e4 mov -0x1c(%ebp),%eax 10fb93: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = the_size; 10fb97: 8b 55 e8 mov -0x18(%ebp),%edx 10fb9a: 89 10 mov %edx,(%eax) stats->free_blocks += 1; 10fb9c: 8b 47 38 mov 0x38(%edi),%eax 10fb9f: 40 inc %eax 10fba0: 89 47 38 mov %eax,0x38(%edi) if ( stats->max_free_blocks < stats->free_blocks ) 10fba3: 3b 47 3c cmp 0x3c(%edi),%eax 10fba6: 76 8c jbe 10fb34 <_Heap_Free+0xc8> stats->max_free_blocks = stats->free_blocks; 10fba8: 89 47 3c mov %eax,0x3c(%edi) 10fbab: eb 87 jmp 10fb34 <_Heap_Free+0xc8> next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uint32_t const size = the_size + prev_size; 10fbad: 8b 55 e8 mov -0x18(%ebp),%edx 10fbb0: 03 55 f0 add -0x10(%ebp),%edx prev_block->size = size | HEAP_PREV_USED; 10fbb3: 89 d0 mov %edx,%eax 10fbb5: 83 c8 01 or $0x1,%eax 10fbb8: 89 43 04 mov %eax,0x4(%ebx) next_block->size &= ~HEAP_PREV_USED; 10fbbb: 8b 45 e4 mov -0x1c(%ebp),%eax 10fbbe: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10fbc2: 89 10 mov %edx,(%eax) 10fbc4: e9 6b ff ff ff jmp 10fb34 <_Heap_Free+0xc8> =============================================================================== 00111c14 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 111c14: 55 push %ebp 111c15: 89 e5 mov %esp,%ebp 111c17: 53 push %ebx 111c18: 8b 5d 08 mov 0x8(%ebp),%ebx 111c1b: 8b 4d 0c mov 0xc(%ebp),%ecx Heap_Block *the_block; Heap_Block *const tail = _Heap_Tail(the_heap); info->number = 0; 111c1e: c7 01 00 00 00 00 movl $0x0,(%ecx) info->largest = 0; 111c24: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) info->total = 0; 111c2b: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) ) { return ( the_thread == _Thread_Heir ); } /** 111c32: 8b 53 08 mov 0x8(%ebx),%edx for(the_block = _Heap_First(the_heap); the_block != tail; 111c35: 39 d3 cmp %edx,%ebx 111c37: 74 1d je 111c56 <_Heap_Get_free_information+0x42><== NEVER TAKEN 111c39: 8d 76 00 lea 0x0(%esi),%esi 111c3c: 8b 42 04 mov 0x4(%edx),%eax 111c3f: 83 e0 fe and $0xfffffffe,%eax 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++; 111c42: ff 01 incl (%ecx) info->total += the_size; 111c44: 01 41 08 add %eax,0x8(%ecx) if ( info->largest < the_size ) 111c47: 39 41 04 cmp %eax,0x4(%ecx) 111c4a: 73 03 jae 111c4f <_Heap_Get_free_information+0x3b><== NEVER TAKEN info->largest = the_size; 111c4c: 89 41 04 mov %eax,0x4(%ecx) info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; the_block = the_block->next) 111c4f: 8b 52 08 mov 0x8(%edx),%edx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; 111c52: 39 d3 cmp %edx,%ebx 111c54: 75 e6 jne 111c3c <_Heap_Get_free_information+0x28> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 111c56: 5b pop %ebx 111c57: c9 leave 111c58: c3 ret =============================================================================== 00111c5c <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 111c5c: 55 push %ebp 111c5d: 89 e5 mov %esp,%ebp 111c5f: 56 push %esi 111c60: 53 push %ebx 111c61: 8b 45 08 mov 0x8(%ebp),%eax 111c64: 8b 4d 0c mov 0xc(%ebp),%ecx Heap_Block *the_block = the_heap->start; 111c67: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->final; 111c6a: 8b 70 24 mov 0x24(%eax),%esi _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 111c6d: c7 01 00 00 00 00 movl $0x0,(%ecx) the_info->Free.total = 0; 111c73: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) the_info->Free.largest = 0; 111c7a: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_info->Used.number = 0; 111c81: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx) the_info->Used.total = 0; 111c88: c7 41 14 00 00 00 00 movl $0x0,0x14(%ecx) the_info->Used.largest = 0; 111c8f: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx) while ( the_block != end ) { 111c96: 39 f2 cmp %esi,%edx 111c98: 74 42 je 111cdc <_Heap_Get_information+0x80><== NEVER TAKEN 111c9a: 8b 5a 04 mov 0x4(%edx),%ebx 111c9d: eb 13 jmp 111cb2 <_Heap_Get_information+0x56> 111c9f: 90 nop uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 111ca0: ff 41 0c incl 0xc(%ecx) the_info->Used.total += the_size; 111ca3: 01 41 14 add %eax,0x14(%ecx) if ( the_info->Used.largest < the_size ) 111ca6: 39 41 10 cmp %eax,0x10(%ecx) 111ca9: 73 03 jae 111cae <_Heap_Get_information+0x52> the_info->Used.largest = the_size; 111cab: 89 41 10 mov %eax,0x10(%ecx) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 111cae: 39 d6 cmp %edx,%esi 111cb0: 74 2a je 111cdc <_Heap_Get_information+0x80> 111cb2: 89 d8 mov %ebx,%eax 111cb4: 83 e0 fe and $0xfffffffe,%eax /** @brief _Thread_Is_proxy_blocking * * status which indicates that a proxy is blocking, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking ( uint32_t code 111cb7: 01 c2 add %eax,%edx 111cb9: 8b 5a 04 mov 0x4(%edx),%ebx uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 111cbc: f6 c3 01 test $0x1,%bl 111cbf: 75 df jne 111ca0 <_Heap_Get_information+0x44> the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 111cc1: ff 01 incl (%ecx) the_info->Free.total += the_size; 111cc3: 01 41 08 add %eax,0x8(%ecx) if ( the_info->Free.largest < the_size ) 111cc6: 39 41 04 cmp %eax,0x4(%ecx) 111cc9: 73 03 jae 111cce <_Heap_Get_information+0x72><== NEVER TAKEN the_info->Free.largest = the_size; 111ccb: 89 41 04 mov %eax,0x4(%ecx) if ( the_size != next_block->prev_size ) 111cce: 39 02 cmp %eax,(%edx) 111cd0: 74 dc je 111cae <_Heap_Get_information+0x52><== ALWAYS TAKEN 111cd2: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; return HEAP_GET_INFORMATION_SUCCESSFUL; } 111cd7: 5b pop %ebx <== NOT EXECUTED 111cd8: 5e pop %esi <== NOT EXECUTED 111cd9: c9 leave <== NOT EXECUTED 111cda: c3 ret <== NOT EXECUTED 111cdb: 90 nop <== NOT EXECUTED } /* 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_OVERHEAD; 111cdc: 83 41 14 08 addl $0x8,0x14(%ecx) 111ce0: 31 c0 xor %eax,%eax return HEAP_GET_INFORMATION_SUCCESSFUL; } 111ce2: 5b pop %ebx 111ce3: 5e pop %esi 111ce4: c9 leave 111ce5: c3 ret =============================================================================== 0010b3dc <_Heap_Initialize>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 10b3dc: 55 push %ebp 10b3dd: 89 e5 mov %esp,%ebp 10b3df: 57 push %edi 10b3e0: 56 push %esi 10b3e1: 53 push %ebx 10b3e2: 83 ec 08 sub $0x8,%esp 10b3e5: 8b 7d 08 mov 0x8(%ebp),%edi 10b3e8: 8b 4d 14 mov 0x14(%ebp),%ecx _H_uptr_t start; _H_uptr_t aligned_start; uint32_t overhead; Heap_Statistics *const stats = &the_heap->stats; if (page_size == 0) 10b3eb: 85 c9 test %ecx,%ecx 10b3ed: 0f 85 fd 00 00 00 jne 10b4f0 <_Heap_Initialize+0x114> 10b3f3: b1 04 mov $0x4,%cl 10b3f5: 31 f6 xor %esi,%esi /* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET (value of user pointer) is aligned on 'page_size' boundary. Make sure resulting 'aligned_start' is not below 'starting_address'. */ start = _H_p2u(starting_address); aligned_start = start + HEAP_BLOCK_USER_OFFSET; 10b3f7: 8b 5d 0c mov 0xc(%ebp),%ebx 10b3fa: 83 c3 08 add $0x8,%ebx 10b3fd: 89 d8 mov %ebx,%eax 10b3ff: 31 d2 xor %edx,%edx 10b401: f7 f1 div %ecx 10b403: 85 d2 test %edx,%edx 10b405: 74 05 je 10b40c <_Heap_Initialize+0x30> 10b407: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 10b40a: 29 d3 sub %edx,%ebx _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; 10b40c: 83 eb 08 sub $0x8,%ebx * * @param[in] the_heap pointer to heap header * @param[in] the_info pointer to a status information area * * @return true if successfully able to return information */ 10b40f: 85 f6 test %esi,%esi 10b411: 0f 85 cd 00 00 00 jne 10b4e4 <_Heap_Initialize+0x108> 10b417: b8 10 00 00 00 mov $0x10,%eax 10b41c: 89 47 14 mov %eax,0x14(%edi) /* Calculate 'the_size' -- size of the first block so that there is enough space at the end for the permanent last block. It is equal to 'size' minus total overhead aligned down to the nearest multiple of 'page_size'. */ overhead = HEAP_OVERHEAD + (aligned_start - start); 10b41f: 89 d8 mov %ebx,%eax 10b421: 2b 45 0c sub 0xc(%ebp),%eax 10b424: 83 c0 08 add $0x8,%eax if ( size < overhead ) 10b427: 3b 45 10 cmp 0x10(%ebp),%eax 10b42a: 0f 87 a8 00 00 00 ja 10b4d8 <_Heap_Initialize+0xfc> return 0; /* Too small area for the heap */ the_size = size - overhead; 10b430: 8b 75 10 mov 0x10(%ebp),%esi 10b433: 29 c6 sub %eax,%esi * * @return free block information filled in. */ bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info 10b435: 89 f0 mov %esi,%eax 10b437: 31 d2 xor %edx,%edx 10b439: f7 f1 div %ecx _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) 10b43b: 29 d6 sub %edx,%esi 10b43d: 0f 84 95 00 00 00 je 10b4d8 <_Heap_Initialize+0xfc> <== NEVER TAKEN return 0; /* Too small area for the heap */ the_heap->page_size = page_size; 10b443: 89 4f 10 mov %ecx,0x10(%edi) the_heap->begin = starting_address; 10b446: 8b 45 0c mov 0xc(%ebp),%eax 10b449: 89 47 18 mov %eax,0x18(%edi) the_heap->end = starting_address + size; 10b44c: 8b 45 0c mov 0xc(%ebp),%eax 10b44f: 03 45 10 add 0x10(%ebp),%eax 10b452: 89 47 1c mov %eax,0x1c(%edi) the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; 10b455: 89 0b mov %ecx,(%ebx) the_block->size = the_size | HEAP_PREV_USED; 10b457: 89 f0 mov %esi,%eax 10b459: 83 c8 01 or $0x1,%eax 10b45c: 89 43 04 mov %eax,0x4(%ebx) the_block->next = _Heap_Tail( the_heap ); 10b45f: 89 7b 08 mov %edi,0x8(%ebx) the_block->prev = _Heap_Head( the_heap ); 10b462: 89 7b 0c mov %edi,0xc(%ebx) _Heap_Head(the_heap)->next = the_block; 10b465: 89 5f 08 mov %ebx,0x8(%edi) _Heap_Tail(the_heap)->prev = the_block; 10b468: 89 5f 0c mov %ebx,0xc(%edi) the_heap->start = the_block; 10b46b: 89 5f 20 mov %ebx,0x20(%edi) * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 10b46e: 8d 04 33 lea (%ebx,%esi,1),%eax _HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT)); _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ 10b471: 89 47 24 mov %eax,0x24(%edi) the_block->prev_size = the_size; /* Previous block is free */ 10b474: 89 30 mov %esi,(%eax) the_block->size = page_size; 10b476: 89 48 04 mov %ecx,0x4(%eax) stats->size = size; 10b479: 8b 45 10 mov 0x10(%ebp),%eax 10b47c: 89 47 2c mov %eax,0x2c(%edi) stats->free_size = the_size; 10b47f: 89 77 30 mov %esi,0x30(%edi) stats->min_free_size = the_size; 10b482: 89 77 34 mov %esi,0x34(%edi) stats->free_blocks = 1; 10b485: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) stats->max_free_blocks = 1; 10b48c: c7 47 3c 01 00 00 00 movl $0x1,0x3c(%edi) stats->used_blocks = 0; 10b493: c7 47 40 00 00 00 00 movl $0x0,0x40(%edi) stats->max_search = 0; 10b49a: c7 47 44 00 00 00 00 movl $0x0,0x44(%edi) stats->allocs = 0; 10b4a1: c7 47 48 00 00 00 00 movl $0x0,0x48(%edi) stats->searches = 0; 10b4a8: c7 47 4c 00 00 00 00 movl $0x0,0x4c(%edi) stats->frees = 0; 10b4af: c7 47 50 00 00 00 00 movl $0x0,0x50(%edi) stats->resizes = 0; 10b4b6: c7 47 54 00 00 00 00 movl $0x0,0x54(%edi) stats->instance = instance++; 10b4bd: a1 60 f6 11 00 mov 0x11f660,%eax 10b4c2: 89 47 28 mov %eax,0x28(%edi) 10b4c5: 40 inc %eax 10b4c6: a3 60 f6 11 00 mov %eax,0x11f660 return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 10b4cb: 8d 46 fc lea -0x4(%esi),%eax } 10b4ce: 83 c4 08 add $0x8,%esp 10b4d1: 5b pop %ebx 10b4d2: 5e pop %esi 10b4d3: 5f pop %edi 10b4d4: c9 leave 10b4d5: c3 ret 10b4d6: 66 90 xchg %ax,%ax stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 10b4d8: 31 c0 xor %eax,%eax } 10b4da: 83 c4 08 add $0x8,%esp 10b4dd: 5b pop %ebx 10b4de: 5e pop %esi 10b4df: 5f pop %edi 10b4e0: c9 leave 10b4e1: c3 ret 10b4e2: 66 90 xchg %ax,%ax * * @param[in] the_heap pointer to heap header * @param[in] the_info pointer to a status information area * * @return true if successfully able to return information */ 10b4e4: 8d 41 10 lea 0x10(%ecx),%eax 10b4e7: 29 f0 sub %esi,%eax 10b4e9: e9 2e ff ff ff jmp 10b41c <_Heap_Initialize+0x40> 10b4ee: 66 90 xchg %ax,%ax 10b4f0: 89 c8 mov %ecx,%eax 10b4f2: 83 e0 03 and $0x3,%eax 10b4f5: 74 05 je 10b4fc <_Heap_Initialize+0x120> 10b4f7: 83 c1 04 add $0x4,%ecx 10b4fa: 29 c1 sub %eax,%ecx 10b4fc: b8 10 00 00 00 mov $0x10,%eax 10b501: 31 d2 xor %edx,%edx 10b503: f7 f1 div %ecx 10b505: 89 d6 mov %edx,%esi 10b507: e9 eb fe ff ff jmp 10b3f7 <_Heap_Initialize+0x1b> =============================================================================== 001175c8 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 1175c8: 55 push %ebp 1175c9: 89 e5 mov %esp,%ebp 1175cb: 57 push %edi 1175cc: 56 push %esi 1175cd: 53 push %ebx 1175ce: 83 ec 3c sub $0x3c,%esp 1175d1: 8b 75 08 mov 0x8(%ebp),%esi 1175d4: 8b 4d 0c mov 0xc(%ebp),%ecx Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 1175d7: 8b 46 14 mov 0x14(%esi),%eax 1175da: 89 45 e0 mov %eax,-0x20(%ebp) uint32_t const page_size = the_heap->page_size; 1175dd: 8b 56 10 mov 0x10(%esi),%edx 1175e0: 89 55 e4 mov %edx,-0x1c(%ebp) *old_mem_size = 0; 1175e3: 8b 7d 14 mov 0x14(%ebp),%edi 1175e6: c7 07 00 00 00 00 movl $0x0,(%edi) *avail_mem_size = 0; 1175ec: 8b 45 18 mov 0x18(%ebp),%eax 1175ef: c7 00 00 00 00 00 movl $0x0,(%eax) 1175f5: 8d 59 f8 lea -0x8(%ecx),%ebx 1175f8: 89 c8 mov %ecx,%eax 1175fa: 31 d2 xor %edx,%edx 1175fc: f7 76 10 divl 0x10(%esi) 1175ff: 29 d3 sub %edx,%ebx 117601: 8b 56 24 mov 0x24(%esi),%edx 117604: 8b 46 20 mov 0x20(%esi),%eax /* end of include file */ 117607: 39 c3 cmp %eax,%ebx 117609: 72 04 jb 11760f <_Heap_Resize_block+0x47><== NEVER TAKEN 11760b: 39 d3 cmp %edx,%ebx 11760d: 76 0d jbe 11761c <_Heap_Resize_block+0x54> } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 11760f: b8 02 00 00 00 mov $0x2,%eax } 117614: 8d 65 f4 lea -0xc(%ebp),%esp 117617: 5b pop %ebx 117618: 5e pop %esi 117619: 5f pop %edi 11761a: c9 leave 11761b: c3 ret _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 11761c: 8b 7b 04 mov 0x4(%ebx),%edi 11761f: 89 7d cc mov %edi,-0x34(%ebp) 117622: 83 e7 fe and $0xfffffffe,%edi 117625: 89 7d d8 mov %edi,-0x28(%ebp) 117628: 01 df add %ebx,%edi 11762a: 89 7d c0 mov %edi,-0x40(%ebp) /* end of include file */ 11762d: 39 f8 cmp %edi,%eax 11762f: 77 de ja 11760f <_Heap_Resize_block+0x47><== NEVER TAKEN 117631: 39 fa cmp %edi,%edx 117633: 72 da jb 11760f <_Heap_Resize_block+0x47><== NEVER TAKEN 117635: 8b 47 04 mov 0x4(%edi),%eax old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 117638: a8 01 test $0x1,%al 11763a: 74 d3 je 11760f <_Heap_Resize_block+0x47><== NEVER TAKEN 11763c: 83 e0 fe and $0xfffffffe,%eax 11763f: 89 45 d0 mov %eax,-0x30(%ebp) 117642: 01 f8 add %edi,%eax 117644: 89 45 d4 mov %eax,-0x2c(%ebp) !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 117647: 39 fa cmp %edi,%edx 117649: 0f 84 11 01 00 00 je 117760 <_Heap_Resize_block+0x198><== NEVER TAKEN 11764f: 8b 55 d4 mov -0x2c(%ebp),%edx 117652: 8b 42 04 mov 0x4(%edx),%eax 117655: 83 e0 01 and $0x1,%eax 117658: 88 45 f3 mov %al,-0xd(%ebp) _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 11765b: 8b 7d cc mov -0x34(%ebp),%edi 11765e: 83 e7 01 and $0x1,%edi 117661: 89 7d dc mov %edi,-0x24(%ebp) next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 117664: 8b 45 c0 mov -0x40(%ebp),%eax 117667: 29 c8 sub %ecx,%eax 117669: 83 c0 04 add $0x4,%eax + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 11766c: 8b 55 14 mov 0x14(%ebp),%edx 11766f: 89 02 mov %eax,(%edx) if (size > old_user_size) { 117671: 3b 45 10 cmp 0x10(%ebp),%eax 117674: 73 3a jae 1176b0 <_Heap_Resize_block+0xe8> /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 117676: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 11767a: 75 29 jne 1176a5 <_Heap_Resize_block+0xdd> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 11767c: 8b 4d 10 mov 0x10(%ebp),%ecx 11767f: 29 c1 sub %eax,%ecx 117681: 89 c8 mov %ecx,%eax 117683: 31 d2 xor %edx,%edx 117685: f7 75 e4 divl -0x1c(%ebp) 117688: 85 d2 test %edx,%edx 11768a: 74 05 je 117691 <_Heap_Resize_block+0xc9><== NEVER TAKEN 11768c: 03 4d e4 add -0x1c(%ebp),%ecx 11768f: 29 d1 sub %edx,%ecx 117691: 89 c8 mov %ecx,%eax 117693: 3b 4d e0 cmp -0x20(%ebp),%ecx 117696: 0f 82 a0 00 00 00 jb 11773c <_Heap_Resize_block+0x174><== ALWAYS TAKEN _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 11769c: 39 45 d0 cmp %eax,-0x30(%ebp) 11769f: 0f 83 9f 00 00 00 jae 117744 <_Heap_Resize_block+0x17c><== ALWAYS TAKEN } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 1176a5: b8 01 00 00 00 mov $0x1,%eax 1176aa: e9 65 ff ff ff jmp 117614 <_Heap_Resize_block+0x4c> 1176af: 90 nop --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 1176b0: 89 c1 mov %eax,%ecx 1176b2: 2b 4d 10 sub 0x10(%ebp),%ecx 1176b5: 89 c8 mov %ecx,%eax 1176b7: 31 d2 xor %edx,%edx 1176b9: f7 75 e4 divl -0x1c(%ebp) _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 1176bc: 29 d1 sub %edx,%ecx 1176be: 89 4d e8 mov %ecx,-0x18(%ebp) 1176c1: 74 69 je 11772c <_Heap_Resize_block+0x164> /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 1176c3: 8b 55 d8 mov -0x28(%ebp),%edx 1176c6: 29 ca sub %ecx,%edx 1176c8: 89 55 ec mov %edx,-0x14(%ebp) if (new_block_size < min_block_size) { 1176cb: 39 55 e0 cmp %edx,-0x20(%ebp) 1176ce: 76 0d jbe 1176dd <_Heap_Resize_block+0x115> uint32_t delta = min_block_size - new_block_size; 1176d0: 8b 45 e0 mov -0x20(%ebp),%eax 1176d3: 29 d0 sub %edx,%eax _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 1176d5: 29 45 e8 sub %eax,-0x18(%ebp) 1176d8: 74 52 je 11772c <_Heap_Resize_block+0x164><== ALWAYS TAKEN ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 1176da: 01 45 ec add %eax,-0x14(%ebp) <== NOT EXECUTED _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 1176dd: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 1176e1: 0f 85 85 00 00 00 jne 11776c <_Heap_Resize_block+0x1a4><== NEVER TAKEN 1176e7: 8b 7d ec mov -0x14(%ebp),%edi 1176ea: 8d 14 3b lea (%ebx,%edi,1),%edx /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 1176ed: 8b 4d e8 mov -0x18(%ebp),%ecx 1176f0: 03 4d d0 add -0x30(%ebp),%ecx _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 1176f3: 8b 45 dc mov -0x24(%ebp),%eax 1176f6: 09 c7 or %eax,%edi 1176f8: 89 7b 04 mov %edi,0x4(%ebx) new_next_block->size = new_next_block_size | HEAP_PREV_USED; 1176fb: 89 c8 mov %ecx,%eax 1176fd: 83 c8 01 or $0x1,%eax 117700: 89 42 04 mov %eax,0x4(%edx) next_next_block->prev_size = new_next_block_size; 117703: 8b 7d d4 mov -0x2c(%ebp),%edi 117706: 89 0f mov %ecx,(%edi) { return (state == SYSTEM_STATE_FAILED); } /**@}*/ 117708: 8b 45 c0 mov -0x40(%ebp),%eax 11770b: 8b 58 08 mov 0x8(%eax),%ebx #endif 11770e: 8b 40 0c mov 0xc(%eax),%eax /* end of include file */ 117711: 89 5a 08 mov %ebx,0x8(%edx) 117714: 89 42 0c mov %eax,0xc(%edx) 117717: 89 50 08 mov %edx,0x8(%eax) 11771a: 89 53 0c mov %edx,0xc(%ebx) _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 11771d: 8b 45 e8 mov -0x18(%ebp),%eax 117720: 01 46 30 add %eax,0x30(%esi) *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 117723: 83 e9 04 sub $0x4,%ecx 117726: 8b 55 18 mov 0x18(%ebp),%edx 117729: 89 0a mov %ecx,(%edx) 11772b: 90 nop *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 11772c: ff 46 54 incl 0x54(%esi) 11772f: 31 c0 xor %eax,%eax return HEAP_RESIZE_SUCCESSFUL; } 117731: 8d 65 f4 lea -0xc(%ebp),%esp 117734: 5b pop %ebx 117735: 5e pop %esi 117736: 5f pop %edi 117737: c9 leave 117738: c3 ret 117739: 8d 76 00 lea 0x0(%esi),%esi 11773c: 8b 45 e0 mov -0x20(%ebp),%eax 11773f: e9 58 ff ff ff jmp 11769c <_Heap_Resize_block+0xd4> _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 117744: 52 push %edx 117745: 50 push %eax 117746: ff 75 c0 pushl -0x40(%ebp) 117749: 56 push %esi 11774a: e8 f1 3d ff ff call 10b540 <_Heap_Block_allocate> _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 11774f: 03 45 d8 add -0x28(%ebp),%eax 117752: 0b 45 dc or -0x24(%ebp),%eax 117755: 89 43 04 mov %eax,0x4(%ebx) --stats->used_blocks; 117758: ff 4e 40 decl 0x40(%esi) 11775b: 83 c4 10 add $0x10,%esp 11775e: eb cc jmp 11772c <_Heap_Resize_block+0x164> !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 117760: c6 45 f3 01 movb $0x1,-0xd(%ebp) <== NOT EXECUTED 117764: e9 f2 fe ff ff jmp 11765b <_Heap_Resize_block+0x93><== NOT EXECUTED 117769: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 11776c: 8b 7d e8 mov -0x18(%ebp),%edi <== NOT EXECUTED 11776f: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED 117772: 77 b8 ja 11772c <_Heap_Resize_block+0x164><== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 117774: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED 117777: 09 45 dc or %eax,-0x24(%ebp) <== NOT EXECUTED 11777a: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 11777d: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED 117780: 8d 04 03 lea (%ebx,%eax,1),%eax <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 117783: 8b 55 e8 mov -0x18(%ebp),%edx <== NOT EXECUTED 117786: 83 ca 01 or $0x1,%edx <== NOT EXECUTED 117789: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 11778c: ff 46 40 incl 0x40(%esi) <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 11778f: ff 4e 50 decl 0x50(%esi) <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 117792: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 117795: 83 c0 08 add $0x8,%eax <== NOT EXECUTED 117798: 50 push %eax <== NOT EXECUTED 117799: 56 push %esi <== NOT EXECUTED 11779a: e8 cd 82 ff ff call 10fa6c <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 11779f: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED 1177a2: 83 e8 04 sub $0x4,%eax <== NOT EXECUTED 1177a5: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 1177a8: 89 02 mov %eax,(%edx) <== NOT EXECUTED 1177aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1177ad: e9 7a ff ff ff jmp 11772c <_Heap_Resize_block+0x164><== NOT EXECUTED =============================================================================== 001177b4 <_Heap_Size_of_user_area>: bool _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, size_t *size ) { 1177b4: 55 push %ebp 1177b5: 89 e5 mov %esp,%ebp 1177b7: 57 push %edi 1177b8: 56 push %esi 1177b9: 53 push %ebx 1177ba: 83 ec 0c sub $0xc,%esp 1177bd: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *next_block; uint32_t the_size; if ( !_Addresses_Is_in_range( 1177c0: 8b 45 08 mov 0x8(%ebp),%eax 1177c3: 8b 70 24 mov 0x24(%eax),%esi 1177c6: 8b 48 20 mov 0x20(%eax),%ecx /* end of include file */ 1177c9: 39 f9 cmp %edi,%ecx 1177cb: 77 04 ja 1177d1 <_Heap_Size_of_user_area+0x1d> 1177cd: 39 fe cmp %edi,%esi 1177cf: 73 0b jae 1177dc <_Heap_Size_of_user_area+0x28><== ALWAYS TAKEN area of 'the_block'. */ *size = _Addresses_Subtract ( next_block, starting_address ) + HEAP_BLOCK_HEADER_OFFSET; return( TRUE ); 1177d1: 31 c0 xor %eax,%eax } 1177d3: 83 c4 0c add $0xc,%esp 1177d6: 5b pop %ebx 1177d7: 5e pop %esi 1177d8: 5f pop %edi 1177d9: c9 leave 1177da: c3 ret 1177db: 90 nop 1177dc: 8d 57 f8 lea -0x8(%edi),%edx 1177df: 89 55 e8 mov %edx,-0x18(%ebp) 1177e2: 89 f8 mov %edi,%eax 1177e4: 8b 5d 08 mov 0x8(%ebp),%ebx 1177e7: 31 d2 xor %edx,%edx 1177e9: f7 73 10 divl 0x10(%ebx) 1177ec: 29 55 e8 sub %edx,-0x18(%ebp) /* end of include file */ 1177ef: 3b 4d e8 cmp -0x18(%ebp),%ecx 1177f2: 77 dd ja 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN 1177f4: 3b 75 e8 cmp -0x18(%ebp),%esi 1177f7: 72 d8 jb 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN 1177f9: 8b 55 e8 mov -0x18(%ebp),%edx 1177fc: 8b 42 04 mov 0x4(%edx),%eax 1177ff: 83 e0 fe and $0xfffffffe,%eax 117802: 01 d0 add %edx,%eax /* end of include file */ 117804: 39 c1 cmp %eax,%ecx 117806: 77 c9 ja 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN 117808: 39 c6 cmp %eax,%esi 11780a: 72 c5 jb 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); _HAssert(_Heap_Is_block_in( the_heap, next_block )); _HAssert(_Heap_Is_prev_used( next_block )); if ( 11780c: f6 40 04 01 testb $0x1,0x4(%eax) 117810: 74 bf je 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN and then add correction equal to the offset of the 'size' field of the 'Heap_Block' structure. The correction is due to the fact that 'prev_size' field of the next block is actually used as user accessible area of 'the_block'. */ *size = _Addresses_Subtract ( next_block, starting_address ) 117812: 29 f8 sub %edi,%eax 117814: 83 c0 04 add $0x4,%eax 117817: 8b 5d 10 mov 0x10(%ebp),%ebx 11781a: 89 03 mov %eax,(%ebx) 11781c: b0 01 mov $0x1,%al 11781e: eb b3 jmp 1177d3 <_Heap_Size_of_user_area+0x1f> =============================================================================== 00111d54 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 111d54: 55 push %ebp 111d55: 89 e5 mov %esp,%ebp 111d57: 57 push %edi 111d58: 56 push %esi 111d59: 53 push %ebx 111d5a: 83 ec 1c sub $0x1c,%esp 111d5d: 8b 75 08 mov 0x8(%ebp),%esi Heap_Block *the_block = the_heap->start; 111d60: 8b 7e 20 mov 0x20(%esi),%edi Heap_Block *const end = the_heap->final; 111d63: 8b 46 24 mov 0x24(%esi),%eax 111d66: 89 45 e4 mov %eax,-0x1c(%ebp) /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 111d69: 8b 45 0c mov 0xc(%ebp),%eax 111d6c: 85 c0 test %eax,%eax 111d6e: 0f 88 67 02 00 00 js 111fdb <_Heap_Walk+0x287> <== NEVER TAKEN /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 111d74: f6 47 04 01 testb $0x1,0x4(%edi) 111d78: 0f 84 3e 02 00 00 je 111fbc <_Heap_Walk+0x268> <== NEVER TAKEN 111d7e: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { 111d85: 8b 07 mov (%edi),%eax 111d87: 3b 46 10 cmp 0x10(%esi),%eax 111d8a: 74 1a je 111da6 <_Heap_Walk+0x52> <== ALWAYS TAKEN printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 111d8c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111d8f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111d92: 68 f0 dd 11 00 push $0x11ddf0 <== NOT EXECUTED 111d97: e8 28 76 ff ff call 1093c4 <== NOT EXECUTED 111d9c: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED 111da3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED error = 1; } while ( the_block != end ) { 111da6: 3b 7d e4 cmp -0x1c(%ebp),%edi 111da9: 0f 84 37 02 00 00 je 111fe6 <_Heap_Walk+0x292> <== NEVER TAKEN 111daf: 8b 57 04 mov 0x4(%edi),%edx 111db2: 89 d3 mov %edx,%ebx 111db4: 83 e3 fe and $0xfffffffe,%ebx /** @brief _Thread_Is_proxy_blocking * * status which indicates that a proxy is blocking, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking ( uint32_t code 111db7: 8d 04 1f lea (%edi,%ebx,1),%eax 111dba: 89 45 ec mov %eax,-0x14(%ebp) 111dbd: 8b 46 24 mov 0x24(%esi),%eax #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 ); 111dc0: 8b 4d ec mov -0x14(%ebp),%ecx 111dc3: 39 4e 20 cmp %ecx,0x20(%esi) 111dc6: 0f 87 14 01 00 00 ja 111ee0 <_Heap_Walk+0x18c> <== NEVER TAKEN 111dcc: 39 c1 cmp %eax,%ecx 111dce: 0f 87 0c 01 00 00 ja 111ee0 <_Heap_Walk+0x18c> <== NEVER TAKEN 111dd4: 83 e2 01 and $0x1,%edx 111dd7: 88 55 f3 mov %dl,-0xd(%ebp) 111dda: 66 90 xchg %ax,%ax printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 111ddc: 8b 4d ec mov -0x14(%ebp),%ecx 111ddf: f6 41 04 01 testb $0x1,0x4(%ecx) 111de3: 0f 85 53 01 00 00 jne 111f3c <_Heap_Walk+0x1e8> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 111de9: 8b 45 ec mov -0x14(%ebp),%eax 111dec: 39 18 cmp %ebx,(%eax) 111dee: 74 1a je 111e0a <_Heap_Walk+0xb6> <== ALWAYS TAKEN if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 111df0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111df3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111df6: 68 48 de 11 00 push $0x11de48 <== NOT EXECUTED 111dfb: e8 c4 75 ff ff call 1093c4 <== NOT EXECUTED 111e00: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED 111e07: 83 c4 10 add $0x10,%esp <== NOT EXECUTED error = 1; } if (!prev_used) { 111e0a: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 111e0e: 75 25 jne 111e35 <_Heap_Walk+0xe1> <== ALWAYS TAKEN if (do_dump || error) printk("\n"); 111e10: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED 111e13: 85 c0 test %eax,%eax <== NOT EXECUTED 111e15: 0f 85 81 01 00 00 jne 111f9c <_Heap_Walk+0x248> <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 111e1b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111e1e: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111e21: 68 74 de 11 00 push $0x11de74 <== NOT EXECUTED 111e26: e8 99 75 ff ff call 1093c4 <== NOT EXECUTED 111e2b: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED 111e32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED ) { return ( the_thread == _Thread_Heir ); } /** 111e35: 8b 46 08 mov 0x8(%esi),%eax error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 111e38: 39 c7 cmp %eax,%edi 111e3a: 75 13 jne 111e4f <_Heap_Walk+0xfb> 111e3c: e9 fb 00 00 00 jmp 111f3c <_Heap_Walk+0x1e8> 111e41: 8d 76 00 lea 0x0(%esi),%esi block = block->next; 111e44: 8b 40 08 mov 0x8(%eax),%eax error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 111e47: 39 f8 cmp %edi,%eax 111e49: 0f 84 ed 00 00 00 je 111f3c <_Heap_Walk+0x1e8> 111e4f: 39 c6 cmp %eax,%esi 111e51: 75 f1 jne 111e44 <_Heap_Walk+0xf0> <== ALWAYS TAKEN block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 111e53: 8b 4d e8 mov -0x18(%ebp),%ecx <== NOT EXECUTED 111e56: 85 c9 test %ecx,%ecx <== NOT EXECUTED 111e58: 74 10 je 111e6a <_Heap_Walk+0x116> <== NOT EXECUTED 111e5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e5d: 68 2b b7 11 00 push $0x11b72b <== NOT EXECUTED 111e62: e8 5d 75 ff ff call 1093c4 <== NOT EXECUTED 111e67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 111e6a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111e6d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111e70: 68 a0 de 11 00 push $0x11dea0 <== NOT EXECUTED 111e75: e8 4a 75 ff ff call 1093c4 <== NOT EXECUTED 111e7a: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED 111e81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 111e84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e87: 68 2b b7 11 00 push $0x11b72b <== NOT EXECUTED 111e8c: e8 33 75 ff ff call 1093c4 <== NOT EXECUTED 111e91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 111e94: 3b 5e 14 cmp 0x14(%esi),%ebx <== NOT EXECUTED 111e97: 0f 82 b3 00 00 00 jb 111f50 <_Heap_Walk+0x1fc> <== NOT EXECUTED printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 111e9d: 89 d8 mov %ebx,%eax 111e9f: 31 d2 xor %edx,%edx 111ea1: f7 76 10 divl 0x10(%esi) 111ea4: 85 d2 test %edx,%edx 111ea6: 0f 85 d8 00 00 00 jne 111f84 <_Heap_Walk+0x230> <== NEVER TAKEN printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 111eac: 8b 45 e8 mov -0x18(%ebp),%eax 111eaf: 85 c0 test %eax,%eax 111eb1: 75 41 jne 111ef4 <_Heap_Walk+0x1a0> <== NEVER TAKEN if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { 111eb3: 8b 4d ec mov -0x14(%ebp),%ecx 111eb6: 39 4d e4 cmp %ecx,-0x1c(%ebp) 111eb9: 0f 84 27 01 00 00 je 111fe6 <_Heap_Walk+0x292> 111ebf: 8b 45 ec mov -0x14(%ebp),%eax 111ec2: 8b 48 04 mov 0x4(%eax),%ecx 111ec5: 89 cb mov %ecx,%ebx 111ec7: 83 e3 fe and $0xfffffffe,%ebx Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 111eca: 01 d8 add %ebx,%eax 111ecc: 8b 56 24 mov 0x24(%esi),%edx #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 ); 111ecf: 3b 46 20 cmp 0x20(%esi),%eax 111ed2: 0f 83 90 00 00 00 jae 111f68 <_Heap_Walk+0x214> <== ALWAYS TAKEN printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 111ed8: 8b 7d ec mov -0x14(%ebp),%edi <== NOT EXECUTED 111edb: 89 45 ec mov %eax,-0x14(%ebp) <== NOT EXECUTED 111ede: 66 90 xchg %ax,%ax <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 111ee0: 50 push %eax <== NOT EXECUTED 111ee1: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED 111ee4: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111ee7: 68 24 de 11 00 push $0x11de24 <== NOT EXECUTED 111eec: e8 d3 74 ff ff call 1093c4 <== NOT EXECUTED 111ef1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 111ef4: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 111ef7: 57 push %edi <== NOT EXECUTED 111ef8: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111efb: 68 14 df 11 00 push $0x11df14 <== NOT EXECUTED 111f00: e8 bf 74 ff ff call 1093c4 <== NOT EXECUTED 111f05: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED 111f0c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f0f: 8b 47 04 mov 0x4(%edi),%eax 111f12: 83 e0 fe and $0xfffffffe,%eax source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 111f15: 8b 56 10 mov 0x10(%esi),%edx 111f18: 39 c2 cmp %eax,%edx 111f1a: 0f 84 91 00 00 00 je 111fb1 <_Heap_Walk+0x25d> <== ALWAYS TAKEN printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 111f20: 52 push %edx <== NOT EXECUTED 111f21: 50 push %eax <== NOT EXECUTED 111f22: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111f25: 68 50 df 11 00 push $0x11df50 <== NOT EXECUTED 111f2a: e8 95 74 ff ff call 1093c4 <== NOT EXECUTED 111f2f: b0 01 mov $0x1,%al <== NOT EXECUTED 111f31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 111f34: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111f37: 5b pop %ebx <== NOT EXECUTED 111f38: 5e pop %esi <== NOT EXECUTED 111f39: 5f pop %edi <== NOT EXECUTED 111f3a: c9 leave <== NOT EXECUTED 111f3b: c3 ret <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 111f3c: 8b 55 e8 mov -0x18(%ebp),%edx 111f3f: 85 d2 test %edx,%edx 111f41: 0f 85 3d ff ff ff jne 111e84 <_Heap_Walk+0x130> <== NEVER TAKEN if (the_size < the_heap->min_block_size) { 111f47: 3b 5e 14 cmp 0x14(%esi),%ebx 111f4a: 0f 83 4d ff ff ff jae 111e9d <_Heap_Walk+0x149> <== ALWAYS TAKEN printk("PASS: %d !block size is too small\n", source); 111f50: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111f53: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111f56: 68 cc de 11 00 push $0x11decc <== NOT EXECUTED 111f5b: e8 64 74 ff ff call 1093c4 <== NOT EXECUTED 111f60: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f63: eb 8f jmp 111ef4 <_Heap_Walk+0x1a0> <== NOT EXECUTED 111f65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ); 111f68: 39 d0 cmp %edx,%eax 111f6a: 0f 87 68 ff ff ff ja 111ed8 <_Heap_Walk+0x184> <== NEVER TAKEN 111f70: 83 e1 01 and $0x1,%ecx 111f73: 88 4d f3 mov %cl,-0xd(%ebp) 111f76: 8b 7d ec mov -0x14(%ebp),%edi 111f79: 89 45 ec mov %eax,-0x14(%ebp) 111f7c: e9 5b fe ff ff jmp 111ddc <_Heap_Walk+0x88> 111f81: 8d 76 00 lea 0x0(%esi),%esi error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); 111f84: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111f87: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111f8a: 68 f0 de 11 00 push $0x11def0 <== NOT EXECUTED 111f8f: e8 30 74 ff ff call 1093c4 <== NOT EXECUTED 111f94: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f97: e9 58 ff ff ff jmp 111ef4 <_Heap_Walk+0x1a0> <== NOT EXECUTED if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); 111f9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f9f: 68 2b b7 11 00 push $0x11b72b <== NOT EXECUTED 111fa4: e8 1b 74 ff ff call 1093c4 <== NOT EXECUTED 111fa9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111fac: e9 6a fe ff ff jmp 111e1b <_Heap_Walk+0xc7> <== NOT EXECUTED printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 111fb1: 8a 45 e8 mov -0x18(%ebp),%al if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 111fb4: 8d 65 f4 lea -0xc(%ebp),%esp 111fb7: 5b pop %ebx 111fb8: 5e pop %esi 111fb9: 5f pop %edi 111fba: c9 leave 111fbb: c3 ret /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 111fbc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111fbf: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111fc2: 68 b8 dd 11 00 push $0x11ddb8 <== NOT EXECUTED 111fc7: e8 f8 73 ff ff call 1093c4 <== NOT EXECUTED 111fcc: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED 111fd3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111fd6: e9 aa fd ff ff jmp 111d85 <_Heap_Walk+0x31> <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 111fdb: 8b 4e 28 mov 0x28(%esi),%ecx <== NOT EXECUTED 111fde: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 111fe1: e9 8e fd ff ff jmp 111d74 <_Heap_Walk+0x20> <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 111fe6: 8b 7d e4 mov -0x1c(%ebp),%edi 111fe9: e9 21 ff ff ff jmp 111f0f <_Heap_Walk+0x1bb> =============================================================================== 0010aaa0 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10aaa0: 55 push %ebp 10aaa1: 89 e5 mov %esp,%ebp 10aaa3: 53 push %ebx 10aaa4: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10aaa7: 8b 15 60 03 12 00 mov 0x120360,%edx 10aaad: 85 d2 test %edx,%edx 10aaaf: 74 1a je 10aacb <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10aab1: 31 db xor %ebx,%ebx 10aab3: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10aab4: 50 push %eax 10aab5: 6a 00 push $0x0 10aab7: 6a 00 push $0x0 10aab9: 53 push %ebx 10aaba: e8 55 4c 00 00 call 10f714 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10aabf: 43 inc %ebx 10aac0: 83 c4 10 add $0x10,%esp 10aac3: 39 1d 60 03 12 00 cmp %ebx,0x120360 10aac9: 77 e9 ja 10aab4 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10aacb: 8b 5d fc mov -0x4(%ebp),%ebx 10aace: c9 leave 10aacf: c3 ret =============================================================================== 0010aad0 <_IO_Manager_initialization>: void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, uint32_t number_of_drivers ) { 10aad0: 55 push %ebp 10aad1: 89 e5 mov %esp,%ebp 10aad3: 57 push %edi 10aad4: 56 push %esi 10aad5: 53 push %ebx 10aad6: 83 ec 0c sub $0xc,%esp 10aad9: 8b 75 10 mov 0x10(%ebp),%esi /* * 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 ) 10aadc: 3b 75 0c cmp 0xc(%ebp),%esi 10aadf: 76 5b jbe 10ab3c <_IO_Manager_initialization+0x6c> /* * 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 *) 10aae1: 8d 04 76 lea (%esi,%esi,2),%eax 10aae4: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10aaeb: 83 ec 0c sub $0xc,%esp 10aaee: 53 push %ebx 10aaef: e8 e8 29 00 00 call 10d4dc <_Workspace_Allocate_or_fatal_error> 10aaf4: 89 c7 mov %eax,%edi 10aaf6: a3 64 03 12 00 mov %eax,0x120364 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10aafb: 89 35 60 03 12 00 mov %esi,0x120360 memset( 10ab01: 31 c0 xor %eax,%eax 10ab03: 89 d9 mov %ebx,%ecx 10ab05: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10ab07: 83 c4 10 add $0x10,%esp 10ab0a: 8b 4d 0c mov 0xc(%ebp),%ecx 10ab0d: 85 c9 test %ecx,%ecx 10ab0f: 74 23 je 10ab34 <_IO_Manager_initialization+0x64><== NEVER TAKEN _IO_Driver_address_table[index] = driver_table[index]; 10ab11: 8b 1d 64 03 12 00 mov 0x120364,%ebx 10ab17: 31 d2 xor %edx,%edx 10ab19: 31 c0 xor %eax,%eax 10ab1b: 90 nop 10ab1c: 8d 3c 03 lea (%ebx,%eax,1),%edi 10ab1f: 8b 75 08 mov 0x8(%ebp),%esi 10ab22: 01 c6 add %eax,%esi 10ab24: b9 06 00 00 00 mov $0x6,%ecx 10ab29: 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++ ) 10ab2b: 42 inc %edx 10ab2c: 83 c0 18 add $0x18,%eax 10ab2f: 39 55 0c cmp %edx,0xc(%ebp) 10ab32: 77 e8 ja 10ab1c <_IO_Manager_initialization+0x4c> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10ab34: 8d 65 f4 lea -0xc(%ebp),%esp 10ab37: 5b pop %ebx 10ab38: 5e pop %esi 10ab39: 5f pop %edi 10ab3a: c9 leave 10ab3b: c3 ret * 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; 10ab3c: 8b 45 08 mov 0x8(%ebp),%eax 10ab3f: a3 64 03 12 00 mov %eax,0x120364 _IO_Number_of_drivers = number_of_drivers; 10ab44: 8b 4d 0c mov 0xc(%ebp),%ecx 10ab47: 89 0d 60 03 12 00 mov %ecx,0x120360 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10ab4d: 8d 65 f4 lea -0xc(%ebp),%esp 10ab50: 5b pop %ebx 10ab51: 5e pop %esi 10ab52: 5f pop %edi 10ab53: c9 leave 10ab54: c3 ret =============================================================================== 0010b5c4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, uint32_t the_error ) { 10b5c4: 55 push %ebp 10b5c5: 89 e5 mov %esp,%ebp 10b5c7: 53 push %ebx 10b5c8: 83 ec 08 sub $0x8,%esp 10b5cb: 8b 55 08 mov 0x8(%ebp),%edx 10b5ce: 8b 45 0c mov 0xc(%ebp),%eax 10b5d1: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b5d4: 89 15 a4 f9 11 00 mov %edx,0x11f9a4 _Internal_errors_What_happened.is_internal = is_internal; 10b5da: a2 a8 f9 11 00 mov %al,0x11f9a8 _Internal_errors_What_happened.the_error = the_error; 10b5df: 89 1d ac f9 11 00 mov %ebx,0x11f9ac _User_extensions_Fatal( the_source, is_internal, the_error ); 10b5e5: 53 push %ebx 10b5e6: 0f b6 c0 movzbl %al,%eax 10b5e9: 50 push %eax 10b5ea: 52 push %edx 10b5eb: e8 60 1b 00 00 call 10d150 <_User_extensions_Fatal> * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( 10b5f0: c7 05 c4 fa 11 00 05 movl $0x5,0x11fac4 <== NOT EXECUTED 10b5f7: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b5fa: fa cli <== NOT EXECUTED 10b5fb: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b5fd: f4 hlt <== NOT EXECUTED 10b5fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b601: eb fe jmp 10b601 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010fbcc <_Objects_API_maximum_class>: #include int _Objects_API_maximum_class( uint32_t api ) { 10fbcc: 55 push %ebp 10fbcd: 89 e5 mov %esp,%ebp switch (api) { 10fbcf: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10fbd3: 74 2f je 10fc04 <_Objects_API_maximum_class+0x38> 10fbd5: 76 15 jbe 10fbec <_Objects_API_maximum_class+0x20> 10fbd7: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10fbdb: 74 1f je 10fbfc <_Objects_API_maximum_class+0x30> 10fbdd: 83 7d 08 04 cmpl $0x4,0x8(%ebp) 10fbe1: 75 0f jne 10fbf2 <_Objects_API_maximum_class+0x26> case OBJECTS_INTERNAL_API: return OBJECTS_INTERNAL_CLASSES_LAST; case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; 10fbe3: b8 08 00 00 00 mov $0x8,%eax case OBJECTS_NO_API: default: break; } return -1; } 10fbe8: c9 leave 10fbe9: c3 ret 10fbea: 66 90 xchg %ax,%ax int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 10fbec: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10fbf0: 74 1a je 10fc0c <_Objects_API_maximum_class+0x40> case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; 10fbf2: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_NO_API: default: break; } return -1; } 10fbf7: c9 leave 10fbf8: c3 ret 10fbf9: 8d 76 00 lea 0x0(%esi),%esi int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 10fbfc: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_NO_API: default: break; } return -1; } 10fc01: c9 leave 10fc02: c3 ret 10fc03: 90 nop int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 10fc04: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_NO_API: default: break; } return -1; } 10fc09: c9 leave 10fc0a: c3 ret 10fc0b: 90 nop int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 10fc0c: b8 02 00 00 00 mov $0x2,%eax case OBJECTS_NO_API: default: break; } return -1; } 10fc11: c9 leave 10fc12: c3 ret =============================================================================== 0010b658 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b658: 55 push %ebp 10b659: 89 e5 mov %esp,%ebp 10b65b: 56 push %esi 10b65c: 53 push %ebx 10b65d: 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 ) 10b660: 8b 43 18 mov 0x18(%ebx),%eax 10b663: 85 c0 test %eax,%eax 10b665: 75 0d jne 10b674 <_Objects_Allocate+0x1c><== ALWAYS TAKEN 10b667: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10b669: 89 c8 mov %ecx,%eax 10b66b: 8d 65 f8 lea -0x8(%ebp),%esp 10b66e: 5b pop %ebx 10b66f: 5e pop %esi 10b670: c9 leave 10b671: c3 ret 10b672: 66 90 xchg %ax,%ax /* * 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 ); 10b674: 8d 73 20 lea 0x20(%ebx),%esi 10b677: 83 ec 0c sub $0xc,%esp 10b67a: 56 push %esi 10b67b: e8 c4 f7 ff ff call 10ae44 <_Chain_Get> 10b680: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b682: 83 c4 10 add $0x10,%esp 10b685: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b689: 74 de je 10b669 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b68b: 85 c0 test %eax,%eax 10b68d: 74 2d je 10b6bc <_Objects_Allocate+0x64> } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 10b68f: 8b 41 08 mov 0x8(%ecx),%eax 10b692: 25 ff ff 00 00 and $0xffff,%eax 10b697: 8b 53 08 mov 0x8(%ebx),%edx 10b69a: 81 e2 ff ff 00 00 and $0xffff,%edx 10b6a0: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b6a2: 31 d2 xor %edx,%edx 10b6a4: f7 73 14 divl 0x14(%ebx) 10b6a7: c1 e0 02 shl $0x2,%eax 10b6aa: 03 43 30 add 0x30(%ebx),%eax 10b6ad: ff 08 decl (%eax) information->inactive--; 10b6af: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b6b3: 89 c8 mov %ecx,%eax 10b6b5: 8d 65 f8 lea -0x8(%ebp),%esp 10b6b8: 5b pop %ebx 10b6b9: 5e pop %esi 10b6ba: c9 leave 10b6bb: c3 ret * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10b6bc: 83 ec 0c sub $0xc,%esp 10b6bf: 53 push %ebx 10b6c0: e8 37 00 00 00 call 10b6fc <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b6c5: 89 34 24 mov %esi,(%esp) 10b6c8: e8 77 f7 ff ff call 10ae44 <_Chain_Get> 10b6cd: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b6cf: 83 c4 10 add $0x10,%esp 10b6d2: 85 c0 test %eax,%eax 10b6d4: 74 93 je 10b669 <_Objects_Allocate+0x11><== NEVER TAKEN 10b6d6: eb b7 jmp 10b68f <_Objects_Allocate+0x37> =============================================================================== 0010b6fc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b6fc: 55 push %ebp 10b6fd: 89 e5 mov %esp,%ebp 10b6ff: 57 push %edi 10b700: 56 push %esi 10b701: 53 push %ebx 10b702: 83 ec 5c sub $0x5c,%esp * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 10b705: 8b 55 08 mov 0x8(%ebp),%edx 10b708: 8b 42 08 mov 0x8(%edx),%eax 10b70b: 25 ff ff 00 00 and $0xffff,%eax 10b710: 89 45 c8 mov %eax,-0x38(%ebp) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 10b713: 0f b7 72 10 movzwl 0x10(%edx),%esi 10b717: 39 c6 cmp %eax,%esi 10b719: 0f 83 e9 01 00 00 jae 10b908 <_Objects_Extend_information+0x20c> 10b71f: 8b 4a 14 mov 0x14(%edx),%ecx 10b722: 89 4d a8 mov %ecx,-0x58(%ebp) 10b725: 89 45 c4 mov %eax,-0x3c(%ebp) 10b728: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 10b72f: 31 db xor %ebx,%ebx 10b731: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 10b738: ba 03 00 00 00 mov $0x3,%edx * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 10b73d: 03 75 a8 add -0x58(%ebp),%esi 10b740: 89 75 d4 mov %esi,-0x2c(%ebp) /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 10b743: 8b 45 08 mov 0x8(%ebp),%eax 10b746: 80 78 12 00 cmpb $0x0,0x12(%eax) 10b74a: 0f 85 1c 02 00 00 jne 10b96c <_Objects_Extend_information+0x270> if ( !object_blocks ) return; } else { object_blocks = (void**) 10b750: 83 ec 0c sub $0xc,%esp 10b753: 8b 75 c8 mov -0x38(%ebp),%esi 10b756: 8d 04 32 lea (%edx,%esi,1),%eax 10b759: 03 45 d4 add -0x2c(%ebp),%eax 10b75c: c1 e0 02 shl $0x2,%eax 10b75f: 50 push %eax 10b760: e8 77 1d 00 00 call 10d4dc <_Workspace_Allocate_or_fatal_error> 10b765: 89 45 cc mov %eax,-0x34(%ebp) 10b768: 83 c4 10 add $0x10,%esp /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 10b76b: 8b 7d e0 mov -0x20(%ebp),%edi 10b76e: 8b 45 cc mov -0x34(%ebp),%eax 10b771: 8d 3c b8 lea (%eax,%edi,4),%edi 10b774: 89 7d d0 mov %edi,-0x30(%ebp) * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 10b777: 8b 55 e0 mov -0x20(%ebp),%edx 10b77a: 8d 14 d0 lea (%eax,%edx,8),%edx 10b77d: 89 55 d8 mov %edx,-0x28(%ebp) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b780: 8b 4d 08 mov 0x8(%ebp),%ecx 10b783: 0f b7 41 10 movzwl 0x10(%ecx),%eax 10b787: 3b 45 c8 cmp -0x38(%ebp),%eax 10b78a: 0f 87 38 02 00 00 ja 10b9c8 <_Objects_Extend_information+0x2cc> else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b790: 8b 45 c8 mov -0x38(%ebp),%eax 10b793: 85 c0 test %eax,%eax 10b795: 74 15 je 10b7ac <_Objects_Extend_information+0xb0><== NEVER TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b797: 31 c0 xor %eax,%eax 10b799: 8d 76 00 lea 0x0(%esi),%esi /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b79c: 8b 55 d8 mov -0x28(%ebp),%edx 10b79f: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4) else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b7a6: 40 inc %eax 10b7a7: 3b 45 c8 cmp -0x38(%ebp),%eax 10b7aa: 72 f0 jb 10b79c <_Objects_Extend_information+0xa0><== NEVER TAKEN /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b7ac: 8b 45 c0 mov -0x40(%ebp),%eax 10b7af: c1 e0 02 shl $0x2,%eax 10b7b2: 8b 4d cc mov -0x34(%ebp),%ecx 10b7b5: c7 04 01 00 00 00 00 movl $0x0,(%ecx,%eax,1) inactive_per_block[block_count] = 0; 10b7bc: 8b 75 d0 mov -0x30(%ebp),%esi 10b7bf: c7 04 06 00 00 00 00 movl $0x0,(%esi,%eax,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b7c6: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b7c9: 8b 7d 08 mov 0x8(%ebp),%edi 10b7cc: 03 4f 14 add 0x14(%edi),%ecx 10b7cf: 39 4d c4 cmp %ecx,-0x3c(%ebp) 10b7d2: 73 1a jae 10b7ee <_Objects_Extend_information+0xf2><== NEVER TAKEN 10b7d4: 8b 45 c4 mov -0x3c(%ebp),%eax 10b7d7: 8b 75 d8 mov -0x28(%ebp),%esi 10b7da: 8d 14 86 lea (%esi,%eax,4),%edx 10b7dd: 8d 76 00 lea 0x0(%esi),%esi index++ ) { local_table[ index ] = NULL; 10b7e0: c7 02 00 00 00 00 movl $0x0,(%edx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10b7e6: 40 inc %eax 10b7e7: 83 c2 04 add $0x4,%edx object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b7ea: 39 c8 cmp %ecx,%eax 10b7ec: 72 f2 jb 10b7e0 <_Objects_Extend_information+0xe4> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b7ee: 9c pushf 10b7ef: fa cli 10b7f0: 59 pop %ecx old_tables = information->object_blocks; 10b7f1: 8b 7d 08 mov 0x8(%ebp),%edi 10b7f4: 8b 77 34 mov 0x34(%edi),%esi information->object_blocks = object_blocks; 10b7f7: 8b 45 cc mov -0x34(%ebp),%eax 10b7fa: 89 47 34 mov %eax,0x34(%edi) information->inactive_per_block = inactive_per_block; 10b7fd: 8b 55 d0 mov -0x30(%ebp),%edx 10b800: 89 57 30 mov %edx,0x30(%edi) information->local_table = local_table; 10b803: 8b 45 d8 mov -0x28(%ebp),%eax 10b806: 89 47 1c mov %eax,0x1c(%edi) information->maximum = maximum; 10b809: 8b 55 d4 mov -0x2c(%ebp),%edx 10b80c: 66 89 57 10 mov %dx,0x10(%edi) information->maximum_id = _Objects_Build_id( 10b810: 8b 17 mov (%edi),%edx 10b812: c1 e2 18 shl $0x18,%edx 10b815: 81 ca 00 00 01 00 or $0x10000,%edx 10b81b: 0f b7 47 04 movzwl 0x4(%edi),%eax 10b81f: c1 e0 1b shl $0x1b,%eax 10b822: 09 c2 or %eax,%edx 10b824: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10b828: 09 c2 or %eax,%edx 10b82a: 89 57 0c mov %edx,0xc(%edi) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b82d: 51 push %ecx 10b82e: 9d popf if ( old_tables ) 10b82f: 85 f6 test %esi,%esi 10b831: 0f 84 c9 01 00 00 je 10ba00 <_Objects_Extend_information+0x304> _Workspace_Free( old_tables ); 10b837: 83 ec 0c sub $0xc,%esp 10b83a: 56 push %esi 10b83b: e8 6c 1c 00 00 call 10d4ac <_Workspace_Free> 10b840: 8b 75 08 mov 0x8(%ebp),%esi 10b843: 8b 76 14 mov 0x14(%esi),%esi 10b846: 89 75 a8 mov %esi,-0x58(%ebp) 10b849: 83 c4 10 add $0x10,%esp /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 10b84c: 8b 7d 08 mov 0x8(%ebp),%edi 10b84f: 80 7f 12 00 cmpb $0x0,0x12(%edi) 10b853: 0f 84 3b 01 00 00 je 10b994 <_Objects_Extend_information+0x298> information->object_blocks[ block ] = 10b859: c1 e3 02 shl $0x2,%ebx 10b85c: 89 5d dc mov %ebx,-0x24(%ebp) 10b85f: 03 5f 34 add 0x34(%edi),%ebx 10b862: 83 ec 0c sub $0xc,%esp 10b865: 8b 45 a8 mov -0x58(%ebp),%eax 10b868: 0f af 47 18 imul 0x18(%edi),%eax 10b86c: 50 push %eax 10b86d: e8 52 1c 00 00 call 10d4c4 <_Workspace_Allocate> 10b872: 89 03 mov %eax,(%ebx) _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 10b874: 8b 47 34 mov 0x34(%edi),%eax 10b877: 8b 55 dc mov -0x24(%ebp),%edx 10b87a: 8b 04 10 mov (%eax,%edx,1),%eax 10b87d: 83 c4 10 add $0x10,%esp 10b880: 85 c0 test %eax,%eax 10b882: 74 7a je 10b8fe <_Objects_Extend_information+0x202><== NEVER TAKEN /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b884: 8b 4d 08 mov 0x8(%ebp),%ecx 10b887: ff 71 18 pushl 0x18(%ecx) 10b88a: ff 71 14 pushl 0x14(%ecx) 10b88d: 50 push %eax 10b88e: 8d 75 e8 lea -0x18(%ebp),%esi 10b891: 56 push %esi 10b892: e8 d5 3e 00 00 call 10f76c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b897: 8b 75 08 mov 0x8(%ebp),%esi 10b89a: 83 c6 20 add $0x20,%esi 10b89d: 8b 5d c4 mov -0x3c(%ebp),%ebx 10b8a0: 83 c4 10 add $0x10,%esp 10b8a3: eb 2c jmp 10b8d1 <_Objects_Extend_information+0x1d5> 10b8a5: 8d 76 00 lea 0x0(%esi),%esi index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 10b8a8: 8b 7d 08 mov 0x8(%ebp),%edi 10b8ab: 8b 07 mov (%edi),%eax 10b8ad: c1 e0 18 shl $0x18,%eax 10b8b0: 0d 00 00 01 00 or $0x10000,%eax 10b8b5: 0f b7 57 04 movzwl 0x4(%edi),%edx 10b8b9: c1 e2 1b shl $0x1b,%edx 10b8bc: 09 d0 or %edx,%eax 10b8be: 09 d8 or %ebx,%eax 10b8c0: 89 41 08 mov %eax,0x8(%ecx) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b8c3: 83 ec 08 sub $0x8,%esp 10b8c6: 51 push %ecx 10b8c7: 56 push %esi 10b8c8: e8 53 f5 ff ff call 10ae20 <_Chain_Append> index++; 10b8cd: 43 inc %ebx 10b8ce: 83 c4 10 add $0x10,%esp * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 10b8d1: 83 ec 0c sub $0xc,%esp 10b8d4: 8d 45 e8 lea -0x18(%ebp),%eax 10b8d7: 50 push %eax 10b8d8: e8 67 f5 ff ff call 10ae44 <_Chain_Get> 10b8dd: 89 c1 mov %eax,%ecx 10b8df: 83 c4 10 add $0x10,%esp 10b8e2: 85 c0 test %eax,%eax 10b8e4: 75 c2 jne 10b8a8 <_Objects_Extend_information+0x1ac> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b8e6: 8b 55 08 mov 0x8(%ebp),%edx 10b8e9: 8b 42 30 mov 0x30(%edx),%eax 10b8ec: 89 d1 mov %edx,%ecx 10b8ee: 8b 52 14 mov 0x14(%edx),%edx 10b8f1: 8b 75 dc mov -0x24(%ebp),%esi 10b8f4: 89 14 30 mov %edx,(%eax,%esi,1) information->inactive += information->allocation_size; 10b8f7: 8b 41 14 mov 0x14(%ecx),%eax 10b8fa: 66 01 41 2c add %ax,0x2c(%ecx) } 10b8fe: 8d 65 f4 lea -0xc(%ebp),%esp 10b901: 5b pop %ebx 10b902: 5e pop %esi 10b903: 5f pop %edi 10b904: c9 leave 10b905: c3 ret 10b906: 66 90 xchg %ax,%ax block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b908: 8b 7d 08 mov 0x8(%ebp),%edi 10b90b: 8b 7f 14 mov 0x14(%edi),%edi 10b90e: 89 7d a8 mov %edi,-0x58(%ebp) 10b911: 89 f0 mov %esi,%eax 10b913: 31 d2 xor %edx,%edx 10b915: f7 f7 div %edi 10b917: 89 45 a4 mov %eax,-0x5c(%ebp) 10b91a: 89 45 c0 mov %eax,-0x40(%ebp) for ( ; block < block_count; block++ ) { 10b91d: 85 c0 test %eax,%eax 10b91f: 0f 84 e6 00 00 00 je 10ba0b <_Objects_Extend_information+0x30f><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) 10b925: 8b 7d 08 mov 0x8(%ebp),%edi 10b928: 8b 4f 34 mov 0x34(%edi),%ecx 10b92b: 8b 19 mov (%ecx),%ebx 10b92d: 85 db test %ebx,%ebx 10b92f: 0f 84 d6 00 00 00 je 10ba0b <_Objects_Extend_information+0x30f><== NEVER TAKEN 10b935: 8b 45 c8 mov -0x38(%ebp),%eax 10b938: 89 45 c4 mov %eax,-0x3c(%ebp) 10b93b: 31 db xor %ebx,%ebx 10b93d: eb 08 jmp 10b947 <_Objects_Extend_information+0x24b> 10b93f: 90 nop 10b940: 8b 14 99 mov (%ecx,%ebx,4),%edx 10b943: 85 d2 test %edx,%edx 10b945: 74 0c je 10b953 <_Objects_Extend_information+0x257> break; else index_base += information->allocation_size; 10b947: 8b 55 a8 mov -0x58(%ebp),%edx 10b94a: 01 55 c4 add %edx,-0x3c(%ebp) if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b94d: 43 inc %ebx 10b94e: 39 5d a4 cmp %ebx,-0x5c(%ebp) 10b951: 77 ed ja 10b940 <_Objects_Extend_information+0x244> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10b953: 39 75 c4 cmp %esi,-0x3c(%ebp) 10b956: 0f 82 f0 fe ff ff jb 10b84c <_Objects_Extend_information+0x150> 10b95c: 8b 7d a4 mov -0x5c(%ebp),%edi 10b95f: 47 inc %edi 10b960: 89 7d e0 mov %edi,-0x20(%ebp) 10b963: 8d 14 7f lea (%edi,%edi,2),%edx 10b966: e9 d2 fd ff ff jmp 10b73d <_Objects_Extend_information+0x41> 10b96b: 90 nop /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 10b96c: 83 ec 0c sub $0xc,%esp 10b96f: 8b 4d c8 mov -0x38(%ebp),%ecx 10b972: 8d 04 0a lea (%edx,%ecx,1),%eax 10b975: 01 f0 add %esi,%eax 10b977: c1 e0 02 shl $0x2,%eax 10b97a: 50 push %eax 10b97b: e8 44 1b 00 00 call 10d4c4 <_Workspace_Allocate> 10b980: 89 45 cc mov %eax,-0x34(%ebp) block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 10b983: 83 c4 10 add $0x10,%esp 10b986: 85 c0 test %eax,%eax 10b988: 0f 85 dd fd ff ff jne 10b76b <_Objects_Extend_information+0x6f><== ALWAYS TAKEN 10b98e: e9 6b ff ff ff jmp 10b8fe <_Objects_Extend_information+0x202><== NOT EXECUTED 10b993: 90 nop <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 10b994: c1 e3 02 shl $0x2,%ebx 10b997: 89 5d dc mov %ebx,-0x24(%ebp) 10b99a: 8b 4d 08 mov 0x8(%ebp),%ecx 10b99d: 03 59 34 add 0x34(%ecx),%ebx 10b9a0: 83 ec 0c sub $0xc,%esp 10b9a3: 8b 75 a8 mov -0x58(%ebp),%esi 10b9a6: 0f af 71 18 imul 0x18(%ecx),%esi 10b9aa: 56 push %esi 10b9ab: e8 2c 1b 00 00 call 10d4dc <_Workspace_Allocate_or_fatal_error> 10b9b0: 89 03 mov %eax,(%ebx) 10b9b2: 8b 7d 08 mov 0x8(%ebp),%edi 10b9b5: 8b 47 34 mov 0x34(%edi),%eax 10b9b8: 8b 55 dc mov -0x24(%ebp),%edx 10b9bb: 8b 04 10 mov (%eax,%edx,1),%eax 10b9be: 83 c4 10 add $0x10,%esp 10b9c1: e9 be fe ff ff jmp 10b884 <_Objects_Extend_information+0x188> 10b9c6: 66 90 xchg %ax,%ax /* * 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, 10b9c8: 8b 45 c0 mov -0x40(%ebp),%eax 10b9cb: c1 e0 02 shl $0x2,%eax 10b9ce: 8b 7d 08 mov 0x8(%ebp),%edi 10b9d1: 8b 77 34 mov 0x34(%edi),%esi 10b9d4: 8b 7d cc mov -0x34(%ebp),%edi 10b9d7: 89 c1 mov %eax,%ecx 10b9d9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b9db: 8b 55 08 mov 0x8(%ebp),%edx 10b9de: 8b 72 30 mov 0x30(%edx),%esi 10b9e1: 8b 7d d0 mov -0x30(%ebp),%edi 10b9e4: 89 c1 mov %eax,%ecx 10b9e6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b9e8: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10b9ec: 03 4d c8 add -0x38(%ebp),%ecx 10b9ef: c1 e1 02 shl $0x2,%ecx 10b9f2: 8b 72 1c mov 0x1c(%edx),%esi 10b9f5: 8b 7d d8 mov -0x28(%ebp),%edi 10b9f8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b9fa: e9 ad fd ff ff jmp 10b7ac <_Objects_Extend_information+0xb0> 10b9ff: 90 nop information->maximum ); _ISR_Enable( level ); if ( old_tables ) 10ba00: 8b 4f 14 mov 0x14(%edi),%ecx 10ba03: 89 4d a8 mov %ecx,-0x58(%ebp) 10ba06: e9 41 fe ff ff jmp 10b84c <_Objects_Extend_information+0x150> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10ba0b: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 10ba0e: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 10ba11: 31 db xor %ebx,%ebx <== NOT EXECUTED 10ba13: e9 3b ff ff ff jmp 10b953 <_Objects_Extend_information+0x257><== NOT EXECUTED =============================================================================== 0010ba18 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 57 push %edi 10ba1c: 56 push %esi 10ba1d: 53 push %ebx 10ba1e: 83 ec 14 sub $0x14,%esp 10ba21: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba24: 8b 75 0c mov 0xc(%ebp),%esi uint32_t allocation_size = information->allocation_size; 10ba27: 8b 7b 14 mov 0x14(%ebx),%edi _Chain_Append( &information->Inactive, &the_object->Node ); 10ba2a: 56 push %esi 10ba2b: 8d 43 20 lea 0x20(%ebx),%eax 10ba2e: 50 push %eax 10ba2f: e8 ec f3 ff ff call 10ae20 <_Chain_Append> if ( information->auto_extend ) { 10ba34: 83 c4 10 add $0x10,%esp 10ba37: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ba3b: 74 35 je 10ba72 <_Objects_Free+0x5a> uint32_t block; block = 10ba3d: 8b 46 08 mov 0x8(%esi),%eax 10ba40: 25 ff ff 00 00 and $0xffff,%eax 10ba45: 8b 53 08 mov 0x8(%ebx),%edx 10ba48: 81 e2 ff ff 00 00 and $0xffff,%edx 10ba4e: 29 d0 sub %edx,%eax _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]++; 10ba50: 31 d2 xor %edx,%edx 10ba52: f7 73 14 divl 0x14(%ebx) 10ba55: c1 e0 02 shl $0x2,%eax 10ba58: 03 43 30 add 0x30(%ebx),%eax 10ba5b: ff 00 incl (%eax) information->inactive++; 10ba5d: 8b 53 2c mov 0x2c(%ebx),%edx 10ba60: 42 inc %edx 10ba61: 66 89 53 2c mov %dx,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 ) ) ) { 10ba65: 0f b7 d2 movzwl %dx,%edx 10ba68: 89 f8 mov %edi,%eax 10ba6a: d1 e8 shr %eax 10ba6c: 01 f8 add %edi,%eax 10ba6e: 39 c2 cmp %eax,%edx 10ba70: 77 0a ja 10ba7c <_Objects_Free+0x64> _Objects_Shrink_information( information ); } } } 10ba72: 8d 65 f4 lea -0xc(%ebp),%esp 10ba75: 5b pop %ebx 10ba76: 5e pop %esi 10ba77: 5f pop %edi 10ba78: c9 leave 10ba79: c3 ret 10ba7a: 66 90 xchg %ax,%ax * 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 ); 10ba7c: 89 5d 08 mov %ebx,0x8(%ebp) } } } 10ba7f: 8d 65 f4 lea -0xc(%ebp),%esp 10ba82: 5b pop %ebx 10ba83: 5e pop %esi 10ba84: 5f pop %edi 10ba85: 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 ); 10ba86: e9 a5 02 00 00 jmp 10bd30 <_Objects_Shrink_information> =============================================================================== 0010bb4c <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10bb4c: 55 push %ebp 10bb4d: 89 e5 mov %esp,%ebp 10bb4f: 53 push %ebx 10bb50: 83 ec 04 sub $0x4,%esp 10bb53: 8b 4d 08 mov 0x8(%ebp),%ecx * 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; 10bb56: ba 01 00 00 00 mov $0x1,%edx 10bb5b: 2b 51 08 sub 0x8(%ecx),%edx 10bb5e: 03 55 0c add 0xc(%ebp),%edx /* * 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 ) { 10bb61: 0f b7 41 10 movzwl 0x10(%ecx),%eax 10bb65: 39 c2 cmp %eax,%edx 10bb67: 77 27 ja 10bb90 <_Objects_Get+0x44> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10bb69: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10bb6e: 40 inc %eax 10bb6f: a3 f8 f8 11 00 mov %eax,0x11f8f8 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10bb74: 8b 41 1c mov 0x1c(%ecx),%eax 10bb77: 8b 1c 90 mov (%eax,%edx,4),%ebx 10bb7a: 85 db test %ebx,%ebx 10bb7c: 74 1f je 10bb9d <_Objects_Get+0x51> *location = OBJECTS_LOCAL; 10bb7e: 8b 45 10 mov 0x10(%ebp),%eax 10bb81: c7 00 00 00 00 00 movl $0x0,(%eax) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10bb87: 89 d8 mov %ebx,%eax 10bb89: 5a pop %edx 10bb8a: 5b pop %ebx 10bb8b: c9 leave 10bb8c: c3 ret 10bb8d: 8d 76 00 lea 0x0(%esi),%esi /* * 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; 10bb90: 8b 45 10 mov 0x10(%ebp),%eax 10bb93: c7 00 01 00 00 00 movl $0x1,(%eax) 10bb99: 31 db xor %ebx,%ebx 10bb9b: eb ea jmp 10bb87 <_Objects_Get+0x3b> /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10bb9d: e8 ee 07 00 00 call 10c390 <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10bba2: 8b 45 10 mov 0x10(%ebp),%eax 10bba5: c7 00 01 00 00 00 movl $0x1,(%eax) 10bbab: eb da jmp 10bb87 <_Objects_Get+0x3b> =============================================================================== 0010baac <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10baac: 55 push %ebp 10baad: 89 e5 mov %esp,%ebp 10baaf: 53 push %ebx 10bab0: 83 ec 04 sub $0x4,%esp 10bab3: 8b 5d 08 mov 0x8(%ebp),%ebx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10bab6: 8d 43 ff lea -0x1(%ebx),%eax 10bab9: 83 f8 03 cmp $0x3,%eax 10babc: 77 07 ja 10bac5 <_Objects_Get_information+0x19> int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 10babe: 8b 45 0c mov 0xc(%ebp),%eax 10bac1: 85 c0 test %eax,%eax 10bac3: 75 07 jne 10bacc <_Objects_Get_information+0x20> * 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 ) 10bac5: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10bac7: 8b 5d fc mov -0x4(%ebp),%ebx 10baca: c9 leave 10bacb: c3 ret return NULL; if ( !the_class ) return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10bacc: 83 ec 0c sub $0xc,%esp 10bacf: 53 push %ebx 10bad0: e8 f7 40 00 00 call 10fbcc <_Objects_API_maximum_class> if ( the_class_api_maximum < 0 || 10bad5: 83 c4 10 add $0x10,%esp 10bad8: 85 c0 test %eax,%eax 10bada: 78 e9 js 10bac5 <_Objects_Get_information+0x19><== NEVER TAKEN 10badc: 39 45 0c cmp %eax,0xc(%ebp) 10badf: 77 e4 ja 10bac5 <_Objects_Get_information+0x19><== NEVER TAKEN the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10bae1: 8b 04 9d cc f8 11 00 mov 0x11f8cc(,%ebx,4),%eax 10bae8: 85 c0 test %eax,%eax 10baea: 74 d9 je 10bac5 <_Objects_Get_information+0x19><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10baec: 8b 55 0c mov 0xc(%ebp),%edx 10baef: 8b 04 90 mov (%eax,%edx,4),%eax if ( !info ) 10baf2: 85 c0 test %eax,%eax 10baf4: 74 d1 je 10bac7 <_Objects_Get_information+0x1b><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10baf6: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10bafb: 75 ca jne 10bac7 <_Objects_Get_information+0x1b> 10bafd: eb c6 jmp 10bac5 <_Objects_Get_information+0x19> =============================================================================== 0010cf18 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10cf18: 55 push %ebp 10cf19: 89 e5 mov %esp,%ebp 10cf1b: 57 push %edi 10cf1c: 56 push %esi 10cf1d: 53 push %ebx 10cf1e: 83 ec 1c sub $0x1c,%esp 10cf21: 8b 75 0c mov 0xc(%ebp),%esi 10cf24: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10cf27: 85 f6 test %esi,%esi 10cf29: 75 0d jne 10cf38 <_Objects_Get_name_as_string+0x20> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 10cf2b: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 10cf2d: 89 d8 mov %ebx,%eax 10cf2f: 8d 65 f4 lea -0xc(%ebp),%esp 10cf32: 5b pop %ebx 10cf33: 5e pop %esi 10cf34: 5f pop %edi 10cf35: c9 leave 10cf36: c3 ret 10cf37: 90 nop Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10cf38: 85 db test %ebx,%ebx 10cf3a: 74 f1 je 10cf2d <_Objects_Get_name_as_string+0x15> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10cf3c: 8b 7d 08 mov 0x8(%ebp),%edi 10cf3f: 85 ff test %edi,%edi 10cf41: 0f 84 8d 00 00 00 je 10cfd4 <_Objects_Get_name_as_string+0xbc> 10cf47: 8b 45 08 mov 0x8(%ebp),%eax 10cf4a: 89 45 e0 mov %eax,-0x20(%ebp) information = _Objects_Get_information_id( tmpId ); 10cf4d: 83 ec 0c sub $0xc,%esp 10cf50: ff 75 e0 pushl -0x20(%ebp) 10cf53: e8 00 ff ff ff call 10ce58 <_Objects_Get_information_id> 10cf58: 89 c7 mov %eax,%edi if ( !information ) 10cf5a: 83 c4 10 add $0x10,%esp 10cf5d: 85 c0 test %eax,%eax 10cf5f: 74 ca je 10cf2b <_Objects_Get_name_as_string+0x13> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10cf61: 51 push %ecx 10cf62: 8d 45 f0 lea -0x10(%ebp),%eax 10cf65: 50 push %eax 10cf66: ff 75 e0 pushl -0x20(%ebp) 10cf69: 57 push %edi 10cf6a: e8 a9 00 00 00 call 10d018 <_Objects_Get> switch ( location ) { 10cf6f: 83 c4 10 add $0x10,%esp 10cf72: 8b 55 f0 mov -0x10(%ebp),%edx 10cf75: 85 d2 test %edx,%edx 10cf77: 75 b2 jne 10cf2b <_Objects_Get_name_as_string+0x13> case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 10cf79: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10cf7d: 74 65 je 10cfe4 <_Objects_Get_name_as_string+0xcc> s = the_object->name.name_p; 10cf7f: 8b 40 0c mov 0xc(%eax),%eax 10cf82: 89 45 dc mov %eax,-0x24(%ebp) lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 10cf85: 85 c0 test %eax,%eax 10cf87: 0f 84 84 00 00 00 je 10d011 <_Objects_Get_name_as_string+0xf9> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10cf8d: 4e dec %esi 10cf8e: 89 75 d8 mov %esi,-0x28(%ebp) 10cf91: 74 7e je 10d011 <_Objects_Get_name_as_string+0xf9><== NEVER TAKEN 10cf93: 8b 45 dc mov -0x24(%ebp),%eax 10cf96: 8a 08 mov (%eax),%cl 10cf98: 84 c9 test %cl,%cl 10cf9a: 74 75 je 10d011 <_Objects_Get_name_as_string+0xf9> 10cf9c: 89 df mov %ebx,%edi 10cf9e: 31 f6 xor %esi,%esi 10cfa0: eb 0c jmp 10cfae <_Objects_Get_name_as_string+0x96> 10cfa2: 66 90 xchg %ax,%ax 10cfa4: 8b 45 dc mov -0x24(%ebp),%eax 10cfa7: 8a 0c 30 mov (%eax,%esi,1),%cl 10cfaa: 84 c9 test %cl,%cl 10cfac: 74 19 je 10cfc7 <_Objects_Get_name_as_string+0xaf> *d = (isprint(*s)) ? *s : '*'; 10cfae: 0f be d1 movsbl %cl,%edx 10cfb1: a1 08 1a 12 00 mov 0x121a08,%eax 10cfb6: f6 04 10 97 testb $0x97,(%eax,%edx,1) 10cfba: 75 02 jne 10cfbe <_Objects_Get_name_as_string+0xa6> 10cfbc: b1 2a mov $0x2a,%cl 10cfbe: 88 0f mov %cl,(%edi) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10cfc0: 46 inc %esi 10cfc1: 47 inc %edi 10cfc2: 3b 75 d8 cmp -0x28(%ebp),%esi 10cfc5: 72 dd jb 10cfa4 <_Objects_Get_name_as_string+0x8c> *d = (isprint(*s)) ? *s : '*'; } } *d = '\0'; 10cfc7: c6 07 00 movb $0x0,(%edi) _Thread_Enable_dispatch(); 10cfca: e8 8d 08 00 00 call 10d85c <_Thread_Enable_dispatch> 10cfcf: e9 59 ff ff ff jmp 10cf2d <_Objects_Get_name_as_string+0x15> return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10cfd4: a1 bc b9 12 00 mov 0x12b9bc,%eax 10cfd9: 8b 40 08 mov 0x8(%eax),%eax 10cfdc: 89 45 e0 mov %eax,-0x20(%ebp) 10cfdf: e9 69 ff ff ff jmp 10cf4d <_Objects_Get_name_as_string+0x35> case OBJECTS_LOCAL: if ( information->is_string ) { s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 10cfe4: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 10cfe7: 89 d0 mov %edx,%eax 10cfe9: c1 e8 18 shr $0x18,%eax 10cfec: 88 45 eb mov %al,-0x15(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10cfef: 89 d0 mov %edx,%eax 10cff1: c1 e8 10 shr $0x10,%eax 10cff4: 88 45 ec mov %al,-0x14(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10cff7: 89 d0 mov %edx,%eax 10cff9: c1 e8 08 shr $0x8,%eax 10cffc: 88 45 ed mov %al,-0x13(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10cfff: 88 55 ee mov %dl,-0x12(%ebp) lname[ 4 ] = '\0'; 10d002: c6 45 ef 00 movb $0x0,-0x11(%ebp) 10d006: 8d 45 eb lea -0x15(%ebp),%eax 10d009: 89 45 dc mov %eax,-0x24(%ebp) 10d00c: e9 7c ff ff ff jmp 10cf8d <_Objects_Get_name_as_string+0x75> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10d011: 89 df mov %ebx,%edi 10d013: eb b2 jmp 10cfc7 <_Objects_Get_name_as_string+0xaf> =============================================================================== 00116c44 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 116c44: 55 push %ebp 116c45: 89 e5 mov %esp,%ebp 116c47: 8b 4d 08 mov 0x8(%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; 116c4a: ba 01 00 00 00 mov $0x1,%edx 116c4f: 2b 51 08 sub 0x8(%ecx),%edx 116c52: 03 55 0c add 0xc(%ebp),%edx if ( information->maximum >= index ) { 116c55: 0f b7 41 10 movzwl 0x10(%ecx),%eax 116c59: 39 c2 cmp %eax,%edx 116c5b: 77 17 ja 116c74 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 116c5d: 8b 41 1c mov 0x1c(%ecx),%eax 116c60: 8b 04 90 mov (%eax,%edx,4),%eax 116c63: 85 c0 test %eax,%eax 116c65: 74 0d je 116c74 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 116c67: 8b 55 10 mov 0x10(%ebp),%edx 116c6a: c7 02 00 00 00 00 movl $0x0,(%edx) * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 116c70: c9 leave 116c71: c3 ret 116c72: 66 90 xchg %ax,%ax /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 116c74: 8b 45 10 mov 0x10(%ebp),%eax 116c77: c7 00 01 00 00 00 movl $0x1,(%eax) 116c7d: 31 c0 xor %eax,%eax return NULL; } 116c7f: c9 leave 116c80: c3 ret =============================================================================== 0010cbe0 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10cbe0: 55 push %ebp 10cbe1: 89 e5 mov %esp,%ebp 10cbe3: 53 push %ebx 10cbe4: 83 ec 14 sub $0x14,%esp 10cbe7: 8b 45 08 mov 0x8(%ebp),%eax 10cbea: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 10cbed: 85 db test %ebx,%ebx 10cbef: 74 7b je 10cc6c <_Objects_Id_to_name+0x8c><== NEVER TAKEN return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10cbf1: 85 c0 test %eax,%eax 10cbf3: 74 53 je 10cc48 <_Objects_Id_to_name+0x68> 10cbf5: 89 c1 mov %eax,%ecx uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10cbf7: 89 ca mov %ecx,%edx 10cbf9: c1 ea 18 shr $0x18,%edx 10cbfc: 83 e2 07 and $0x7,%edx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10cbff: 8d 42 ff lea -0x1(%edx),%eax 10cc02: 83 f8 03 cmp $0x3,%eax 10cc05: 77 59 ja 10cc60 <_Objects_Id_to_name+0x80> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10cc07: 8b 14 95 ac 37 12 00 mov 0x1237ac(,%edx,4),%edx 10cc0e: 85 d2 test %edx,%edx 10cc10: 74 4e je 10cc60 <_Objects_Id_to_name+0x80><== NEVER TAKEN return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10cc12: 89 c8 mov %ecx,%eax 10cc14: c1 e8 1b shr $0x1b,%eax 10cc17: 8b 14 82 mov (%edx,%eax,4),%edx if ( !information ) 10cc1a: 85 d2 test %edx,%edx 10cc1c: 74 42 je 10cc60 <_Objects_Id_to_name+0x80><== NEVER TAKEN return OBJECTS_INVALID_ID; if ( information->is_string ) 10cc1e: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10cc22: 75 3c jne 10cc60 <_Objects_Id_to_name+0x80><== NEVER TAKEN return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 10cc24: 50 push %eax 10cc25: 8d 45 f8 lea -0x8(%ebp),%eax 10cc28: 50 push %eax 10cc29: 51 push %ecx 10cc2a: 52 push %edx 10cc2b: e8 4c ff ff ff call 10cb7c <_Objects_Get> if ( !the_object ) 10cc30: 83 c4 10 add $0x10,%esp 10cc33: 85 c0 test %eax,%eax 10cc35: 74 29 je 10cc60 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; *name = the_object->name; 10cc37: 8b 40 0c mov 0xc(%eax),%eax 10cc3a: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10cc3c: e8 13 08 00 00 call 10d454 <_Thread_Enable_dispatch> 10cc41: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10cc43: 8b 5d fc mov -0x4(%ebp),%ebx 10cc46: c9 leave 10cc47: c3 ret Objects_Locations ignored_location; if ( !name ) return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10cc48: a1 9c 38 12 00 mov 0x12389c,%eax 10cc4d: 8b 48 08 mov 0x8(%eax),%ecx uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10cc50: 89 ca mov %ecx,%edx 10cc52: c1 ea 18 shr $0x18,%edx 10cc55: 83 e2 07 and $0x7,%edx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10cc58: 8d 42 ff lea -0x1(%edx),%eax 10cc5b: 83 f8 03 cmp $0x3,%eax 10cc5e: 76 a7 jbe 10cc07 <_Objects_Id_to_name+0x27><== ALWAYS TAKEN if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cc60: b8 03 00 00 00 mov $0x3,%eax } 10cc65: 8b 5d fc mov -0x4(%ebp),%ebx 10cc68: c9 leave 10cc69: c3 ret 10cc6a: 66 90 xchg %ax,%ax Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 10cc6c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10cc71: eb f2 jmp 10cc65 <_Objects_Id_to_name+0x85><== NOT EXECUTED =============================================================================== 00115278 <_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 ) { 115278: 55 push %ebp 115279: 89 e5 mov %esp,%ebp 11527b: 57 push %edi 11527c: 56 push %esi 11527d: 53 push %ebx 11527e: 83 ec 0c sub $0xc,%esp uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 115281: 8b 4d 10 mov 0x10(%ebp),%ecx 115284: 85 c9 test %ecx,%ecx 115286: 74 74 je 1152fc <_Objects_Name_to_id_string+0x84><== NEVER TAKEN return OBJECTS_INVALID_ADDRESS; if ( !name ) 115288: 8b 55 0c mov 0xc(%ebp),%edx 11528b: 85 d2 test %edx,%edx 11528d: 74 4a je 1152d9 <_Objects_Name_to_id_string+0x61><== NEVER TAKEN return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 11528f: 8b 55 08 mov 0x8(%ebp),%edx 115292: 8b 42 10 mov 0x10(%edx),%eax 115295: 66 85 c0 test %ax,%ax 115298: 74 3f je 1152d9 <_Objects_Name_to_id_string+0x61><== NEVER TAKEN name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 11529a: 0f b7 c0 movzwl %ax,%eax 11529d: 89 45 f0 mov %eax,-0x10(%ebp) 1152a0: 85 c0 test %eax,%eax 1152a2: 74 35 je 1152d9 <_Objects_Name_to_id_string+0x61><== NEVER TAKEN 1152a4: 8b 7a 1c mov 0x1c(%edx),%edi 1152a7: bb 01 00 00 00 mov $0x1,%ebx the_object = information->local_table[ index ]; 1152ac: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 1152af: 85 f6 test %esi,%esi 1152b1: 74 20 je 1152d3 <_Objects_Name_to_id_string+0x5b> continue; if ( !the_object->name.name_p ) 1152b3: 8b 56 0c mov 0xc(%esi),%edx 1152b6: 85 d2 test %edx,%edx 1152b8: 74 19 je 1152d3 <_Objects_Name_to_id_string+0x5b> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 1152ba: 50 push %eax 1152bb: 8b 4d 08 mov 0x8(%ebp),%ecx 1152be: 0f b7 41 3a movzwl 0x3a(%ecx),%eax 1152c2: 50 push %eax 1152c3: 52 push %edx 1152c4: ff 75 0c pushl 0xc(%ebp) 1152c7: e8 24 27 00 00 call 1179f0 1152cc: 83 c4 10 add $0x10,%esp 1152cf: 85 c0 test %eax,%eax 1152d1: 74 15 je 1152e8 <_Objects_Name_to_id_string+0x70> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1152d3: 43 inc %ebx 1152d4: 3b 5d f0 cmp -0x10(%ebp),%ebx 1152d7: 76 d3 jbe 1152ac <_Objects_Name_to_id_string+0x34> 1152d9: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 1152de: 8d 65 f4 lea -0xc(%ebp),%esp 1152e1: 5b pop %ebx 1152e2: 5e pop %esi 1152e3: 5f pop %edi 1152e4: c9 leave 1152e5: c3 ret 1152e6: 66 90 xchg %ax,%ax if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 1152e8: 8b 46 08 mov 0x8(%esi),%eax 1152eb: 8b 55 10 mov 0x10(%ebp),%edx 1152ee: 89 02 mov %eax,(%edx) 1152f0: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 1152f2: 8d 65 f4 lea -0xc(%ebp),%esp 1152f5: 5b pop %ebx 1152f6: 5e pop %esi 1152f7: 5f pop %edi 1152f8: c9 leave 1152f9: c3 ret 1152fa: 66 90 xchg %ax,%ax uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 1152fc: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED } } } return OBJECTS_INVALID_NAME; } 115301: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 115304: 5b pop %ebx <== NOT EXECUTED 115305: 5e pop %esi <== NOT EXECUTED 115306: 5f pop %edi <== NOT EXECUTED 115307: c9 leave <== NOT EXECUTED 115308: c3 ret <== NOT EXECUTED =============================================================================== 0010bca4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10bca4: 55 push %ebp 10bca5: 89 e5 mov %esp,%ebp 10bca7: 57 push %edi 10bca8: 56 push %esi 10bca9: 53 push %ebx 10bcaa: 8b 75 0c mov 0xc(%ebp),%esi 10bcad: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 10bcb0: 85 ff test %edi,%edi 10bcb2: 74 5c je 10bd10 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10bcb4: 85 f6 test %esi,%esi 10bcb6: 74 38 je 10bcf0 <_Objects_Name_to_id_u32+0x4c> return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 10bcb8: 8b 55 08 mov 0x8(%ebp),%edx 10bcbb: 8b 42 10 mov 0x10(%edx),%eax 10bcbe: 66 85 c0 test %ax,%ax 10bcc1: 74 2d je 10bcf0 <_Objects_Name_to_id_u32+0x4c><== NEVER TAKEN 10bcc3: 8b 55 10 mov 0x10(%ebp),%edx 10bcc6: 85 d2 test %edx,%edx 10bcc8: 75 32 jne 10bcfc <_Objects_Name_to_id_u32+0x58> search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10bcca: 0f b7 d8 movzwl %ax,%ebx 10bccd: 85 db test %ebx,%ebx 10bccf: 74 1f je 10bcf0 <_Objects_Name_to_id_u32+0x4c><== NEVER TAKEN if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 10bcd1: 8b 45 08 mov 0x8(%ebp),%eax 10bcd4: 8b 48 1c mov 0x1c(%eax),%ecx 10bcd7: ba 01 00 00 00 mov $0x1,%edx if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 10bcdc: 8b 04 91 mov (%ecx,%edx,4),%eax if ( !the_object ) 10bcdf: 85 c0 test %eax,%eax 10bce1: 74 05 je 10bce8 <_Objects_Name_to_id_u32+0x44> continue; if ( name == the_object->name.name_u32 ) { 10bce3: 39 70 0c cmp %esi,0xc(%eax) 10bce6: 74 34 je 10bd1c <_Objects_Name_to_id_u32+0x78> search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10bce8: 42 inc %edx 10bce9: 39 da cmp %ebx,%edx 10bceb: 76 ef jbe 10bcdc <_Objects_Name_to_id_u32+0x38> 10bced: 8d 76 00 lea 0x0(%esi),%esi 10bcf0: 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 } 10bcf5: 5b pop %ebx 10bcf6: 5e pop %esi 10bcf7: 5f pop %edi 10bcf8: c9 leave 10bcf9: c3 ret 10bcfa: 66 90 xchg %ax,%ax if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 10bcfc: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 10bd03: 74 c5 je 10bcca <_Objects_Name_to_id_u32+0x26> 10bd05: 83 7d 10 01 cmpl $0x1,0x10(%ebp) 10bd09: 75 e5 jne 10bcf0 <_Objects_Name_to_id_u32+0x4c> 10bd0b: eb bd jmp 10bcca <_Objects_Name_to_id_u32+0x26> 10bd0d: 8d 76 00 lea 0x0(%esi),%esi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 10bd10: b8 02 00 00 00 mov $0x2,%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 } 10bd15: 5b pop %ebx 10bd16: 5e pop %esi 10bd17: 5f pop %edi 10bd18: c9 leave 10bd19: c3 ret 10bd1a: 66 90 xchg %ax,%ax the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10bd1c: 8b 40 08 mov 0x8(%eax),%eax 10bd1f: 89 07 mov %eax,(%edi) 10bd21: 31 c0 xor %eax,%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 } 10bd23: 5b pop %ebx 10bd24: 5e pop %esi 10bd25: 5f pop %edi 10bd26: c9 leave 10bd27: c3 ret =============================================================================== 0010c3c0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10c3c0: 55 push %ebp 10c3c1: 89 e5 mov %esp,%ebp 10c3c3: 57 push %edi 10c3c4: 56 push %esi 10c3c5: 53 push %ebx 10c3c6: 83 ec 14 sub $0x14,%esp 10c3c9: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3cc: 8b 7d 10 mov 0x10(%ebp),%edi size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 10c3cf: 0f b7 43 3a movzwl 0x3a(%ebx),%eax 10c3d3: 50 push %eax 10c3d4: 57 push %edi 10c3d5: e8 92 6a 00 00 call 112e6c 10c3da: 8d 70 01 lea 0x1(%eax),%esi if ( information->is_string ) { 10c3dd: 83 c4 10 add $0x10,%esp 10c3e0: 80 7b 38 00 cmpb $0x0,0x38(%ebx) 10c3e4: 75 5a jne 10c440 <_Objects_Set_name+0x80> strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 10c3e6: 85 f6 test %esi,%esi 10c3e8: 74 3e je 10c428 <_Objects_Set_name+0x68><== NEVER TAKEN 10c3ea: 0f be 17 movsbl (%edi),%edx 10c3ed: c1 e2 18 shl $0x18,%edx 10c3f0: 83 fe 01 cmp $0x1,%esi 10c3f3: 0f 84 ae 00 00 00 je 10c4a7 <_Objects_Set_name+0xe7> 10c3f9: 0f be 47 01 movsbl 0x1(%edi),%eax 10c3fd: c1 e0 10 shl $0x10,%eax 10c400: 09 d0 or %edx,%eax 10c402: 83 fe 02 cmp $0x2,%esi 10c405: 0f 84 89 00 00 00 je 10c494 <_Objects_Set_name+0xd4> 10c40b: 0f be 57 02 movsbl 0x2(%edi),%edx 10c40f: c1 e2 08 shl $0x8,%edx 10c412: 09 c2 or %eax,%edx 10c414: 83 fe 03 cmp $0x3,%esi 10c417: 0f 84 83 00 00 00 je 10c4a0 <_Objects_Set_name+0xe0> 10c41d: 0f be 47 03 movsbl 0x3(%edi),%eax 10c421: 09 d0 or %edx,%eax 10c423: eb 08 jmp 10c42d <_Objects_Set_name+0x6d> 10c425: 8d 76 00 lea 0x0(%esi),%esi 10c428: b8 20 20 20 20 mov $0x20202020,%eax <== NOT EXECUTED 10c42d: 8b 55 0c mov 0xc(%ebp),%edx 10c430: 89 42 0c mov %eax,0xc(%edx) 10c433: b0 01 mov $0x1,%al ); } return TRUE; } 10c435: 8d 65 f4 lea -0xc(%ebp),%esp 10c438: 5b pop %ebx 10c439: 5e pop %esi 10c43a: 5f pop %edi 10c43b: c9 leave 10c43c: c3 ret 10c43d: 8d 76 00 lea 0x0(%esi),%esi length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 10c440: 83 ec 0c sub $0xc,%esp 10c443: 56 push %esi 10c444: e8 ff 17 00 00 call 10dc48 <_Workspace_Allocate> 10c449: 89 c3 mov %eax,%ebx if ( !d ) 10c44b: 83 c4 10 add $0x10,%esp 10c44e: 85 c0 test %eax,%eax 10c450: 74 4a je 10c49c <_Objects_Set_name+0xdc><== NEVER TAKEN return FALSE; if ( the_object->name.name_p ) { 10c452: 8b 55 0c mov 0xc(%ebp),%edx 10c455: 8b 42 0c mov 0xc(%edx),%eax 10c458: 85 c0 test %eax,%eax 10c45a: 74 16 je 10c472 <_Objects_Set_name+0xb2> _Workspace_Free( (void *)the_object->name.name_p ); 10c45c: 83 ec 0c sub $0xc,%esp 10c45f: 50 push %eax 10c460: e8 cb 17 00 00 call 10dc30 <_Workspace_Free> the_object->name.name_p = NULL; 10c465: 8b 45 0c mov 0xc(%ebp),%eax 10c468: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10c46f: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10c472: 50 push %eax 10c473: 56 push %esi 10c474: 57 push %edi 10c475: 53 push %ebx 10c476: e8 69 69 00 00 call 112de4 d[ length ] = '\0'; 10c47b: c6 04 33 00 movb $0x0,(%ebx,%esi,1) the_object->name.name_p = d; 10c47f: 8b 55 0c mov 0xc(%ebp),%edx 10c482: 89 5a 0c mov %ebx,0xc(%edx) 10c485: b0 01 mov $0x1,%al 10c487: 83 c4 10 add $0x10,%esp ); } return TRUE; } 10c48a: 8d 65 f4 lea -0xc(%ebp),%esp 10c48d: 5b pop %ebx 10c48e: 5e pop %esi 10c48f: 5f pop %edi 10c490: c9 leave 10c491: c3 ret 10c492: 66 90 xchg %ax,%ax strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 10c494: 0d 20 20 00 00 or $0x2020,%eax 10c499: eb 92 jmp 10c42d <_Objects_Set_name+0x6d> 10c49b: 90 nop if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); if ( !d ) 10c49c: 31 c0 xor %eax,%eax 10c49e: eb 95 jmp 10c435 <_Objects_Set_name+0x75><== NOT EXECUTED strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 10c4a0: 89 d0 mov %edx,%eax 10c4a2: 83 c8 20 or $0x20,%eax 10c4a5: eb 86 jmp 10c42d <_Objects_Set_name+0x6d> 10c4a7: 89 d0 mov %edx,%eax 10c4a9: 0d 20 20 20 00 or $0x202020,%eax 10c4ae: e9 7a ff ff ff jmp 10c42d <_Objects_Set_name+0x6d> =============================================================================== 0010bd30 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10bd30: 55 push %ebp 10bd31: 89 e5 mov %esp,%ebp 10bd33: 57 push %edi 10bd34: 56 push %esi 10bd35: 53 push %ebx 10bd36: 83 ec 0c sub $0xc,%esp * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 10bd39: 8b 55 08 mov 0x8(%ebp),%edx 10bd3c: 8b 42 08 mov 0x8(%edx),%eax 10bd3f: 0f b7 f0 movzwl %ax,%esi /* * Search the list to find block or chunnk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; 10bd42: 8b 4a 14 mov 0x14(%edx),%ecx 10bd45: 0f b7 42 10 movzwl 0x10(%edx),%eax 10bd49: 29 f0 sub %esi,%eax 10bd4b: 31 d2 xor %edx,%edx 10bd4d: f7 f1 div %ecx for ( block = 0; block < block_count; block++ ) { 10bd4f: 85 c0 test %eax,%eax 10bd51: 74 24 je 10bd77 <_Objects_Shrink_information+0x47><== NEVER TAKEN if ( information->inactive_per_block[ block ] == information->allocation_size ) { 10bd53: 8b 55 08 mov 0x8(%ebp),%edx 10bd56: 8b 5a 30 mov 0x30(%edx),%ebx 10bd59: 3b 0b cmp (%ebx),%ecx 10bd5b: 74 22 je 10bd7f <_Objects_Shrink_information+0x4f><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10bd5d: 31 d2 xor %edx,%edx 10bd5f: eb 11 jmp 10bd72 <_Objects_Shrink_information+0x42> 10bd61: 8d 76 00 lea 0x0(%esi),%esi } index_base += information->allocation_size; 10bd64: 01 ce add %ecx,%esi 10bd66: 8d 3c 95 00 00 00 00 lea 0x0(,%edx,4),%edi index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 10bd6d: 3b 0c 93 cmp (%ebx,%edx,4),%ecx 10bd70: 74 12 je 10bd84 <_Objects_Shrink_information+0x54> */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10bd72: 42 inc %edx 10bd73: 39 d0 cmp %edx,%eax 10bd75: 77 ed ja 10bd64 <_Objects_Shrink_information+0x34> return; } index_base += information->allocation_size; } } 10bd77: 8d 65 f4 lea -0xc(%ebp),%esp 10bd7a: 5b pop %ebx 10bd7b: 5e pop %esi 10bd7c: 5f pop %edi 10bd7d: c9 leave 10bd7e: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 10bd7f: 31 ff xor %edi,%edi <== NOT EXECUTED 10bd81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 10bd84: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd87: 8b 4b 20 mov 0x20(%ebx),%ecx 10bd8a: eb 26 jmp 10bdb2 <_Objects_Shrink_information+0x82> */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 10bd8c: 89 f0 mov %esi,%eax 10bd8e: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd91: 03 43 14 add 0x14(%ebx),%eax 10bd94: 39 d0 cmp %edx,%eax 10bd96: 76 24 jbe 10bdbc <_Objects_Shrink_information+0x8c> * @param[in] start_address is the starting address of the user block * to free * @return TRUE if successfully freed, FALSE otherwise */ bool _Protected_heap_Free( Heap_Control *the_heap, 10bd98: 8b 19 mov (%ecx),%ebx if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 10bd9a: 83 ec 0c sub $0xc,%esp 10bd9d: 51 push %ecx 10bd9e: e8 b1 39 00 00 call 10f754 <_Chain_Extract> 10bda3: 83 c4 10 add $0x10,%esp } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 10bda6: 85 db test %ebx,%ebx 10bda8: 74 1a je 10bdc4 <_Objects_Shrink_information+0x94><== NEVER TAKEN 10bdaa: 8b 03 mov (%ebx),%eax 10bdac: 85 c0 test %eax,%eax 10bdae: 74 14 je 10bdc4 <_Objects_Shrink_information+0x94> 10bdb0: 89 d9 mov %ebx,%ecx * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 10bdb2: 8b 41 08 mov 0x8(%ecx),%eax 10bdb5: 0f b7 d0 movzwl %ax,%edx */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 10bdb8: 39 f2 cmp %esi,%edx 10bdba: 73 d0 jae 10bd8c <_Objects_Shrink_information+0x5c> the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 10bdbc: 8b 19 mov (%ecx),%ebx } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 10bdbe: 85 db test %ebx,%ebx 10bdc0: 75 e8 jne 10bdaa <_Objects_Shrink_information+0x7a><== ALWAYS TAKEN 10bdc2: 66 90 xchg %ax,%ax /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10bdc4: 83 ec 0c sub $0xc,%esp 10bdc7: 8b 55 08 mov 0x8(%ebp),%edx 10bdca: 8b 42 34 mov 0x34(%edx),%eax 10bdcd: ff 34 38 pushl (%eax,%edi,1) 10bdd0: e8 d7 16 00 00 call 10d4ac <_Workspace_Free> information->object_blocks[ block ] = NULL; 10bdd5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bdd8: 8b 43 34 mov 0x34(%ebx),%eax 10bddb: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10bde2: 8b 43 30 mov 0x30(%ebx),%eax 10bde5: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10bdec: 8b 43 14 mov 0x14(%ebx),%eax 10bdef: 66 29 43 2c sub %ax,0x2c(%ebx) 10bdf3: 83 c4 10 add $0x10,%esp return; } index_base += information->allocation_size; } } 10bdf6: 8d 65 f4 lea -0xc(%ebp),%esp 10bdf9: 5b pop %ebx 10bdfa: 5e pop %esi 10bdfb: 5f pop %edi 10bdfc: c9 leave 10bdfd: c3 ret =============================================================================== 0010ab58 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 10ab58: 55 push %ebp 10ab59: 89 e5 mov %esp,%ebp 10ab5b: 53 push %ebx 10ab5c: 83 ec 04 sub $0x4,%esp /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; 10ab5f: 8b 45 08 mov 0x8(%ebp),%eax 10ab62: 8b 58 44 mov 0x44(%eax),%ebx if ( !api_configuration ) 10ab65: 85 db test %ebx,%ebx 10ab67: 74 7f je 10abe8 <_POSIX_API_Initialize+0x90><== NEVER TAKEN api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 10ab69: c7 05 d8 f8 11 00 20 movl $0x11fe20,0x11f8d8 10ab70: fe 11 00 _POSIX_signals_Manager_Initialization( 10ab73: 83 ec 0c sub $0xc,%esp 10ab76: ff 73 14 pushl 0x14(%ebx) 10ab79: e8 a2 42 00 00 call 10ee20 <_POSIX_signals_Manager_Initialization> api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 10ab7e: 83 c4 0c add $0xc,%esp 10ab81: ff 73 30 pushl 0x30(%ebx) 10ab84: ff 73 2c pushl 0x2c(%ebx) 10ab87: ff 33 pushl (%ebx) 10ab89: e8 26 44 00 00 call 10efb4 <_POSIX_Threads_Manager_initialization> api_configuration->maximum_threads, api_configuration->number_of_initialization_threads, api_configuration->User_initialization_threads_table ); _POSIX_Condition_variables_Manager_initialization( 10ab8e: 58 pop %eax 10ab8f: ff 73 08 pushl 0x8(%ebx) 10ab92: e8 79 41 00 00 call 10ed10 <_POSIX_Condition_variables_Manager_initialization> api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 10ab97: 58 pop %eax 10ab98: ff 73 0c pushl 0xc(%ebx) 10ab9b: e8 98 41 00 00 call 10ed38 <_POSIX_Key_Manager_initialization> _POSIX_Mutex_Manager_initialization( 10aba0: 58 pop %eax 10aba1: ff 73 04 pushl 0x4(%ebx) 10aba4: e8 ff 41 00 00 call 10eda8 <_POSIX_Mutex_Manager_initialization> api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 10aba9: 58 pop %eax 10abaa: ff 73 18 pushl 0x18(%ebx) 10abad: e8 ae 41 00 00 call 10ed60 <_POSIX_Message_queue_Manager_initialization> api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 10abb2: 58 pop %eax 10abb3: ff 73 1c pushl 0x1c(%ebx) 10abb6: e8 1d 47 00 00 call 10f2d8 <_POSIX_Semaphore_Manager_initialization> api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 10abbb: 59 pop %ecx 10abbc: ff 73 10 pushl 0x10(%ebx) 10abbf: e8 ec 46 00 00 call 10f2b0 <_POSIX_Timer_Manager_initialization> _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 10abc4: 5a pop %edx 10abc5: ff 73 20 pushl 0x20(%ebx) 10abc8: e8 03 42 00 00 call 10edd0 <_POSIX_Barrier_Manager_initialization> _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 10abcd: 58 pop %eax 10abce: ff 73 24 pushl 0x24(%ebx) 10abd1: e8 22 42 00 00 call 10edf8 <_POSIX_RWLock_Manager_initialization> _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 10abd6: 83 c4 10 add $0x10,%esp 10abd9: 8b 43 28 mov 0x28(%ebx),%eax 10abdc: 89 45 08 mov %eax,0x8(%ebp) } 10abdf: 8b 5d fc mov -0x4(%ebp),%ebx 10abe2: c9 leave _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 10abe3: e9 90 43 00 00 jmp 10ef78 <_POSIX_Spinlock_Manager_initialization> /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) 10abe8: bb 80 91 11 00 mov $0x119180,%ebx <== NOT EXECUTED 10abed: e9 77 ff ff ff jmp 10ab69 <_POSIX_API_Initialize+0x11><== NOT EXECUTED =============================================================================== 0010c128 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10c128: 55 push %ebp 10c129: 89 e5 mov %esp,%ebp 10c12b: 57 push %edi 10c12c: 56 push %esi 10c12d: 53 push %ebx 10c12e: 83 ec 28 sub $0x28,%esp 10c131: 8b 75 08 mov 0x8(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10c134: 8b 45 0c mov 0xc(%ebp),%eax 10c137: c7 00 00 00 00 00 movl $0x0,(%eax) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10c13d: 56 push %esi 10c13e: e8 bd 3e 00 00 call 110000 <_Timespec_Is_valid> 10c143: 83 c4 10 add $0x10,%esp 10c146: 84 c0 test %al,%al 10c148: 75 0a jne 10c154 <_POSIX_Absolute_timeout_to_ticks+0x2c> 10c14a: 31 c0 xor %eax,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10c14c: 8d 65 f4 lea -0xc(%ebp),%esp 10c14f: 5b pop %ebx 10c150: 5e pop %esi 10c151: 5f pop %edi 10c152: c9 leave 10c153: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10c154: 83 ec 0c sub $0xc,%esp 10c157: 8d 7d ec lea -0x14(%ebp),%edi 10c15a: 57 push %edi 10c15b: e8 1c 21 00 00 call 10e27c <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10c160: 5a pop %edx 10c161: 59 pop %ecx 10c162: 57 push %edi 10c163: 56 push %esi 10c164: e8 bf 3e 00 00 call 110028 <_Timespec_Less_than> 10c169: 83 c4 10 add $0x10,%esp 10c16c: 84 c0 test %al,%al 10c16e: 74 10 je 10c180 <_POSIX_Absolute_timeout_to_ticks+0x58> 10c170: b8 01 00 00 00 mov $0x1,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10c175: 8d 65 f4 lea -0xc(%ebp),%esp 10c178: 5b pop %ebx 10c179: 5e pop %esi 10c17a: 5f pop %edi 10c17b: c9 leave 10c17c: c3 ret 10c17d: 8d 76 00 lea 0x0(%esi),%esi return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); 10c180: 50 push %eax 10c181: 8d 5d e4 lea -0x1c(%ebp),%ebx 10c184: 53 push %ebx 10c185: 56 push %esi 10c186: 57 push %edi 10c187: e8 c0 3e 00 00 call 11004c <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10c18c: 89 1c 24 mov %ebx,(%esp) 10c18f: e8 f4 3e 00 00 call 110088 <_Timespec_To_ticks> 10c194: 8b 55 0c mov 0xc(%ebp),%edx 10c197: 89 02 mov %eax,(%edx) /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) 10c199: 83 c4 10 add $0x10,%esp 10c19c: 83 f8 01 cmp $0x1,%eax 10c19f: 19 c0 sbb %eax,%eax 10c1a1: 83 c0 03 add $0x3,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10c1a4: 8d 65 f4 lea -0xc(%ebp),%esp 10c1a7: 5b pop %ebx 10c1a8: 5e pop %esi 10c1a9: 5f pop %edi 10c1aa: c9 leave 10c1ab: c3 ret =============================================================================== 0010ae14 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10ae14: 55 push %ebp 10ae15: 89 e5 mov %esp,%ebp 10ae17: 53 push %ebx 10ae18: 83 ec 04 sub $0x4,%esp 10ae1b: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 10ae1e: 85 db test %ebx,%ebx 10ae20: 74 36 je 10ae58 <_POSIX_Condition_variables_Get+0x44> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 10ae22: 8b 03 mov (%ebx),%eax 10ae24: 83 f8 ff cmp $0xffffffff,%eax 10ae27: 74 17 je 10ae40 <_POSIX_Condition_variables_Get+0x2c><== NEVER TAKEN /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 10ae29: 52 push %edx 10ae2a: ff 75 0c pushl 0xc(%ebp) 10ae2d: 50 push %eax 10ae2e: 68 00 2c 12 00 push $0x122c00 10ae33: e8 cc 2d 00 00 call 10dc04 <_Objects_Get> 10ae38: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 10ae3b: 8b 5d fc mov -0x4(%ebp),%ebx 10ae3e: c9 leave 10ae3f: c3 ret if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 10ae40: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ae43: 6a 00 push $0x0 <== NOT EXECUTED 10ae45: 53 push %ebx <== NOT EXECUTED 10ae46: e8 1d 00 00 00 call 10ae68 <== NOT EXECUTED if ( status ) { 10ae4b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ae4e: 85 c0 test %eax,%eax <== NOT EXECUTED 10ae50: 75 06 jne 10ae58 <_POSIX_Condition_variables_Get+0x44><== NOT EXECUTED 10ae52: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 10ae54: eb d3 jmp 10ae29 <_POSIX_Condition_variables_Get+0x15><== NOT EXECUTED 10ae56: 66 90 xchg %ax,%ax <== NOT EXECUTED *location = OBJECTS_ERROR; 10ae58: 8b 45 0c mov 0xc(%ebp),%eax 10ae5b: c7 00 01 00 00 00 movl $0x1,(%eax) 10ae61: 31 c0 xor %eax,%eax 10ae63: eb d6 jmp 10ae3b <_POSIX_Condition_variables_Get+0x27> =============================================================================== 0010af30 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10af30: 55 push %ebp 10af31: 89 e5 mov %esp,%ebp 10af33: 56 push %esi 10af34: 53 push %ebx 10af35: 83 ec 28 sub $0x28,%esp 10af38: 8a 45 0c mov 0xc(%ebp),%al 10af3b: 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 ); 10af3e: 8d 45 f4 lea -0xc(%ebp),%eax 10af41: 50 push %eax 10af42: ff 75 08 pushl 0x8(%ebp) 10af45: e8 ca fe ff ff call 10ae14 <_POSIX_Condition_variables_Get> 10af4a: 89 c6 mov %eax,%esi switch ( location ) { 10af4c: 83 c4 10 add $0x10,%esp 10af4f: 8b 45 f4 mov -0xc(%ebp),%eax 10af52: 85 c0 test %eax,%eax 10af54: 74 0e je 10af64 <_POSIX_Condition_variables_Signal_support+0x34> 10af56: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10af5b: 8d 65 f8 lea -0x8(%ebp),%esp 10af5e: 5b pop %ebx 10af5f: 5e pop %esi 10af60: c9 leave 10af61: c3 ret 10af62: 66 90 xchg %ax,%ax the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10af64: 8d 5e 18 lea 0x18(%esi),%ebx 10af67: eb 0d jmp 10af76 <_POSIX_Condition_variables_Signal_support+0x46> 10af69: 8d 76 00 lea 0x0(%esi),%esi if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 10af6c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10af70: 74 22 je 10af94 <_POSIX_Condition_variables_Signal_support+0x64> 10af72: 85 c0 test %eax,%eax 10af74: 74 1e je 10af94 <_POSIX_Condition_variables_Signal_support+0x64> the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10af76: 83 ec 0c sub $0xc,%esp 10af79: 53 push %ebx 10af7a: e8 4d 38 00 00 call 10e7cc <_Thread_queue_Dequeue> if ( !the_thread ) 10af7f: 83 c4 10 add $0x10,%esp 10af82: 85 c0 test %eax,%eax 10af84: 75 e6 jne 10af6c <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10af86: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) } while ( is_broadcast && the_thread ); 10af8d: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10af91: 75 df jne 10af72 <_POSIX_Condition_variables_Signal_support+0x42> 10af93: 90 nop _Thread_Enable_dispatch(); 10af94: e8 af 34 00 00 call 10e448 <_Thread_Enable_dispatch> 10af99: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10af9b: 8d 65 f8 lea -0x8(%ebp),%esp 10af9e: 5b pop %ebx 10af9f: 5e pop %esi 10afa0: c9 leave 10afa1: c3 ret =============================================================================== 0010b010 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10b010: 55 push %ebp 10b011: 89 e5 mov %esp,%ebp 10b013: 56 push %esi 10b014: 53 push %ebx 10b015: 83 ec 28 sub $0x28,%esp 10b018: 8b 75 0c mov 0xc(%ebp),%esi 10b01b: 8a 45 14 mov 0x14(%ebp),%al 10b01e: 88 45 e7 mov %al,-0x19(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 10b021: 8d 5d f4 lea -0xc(%ebp),%ebx 10b024: 53 push %ebx 10b025: 56 push %esi 10b026: e8 b1 01 00 00 call 10b1dc <_POSIX_Mutex_Get> 10b02b: 83 c4 10 add $0x10,%esp 10b02e: 85 c0 test %eax,%eax 10b030: 74 6e je 10b0a0 <_POSIX_Condition_variables_Wait_support+0x90> 10b032: a1 18 27 12 00 mov 0x122718,%eax 10b037: 48 dec %eax 10b038: a3 18 27 12 00 mov %eax,0x122718 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10b03d: 83 ec 08 sub $0x8,%esp 10b040: 53 push %ebx 10b041: ff 75 08 pushl 0x8(%ebp) 10b044: e8 cb fd ff ff call 10ae14 <_POSIX_Condition_variables_Get> 10b049: 89 c3 mov %eax,%ebx switch ( location ) { 10b04b: 83 c4 10 add $0x10,%esp 10b04e: 8b 55 f4 mov -0xc(%ebp),%edx 10b051: 85 d2 test %edx,%edx 10b053: 75 4b jne 10b0a0 <_POSIX_Condition_variables_Wait_support+0x90> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10b055: 8b 40 14 mov 0x14(%eax),%eax 10b058: 85 c0 test %eax,%eax 10b05a: 74 18 je 10b074 <_POSIX_Condition_variables_Wait_support+0x64> 10b05c: 3b 06 cmp (%esi),%eax 10b05e: 74 14 je 10b074 <_POSIX_Condition_variables_Wait_support+0x64><== ALWAYS TAKEN _Thread_Enable_dispatch(); 10b060: e8 e3 33 00 00 call 10e448 <_Thread_Enable_dispatch><== NOT EXECUTED 10b065: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 10b06a: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b06c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10b06f: 5b pop %ebx <== NOT EXECUTED 10b070: 5e pop %esi <== NOT EXECUTED 10b071: c9 leave <== NOT EXECUTED 10b072: c3 ret <== NOT EXECUTED 10b073: 90 nop <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10b074: 83 ec 0c sub $0xc,%esp 10b077: 56 push %esi 10b078: e8 77 03 00 00 call 10b3f4 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10b07d: 83 c4 10 add $0x10,%esp 10b080: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10b084: 74 2a je 10b0b0 <_POSIX_Condition_variables_Wait_support+0xa0> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 10b086: e8 bd 33 00 00 call 10e448 <_Thread_Enable_dispatch> 10b08b: bb 74 00 00 00 mov $0x74,%ebx /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10b090: 83 ec 0c sub $0xc,%esp 10b093: 56 push %esi 10b094: e8 d3 02 00 00 call 10b36c if ( mutex_status ) 10b099: 83 c4 10 add $0x10,%esp 10b09c: 85 c0 test %eax,%eax 10b09e: 74 05 je 10b0a5 <_POSIX_Condition_variables_Wait_support+0x95> 10b0a0: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10b0a5: 89 d8 mov %ebx,%eax 10b0a7: 8d 65 f8 lea -0x8(%ebp),%esp 10b0aa: 5b pop %ebx 10b0ab: 5e pop %esi 10b0ac: c9 leave 10b0ad: c3 ret 10b0ae: 66 90 xchg %ax,%ax return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 10b0b0: 8b 06 mov (%esi),%eax 10b0b2: 89 43 14 mov %eax,0x14(%ebx) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10b0b5: 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; 10b0bc: 8b 15 dc 27 12 00 mov 0x1227dc,%edx 10b0c2: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10b0c9: 8d 4b 18 lea 0x18(%ebx),%ecx 10b0cc: 89 4a 44 mov %ecx,0x44(%edx) _Thread_Executing->Wait.id = *cond; 10b0cf: 8b 5d 08 mov 0x8(%ebp),%ebx 10b0d2: 8b 03 mov (%ebx),%eax 10b0d4: 89 42 20 mov %eax,0x20(%edx) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10b0d7: 50 push %eax 10b0d8: 68 b0 ec 10 00 push $0x10ecb0 10b0dd: ff 75 10 pushl 0x10(%ebp) 10b0e0: 51 push %ecx 10b0e1: e8 22 38 00 00 call 10e908 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b0e6: e8 5d 33 00 00 call 10e448 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10b0eb: a1 dc 27 12 00 mov 0x1227dc,%eax 10b0f0: 8b 58 34 mov 0x34(%eax),%ebx if ( status && status != ETIMEDOUT ) 10b0f3: 83 c4 10 add $0x10,%esp 10b0f6: 85 db test %ebx,%ebx 10b0f8: 74 96 je 10b090 <_POSIX_Condition_variables_Wait_support+0x80> 10b0fa: 83 fb 74 cmp $0x74,%ebx 10b0fd: 75 a6 jne 10b0a5 <_POSIX_Condition_variables_Wait_support+0x95><== NEVER TAKEN 10b0ff: eb 8f jmp 10b090 <_POSIX_Condition_variables_Wait_support+0x80> =============================================================================== 00110544 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 110544: 55 push %ebp 110545: 89 e5 mov %esp,%ebp 110547: 57 push %edi 110548: 56 push %esi 110549: 53 push %ebx 11054a: 83 ec 0c sub $0xc,%esp uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 11054d: 8b 45 08 mov 0x8(%ebp),%eax 110550: 8b 40 08 mov 0x8(%eax),%eax uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 110553: 89 c2 mov %eax,%edx 110555: c1 ea 18 shr $0x18,%edx 110558: 83 e2 07 and $0x7,%edx 11055b: 8b 0d b0 fd 11 00 mov 0x11fdb0,%ecx the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { value = the_key->Values[ thread_api ][ thread_index ]; 110561: 25 ff ff 00 00 and $0xffff,%eax 110566: c1 e0 02 shl $0x2,%eax 110569: 89 45 e8 mov %eax,-0x18(%ebp) 11056c: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 110573: 8d 7a 04 lea 0x4(%edx),%edi for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 110576: 66 85 c9 test %cx,%cx 110579: 74 68 je 1105e3 <_POSIX_Keys_Run_destructors+0x9f> 11057b: be 01 00 00 00 mov $0x1,%esi 110580: c6 45 f3 01 movb $0x1,-0xd(%ebp) the_key = (POSIX_Keys_Control *) 110584: a1 bc fd 11 00 mov 0x11fdbc,%eax 110589: 8b 1c b0 mov (%eax,%esi,4),%ebx _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 11058c: 85 db test %ebx,%ebx 11058e: 74 36 je 1105c6 <_POSIX_Keys_Run_destructors+0x82> 110590: 80 7b 10 00 cmpb $0x0,0x10(%ebx) 110594: 74 30 je 1105c6 <_POSIX_Keys_Run_destructors+0x82><== NEVER TAKEN 110596: 8b 53 14 mov 0x14(%ebx),%edx 110599: 85 d2 test %edx,%edx 11059b: 74 29 je 1105c6 <_POSIX_Keys_Run_destructors+0x82><== NEVER TAKEN value = the_key->Values[ thread_api ][ thread_index ]; 11059d: 8b 44 bb 08 mov 0x8(%ebx,%edi,4),%eax 1105a1: 8b 4d e8 mov -0x18(%ebp),%ecx 1105a4: 8b 04 08 mov (%eax,%ecx,1),%eax if ( value ) { 1105a7: 85 c0 test %eax,%eax 1105a9: 74 1b je 1105c6 <_POSIX_Keys_Run_destructors+0x82><== NEVER TAKEN (*the_key->destructor)( value ); 1105ab: 83 ec 0c sub $0xc,%esp 1105ae: 50 push %eax 1105af: ff d2 call *%edx if ( the_key->Values[ thread_api ][ thread_index ] ) 1105b1: 8b 44 bb 08 mov 0x8(%ebx,%edi,4),%eax 1105b5: 83 c4 10 add $0x10,%esp 1105b8: 8b 55 e8 mov -0x18(%ebp),%edx 1105bb: 8b 04 10 mov (%eax,%edx,1),%eax 1105be: 85 c0 test %eax,%eax 1105c0: 74 04 je 1105c6 <_POSIX_Keys_Run_destructors+0x82> 1105c2: c6 45 f3 00 movb $0x0,-0xd(%ebp) for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 1105c6: 46 inc %esi 1105c7: 8b 0d b0 fd 11 00 mov 0x11fdb0,%ecx 1105cd: 0f b7 c1 movzwl %cx,%eax 1105d0: 39 f0 cmp %esi,%eax 1105d2: 73 b0 jae 110584 <_POSIX_Keys_Run_destructors+0x40> are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 1105d4: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 1105d8: 75 09 jne 1105e3 <_POSIX_Keys_Run_destructors+0x9f> return; iterations++; 1105da: ff 45 ec incl -0x14(%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 ) 1105dd: 83 7d ec 04 cmpl $0x4,-0x14(%ebp) 1105e1: 75 93 jne 110576 <_POSIX_Keys_Run_destructors+0x32> return; } } 1105e3: 8d 65 f4 lea -0xc(%ebp),%esp 1105e6: 5b pop %ebx 1105e7: 5e pop %esi 1105e8: 5f pop %edi 1105e9: c9 leave 1105ea: c3 ret =============================================================================== 00114244 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 114244: 55 push %ebp 114245: 89 e5 mov %esp,%ebp 114247: 57 push %edi 114248: 56 push %esi 114249: 53 push %ebx 11424a: 83 ec 24 sub $0x24,%esp 11424d: 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 ); 114250: 68 ff 00 00 00 push $0xff 114255: ff 75 08 pushl 0x8(%ebp) 114258: e8 c7 38 00 00 call 117b24 11425d: 89 c3 mov %eax,%ebx if ( n > NAME_MAX ) 11425f: 83 c4 10 add $0x10,%esp 114262: 3d ff 00 00 00 cmp $0xff,%eax 114267: 0f 87 d7 00 00 00 ja 114344 <_POSIX_Message_queue_Create_support+0x100><== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 11426d: a1 58 7c 12 00 mov 0x127c58,%eax 114272: 40 inc %eax 114273: a3 58 7c 12 00 mov %eax,0x127c58 * 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 ) { 114278: 85 f6 test %esi,%esi 11427a: 0f 84 d4 00 00 00 je 114354 <_POSIX_Message_queue_Create_support+0x110> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 114280: 8b 56 04 mov 0x4(%esi),%edx 114283: 85 d2 test %edx,%edx 114285: 0f 8e 0d 01 00 00 jle 114398 <_POSIX_Message_queue_Create_support+0x154> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 11428b: 8b 46 08 mov 0x8(%esi),%eax 11428e: 85 c0 test %eax,%eax 114290: 0f 8e 02 01 00 00 jle 114398 <_POSIX_Message_queue_Create_support+0x154> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 114296: 8d 7d e4 lea -0x1c(%ebp),%edi 114299: b9 04 00 00 00 mov $0x4,%ecx 11429e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1142a0: 8b 45 ec mov -0x14(%ebp),%eax 1142a3: 89 45 dc mov %eax,-0x24(%ebp) 1142a6: 8b 45 e8 mov -0x18(%ebp),%eax 1142a9: 89 45 e0 mov %eax,-0x20(%ebp) * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus extern "C" { 1142ac: 83 ec 0c sub $0xc,%esp 1142af: 68 20 80 12 00 push $0x128020 1142b4: e8 87 c6 ff ff call 110940 <_Objects_Allocate> 1142b9: 89 c7 mov %eax,%edi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 1142bb: 83 c4 10 add $0x10,%esp 1142be: 85 c0 test %eax,%eax 1142c0: 0f 84 e9 00 00 00 je 1143af <_POSIX_Message_queue_Create_support+0x16b><== NEVER TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 1142c6: 8b 45 0c mov 0xc(%ebp),%eax 1142c9: 89 47 10 mov %eax,0x10(%edi) the_mq->named = TRUE; 1142cc: c6 47 14 01 movb $0x1,0x14(%edi) the_mq->open_count = 1; 1142d0: c7 47 18 01 00 00 00 movl $0x1,0x18(%edi) the_mq->linked = TRUE; 1142d7: c6 47 15 01 movb $0x1,0x15(%edi) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 1142db: 83 ec 0c sub $0xc,%esp 1142de: 53 push %ebx 1142df: e8 08 e6 ff ff call 1128ec <_Workspace_Allocate> 1142e4: 89 c6 mov %eax,%esi if (!name) { 1142e6: 83 c4 10 add $0x10,%esp 1142e9: 85 c0 test %eax,%eax 1142eb: 0f 84 d8 00 00 00 je 1143c9 <_POSIX_Message_queue_Create_support+0x185><== NEVER TAKEN _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 1142f1: 83 ec 08 sub $0x8,%esp 1142f4: ff 75 08 pushl 0x8(%ebp) 1142f7: 50 push %eax 1142f8: e8 0b 34 00 00 call 117708 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 1142fd: c7 47 5c 00 00 00 00 movl $0x0,0x5c(%edi) if ( ! _CORE_message_queue_Initialize( 114304: ff 75 dc pushl -0x24(%ebp) 114307: ff 75 e0 pushl -0x20(%ebp) 11430a: 8d 47 5c lea 0x5c(%edi),%eax 11430d: 50 push %eax 11430e: 8d 47 1c lea 0x1c(%edi),%eax 114311: 50 push %eax 114312: e8 f9 0a 00 00 call 114e10 <_CORE_message_queue_Initialize> 114317: 83 c4 20 add $0x20,%esp 11431a: 84 c0 test %al,%al 11431c: 74 4a je 114368 <_POSIX_Message_queue_Create_support+0x124><== NEVER TAKEN 11431e: 0f b7 57 08 movzwl 0x8(%edi),%edx 114322: a1 3c 80 12 00 mov 0x12803c,%eax 114327: 89 3c 90 mov %edi,(%eax,%edx,4) 11432a: 89 77 0c mov %esi,0xc(%edi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 11432d: 8b 45 14 mov 0x14(%ebp),%eax 114330: 89 38 mov %edi,(%eax) _Thread_Enable_dispatch(); 114332: e8 95 d3 ff ff call 1116cc <_Thread_Enable_dispatch> 114337: 31 c0 xor %eax,%eax return 0; } 114339: 8d 65 f4 lea -0xc(%ebp),%esp 11433c: 5b pop %ebx 11433d: 5e pop %esi 11433e: 5f pop %edi 11433f: c9 leave 114340: c3 ret 114341: 8d 76 00 lea 0x0(%esi),%esi struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); if ( n > NAME_MAX ) 114344: b8 5b 00 00 00 mov $0x5b,%eax <== NOT EXECUTED *message_queue = the_mq; _Thread_Enable_dispatch(); return 0; } 114349: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11434c: 5b pop %ebx <== NOT EXECUTED 11434d: 5e pop %esi <== NOT EXECUTED 11434e: 5f pop %edi <== NOT EXECUTED 11434f: c9 leave <== NOT EXECUTED 114350: c3 ret <== NOT EXECUTED 114351: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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 ) { 114354: c7 45 dc 10 00 00 00 movl $0x10,-0x24(%ebp) 11435b: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) 114362: e9 45 ff ff ff jmp 1142ac <_POSIX_Message_queue_Create_support+0x68> 114367: 90 nop Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 114368: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11436b: 57 push %edi <== NOT EXECUTED 11436c: 68 20 80 12 00 push $0x128020 <== NOT EXECUTED 114371: e8 8a c9 ff ff call 110d00 <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 114376: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 114379: e8 56 e5 ff ff call 1128d4 <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); 11437e: e8 49 d3 ff ff call 1116cc <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 114383: e8 48 22 00 00 call 1165d0 <__errno> <== NOT EXECUTED 114388: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 11438e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 114393: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 114396: eb a1 jmp 114339 <_POSIX_Message_queue_Create_support+0xf5><== NOT EXECUTED _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 114398: e8 2f d3 ff ff call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 11439d: e8 2e 22 00 00 call 1165d0 <__errno> 1143a2: c7 00 16 00 00 00 movl $0x16,(%eax) 1143a8: b8 ff ff ff ff mov $0xffffffff,%eax 1143ad: eb 8a jmp 114339 <_POSIX_Message_queue_Create_support+0xf5> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 1143af: e8 18 d3 ff ff call 1116cc <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 1143b4: e8 17 22 00 00 call 1165d0 <__errno> <== NOT EXECUTED 1143b9: c7 00 17 00 00 00 movl $0x17,(%eax) <== NOT EXECUTED 1143bf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1143c4: e9 70 ff ff ff jmp 114339 <_POSIX_Message_queue_Create_support+0xf5><== NOT EXECUTED 1143c9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1143cc: 57 push %edi <== NOT EXECUTED 1143cd: 68 20 80 12 00 push $0x128020 <== NOT EXECUTED 1143d2: e8 29 c9 ff ff call 110d00 <_Objects_Free> <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 1143d7: e8 f0 d2 ff ff call 1116cc <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 1143dc: e8 ef 21 00 00 call 1165d0 <__errno> <== NOT EXECUTED 1143e1: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1143e7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1143ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1143ef: e9 45 ff ff ff jmp 114339 <_POSIX_Message_queue_Create_support+0xf5><== NOT EXECUTED =============================================================================== 0010d904 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 10d904: 55 push %ebp 10d905: 89 e5 mov %esp,%ebp 10d907: 53 push %ebx 10d908: 83 ec 04 sub $0x4,%esp 10d90b: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !the_mq->linked && !the_mq->open_count ) { 10d90e: 80 7b 15 00 cmpb $0x0,0x15(%ebx) 10d912: 75 48 jne 10d95c <_POSIX_Message_queue_Delete+0x58> 10d914: 8b 4b 18 mov 0x18(%ebx),%ecx 10d917: 85 c9 test %ecx,%ecx 10d919: 75 41 jne 10d95c <_POSIX_Message_queue_Delete+0x58> /* the name memory may have been freed by unlink. */ Objects_Control *the_object = &the_mq->Object; if ( the_object->name.name_p ) 10d91b: 8b 43 0c mov 0xc(%ebx),%eax 10d91e: 85 c0 test %eax,%eax 10d920: 74 0c je 10d92e <_POSIX_Message_queue_Delete+0x2a><== ALWAYS TAKEN _Workspace_Free( (void *)the_object->name.name_p ); 10d922: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d925: 50 push %eax <== NOT EXECUTED 10d926: e8 a9 4f 00 00 call 1128d4 <_Workspace_Free> <== NOT EXECUTED 10d92b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 10d92e: 83 ec 08 sub $0x8,%esp 10d931: 53 push %ebx 10d932: 68 20 80 12 00 push $0x128020 10d937: e8 84 30 00 00 call 1109c0 <_Objects_Close> _CORE_message_queue_Close( 10d93c: 83 c4 0c add $0xc,%esp 10d93f: 6a 05 push $0x5 10d941: 6a 00 push $0x0 10d943: 8d 43 1c lea 0x1c(%ebx),%eax 10d946: 50 push %eax 10d947: e8 04 26 00 00 call 10ff50 <_CORE_message_queue_Close> Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 10d94c: 58 pop %eax 10d94d: 5a pop %edx 10d94e: 53 push %ebx 10d94f: 68 20 80 12 00 push $0x128020 10d954: e8 a7 33 00 00 call 110d00 <_Objects_Free> 10d959: 83 c4 10 add $0x10,%esp ); _POSIX_Message_queue_Free( the_mq ); } } 10d95c: 8b 5d fc mov -0x4(%ebp),%ebx 10d95f: c9 leave 10d960: c3 ret =============================================================================== 001143f4 <_POSIX_Message_queue_Name_to_id>: int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 1143f4: 55 push %ebp 1143f5: 89 e5 mov %esp,%ebp 1143f7: 57 push %edi 1143f8: 83 ec 04 sub $0x4,%esp 1143fb: 8b 55 08 mov 0x8(%ebp),%edx Objects_Name_or_id_lookup_errors status; if ( !name ) 1143fe: 85 d2 test %edx,%edx 114400: 74 05 je 114407 <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 114402: 80 3a 00 cmpb $0x0,(%edx) 114405: 75 0d jne 114414 <_POSIX_Message_queue_Name_to_id+0x20> return ENAMETOOLONG; status = _Objects_Name_to_id_string( &_POSIX_Message_queue_Information, name, id ); if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 114407: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 11440c: 8b 7d fc mov -0x4(%ebp),%edi 11440f: c9 leave 114410: c3 ret 114411: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; if ( !name[0] ) return EINVAL; if( strlen(name) > PATH_MAX ) 114414: 31 c0 xor %eax,%eax 114416: b9 ff ff ff ff mov $0xffffffff,%ecx 11441b: 89 d7 mov %edx,%edi 11441d: f2 ae repnz scas %es:(%edi),%al 11441f: f7 d1 not %ecx 114421: 49 dec %ecx 114422: 81 f9 ff 00 00 00 cmp $0xff,%ecx 114428: 76 0a jbe 114434 <_POSIX_Message_queue_Name_to_id+0x40> 11442a: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 11442f: 8b 7d fc mov -0x4(%ebp),%edi 114432: c9 leave 114433: c3 ret return EINVAL; if( strlen(name) > PATH_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 114434: 50 push %eax 114435: ff 75 0c pushl 0xc(%ebp) 114438: 52 push %edx 114439: 68 20 80 12 00 push $0x128020 11443e: e8 35 0e 00 00 call 115278 <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, id ); if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 114443: 83 c4 10 add $0x10,%esp 114446: 83 f8 01 cmp $0x1,%eax 114449: 19 c0 sbb %eax,%eax 11444b: f7 d0 not %eax 11444d: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 114450: 8b 7d fc mov -0x4(%ebp),%edi 114453: c9 leave 114454: c3 ret =============================================================================== 0010dc90 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10dc90: 55 push %ebp 10dc91: 89 e5 mov %esp,%ebp 10dc93: 57 push %edi 10dc94: 56 push %esi 10dc95: 53 push %ebx 10dc96: 83 ec 20 sub $0x20,%esp 10dc99: 8b 7d 08 mov 0x8(%ebp),%edi 10dc9c: 8b 75 14 mov 0x14(%ebp),%esi 10dc9f: 8a 5d 18 mov 0x18(%ebp),%bl */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ); 10dca2: 8d 45 f0 lea -0x10(%ebp),%eax 10dca5: 50 push %eax 10dca6: 57 push %edi 10dca7: 68 c0 81 12 00 push $0x1281c0 10dcac: e8 83 31 00 00 call 110e34 <_Objects_Get> 10dcb1: 89 c2 mov %eax,%edx Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10dcb3: 83 c4 10 add $0x10,%esp 10dcb6: 8b 4d f0 mov -0x10(%ebp),%ecx 10dcb9: 85 c9 test %ecx,%ecx 10dcbb: 74 1b je 10dcd8 <_POSIX_Message_queue_Receive_support+0x48> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10dcbd: e8 0e 89 00 00 call 1165d0 <__errno> 10dcc2: c7 00 09 00 00 00 movl $0x9,(%eax) 10dcc8: b8 ff ff ff ff mov $0xffffffff,%eax } 10dccd: 8d 65 f4 lea -0xc(%ebp),%esp 10dcd0: 5b pop %ebx 10dcd1: 5e pop %esi 10dcd2: 5f pop %edi 10dcd3: c9 leave 10dcd4: c3 ret 10dcd5: 8d 76 00 lea 0x0(%esi),%esi the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10dcd8: 8b 48 14 mov 0x14(%eax),%ecx 10dcdb: 89 c8 mov %ecx,%eax 10dcdd: 83 e0 03 and $0x3,%eax 10dce0: 48 dec %eax 10dce1: 0f 84 af 00 00 00 je 10dd96 <_POSIX_Message_queue_Receive_support+0x106> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10dce7: 8b 52 10 mov 0x10(%edx),%edx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10dcea: 8b 45 10 mov 0x10(%ebp),%eax 10dced: 39 42 68 cmp %eax,0x68(%edx) 10dcf0: 77 62 ja 10dd54 <_POSIX_Message_queue_Receive_support+0xc4> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10dcf2: 84 db test %bl,%bl 10dcf4: 75 4a jne 10dd40 <_POSIX_Message_queue_Receive_support+0xb0><== ALWAYS TAKEN 10dcf6: 31 c0 xor %eax,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10dcf8: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10dcff: 83 ec 08 sub $0x8,%esp 10dd02: ff 75 1c pushl 0x1c(%ebp) 10dd05: 50 push %eax 10dd06: 8d 45 ec lea -0x14(%ebp),%eax 10dd09: 50 push %eax 10dd0a: ff 75 0c pushl 0xc(%ebp) 10dd0d: 57 push %edi 10dd0e: 8d 42 1c lea 0x1c(%edx),%eax 10dd11: 50 push %eax 10dd12: e8 bd 22 00 00 call 10ffd4 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10dd17: 83 c4 20 add $0x20,%esp 10dd1a: e8 ad 39 00 00 call 1116cc <_Thread_Enable_dispatch> *msg_prio = 10dd1f: 8b 15 1c 7d 12 00 mov 0x127d1c,%edx 10dd25: 8b 42 24 mov 0x24(%edx),%eax 10dd28: 89 06 mov %eax,(%esi) 10dd2a: 85 c0 test %eax,%eax 10dd2c: 78 22 js 10dd50 <_POSIX_Message_queue_Receive_support+0xc0> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10dd2e: 8b 42 34 mov 0x34(%edx),%eax 10dd31: 85 c0 test %eax,%eax 10dd33: 75 3b jne 10dd70 <_POSIX_Message_queue_Receive_support+0xe0> return length_out; 10dd35: 8b 45 ec mov -0x14(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10dd38: 8d 65 f4 lea -0xc(%ebp),%esp 10dd3b: 5b pop %ebx 10dd3c: 5e pop %esi 10dd3d: 5f pop %edi 10dd3e: c9 leave 10dd3f: c3 ret length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10dd40: 89 c8 mov %ecx,%eax 10dd42: c1 e8 0e shr $0xe,%eax 10dd45: 83 f0 01 xor $0x1,%eax 10dd48: 83 e0 01 and $0x1,%eax 10dd4b: eb ab jmp 10dcf8 <_POSIX_Message_queue_Receive_support+0x68> 10dd4d: 8d 76 00 lea 0x0(%esi),%esi do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10dd50: f7 1e negl (%esi) 10dd52: eb da jmp 10dd2e <_POSIX_Message_queue_Receive_support+0x9e> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 10dd54: e8 73 39 00 00 call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10dd59: e8 72 88 00 00 call 1165d0 <__errno> 10dd5e: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10dd64: b8 ff ff ff ff mov $0xffffffff,%eax 10dd69: e9 5f ff ff ff jmp 10dccd <_POSIX_Message_queue_Receive_support+0x3d> 10dd6e: 66 90 xchg %ax,%ax _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 10dd70: e8 5b 88 00 00 call 1165d0 <__errno> 10dd75: 89 c3 mov %eax,%ebx 10dd77: 83 ec 0c sub $0xc,%esp 10dd7a: a1 1c 7d 12 00 mov 0x127d1c,%eax 10dd7f: ff 70 34 pushl 0x34(%eax) 10dd82: e8 31 02 00 00 call 10dfb8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10dd87: 89 03 mov %eax,(%ebx) 10dd89: b8 ff ff ff ff mov $0xffffffff,%eax 10dd8e: 83 c4 10 add $0x10,%esp 10dd91: e9 37 ff ff ff jmp 10dccd <_POSIX_Message_queue_Receive_support+0x3d> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 10dd96: e8 31 39 00 00 call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10dd9b: e8 30 88 00 00 call 1165d0 <__errno> 10dda0: c7 00 09 00 00 00 movl $0x9,(%eax) 10dda6: b8 ff ff ff ff mov $0xffffffff,%eax 10ddab: e9 1d ff ff ff jmp 10dccd <_POSIX_Message_queue_Receive_support+0x3d> =============================================================================== 0010ddd0 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10ddd0: 55 push %ebp 10ddd1: 89 e5 mov %esp,%ebp 10ddd3: 56 push %esi 10ddd4: 53 push %ebx 10ddd5: 83 ec 20 sub $0x20,%esp 10ddd8: 8b 75 08 mov 0x8(%ebp),%esi 10dddb: 8b 5d 14 mov 0x14(%ebp),%ebx 10ddde: 8a 45 18 mov 0x18(%ebp),%al 10dde1: 88 45 e7 mov %al,-0x19(%ebp) /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 10dde4: 83 fb 20 cmp $0x20,%ebx 10dde7: 0f 87 93 00 00 00 ja 10de80 <_POSIX_Message_queue_Send_support+0xb0> 10dded: 51 push %ecx 10ddee: 8d 45 f4 lea -0xc(%ebp),%eax 10ddf1: 50 push %eax 10ddf2: 56 push %esi 10ddf3: 68 c0 81 12 00 push $0x1281c0 10ddf8: e8 37 30 00 00 call 110e34 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10ddfd: 83 c4 10 add $0x10,%esp 10de00: 8b 55 f4 mov -0xc(%ebp),%edx 10de03: 85 d2 test %edx,%edx 10de05: 75 65 jne 10de6c <_POSIX_Message_queue_Send_support+0x9c> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10de07: 8b 50 14 mov 0x14(%eax),%edx 10de0a: f6 c2 03 test $0x3,%dl 10de0d: 0f 84 81 00 00 00 je 10de94 <_POSIX_Message_queue_Send_support+0xc4> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10de13: 8b 40 10 mov 0x10(%eax),%eax /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10de16: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10de1a: 75 38 jne 10de54 <_POSIX_Message_queue_Send_support+0x84><== ALWAYS TAKEN 10de1c: 31 d2 xor %edx,%edx <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10de1e: ff 75 1c pushl 0x1c(%ebp) 10de21: 52 push %edx 10de22: f7 db neg %ebx 10de24: 53 push %ebx 10de25: 6a 00 push $0x0 10de27: 56 push %esi 10de28: ff 75 10 pushl 0x10(%ebp) 10de2b: ff 75 0c pushl 0xc(%ebp) 10de2e: 83 c0 1c add $0x1c,%eax 10de31: 50 push %eax 10de32: e8 c9 22 00 00 call 110100 <_CORE_message_queue_Submit> 10de37: 89 c6 mov %eax,%esi _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10de39: 83 c4 20 add $0x20,%esp 10de3c: e8 8b 38 00 00 call 1116cc <_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 ) 10de41: 83 fe 07 cmp $0x7,%esi 10de44: 74 1a je 10de60 <_POSIX_Message_queue_Send_support+0x90> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10de46: 85 f6 test %esi,%esi 10de48: 75 62 jne 10deac <_POSIX_Message_queue_Send_support+0xdc> 10de4a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10de4c: 8d 65 f8 lea -0x8(%ebp),%esp 10de4f: 5b pop %ebx 10de50: 5e pop %esi 10de51: c9 leave 10de52: c3 ret 10de53: 90 nop the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10de54: c1 ea 0e shr $0xe,%edx 10de57: 83 f2 01 xor $0x1,%edx 10de5a: 83 e2 01 and $0x1,%edx 10de5d: eb bf jmp 10de1e <_POSIX_Message_queue_Send_support+0x4e> 10de5f: 90 nop * 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 ) msg_status = _Thread_Executing->Wait.return_code; 10de60: a1 1c 7d 12 00 mov 0x127d1c,%eax 10de65: 8b 70 34 mov 0x34(%eax),%esi 10de68: eb dc jmp 10de46 <_POSIX_Message_queue_Send_support+0x76> 10de6a: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10de6c: e8 5f 87 00 00 call 1165d0 <__errno> 10de71: c7 00 09 00 00 00 movl $0x9,(%eax) 10de77: b8 ff ff ff ff mov $0xffffffff,%eax 10de7c: eb ce jmp 10de4c <_POSIX_Message_queue_Send_support+0x7c> 10de7e: 66 90 xchg %ax,%ax * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 10de80: e8 4b 87 00 00 call 1165d0 <__errno> 10de85: c7 00 16 00 00 00 movl $0x16,(%eax) 10de8b: b8 ff ff ff ff mov $0xffffffff,%eax 10de90: eb ba jmp 10de4c <_POSIX_Message_queue_Send_support+0x7c> 10de92: 66 90 xchg %ax,%ax the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 10de94: e8 33 38 00 00 call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10de99: e8 32 87 00 00 call 1165d0 <__errno> 10de9e: c7 00 09 00 00 00 movl $0x9,(%eax) 10dea4: b8 ff ff ff ff mov $0xffffffff,%eax 10dea9: eb a1 jmp 10de4c <_POSIX_Message_queue_Send_support+0x7c> 10deab: 90 nop msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10deac: e8 1f 87 00 00 call 1165d0 <__errno> 10deb1: 89 c3 mov %eax,%ebx 10deb3: 83 ec 0c sub $0xc,%esp 10deb6: 56 push %esi 10deb7: e8 fc 00 00 00 call 10dfb8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10debc: 89 03 mov %eax,(%ebx) 10debe: b8 ff ff ff ff mov $0xffffffff,%eax 10dec3: 83 c4 10 add $0x10,%esp 10dec6: eb 84 jmp 10de4c <_POSIX_Message_queue_Send_support+0x7c> =============================================================================== 0010bd94 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10bd94: 55 push %ebp 10bd95: 89 e5 mov %esp,%ebp 10bd97: 53 push %ebx 10bd98: 83 ec 04 sub $0x4,%esp 10bd9b: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 10bd9e: 85 db test %ebx,%ebx 10bda0: 74 36 je 10bdd8 <_POSIX_Mutex_Get+0x44> 10bda2: 8b 03 mov (%ebx),%eax 10bda4: 83 f8 ff cmp $0xffffffff,%eax 10bda7: 74 17 je 10bdc0 <_POSIX_Mutex_Get+0x2c> <== NEVER TAKEN return (POSIX_Mutex_Control *) 10bda9: 52 push %edx 10bdaa: ff 75 0c pushl 0xc(%ebp) 10bdad: 50 push %eax 10bdae: 68 e0 56 12 00 push $0x1256e0 10bdb3: e8 9c 2d 00 00 call 10eb54 <_Objects_Get> 10bdb8: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 10bdbb: 8b 5d fc mov -0x4(%ebp),%ebx 10bdbe: c9 leave 10bdbf: c3 ret Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 10bdc0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10bdc3: 6a 00 push $0x0 <== NOT EXECUTED 10bdc5: 53 push %ebx <== NOT EXECUTED 10bdc6: e8 69 00 00 00 call 10be34 <== NOT EXECUTED 10bdcb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bdce: 85 c0 test %eax,%eax <== NOT EXECUTED 10bdd0: 75 06 jne 10bdd8 <_POSIX_Mutex_Get+0x44> <== NOT EXECUTED 10bdd2: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 10bdd4: eb d3 jmp 10bda9 <_POSIX_Mutex_Get+0x15> <== NOT EXECUTED 10bdd6: 66 90 xchg %ax,%ax <== NOT EXECUTED 10bdd8: 8b 45 0c mov 0xc(%ebp),%eax 10bddb: c7 00 01 00 00 00 movl $0x1,(%eax) 10bde1: 31 c0 xor %eax,%eax 10bde3: eb d6 jmp 10bdbb <_POSIX_Mutex_Get+0x27> =============================================================================== 0010bd3c <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10bd3c: 55 push %ebp 10bd3d: 89 e5 mov %esp,%ebp 10bd3f: 53 push %ebx 10bd40: 83 ec 04 sub $0x4,%esp 10bd43: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 10bd46: 85 db test %ebx,%ebx 10bd48: 74 3a je 10bd84 <_POSIX_Mutex_Get_interrupt_disable+0x48><== NEVER TAKEN 10bd4a: 8b 03 mov (%ebx),%eax 10bd4c: 83 f8 ff cmp $0xffffffff,%eax 10bd4f: 74 1b je 10bd6c <_POSIX_Mutex_Get_interrupt_disable+0x30><== NEVER TAKEN return (POSIX_Mutex_Control *) 10bd51: ff 75 10 pushl 0x10(%ebp) 10bd54: ff 75 0c pushl 0xc(%ebp) 10bd57: 50 push %eax 10bd58: 68 e0 56 12 00 push $0x1256e0 10bd5d: e8 a6 2d 00 00 call 10eb08 <_Objects_Get_isr_disable> 10bd62: 83 c4 10 add $0x10,%esp _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 10bd65: 8b 5d fc mov -0x4(%ebp),%ebx 10bd68: c9 leave 10bd69: c3 ret 10bd6a: 66 90 xchg %ax,%ax ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 10bd6c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10bd6f: 6a 00 push $0x0 <== NOT EXECUTED 10bd71: 53 push %ebx <== NOT EXECUTED 10bd72: e8 bd 00 00 00 call 10be34 <== NOT EXECUTED 10bd77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bd7a: 85 c0 test %eax,%eax <== NOT EXECUTED 10bd7c: 75 06 jne 10bd84 <_POSIX_Mutex_Get_interrupt_disable+0x48><== NOT EXECUTED 10bd7e: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 10bd80: eb cf jmp 10bd51 <_POSIX_Mutex_Get_interrupt_disable+0x15><== NOT EXECUTED 10bd82: 66 90 xchg %ax,%ax <== NOT EXECUTED 10bd84: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10bd87: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10bd8d: 31 c0 xor %eax,%eax <== NOT EXECUTED 10bd8f: eb d4 jmp 10bd65 <_POSIX_Mutex_Get_interrupt_disable+0x29><== NOT EXECUTED =============================================================================== 00112730 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 112730: 55 push %ebp 112731: 89 e5 mov %esp,%ebp 112733: 57 push %edi 112734: 56 push %esi 112735: 53 push %ebx 112736: 83 ec 0c sub $0xc,%esp 112739: 8b 75 08 mov 0x8(%ebp),%esi /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 11273c: a1 18 5a 12 00 mov 0x125a18,%eax 112741: 40 inc %eax 112742: a3 18 5a 12 00 mov %eax,0x125a18 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 112747: 8b 55 0c mov 0xc(%ebp),%edx 11274a: 85 d2 test %edx,%edx 11274c: 0f 85 ae 00 00 00 jne 112800 <_POSIX_Semaphore_Create_support+0xd0> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 112752: 85 f6 test %esi,%esi 112754: 74 1a je 112770 <_POSIX_Semaphore_Create_support+0x40> if( strlen(name) > PATH_MAX ) { 112756: 31 c0 xor %eax,%eax 112758: b9 ff ff ff ff mov $0xffffffff,%ecx 11275d: 89 f7 mov %esi,%edi 11275f: f2 ae repnz scas %es:(%edi),%al 112761: f7 d1 not %ecx 112763: 49 dec %ecx 112764: 81 f9 ff 00 00 00 cmp $0xff,%ecx 11276a: 0f 87 a8 00 00 00 ja 112818 <_POSIX_Semaphore_Create_support+0xe8><== NEVER TAKEN * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 112770: 83 ec 0c sub $0xc,%esp 112773: 68 60 5d 12 00 push $0x125d60 112778: e8 f3 be ff ff call 10e670 <_Objects_Allocate> 11277d: 89 c3 mov %eax,%ebx } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 11277f: 83 c4 10 add $0x10,%esp 112782: 85 c0 test %eax,%eax 112784: 0f 84 a5 00 00 00 je 11282f <_POSIX_Semaphore_Create_support+0xff> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 11278a: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 112791: 85 f6 test %esi,%esi 112793: 74 57 je 1127ec <_POSIX_Semaphore_Create_support+0xbc> the_semaphore->named = TRUE; 112795: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 112799: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = TRUE; 1127a0: c6 40 15 01 movb $0x1,0x15(%eax) * 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; 1127a4: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 1127ab: c7 43 5c ff ff ff ff movl $0xffffffff,0x5c(%ebx) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1127b2: 50 push %eax 1127b3: ff 75 10 pushl 0x10(%ebp) 1127b6: 8d 43 5c lea 0x5c(%ebx),%eax 1127b9: 50 push %eax 1127ba: 8d 43 1c lea 0x1c(%ebx),%eax 1127bd: 50 push %eax 1127be: e8 b5 ba ff ff call 10e278 <_CORE_semaphore_Initialize> 1127c3: 0f b7 53 08 movzwl 0x8(%ebx),%edx 1127c7: a1 7c 5d 12 00 mov 0x125d7c,%eax 1127cc: 89 1c 90 mov %ebx,(%eax,%edx,4) 1127cf: 89 73 0c mov %esi,0xc(%ebx) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 1127d2: 8b 45 14 mov 0x14(%ebp),%eax 1127d5: 89 18 mov %ebx,(%eax) _Thread_Enable_dispatch(); 1127d7: e8 cc cb ff ff call 10f3a8 <_Thread_Enable_dispatch> 1127dc: 31 c0 xor %eax,%eax 1127de: 83 c4 10 add $0x10,%esp return 0; } 1127e1: 8d 65 f4 lea -0xc(%ebp),%esp 1127e4: 5b pop %ebx 1127e5: 5e pop %esi 1127e6: 5f pop %edi 1127e7: c9 leave 1127e8: c3 ret 1127e9: 8d 76 00 lea 0x0(%esi),%esi if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 1127ec: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 1127f0: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = FALSE; 1127f7: c6 40 15 00 movb $0x0,0x15(%eax) 1127fb: eb a7 jmp 1127a4 <_POSIX_Semaphore_Create_support+0x74> 1127fd: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); 112800: e8 a3 cb ff ff call 10f3a8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); 112805: e8 0a 1d 00 00 call 114514 <__errno> 11280a: c7 00 58 00 00 00 movl $0x58,(%eax) 112810: b8 ff ff ff ff mov $0xffffffff,%eax 112815: eb ca jmp 1127e1 <_POSIX_Semaphore_Create_support+0xb1> 112817: 90 nop } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); 112818: e8 8b cb ff ff call 10f3a8 <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 11281d: e8 f2 1c 00 00 call 114514 <__errno> <== NOT EXECUTED 112822: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED 112828: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11282d: eb b2 jmp 1127e1 <_POSIX_Semaphore_Create_support+0xb1><== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 11282f: e8 74 cb ff ff call 10f3a8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 112834: e8 db 1c 00 00 call 114514 <__errno> 112839: c7 00 1c 00 00 00 movl $0x1c,(%eax) 11283f: b8 ff ff ff ff mov $0xffffffff,%eax 112844: eb 9b jmp 1127e1 <_POSIX_Semaphore_Create_support+0xb1> =============================================================================== 00112898 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 112898: 55 push %ebp 112899: 89 e5 mov %esp,%ebp 11289b: 83 ec 08 sub $0x8,%esp 11289e: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !name ) 1128a1: 85 c0 test %eax,%eax 1128a3: 74 05 je 1128aa <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 1128a5: 80 38 00 cmpb $0x0,(%eax) 1128a8: 75 0a jne 1128b4 <_POSIX_Semaphore_Name_to_id+0x1c> return EINVAL; status = _Objects_Name_to_id_string( &_POSIX_Semaphore_Information, name, (Objects_Id*)id ); if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1128aa: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 1128af: c9 leave 1128b0: c3 ret 1128b1: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 1128b4: 52 push %edx 1128b5: ff 75 0c pushl 0xc(%ebp) 1128b8: 50 push %eax 1128b9: 68 60 5d 12 00 push $0x125d60 1128be: e8 59 0a 00 00 call 11331c <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, (Objects_Id*)id ); if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1128c3: 83 c4 10 add $0x10,%esp 1128c6: 83 f8 01 cmp $0x1,%eax 1128c9: 19 c0 sbb %eax,%eax 1128cb: f7 d0 not %eax 1128cd: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 1128d0: c9 leave 1128d1: c3 ret =============================================================================== 001128fc <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 1128fc: 55 push %ebp 1128fd: 89 e5 mov %esp,%ebp 1128ff: 53 push %ebx 112900: 83 ec 18 sub $0x18,%esp 112903: 8a 5d 0c mov 0xc(%ebp),%bl * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, 112906: 8d 45 f8 lea -0x8(%ebp),%eax 112909: 50 push %eax 11290a: 8b 45 08 mov 0x8(%ebp),%eax 11290d: ff 30 pushl (%eax) 11290f: 68 60 5d 12 00 push $0x125d60 112914: e8 4b c2 ff ff call 10eb64 <_Objects_Get> 112919: 89 c2 mov %eax,%edx POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 11291b: 83 c4 10 add $0x10,%esp 11291e: 8b 4d f8 mov -0x8(%ebp),%ecx 112921: 85 c9 test %ecx,%ecx 112923: 74 17 je 11293c <_POSIX_Semaphore_Wait_support+0x40> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 112925: e8 ea 1b 00 00 call 114514 <__errno> 11292a: c7 00 16 00 00 00 movl $0x16,(%eax) 112930: b8 ff ff ff ff mov $0xffffffff,%eax } 112935: 8b 5d fc mov -0x4(%ebp),%ebx 112938: c9 leave 112939: c3 ret 11293a: 66 90 xchg %ax,%ax the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 11293c: ff 75 10 pushl 0x10(%ebp) 11293f: 0f b6 c3 movzbl %bl,%eax 112942: 50 push %eax 112943: ff 72 08 pushl 0x8(%edx) 112946: 8d 42 1c lea 0x1c(%edx),%eax 112949: 50 push %eax 11294a: e8 c5 06 00 00 call 113014 <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 11294f: e8 54 ca ff ff call 10f3a8 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 112954: 83 c4 10 add $0x10,%esp 112957: a1 dc 5a 12 00 mov 0x125adc,%eax 11295c: 8b 40 34 mov 0x34(%eax),%eax 11295f: 85 c0 test %eax,%eax 112961: 75 09 jne 11296c <_POSIX_Semaphore_Wait_support+0x70> 112963: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 112965: 8b 5d fc mov -0x4(%ebp),%ebx 112968: c9 leave 112969: c3 ret 11296a: 66 90 xchg %ax,%ax _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 11296c: e8 a3 1b 00 00 call 114514 <__errno> 112971: 89 c3 mov %eax,%ebx 112973: 83 ec 0c sub $0xc,%esp 112976: a1 dc 5a 12 00 mov 0x125adc,%eax 11297b: ff 70 34 pushl 0x34(%eax) 11297e: e8 8d 16 00 00 call 114010 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 112983: 89 03 mov %eax,(%ebx) 112985: b8 ff ff ff ff mov $0xffffffff,%eax 11298a: 83 c4 10 add $0x10,%esp 11298d: eb a6 jmp 112935 <_POSIX_Semaphore_Wait_support+0x39> =============================================================================== 0010f0a8 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10f0a8: 55 push %ebp 10f0a9: 89 e5 mov %esp,%ebp 10f0ab: 57 push %edi 10f0ac: 56 push %esi 10f0ad: 53 push %ebx 10f0ae: 83 ec 18 sub $0x18,%esp POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 10f0b1: 68 e4 00 00 00 push $0xe4 10f0b6: e8 09 e4 ff ff call 10d4c4 <_Workspace_Allocate> 10f0bb: 89 c3 mov %eax,%ebx if ( !api ) 10f0bd: 83 c4 10 add $0x10,%esp 10f0c0: 85 c0 test %eax,%eax 10f0c2: 0f 84 10 01 00 00 je 10f1d8 <_POSIX_Threads_Create_extension+0x130><== NEVER TAKEN return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 10f0c8: 8b 45 0c mov 0xc(%ebp),%eax 10f0cb: 89 98 f8 00 00 00 mov %ebx,0xf8(%eax) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 10f0d1: be 60 98 11 00 mov $0x119860,%esi 10f0d6: b9 0e 00 00 00 mov $0xe,%ecx 10f0db: 89 df mov %ebx,%edi 10f0dd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 10f0df: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 10f0e6: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 10f0ed: be 78 98 11 00 mov $0x119878,%esi 10f0f2: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 10f0f8: b1 06 mov $0x6,%cl 10f0fa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 10f0fc: b8 ff 00 00 00 mov $0xff,%eax 10f101: 8b 55 0c mov 0xc(%ebp),%edx 10f104: 2b 42 14 sub 0x14(%edx),%eax 10f107: 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; 10f10d: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 10f114: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 10f117: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10f11e: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 10f121: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10f128: 00 00 00 10f12b: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10f131: 89 83 d8 00 00 00 mov %eax,0xd8(%ebx) 10f137: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 10f13e: 00 00 00 10f141: 8d 83 d8 00 00 00 lea 0xd8(%ebx),%eax 10f147: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) * If the thread is not a posix thread, then all posix signals are blocked * by default. */ /* XXX use signal constants */ api->signals_pending = 0; 10f14d: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) 10f154: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API && 10f157: 8b 52 08 mov 0x8(%edx),%edx 10f15a: 89 d0 mov %edx,%eax 10f15c: c1 e8 18 shr $0x18,%eax 10f15f: 83 e0 07 and $0x7,%eax 10f162: 83 f8 03 cmp $0x3,%eax 10f165: 74 51 je 10f1b8 <_POSIX_Threads_Create_extension+0x110> _Objects_Get_class( created->Object.id ) == 1 ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; } else { api->signals_blocked = 0xffffffff; 10f167: c7 83 c4 00 00 00 ff movl $0xffffffff,0xc4(%ebx) 10f16e: ff ff ff } _Thread_queue_Initialize( 10f171: 6a 00 push $0x0 10f173: 68 00 10 00 00 push $0x1000 10f178: 6a 00 push $0x0 10f17a: 8d 43 3c lea 0x3c(%ebx),%eax 10f17d: 50 push %eax 10f17e: e8 41 d9 ff ff call 10cac4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 10f183: 8b 55 0c mov 0xc(%ebp),%edx 10f186: 8b 42 08 mov 0x8(%edx),%eax * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10f189: c7 83 a4 00 00 00 00 movl $0x0,0xa4(%ebx) 10f190: 00 00 00 * @param[in] the_heap is the heap to operate upon 10f193: c7 83 b8 00 00 00 24 movl $0x10f224,0xb8(%ebx) 10f19a: f2 10 00 * @param[in] starting_address is the starting address of the memory for 10f19d: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) * the heap 10f1a3: 89 93 c0 00 00 00 mov %edx,0xc0(%ebx) 10f1a9: b0 01 mov $0x1,%al 10f1ab: 83 c4 10 add $0x10,%esp created->Object.id, created ); return true; } 10f1ae: 8d 65 f4 lea -0xc(%ebp),%esp 10f1b1: 5b pop %ebx 10f1b2: 5e pop %esi 10f1b3: 5f pop %edi 10f1b4: c9 leave 10f1b5: c3 ret 10f1b6: 66 90 xchg %ax,%ax * by default. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API && 10f1b8: c1 ea 1b shr $0x1b,%edx 10f1bb: 4a dec %edx 10f1bc: 75 a9 jne 10f167 <_POSIX_Threads_Create_extension+0xbf><== NEVER TAKEN _Objects_Get_class( created->Object.id ) == 1 ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 10f1be: a1 bc f9 11 00 mov 0x11f9bc,%eax 10f1c3: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10f1c9: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 10f1cf: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) 10f1d5: eb 9a jmp 10f171 <_POSIX_Threads_Create_extension+0xc9> 10f1d7: 90 nop POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) 10f1d8: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 10f1da: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f1dd: 5b pop %ebx <== NOT EXECUTED 10f1de: 5e pop %esi <== NOT EXECUTED 10f1df: 5f pop %edi <== NOT EXECUTED 10f1e0: c9 leave <== NOT EXECUTED 10f1e1: c3 ret <== NOT EXECUTED =============================================================================== 0010f024 <_POSIX_Threads_Delete_extension>: User_extensions_routine _POSIX_Threads_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 10f024: 55 push %ebp 10f025: 89 e5 mov %esp,%ebp 10f027: 57 push %edi 10f028: 56 push %esi 10f029: 53 push %ebx 10f02a: 83 ec 18 sub $0x18,%esp 10f02d: 8b 7d 0c mov 0xc(%ebp),%edi Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 10f030: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 10f036: 89 45 f0 mov %eax,-0x10(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 10f039: 57 push %edi 10f03a: e8 a1 14 00 00 call 1104e0 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 10f03f: 89 3c 24 mov %edi,(%esp) 10f042: e8 fd 14 00 00 call 110544 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 10f047: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10f04a: 8b 5d f0 mov -0x10(%ebp),%ebx 10f04d: 83 c3 3c add $0x3c,%ebx 10f050: 83 c4 10 add $0x10,%esp 10f053: eb 08 jmp 10f05d <_POSIX_Threads_Delete_extension+0x39> 10f055: 8d 76 00 lea 0x0(%esi),%esi *(void **)the_thread->Wait.return_argument = value_ptr; 10f058: 8b 40 28 mov 0x28(%eax),%eax 10f05b: 89 30 mov %esi,(%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 )) ) 10f05d: 83 ec 0c sub $0xc,%esp 10f060: 53 push %ebx 10f061: e8 ae d6 ff ff call 10c714 <_Thread_queue_Dequeue> 10f066: 83 c4 10 add $0x10,%esp 10f069: 85 c0 test %eax,%eax 10f06b: 75 eb jne 10f058 <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 10f06d: 8b 45 f0 mov -0x10(%ebp),%eax 10f070: 83 78 7c 03 cmpl $0x3,0x7c(%eax) 10f074: 74 1e je 10f094 <_POSIX_Threads_Delete_extension+0x70> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 10f076: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 10f07d: 00 00 00 (void) _Workspace_Free( api ); 10f080: 8b 45 f0 mov -0x10(%ebp),%eax 10f083: 89 45 08 mov %eax,0x8(%ebp) } 10f086: 8d 65 f4 lea -0xc(%ebp),%esp 10f089: 5b pop %ebx 10f08a: 5e pop %esi 10f08b: 5f pop %edi 10f08c: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 10f08d: e9 1a e4 ff ff jmp 10d4ac <_Workspace_Free> 10f092: 66 90 xchg %ax,%ax while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 10f094: 83 ec 0c sub $0xc,%esp 10f097: 05 9c 00 00 00 add $0x9c,%eax 10f09c: 50 push %eax 10f09d: e8 2e e3 ff ff call 10d3d0 <_Watchdog_Remove> 10f0a2: 83 c4 10 add $0x10,%esp 10f0a5: eb cf jmp 10f076 <_POSIX_Threads_Delete_extension+0x52> =============================================================================== 0010b0ac <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body( void ) { 10b0ac: 55 push %ebp 10b0ad: 89 e5 mov %esp,%ebp 10b0af: 57 push %edi 10b0b0: 56 push %esi 10b0b1: 53 push %ebx 10b0b2: 83 ec 4c sub $0x4c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = _POSIX_Threads_User_initialization_threads; 10b0b5: 8b 3d 80 2b 12 00 mov 0x122b80,%edi maximum = _POSIX_Threads_Number_of_initialization_threads; 10b0bb: a1 54 2c 12 00 mov 0x122c54,%eax 10b0c0: 89 45 b0 mov %eax,-0x50(%ebp) if ( !user_threads || maximum == 0 ) 10b0c3: 85 ff test %edi,%edi 10b0c5: 74 44 je 10b10b <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10b0c7: 85 c0 test %eax,%eax 10b0c9: 74 40 je 10b10b <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10b0cb: 31 db xor %ebx,%ebx 10b0cd: 8d 75 b8 lea -0x48(%ebp),%esi for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10b0d0: 83 ec 0c sub $0xc,%esp 10b0d3: 56 push %esi 10b0d4: e8 13 5e 00 00 call 110eec (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10b0d9: 58 pop %eax 10b0da: 5a pop %edx 10b0db: 6a 02 push $0x2 10b0dd: 56 push %esi 10b0de: e8 39 5e 00 00 call 110f1c (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10b0e3: 59 pop %ecx 10b0e4: 58 pop %eax 10b0e5: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10b0e9: 56 push %esi 10b0ea: e8 61 5e 00 00 call 110f50 status = pthread_create( 10b0ef: 6a 00 push $0x0 10b0f1: ff 34 df pushl (%edi,%ebx,8) 10b0f4: 56 push %esi 10b0f5: 8d 45 f0 lea -0x10(%ebp),%eax 10b0f8: 50 push %eax 10b0f9: e8 ea fb ff ff call 10ace8 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10b0fe: 83 c4 20 add $0x20,%esp 10b101: 85 c0 test %eax,%eax 10b103: 75 0f jne 10b114 <_POSIX_Threads_Initialize_user_threads_body+0x68> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10b105: 43 inc %ebx 10b106: 39 5d b0 cmp %ebx,-0x50(%ebp) 10b109: 77 c5 ja 10b0d0 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status ); } } 10b10b: 8d 65 f4 lea -0xc(%ebp),%esp 10b10e: 5b pop %ebx 10b10f: 5e pop %esi 10b110: 5f pop %edi 10b111: c9 leave 10b112: c3 ret 10b113: 90 nop &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status ); 10b114: 52 push %edx 10b115: 50 push %eax 10b116: 6a 01 push $0x1 10b118: 6a 02 push $0x2 10b11a: e8 31 21 00 00 call 10d250 <_Internal_error_Occurred> =============================================================================== 0010f224 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 10f224: 55 push %ebp 10f225: 89 e5 mov %esp,%ebp 10f227: 56 push %esi 10f228: 53 push %ebx 10f229: 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 ]; 10f22c: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 10f232: 83 ec 0c sub $0xc,%esp 10f235: 8d 86 90 00 00 00 lea 0x90(%esi),%eax 10f23b: 50 push %eax 10f23c: e8 5b 0d 00 00 call 10ff9c <_Timespec_To_ticks> if ( !ticks ) 10f241: 83 c4 10 add $0x10,%esp 10f244: 85 c0 test %eax,%eax 10f246: 75 02 jne 10f24a <_POSIX_Threads_Sporadic_budget_TSR+0x26><== ALWAYS TAKEN 10f248: b0 01 mov $0x1,%al <== NOT EXECUTED ticks = 1; the_thread->cpu_time_budget = ticks; 10f24a: 89 43 78 mov %eax,0x78(%ebx) 10f24d: b8 ff 00 00 00 mov $0xff,%eax 10f252: 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; 10f258: 89 43 18 mov %eax,0x18(%ebx) if ( the_thread->resource_count == 0 || 10f25b: 8b 4b 1c mov 0x1c(%ebx),%ecx 10f25e: 85 c9 test %ecx,%ecx 10f260: 74 3e je 10f2a0 <_POSIX_Threads_Sporadic_budget_TSR+0x7c> 10f262: 39 43 14 cmp %eax,0x14(%ebx) 10f265: 77 39 ja 10f2a0 <_POSIX_Threads_Sporadic_budget_TSR+0x7c><== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 10f267: 83 ec 0c sub $0xc,%esp 10f26a: 8d 86 88 00 00 00 lea 0x88(%esi),%eax 10f270: 50 push %eax 10f271: e8 26 0d 00 00 call 10ff9c <_Timespec_To_ticks> if ( !ticks ) 10f276: 83 c4 10 add $0x10,%esp 10f279: 85 c0 test %eax,%eax 10f27b: 75 02 jne 10f27f <_POSIX_Threads_Sporadic_budget_TSR+0x5b><== ALWAYS TAKEN 10f27d: b0 01 mov $0x1,%al <== NOT EXECUTED * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10f27f: 89 86 a8 00 00 00 mov %eax,0xa8(%esi) void *starting_address, size_t *size 10f285: 8d 86 9c 00 00 00 lea 0x9c(%esi),%eax 10f28b: 89 45 0c mov %eax,0xc(%ebp) 10f28e: c7 45 08 dc f9 11 00 movl $0x11f9dc,0x8(%ebp) ticks = 1; _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 10f295: 8d 65 f8 lea -0x8(%ebp),%esp 10f298: 5b pop %ebx 10f299: 5e pop %esi 10f29a: c9 leave 10f29b: e9 00 e0 ff ff jmp 10d2a0 <_Watchdog_Insert> new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 10f2a0: 52 push %edx 10f2a1: 6a 01 push $0x1 10f2a3: 50 push %eax 10f2a4: 53 push %ebx 10f2a5: e8 0a cc ff ff call 10beb4 <_Thread_Change_priority> 10f2aa: 83 c4 10 add $0x10,%esp 10f2ad: eb b8 jmp 10f267 <_POSIX_Threads_Sporadic_budget_TSR+0x43> =============================================================================== 0010f1e4 <_POSIX_Threads_Sporadic_budget_callout>: */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10f1e4: 55 push %ebp 10f1e5: 89 e5 mov %esp,%ebp 10f1e7: 83 ec 08 sub $0x8,%esp 10f1ea: 8b 4d 08 mov 0x8(%ebp),%ecx POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f1ed: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax * 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 */ 10f1f3: c7 41 78 ff ff ff ff movl $0xffffffff,0x78(%ecx) /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of 10f1fa: ba ff 00 00 00 mov $0xff,%edx 10f1ff: 2b 90 84 00 00 00 sub 0x84(%eax),%edx new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 10f205: 89 51 18 mov %edx,0x18(%ecx) if ( the_thread->resource_count == 0 || 10f208: 8b 41 1c mov 0x1c(%ecx),%eax 10f20b: 85 c0 test %eax,%eax 10f20d: 74 05 je 10f214 <_POSIX_Threads_Sporadic_budget_callout+0x30><== ALWAYS TAKEN 10f20f: 39 51 14 cmp %edx,0x14(%ecx) <== NOT EXECUTED 10f212: 76 0d jbe 10f221 <_POSIX_Threads_Sporadic_budget_callout+0x3d><== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 10f214: 50 push %eax 10f215: 6a 01 push $0x1 10f217: 52 push %edx 10f218: 51 push %ecx 10f219: e8 96 cc ff ff call 10beb4 <_Thread_Change_priority> 10f21e: 83 c4 10 add $0x10,%esp } 10f221: c9 leave 10f222: c3 ret =============================================================================== 001104e0 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 1104e0: 55 push %ebp 1104e1: 89 e5 mov %esp,%ebp 1104e3: 57 push %edi 1104e4: 56 push %esi 1104e5: 53 push %ebx 1104e6: 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 ]; 1104e9: 8b 45 08 mov 0x8(%ebp),%eax 1104ec: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 1104f2: c7 87 cc 00 00 00 01 movl $0x1,0xcc(%edi) 1104f9: 00 00 00 * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 1104fc: 8d b7 dc 00 00 00 lea 0xdc(%edi),%esi while ( !_Chain_Is_empty( handler_stack ) ) { 110502: 39 b7 d8 00 00 00 cmp %esi,0xd8(%edi) 110508: 74 30 je 11053a <_POSIX_Threads_cancel_run+0x5a><== ALWAYS TAKEN 11050a: 66 90 xchg %ax,%ax _ISR_Disable( level ); 11050c: 9c pushf <== NOT EXECUTED 11050d: fa cli <== NOT EXECUTED 11050e: 59 pop %ecx <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 11050f: 8b 5e 04 mov 0x4(%esi),%ebx <== NOT EXECUTED 110512: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 110514: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 110517: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED 11051a: 89 10 mov %edx,(%eax) <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 11051c: 51 push %ecx <== NOT EXECUTED 11051d: 9d popf <== NOT EXECUTED (*handler->routine)( handler->arg ); 11051e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110521: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 110524: ff 53 08 call *0x8(%ebx) <== NOT EXECUTED _Workspace_Free( handler ); 110527: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 11052a: e8 7d cf ff ff call 10d4ac <_Workspace_Free> <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 11052f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110532: 39 b7 d8 00 00 00 cmp %esi,0xd8(%edi) <== NOT EXECUTED 110538: 75 d2 jne 11050c <_POSIX_Threads_cancel_run+0x2c><== NOT EXECUTED (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 11053a: 8d 65 f4 lea -0xc(%ebp),%esp 11053d: 5b pop %ebx 11053e: 5e pop %esi 11053f: 5f pop %edi 110540: c9 leave 110541: c3 ret =============================================================================== 001112a0 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 1112a0: 55 push %ebp 1112a1: 89 e5 mov %esp,%ebp 1112a3: 56 push %esi 1112a4: 53 push %ebx 1112a5: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 1112a8: 83 ec 0c sub $0xc,%esp 1112ab: 53 push %ebx 1112ac: e8 6f de ff ff call 10f120 <_Watchdog_Remove> _ISR_Disable( level ); 1112b1: 9c pushf 1112b2: fa cli 1112b3: 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 ) { 1112b4: 83 c4 10 add $0x10,%esp 1112b7: 8b 43 08 mov 0x8(%ebx),%eax 1112ba: 85 c0 test %eax,%eax 1112bc: 74 0e je 1112cc <_POSIX_Timer_Insert_helper+0x2c><== ALWAYS TAKEN _ISR_Enable( level ); 1112be: 56 push %esi <== NOT EXECUTED 1112bf: 9d popf <== NOT EXECUTED 1112c0: 31 c0 xor %eax,%eax <== NOT EXECUTED */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 1112c2: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1112c5: 5b pop %ebx <== NOT EXECUTED 1112c6: 5e pop %esi <== NOT EXECUTED 1112c7: c9 leave <== NOT EXECUTED 1112c8: c3 ret <== NOT EXECUTED 1112c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 1112cc: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) * @param[in] the_heap is the heap to operate upon 1112d3: 8b 45 14 mov 0x14(%ebp),%eax 1112d6: 89 43 1c mov %eax,0x1c(%ebx) * @param[in] starting_address is the starting address of the memory for 1112d9: 8b 45 10 mov 0x10(%ebp),%eax 1112dc: 89 43 20 mov %eax,0x20(%ebx) * the heap 1112df: 8b 45 18 mov 0x18(%ebp),%eax 1112e2: 89 43 24 mov %eax,0x24(%ebx) * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 1112e5: 8b 45 0c mov 0xc(%ebp),%eax 1112e8: 89 43 0c mov %eax,0xc(%ebx) void *starting_address, size_t *size 1112eb: 83 ec 08 sub $0x8,%esp 1112ee: 53 push %ebx 1112ef: 68 5c 40 12 00 push $0x12405c 1112f4: e8 f7 dc ff ff call 10eff0 <_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 ); 1112f9: 56 push %esi 1112fa: 9d popf 1112fb: b0 01 mov $0x1,%al 1112fd: 83 c4 10 add $0x10,%esp return true; } 111300: 8d 65 f8 lea -0x8(%ebp),%esp 111303: 5b pop %ebx 111304: 5e pop %esi 111305: c9 leave 111306: c3 ret =============================================================================== 0010b7a4 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 10b7a4: 55 push %ebp 10b7a5: 89 e5 mov %esp,%ebp 10b7a7: 53 push %ebx 10b7a8: 83 ec 04 sub $0x4,%esp 10b7ab: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10b7ae: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b7b1: 8b 53 54 mov 0x54(%ebx),%edx 10b7b4: 85 d2 test %edx,%edx 10b7b6: 75 28 jne 10b7e0 <_POSIX_Timer_TSR+0x3c> <== ALWAYS TAKEN 10b7b8: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 10b7bb: 85 c0 test %eax,%eax <== NOT EXECUTED 10b7bd: 75 21 jne 10b7e0 <_POSIX_Timer_TSR+0x3c> <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b7bf: 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 ) ) { 10b7c3: 83 ec 08 sub $0x8,%esp 10b7c6: ff 73 44 pushl 0x44(%ebx) 10b7c9: ff 73 38 pushl 0x38(%ebx) 10b7cc: e8 db 57 00 00 call 110fac } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10b7d1: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10b7d8: 83 c4 10 add $0x10,%esp } 10b7db: 8b 5d fc mov -0x4(%ebp),%ebx 10b7de: c9 leave 10b7df: c3 ret ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 10b7e0: 83 ec 0c sub $0xc,%esp 10b7e3: 53 push %ebx 10b7e4: 68 a4 b7 10 00 push $0x10b7a4 10b7e9: ff 73 08 pushl 0x8(%ebx) 10b7ec: ff 73 64 pushl 0x64(%ebx) 10b7ef: 8d 43 10 lea 0x10(%ebx),%eax 10b7f2: 50 push %eax 10b7f3: e8 a8 5a 00 00 call 1112a0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10b7f8: 83 c4 20 add $0x20,%esp 10b7fb: 84 c0 test %al,%al 10b7fd: 74 dc je 10b7db <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10b7ff: 83 ec 0c sub $0xc,%esp 10b802: 8d 43 6c lea 0x6c(%ebx),%eax 10b805: 50 push %eax 10b806: e8 19 17 00 00 call 10cf24 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b80b: c6 43 3c 03 movb $0x3,0x3c(%ebx) 10b80f: 83 c4 10 add $0x10,%esp 10b812: eb af jmp 10b7c3 <_POSIX_Timer_TSR+0x1f> =============================================================================== 001105ec <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 1105ec: 55 push %ebp 1105ed: 89 e5 mov %esp,%ebp 1105ef: 57 push %edi 1105f0: 56 push %esi 1105f1: 53 push %ebx 1105f2: 83 ec 28 sub $0x28,%esp 1105f5: 8b 75 08 mov 0x8(%ebp),%esi 1105f8: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 1105fb: 6a 01 push $0x1 1105fd: 0f b6 45 10 movzbl 0x10(%ebp),%eax 110601: 50 push %eax 110602: 8d 45 e8 lea -0x18(%ebp),%eax 110605: 50 push %eax 110606: 53 push %ebx 110607: 56 push %esi 110608: e8 73 00 00 00 call 110680 <_POSIX_signals_Clear_signals> 11060d: 83 c4 20 add $0x20,%esp 110610: 84 c0 test %al,%al 110612: 74 4c je 110660 <_POSIX_signals_Check_signal+0x74> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 110614: 8d 04 5b lea (%ebx,%ebx,2),%eax 110617: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 11061e: 8b 8a 48 ff 11 00 mov 0x11ff48(%edx),%ecx 110624: 83 f9 01 cmp $0x1,%ecx 110627: 74 37 je 110660 <_POSIX_signals_Check_signal+0x74><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 110629: 8b be c4 00 00 00 mov 0xc4(%esi),%edi api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 11062f: 89 f8 mov %edi,%eax 110631: 0b 82 44 ff 11 00 or 0x11ff44(%edx),%eax 110637: 89 86 c4 00 00 00 mov %eax,0xc4(%esi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 11063d: 83 ba 40 ff 11 00 02 cmpl $0x2,0x11ff40(%edx) 110644: 74 26 je 11066c <_POSIX_signals_Check_signal+0x80> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 110646: 83 ec 0c sub $0xc,%esp 110649: 53 push %ebx 11064a: ff d1 call *%ecx 11064c: 83 c4 10 add $0x10,%esp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 11064f: 89 be c4 00 00 00 mov %edi,0xc4(%esi) 110655: b0 01 mov $0x1,%al return true; } 110657: 8d 65 f4 lea -0xc(%ebp),%esp 11065a: 5b pop %ebx 11065b: 5e pop %esi 11065c: 5f pop %edi 11065d: c9 leave 11065e: c3 ret 11065f: 90 nop /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 110660: 31 c0 xor %eax,%eax } 110662: 8d 65 f4 lea -0xc(%ebp),%esp 110665: 5b pop %ebx 110666: 5e pop %esi 110667: 5f pop %edi 110668: c9 leave 110669: c3 ret 11066a: 66 90 xchg %ax,%ax /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 11066c: 50 push %eax 11066d: 6a 00 push $0x0 11066f: 8d 45 e8 lea -0x18(%ebp),%eax 110672: 50 push %eax 110673: 53 push %ebx 110674: ff 92 48 ff 11 00 call *0x11ff48(%edx) 11067a: 83 c4 10 add $0x10,%esp 11067d: eb d0 jmp 11064f <_POSIX_signals_Check_signal+0x63> =============================================================================== 00110ce0 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( sigset_t mask ) { 110ce0: 55 push %ebp 110ce1: 89 e5 mov %esp,%ebp 110ce3: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 110ce6: 9c pushf 110ce7: fa cli 110ce8: 5a pop %edx _POSIX_signals_Pending &= ~mask; 110ce9: f7 d0 not %eax 110ceb: 23 05 20 01 12 00 and 0x120120,%eax 110cf1: a3 20 01 12 00 mov %eax,0x120120 if ( !_POSIX_signals_Pending ) 110cf6: 85 c0 test %eax,%eax 110cf8: 75 06 jne 110d00 <_POSIX_signals_Clear_process_signals+0x20><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 110cfa: ff 0d a0 f9 11 00 decl 0x11f9a0 _ISR_Enable( level ); 110d00: 52 push %edx 110d01: 9d popf } 110d02: c9 leave 110d03: c3 ret =============================================================================== 00110680 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 110680: 55 push %ebp 110681: 89 e5 mov %esp,%ebp 110683: 57 push %edi 110684: 56 push %esi 110685: 53 push %ebx 110686: 83 ec 0c sub $0xc,%esp 110689: 8b 7d 08 mov 0x8(%ebp),%edi 11068c: 8b 75 0c mov 0xc(%ebp),%esi 11068f: 8a 45 14 mov 0x14(%ebp),%al sigset_t signals_blocked; ISR_Level level; bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 110692: 8d 4e ff lea -0x1(%esi),%ecx 110695: bb 01 00 00 00 mov $0x1,%ebx 11069a: d3 e3 shl %cl,%ebx /* 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 ) 11069c: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 1106a0: 0f 85 9e 00 00 00 jne 110744 <_POSIX_signals_Clear_signals+0xc4> 1106a6: ba ff ff ff ff mov $0xffffffff,%edx signals_blocked = SIGNAL_ALL_MASK; /* XXX this is not right for siginfo type signals yet */ /* XXX since they can't be cleared the same way */ _ISR_Disable( level ); 1106ab: 9c pushf 1106ac: fa cli 1106ad: 8f 45 f0 popl -0x10(%ebp) if ( is_global ) { 1106b0: 84 c0 test %al,%al 1106b2: 0f 84 9c 00 00 00 je 110754 <_POSIX_signals_Clear_signals+0xd4> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 1106b8: 89 d8 mov %ebx,%eax 1106ba: 23 05 20 01 12 00 and 0x120120,%eax 1106c0: 85 d0 test %edx,%eax 1106c2: 0f 84 b4 00 00 00 je 11077c <_POSIX_signals_Clear_signals+0xfc> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 1106c8: 8d 04 76 lea (%esi,%esi,2),%eax 1106cb: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 1106d2: 83 ba 40 ff 11 00 02 cmpl $0x2,0x11ff40(%edx) 1106d9: 0f 85 a1 00 00 00 jne 110780 <_POSIX_signals_Clear_signals+0x100> psiginfo = (POSIX_signals_Siginfo_node *) 1106df: 8d ba 40 01 12 00 lea 0x120140(%edx),%edi * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 1106e5: 8b 8a 40 01 12 00 mov 0x120140(%edx),%ecx * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 1106eb: 8d 77 04 lea 0x4(%edi),%esi 1106ee: 39 f1 cmp %esi,%ecx 1106f0: 0f 84 9a 00 00 00 je 110790 <_POSIX_signals_Clear_signals+0x110><== NEVER TAKEN 1106f6: 8b 01 mov (%ecx),%eax 1106f8: 89 82 40 01 12 00 mov %eax,0x120140(%edx) 1106fe: 89 78 04 mov %edi,0x4(%eax) 110701: 89 4d e8 mov %ecx,-0x18(%ebp) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 110704: 39 c6 cmp %eax,%esi 110706: 0f 84 8b 00 00 00 je 110797 <_POSIX_signals_Clear_signals+0x117><== ALWAYS TAKEN _POSIX_signals_Clear_process_signals( mask ); if ( psiginfo ) { 11070c: 8b 45 e8 mov -0x18(%ebp),%eax 11070f: 85 c0 test %eax,%eax 110711: 74 2c je 11073f <_POSIX_signals_Clear_signals+0xbf><== NEVER TAKEN *info = psiginfo->Info; 110713: 8b 75 e8 mov -0x18(%ebp),%esi 110716: 83 c6 08 add $0x8,%esi 110719: b9 03 00 00 00 mov $0x3,%ecx 11071e: 8b 7d 10 mov 0x10(%ebp),%edi 110721: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 110723: 8b 45 e8 mov -0x18(%ebp),%eax 110726: c7 00 c4 00 12 00 movl $0x1200c4,(%eax) 11072c: a1 c8 00 12 00 mov 0x1200c8,%eax 110731: 8b 55 e8 mov -0x18(%ebp),%edx 110734: 89 15 c8 00 12 00 mov %edx,0x1200c8 11073a: 89 10 mov %edx,(%eax) 11073c: 89 42 04 mov %eax,0x4(%edx) 11073f: b0 01 mov $0x1,%al 110741: eb 2d jmp 110770 <_POSIX_signals_Clear_signals+0xf0> 110743: 90 nop /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 110744: 8b 97 c4 00 00 00 mov 0xc4(%edi),%edx 11074a: f7 d2 not %edx 11074c: e9 5a ff ff ff jmp 1106ab <_POSIX_signals_Clear_signals+0x2b> 110751: 8d 76 00 lea 0x0(%esi),%esi } else _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 110754: 8b 8f c8 00 00 00 mov 0xc8(%edi),%ecx 11075a: 89 d8 mov %ebx,%eax 11075c: 21 c8 and %ecx,%eax 11075e: 85 d0 test %edx,%eax 110760: 74 1a je 11077c <_POSIX_signals_Clear_signals+0xfc> api->signals_pending &= ~mask; 110762: 89 d8 mov %ebx,%eax 110764: f7 d0 not %eax 110766: 21 c8 and %ecx,%eax 110768: 89 87 c8 00 00 00 mov %eax,0xc8(%edi) 11076e: b0 01 mov $0x1,%al do_callout = true; } } _ISR_Enable( level ); 110770: ff 75 f0 pushl -0x10(%ebp) 110773: 9d popf return do_callout; } 110774: 8d 65 f4 lea -0xc(%ebp),%esp 110777: 5b pop %ebx 110778: 5e pop %esi 110779: 5f pop %edi 11077a: c9 leave 11077b: c3 ret _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 11077c: 31 c0 xor %eax,%eax 11077e: eb f0 jmp 110770 <_POSIX_signals_Clear_signals+0xf0> &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 110780: 83 ec 0c sub $0xc,%esp 110783: 53 push %ebx 110784: e8 57 05 00 00 call 110ce0 <_POSIX_signals_Clear_process_signals> 110789: b0 01 mov $0x1,%al 11078b: 83 c4 10 add $0x10,%esp 11078e: eb e0 jmp 110770 <_POSIX_signals_Clear_signals+0xf0> 110790: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) <== NOT EXECUTED if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) _POSIX_signals_Clear_process_signals( mask ); 110797: 83 ec 0c sub $0xc,%esp 11079a: 53 push %ebx 11079b: e8 40 05 00 00 call 110ce0 <_POSIX_signals_Clear_process_signals> 1107a0: 83 c4 10 add $0x10,%esp 1107a3: e9 64 ff ff ff jmp 11070c <_POSIX_signals_Clear_signals+0x8c> =============================================================================== 0010adb8 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10adb8: 55 push %ebp 10adb9: 89 e5 mov %esp,%ebp 10adbb: 56 push %esi 10adbc: 53 push %ebx 10adbd: 8b 5d 08 mov 0x8(%ebp),%ebx 10adc0: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 10adc5: ba 01 00 00 00 mov $0x1,%edx 10adca: 8d 48 ff lea -0x1(%eax),%ecx 10adcd: 89 d6 mov %edx,%esi 10adcf: d3 e6 shl %cl,%esi 10add1: 85 de test %ebx,%esi 10add3: 75 20 jne 10adf5 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10add5: 40 inc %eax 10add6: 83 f8 20 cmp $0x20,%eax 10add9: 75 ef jne 10adca <_POSIX_signals_Get_highest+0x12> 10addb: b0 01 mov $0x1,%al } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) 10addd: ba 01 00 00 00 mov $0x1,%edx 10ade2: eb 06 jmp 10adea <_POSIX_signals_Get_highest+0x32> return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10ade4: 40 inc %eax 10ade5: 83 f8 1b cmp $0x1b,%eax 10ade8: 74 12 je 10adfc <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN if ( set & signo_to_mask( signo ) ) 10adea: 8d 48 ff lea -0x1(%eax),%ecx 10aded: 89 d6 mov %edx,%esi 10adef: d3 e6 shl %cl,%esi 10adf1: 85 de test %ebx,%esi 10adf3: 74 ef je 10ade4 <_POSIX_signals_Get_highest+0x2c> return signo; } return 0; } 10adf5: 5b pop %ebx 10adf6: 5e pop %esi 10adf7: c9 leave 10adf8: c3 ret 10adf9: 8d 76 00 lea 0x0(%esi),%esi return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10adfc: 30 c0 xor %al,%al <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 10adfe: 5b pop %ebx <== NOT EXECUTED 10adff: 5e pop %esi <== NOT EXECUTED 10ae00: c9 leave <== NOT EXECUTED 10ae01: c3 ret <== NOT EXECUTED =============================================================================== 0010eed0 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10eed0: 55 push %ebp 10eed1: 89 e5 mov %esp,%ebp 10eed3: 56 push %esi 10eed4: 53 push %ebx POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10eed5: 8b 45 08 mov 0x8(%ebp),%eax 10eed8: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( !api ) 10eede: 85 f6 test %esi,%esi 10eee0: 74 7c je 10ef5e <_POSIX_signals_Post_switch_extension+0x8e><== NEVER TAKEN 10eee2: 66 90 xchg %ax,%ax * 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) { restart: _ISR_Disable( level ); 10eee4: 9c pushf 10eee5: fa cli 10eee6: 59 pop %ecx if ( !(~api->signals_blocked & 10eee7: 8b 15 20 01 12 00 mov 0x120120,%edx 10eeed: 0b 96 c8 00 00 00 or 0xc8(%esi),%edx 10eef3: 8b 86 c4 00 00 00 mov 0xc4(%esi),%eax 10eef9: f7 d0 not %eax 10eefb: 85 c2 test %eax,%edx 10eefd: 74 5d je 10ef5c <_POSIX_signals_Post_switch_extension+0x8c> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 10eeff: 51 push %ecx 10ef00: 9d popf 10ef01: bb 1b 00 00 00 mov $0x1b,%ebx for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 10ef06: 50 push %eax 10ef07: 6a 00 push $0x0 10ef09: 53 push %ebx 10ef0a: 56 push %esi 10ef0b: e8 dc 16 00 00 call 1105ec <_POSIX_signals_Check_signal> 10ef10: 83 c4 10 add $0x10,%esp 10ef13: 84 c0 test %al,%al 10ef15: 75 cd jne 10eee4 <_POSIX_signals_Post_switch_extension+0x14><== NEVER TAKEN goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 10ef17: 51 push %ecx 10ef18: 6a 01 push $0x1 10ef1a: 53 push %ebx 10ef1b: 56 push %esi 10ef1c: e8 cb 16 00 00 call 1105ec <_POSIX_signals_Check_signal> 10ef21: 83 c4 10 add $0x10,%esp 10ef24: 84 c0 test %al,%al 10ef26: 75 bc jne 10eee4 <_POSIX_signals_Post_switch_extension+0x14><== NEVER TAKEN _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10ef28: 43 inc %ebx 10ef29: 83 fb 20 cmp $0x20,%ebx 10ef2c: 75 d8 jne 10ef06 <_POSIX_signals_Post_switch_extension+0x36> 10ef2e: b3 01 mov $0x1,%bl /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 10ef30: 52 push %edx 10ef31: 6a 00 push $0x0 10ef33: 53 push %ebx 10ef34: 56 push %esi 10ef35: e8 b2 16 00 00 call 1105ec <_POSIX_signals_Check_signal> 10ef3a: 83 c4 10 add $0x10,%esp 10ef3d: 84 c0 test %al,%al 10ef3f: 75 a3 jne 10eee4 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 10ef41: 50 push %eax 10ef42: 6a 01 push $0x1 10ef44: 53 push %ebx 10ef45: 56 push %esi 10ef46: e8 a1 16 00 00 call 1105ec <_POSIX_signals_Check_signal> 10ef4b: 83 c4 10 add $0x10,%esp 10ef4e: 84 c0 test %al,%al 10ef50: 75 92 jne 10eee4 <_POSIX_signals_Post_switch_extension+0x14> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10ef52: 43 inc %ebx 10ef53: 83 fb 1b cmp $0x1b,%ebx 10ef56: 75 d8 jne 10ef30 <_POSIX_signals_Post_switch_extension+0x60><== ALWAYS TAKEN 10ef58: eb 8a jmp 10eee4 <_POSIX_signals_Post_switch_extension+0x14><== NOT EXECUTED 10ef5a: 66 90 xchg %ax,%ax <== NOT EXECUTED while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10ef5c: 51 push %ecx 10ef5d: 9d popf goto restart; } } return; } 10ef5e: 8d 65 f8 lea -0x8(%ebp),%esp 10ef61: 5b pop %ebx 10ef62: 5e pop %esi 10ef63: c9 leave 10ef64: c3 ret =============================================================================== 0011a3d4 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 11a3d4: 55 push %ebp 11a3d5: 89 e5 mov %esp,%ebp 11a3d7: 57 push %edi 11a3d8: 56 push %esi 11a3d9: 53 push %ebx 11a3da: 83 ec 0c sub $0xc,%esp 11a3dd: 8b 5d 08 mov 0x8(%ebp),%ebx 11a3e0: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11a3e3: 8b bb f8 00 00 00 mov 0xf8(%ebx),%edi mask = signo_to_mask( signo ); 11a3e9: 8d 4e ff lea -0x1(%esi),%ecx 11a3ec: ba 01 00 00 00 mov $0x1,%edx 11a3f1: d3 e2 shl %cl,%edx /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 11a3f3: 8b 4b 10 mov 0x10(%ebx),%ecx 11a3f6: 89 c8 mov %ecx,%eax 11a3f8: 25 00 80 00 10 and $0x10008000,%eax 11a3fd: 3d 00 80 00 10 cmp $0x10008000,%eax 11a402: 74 70 je 11a474 <_POSIX_signals_Unblock_thread+0xa0> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 11a404: 8b 87 c4 00 00 00 mov 0xc4(%edi),%eax 11a40a: f7 d0 not %eax 11a40c: 85 c2 test %eax,%edx 11a40e: 74 58 je 11a468 <_POSIX_signals_Unblock_thread+0x94> * 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; 11a410: c6 43 75 01 movb $0x1,0x75(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 11a414: f7 c1 00 00 00 10 test $0x10000000,%ecx 11a41a: 74 34 je 11a450 <_POSIX_signals_Unblock_thread+0x7c> the_thread->Wait.return_code = EINTR; 11a41c: 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) ){ 11a423: 83 e1 08 and $0x8,%ecx 11a426: 74 40 je 11a468 <_POSIX_signals_Unblock_thread+0x94><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11a428: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11a42c: 0f 84 aa 00 00 00 je 11a4dc <_POSIX_signals_Unblock_thread+0x108><== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11a432: 83 ec 08 sub $0x8,%esp 11a435: 68 f8 ff 03 10 push $0x1003fff8 11a43a: 53 push %ebx 11a43b: e8 74 30 ff ff call 10d4b4 <_Thread_Clear_state> 11a440: 31 c0 xor %eax,%eax 11a442: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = TRUE; } } return false; } 11a445: 8d 65 f4 lea -0xc(%ebp),%esp 11a448: 5b pop %ebx 11a449: 5e pop %esi 11a44a: 5f pop %edi 11a44b: c9 leave 11a44c: c3 ret 11a44d: 8d 76 00 lea 0x0(%esi),%esi if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 11a450: 85 c9 test %ecx,%ecx 11a452: 75 14 jne 11a468 <_POSIX_signals_Unblock_thread+0x94><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11a454: a1 98 b9 12 00 mov 0x12b998,%eax 11a459: 85 c0 test %eax,%eax 11a45b: 74 0b je 11a468 <_POSIX_signals_Unblock_thread+0x94> 11a45d: 3b 1d bc b9 12 00 cmp 0x12b9bc,%ebx 11a463: 74 55 je 11a4ba <_POSIX_signals_Unblock_thread+0xe6><== ALWAYS TAKEN 11a465: 8d 76 00 lea 0x0(%esi),%esi _ISR_Signals_to_thread_executing = TRUE; 11a468: 31 c0 xor %eax,%eax } } return false; } 11a46a: 8d 65 f4 lea -0xc(%ebp),%esp 11a46d: 5b pop %ebx 11a46e: 5e pop %esi 11a46f: 5f pop %edi 11a470: c9 leave 11a471: c3 ret 11a472: 66 90 xchg %ax,%ax * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 11a474: 85 53 30 test %edx,0x30(%ebx) 11a477: 74 33 je 11a4ac <_POSIX_signals_Unblock_thread+0xd8> the_thread->Wait.return_code = EINTR; 11a479: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 11a480: 8b 7b 28 mov 0x28(%ebx),%edi if ( !info ) { 11a483: 8b 45 10 mov 0x10(%ebp),%eax 11a486: 85 c0 test %eax,%eax 11a488: 74 3e je 11a4c8 <_POSIX_signals_Unblock_thread+0xf4> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 11a48a: b9 03 00 00 00 mov $0x3,%ecx 11a48f: 8b 75 10 mov 0x10(%ebp),%esi 11a492: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 11a494: 83 ec 0c sub $0xc,%esp 11a497: 53 push %ebx 11a498: e8 c7 3a ff ff call 10df64 <_Thread_queue_Extract_with_proxy> 11a49d: b0 01 mov $0x1,%al 11a49f: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = TRUE; } } return false; } 11a4a2: 8d 65 f4 lea -0xc(%ebp),%esp 11a4a5: 5b pop %ebx 11a4a6: 5e pop %esi 11a4a7: 5f pop %edi 11a4a8: c9 leave 11a4a9: c3 ret 11a4aa: 66 90 xchg %ax,%ax * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 11a4ac: 8b 87 c4 00 00 00 mov 0xc4(%edi),%eax 11a4b2: f7 d0 not %eax 11a4b4: 85 c2 test %eax,%edx 11a4b6: 75 c1 jne 11a479 <_POSIX_signals_Unblock_thread+0xa5><== NEVER TAKEN 11a4b8: eb ae jmp 11a468 <_POSIX_signals_Unblock_thread+0x94> (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = TRUE; 11a4ba: c6 05 68 ba 12 00 01 movb $0x1,0x12ba68 11a4c1: 31 c0 xor %eax,%eax 11a4c3: eb a5 jmp 11a46a <_POSIX_signals_Unblock_thread+0x96> 11a4c5: 8d 76 00 lea 0x0(%esi),%esi the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 11a4c8: 89 37 mov %esi,(%edi) the_info->si_code = SI_USER; 11a4ca: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 11a4d1: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) 11a4d8: eb ba jmp 11a494 <_POSIX_signals_Unblock_thread+0xc0> 11a4da: 66 90 xchg %ax,%ax _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 11a4dc: 83 ec 0c sub $0xc,%esp 11a4df: 8d 43 48 lea 0x48(%ebx),%eax 11a4e2: 50 push %eax 11a4e3: e8 0c 47 ff ff call 10ebf4 <_Watchdog_Remove> 11a4e8: 83 c4 10 add $0x10,%esp 11a4eb: e9 42 ff ff ff jmp 11a432 <_POSIX_signals_Unblock_thread+0x5e> =============================================================================== 0010dde4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10dde4: 55 push %ebp 10dde5: 89 e5 mov %esp,%ebp 10dde7: 56 push %esi 10dde8: 53 push %ebx 10dde9: 8b 75 08 mov 0x8(%ebp),%esi 10ddec: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Get_information_status status; if ( !the_heap ) 10ddef: 85 f6 test %esi,%esi 10ddf1: 74 39 je 10de2c <_Protected_heap_Get_information+0x48><== NEVER TAKEN return false; if ( !the_info ) 10ddf3: 85 db test %ebx,%ebx 10ddf5: 74 35 je 10de2c <_Protected_heap_Get_information+0x48><== NEVER TAKEN return false; _RTEMS_Lock_allocator(); 10ddf7: 83 ec 0c sub $0xc,%esp 10ddfa: ff 35 54 50 12 00 pushl 0x125054 10de00: e8 63 e8 ff ff call 10c668 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 10de05: 5a pop %edx 10de06: 59 pop %ecx 10de07: 53 push %ebx 10de08: 56 push %esi 10de09: e8 4e 3e 00 00 call 111c5c <_Heap_Get_information> 10de0e: 89 c3 mov %eax,%ebx _RTEMS_Unlock_allocator(); 10de10: 58 pop %eax 10de11: ff 35 54 50 12 00 pushl 0x125054 10de17: e8 94 e8 ff ff call 10c6b0 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 10de1c: 83 c4 10 add $0x10,%esp 10de1f: 85 db test %ebx,%ebx 10de21: 0f 94 c0 sete %al return true; return false; } 10de24: 8d 65 f8 lea -0x8(%ebp),%esp 10de27: 5b pop %ebx 10de28: 5e pop %esi 10de29: c9 leave 10de2a: c3 ret 10de2b: 90 nop _RTEMS_Lock_allocator(); status = _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 10de2c: 31 c0 xor %eax,%eax return true; return false; } 10de2e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10de31: 5b pop %ebx <== NOT EXECUTED 10de32: 5e pop %esi <== NOT EXECUTED 10de33: c9 leave <== NOT EXECUTED 10de34: c3 ret <== NOT EXECUTED =============================================================================== 0010f5f4 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10f5f4: 55 push %ebp 10f5f5: 89 e5 mov %esp,%ebp 10f5f7: 53 push %ebx 10f5f8: 83 ec 10 sub $0x10,%esp 10f5fb: 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() ) 10f5fe: a1 94 f9 11 00 mov 0x11f994,%eax 10f603: 8b 40 40 mov 0x40(%eax),%eax 10f606: 80 78 04 01 cmpb $0x1,0x4(%eax) 10f60a: 19 c0 sbb %eax,%eax 10f60c: 83 e0 c0 and $0xffffffc0,%eax 10f60f: 83 c0 60 add $0x60,%eax to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 10f612: 50 push %eax 10f613: e8 ac de ff ff call 10d4c4 <_Workspace_Allocate> 10f618: 89 c2 mov %eax,%edx if ( !api ) 10f61a: 83 c4 10 add $0x10,%esp 10f61d: 85 c0 test %eax,%eax 10f61f: 74 67 je 10f688 <_RTEMS_tasks_Create_extension+0x94><== NEVER TAKEN return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 10f621: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 10f627: c7 00 00 00 00 00 movl $0x0,(%eax) #endif /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of 10f62d: c6 40 08 01 movb $0x1,0x8(%eax) * @a page_size byte units. If @a page_size is 0 or is not multiple of 10f631: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. 10f638: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) * 10f63f: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) * @param[in] the_heap is the heap to operate upon 10f646: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) * @param[in] starting_address is the starting address of the memory for 10f64d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 10f654: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx) 10f65b: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 10f65e: a1 94 f9 11 00 mov 0x11f994,%eax 10f663: 8b 40 40 mov 0x40(%eax),%eax 10f666: 80 78 04 00 cmpb $0x0,0x4(%eax) 10f66a: 74 12 je 10f67e <_RTEMS_tasks_Create_extension+0x8a> 10f66c: 31 c0 xor %eax,%eax 10f66e: 66 90 xchg %ax,%ax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 10f670: c7 44 82 20 00 00 00 movl $0x0,0x20(%edx,%eax,4) 10f677: 00 api->pending_events = EVENT_SETS_NONE_PENDING; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 10f678: 40 inc %eax 10f679: 83 f8 10 cmp $0x10,%eax 10f67c: 75 f2 jne 10f670 <_RTEMS_tasks_Create_extension+0x7c> 10f67e: b0 01 mov $0x1,%al api->Notepads[i] = 0; } return true; } 10f680: 8b 5d fc mov -0x4(%ebp),%ebx 10f683: c9 leave 10f684: c3 ret 10f685: 8d 76 00 lea 0x0(%esi),%esi if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) 10f688: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 10f68a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f68d: c9 leave <== NOT EXECUTED 10f68e: c3 ret <== NOT EXECUTED =============================================================================== 0010a7b0 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10a7b0: 55 push %ebp 10a7b1: 89 e5 mov %esp,%ebp 10a7b3: 57 push %edi 10a7b4: 56 push %esi 10a7b5: 53 push %ebx 10a7b6: 83 ec 1c sub $0x1c,%esp rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 10a7b9: a1 94 f9 11 00 mov 0x11f994,%eax 10a7be: 8b 40 40 mov 0x40(%eax),%eax /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 10a7c1: 8b 50 2c mov 0x2c(%eax),%edx maximum = api_configuration->number_of_initialization_tasks; 10a7c4: 8b 78 28 mov 0x28(%eax),%edi if ( !user_tasks || maximum == 0 ) 10a7c7: 85 d2 test %edx,%edx 10a7c9: 74 48 je 10a813 <_RTEMS_tasks_Initialize_user_tasks_body+0x63><== NEVER TAKEN 10a7cb: 85 ff test %edi,%edi 10a7cd: 74 44 je 10a813 <_RTEMS_tasks_Initialize_user_tasks_body+0x63><== NEVER TAKEN 10a7cf: 89 d3 mov %edx,%ebx 10a7d1: 31 f6 xor %esi,%esi 10a7d3: 90 nop return; for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 10a7d4: 83 ec 08 sub $0x8,%esp 10a7d7: 8d 45 f0 lea -0x10(%ebp),%eax 10a7da: 50 push %eax 10a7db: ff 73 0c pushl 0xc(%ebx) 10a7de: ff 73 14 pushl 0x14(%ebx) 10a7e1: ff 73 04 pushl 0x4(%ebx) 10a7e4: ff 73 08 pushl 0x8(%ebx) 10a7e7: ff 33 pushl (%ebx) 10a7e9: e8 9a fd ff ff call 10a588 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10a7ee: 83 c4 20 add $0x20,%esp 10a7f1: 85 c0 test %eax,%eax 10a7f3: 75 27 jne 10a81c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 10a7f5: 51 push %ecx 10a7f6: ff 73 18 pushl 0x18(%ebx) 10a7f9: ff 73 10 pushl 0x10(%ebx) 10a7fc: ff 75 f0 pushl -0x10(%ebp) 10a7ff: e8 24 00 00 00 call 10a828 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10a804: 83 c4 10 add $0x10,%esp 10a807: 85 c0 test %eax,%eax 10a809: 75 11 jne 10a81c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 10a80b: 46 inc %esi 10a80c: 83 c3 1c add $0x1c,%ebx 10a80f: 39 f7 cmp %esi,%edi 10a811: 77 c1 ja 10a7d4 <_RTEMS_tasks_Initialize_user_tasks_body+0x24><== NEVER TAKEN ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 10a813: 8d 65 f4 lea -0xc(%ebp),%esp 10a816: 5b pop %ebx 10a817: 5e pop %esi 10a818: 5f pop %edi 10a819: c9 leave 10a81a: c3 ret 10a81b: 90 nop user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 10a81c: 52 push %edx 10a81d: 50 push %eax 10a81e: 6a 01 push $0x1 10a820: 6a 01 push $0x1 10a822: e8 9d 0d 00 00 call 10b5c4 <_Internal_error_Occurred> =============================================================================== 0010f53c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10f53c: 55 push %ebp 10f53d: 89 e5 mov %esp,%ebp 10f53f: 57 push %edi 10f540: 56 push %esi 10f541: 53 push %ebx 10f542: 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 ]; 10f545: 8b 45 08 mov 0x8(%ebp),%eax 10f548: 8b b0 f4 00 00 00 mov 0xf4(%eax),%esi if ( !api ) 10f54e: 85 f6 test %esi,%esi 10f550: 74 45 je 10f597 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10f552: 9c pushf 10f553: fa cli 10f554: 58 pop %eax signal_set = asr->signals_posted; 10f555: 8b 7e 14 mov 0x14(%esi),%edi asr->signals_posted = 0; 10f558: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) _ISR_Enable( level ); 10f55f: 50 push %eax 10f560: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10f561: 85 ff test %edi,%edi 10f563: 74 32 je 10f597 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10f565: ff 46 1c incl 0x1c(%esi) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10f568: 50 push %eax 10f569: 8d 5d f0 lea -0x10(%ebp),%ebx 10f56c: 53 push %ebx 10f56d: 68 ff ff 00 00 push $0xffff 10f572: ff 76 10 pushl 0x10(%esi) 10f575: e8 ae 12 00 00 call 110828 (*asr->handler)( signal_set ); 10f57a: 89 3c 24 mov %edi,(%esp) 10f57d: ff 56 0c call *0xc(%esi) asr->nest_level -= 1; 10f580: ff 4e 1c decl 0x1c(%esi) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10f583: 83 c4 0c add $0xc,%esp 10f586: 53 push %ebx 10f587: 68 ff ff 00 00 push $0xffff 10f58c: ff 75 f0 pushl -0x10(%ebp) 10f58f: e8 94 12 00 00 call 110828 10f594: 83 c4 10 add $0x10,%esp } 10f597: 8d 65 f4 lea -0xc(%ebp),%esp 10f59a: 5b pop %ebx 10f59b: 5e pop %esi 10f59c: 5f pop %edi 10f59d: c9 leave 10f59e: c3 ret =============================================================================== 0010f4a0 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 10f4a0: 55 push %ebp 10f4a1: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 10f4a3: 8b 45 08 mov 0x8(%ebp),%eax 10f4a6: 8b 88 04 01 00 00 mov 0x104(%eax),%ecx while (tvp) { 10f4ac: 85 c9 test %ecx,%ecx 10f4ae: 74 13 je 10f4c3 <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 10f4b0: 8b 41 04 mov 0x4(%ecx),%eax 10f4b3: 8b 10 mov (%eax),%edx 10f4b5: 89 51 0c mov %edx,0xc(%ecx) *tvp->ptr = tvp->gval; 10f4b8: 8b 51 08 mov 0x8(%ecx),%edx 10f4bb: 89 10 mov %edx,(%eax) tvp = (rtems_task_variable_t *)tvp->next; 10f4bd: 8b 09 mov (%ecx),%ecx /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 10f4bf: 85 c9 test %ecx,%ecx 10f4c1: 75 ed jne 10f4b0 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 10f4c3: 8b 45 0c mov 0xc(%ebp),%eax 10f4c6: 8b 88 04 01 00 00 mov 0x104(%eax),%ecx while (tvp) { 10f4cc: 85 c9 test %ecx,%ecx 10f4ce: 74 13 je 10f4e3 <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 10f4d0: 8b 41 04 mov 0x4(%ecx),%eax 10f4d3: 8b 10 mov (%eax),%edx 10f4d5: 89 51 08 mov %edx,0x8(%ecx) *tvp->ptr = tvp->tval; 10f4d8: 8b 51 0c mov 0xc(%ecx),%edx 10f4db: 89 10 mov %edx,(%eax) tvp = (rtems_task_variable_t *)tvp->next; 10f4dd: 8b 09 mov (%ecx),%ecx *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 10f4df: 85 c9 test %ecx,%ecx 10f4e1: 75 ed jne 10f4d0 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 10f4e3: c9 leave 10f4e4: c3 ret =============================================================================== 0010b0f0 <_Rate_monotonic_Initiate_statistics>: #endif void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10b0f0: 55 push %ebp 10b0f1: 89 e5 mov %esp,%ebp 10b0f3: 57 push %edi 10b0f4: 56 push %esi 10b0f5: 53 push %ebx 10b0f6: 83 ec 28 sub $0x28,%esp 10b0f9: 8b 75 08 mov 0x8(%ebp),%esi Thread_Control *owning_thread = the_period->owner; 10b0fc: 8b 5e 50 mov 0x50(%esi),%ebx #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 10b0ff: 8d 7d ec lea -0x14(%ebp),%edi 10b102: 57 push %edi 10b103: e8 10 1a 00 00 call 10cb18 <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS the_period->time_at_period = uptime; 10b108: 8b 45 ec mov -0x14(%ebp),%eax 10b10b: 8b 55 f0 mov -0x10(%ebp),%edx 10b10e: 89 46 44 mov %eax,0x44(%esi) 10b111: 89 56 48 mov %edx,0x48(%esi) #else the_period->time_at_period = _Watchdog_Ticks_since_boot; #endif the_period->owner_executed_at_period = owning_thread->cpu_time_used; 10b114: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 10b11a: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax 10b120: 89 46 40 mov %eax,0x40(%esi) 10b123: 89 56 3c mov %edx,0x3c(%esi) * context switch. When this routine is invoked from * rtems_rate_monotonic_period, the owner will be the executing thread. * When this routine is invoked from _Rate_monotonic_Timeout, it will not. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS if (owning_thread == _Thread_Executing) { 10b126: 83 c4 10 add $0x10,%esp 10b129: 3b 1d 3c 41 12 00 cmp 0x12413c,%ebx 10b12f: 74 0b je 10b13c <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->owner_executed_at_period, &ran ); } #endif } 10b131: 8d 65 f4 lea -0xc(%ebp),%esp 10b134: 5b pop %ebx 10b135: 5e pop %esi 10b136: 5f pop %edi 10b137: c9 leave 10b138: c3 ret 10b139: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10b13c: 51 push %ecx 10b13d: 8d 5d e4 lea -0x1c(%ebp),%ebx 10b140: 53 push %ebx 10b141: 57 push %edi 10b142: 68 44 41 12 00 push $0x124144 10b147: e8 a8 39 00 00 call 10eaf4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->owner_executed_at_period, &ran ); 10b14c: 58 pop %eax 10b14d: 5a pop %edx 10b14e: 53 push %ebx 10b14f: 8d 46 3c lea 0x3c(%esi),%eax 10b152: 50 push %eax 10b153: e8 a8 38 00 00 call 10ea00 <_Timespec_Add_to> 10b158: 83 c4 10 add $0x10,%esp 10b15b: eb d4 jmp 10b131 <_Rate_monotonic_Initiate_statistics+0x41> =============================================================================== 0010b724 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b724: 55 push %ebp 10b725: 89 e5 mov %esp,%ebp 10b727: 53 push %ebx 10b728: 83 ec 18 sub $0x18,%esp 10b72b: 8d 45 f8 lea -0x8(%ebp),%eax 10b72e: 50 push %eax 10b72f: ff 75 08 pushl 0x8(%ebp) 10b732: 68 80 3f 12 00 push $0x123f80 10b737: e8 48 1d 00 00 call 10d484 <_Objects_Get> 10b73c: 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 ) { 10b73e: 83 c4 10 add $0x10,%esp 10b741: 8b 45 f8 mov -0x8(%ebp),%eax 10b744: 85 c0 test %eax,%eax 10b746: 75 21 jne 10b769 <_Rate_monotonic_Timeout+0x45><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b748: 8b 53 50 mov 0x50(%ebx),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b74b: f6 42 11 40 testb $0x40,0x11(%edx) 10b74f: 75 1f jne 10b770 <_Rate_monotonic_Timeout+0x4c> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b751: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b755: 74 35 je 10b78c <_Rate_monotonic_Timeout+0x68><== NEVER TAKEN _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b757: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) 10b75e: a1 78 40 12 00 mov 0x124078,%eax 10b763: 48 dec %eax 10b764: a3 78 40 12 00 mov %eax,0x124078 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b769: 8b 5d fc mov -0x4(%ebp),%ebx 10b76c: c9 leave 10b76d: c3 ret 10b76e: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b770: 8b 42 20 mov 0x20(%edx),%eax 10b773: 3b 43 08 cmp 0x8(%ebx),%eax 10b776: 75 d9 jne 10b751 <_Rate_monotonic_Timeout+0x2d><== NEVER TAKEN void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10b778: 83 ec 08 sub $0x8,%esp 10b77b: 68 f8 ff 03 10 push $0x1003fff8 10b780: 52 push %edx 10b781: e8 9a 21 00 00 call 10d920 <_Thread_Clear_state> the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b786: 59 pop %ecx 10b787: eb 0d jmp 10b796 <_Rate_monotonic_Timeout+0x72> 10b789: 8d 76 00 lea 0x0(%esi),%esi _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b78c: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 10b793: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b796: 53 push %ebx 10b797: e8 54 f9 ff ff call 10b0f0 <_Rate_monotonic_Initiate_statistics> * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10b79c: 8b 43 4c mov 0x4c(%ebx),%eax 10b79f: 89 43 1c mov %eax,0x1c(%ebx) void *starting_address, size_t *size 10b7a2: 58 pop %eax 10b7a3: 5a pop %edx 10b7a4: 8d 43 10 lea 0x10(%ebx),%eax 10b7a7: 50 push %eax 10b7a8: 68 5c 41 12 00 push $0x12415c 10b7ad: e8 ea 35 00 00 call 10ed9c <_Watchdog_Insert> 10b7b2: 83 c4 10 add $0x10,%esp 10b7b5: eb a7 jmp 10b75e <_Rate_monotonic_Timeout+0x3a> =============================================================================== 0010b370 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10b370: 55 push %ebp 10b371: 89 e5 mov %esp,%ebp 10b373: 53 push %ebx 10b374: 83 ec 1c sub $0x1c,%esp struct timespec tick; uint32_t seconds; /* Convert the tick quantum to a timespec */ tick.tv_nsec = _TOD_Microseconds_per_tick * 1000; 10b377: a1 c0 fa 11 00 mov 0x11fac0,%eax 10b37c: 8d 04 80 lea (%eax,%eax,4),%eax 10b37f: 8d 04 80 lea (%eax,%eax,4),%eax 10b382: 8d 04 80 lea (%eax,%eax,4),%eax 10b385: c1 e0 03 shl $0x3,%eax 10b388: 89 45 f8 mov %eax,-0x8(%ebp) tick.tv_sec = 0; 10b38b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10b392: a1 64 fa 11 00 mov 0x11fa64,%eax 10b397: 40 inc %eax 10b398: a3 64 fa 11 00 mov %eax,0x11fa64 /* Update the timespec format uptime */ (void) _Timespec_Add_to( &_TOD_Uptime, &tick ); 10b39d: 8d 5d f4 lea -0xc(%ebp),%ebx 10b3a0: 53 push %ebx 10b3a1: 68 78 f9 11 00 push $0x11f978 10b3a6: e8 15 1c 00 00 call 10cfc0 <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timespec_Add_to( &_TOD_Now, &tick ); 10b3ab: 58 pop %eax 10b3ac: 5a pop %edx 10b3ad: 53 push %ebx 10b3ae: 68 8c f9 11 00 push $0x11f98c 10b3b3: e8 08 1c 00 00 call 10cfc0 <_Timespec_Add_to> 10b3b8: 89 c3 mov %eax,%ebx while ( seconds ) { 10b3ba: 83 c4 10 add $0x10,%esp 10b3bd: 85 c0 test %eax,%eax 10b3bf: 74 16 je 10b3d7 <_TOD_Tickle_ticks+0x67> 10b3c1: 8d 76 00 lea 0x0(%esi),%esi */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ); 10b3c4: 83 ec 0c sub $0xc,%esp 10b3c7: 68 d0 f9 11 00 push $0x11f9d0 10b3cc: e8 6b 20 00 00 call 10d43c <_Watchdog_Tickle> 10b3d1: 83 c4 10 add $0x10,%esp 10b3d4: 4b dec %ebx 10b3d5: 75 ed jne 10b3c4 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10b3d7: 8b 5d fc mov -0x4(%ebp),%ebx 10b3da: c9 leave 10b3db: c3 ret =============================================================================== 0010ac64 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( rtems_time_of_day *the_tod ) { 10ac64: 55 push %ebp 10ac65: 89 e5 mov %esp,%ebp 10ac67: 57 push %edi 10ac68: 56 push %esi 10ac69: 53 push %ebx 10ac6a: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10ac6d: 8b 43 08 mov 0x8(%ebx),%eax 10ac70: 8d 48 ff lea -0x1(%eax),%ecx year_mod_4 = the_tod->year & 3; 10ac73: 8b 13 mov (%ebx),%edx if ( year_mod_4 == 0 ) 10ac75: 89 d6 mov %edx,%esi 10ac77: 83 e6 03 and $0x3,%esi 10ac7a: 74 68 je 10ace4 <_TOD_To_seconds+0x80> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10ac7c: 8b 43 04 mov 0x4(%ebx),%eax 10ac7f: 0f b7 84 00 a0 c7 11 movzwl 0x11c7a0(%eax,%eax,1),%eax 10ac86: 00 10ac87: 8d 3c 08 lea (%eax,%ecx,1),%edi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10ac8a: 0f b7 8c 36 d4 c7 11 movzwl 0x11c7d4(%esi,%esi,1),%ecx 10ac91: 00 10ac92: 81 ea c4 07 00 00 sub $0x7c4,%edx 10ac98: c1 ea 02 shr $0x2,%edx 10ac9b: 8d 04 d2 lea (%edx,%edx,8),%eax 10ac9e: 8d 04 c2 lea (%edx,%eax,8),%eax 10aca1: 8d 04 80 lea (%eax,%eax,4),%eax 10aca4: 8d 04 82 lea (%edx,%eax,4),%eax 10aca7: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10aca9: 01 f9 add %edi,%ecx time *= TOD_SECONDS_PER_DAY; 10acab: 8d 14 89 lea (%ecx,%ecx,4),%edx 10acae: 8d 14 91 lea (%ecx,%edx,4),%edx 10acb1: 8d 14 d1 lea (%ecx,%edx,8),%edx 10acb4: c1 e2 02 shl $0x2,%edx 10acb7: 29 ca sub %ecx,%edx 10acb9: c1 e2 07 shl $0x7,%edx time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10acbc: 8b 4b 14 mov 0x14(%ebx),%ecx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10acbf: 8b 43 0c mov 0xc(%ebx),%eax 10acc2: 8d 04 40 lea (%eax,%eax,2),%eax 10acc5: 8d 04 80 lea (%eax,%eax,4),%eax 10acc8: c1 e0 02 shl $0x2,%eax 10accb: 03 43 10 add 0x10(%ebx),%eax 10acce: 8d 04 40 lea (%eax,%eax,2),%eax 10acd1: 8d 04 80 lea (%eax,%eax,4),%eax 10acd4: 8d 84 81 00 e5 da 21 lea 0x21dae500(%ecx,%eax,4),%eax 10acdb: 01 d0 add %edx,%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10acdd: 5b pop %ebx 10acde: 5e pop %esi 10acdf: 5f pop %edi 10ace0: c9 leave 10ace1: c3 ret 10ace2: 66 90 xchg %ax,%ax time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10ace4: 8b 43 04 mov 0x4(%ebx),%eax 10ace7: 0f b7 84 00 ba c7 11 movzwl 0x11c7ba(%eax,%eax,1),%eax 10acee: 00 10acef: 8d 3c 08 lea (%eax,%ecx,1),%edi 10acf2: eb 96 jmp 10ac8a <_TOD_To_seconds+0x26> =============================================================================== 0010acf4 <_TOD_Validate>: */ bool _TOD_Validate( rtems_time_of_day *the_tod ) { 10acf4: 55 push %ebp 10acf5: 89 e5 mov %esp,%ebp 10acf7: 53 push %ebx 10acf8: 83 ec 04 sub $0x4,%esp 10acfb: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t days_in_month; if ((!the_tod) || 10acfe: 85 db test %ebx,%ebx 10ad00: 74 56 je 10ad58 <_TOD_Validate+0x64> <== NEVER TAKEN 10ad02: b8 40 42 0f 00 mov $0xf4240,%eax 10ad07: 31 d2 xor %edx,%edx 10ad09: f7 35 c0 ba 12 00 divl 0x12bac0 10ad0f: 39 43 18 cmp %eax,0x18(%ebx) 10ad12: 73 44 jae 10ad58 <_TOD_Validate+0x64> 10ad14: 83 7b 14 3b cmpl $0x3b,0x14(%ebx) 10ad18: 77 3e ja 10ad58 <_TOD_Validate+0x64> 10ad1a: 83 7b 10 3b cmpl $0x3b,0x10(%ebx) 10ad1e: 77 38 ja 10ad58 <_TOD_Validate+0x64> 10ad20: 83 7b 0c 17 cmpl $0x17,0xc(%ebx) 10ad24: 77 32 ja 10ad58 <_TOD_Validate+0x64> 10ad26: 8b 43 04 mov 0x4(%ebx),%eax 10ad29: 85 c0 test %eax,%eax 10ad2b: 74 2b je 10ad58 <_TOD_Validate+0x64> <== NEVER TAKEN 10ad2d: 83 f8 0c cmp $0xc,%eax 10ad30: 77 26 ja 10ad58 <_TOD_Validate+0x64> 10ad32: 8b 0b mov (%ebx),%ecx 10ad34: 81 f9 c3 07 00 00 cmp $0x7c3,%ecx 10ad3a: 76 1c jbe 10ad58 <_TOD_Validate+0x64> 10ad3c: 8b 53 08 mov 0x8(%ebx),%edx 10ad3f: 85 d2 test %edx,%edx 10ad41: 74 15 je 10ad58 <_TOD_Validate+0x64> <== NEVER 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 ) 10ad43: 83 e1 03 and $0x3,%ecx 10ad46: 75 16 jne 10ad5e <_TOD_Validate+0x6a> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10ad48: 8b 04 85 14 c8 11 00 mov 0x11c814(,%eax,4),%eax else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10ad4f: 39 d0 cmp %edx,%eax 10ad51: 0f 93 c0 setae %al 10ad54: eb 04 jmp 10ad5a <_TOD_Validate+0x66> 10ad56: 66 90 xchg %ax,%ax 10ad58: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10ad5a: 5a pop %edx 10ad5b: 5b pop %ebx 10ad5c: c9 leave 10ad5d: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10ad5e: 8b 04 85 e0 c7 11 00 mov 0x11c7e0(,%eax,4),%eax 10ad65: eb e8 jmp 10ad4f <_TOD_Validate+0x5b> =============================================================================== 0010beb4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10beb4: 55 push %ebp 10beb5: 89 e5 mov %esp,%ebp 10beb7: 57 push %edi 10beb8: 56 push %esi 10beb9: 53 push %ebx 10beba: 83 ec 18 sub $0x18,%esp 10bebd: 8b 5d 08 mov 0x8(%ebp),%ebx 10bec0: 8b 75 0c mov 0xc(%ebp),%esi 10bec3: 8a 45 10 mov 0x10(%ebp),%al 10bec6: 88 45 f3 mov %al,-0xd(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10bec9: 8b 7b 10 mov 0x10(%ebx),%edi /* * 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 ); 10becc: 53 push %ebx 10becd: e8 4a 0e 00 00 call 10cd1c <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 10bed2: 83 c4 10 add $0x10,%esp 10bed5: 39 73 14 cmp %esi,0x14(%ebx) 10bed8: 74 0d je 10bee7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10beda: 83 ec 08 sub $0x8,%esp 10bedd: 56 push %esi 10bede: 53 push %ebx 10bedf: e8 f4 0c 00 00 call 10cbd8 <_Thread_Set_priority> 10bee4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10bee7: 9c pushf 10bee8: fa cli 10bee9: 5e pop %esi /* * 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; 10beea: 8b 53 10 mov 0x10(%ebx),%edx if ( state != STATES_TRANSIENT ) { 10beed: 83 fa 04 cmp $0x4,%edx 10bef0: 74 3a je 10bf2c <_Thread_Change_priority+0x78> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10bef2: 83 e7 04 and $0x4,%edi 10bef5: 75 08 jne 10beff <_Thread_Change_priority+0x4b><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bef7: 89 d0 mov %edx,%eax 10bef9: 83 e0 fb and $0xfffffffb,%eax 10befc: 89 43 10 mov %eax,0x10(%ebx) _ISR_Enable( level ); 10beff: 56 push %esi 10bf00: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10bf01: 81 e2 e0 be 03 00 and $0x3bee0,%edx 10bf07: 75 0b jne 10bf14 <_Thread_Change_priority+0x60> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = TRUE; _ISR_Enable( level ); } 10bf09: 8d 65 f4 lea -0xc(%ebp),%esp 10bf0c: 5b pop %ebx 10bf0d: 5e pop %esi 10bf0e: 5f pop %edi 10bf0f: c9 leave 10bf10: c3 ret 10bf11: 8d 76 00 lea 0x0(%esi),%esi /* 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 ); 10bf14: 89 5d 0c mov %ebx,0xc(%ebp) 10bf17: 8b 43 44 mov 0x44(%ebx),%eax 10bf1a: 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 ); } 10bf1d: 8d 65 f4 lea -0xc(%ebp),%esp 10bf20: 5b pop %ebx 10bf21: 5e pop %esi 10bf22: 5f pop %edi 10bf23: 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 ); 10bf24: e9 1b 0c 00 00 jmp 10cb44 <_Thread_queue_Requeue> 10bf29: 8d 76 00 lea 0x0(%esi),%esi } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10bf2c: 83 e7 04 and $0x4,%edi 10bf2f: 75 41 jne 10bf72 <_Thread_Change_priority+0xbe><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bf31: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) * otherwise. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in 10bf38: 8b 93 90 00 00 00 mov 0x90(%ebx),%edx 10bf3e: 66 8b 83 96 00 00 00 mov 0x96(%ebx),%ax 10bf45: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10bf48: 66 a1 b0 f9 11 00 mov 0x11f9b0,%ax 10bf4e: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10bf54: 66 a3 b0 f9 11 00 mov %ax,0x11f9b0 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10bf5a: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10bf5e: 74 70 je 10bfd0 <_Thread_Change_priority+0x11c> size_t size ); /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the 10bf60: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10bf66: 89 43 04 mov %eax,0x4(%ebx) 10bf69: 8b 10 mov (%eax),%edx 10bf6b: 89 18 mov %ebx,(%eax) 10bf6d: 89 13 mov %edx,(%ebx) 10bf6f: 89 5a 04 mov %ebx,0x4(%edx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10bf72: 56 push %esi 10bf73: 9d popf 10bf74: fa cli void *starting_address, size_t size ); /** * This routine returns the block of memory which begins 10bf75: 66 8b 0d b0 f9 11 00 mov 0x11f9b0,%cx 10bf7c: 31 d2 xor %edx,%edx 10bf7e: 89 d0 mov %edx,%eax 10bf80: 66 0f bc c1 bsf %cx,%ax * at @a starting_address to @a the_heap. Any coalescing which is 10bf84: 0f b7 c0 movzwl %ax,%eax 10bf87: 66 8b 8c 00 40 fa 11 mov 0x11fa40(%eax,%eax,1),%cx 10bf8e: 00 10bf8f: 66 0f bc d1 bsf %cx,%dx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10bf93: c1 e0 04 shl $0x4,%eax 10bf96: 0f b7 d2 movzwl %dx,%edx 10bf99: 01 d0 add %edx,%eax 10bf9b: 8d 04 40 lea (%eax,%eax,2),%eax 10bf9e: 8b 15 c0 f8 11 00 mov 0x11f8c0,%edx 10bfa4: 8b 04 82 mov (%edx,%eax,4),%eax 10bfa7: a3 88 f9 11 00 mov %eax,0x11f988 void *starting_address, size_t size ); /** * This function attempts to allocate a block of @a size bytes from 10bfac: 8b 15 bc f9 11 00 mov 0x11f9bc,%edx * 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() && 10bfb2: 39 d0 cmp %edx,%eax 10bfb4: 74 0d je 10bfc3 <_Thread_Change_priority+0x10f> 10bfb6: 80 7a 76 00 cmpb $0x0,0x76(%edx) 10bfba: 74 07 je 10bfc3 <_Thread_Change_priority+0x10f><== NEVER TAKEN _Thread_Executing->is_preemptible ) _Context_Switch_necessary = TRUE; 10bfbc: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc _ISR_Enable( level ); 10bfc3: 56 push %esi 10bfc4: 9d popf } 10bfc5: 8d 65 f4 lea -0xc(%ebp),%esp 10bfc8: 5b pop %ebx 10bfc9: 5e pop %esi 10bfca: 5f pop %edi 10bfcb: c9 leave 10bfcc: c3 ret 10bfcd: 8d 76 00 lea 0x0(%esi),%esi _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10bfd0: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10bfd6: 8d 50 04 lea 0x4(%eax),%edx 10bfd9: 89 13 mov %edx,(%ebx) 10bfdb: 8b 50 08 mov 0x8(%eax),%edx 10bfde: 89 58 08 mov %ebx,0x8(%eax) 10bfe1: 89 1a mov %ebx,(%edx) 10bfe3: 89 53 04 mov %edx,0x4(%ebx) 10bfe6: eb 8a jmp 10bf72 <_Thread_Change_priority+0xbe> =============================================================================== 0010bfe8 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10bfe8: 55 push %ebp 10bfe9: 89 e5 mov %esp,%ebp 10bfeb: 53 push %ebx 10bfec: 8b 4d 08 mov 0x8(%ebp),%ecx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10bfef: 9c pushf 10bff0: fa cli 10bff1: 5b pop %ebx current_state = the_thread->current_state; 10bff2: 8b 51 10 mov 0x10(%ecx),%edx if ( current_state & state ) { 10bff5: 85 55 0c test %edx,0xc(%ebp) 10bff8: 74 72 je 10c06c <_Thread_Clear_state+0x84> * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( 10bffa: 8b 45 0c mov 0xc(%ebp),%eax 10bffd: f7 d0 not %eax 10bfff: 21 d0 and %edx,%eax current_state = 10c001: 89 41 10 mov %eax,0x10(%ecx) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10c004: 85 c0 test %eax,%eax 10c006: 75 64 jne 10c06c <_Thread_Clear_state+0x84> * otherwise. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in 10c008: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx 10c00e: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax 10c015: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10c018: 66 a1 b0 f9 11 00 mov 0x11f9b0,%ax 10c01e: 0b 81 94 00 00 00 or 0x94(%ecx),%eax 10c024: 66 a3 b0 f9 11 00 mov %ax,0x11f9b0 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10c02a: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax 10c030: 8d 50 04 lea 0x4(%eax),%edx 10c033: 89 11 mov %edx,(%ecx) 10c035: 8b 50 08 mov 0x8(%eax),%edx 10c038: 89 48 08 mov %ecx,0x8(%eax) 10c03b: 89 0a mov %ecx,(%edx) 10c03d: 89 51 04 mov %edx,0x4(%ecx) _ISR_Flash( level ); 10c040: 53 push %ebx 10c041: 9d popf 10c042: 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 ) { 10c043: 8b 51 14 mov 0x14(%ecx),%edx 10c046: a1 88 f9 11 00 mov 0x11f988,%eax 10c04b: 3b 50 14 cmp 0x14(%eax),%edx 10c04e: 73 1c jae 10c06c <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10c050: 89 0d 88 f9 11 00 mov %ecx,0x11f988 if ( _Thread_Executing->is_preemptible || 10c056: a1 bc f9 11 00 mov 0x11f9bc,%eax 10c05b: 80 78 76 00 cmpb $0x0,0x76(%eax) 10c05f: 75 04 jne 10c065 <_Thread_Clear_state+0x7d> 10c061: 85 d2 test %edx,%edx 10c063: 75 07 jne 10c06c <_Thread_Clear_state+0x84><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 10c065: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc } } } _ISR_Enable( level ); 10c06c: 53 push %ebx 10c06d: 9d popf } 10c06e: 5b pop %ebx 10c06f: c9 leave 10c070: c3 ret =============================================================================== 0010c074 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10c074: 55 push %ebp 10c075: 89 e5 mov %esp,%ebp 10c077: 56 push %esi 10c078: 53 push %ebx 10c079: 8b 5d 08 mov 0x8(%ebp),%ebx 10c07c: 8b 75 0c mov 0xc(%ebp),%esi 10c07f: 0f b7 56 08 movzwl 0x8(%esi),%edx 10c083: 8b 43 1c mov 0x1c(%ebx),%eax 10c086: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) 10c08d: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10c092: 48 dec %eax 10c093: a3 f8 f8 11 00 mov %eax,0x11f8f8 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10c098: 83 ec 0c sub $0xc,%esp 10c09b: 56 push %esi 10c09c: e8 3f 11 00 00 call 10d1e0 <_User_extensions_Thread_delete> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10c0a1: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10c0a6: 40 inc %eax 10c0a7: a3 f8 f8 11 00 mov %eax,0x11f8f8 /* * 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 ); 10c0ac: 59 pop %ecx 10c0ad: 58 pop %eax 10c0ae: 56 push %esi 10c0af: 53 push %ebx 10c0b0: e8 23 f6 ff ff call 10b6d8 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10c0b5: 58 pop %eax 10c0b6: 5a pop %edx 10c0b7: 6a 01 push $0x1 10c0b9: 56 push %esi 10c0ba: e8 85 0b 00 00 call 10cc44 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10c0bf: 89 34 24 mov %esi,(%esp) 10c0c2: e8 a5 09 00 00 call 10ca6c <_Thread_queue_Extract_with_proxy> 10c0c7: 83 c4 10 add $0x10,%esp 10c0ca: 84 c0 test %al,%al 10c0cc: 75 06 jne 10c0d4 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10c0ce: 83 7e 50 02 cmpl $0x2,0x50(%esi) 10c0d2: 74 68 je 10c13c <_Thread_Close+0xc8> /* * 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 ) ) 10c0d4: 3b 35 80 f9 11 00 cmp 0x11f980,%esi 10c0da: 74 74 je 10c150 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10c0dc: c7 86 ec 00 00 00 00 movl $0x0,0xec(%esi) 10c0e3: 00 00 00 if ( the_thread->Start.fp_context ) 10c0e6: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 10c0ec: 85 c0 test %eax,%eax 10c0ee: 74 0c je 10c0fc <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10c0f0: 83 ec 0c sub $0xc,%esp 10c0f3: 50 push %eax 10c0f4: e8 b3 13 00 00 call 10d4ac <_Workspace_Free> 10c0f9: 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 ); 10c0fc: 83 ec 0c sub $0xc,%esp 10c0ff: 56 push %esi 10c100: e8 ef 0c 00 00 call 10cdf4 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10c105: c7 86 d0 00 00 00 00 movl $0x0,0xd0(%esi) 10c10c: 00 00 00 if ( the_thread->extensions ) 10c10f: 8b 86 00 01 00 00 mov 0x100(%esi),%eax 10c115: 83 c4 10 add $0x10,%esp 10c118: 85 c0 test %eax,%eax 10c11a: 74 0c je 10c128 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10c11c: 83 ec 0c sub $0xc,%esp 10c11f: 50 push %eax 10c120: e8 87 13 00 00 call 10d4ac <_Workspace_Free> 10c125: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10c128: c7 86 00 01 00 00 00 movl $0x0,0x100(%esi) 10c12f: 00 00 00 } 10c132: 8d 65 f8 lea -0x8(%ebp),%esp 10c135: 5b pop %ebx 10c136: 5e pop %esi 10c137: c9 leave 10c138: c3 ret 10c139: 8d 76 00 lea 0x0(%esi),%esi */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10c13c: 83 ec 0c sub $0xc,%esp 10c13f: 8d 46 48 lea 0x48(%esi),%eax 10c142: 50 push %eax 10c143: e8 88 12 00 00 call 10d3d0 <_Watchdog_Remove> 10c148: 83 c4 10 add $0x10,%esp 10c14b: eb 87 jmp 10c0d4 <_Thread_Close+0x60> 10c14d: 8d 76 00 lea 0x0(%esi),%esi * @param[in] size is the new size * * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. */ bool _Protected_heap_Resize_block( 10c150: c7 05 80 f9 11 00 00 movl $0x0,0x11f980 10c157: 00 00 00 10c15a: eb 80 jmp 10c0dc <_Thread_Close+0x68> =============================================================================== 0010c15c <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10c15c: 55 push %ebp 10c15d: 89 e5 mov %esp,%ebp 10c15f: 83 ec 14 sub $0x14,%esp 10c162: 68 80 fa 11 00 push $0x11fa80 10c167: e8 ec f4 ff ff call 10b658 <_Objects_Allocate> /* * 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(); 10c16c: a3 cc fa 11 00 mov %eax,0x11facc /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10c171: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10c176: 40 inc %eax 10c177: a3 f8 f8 11 00 mov %eax,0x11f8f8 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10c17c: a1 94 f9 11 00 mov 0x11f994,%eax 10c181: 8b 50 18 mov 0x18(%eax),%edx 10c184: 83 c4 0c add $0xc,%esp 10c187: 68 d8 91 11 00 push $0x1191d8 10c18c: 6a 00 push $0x0 10c18e: 6a 00 push $0x0 10c190: 6a 00 push $0x0 10c192: 6a 01 push $0x1 10c194: 0f b6 05 14 b3 11 00 movzbl 0x11b314,%eax 10c19b: 50 push %eax 10c19c: 6a 00 push $0x0 10c19e: a1 10 b3 11 00 mov 0x11b310,%eax 10c1a3: 39 d0 cmp %edx,%eax 10c1a5: 73 02 jae 10c1a9 <_Thread_Create_idle+0x4d><== ALWAYS TAKEN 10c1a7: 89 d0 mov %edx,%eax <== NOT EXECUTED 10c1a9: 50 push %eax 10c1aa: 6a 00 push $0x0 10c1ac: ff 35 cc fa 11 00 pushl 0x11facc 10c1b2: 68 80 fa 11 00 push $0x11fa80 10c1b7: e8 78 02 00 00 call 10c434 <_Thread_Initialize> 10c1bc: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10c1c1: 48 dec %eax 10c1c2: a3 f8 f8 11 00 mov %eax,0x11f8f8 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10c1c7: 8b 15 cc fa 11 00 mov 0x11facc,%edx 10c1cd: 89 15 bc f9 11 00 mov %edx,0x11f9bc 10c1d3: 89 15 88 f9 11 00 mov %edx,0x11f988 _Thread_Executing = _Thread_Idle; _Thread_Start( 10c1d9: 83 c4 24 add $0x24,%esp 10c1dc: 6a 00 push $0x0 10c1de: 6a 00 push $0x0 10c1e0: a1 94 f9 11 00 mov 0x11f994,%eax 10c1e5: ff 70 14 pushl 0x14(%eax) 10c1e8: 6a 00 push $0x0 10c1ea: 52 push %edx 10c1eb: e8 9c 0c 00 00 call 10ce8c <_Thread_Start> 10c1f0: 83 c4 20 add $0x20,%esp _Configuration_Table->idle_task, NULL, 0 ); } 10c1f3: c9 leave 10c1f4: c3 ret =============================================================================== 0010c1f8 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored ) { 10c1f8: 55 push %ebp 10c1f9: 89 e5 mov %esp,%ebp 10c1fb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c1fe: 8d 45 fc lea -0x4(%ebp),%eax 10c201: 50 push %eax 10c202: ff 75 08 pushl 0x8(%ebp) 10c205: e8 aa 01 00 00 call 10c3b4 <_Thread_Get> switch ( location ) { 10c20a: 83 c4 10 add $0x10,%esp 10c20d: 8b 55 fc mov -0x4(%ebp),%edx 10c210: 85 d2 test %edx,%edx 10c212: 75 1c jne 10c230 <_Thread_Delay_ended+0x38><== NEVER TAKEN void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10c214: 83 ec 08 sub $0x8,%esp 10c217: 68 f8 ff 03 10 push $0x1003fff8 10c21c: 50 push %eax 10c21d: e8 c6 fd ff ff call 10bfe8 <_Thread_Clear_state> 10c222: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10c227: 48 dec %eax 10c228: a3 f8 f8 11 00 mov %eax,0x11f8f8 10c22d: 83 c4 10 add $0x10,%esp case OBJECTS_LOCAL: _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; } } 10c230: c9 leave 10c231: c3 ret =============================================================================== 0010c234 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10c234: 55 push %ebp 10c235: 89 e5 mov %esp,%ebp 10c237: 57 push %edi 10c238: 56 push %esi 10c239: 53 push %ebx 10c23a: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10c23d: 8b 35 bc f9 11 00 mov 0x11f9bc,%esi _ISR_Disable( level ); 10c243: 9c pushf 10c244: fa cli 10c245: 5a pop %edx while ( _Context_Switch_necessary == TRUE ) { 10c246: a0 cc f9 11 00 mov 0x11f9cc,%al 10c24b: 84 c0 test %al,%al 10c24d: 0f 84 11 01 00 00 je 10c364 <_Thread_Dispatch+0x130> 10c253: 8d 7d e4 lea -0x1c(%ebp),%edi 10c256: e9 d2 00 00 00 jmp 10c32d <_Thread_Dispatch+0xf9> 10c25b: 90 nop executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10c25c: 52 push %edx 10c25d: 9d popf #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec uptime, ran; _TOD_Get_uptime( &uptime ); 10c25e: 83 ec 0c sub $0xc,%esp 10c261: 8d 45 ec lea -0x14(%ebp),%eax 10c264: 50 push %eax 10c265: e8 1a 37 00 00 call 10f984 <_TOD_Get_uptime> _Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran); 10c26a: 83 c4 0c add $0xc,%esp 10c26d: 57 push %edi 10c26e: 8d 45 ec lea -0x14(%ebp),%eax 10c271: 50 push %eax 10c272: 68 c4 f9 11 00 push $0x11f9c4 10c277: e8 7c 0d 00 00 call 10cff8 <_Timespec_Subtract> _Timespec_Add_to( &executing->cpu_time_used, &ran ); 10c27c: 58 pop %eax 10c27d: 5a pop %edx 10c27e: 57 push %edi 10c27f: 8d 86 84 00 00 00 lea 0x84(%esi),%eax 10c285: 50 push %eax 10c286: e8 35 0d 00 00 call 10cfc0 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c28b: 8b 45 ec mov -0x14(%ebp),%eax 10c28e: 8b 55 f0 mov -0x10(%ebp),%edx 10c291: a3 c4 f9 11 00 mov %eax,0x11f9c4 10c296: 89 15 c8 f9 11 00 mov %edx,0x11f9c8 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c29c: 8b 15 84 f9 11 00 mov 0x11f984,%edx 10c2a2: 83 c4 10 add $0x10,%esp 10c2a5: 85 d2 test %edx,%edx 10c2a7: 74 10 je 10c2b9 <_Thread_Dispatch+0x85> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c2a9: 8b 02 mov (%edx),%eax 10c2ab: 89 86 f0 00 00 00 mov %eax,0xf0(%esi) *_Thread_libc_reent = heir->libc_reent; 10c2b1: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10c2b7: 89 02 mov %eax,(%edx) } _User_extensions_Thread_switch( executing, heir ); 10c2b9: 83 ec 08 sub $0x8,%esp 10c2bc: 53 push %ebx 10c2bd: 56 push %esi 10c2be: e8 9d 0f 00 00 call 10d260 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c2c3: 59 pop %ecx 10c2c4: 58 pop %eax 10c2c5: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10c2cb: 50 push %eax 10c2cc: 8d 86 d4 00 00 00 lea 0xd4(%esi),%eax 10c2d2: 50 push %eax 10c2d3: e8 98 12 00 00 call 10d570 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c2d8: 83 c4 10 add $0x10,%esp 10c2db: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10c2e1: 85 d2 test %edx,%edx 10c2e3: 74 36 je 10c31b <_Thread_Dispatch+0xe7> Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10c2e5: a1 80 f9 11 00 mov 0x11f980,%eax 10c2ea: 39 c6 cmp %eax,%esi 10c2ec: 74 2d je 10c31b <_Thread_Dispatch+0xe7> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c2ee: 85 c0 test %eax,%eax 10c2f0: 74 11 je 10c303 <_Thread_Dispatch+0xcf> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c2f2: 83 ec 0c sub $0xc,%esp 10c2f5: 05 ec 00 00 00 add $0xec,%eax 10c2fa: 50 push %eax 10c2fb: e8 a4 12 00 00 call 10d5a4 <_CPU_Context_save_fp> 10c300: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c303: 83 ec 0c sub $0xc,%esp 10c306: 8d 86 ec 00 00 00 lea 0xec(%esi),%eax 10c30c: 50 push %eax 10c30d: e8 9c 12 00 00 call 10d5ae <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c312: 89 35 80 f9 11 00 mov %esi,0x11f980 10c318: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c31b: 8b 35 bc f9 11 00 mov 0x11f9bc,%esi _ISR_Disable( level ); 10c321: 9c pushf 10c322: fa cli 10c323: 5a pop %edx Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == TRUE ) { 10c324: a0 cc f9 11 00 mov 0x11f9cc,%al 10c329: 84 c0 test %al,%al 10c32b: 74 37 je 10c364 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10c32d: 8b 1d 88 f9 11 00 mov 0x11f988,%ebx _Thread_Dispatch_disable_level = 1; 10c333: c7 05 f8 f8 11 00 01 movl $0x1,0x11f8f8 10c33a: 00 00 00 _Context_Switch_necessary = FALSE; 10c33d: c6 05 cc f9 11 00 00 movb $0x0,0x11f9cc _Thread_Executing = heir; 10c344: 89 1d bc f9 11 00 mov %ebx,0x11f9bc #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 ) 10c34a: 83 7b 7c 01 cmpl $0x1,0x7c(%ebx) 10c34e: 0f 85 08 ff ff ff jne 10c25c <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c354: a1 c4 f8 11 00 mov 0x11f8c4,%eax 10c359: 89 43 78 mov %eax,0x78(%ebx) 10c35c: e9 fb fe ff ff jmp 10c25c <_Thread_Dispatch+0x28> 10c361: 8d 76 00 lea 0x0(%esi),%esi executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10c364: c7 05 f8 f8 11 00 00 movl $0x0,0x11f8f8 10c36b: 00 00 00 _ISR_Enable( level ); 10c36e: 52 push %edx 10c36f: 9d popf if ( _Thread_Do_post_task_switch_extension || 10c370: a1 a0 f9 11 00 mov 0x11f9a0,%eax 10c375: 85 c0 test %eax,%eax 10c377: 75 06 jne 10c37f <_Thread_Dispatch+0x14b> 10c379: 80 7e 75 00 cmpb $0x0,0x75(%esi) 10c37d: 74 09 je 10c388 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension ) { executing->do_post_task_switch_extension = false; 10c37f: c6 46 75 00 movb $0x0,0x75(%esi) _API_extensions_Run_postswitch(); 10c383: e8 74 e9 ff ff call 10acfc <_API_extensions_Run_postswitch> } } 10c388: 8d 65 f4 lea -0xc(%ebp),%esp 10c38b: 5b pop %ebx 10c38c: 5e pop %esi 10c38d: 5f pop %edi 10c38e: c9 leave 10c38f: c3 ret =============================================================================== 0010c390 <_Thread_Enable_dispatch>: */ #if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { 10c390: 55 push %ebp 10c391: 89 e5 mov %esp,%ebp if ( --_Thread_Dispatch_disable_level ) 10c393: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10c398: 48 dec %eax 10c399: a3 f8 f8 11 00 mov %eax,0x11f8f8 10c39e: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10c3a3: 85 c0 test %eax,%eax 10c3a5: 74 05 je 10c3ac <_Thread_Enable_dispatch+0x1c> return; _Thread_Dispatch(); } 10c3a7: c9 leave 10c3a8: c3 ret 10c3a9: 8d 76 00 lea 0x0(%esi),%esi 10c3ac: c9 leave (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 10c3ad: e9 82 fe ff ff jmp 10c234 <_Thread_Dispatch> =============================================================================== 00110ac0 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 110ac0: 55 push %ebp 110ac1: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 110ac3: a1 bc f9 11 00 mov 0x11f9bc,%eax if ( !_States_Is_ready( executing->current_state ) || 110ac8: 8b 50 10 mov 0x10(%eax),%edx 110acb: 85 d2 test %edx,%edx 110acd: 75 0e jne 110add <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN 110acf: 3b 05 88 f9 11 00 cmp 0x11f988,%eax 110ad5: 74 11 je 110ae8 <_Thread_Evaluate_mode+0x28> 110ad7: 80 78 76 00 cmpb $0x0,0x76(%eax) 110adb: 74 0b je 110ae8 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 110add: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc 110ae4: b0 01 mov $0x1,%al return TRUE; } return FALSE; } 110ae6: c9 leave 110ae7: c3 ret executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; return TRUE; 110ae8: 31 c0 xor %eax,%eax } return FALSE; } 110aea: c9 leave 110aeb: c3 ret =============================================================================== 0010c3b4 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10c3b4: 55 push %ebp 10c3b5: 89 e5 mov %esp,%ebp 10c3b7: 53 push %ebx 10c3b8: 83 ec 04 sub $0x4,%esp 10c3bb: 8b 4d 08 mov 0x8(%ebp),%ecx 10c3be: 8b 5d 0c mov 0xc(%ebp),%ebx 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 ) ) { 10c3c1: 85 c9 test %ecx,%ecx 10c3c3: 74 4b je 10c410 <_Thread_Get+0x5c> uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10c3c5: 89 ca mov %ecx,%edx 10c3c7: c1 ea 18 shr $0x18,%edx 10c3ca: 83 e2 07 and $0x7,%edx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10c3cd: 8d 42 ff lea -0x1(%edx),%eax 10c3d0: 83 f8 03 cmp $0x3,%eax 10c3d3: 77 2b ja 10c400 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10c3d5: 89 c8 mov %ecx,%eax 10c3d7: c1 e8 1b shr $0x1b,%eax 10c3da: 48 dec %eax 10c3db: 75 23 jne 10c400 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10c3dd: 8b 04 95 cc f8 11 00 mov 0x11f8cc(,%edx,4),%eax if ( !api_information ) { 10c3e4: 85 c0 test %eax,%eax 10c3e6: 74 44 je 10c42c <_Thread_Get+0x78> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10c3e8: 8b 40 04 mov 0x4(%eax),%eax if ( !information ) { 10c3eb: 85 c0 test %eax,%eax 10c3ed: 74 3d je 10c42c <_Thread_Get+0x78> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10c3ef: 52 push %edx 10c3f0: 53 push %ebx 10c3f1: 51 push %ecx 10c3f2: 50 push %eax 10c3f3: e8 54 f7 ff ff call 10bb4c <_Objects_Get> 10c3f8: 83 c4 10 add $0x10,%esp done: return tp; } 10c3fb: 8b 5d fc mov -0x4(%ebp),%ebx 10c3fe: c9 leave 10c3ff: c3 ret goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 10c400: c7 03 01 00 00 00 movl $0x1,(%ebx) 10c406: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10c408: 8b 5d fc mov -0x4(%ebp),%ebx 10c40b: c9 leave 10c40c: c3 ret 10c40d: 8d 76 00 lea 0x0(%esi),%esi /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10c410: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10c415: 40 inc %eax 10c416: a3 f8 f8 11 00 mov %eax,0x11f8f8 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10c41b: c7 03 00 00 00 00 movl $0x0,(%ebx) tp = _Thread_Executing; 10c421: a1 bc f9 11 00 mov 0x11f9bc,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10c426: 8b 5d fc mov -0x4(%ebp),%ebx 10c429: c9 leave 10c42a: c3 ret 10c42b: 90 nop goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10c42c: c7 03 01 00 00 00 movl $0x1,(%ebx) 10c432: eb d4 jmp 10c408 <_Thread_Get+0x54> =============================================================================== 00110aec <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 110aec: 55 push %ebp 110aed: 89 e5 mov %esp,%ebp 110aef: 53 push %ebx 110af0: 83 ec 04 sub $0x4,%esp #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 110af3: 8b 1d bc f9 11 00 mov 0x11f9bc,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 110af9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 110aff: 85 c0 test %eax,%eax 110b01: 0f 84 91 00 00 00 je 110b98 <_Thread_Handler+0xac> 110b07: fa cli #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 110b08: a0 b8 f6 11 00 mov 0x11f6b8,%al 110b0d: 88 45 fb mov %al,-0x5(%ebp) doneConstructors = 1; 110b10: c6 05 b8 f6 11 00 01 movb $0x1,0x11f6b8 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { 110b17: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 110b1d: 85 c0 test %eax,%eax 110b1f: 74 24 je 110b45 <_Thread_Handler+0x59> Heap_Control *the_heap, void *starting_address, size_t *size ); /** 110b21: a1 80 f9 11 00 mov 0x11f980,%eax 110b26: 39 c3 cmp %eax,%ebx 110b28: 74 1b je 110b45 <_Thread_Handler+0x59> if ( _Thread_Allocated_fp != NULL ) 110b2a: 85 c0 test %eax,%eax 110b2c: 74 11 je 110b3f <_Thread_Handler+0x53> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 110b2e: 83 ec 0c sub $0xc,%esp 110b31: 05 ec 00 00 00 add $0xec,%eax 110b36: 50 push %eax 110b37: e8 68 ca ff ff call 10d5a4 <_CPU_Context_save_fp> 110b3c: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 110b3f: 89 1d 80 f9 11 00 mov %ebx,0x11f980 * 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 ); 110b45: 83 ec 0c sub $0xc,%esp 110b48: 53 push %ebx 110b49: e8 8a c5 ff ff call 10d0d8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 110b4e: e8 3d b8 ff ff call 10c390 <_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) */ 110b53: 83 c4 10 add $0x10,%esp 110b56: 80 7d fb 00 cmpb $0x0,-0x5(%ebp) 110b5a: 74 6c je 110bc8 <_Thread_Handler+0xdc> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 110b5c: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 110b62: 83 f8 01 cmp $0x1,%eax 110b65: 74 71 je 110bd8 <_Thread_Handler+0xec> 110b67: 73 37 jae 110ba0 <_Thread_Handler+0xb4> <== NEVER TAKEN case THREAD_START_NUMERIC: executing->Wait.return_argument = 110b69: 83 ec 0c sub $0xc,%esp 110b6c: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 110b72: ff 93 9c 00 00 00 call *0x9c(%ebx) 110b78: 89 43 28 mov %eax,0x28(%ebx) 110b7b: 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 ); 110b7e: 83 ec 0c sub $0xc,%esp 110b81: 53 push %ebx 110b82: e8 8d c5 ff ff call 10d114 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 110b87: 83 c4 0c add $0xc,%esp 110b8a: 6a 06 push $0x6 110b8c: 6a 01 push $0x1 110b8e: 6a 00 push $0x0 110b90: e8 2f aa ff ff call 10b5c4 <_Internal_error_Occurred> 110b95: 8d 76 00 lea 0x0(%esi),%esi * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 110b98: fb sti 110b99: e9 6a ff ff ff jmp 110b08 <_Thread_Handler+0x1c> 110b9e: 66 90 xchg %ax,%ax #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 110ba0: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 110ba3: 74 4b je 110bf0 <_Thread_Handler+0x104> <== NOT EXECUTED 110ba5: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 110ba8: 75 d4 jne 110b7e <_Thread_Handler+0x92> <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 110baa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 110bad: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED 110bb3: ff b3 a8 00 00 00 pushl 0xa8(%ebx) <== NOT EXECUTED 110bb9: ff 93 9c 00 00 00 call *0x9c(%ebx) <== NOT EXECUTED 110bbf: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED 110bc2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110bc5: eb b7 jmp 110b7e <_Thread_Handler+0x92> <== NOT EXECUTED 110bc7: 90 nop <== NOT EXECUTED * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { _init (); 110bc8: e8 03 6e 00 00 call 1179d0 <__start_set_sysctl_set> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 110bcd: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 110bd3: 83 f8 01 cmp $0x1,%eax 110bd6: 75 8f jne 110b67 <_Thread_Handler+0x7b> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 110bd8: 83 ec 0c sub $0xc,%esp 110bdb: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 110be1: ff 93 9c 00 00 00 call *0x9c(%ebx) 110be7: 89 43 28 mov %eax,0x28(%ebx) 110bea: 83 c4 10 add $0x10,%esp 110bed: eb 8f jmp 110b7e <_Thread_Handler+0x92> 110bef: 90 nop (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 110bf0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 110bf3: ff b3 a8 00 00 00 pushl 0xa8(%ebx) <== NOT EXECUTED 110bf9: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED 110bff: ff 93 9c 00 00 00 call *0x9c(%ebx) <== NOT EXECUTED 110c05: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED 110c08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110c0b: e9 6e ff ff ff jmp 110b7e <_Thread_Handler+0x92> <== NOT EXECUTED =============================================================================== 0010c434 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c434: 55 push %ebp 10c435: 89 e5 mov %esp,%ebp 10c437: 57 push %edi 10c438: 56 push %esi 10c439: 53 push %ebx 10c43a: 83 ec 0c sub $0xc,%esp 10c43d: 8b 5d 0c mov 0xc(%ebp),%ebx 10c440: 8b 55 10 mov 0x10(%ebp),%edx 10c443: 8a 45 18 mov 0x18(%ebp),%al 10c446: 88 45 f3 mov %al,-0xd(%ebp) 10c449: 8a 4d 20 mov 0x20(%ebp),%cl 10c44c: 88 4d f2 mov %cl,-0xe(%ebp) /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 10c44f: 85 d2 test %edx,%edx 10c451: 0f 84 b2 01 00 00 je 10c609 <_Thread_Initialize+0x1d5><== ALWAYS TAKEN stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 10c457: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) <== NOT EXECUTED 10c45e: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of 10c461: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx) * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. 10c467: 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 ) { 10c46d: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10c471: 0f 85 2d 01 00 00 jne 10c5a4 <_Thread_Initialize+0x170> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) { _Thread_Stack_Free( the_thread ); return FALSE; 10c477: 31 ff xor %edi,%edi 10c479: 31 c0 xor %eax,%eax fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 10c47b: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10c481: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) * 10c487: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) * @param[in] the_heap is the heap to operate upon 10c48e: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) * @param[in] starting_address is the starting address of the memory for 10c495: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) * the heap 10c49c: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 10c4a3: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10c4aa: 00 00 00 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c4ad: a1 9c f9 11 00 mov 0x11f99c,%eax 10c4b2: 85 c0 test %eax,%eax 10c4b4: 0f 85 06 01 00 00 jne 10c5c0 <_Thread_Initialize+0x18c> return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 10c4ba: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10c4c1: 00 00 00 10c4c4: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c4c6: 8a 45 f2 mov -0xe(%ebp),%al 10c4c9: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c4cf: 8b 4d 24 mov 0x24(%ebp),%ecx 10c4d2: 89 8b b0 00 00 00 mov %ecx,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10c4d8: 8b 45 28 mov 0x28(%ebp),%eax 10c4db: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10c4e1: 83 f9 02 cmp $0x2,%ecx 10c4e4: 75 08 jne 10c4ee <_Thread_Initialize+0xba><== ALWAYS TAKEN case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c4e6: a1 c4 f8 11 00 mov 0x11f8c4,%eax <== NOT EXECUTED 10c4eb: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 10c4ee: 8b 4d 2c mov 0x2c(%ebp),%ecx 10c4f1: 89 8b b8 00 00 00 mov %ecx,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10c4f7: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c4fe: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c505: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->suspend_count = 0; 10c50c: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) the_thread->real_priority = priority; 10c513: 8b 45 1c mov 0x1c(%ebp),%eax 10c516: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c519: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10c51f: 83 ec 08 sub $0x8,%esp 10c522: 50 push %eax 10c523: 53 push %ebx 10c524: e8 af 06 00 00 call 10cbd8 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 10c529: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c530: 00 00 00 the_thread->cpu_time_used.tv_nsec = 0; 10c533: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c53a: 00 00 00 10c53d: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c541: 8b 4d 08 mov 0x8(%ebp),%ecx 10c544: 8b 41 1c mov 0x1c(%ecx),%eax 10c547: 89 1c 90 mov %ebx,(%eax,%edx,4) 10c54a: 8b 45 30 mov 0x30(%ebp),%eax 10c54d: 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 ); 10c550: 89 1c 24 mov %ebx,(%esp) 10c553: e8 40 0c 00 00 call 10d198 <_User_extensions_Thread_create> if ( !extension_status ) { 10c558: 83 c4 10 add $0x10,%esp 10c55b: 84 c0 test %al,%al 10c55d: 75 39 jne 10c598 <_Thread_Initialize+0x164> if ( extensions_area ) 10c55f: 85 f6 test %esi,%esi 10c561: 74 0c je 10c56f <_Thread_Initialize+0x13b><== ALWAYS TAKEN (void) _Workspace_Free( extensions_area ); 10c563: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c566: 56 push %esi <== NOT EXECUTED 10c567: e8 40 0f 00 00 call 10d4ac <_Workspace_Free> <== NOT EXECUTED 10c56c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10c56f: 85 ff test %edi,%edi 10c571: 74 0c je 10c57f <_Thread_Initialize+0x14b><== ALWAYS TAKEN (void) _Workspace_Free( fp_area ); 10c573: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c576: 57 push %edi <== NOT EXECUTED 10c577: e8 30 0f 00 00 call 10d4ac <_Workspace_Free> <== NOT EXECUTED 10c57c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 10c57f: 83 ec 0c sub $0xc,%esp 10c582: 53 push %ebx 10c583: e8 6c 08 00 00 call 10cdf4 <_Thread_Stack_Free> 10c588: 31 c0 xor %eax,%eax 10c58a: 83 c4 10 add $0x10,%esp return FALSE; } return TRUE; } 10c58d: 8d 65 f4 lea -0xc(%ebp),%esp 10c590: 5b pop %ebx 10c591: 5e pop %esi 10c592: 5f pop %edi 10c593: c9 leave 10c594: c3 ret 10c595: 8d 76 00 lea 0x0(%esi),%esi * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( !extension_status ) { 10c598: b0 01 mov $0x1,%al return FALSE; } return TRUE; } 10c59a: 8d 65 f4 lea -0xc(%ebp),%esp 10c59d: 5b pop %ebx 10c59e: 5e pop %esi 10c59f: 5f pop %edi 10c5a0: c9 leave 10c5a1: c3 ret 10c5a2: 66 90 xchg %ax,%ax */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c5a4: 83 ec 0c sub $0xc,%esp 10c5a7: 6a 6c push $0x6c 10c5a9: e8 16 0f 00 00 call 10d4c4 <_Workspace_Allocate> 10c5ae: 89 c7 mov %eax,%edi if ( !fp_area ) { 10c5b0: 83 c4 10 add $0x10,%esp 10c5b3: 85 c0 test %eax,%eax 10c5b5: 0f 85 c0 fe ff ff jne 10c47b <_Thread_Initialize+0x47><== ALWAYS TAKEN 10c5bb: eb c2 jmp 10c57f <_Thread_Initialize+0x14b><== NOT EXECUTED 10c5bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10c5c0: 83 ec 0c sub $0xc,%esp 10c5c3: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c5ca: 50 push %eax 10c5cb: e8 f4 0e 00 00 call 10d4c4 <_Workspace_Allocate> 10c5d0: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 10c5d2: 83 c4 10 add $0x10,%esp 10c5d5: 85 c0 test %eax,%eax 10c5d7: 74 96 je 10c56f <_Thread_Initialize+0x13b><== NEVER TAKEN return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 10c5d9: 89 83 00 01 00 00 mov %eax,0x100(%ebx) * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 10c5df: 83 3d 9c f9 11 00 ff cmpl $0xffffffff,0x11f99c 10c5e6: 0f 84 da fe ff ff je 10c4c6 <_Thread_Initialize+0x92><== NEVER TAKEN 10c5ec: 31 d2 xor %edx,%edx 10c5ee: 89 c1 mov %eax,%ecx 10c5f0: a1 9c f9 11 00 mov 0x11f99c,%eax 10c5f5: 40 inc %eax 10c5f6: 66 90 xchg %ax,%ax the_thread->extensions[i] = NULL; 10c5f8: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 10c5ff: 42 inc %edx 10c600: 39 d0 cmp %edx,%eax 10c602: 77 f4 ja 10c5f8 <_Thread_Initialize+0x1c4> 10c604: e9 bd fe ff ff jmp 10c4c6 <_Thread_Initialize+0x92> */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10c609: 83 ec 08 sub $0x8,%esp 10c60c: ff 75 14 pushl 0x14(%ebp) 10c60f: 53 push %ebx 10c610: e8 7b 07 00 00 call 10cd90 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c615: 83 c4 10 add $0x10,%esp 10c618: 85 c0 test %eax,%eax 10c61a: 74 17 je 10c633 <_Thread_Initialize+0x1ff> 10c61c: 39 45 14 cmp %eax,0x14(%ebp) 10c61f: 77 12 ja 10c633 <_Thread_Initialize+0x1ff><== NEVER TAKEN return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 10c621: 8b 93 d0 00 00 00 mov 0xd0(%ebx),%edx the_thread->Start.core_allocated_stack = TRUE; 10c627: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10c62e: e9 2e fe ff ff jmp 10c461 <_Thread_Initialize+0x2d> (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 10c633: 31 c0 xor %eax,%eax 10c635: e9 53 ff ff ff jmp 10c58d <_Thread_Initialize+0x159> =============================================================================== 00110ac0 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 110ac0: 55 push %ebp 110ac1: 89 e5 mov %esp,%ebp 110ac3: 53 push %ebx 110ac4: 83 ec 10 sub $0x10,%esp 110ac7: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 110aca: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->suspend_count = 0; 110ad1: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 110ad8: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 110ade: 88 43 76 mov %al,0x76(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 110ae1: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 110ae7: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 110aea: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 110af0: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 110af6: 8b 45 0c mov 0xc(%ebp),%eax 110af9: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 110aff: 8b 45 10 mov 0x10(%ebp),%eax 110b02: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 110b08: 53 push %ebx 110b09: e8 86 c9 ff ff call 10d494 <_Thread_queue_Extract_with_proxy> 110b0e: 83 c4 10 add $0x10,%esp 110b11: 84 c0 test %al,%al 110b13: 75 06 jne 110b1b <_Thread_Reset+0x5b> <== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 110b15: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110b19: 74 25 je 110b40 <_Thread_Reset+0x80> <== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 110b1b: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 110b21: 39 43 14 cmp %eax,0x14(%ebx) 110b24: 74 12 je 110b38 <_Thread_Reset+0x78> the_thread->real_priority = the_thread->Start.initial_priority; 110b26: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 110b29: 89 45 0c mov %eax,0xc(%ebp) 110b2c: 89 5d 08 mov %ebx,0x8(%ebp) } } 110b2f: 8b 5d fc mov -0x4(%ebp),%ebx 110b32: c9 leave (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 110b33: e9 5c cb ff ff jmp 10d694 <_Thread_Set_priority> } } 110b38: 8b 5d fc mov -0x4(%ebp),%ebx 110b3b: c9 leave 110b3c: c3 ret 110b3d: 8d 76 00 lea 0x0(%esi),%esi the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 110b40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110b43: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED 110b46: 50 push %eax <== NOT EXECUTED 110b47: e8 80 d3 ff ff call 10decc <_Watchdog_Remove> <== NOT EXECUTED 110b4c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110b4f: eb ca jmp 110b1b <_Thread_Reset+0x5b> <== NOT EXECUTED =============================================================================== 0010ff38 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10ff38: 55 push %ebp 10ff39: 89 e5 mov %esp,%ebp 10ff3b: 56 push %esi 10ff3c: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ff3d: 8b 0d bc f9 11 00 mov 0x11f9bc,%ecx ready = executing->ready; 10ff43: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx _ISR_Disable( level ); 10ff49: 9c pushf 10ff4a: fa cli 10ff4b: 5e pop %esi if ( _Chain_Has_only_one_node( ready ) ) { 10ff4c: 8b 03 mov (%ebx),%eax 10ff4e: 3b 43 08 cmp 0x8(%ebx),%eax 10ff51: 74 35 je 10ff88 <_Thread_Reset_timeslice+0x50> 10ff53: 8b 11 mov (%ecx),%edx 10ff55: 8b 41 04 mov 0x4(%ecx),%eax 10ff58: 89 42 04 mov %eax,0x4(%edx) 10ff5b: 89 10 mov %edx,(%eax) 10ff5d: 8d 43 04 lea 0x4(%ebx),%eax 10ff60: 89 01 mov %eax,(%ecx) 10ff62: 8b 43 08 mov 0x8(%ebx),%eax 10ff65: 89 4b 08 mov %ecx,0x8(%ebx) 10ff68: 89 08 mov %ecx,(%eax) 10ff6a: 89 41 04 mov %eax,0x4(%ecx) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10ff6d: 56 push %esi 10ff6e: 9d popf 10ff6f: fa cli if ( _Thread_Is_heir( executing ) ) 10ff70: 3b 0d 88 f9 11 00 cmp 0x11f988,%ecx 10ff76: 74 18 je 10ff90 <_Thread_Reset_timeslice+0x58><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 10ff78: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc _ISR_Enable( level ); 10ff7f: 56 push %esi 10ff80: 9d popf } 10ff81: 5b pop %ebx 10ff82: 5e pop %esi 10ff83: c9 leave 10ff84: c3 ret 10ff85: 8d 76 00 lea 0x0(%esi),%esi executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 10ff88: 56 push %esi 10ff89: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; _ISR_Enable( level ); } 10ff8a: 5b pop %ebx 10ff8b: 5e pop %esi 10ff8c: c9 leave 10ff8d: c3 ret 10ff8e: 66 90 xchg %ax,%ax _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10ff90: 8b 03 mov (%ebx),%eax 10ff92: a3 88 f9 11 00 mov %eax,0x11f988 10ff97: eb df jmp 10ff78 <_Thread_Reset_timeslice+0x40> =============================================================================== 0010d600 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10d600: 55 push %ebp 10d601: 89 e5 mov %esp,%ebp 10d603: 53 push %ebx 10d604: 83 ec 04 sub $0x4,%esp 10d607: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10d60a: f6 43 10 01 testb $0x1,0x10(%ebx) 10d60e: 74 08 je 10d618 <_Thread_Restart+0x18> 10d610: 31 c0 xor %eax,%eax return TRUE; } return FALSE; } 10d612: 8b 5d fc mov -0x4(%ebp),%ebx 10d615: c9 leave 10d616: c3 ret 10d617: 90 nop Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10d618: 83 ec 0c sub $0xc,%esp 10d61b: 53 push %ebx 10d61c: e8 b7 01 00 00 call 10d7d8 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10d621: 83 c4 0c add $0xc,%esp 10d624: ff 75 10 pushl 0x10(%ebp) 10d627: ff 75 0c pushl 0xc(%ebp) 10d62a: 53 push %ebx 10d62b: e8 90 34 00 00 call 110ac0 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10d630: 89 1c 24 mov %ebx,(%esp) 10d633: e8 64 31 00 00 call 11079c <_Thread_Load_environment> _Thread_Ready( the_thread ); 10d638: 89 1c 24 mov %ebx,(%esp) 10d63b: e8 e0 33 00 00 call 110a20 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10d640: 89 1c 24 mov %ebx,(%esp) 10d643: e8 94 06 00 00 call 10dcdc <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10d648: 83 c4 10 add $0x10,%esp 10d64b: 3b 1d 7c 2f 12 00 cmp 0x122f7c,%ebx 10d651: 74 09 je 10d65c <_Thread_Restart+0x5c> 10d653: b0 01 mov $0x1,%al return TRUE; } return FALSE; } 10d655: 8b 5d fc mov -0x4(%ebp),%ebx 10d658: c9 leave 10d659: c3 ret 10d65a: 66 90 xchg %ax,%ax * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @param[in] alignment the required alignment 10d65c: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d662: 85 c0 test %eax,%eax 10d664: 74 12 je 10d678 <_Thread_Restart+0x78> * @return NULL if unsuccessful and a pointer to the block if successful 10d666: 83 ec 0c sub $0xc,%esp 10d669: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10d66f: 50 push %eax 10d670: e8 29 0a 00 00 call 10e09e <_CPU_Context_restore_fp> 10d675: 83 c4 10 add $0x10,%esp */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, 10d678: 83 ec 0c sub $0xc,%esp 10d67b: a1 7c 2f 12 00 mov 0x122f7c,%eax 10d680: 05 d4 00 00 00 add $0xd4,%eax 10d685: 50 push %eax 10d686: e8 02 0a 00 00 call 10e08d <_CPU_Context_restore> 10d68b: b0 01 mov $0x1,%al <== NOT EXECUTED 10d68d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d690: eb 80 jmp 10d612 <_Thread_Restart+0x12> <== NOT EXECUTED =============================================================================== 0010e0d0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10e0d0: 55 push %ebp 10e0d1: 89 e5 mov %esp,%ebp 10e0d3: 53 push %ebx 10e0d4: 8b 4d 08 mov 0x8(%ebp),%ecx 10e0d7: 8a 45 0c mov 0xc(%ebp),%al ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10e0da: 9c pushf 10e0db: fa cli 10e0dc: 5b pop %ebx if ( force == TRUE ) 10e0dd: 84 c0 test %al,%al 10e0df: 74 13 je 10e0f4 <_Thread_Resume+0x24> <== NEVER TAKEN the_thread->suspend_count = 0; 10e0e1: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 10e0e8: 8b 41 10 mov 0x10(%ecx),%eax if ( current_state & STATES_SUSPENDED ) { 10e0eb: a8 02 test $0x2,%al 10e0ed: 75 15 jne 10e104 <_Thread_Resume+0x34> <== ALWAYS TAKEN _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 10e0ef: 53 push %ebx 10e0f0: 9d popf } 10e0f1: 5b pop %ebx 10e0f2: c9 leave 10e0f3: c3 ret _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 10e0f4: 8b 41 70 mov 0x70(%ecx),%eax <== NOT EXECUTED 10e0f7: 48 dec %eax <== NOT EXECUTED 10e0f8: 89 41 70 mov %eax,0x70(%ecx) <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 10e0fb: 85 c0 test %eax,%eax <== NOT EXECUTED 10e0fd: 74 e9 je 10e0e8 <_Thread_Resume+0x18> <== NOT EXECUTED _ISR_Enable( level ); 10e0ff: 53 push %ebx <== NOT EXECUTED 10e100: 9d popf <== NOT EXECUTED } } } _ISR_Enable( level ); } 10e101: 5b pop %ebx <== NOT EXECUTED 10e102: c9 leave <== NOT EXECUTED 10e103: c3 ret <== NOT EXECUTED * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( 10e104: 83 e0 fd and $0xfffffffd,%eax return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 10e107: 89 41 10 mov %eax,0x10(%ecx) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10e10a: 85 c0 test %eax,%eax 10e10c: 75 e1 jne 10e0ef <_Thread_Resume+0x1f> * otherwise. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in 10e10e: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx 10e114: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax 10e11b: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10e11e: 66 a1 b0 b9 12 00 mov 0x12b9b0,%ax 10e124: 0b 81 94 00 00 00 or 0x94(%ecx),%eax 10e12a: 66 a3 b0 b9 12 00 mov %ax,0x12b9b0 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10e130: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax 10e136: 8d 50 04 lea 0x4(%eax),%edx 10e139: 89 11 mov %edx,(%ecx) 10e13b: 8b 50 08 mov 0x8(%eax),%edx 10e13e: 89 48 08 mov %ecx,0x8(%eax) 10e141: 89 0a mov %ecx,(%edx) 10e143: 89 51 04 mov %edx,0x4(%ecx) _ISR_Flash( level ); 10e146: 53 push %ebx 10e147: 9d popf 10e148: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10e149: 8b 51 14 mov 0x14(%ecx),%edx 10e14c: a1 88 b9 12 00 mov 0x12b988,%eax 10e151: 3b 50 14 cmp 0x14(%eax),%edx 10e154: 73 99 jae 10e0ef <_Thread_Resume+0x1f> _Thread_Heir = the_thread; 10e156: 89 0d 88 b9 12 00 mov %ecx,0x12b988 if ( _Thread_Executing->is_preemptible || 10e15c: a1 bc b9 12 00 mov 0x12b9bc,%eax 10e161: 80 78 76 00 cmpb $0x0,0x76(%eax) 10e165: 74 0d je 10e174 <_Thread_Resume+0xa4> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 10e167: c6 05 cc b9 12 00 01 movb $0x1,0x12b9cc 10e16e: e9 7c ff ff ff jmp 10e0ef <_Thread_Resume+0x1f> 10e173: 90 nop _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10e174: 85 d2 test %edx,%edx 10e176: 0f 85 73 ff ff ff jne 10e0ef <_Thread_Resume+0x1f> <== ALWAYS TAKEN 10e17c: eb e9 jmp 10e167 <_Thread_Resume+0x97> <== NOT EXECUTED =============================================================================== 0010cc44 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10cc44: 55 push %ebp 10cc45: 89 e5 mov %esp,%ebp 10cc47: 56 push %esi 10cc48: 53 push %ebx 10cc49: 8b 5d 08 mov 0x8(%ebp),%ebx 10cc4c: 8b 4d 0c mov 0xc(%ebp),%ecx ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10cc4f: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx _ISR_Disable( level ); 10cc55: 9c pushf 10cc56: fa cli 10cc57: 5e pop %esi if ( !_States_Is_ready( the_thread->current_state ) ) { 10cc58: 8b 43 10 mov 0x10(%ebx),%eax 10cc5b: 85 c0 test %eax,%eax 10cc5d: 75 2d jne 10cc8c <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10cc5f: 89 4b 10 mov %ecx,0x10(%ebx) if ( _Chain_Has_only_one_node( ready ) ) { 10cc62: 8b 02 mov (%edx),%eax 10cc64: 3b 42 08 cmp 0x8(%edx),%eax 10cc67: 74 2f je 10cc98 <_Thread_Set_state+0x54> 10cc69: 8b 13 mov (%ebx),%edx 10cc6b: 8b 43 04 mov 0x4(%ebx),%eax 10cc6e: 89 42 04 mov %eax,0x4(%edx) 10cc71: 89 10 mov %edx,(%eax) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10cc73: 56 push %esi 10cc74: 9d popf 10cc75: fa cli if ( _Thread_Is_heir( the_thread ) ) 10cc76: 3b 1d 88 f9 11 00 cmp 0x11f988,%ebx 10cc7c: 74 62 je 10cce0 <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10cc7e: 3b 1d bc f9 11 00 cmp 0x11f9bc,%ebx 10cc84: 74 4e je 10ccd4 <_Thread_Set_state+0x90> _Context_Switch_necessary = TRUE; _ISR_Enable( level ); 10cc86: 56 push %esi 10cc87: 9d popf } 10cc88: 5b pop %ebx 10cc89: 5e pop %esi 10cc8a: c9 leave 10cc8b: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10cc8c: 09 c1 or %eax,%ecx 10cc8e: 89 4b 10 mov %ecx,0x10(%ebx) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10cc91: 56 push %esi 10cc92: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = TRUE; _ISR_Enable( level ); } 10cc93: 5b pop %ebx 10cc94: 5e pop %esi 10cc95: c9 leave 10cc96: c3 ret 10cc97: 90 nop 10cc98: 8d 42 04 lea 0x4(%edx),%eax 10cc9b: 89 02 mov %eax,(%edx) 10cc9d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) 10cca4: 89 52 08 mov %edx,0x8(%edx) /** * This function tries to resize in place the block that is pointed to by the * @a starting_address to the new @a size. * * @param[in] the_heap is the heap to operate upon 10cca7: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10ccad: 66 8b 93 9a 00 00 00 mov 0x9a(%ebx),%dx 10ccb4: 66 21 10 and %dx,(%eax) * @param[in] starting_address is the starting address of the user block 10ccb7: 66 83 38 00 cmpw $0x0,(%eax) 10ccbb: 75 b6 jne 10cc73 <_Thread_Set_state+0x2f> * to be resized 10ccbd: 66 a1 b0 f9 11 00 mov 0x11f9b0,%ax 10ccc3: 23 83 98 00 00 00 and 0x98(%ebx),%eax 10ccc9: 66 a3 b0 f9 11 00 mov %ax,0x11f9b0 10cccf: eb a2 jmp 10cc73 <_Thread_Set_state+0x2f> 10ccd1: 8d 76 00 lea 0x0(%esi),%esi if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = TRUE; 10ccd4: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc 10ccdb: eb a9 jmp 10cc86 <_Thread_Set_state+0x42> 10ccdd: 8d 76 00 lea 0x0(%esi),%esi void *starting_address, size_t size ); /** * This routine returns the block of memory which begins 10cce0: 66 8b 0d b0 f9 11 00 mov 0x11f9b0,%cx 10cce7: 31 d2 xor %edx,%edx 10cce9: 89 d0 mov %edx,%eax 10cceb: 66 0f bc c1 bsf %cx,%ax * at @a starting_address to @a the_heap. Any coalescing which is 10ccef: 0f b7 c0 movzwl %ax,%eax 10ccf2: 66 8b 8c 00 40 fa 11 mov 0x11fa40(%eax,%eax,1),%cx 10ccf9: 00 10ccfa: 66 0f bc d1 bsf %cx,%dx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10ccfe: c1 e0 04 shl $0x4,%eax 10cd01: 0f b7 d2 movzwl %dx,%edx 10cd04: 01 d0 add %edx,%eax 10cd06: 8d 04 40 lea (%eax,%eax,2),%eax 10cd09: 8b 15 c0 f8 11 00 mov 0x11f8c0,%edx 10cd0f: 8b 04 82 mov (%edx,%eax,4),%eax 10cd12: a3 88 f9 11 00 mov %eax,0x11f988 10cd17: e9 62 ff ff ff jmp 10cc7e <_Thread_Set_state+0x3a> =============================================================================== 0010cd90 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10cd90: 55 push %ebp 10cd91: 89 e5 mov %esp,%ebp 10cd93: 53 push %ebx 10cd94: 83 ec 04 sub $0x4,%esp 10cd97: a1 10 b3 11 00 mov 0x11b310,%eax 10cd9c: 8b 5d 0c mov 0xc(%ebp),%ebx 10cd9f: 39 c3 cmp %eax,%ebx 10cda1: 73 02 jae 10cda5 <_Thread_Stack_Allocate+0x15> 10cda3: 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_Table->stack_allocate_hook ) { 10cda5: a1 94 f9 11 00 mov 0x11f994,%eax 10cdaa: 8b 40 20 mov 0x20(%eax),%eax 10cdad: 85 c0 test %eax,%eax 10cdaf: 74 33 je 10cde4 <_Thread_Stack_Allocate+0x54><== ALWAYS TAKEN stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 10cdb1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cdb4: 53 push %ebx <== NOT EXECUTED 10cdb5: ff d0 call *%eax <== NOT EXECUTED 10cdb7: 89 c2 mov %eax,%edx <== NOT EXECUTED 10cdb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10cdbc: 85 d2 test %edx,%edx 10cdbe: 74 10 je 10cdd0 <_Thread_Stack_Allocate+0x40> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10cdc0: 8b 45 08 mov 0x8(%ebp),%eax 10cdc3: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) return the_stack_size; } 10cdc9: 89 d8 mov %ebx,%eax 10cdcb: 8b 5d fc mov -0x4(%ebp),%ebx 10cdce: c9 leave 10cdcf: c3 ret the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10cdd0: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10cdd2: 8b 45 08 mov 0x8(%ebp),%eax 10cdd5: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) return the_stack_size; } 10cddb: 89 d8 mov %ebx,%eax 10cddd: 8b 5d fc mov -0x4(%ebp),%ebx 10cde0: c9 leave 10cde1: c3 ret 10cde2: 66 90 xchg %ax,%ax * 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 ); 10cde4: 83 ec 0c sub $0xc,%esp 10cde7: 53 push %ebx 10cde8: e8 d7 06 00 00 call 10d4c4 <_Workspace_Allocate> 10cded: 89 c2 mov %eax,%edx 10cdef: 83 c4 10 add $0x10,%esp 10cdf2: eb c8 jmp 10cdbc <_Thread_Stack_Allocate+0x2c> =============================================================================== 0010cdf4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10cdf4: 55 push %ebp 10cdf5: 89 e5 mov %esp,%ebp 10cdf7: 8b 55 08 mov 0x8(%ebp),%edx /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 10cdfa: 80 ba c0 00 00 00 00 cmpb $0x0,0xc0(%edx) 10ce01: 74 19 je 10ce1c <_Thread_Stack_Free+0x28><== NEVER TAKEN * 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_Table->stack_free_hook ) 10ce03: a1 94 f9 11 00 mov 0x11f994,%eax 10ce08: 8b 48 24 mov 0x24(%eax),%ecx 10ce0b: 85 c9 test %ecx,%ecx 10ce0d: 74 11 je 10ce20 <_Thread_Stack_Free+0x2c><== ALWAYS TAKEN (*_Configuration_Table->stack_free_hook)( 10ce0f: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax <== NOT EXECUTED 10ce15: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10ce18: c9 leave <== NOT EXECUTED * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( 10ce19: ff e1 jmp *%ecx <== NOT EXECUTED 10ce1b: 90 nop <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10ce1c: c9 leave <== NOT EXECUTED 10ce1d: c3 ret <== NOT EXECUTED 10ce1e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10ce20: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax 10ce26: 89 45 08 mov %eax,0x8(%ebp) } 10ce29: c9 leave if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10ce2a: e9 7d 06 00 00 jmp 10d4ac <_Workspace_Free> =============================================================================== 0010e494 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 10e494: 55 push %ebp 10e495: 89 e5 mov %esp,%ebp 10e497: 56 push %esi 10e498: 53 push %ebx 10e499: 8b 4d 08 mov 0x8(%ebp),%ecx ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10e49c: 8b 91 8c 00 00 00 mov 0x8c(%ecx),%edx _ISR_Disable( level ); 10e4a2: 9c pushf 10e4a3: fa cli 10e4a4: 5b pop %ebx the_thread->suspend_count++; 10e4a5: ff 41 70 incl 0x70(%ecx) if ( !_States_Is_ready( the_thread->current_state ) ) { 10e4a8: 8b 41 10 mov 0x10(%ecx),%eax 10e4ab: 85 c0 test %eax,%eax 10e4ad: 75 31 jne 10e4e0 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 10e4af: c7 41 10 02 00 00 00 movl $0x2,0x10(%ecx) if ( _Chain_Has_only_one_node( ready ) ) { 10e4b6: 8b 02 mov (%edx),%eax 10e4b8: 3b 42 08 cmp 0x8(%edx),%eax 10e4bb: 74 2f je 10e4ec <_Thread_Suspend+0x58> 10e4bd: 8b 11 mov (%ecx),%edx 10e4bf: 8b 41 04 mov 0x4(%ecx),%eax 10e4c2: 89 42 04 mov %eax,0x4(%edx) 10e4c5: 89 10 mov %edx,(%eax) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10e4c7: 53 push %ebx 10e4c8: 9d popf 10e4c9: fa cli if ( _Thread_Is_heir( the_thread ) ) 10e4ca: 3b 0d 88 b9 12 00 cmp 0x12b988,%ecx 10e4d0: 74 62 je 10e534 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10e4d2: 3b 0d bc b9 12 00 cmp 0x12b9bc,%ecx 10e4d8: 74 4e je 10e528 <_Thread_Suspend+0x94> _Context_Switch_necessary = TRUE; _ISR_Enable( level ); 10e4da: 53 push %ebx 10e4db: 9d popf } 10e4dc: 5b pop %ebx 10e4dd: 5e pop %esi 10e4de: c9 leave 10e4df: c3 ret ready = the_thread->ready; _ISR_Disable( level ); the_thread->suspend_count++; if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10e4e0: 83 c8 02 or $0x2,%eax 10e4e3: 89 41 10 mov %eax,0x10(%ecx) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 10e4e6: 53 push %ebx 10e4e7: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = TRUE; _ISR_Enable( level ); } 10e4e8: 5b pop %ebx 10e4e9: 5e pop %esi 10e4ea: c9 leave 10e4eb: c3 ret 10e4ec: 8d 42 04 lea 0x4(%edx),%eax 10e4ef: 89 02 mov %eax,(%edx) 10e4f1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) 10e4f8: 89 52 08 mov %edx,0x8(%edx) /** * This function tries to resize in place the block that is pointed to by the * @a starting_address to the new @a size. * * @param[in] the_heap is the heap to operate upon 10e4fb: 8b 81 90 00 00 00 mov 0x90(%ecx),%eax 10e501: 66 8b 91 9a 00 00 00 mov 0x9a(%ecx),%dx 10e508: 66 21 10 and %dx,(%eax) * @param[in] starting_address is the starting address of the user block 10e50b: 66 83 38 00 cmpw $0x0,(%eax) 10e50f: 75 b6 jne 10e4c7 <_Thread_Suspend+0x33> * to be resized 10e511: 66 a1 b0 b9 12 00 mov 0x12b9b0,%ax 10e517: 23 81 98 00 00 00 and 0x98(%ecx),%eax 10e51d: 66 a3 b0 b9 12 00 mov %ax,0x12b9b0 10e523: eb a2 jmp 10e4c7 <_Thread_Suspend+0x33> 10e525: 8d 76 00 lea 0x0(%esi),%esi if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = TRUE; 10e528: c6 05 cc b9 12 00 01 movb $0x1,0x12b9cc 10e52f: eb a9 jmp 10e4da <_Thread_Suspend+0x46> 10e531: 8d 76 00 lea 0x0(%esi),%esi void *starting_address, size_t size ); /** * This routine returns the block of memory which begins 10e534: 66 8b 35 b0 b9 12 00 mov 0x12b9b0,%si 10e53b: 31 d2 xor %edx,%edx 10e53d: 89 d0 mov %edx,%eax 10e53f: 66 0f bc c6 bsf %si,%ax * at @a starting_address to @a the_heap. Any coalescing which is 10e543: 0f b7 c0 movzwl %ax,%eax 10e546: 66 8b b4 00 40 ba 12 mov 0x12ba40(%eax,%eax,1),%si 10e54d: 00 10e54e: 66 0f bc d6 bsf %si,%dx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10e552: c1 e0 04 shl $0x4,%eax 10e555: 0f b7 d2 movzwl %dx,%edx 10e558: 01 d0 add %edx,%eax 10e55a: 8d 04 40 lea (%eax,%eax,2),%eax 10e55d: 8b 15 c0 b8 12 00 mov 0x12b8c0,%edx 10e563: 8b 04 82 mov (%edx,%eax,4),%eax 10e566: a3 88 b9 12 00 mov %eax,0x12b988 10e56b: e9 62 ff ff ff jmp 10e4d2 <_Thread_Suspend+0x3e> =============================================================================== 0010ceec <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10ceec: 55 push %ebp 10ceed: 89 e5 mov %esp,%ebp 10ceef: 53 push %ebx 10cef0: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10cef3: 8b 1d bc f9 11 00 mov 0x11f9bc,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10cef9: 80 7b 76 00 cmpb $0x0,0x76(%ebx) 10cefd: 74 19 je 10cf18 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10ceff: 8b 43 10 mov 0x10(%ebx),%eax 10cf02: 85 c0 test %eax,%eax 10cf04: 75 12 jne 10cf18 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10cf06: 8b 43 7c mov 0x7c(%ebx),%eax 10cf09: 83 f8 01 cmp $0x1,%eax 10cf0c: 72 0a jb 10cf18 <_Thread_Tickle_timeslice+0x2c> 10cf0e: 83 f8 02 cmp $0x2,%eax 10cf11: 76 29 jbe 10cf3c <_Thread_Tickle_timeslice+0x50> 10cf13: 83 f8 03 cmp $0x3,%eax 10cf16: 74 08 je 10cf20 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; } } 10cf18: 8b 5d fc mov -0x4(%ebp),%ebx 10cf1b: c9 leave 10cf1c: c3 ret 10cf1d: 8d 76 00 lea 0x0(%esi),%esi executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10cf20: 8b 43 78 mov 0x78(%ebx),%eax 10cf23: 48 dec %eax 10cf24: 89 43 78 mov %eax,0x78(%ebx) 10cf27: 85 c0 test %eax,%eax 10cf29: 75 ed jne 10cf18 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10cf2b: 83 ec 0c sub $0xc,%esp 10cf2e: 53 push %ebx 10cf2f: ff 93 80 00 00 00 call *0x80(%ebx) 10cf35: 83 c4 10 add $0x10,%esp 10cf38: eb de jmp 10cf18 <_Thread_Tickle_timeslice+0x2c> 10cf3a: 66 90 xchg %ax,%ax case THREAD_CPU_BUDGET_ALGORITHM_NONE: break; case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10cf3c: 8b 43 78 mov 0x78(%ebx),%eax 10cf3f: 48 dec %eax 10cf40: 89 43 78 mov %eax,0x78(%ebx) 10cf43: 85 c0 test %eax,%eax 10cf45: 7f d1 jg 10cf18 <_Thread_Tickle_timeslice+0x2c> _Thread_Reset_timeslice(); 10cf47: e8 ec 2f 00 00 call 10ff38 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10cf4c: a1 c4 f8 11 00 mov 0x11f8c4,%eax 10cf51: 89 43 78 mov %eax,0x78(%ebx) 10cf54: eb c2 jmp 10cf18 <_Thread_Tickle_timeslice+0x2c> =============================================================================== 0010cf58 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10cf58: 55 push %ebp 10cf59: 89 e5 mov %esp,%ebp 10cf5b: 56 push %esi 10cf5c: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10cf5d: 8b 0d bc f9 11 00 mov 0x11f9bc,%ecx ready = executing->ready; 10cf63: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx _ISR_Disable( level ); 10cf69: 9c pushf 10cf6a: fa cli 10cf6b: 5e pop %esi if ( !_Chain_Has_only_one_node( ready ) ) { 10cf6c: 8b 03 mov (%ebx),%eax 10cf6e: 3b 43 08 cmp 0x8(%ebx),%eax 10cf71: 74 35 je 10cfa8 <_Thread_Yield_processor+0x50> 10cf73: 8b 11 mov (%ecx),%edx 10cf75: 8b 41 04 mov 0x4(%ecx),%eax 10cf78: 89 42 04 mov %eax,0x4(%edx) 10cf7b: 89 10 mov %edx,(%eax) 10cf7d: 8d 43 04 lea 0x4(%ebx),%eax 10cf80: 89 01 mov %eax,(%ecx) 10cf82: 8b 43 08 mov 0x8(%ebx),%eax 10cf85: 89 4b 08 mov %ecx,0x8(%ebx) 10cf88: 89 08 mov %ecx,(%eax) 10cf8a: 89 41 04 mov %eax,0x4(%ecx) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10cf8d: 56 push %esi 10cf8e: 9d popf 10cf8f: fa cli if ( _Thread_Is_heir( executing ) ) 10cf90: 3b 0d 88 f9 11 00 cmp 0x11f988,%ecx 10cf96: 74 1c je 10cfb4 <_Thread_Yield_processor+0x5c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = TRUE; 10cf98: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc _ISR_Enable( level ); 10cf9f: 56 push %esi 10cfa0: 9d popf } 10cfa1: 5b pop %ebx 10cfa2: 5e pop %esi 10cfa3: c9 leave 10cfa4: c3 ret 10cfa5: 8d 76 00 lea 0x0(%esi),%esi if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) 10cfa8: 3b 0d 88 f9 11 00 cmp 0x11f988,%ecx 10cfae: 75 e8 jne 10cf98 <_Thread_Yield_processor+0x40><== NEVER TAKEN 10cfb0: eb ed jmp 10cf9f <_Thread_Yield_processor+0x47> 10cfb2: 66 90 xchg %ax,%ax _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10cfb4: 8b 03 mov (%ebx),%eax 10cfb6: a3 88 f9 11 00 mov %eax,0x11f988 10cfbb: eb db jmp 10cf98 <_Thread_Yield_processor+0x40> =============================================================================== 0010fc9c <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 10fc9c: 55 push %ebp 10fc9d: 89 e5 mov %esp,%ebp 10fc9f: 56 push %esi 10fca0: 53 push %ebx 10fca1: 8b 4d 08 mov 0x8(%ebp),%ecx ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 10fca4: 9c pushf 10fca5: fa cli 10fca6: 5e pop %esi * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10fca7: 8b 11 mov (%ecx),%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { 10fca9: 8d 41 04 lea 0x4(%ecx),%eax 10fcac: 39 c2 cmp %eax,%edx 10fcae: 74 62 je 10fd12 <_Thread_queue_Dequeue_fifo+0x76> 10fcb0: 8b 02 mov (%edx),%eax 10fcb2: 89 01 mov %eax,(%ecx) 10fcb4: 89 48 04 mov %ecx,0x4(%eax) the_thread = (Thread_Control *) 10fcb7: 89 d3 mov %edx,%ebx _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; 10fcb9: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10fcc0: 83 7a 50 02 cmpl $0x2,0x50(%edx) 10fcc4: 74 1e je 10fce4 <_Thread_queue_Dequeue_fifo+0x48> _ISR_Enable( level ); 10fcc6: 56 push %esi 10fcc7: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10fcc8: 83 ec 08 sub $0x8,%esp 10fccb: 68 f8 ff 03 10 push $0x1003fff8 10fcd0: 52 push %edx 10fcd1: e8 12 c3 ff ff call 10bfe8 <_Thread_Clear_state> 10fcd6: 83 c4 10 add $0x10,%esp return the_thread; } _ISR_Enable( level ); return NULL; } 10fcd9: 89 d8 mov %ebx,%eax 10fcdb: 8d 65 f8 lea -0x8(%ebp),%esp 10fcde: 5b pop %ebx 10fcdf: 5e pop %esi 10fce0: c9 leave 10fce1: c3 ret 10fce2: 66 90 xchg %ax,%ax * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 10fce4: c7 42 50 03 00 00 00 movl $0x3,0x50(%edx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10fceb: 56 push %esi 10fcec: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10fced: 83 ec 0c sub $0xc,%esp 10fcf0: 8d 42 48 lea 0x48(%edx),%eax 10fcf3: 50 push %eax 10fcf4: e8 d7 d6 ff ff call 10d3d0 <_Watchdog_Remove> void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10fcf9: 58 pop %eax 10fcfa: 5a pop %edx 10fcfb: 68 f8 ff 03 10 push $0x1003fff8 10fd00: 53 push %ebx 10fd01: e8 e2 c2 ff ff call 10bfe8 <_Thread_Clear_state> 10fd06: 83 c4 10 add $0x10,%esp return the_thread; } _ISR_Enable( level ); return NULL; } 10fd09: 89 d8 mov %ebx,%eax 10fd0b: 8d 65 f8 lea -0x8(%ebp),%esp 10fd0e: 5b pop %ebx 10fd0f: 5e pop %esi 10fd10: c9 leave 10fd11: c3 ret #endif return the_thread; } _ISR_Enable( level ); 10fd12: 56 push %esi 10fd13: 9d popf 10fd14: 31 db xor %ebx,%ebx 10fd16: eb c1 jmp 10fcd9 <_Thread_queue_Dequeue_fifo+0x3d> =============================================================================== 0010c764 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10c764: 55 push %ebp 10c765: 89 e5 mov %esp,%ebp 10c767: 57 push %edi 10c768: 56 push %esi 10c769: 53 push %ebx 10c76a: 83 ec 0c sub $0xc,%esp 10c76d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10c770: 9c pushf 10c771: fa cli 10c772: 5f pop %edi 10c773: 31 d2 xor %edx,%edx 10c775: 31 c9 xor %ecx,%ecx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10c777: 8b 1c 0e mov (%esi,%ecx,1),%ebx for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 10c77a: 8d 04 52 lea (%edx,%edx,2),%eax 10c77d: 8d 44 86 04 lea 0x4(%esi,%eax,4),%eax 10c781: 39 c3 cmp %eax,%ebx 10c783: 75 1f jne 10c7a4 <_Thread_queue_Dequeue_priority+0x40> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10c785: 42 inc %edx 10c786: 83 c1 0c add $0xc,%ecx Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 10c789: 83 fa 04 cmp $0x4,%edx 10c78c: 75 e9 jne 10c777 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10c78e: 57 push %edi 10c78f: 9d popf 10c790: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10c797: 8b 45 e8 mov -0x18(%ebp),%eax 10c79a: 8d 65 f4 lea -0xc(%ebp),%esp 10c79d: 5b pop %ebx 10c79e: 5e pop %esi 10c79f: 5f pop %edi 10c7a0: c9 leave 10c7a1: c3 ret 10c7a2: 66 90 xchg %ax,%ax _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10c7a4: 89 5d e8 mov %ebx,-0x18(%ebp) */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10c7a7: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10c7ae: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10c7b1: 8b 33 mov (%ebx),%esi previous_node = the_thread->Object.Node.previous; 10c7b3: 8b 4b 04 mov 0x4(%ebx),%ecx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10c7b6: 8d 43 3c lea 0x3c(%ebx),%eax 10c7b9: 39 c2 cmp %eax,%edx 10c7bb: 0f 84 85 00 00 00 je 10c846 <_Thread_queue_Dequeue_priority+0xe2> last_node = the_thread->Wait.Block2n.last; 10c7c1: 8b 43 40 mov 0x40(%ebx),%eax 10c7c4: 89 45 f0 mov %eax,-0x10(%ebp) new_second_node = new_first_node->next; 10c7c7: 8b 02 mov (%edx),%eax 10c7c9: 89 45 ec mov %eax,-0x14(%ebp) previous_node->next = new_first_node; 10c7cc: 89 11 mov %edx,(%ecx) next_node->previous = new_first_node; 10c7ce: 89 56 04 mov %edx,0x4(%esi) new_first_node->next = next_node; 10c7d1: 89 32 mov %esi,(%edx) new_first_node->previous = previous_node; 10c7d3: 89 4a 04 mov %ecx,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10c7d6: 8b 43 38 mov 0x38(%ebx),%eax 10c7d9: 3b 43 40 cmp 0x40(%ebx),%eax 10c7dc: 74 1a je 10c7f8 <_Thread_queue_Dequeue_priority+0x94> /* > two threads on 2-n */ new_second_node->previous = 10c7de: 8d 42 38 lea 0x38(%edx),%eax 10c7e1: 8b 4d ec mov -0x14(%ebp),%ecx 10c7e4: 89 41 04 mov %eax,0x4(%ecx) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10c7e7: 89 4a 38 mov %ecx,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10c7ea: 8b 45 f0 mov -0x10(%ebp),%eax 10c7ed: 89 42 40 mov %eax,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10c7f0: 8d 42 3c lea 0x3c(%edx),%eax 10c7f3: 8b 55 f0 mov -0x10(%ebp),%edx 10c7f6: 89 02 mov %eax,(%edx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10c7f8: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10c7fc: 74 1e je 10c81c <_Thread_queue_Dequeue_priority+0xb8> _ISR_Enable( level ); 10c7fe: 57 push %edi 10c7ff: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10c800: 83 ec 08 sub $0x8,%esp 10c803: 68 f8 ff 03 10 push $0x1003fff8 10c808: 53 push %ebx 10c809: e8 da f7 ff ff call 10bfe8 <_Thread_Clear_state> 10c80e: 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 ); } 10c811: 8b 45 e8 mov -0x18(%ebp),%eax 10c814: 8d 65 f4 lea -0xc(%ebp),%esp 10c817: 5b pop %ebx 10c818: 5e pop %esi 10c819: 5f pop %edi 10c81a: c9 leave 10c81b: c3 ret * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 10c81c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10c823: 57 push %edi 10c824: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10c825: 83 ec 0c sub $0xc,%esp 10c828: 8d 43 48 lea 0x48(%ebx),%eax 10c82b: 50 push %eax 10c82c: e8 9f 0b 00 00 call 10d3d0 <_Watchdog_Remove> void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10c831: 58 pop %eax 10c832: 5a pop %edx 10c833: 68 f8 ff 03 10 push $0x1003fff8 10c838: 53 push %ebx 10c839: e8 aa f7 ff ff call 10bfe8 <_Thread_Clear_state> 10c83e: 83 c4 10 add $0x10,%esp 10c841: e9 51 ff ff ff jmp 10c797 <_Thread_queue_Dequeue_priority+0x33> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10c846: 89 31 mov %esi,(%ecx) next_node->previous = previous_node; 10c848: 89 4e 04 mov %ecx,0x4(%esi) 10c84b: eb ab jmp 10c7f8 <_Thread_queue_Dequeue_priority+0x94> =============================================================================== 0010c8e8 <_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 ) { 10c8e8: 55 push %ebp 10c8e9: 89 e5 mov %esp,%ebp 10c8eb: 57 push %edi 10c8ec: 56 push %esi 10c8ed: 53 push %ebx 10c8ee: 83 ec 0c sub $0xc,%esp 10c8f1: 8b 45 0c mov 0xc(%ebp),%eax 10c8f4: 83 c0 3c add $0x3c,%eax 10c8f7: 8b 55 0c mov 0xc(%ebp),%edx 10c8fa: 89 42 38 mov %eax,0x38(%edx) 10c8fd: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 10c904: 89 d0 mov %edx,%eax 10c906: 83 c0 38 add $0x38,%eax 10c909: 89 42 40 mov %eax,0x40(%edx) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c90c: 8b 5a 14 mov 0x14(%edx),%ebx extern "C" { #endif /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. 10c90f: 89 d8 mov %ebx,%eax 10c911: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 10c914: 8b 4d 08 mov 0x8(%ebp),%ecx 10c917: 8b 49 38 mov 0x38(%ecx),%ecx 10c91a: 89 4d f0 mov %ecx,-0x10(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) 10c91d: f6 c3 20 test $0x20,%bl 10c920: 75 66 jne 10c988 <_Thread_queue_Enqueue_priority+0xa0> * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 10c922: 8d 04 40 lea (%eax,%eax,2),%eax 10c925: c1 e0 02 shl $0x2,%eax 10c928: 8b 55 08 mov 0x8(%ebp),%edx 10c92b: 8d 7c 02 04 lea 0x4(%edx,%eax,1),%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 10c92f: 89 45 e8 mov %eax,-0x18(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c932: 9c pushf 10c933: fa cli 10c934: 5e pop %esi search_thread = (Thread_Control *) header->first; 10c935: 8b 45 e8 mov -0x18(%ebp),%eax 10c938: 8b 4d 08 mov 0x8(%ebp),%ecx 10c93b: 8b 14 08 mov (%eax,%ecx,1),%edx while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c93e: 39 fa cmp %edi,%edx 10c940: 75 1b jne 10c95d <_Thread_queue_Enqueue_priority+0x75> 10c942: e9 1a 01 00 00 jmp 10ca61 <_Thread_queue_Enqueue_priority+0x179> 10c947: 90 nop break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c948: 56 push %esi 10c949: 9d popf 10c94a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c94b: 8b 45 f0 mov -0x10(%ebp),%eax 10c94e: 85 42 10 test %eax,0x10(%edx) 10c951: 0f 84 ad 00 00 00 je 10ca04 <_Thread_queue_Enqueue_priority+0x11c><== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = 10c957: 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 ) ) { 10c959: 39 fa cmp %edi,%edx 10c95b: 74 07 je 10c964 <_Thread_queue_Enqueue_priority+0x7c> search_priority = search_thread->current_priority; 10c95d: 8b 4a 14 mov 0x14(%edx),%ecx if ( priority <= search_priority ) 10c960: 39 cb cmp %ecx,%ebx 10c962: 77 e4 ja 10c948 <_Thread_queue_Enqueue_priority+0x60> 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 ) ) { 10c964: 89 d7 mov %edx,%edi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c966: 8b 45 08 mov 0x8(%ebp),%eax 10c969: 83 78 30 01 cmpl $0x1,0x30(%eax) 10c96d: 0f 84 99 00 00 00 je 10ca0c <_Thread_queue_Enqueue_priority+0x124><== 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; 10c973: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10c976: 89 30 mov %esi,(%eax) <== NOT EXECUTED return the_thread_queue->sync_state; 10c978: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10c97b: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED } 10c97e: 83 c4 0c add $0xc,%esp 10c981: 5b pop %ebx 10c982: 5e pop %esi 10c983: 5f pop %edi 10c984: c9 leave 10c985: c3 ret 10c986: 66 90 xchg %ax,%ax the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c988: 8d 04 40 lea (%eax,%eax,2),%eax 10c98b: 8b 55 08 mov 0x8(%ebp),%edx 10c98e: 8d 0c 82 lea (%edx,%eax,4),%ecx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 10c991: 8d 79 08 lea 0x8(%ecx),%edi 10c994: 89 7d ec mov %edi,-0x14(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c997: 0f b6 05 14 b3 11 00 movzbl 0x11b314,%eax 10c99e: 40 inc %eax _ISR_Disable( level ); 10c99f: 9c pushf 10c9a0: fa cli 10c9a1: 5e pop %esi search_thread = (Thread_Control *) header->last; 10c9a2: 8b 7d ec mov -0x14(%ebp),%edi 10c9a5: 8b 17 mov (%edi),%edx while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c9a7: 39 d1 cmp %edx,%ecx 10c9a9: 75 17 jne 10c9c2 <_Thread_queue_Enqueue_priority+0xda> 10c9ab: eb 1c jmp 10c9c9 <_Thread_queue_Enqueue_priority+0xe1> 10c9ad: 8d 76 00 lea 0x0(%esi),%esi break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c9b0: 56 push %esi 10c9b1: 9d popf 10c9b2: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c9b3: 8b 7d f0 mov -0x10(%ebp),%edi 10c9b6: 85 7a 10 test %edi,0x10(%edx) 10c9b9: 74 45 je 10ca00 <_Thread_queue_Enqueue_priority+0x118><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10c9bb: 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 ) ) { 10c9be: 39 ca cmp %ecx,%edx 10c9c0: 74 07 je 10c9c9 <_Thread_queue_Enqueue_priority+0xe1> search_priority = search_thread->current_priority; 10c9c2: 8b 42 14 mov 0x14(%edx),%eax if ( priority >= search_priority ) 10c9c5: 39 c3 cmp %eax,%ebx 10c9c7: 72 e7 jb 10c9b0 <_Thread_queue_Enqueue_priority+0xc8> 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 ) ) { 10c9c9: 89 d7 mov %edx,%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c9cb: 8b 4d 08 mov 0x8(%ebp),%ecx 10c9ce: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c9d2: 75 9f jne 10c973 <_Thread_queue_Enqueue_priority+0x8b><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c9d4: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c9db: 39 c3 cmp %eax,%ebx 10c9dd: 74 5d je 10ca3c <_Thread_queue_Enqueue_priority+0x154> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c9df: 8b 02 mov (%edx),%eax the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c9e1: 8b 7d 0c mov 0xc(%ebp),%edi 10c9e4: 89 07 mov %eax,(%edi) the_node->previous = search_node; 10c9e6: 89 57 04 mov %edx,0x4(%edi) search_node->next = the_node; 10c9e9: 89 3a mov %edi,(%edx) next_node->previous = the_node; 10c9eb: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10c9ee: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10c9f1: 56 push %esi 10c9f2: 9d popf 10c9f3: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10c9f8: 83 c4 0c add $0xc,%esp 10c9fb: 5b pop %ebx 10c9fc: 5e pop %esi 10c9fd: 5f pop %edi 10c9fe: c9 leave 10c9ff: c3 ret if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10ca00: 56 push %esi <== NOT EXECUTED 10ca01: 9d popf <== NOT EXECUTED 10ca02: eb 93 jmp 10c997 <_Thread_queue_Enqueue_priority+0xaf><== NOT EXECUTED if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10ca04: 56 push %esi <== NOT EXECUTED 10ca05: 9d popf <== NOT EXECUTED 10ca06: e9 27 ff ff ff jmp 10c932 <_Thread_queue_Enqueue_priority+0x4a><== NOT EXECUTED 10ca0b: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10ca0c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( priority == search_priority ) 10ca13: 39 cb cmp %ecx,%ebx 10ca15: 74 25 je 10ca3c <_Thread_queue_Enqueue_priority+0x154> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10ca17: 8b 42 04 mov 0x4(%edx),%eax the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10ca1a: 8b 4d 0c mov 0xc(%ebp),%ecx 10ca1d: 89 11 mov %edx,(%ecx) the_node->previous = previous_node; 10ca1f: 89 41 04 mov %eax,0x4(%ecx) previous_node->next = the_node; 10ca22: 89 08 mov %ecx,(%eax) search_node->previous = the_node; 10ca24: 89 4a 04 mov %ecx,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10ca27: 8b 7d 08 mov 0x8(%ebp),%edi 10ca2a: 89 79 44 mov %edi,0x44(%ecx) _ISR_Enable( level ); 10ca2d: 56 push %esi 10ca2e: 9d popf 10ca2f: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10ca34: 83 c4 0c add $0xc,%esp 10ca37: 5b pop %ebx 10ca38: 5e pop %esi 10ca39: 5f pop %edi 10ca3a: c9 leave 10ca3b: c3 ret 10ca3c: 8d 47 3c lea 0x3c(%edi),%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10ca3f: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10ca42: 8b 4d 0c mov 0xc(%ebp),%ecx 10ca45: 89 01 mov %eax,(%ecx) the_node->previous = previous_node; 10ca47: 89 51 04 mov %edx,0x4(%ecx) previous_node->next = the_node; 10ca4a: 89 0a mov %ecx,(%edx) search_node->previous = the_node; 10ca4c: 89 48 04 mov %ecx,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10ca4f: 8b 7d 08 mov 0x8(%ebp),%edi 10ca52: 89 79 44 mov %edi,0x44(%ecx) _ISR_Enable( level ); 10ca55: 56 push %esi 10ca56: 9d popf 10ca57: b8 01 00 00 00 mov $0x1,%eax 10ca5c: e9 1d ff ff ff jmp 10c97e <_Thread_queue_Enqueue_priority+0x96> 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 ) ) { 10ca61: b9 ff ff ff ff mov $0xffffffff,%ecx 10ca66: e9 fb fe ff ff jmp 10c966 <_Thread_queue_Enqueue_priority+0x7e> =============================================================================== 0010fd5c <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10fd5c: 55 push %ebp 10fd5d: 89 e5 mov %esp,%ebp 10fd5f: 83 ec 08 sub $0x8,%esp 10fd62: 8b 45 08 mov 0x8(%ebp),%eax 10fd65: 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 ) 10fd68: 83 78 34 01 cmpl $0x1,0x34(%eax) 10fd6c: 74 0e je 10fd7c <_Thread_queue_Extract+0x20> _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 ); 10fd6e: 89 55 0c mov %edx,0xc(%ebp) 10fd71: 89 45 08 mov %eax,0x8(%ebp) } 10fd74: 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 ); 10fd75: e9 96 0e 00 00 jmp 110c10 <_Thread_queue_Extract_fifo> 10fd7a: 66 90 xchg %ax,%ax /* * 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 ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 10fd7c: 51 push %ecx 10fd7d: 6a 00 push $0x0 10fd7f: 52 push %edx 10fd80: 50 push %eax 10fd81: e8 06 00 00 00 call 10fd8c <_Thread_queue_Extract_priority_helper> 10fd86: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 10fd89: c9 leave 10fd8a: c3 ret =============================================================================== 00110c10 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 110c10: 55 push %ebp 110c11: 89 e5 mov %esp,%ebp 110c13: 53 push %ebx 110c14: 83 ec 04 sub $0x4,%esp 110c17: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110c1a: 9c pushf 110c1b: fa cli 110c1c: 59 pop %ecx if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110c1d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110c24: 74 2e je 110c54 <_Thread_queue_Extract_fifo+0x44><== NEVER TAKEN 110c26: 8b 13 mov (%ebx),%edx 110c28: 8b 43 04 mov 0x4(%ebx),%eax 110c2b: 89 42 04 mov %eax,0x4(%edx) 110c2e: 89 10 mov %edx,(%eax) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 110c30: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110c37: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110c3b: 74 1f je 110c5c <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 110c3d: 51 push %ecx 110c3e: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 110c3f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110c46: 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 } 110c49: 8b 5d fc mov -0x4(%ebp),%ebx 110c4c: c9 leave 110c4d: e9 96 b3 ff ff jmp 10bfe8 <_Thread_Clear_state> 110c52: 66 90 xchg %ax,%ax ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 110c54: 51 push %ecx <== NOT EXECUTED 110c55: 9d popf <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110c56: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110c59: c9 leave <== NOT EXECUTED 110c5a: c3 ret <== NOT EXECUTED 110c5b: 90 nop <== NOT EXECUTED * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 110c5c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 110c63: 51 push %ecx 110c64: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110c65: 83 ec 0c sub $0xc,%esp 110c68: 8d 43 48 lea 0x48(%ebx),%eax 110c6b: 50 push %eax 110c6c: e8 5f c7 ff ff call 10d3d0 <_Watchdog_Remove> 110c71: 83 c4 10 add $0x10,%esp 110c74: eb c9 jmp 110c3f <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 0010fd8c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 10fd8c: 55 push %ebp 10fd8d: 89 e5 mov %esp,%ebp 10fd8f: 57 push %edi 10fd90: 56 push %esi 10fd91: 53 push %ebx 10fd92: 83 ec 0c sub $0xc,%esp 10fd95: 8b 5d 0c mov 0xc(%ebp),%ebx 10fd98: 8a 45 10 mov 0x10(%ebp),%al 10fd9b: 88 45 eb mov %al,-0x15(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 10fd9e: 9c pushf 10fd9f: fa cli 10fda0: 8f 45 ec popl -0x14(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10fda3: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10fdaa: 74 68 je 10fe14 <_Thread_queue_Extract_priority_helper+0x88><== NEVER TAKEN /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 10fdac: 8b 33 mov (%ebx),%esi previous_node = the_node->previous; 10fdae: 8b 4b 04 mov 0x4(%ebx),%ecx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10fdb1: 8b 53 38 mov 0x38(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10fdb4: 8d 43 3c lea 0x3c(%ebx),%eax 10fdb7: 39 c2 cmp %eax,%edx 10fdb9: 74 71 je 10fe2c <_Thread_queue_Extract_priority_helper+0xa0> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 10fdbb: 8b 43 40 mov 0x40(%ebx),%eax 10fdbe: 89 45 f0 mov %eax,-0x10(%ebp) new_second_node = new_first_node->next; 10fdc1: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10fdc3: 89 11 mov %edx,(%ecx) next_node->previous = new_first_node; 10fdc5: 89 56 04 mov %edx,0x4(%esi) new_first_node->next = next_node; 10fdc8: 89 32 mov %esi,(%edx) new_first_node->previous = previous_node; 10fdca: 89 4a 04 mov %ecx,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10fdcd: 8b 43 38 mov 0x38(%ebx),%eax 10fdd0: 3b 43 40 cmp 0x40(%ebx),%eax 10fdd3: 74 17 je 10fdec <_Thread_queue_Extract_priority_helper+0x60> /* > two threads on 2-n */ new_second_node->previous = 10fdd5: 8d 42 38 lea 0x38(%edx),%eax 10fdd8: 89 47 04 mov %eax,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10fddb: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10fdde: 8b 45 f0 mov -0x10(%ebp),%eax 10fde1: 89 42 40 mov %eax,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10fde4: 8d 42 3c lea 0x3c(%edx),%eax 10fde7: 8b 55 f0 mov -0x10(%ebp),%edx 10fdea: 89 02 mov %eax,(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 10fdec: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 10fdf0: 75 2e jne 10fe20 <_Thread_queue_Extract_priority_helper+0x94> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10fdf2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10fdf6: 74 3c je 10fe34 <_Thread_queue_Extract_priority_helper+0xa8> _ISR_Enable( level ); 10fdf8: ff 75 ec pushl -0x14(%ebp) 10fdfb: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10fdfc: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10fe03: 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 } 10fe06: 8d 65 f4 lea -0xc(%ebp),%esp 10fe09: 5b pop %ebx 10fe0a: 5e pop %esi 10fe0b: 5f pop %edi 10fe0c: c9 leave 10fe0d: e9 d6 c1 ff ff jmp 10bfe8 <_Thread_Clear_state> 10fe12: 66 90 xchg %ax,%ax Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 10fe14: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED 10fe17: 9d popf <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10fe18: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10fe1b: 5b pop %ebx <== NOT EXECUTED 10fe1c: 5e pop %esi <== NOT EXECUTED 10fe1d: 5f pop %edi <== NOT EXECUTED 10fe1e: c9 leave <== NOT EXECUTED 10fe1f: c3 ret <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 10fe20: ff 75 ec pushl -0x14(%ebp) 10fe23: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10fe24: 8d 65 f4 lea -0xc(%ebp),%esp 10fe27: 5b pop %ebx 10fe28: 5e pop %esi 10fe29: 5f pop %edi 10fe2a: c9 leave 10fe2b: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10fe2c: 89 31 mov %esi,(%ecx) next_node->previous = previous_node; 10fe2e: 89 4e 04 mov %ecx,0x4(%esi) 10fe31: eb b9 jmp 10fdec <_Thread_queue_Extract_priority_helper+0x60> 10fe33: 90 nop * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 10fe34: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10fe3b: ff 75 ec pushl -0x14(%ebp) 10fe3e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10fe3f: 83 ec 0c sub $0xc,%esp 10fe42: 8d 43 48 lea 0x48(%ebx),%eax 10fe45: 50 push %eax 10fe46: e8 85 d5 ff ff call 10d3d0 <_Watchdog_Remove> 10fe4b: 83 c4 10 add $0x10,%esp 10fe4e: eb ac jmp 10fdfc <_Thread_queue_Extract_priority_helper+0x70> =============================================================================== 0010ca6c <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10ca6c: 55 push %ebp 10ca6d: 89 e5 mov %esp,%ebp 10ca6f: 83 ec 08 sub $0x8,%esp 10ca72: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10ca75: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10ca7c: 75 06 jne 10ca84 <_Thread_queue_Extract_with_proxy+0x18> 10ca7e: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return TRUE; } return FALSE; } 10ca80: c9 leave 10ca81: c3 ret 10ca82: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10ca84: 83 ec 08 sub $0x8,%esp 10ca87: 50 push %eax 10ca88: ff 70 44 pushl 0x44(%eax) 10ca8b: e8 cc 32 00 00 call 10fd5c <_Thread_queue_Extract> 10ca90: b0 01 mov $0x1,%al 10ca92: 83 c4 10 add $0x10,%esp return TRUE; } return FALSE; } 10ca95: c9 leave 10ca96: c3 ret =============================================================================== 0010eb74 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 10eb74: 55 push %ebp 10eb75: 89 e5 mov %esp,%ebp 10eb77: 56 push %esi 10eb78: 53 push %ebx 10eb79: 8b 75 08 mov 0x8(%ebp),%esi 10eb7c: 31 d2 xor %edx,%edx 10eb7e: 31 c9 xor %ecx,%ecx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10eb80: 8b 1c 0e mov (%esi,%ecx,1),%ebx uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) 10eb83: 8d 04 52 lea (%edx,%edx,2),%eax 10eb86: 8d 44 86 04 lea 0x4(%esi,%eax,4),%eax 10eb8a: 39 c3 cmp %eax,%ebx 10eb8c: 75 12 jne 10eba0 <_Thread_queue_First_priority+0x2c> { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10eb8e: 42 inc %edx 10eb8f: 83 c1 0c add $0xc,%ecx ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 10eb92: 83 fa 04 cmp $0x4,%edx 10eb95: 75 e9 jne 10eb80 <_Thread_queue_First_priority+0xc> 10eb97: 31 c0 xor %eax,%eax if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 10eb99: 5b pop %ebx 10eb9a: 5e pop %esi 10eb9b: c9 leave 10eb9c: c3 ret 10eb9d: 8d 76 00 lea 0x0(%esi),%esi 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 *) 10eba0: 89 d8 mov %ebx,%eax the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 10eba2: 5b pop %ebx 10eba3: 5e pop %esi 10eba4: c9 leave 10eba5: c3 ret =============================================================================== 0010ca98 <_Thread_queue_Flush>: void _Thread_queue_Flush( Thread_queue_Control *the_thread_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 10ca98: 55 push %ebp 10ca99: 89 e5 mov %esp,%ebp 10ca9b: 56 push %esi 10ca9c: 53 push %ebx 10ca9d: 8b 75 08 mov 0x8(%ebp),%esi 10caa0: 8b 5d 10 mov 0x10(%ebp),%ebx 10caa3: eb 06 jmp 10caab <_Thread_queue_Flush+0x13> 10caa5: 8d 76 00 lea 0x0(%esi),%esi #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; 10caa8: 89 58 34 mov %ebx,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10caab: 83 ec 0c sub $0xc,%esp 10caae: 56 push %esi 10caaf: e8 60 fc ff ff call 10c714 <_Thread_queue_Dequeue> 10cab4: 83 c4 10 add $0x10,%esp 10cab7: 85 c0 test %eax,%eax 10cab9: 75 ed jne 10caa8 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10cabb: 8d 65 f8 lea -0x8(%ebp),%esp 10cabe: 5b pop %ebx 10cabf: 5e pop %esi 10cac0: c9 leave 10cac1: c3 ret =============================================================================== 0010fe50 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 10fe50: 55 push %ebp 10fe51: 89 e5 mov %esp,%ebp 10fe53: 83 ec 08 sub $0x8,%esp 10fe56: 8b 4d 08 mov 0x8(%ebp),%ecx Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 10fe59: 8b 51 44 mov 0x44(%ecx),%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 && 10fe5c: 8b 42 30 mov 0x30(%edx),%eax 10fe5f: 85 c0 test %eax,%eax 10fe61: 74 08 je 10fe6b <_Thread_queue_Process_timeout+0x1b> 10fe63: 3b 0d bc f9 11 00 cmp 0x11f9bc,%ecx 10fe69: 74 19 je 10fe84 <_Thread_queue_Process_timeout+0x34><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10fe6b: 8b 42 3c mov 0x3c(%edx),%eax 10fe6e: 89 41 34 mov %eax,0x34(%ecx) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10fe71: 83 ec 08 sub $0x8,%esp 10fe74: 51 push %ecx 10fe75: ff 71 44 pushl 0x44(%ecx) 10fe78: e8 df fe ff ff call 10fd5c <_Thread_queue_Extract> 10fe7d: 83 c4 10 add $0x10,%esp } } 10fe80: c9 leave 10fe81: c3 ret 10fe82: 66 90 xchg %ax,%ax * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 10fe84: 83 f8 03 cmp $0x3,%eax 10fe87: 74 f7 je 10fe80 <_Thread_queue_Process_timeout+0x30><== NEVER TAKEN the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10fe89: 8b 42 3c mov 0x3c(%edx),%eax 10fe8c: 89 41 34 mov %eax,0x34(%ecx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10fe8f: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 10fe96: c9 leave 10fe97: c3 ret =============================================================================== 0010cb44 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10cb44: 55 push %ebp 10cb45: 89 e5 mov %esp,%ebp 10cb47: 56 push %esi 10cb48: 53 push %ebx 10cb49: 83 ec 10 sub $0x10,%esp 10cb4c: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10cb4f: 85 db test %ebx,%ebx 10cb51: 74 06 je 10cb59 <_Thread_queue_Requeue+0x15><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10cb53: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10cb57: 74 07 je 10cb60 <_Thread_queue_Requeue+0x1c><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10cb59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10cb5c: 5b pop %ebx <== NOT EXECUTED 10cb5d: 5e pop %esi <== NOT EXECUTED 10cb5e: c9 leave <== NOT EXECUTED 10cb5f: c3 ret <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10cb60: 9c pushf 10cb61: fa cli 10cb62: 5e pop %esi if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10cb63: 8b 45 0c mov 0xc(%ebp),%eax 10cb66: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10cb6d: 75 09 jne 10cb78 <_Thread_queue_Requeue+0x34><== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10cb6f: 56 push %esi 10cb70: 9d popf } } 10cb71: 8d 65 f8 lea -0x8(%ebp),%esp 10cb74: 5b pop %ebx 10cb75: 5e pop %esi 10cb76: c9 leave 10cb77: c3 ret { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10cb78: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 10cb7f: 52 push %edx 10cb80: 6a 01 push $0x1 10cb82: 50 push %eax 10cb83: 53 push %ebx 10cb84: e8 03 32 00 00 call 10fd8c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10cb89: 83 c4 0c add $0xc,%esp 10cb8c: 8d 45 f4 lea -0xc(%ebp),%eax 10cb8f: 50 push %eax 10cb90: ff 75 0c pushl 0xc(%ebp) 10cb93: 53 push %ebx 10cb94: e8 4f fd ff ff call 10c8e8 <_Thread_queue_Enqueue_priority> 10cb99: 83 c4 10 add $0x10,%esp 10cb9c: eb d1 jmp 10cb6f <_Thread_queue_Requeue+0x2b> =============================================================================== 0010cba0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored ) { 10cba0: 55 push %ebp 10cba1: 89 e5 mov %esp,%ebp 10cba3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10cba6: 8d 45 fc lea -0x4(%ebp),%eax 10cba9: 50 push %eax 10cbaa: ff 75 08 pushl 0x8(%ebp) 10cbad: e8 02 f8 ff ff call 10c3b4 <_Thread_Get> switch ( location ) { 10cbb2: 83 c4 10 add $0x10,%esp 10cbb5: 8b 55 fc mov -0x4(%ebp),%edx 10cbb8: 85 d2 test %edx,%edx 10cbba: 75 17 jne 10cbd3 <_Thread_queue_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10cbbc: 83 ec 0c sub $0xc,%esp 10cbbf: 50 push %eax 10cbc0: e8 8b 32 00 00 call 10fe50 <_Thread_queue_Process_timeout> 10cbc5: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10cbca: 48 dec %eax 10cbcb: a3 f8 f8 11 00 mov %eax,0x11f8f8 10cbd0: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10cbd3: c9 leave 10cbd4: c3 ret =============================================================================== 00114ca0 <_Timer_Server_body>: * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 114ca0: 55 push %ebp 114ca1: 89 e5 mov %esp,%ebp 114ca3: 57 push %edi 114ca4: 56 push %esi 114ca5: 53 push %ebx 114ca6: 83 ec 1c sub $0x1c,%esp * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 114ca9: 8d 7d e8 lea -0x18(%ebp),%edi 114cac: 8d 75 ec lea -0x14(%ebp),%esi 114caf: 89 75 e8 mov %esi,-0x18(%ebp) 114cb2: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 114cb9: 89 7d f0 mov %edi,-0x10(%ebp) /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 114cbc: a1 24 70 13 00 mov 0x137024,%eax 114cc1: a3 10 6e 13 00 mov %eax,0x136e10 _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 114cc6: a1 4c 6f 13 00 mov 0x136f4c,%eax 114ccb: a3 0c 6e 13 00 mov %eax,0x136e0c /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 114cd0: a1 b8 6e 13 00 mov 0x136eb8,%eax 114cd5: 40 inc %eax 114cd6: a3 b8 6e 13 00 mov %eax,0x136eb8 /* * Insert the timers that were inserted before we got to run. * This should be done with dispatching disabled. */ _Thread_Disable_dispatch(); _Timer_Server_process_insertions(); 114cdb: e8 60 ff ff ff call 114c40 <_Timer_Server_process_insertions> _Thread_Enable_dispatch(); 114ce0: e8 e3 27 00 00 call 1174c8 <_Thread_Enable_dispatch> 114ce5: 8d 76 00 lea 0x0(%esi),%esi 114ce8: a1 b8 6e 13 00 mov 0x136eb8,%eax 114ced: 40 inc %eax 114cee: a3 b8 6e 13 00 mov %eax,0x136eb8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 114cf3: 83 ec 08 sub $0x8,%esp 114cf6: 6a 08 push $0x8 114cf8: ff 35 24 79 13 00 pushl 0x137924 114cfe: e8 bd 31 00 00 call 117ec0 <_Thread_Set_state> * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 114d03: 8b 15 00 6e 13 00 mov 0x136e00,%edx _Timer_Server_reset_ticks_timer(); 114d09: 83 c4 10 add $0x10,%esp 114d0c: 81 fa 04 6e 13 00 cmp $0x136e04,%edx 114d12: 74 1f je 114d33 <_Timer_Server_body+0x93> 114d14: a1 24 79 13 00 mov 0x137924,%eax Heap_Control *the_heap, 114d19: 8b 52 10 mov 0x10(%edx),%edx 114d1c: 89 50 54 mov %edx,0x54(%eax) void *starting_address, size_t *size 114d1f: 83 ec 08 sub $0x8,%esp 114d22: 83 c0 48 add $0x48,%eax 114d25: 50 push %eax 114d26: 68 9c 6f 13 00 push $0x136f9c 114d2b: e8 60 3a 00 00 call 118790 <_Watchdog_Insert> 114d30: 83 c4 10 add $0x10,%esp * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 114d33: a1 14 6e 13 00 mov 0x136e14,%eax _Timer_Server_reset_seconds_timer(); 114d38: 3d 18 6e 13 00 cmp $0x136e18,%eax 114d3d: 74 1d je 114d5c <_Timer_Server_body+0xbc> * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. */ bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, 114d3f: 8b 40 10 mov 0x10(%eax),%eax 114d42: a3 4c 6e 13 00 mov %eax,0x136e4c size_t size ); 114d47: 83 ec 08 sub $0x8,%esp 114d4a: 68 40 6e 13 00 push $0x136e40 114d4f: 68 90 6f 13 00 push $0x136f90 114d54: e8 37 3a 00 00 call 118790 <_Watchdog_Insert> 114d59: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 114d5c: e8 67 27 00 00 call 1174c8 <_Thread_Enable_dispatch> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 114d61: a1 b8 6e 13 00 mov 0x136eb8,%eax 114d66: 40 inc %eax 114d67: a3 b8 6e 13 00 mov %eax,0x136eb8 /* * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 114d6c: 83 ec 0c sub $0xc,%esp 114d6f: a1 24 79 13 00 mov 0x137924,%eax 114d74: 83 c0 48 add $0x48,%eax 114d77: 50 push %eax 114d78: e8 43 3b 00 00 call 1188c0 <_Watchdog_Remove> _Timer_Server_stop_seconds_timer(); 114d7d: c7 04 24 40 6e 13 00 movl $0x136e40,(%esp) 114d84: e8 37 3b 00 00 call 1188c0 <_Watchdog_Remove> ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 114d89: 8b 15 24 70 13 00 mov 0x137024,%edx if ( snapshot >= _Timer_Server_ticks_last_time ) 114d8f: a1 10 6e 13 00 mov 0x136e10,%eax 114d94: 83 c4 10 add $0x10,%esp 114d97: 39 c2 cmp %eax,%edx 114d99: 72 7d jb 114e18 <_Timer_Server_body+0x178><== NEVER TAKEN ticks = snapshot - _Timer_Server_ticks_last_time; 114d9b: 89 d1 mov %edx,%ecx 114d9d: 29 c1 sub %eax,%ecx 114d9f: 89 c8 mov %ecx,%eax else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 114da1: 89 15 10 6e 13 00 mov %edx,0x136e10 _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 114da7: 53 push %ebx 114da8: 57 push %edi 114da9: 50 push %eax 114daa: 68 00 6e 13 00 push $0x136e00 114daf: e8 48 39 00 00 call 1186fc <_Watchdog_Adjust_to_chain> /* * 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 _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 114db4: 8b 1d 4c 6f 13 00 mov 0x136f4c,%ebx if ( snapshot > _Timer_Server_seconds_last_time ) { 114dba: a1 0c 6e 13 00 mov 0x136e0c,%eax 114dbf: 83 c4 10 add $0x10,%esp 114dc2: 39 c3 cmp %eax,%ebx 114dc4: 77 5a ja 114e20 <_Timer_Server_body+0x180> * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); } else if ( snapshot < _Timer_Server_seconds_last_time ) { 114dc6: 72 70 jb 114e38 <_Timer_Server_body+0x198> * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); } _Timer_Server_seconds_last_time = snapshot; 114dc8: 89 1d 0c 6e 13 00 mov %ebx,0x136e0c _Timer_Server_process_seconds_chain( &to_fire ); /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 114dce: e8 6d fe ff ff call 114c40 <_Timer_Server_process_insertions> /* * Enable dispatching to process the set that are ready "to fire." */ _Thread_Enable_dispatch(); 114dd3: e8 f0 26 00 00 call 1174c8 <_Thread_Enable_dispatch> */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 114dd8: 9c pushf 114dd9: fa cli 114dda: 59 pop %ecx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 114ddb: 8b 55 e8 mov -0x18(%ebp),%edx 114dde: 39 d6 cmp %edx,%esi 114de0: 74 2c je 114e0e <_Timer_Server_body+0x16e> 114de2: 66 90 xchg %ax,%ax 114de4: 8b 02 mov (%edx),%eax 114de6: 89 45 e8 mov %eax,-0x18(%ebp) 114de9: 89 78 04 mov %edi,0x4(%eax) if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 114dec: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) _ISR_Enable( level ); 114df3: 51 push %ecx 114df4: 9d popf (*watch->routine)( watch->id, watch->user_data ); 114df5: 83 ec 08 sub $0x8,%esp 114df8: ff 72 24 pushl 0x24(%edx) 114dfb: ff 72 20 pushl 0x20(%edx) 114dfe: ff 52 1c call *0x1c(%edx) */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 114e01: 9c pushf 114e02: fa cli 114e03: 59 pop %ecx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 114e04: 8b 55 e8 mov -0x18(%ebp),%edx 114e07: 83 c4 10 add $0x10,%esp 114e0a: 39 d6 cmp %edx,%esi 114e0c: 75 d6 jne 114de4 <_Timer_Server_body+0x144> watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire ); if ( watch == NULL ) { _ISR_Enable( level ); 114e0e: 51 push %ecx 114e0f: 9d popf 114e10: e9 d3 fe ff ff jmp 114ce8 <_Timer_Server_body+0x48> 114e15: 8d 76 00 lea 0x0(%esi),%esi snapshot = _Watchdog_Ticks_since_boot; if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 114e18: f7 d0 not %eax <== NOT EXECUTED 114e1a: 01 d0 add %edx,%eax <== NOT EXECUTED 114e1c: eb 83 jmp 114da1 <_Timer_Server_body+0x101><== NOT EXECUTED 114e1e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); 114e20: 51 push %ecx 114e21: 57 push %edi 114e22: 89 da mov %ebx,%edx 114e24: 29 c2 sub %eax,%edx 114e26: 52 push %edx 114e27: 68 14 6e 13 00 push $0x136e14 114e2c: e8 cb 38 00 00 call 1186fc <_Watchdog_Adjust_to_chain> 114e31: 83 c4 10 add $0x10,%esp 114e34: eb 92 jmp 114dc8 <_Timer_Server_body+0x128> 114e36: 66 90 xchg %ax,%ax /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); 114e38: 52 push %edx 114e39: 29 d8 sub %ebx,%eax 114e3b: 50 push %eax 114e3c: 6a 01 push $0x1 114e3e: 68 14 6e 13 00 push $0x136e14 114e43: e8 38 38 00 00 call 118680 <_Watchdog_Adjust> 114e48: 83 c4 10 add $0x10,%esp 114e4b: e9 78 ff ff ff jmp 114dc8 <_Timer_Server_body+0x128> =============================================================================== 00114c40 <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 114c40: 55 push %ebp 114c41: 89 e5 mov %esp,%ebp 114c43: 83 ec 08 sub $0x8,%esp 114c46: eb 0a jmp 114c52 <_Timer_Server_process_insertions+0x12> if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 114c48: 83 fa 03 cmp $0x3,%edx 114c4b: 74 37 je 114c84 <_Timer_Server_process_insertions+0x44><== ALWAYS TAKEN } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 114c4d: e8 ee ff ff ff call 114c40 <_Timer_Server_process_insertions> static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 114c52: 83 ec 0c sub $0xc,%esp 114c55: 68 20 6e 13 00 push $0x136e20 114c5a: e8 0d 09 00 00 call 11556c <_Chain_Get> if ( the_timer == NULL ) 114c5f: 83 c4 10 add $0x10,%esp 114c62: 85 c0 test %eax,%eax 114c64: 74 36 je 114c9c <_Timer_Server_process_insertions+0x5c> break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 114c66: 8b 50 38 mov 0x38(%eax),%edx 114c69: 83 fa 01 cmp $0x1,%edx 114c6c: 75 da jne 114c48 <_Timer_Server_process_insertions+0x8> _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 114c6e: 83 ec 08 sub $0x8,%esp 114c71: 83 c0 10 add $0x10,%eax 114c74: 50 push %eax 114c75: 68 00 6e 13 00 push $0x136e00 114c7a: e8 11 3b 00 00 call 118790 <_Watchdog_Insert> 114c7f: 83 c4 10 add $0x10,%esp 114c82: eb c9 jmp 114c4d <_Timer_Server_process_insertions+0xd> } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 114c84: 83 ec 08 sub $0x8,%esp 114c87: 83 c0 10 add $0x10,%eax 114c8a: 50 push %eax 114c8b: 68 14 6e 13 00 push $0x136e14 114c90: e8 fb 3a 00 00 call 118790 <_Watchdog_Insert> 114c95: 83 c4 10 add $0x10,%esp 114c98: eb b3 jmp 114c4d <_Timer_Server_process_insertions+0xd> 114c9a: 66 90 xchg %ax,%ax * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); } } 114c9c: c9 leave 114c9d: c3 ret =============================================================================== 0010e67c <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10e67c: 55 push %ebp 10e67d: 89 e5 mov %esp,%ebp 10e67f: 57 push %edi 10e680: 56 push %esi 10e681: 53 push %ebx 10e682: 83 ec 2c sub $0x2c,%esp 10e685: 8b 45 08 mov 0x8(%ebp),%eax /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10e688: 8b 10 mov (%eax),%edx 10e68a: 89 55 ec mov %edx,-0x14(%ebp) left += lhs->tv_nsec; 10e68d: 8b 40 04 mov 0x4(%eax),%eax 10e690: 89 45 dc mov %eax,-0x24(%ebp) right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10e693: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10e698: 8b 5d 0c mov 0xc(%ebp),%ebx 10e69b: 8b 03 mov (%ebx),%eax 10e69d: f7 e9 imul %ecx 10e69f: 89 c6 mov %eax,%esi 10e6a1: 89 d7 mov %edx,%edi right += rhs->tv_nsec; 10e6a3: 8b 43 04 mov 0x4(%ebx),%eax 10e6a6: 99 cltd 10e6a7: 01 c6 add %eax,%esi 10e6a9: 11 d7 adc %edx,%edi if ( right == 0 ) { 10e6ab: 89 f8 mov %edi,%eax 10e6ad: 09 f0 or %esi,%eax 10e6af: 74 77 je 10e728 <_Timespec_Divide+0xac> <== NEVER 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; 10e6b1: 8b 45 ec mov -0x14(%ebp),%eax 10e6b4: f7 e9 imul %ecx 10e6b6: 89 45 e0 mov %eax,-0x20(%ebp) 10e6b9: 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; 10e6bc: 8b 45 dc mov -0x24(%ebp),%eax 10e6bf: 99 cltd 10e6c0: 01 45 e0 add %eax,-0x20(%ebp) 10e6c3: 11 55 e4 adc %edx,-0x1c(%ebp) 10e6c6: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10e6cd: b9 a0 86 01 00 mov $0x186a0,%ecx 10e6d2: 8b 45 e0 mov -0x20(%ebp),%eax 10e6d5: f7 e1 mul %ecx 10e6d7: 89 45 d0 mov %eax,-0x30(%ebp) 10e6da: 01 da add %ebx,%edx 10e6dc: 89 55 d4 mov %edx,-0x2c(%ebp) 10e6df: 57 push %edi 10e6e0: 56 push %esi 10e6e1: ff 75 d4 pushl -0x2c(%ebp) 10e6e4: ff 75 d0 pushl -0x30(%ebp) 10e6e7: e8 0c b3 00 00 call 1199f8 <__udivdi3> 10e6ec: 83 c4 10 add $0x10,%esp 10e6ef: 89 c3 mov %eax,%ebx 10e6f1: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10e6f3: 6a 00 push $0x0 10e6f5: 68 e8 03 00 00 push $0x3e8 10e6fa: 52 push %edx 10e6fb: 50 push %eax 10e6fc: e8 f7 b2 00 00 call 1199f8 <__udivdi3> 10e701: 83 c4 10 add $0x10,%esp 10e704: 8b 4d 10 mov 0x10(%ebp),%ecx 10e707: 89 01 mov %eax,(%ecx) *fval_percentage = answer % 1000; 10e709: 6a 00 push $0x0 10e70b: 68 e8 03 00 00 push $0x3e8 10e710: 56 push %esi 10e711: 53 push %ebx 10e712: e8 ed b3 00 00 call 119b04 <__umoddi3> 10e717: 83 c4 10 add $0x10,%esp 10e71a: 8b 5d 14 mov 0x14(%ebp),%ebx 10e71d: 89 03 mov %eax,(%ebx) } 10e71f: 8d 65 f4 lea -0xc(%ebp),%esp 10e722: 5b pop %ebx 10e723: 5e pop %esi 10e724: 5f pop %edi 10e725: c9 leave 10e726: c3 ret 10e727: 90 nop left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10e728: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10e72b: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED *fval_percentage = 0; 10e731: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 10e734: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10e73a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e73d: 5b pop %ebx <== NOT EXECUTED 10e73e: 5e pop %esi <== NOT EXECUTED 10e73f: 5f pop %edi <== NOT EXECUTED 10e740: c9 leave <== NOT EXECUTED 10e741: c3 ret <== NOT EXECUTED =============================================================================== 0011054c <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 11054c: 55 push %ebp 11054d: 89 e5 mov %esp,%ebp 11054f: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 110552: 85 c0 test %eax,%eax 110554: 74 1a je 110570 <_Timespec_Is_valid+0x24> return FALSE; if ( time->tv_sec < 0 ) 110556: 8b 10 mov (%eax),%edx 110558: 85 d2 test %edx,%edx 11055a: 78 14 js 110570 <_Timespec_Is_valid+0x24> return FALSE; if ( time->tv_nsec < 0 ) 11055c: 8b 40 04 mov 0x4(%eax),%eax 11055f: 85 c0 test %eax,%eax 110561: 78 0d js 110570 <_Timespec_Is_valid+0x24> 110563: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 110568: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 11056b: c9 leave 11056c: c3 ret 11056d: 8d 76 00 lea 0x0(%esi),%esi return FALSE; if ( time->tv_sec < 0 ) return FALSE; if ( time->tv_nsec < 0 ) 110570: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 110572: c9 leave 110573: c3 ret =============================================================================== 0011003c <_User_extensions_Add_set>: void _User_extensions_Add_set ( User_extensions_Control *the_extension, User_extensions_Table *extension_table ) { 11003c: 55 push %ebp 11003d: 89 e5 mov %esp,%ebp 11003f: 57 push %edi 110040: 56 push %esi 110041: 53 push %ebx 110042: 83 ec 14 sub $0x14,%esp 110045: 8b 5d 08 mov 0x8(%ebp),%ebx 110048: 8b 45 0c mov 0xc(%ebp),%eax 11004b: 89 45 ec mov %eax,-0x14(%ebp) the_extension->Callouts = *extension_table; 11004e: 8d 7b 14 lea 0x14(%ebx),%edi 110051: b9 08 00 00 00 mov $0x8,%ecx 110056: 89 c6 mov %eax,%esi 110058: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_User_extensions_List, &the_extension->Node ); 11005a: 53 push %ebx 11005b: 68 4c fb 11 00 push $0x11fb4c 110060: e8 bb ad ff ff call 10ae20 <_Chain_Append> /* * If a switch handler is present, append it to the switch chain. */ if ( extension_table->thread_switch != NULL ) { 110065: 8b 55 ec mov -0x14(%ebp),%edx 110068: 8b 42 10 mov 0x10(%edx),%eax 11006b: 83 c4 10 add $0x10,%esp 11006e: 85 c0 test %eax,%eax 110070: 74 1e je 110090 <_User_extensions_Add_set+0x54> the_extension->Switch.thread_switch = extension_table->thread_switch; 110072: 89 43 10 mov %eax,0x10(%ebx) _Chain_Append( 110075: 8d 43 08 lea 0x8(%ebx),%eax 110078: 89 45 0c mov %eax,0xc(%ebp) 11007b: c7 45 08 fc f8 11 00 movl $0x11f8fc,0x8(%ebp) &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } 110082: 8d 65 f4 lea -0xc(%ebp),%esp 110085: 5b pop %ebx 110086: 5e pop %esi 110087: 5f pop %edi 110088: c9 leave * If a switch handler is present, append it to the switch chain. */ if ( extension_table->thread_switch != NULL ) { the_extension->Switch.thread_switch = extension_table->thread_switch; _Chain_Append( 110089: e9 92 ad ff ff jmp 10ae20 <_Chain_Append> 11008e: 66 90 xchg %ax,%ax &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } 110090: 8d 65 f4 lea -0xc(%ebp),%esp 110093: 5b pop %ebx 110094: 5e pop %esi 110095: 5f pop %edi 110096: c9 leave 110097: c3 ret =============================================================================== 0010d150 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, uint32_t the_error ) { 10d150: 55 push %ebp 10d151: 89 e5 mov %esp,%ebp 10d153: 57 push %edi 10d154: 56 push %esi 10d155: 53 push %ebx 10d156: 83 ec 0c sub $0xc,%esp 10d159: 8b 7d 10 mov 0x10(%ebp),%edi 10d15c: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10d15f: 8b 1d 54 fb 11 00 mov 0x11fb54,%ebx !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10d165: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx 10d16b: 74 20 je 10d18d <_User_extensions_Fatal+0x3d><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10d16d: 0f b6 f0 movzbl %al,%esi !_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 ) 10d170: 8b 43 30 mov 0x30(%ebx),%eax 10d173: 85 c0 test %eax,%eax 10d175: 74 0b je 10d182 <_User_extensions_Fatal+0x32> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10d177: 52 push %edx 10d178: 57 push %edi 10d179: 56 push %esi 10d17a: ff 75 08 pushl 0x8(%ebp) 10d17d: ff d0 call *%eax 10d17f: 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 ) { 10d182: 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 ) ; 10d185: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx 10d18b: 75 e3 jne 10d170 <_User_extensions_Fatal+0x20> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10d18d: 8d 65 f4 lea -0xc(%ebp),%esp 10d190: 5b pop %ebx 10d191: 5e pop %esi 10d192: 5f pop %edi 10d193: c9 leave 10d194: c3 ret =============================================================================== 0010d034 <_User_extensions_Handler_initialization>: void _User_extensions_Handler_initialization ( uint32_t number_of_extensions, User_extensions_Table *initial_extensions ) { 10d034: 55 push %ebp 10d035: 89 e5 mov %esp,%ebp 10d037: 57 push %edi 10d038: 56 push %esi 10d039: 53 push %ebx 10d03a: 83 ec 0c sub $0xc,%esp 10d03d: 8b 75 0c mov 0xc(%ebp),%esi 10d040: c7 05 4c fb 11 00 50 movl $0x11fb50,0x11fb4c 10d047: fb 11 00 10d04a: c7 05 50 fb 11 00 00 movl $0x0,0x11fb50 10d051: 00 00 00 10d054: c7 05 54 fb 11 00 4c movl $0x11fb4c,0x11fb54 10d05b: fb 11 00 10d05e: c7 05 fc f8 11 00 00 movl $0x11f900,0x11f8fc 10d065: f9 11 00 10d068: c7 05 00 f9 11 00 00 movl $0x0,0x11f900 10d06f: 00 00 00 10d072: c7 05 04 f9 11 00 fc movl $0x11f8fc,0x11f904 10d079: f8 11 00 uint32_t i; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10d07c: 85 f6 test %esi,%esi 10d07e: 74 50 je 10d0d0 <_User_extensions_Handler_initialization+0x9c> extension = (User_extensions_Control *) 10d080: 8b 55 08 mov 0x8(%ebp),%edx 10d083: 8d 04 52 lea (%edx,%edx,2),%eax 10d086: 8d 04 82 lea (%edx,%eax,4),%eax 10d089: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx 10d090: 83 ec 0c sub $0xc,%esp 10d093: 53 push %ebx 10d094: e8 43 04 00 00 call 10d4dc <_Workspace_Allocate_or_fatal_error> 10d099: 89 45 ec mov %eax,-0x14(%ebp) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10d09c: 31 c0 xor %eax,%eax 10d09e: 8b 7d ec mov -0x14(%ebp),%edi 10d0a1: 89 d9 mov %ebx,%ecx 10d0a3: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10d0a5: 83 c4 10 add $0x10,%esp 10d0a8: 8b 45 08 mov 0x8(%ebp),%eax 10d0ab: 85 c0 test %eax,%eax 10d0ad: 74 21 je 10d0d0 <_User_extensions_Handler_initialization+0x9c><== NEVER TAKEN 10d0af: 31 db xor %ebx,%ebx 10d0b1: 8d 76 00 lea 0x0(%esi),%esi _User_extensions_Add_set (extension, &initial_extensions[i]); 10d0b4: 83 ec 08 sub $0x8,%esp 10d0b7: 56 push %esi 10d0b8: ff 75 ec pushl -0x14(%ebp) 10d0bb: e8 7c 2f 00 00 call 11003c <_User_extensions_Add_set> extension++; 10d0c0: 83 45 ec 34 addl $0x34,-0x14(%ebp) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10d0c4: 43 inc %ebx 10d0c5: 83 c6 20 add $0x20,%esi 10d0c8: 83 c4 10 add $0x10,%esp 10d0cb: 39 5d 08 cmp %ebx,0x8(%ebp) 10d0ce: 77 e4 ja 10d0b4 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set (extension, &initial_extensions[i]); extension++; } } } 10d0d0: 8d 65 f4 lea -0xc(%ebp),%esp 10d0d3: 5b pop %ebx 10d0d4: 5e pop %esi 10d0d5: 5f pop %edi 10d0d6: c9 leave 10d0d7: c3 ret =============================================================================== 0010ecf8 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10ecf8: 55 push %ebp 10ecf9: 89 e5 mov %esp,%ebp 10ecfb: 53 push %ebx 10ecfc: 83 ec 10 sub $0x10,%esp 10ecff: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10ed02: 53 push %ebx 10ed03: e8 74 27 00 00 call 11147c <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10ed08: 83 c4 10 add $0x10,%esp 10ed0b: 8b 43 24 mov 0x24(%ebx),%eax 10ed0e: 85 c0 test %eax,%eax 10ed10: 74 12 je 10ed24 <_User_extensions_Remove_set+0x2c><== ALWAYS TAKEN _Chain_Extract( &the_extension->Switch.Node ); 10ed12: 8d 43 08 lea 0x8(%ebx),%eax <== NOT EXECUTED 10ed15: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10ed18: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10ed1b: c9 leave <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10ed1c: e9 5b 27 00 00 jmp 11147c <_Chain_Extract> <== NOT EXECUTED 10ed21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 10ed24: 8b 5d fc mov -0x4(%ebp),%ebx 10ed27: c9 leave 10ed28: c3 ret =============================================================================== 0010d0d8 <_User_extensions_Thread_begin>: */ void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10d0d8: 55 push %ebp 10d0d9: 89 e5 mov %esp,%ebp 10d0db: 56 push %esi 10d0dc: 53 push %ebx 10d0dd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10d0e0: 8b 1d 4c fb 11 00 mov 0x11fb4c,%ebx !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10d0e6: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx 10d0ec: 74 1c je 10d10a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10d0ee: 66 90 xchg %ax,%ax the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 10d0f0: 8b 43 28 mov 0x28(%ebx),%eax 10d0f3: 85 c0 test %eax,%eax 10d0f5: 74 09 je 10d100 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10d0f7: 83 ec 0c sub $0xc,%esp 10d0fa: 56 push %esi 10d0fb: ff d0 call *%eax 10d0fd: 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 ) { 10d100: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10d102: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx 10d108: 75 e6 jne 10d0f0 <_User_extensions_Thread_begin+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10d10a: 8d 65 f8 lea -0x8(%ebp),%esp 10d10d: 5b pop %ebx 10d10e: 5e pop %esi 10d10f: c9 leave 10d110: c3 ret =============================================================================== 0010d198 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10d198: 55 push %ebp 10d199: 89 e5 mov %esp,%ebp 10d19b: 56 push %esi 10d19c: 53 push %ebx 10d19d: 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 ; 10d1a0: 8b 1d 4c fb 11 00 mov 0x11fb4c,%ebx !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10d1a6: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx 10d1ac: 74 26 je 10d1d4 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10d1ae: 66 90 xchg %ax,%ax the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10d1b0: 8b 43 14 mov 0x14(%ebx),%eax 10d1b3: 85 c0 test %eax,%eax 10d1b5: 74 13 je 10d1ca <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10d1b7: 83 ec 08 sub $0x8,%esp 10d1ba: 56 push %esi 10d1bb: ff 35 bc f9 11 00 pushl 0x11f9bc 10d1c1: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10d1c3: 83 c4 10 add $0x10,%esp 10d1c6: 84 c0 test %al,%al 10d1c8: 74 0c je 10d1d6 <_User_extensions_Thread_create+0x3e> 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 ) { 10d1ca: 8b 1b mov (%ebx),%ebx Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10d1cc: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx 10d1d2: 75 dc jne 10d1b0 <_User_extensions_Thread_create+0x18> 10d1d4: b0 01 mov $0x1,%al return FALSE; } } return TRUE; } 10d1d6: 8d 65 f8 lea -0x8(%ebp),%esp 10d1d9: 5b pop %ebx 10d1da: 5e pop %esi 10d1db: c9 leave 10d1dc: c3 ret =============================================================================== 0010d1e0 <_User_extensions_Thread_delete>: */ void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10d1e0: 55 push %ebp 10d1e1: 89 e5 mov %esp,%ebp 10d1e3: 56 push %esi 10d1e4: 53 push %ebx 10d1e5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10d1e8: 8b 1d 54 fb 11 00 mov 0x11fb54,%ebx !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10d1ee: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx 10d1f4: 74 23 je 10d219 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10d1f6: 66 90 xchg %ax,%ax the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10d1f8: 8b 43 20 mov 0x20(%ebx),%eax 10d1fb: 85 c0 test %eax,%eax 10d1fd: 74 0f je 10d20e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10d1ff: 83 ec 08 sub $0x8,%esp 10d202: 56 push %esi 10d203: ff 35 bc f9 11 00 pushl 0x11f9bc 10d209: ff d0 call *%eax 10d20b: 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 ) { 10d20e: 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 ) ; 10d211: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx 10d217: 75 df jne 10d1f8 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10d219: 8d 65 f8 lea -0x8(%ebp),%esp 10d21c: 5b pop %ebx 10d21d: 5e pop %esi 10d21e: c9 leave 10d21f: c3 ret =============================================================================== 0010d114 <_User_extensions_Thread_exitted>: */ void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10d114: 55 push %ebp 10d115: 89 e5 mov %esp,%ebp 10d117: 56 push %esi 10d118: 53 push %ebx 10d119: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10d11c: 8b 1d 54 fb 11 00 mov 0x11fb54,%ebx !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10d122: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx 10d128: 74 1d je 10d147 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10d12a: 66 90 xchg %ax,%ax the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10d12c: 8b 43 2c mov 0x2c(%ebx),%eax 10d12f: 85 c0 test %eax,%eax 10d131: 74 09 je 10d13c <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10d133: 83 ec 0c sub $0xc,%esp 10d136: 56 push %esi 10d137: ff d0 call *%eax 10d139: 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 ) { 10d13c: 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 ) ; 10d13f: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx 10d145: 75 e5 jne 10d12c <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10d147: 8d 65 f8 lea -0x8(%ebp),%esp 10d14a: 5b pop %ebx 10d14b: 5e pop %esi 10d14c: c9 leave 10d14d: c3 ret =============================================================================== 0010dcdc <_User_extensions_Thread_restart>: */ void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10dcdc: 55 push %ebp 10dcdd: 89 e5 mov %esp,%ebp 10dcdf: 56 push %esi 10dce0: 53 push %ebx 10dce1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10dce4: 8b 1d 0c 31 12 00 mov 0x12310c,%ebx !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10dcea: 81 fb 10 31 12 00 cmp $0x123110,%ebx 10dcf0: 74 22 je 10dd14 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10dcf2: 66 90 xchg %ax,%ax the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 10dcf4: 8b 43 1c mov 0x1c(%ebx),%eax 10dcf7: 85 c0 test %eax,%eax 10dcf9: 74 0f je 10dd0a <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10dcfb: 83 ec 08 sub $0x8,%esp 10dcfe: 56 push %esi 10dcff: ff 35 7c 2f 12 00 pushl 0x122f7c 10dd05: ff d0 call *%eax 10dd07: 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 ) { 10dd0a: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10dd0c: 81 fb 10 31 12 00 cmp $0x123110,%ebx 10dd12: 75 e0 jne 10dcf4 <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10dd14: 8d 65 f8 lea -0x8(%ebp),%esp 10dd17: 5b pop %ebx 10dd18: 5e pop %esi 10dd19: c9 leave 10dd1a: c3 ret =============================================================================== 0010d220 <_User_extensions_Thread_start>: */ void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10d220: 55 push %ebp 10d221: 89 e5 mov %esp,%ebp 10d223: 56 push %esi 10d224: 53 push %ebx 10d225: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10d228: 8b 1d 4c fb 11 00 mov 0x11fb4c,%ebx !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10d22e: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx 10d234: 74 22 je 10d258 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10d236: 66 90 xchg %ax,%ax the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 10d238: 8b 43 18 mov 0x18(%ebx),%eax 10d23b: 85 c0 test %eax,%eax 10d23d: 74 0f je 10d24e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10d23f: 83 ec 08 sub $0x8,%esp 10d242: 56 push %esi 10d243: ff 35 bc f9 11 00 pushl 0x11f9bc 10d249: ff d0 call *%eax 10d24b: 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 ) { 10d24e: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10d250: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx 10d256: 75 e0 jne 10d238 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10d258: 8d 65 f8 lea -0x8(%ebp),%esp 10d25b: 5b pop %ebx 10d25c: 5e pop %esi 10d25d: c9 leave 10d25e: c3 ret =============================================================================== 0010d260 <_User_extensions_Thread_switch>: */ void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10d260: 55 push %ebp 10d261: 89 e5 mov %esp,%ebp 10d263: 57 push %edi 10d264: 56 push %esi 10d265: 53 push %ebx 10d266: 83 ec 0c sub $0xc,%esp 10d269: 8b 7d 08 mov 0x8(%ebp),%edi 10d26c: 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 ; 10d26f: 8b 1d fc f8 11 00 mov 0x11f8fc,%ebx !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; 10d275: 81 fb 00 f9 11 00 cmp $0x11f900,%ebx 10d27b: 74 18 je 10d295 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10d27d: 8d 76 00 lea 0x0(%esi),%esi the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10d280: 83 ec 08 sub $0x8,%esp 10d283: 56 push %esi 10d284: 57 push %edi 10d285: 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 ) { 10d288: 8b 1b mov (%ebx),%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 ) ; 10d28a: 83 c4 10 add $0x10,%esp 10d28d: 81 fb 00 f9 11 00 cmp $0x11f900,%ebx 10d293: 75 eb jne 10d280 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10d295: 8d 65 f4 lea -0xc(%ebp),%esp 10d298: 5b pop %ebx 10d299: 5e pop %esi 10d29a: 5f pop %edi 10d29b: c9 leave 10d29c: c3 ret =============================================================================== 0010ea48 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10ea48: 55 push %ebp 10ea49: 89 e5 mov %esp,%ebp 10ea4b: 57 push %edi 10ea4c: 56 push %esi 10ea4d: 53 push %ebx 10ea4e: 83 ec 0c sub $0xc,%esp 10ea51: 8b 7d 08 mov 0x8(%ebp),%edi 10ea54: 8b 4d 0c mov 0xc(%ebp),%ecx 10ea57: 8b 75 10 mov 0x10(%ebp),%esi ISR_Level level; _ISR_Disable( level ); 10ea5a: 9c pushf 10ea5b: fa cli 10ea5c: 5a pop %edx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10ea5d: 8b 07 mov (%edi),%eax * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 10ea5f: 8d 5f 04 lea 0x4(%edi),%ebx 10ea62: 89 5d f0 mov %ebx,-0x10(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10ea65: 39 d8 cmp %ebx,%eax 10ea67: 74 3f je 10eaa8 <_Watchdog_Adjust+0x60> switch ( direction ) { 10ea69: 85 c9 test %ecx,%ecx 10ea6b: 75 47 jne 10eab4 <_Watchdog_Adjust+0x6c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ea6d: 85 f6 test %esi,%esi 10ea6f: 74 37 je 10eaa8 <_Watchdog_Adjust+0x60> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ea71: 8b 58 10 mov 0x10(%eax),%ebx 10ea74: 39 de cmp %ebx,%esi 10ea76: 73 0f jae 10ea87 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10ea78: eb 42 jmp 10eabc <_Watchdog_Adjust+0x74> <== NOT EXECUTED 10ea7a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ea7c: 29 de sub %ebx,%esi 10ea7e: 74 28 je 10eaa8 <_Watchdog_Adjust+0x60> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ea80: 8b 58 10 mov 0x10(%eax),%ebx 10ea83: 39 f3 cmp %esi,%ebx 10ea85: 77 35 ja 10eabc <_Watchdog_Adjust+0x74> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10ea87: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax) _ISR_Enable( level ); 10ea8e: 52 push %edx 10ea8f: 9d popf _Watchdog_Tickle( header ); 10ea90: 83 ec 0c sub $0xc,%esp 10ea93: 57 push %edi 10ea94: e8 c7 01 00 00 call 10ec60 <_Watchdog_Tickle> _ISR_Disable( level ); 10ea99: 9c pushf 10ea9a: fa cli 10ea9b: 5a pop %edx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10ea9c: 8b 07 mov (%edi),%eax if ( _Chain_Is_empty( header ) ) 10ea9e: 83 c4 10 add $0x10,%esp 10eaa1: 39 45 f0 cmp %eax,-0x10(%ebp) 10eaa4: 75 d6 jne 10ea7c <_Watchdog_Adjust+0x34> 10eaa6: 66 90 xchg %ax,%ax } break; } } _ISR_Enable( level ); 10eaa8: 52 push %edx 10eaa9: 9d popf } 10eaaa: 8d 65 f4 lea -0xc(%ebp),%esp 10eaad: 5b pop %ebx 10eaae: 5e pop %esi 10eaaf: 5f pop %edi 10eab0: c9 leave 10eab1: c3 ret 10eab2: 66 90 xchg %ax,%ax * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10eab4: 49 dec %ecx 10eab5: 75 f1 jne 10eaa8 <_Watchdog_Adjust+0x60> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10eab7: 01 70 10 add %esi,0x10(%eax) 10eaba: eb ec jmp 10eaa8 <_Watchdog_Adjust+0x60> break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10eabc: 29 f3 sub %esi,%ebx 10eabe: 89 58 10 mov %ebx,0x10(%eax) 10eac1: eb e5 jmp 10eaa8 <_Watchdog_Adjust+0x60> =============================================================================== 001186fc <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 1186fc: 55 push %ebp 1186fd: 89 e5 mov %esp,%ebp 1186ff: 57 push %edi 118700: 56 push %esi 118701: 53 push %ebx 118702: 83 ec 0c sub $0xc,%esp 118705: 8b 5d 08 mov 0x8(%ebp),%ebx 118708: 8b 7d 10 mov 0x10(%ebp),%edi Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 11870b: 8b 45 0c mov 0xc(%ebp),%eax 11870e: 85 c0 test %eax,%eax 118710: 74 6a je 11877c <_Watchdog_Adjust_to_chain+0x80> return; } _ISR_Disable( level ); 118712: 9c pushf 118713: fa cli 118714: 8f 45 ec popl -0x14(%ebp) 118717: 8b 13 mov (%ebx),%edx * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 118719: 8d 4b 04 lea 0x4(%ebx),%ecx if ( !_Chain_Is_empty( header ) ) { 11871c: 39 ca cmp %ecx,%edx 11871e: 74 58 je 118778 <_Watchdog_Adjust_to_chain+0x7c> 118720: 8b 72 10 mov 0x10(%edx),%esi 118723: 8d 47 04 lea 0x4(%edi),%eax 118726: 89 45 f0 mov %eax,-0x10(%ebp) 118729: 8b 45 0c mov 0xc(%ebp),%eax 11872c: 89 45 e8 mov %eax,-0x18(%ebp) 11872f: 90 nop while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 118730: 3b 75 e8 cmp -0x18(%ebp),%esi 118733: 77 3c ja 118771 <_Watchdog_Adjust_to_chain+0x75> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 118735: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 11873c: eb 2b jmp 118769 <_Watchdog_Adjust_to_chain+0x6d> 11873e: 66 90 xchg %ax,%ax 118740: 8b 02 mov (%edx),%eax 118742: 89 03 mov %eax,(%ebx) 118744: 89 58 04 mov %ebx,0x4(%eax) 118747: 8b 45 f0 mov -0x10(%ebp),%eax 11874a: 89 02 mov %eax,(%edx) 11874c: 8b 47 08 mov 0x8(%edi),%eax 11874f: 89 57 08 mov %edx,0x8(%edi) 118752: 89 10 mov %edx,(%eax) 118754: 89 42 04 mov %eax,0x4(%edx) do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 118757: ff 75 ec pushl -0x14(%ebp) 11875a: 9d popf 11875b: fa cli * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 11875c: 8b 13 mov (%ebx),%edx } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 11875e: 39 d1 cmp %edx,%ecx 118760: 74 16 je 118778 <_Watchdog_Adjust_to_chain+0x7c> 118762: 8b 42 10 mov 0x10(%edx),%eax 118765: 85 c0 test %eax,%eax 118767: 75 1b jne 118784 <_Watchdog_Adjust_to_chain+0x88> 118769: 39 d1 cmp %edx,%ecx 11876b: 75 d3 jne 118740 <_Watchdog_Adjust_to_chain+0x44><== ALWAYS TAKEN 11876d: 31 d2 xor %edx,%edx <== NOT EXECUTED 11876f: eb d6 jmp 118747 <_Watchdog_Adjust_to_chain+0x4b><== NOT EXECUTED _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 118771: 2b 75 e8 sub -0x18(%ebp),%esi 118774: 89 72 10 mov %esi,0x10(%edx) 118777: 90 nop break; } } } _ISR_Enable( level ); 118778: ff 75 ec pushl -0x14(%ebp) 11877b: 9d popf } 11877c: 83 c4 0c add $0xc,%esp 11877f: 5b pop %ebx 118780: 5e pop %esi 118781: 5f pop %edi 118782: c9 leave 118783: c3 ret return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 118784: 29 75 e8 sub %esi,-0x18(%ebp) 118787: 74 ef je 118778 <_Watchdog_Adjust_to_chain+0x7c><== ALWAYS TAKEN 118789: 89 c6 mov %eax,%esi <== NOT EXECUTED 11878b: eb a3 jmp 118730 <_Watchdog_Adjust_to_chain+0x34><== NOT EXECUTED =============================================================================== 0010d2a0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10d2a0: 55 push %ebp 10d2a1: 89 e5 mov %esp,%ebp 10d2a3: 57 push %edi 10d2a4: 56 push %esi 10d2a5: 53 push %ebx 10d2a6: 83 ec 04 sub $0x4,%esp 10d2a9: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10d2ac: 8b 3d 98 f9 11 00 mov 0x11f998,%edi _ISR_Disable( level ); 10d2b2: 9c pushf 10d2b3: fa cli 10d2b4: 8f 45 f0 popl -0x10(%ebp) /* * 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 ) { 10d2b7: 8b 46 08 mov 0x8(%esi),%eax 10d2ba: 85 c0 test %eax,%eax 10d2bc: 75 72 jne 10d330 <_Watchdog_Insert+0x90> <== NEVER TAKEN _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10d2be: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi) _Watchdog_Sync_count++; 10d2c5: a1 60 fa 11 00 mov 0x11fa60,%eax 10d2ca: 40 inc %eax 10d2cb: a3 60 fa 11 00 mov %eax,0x11fa60 restart: delta_interval = the_watchdog->initial; 10d2d0: 8b 5e 0c mov 0xc(%esi),%ebx * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10d2d3: 8b 45 08 mov 0x8(%ebp),%eax 10d2d6: 8b 08 mov (%eax),%ecx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10d2d8: 85 db test %ebx,%ebx 10d2da: 74 65 je 10d341 <_Watchdog_Insert+0xa1> <== NEVER TAKEN 10d2dc: 8b 01 mov (%ecx),%eax 10d2de: 85 c0 test %eax,%eax 10d2e0: 74 5f je 10d341 <_Watchdog_Insert+0xa1> break; if ( delta_interval < after->delta_interval ) { 10d2e2: 8b 51 10 mov 0x10(%ecx),%edx 10d2e5: 39 d3 cmp %edx,%ebx 10d2e7: 73 21 jae 10d30a <_Watchdog_Insert+0x6a> 10d2e9: eb 51 jmp 10d33c <_Watchdog_Insert+0x9c> 10d2eb: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10d2ec: a1 b8 f9 11 00 mov 0x11f9b8,%eax 10d2f1: 39 c7 cmp %eax,%edi 10d2f3: 72 6f jb 10d364 <_Watchdog_Insert+0xc4> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10d2f5: 29 d3 sub %edx,%ebx ); #ifdef __cplusplus } #endif 10d2f7: 8b 09 mov (%ecx),%ecx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10d2f9: 85 db test %ebx,%ebx 10d2fb: 74 44 je 10d341 <_Watchdog_Insert+0xa1> 10d2fd: 8b 11 mov (%ecx),%edx 10d2ff: 85 d2 test %edx,%edx 10d301: 74 3e je 10d341 <_Watchdog_Insert+0xa1> break; if ( delta_interval < after->delta_interval ) { 10d303: 8b 51 10 mov 0x10(%ecx),%edx 10d306: 39 da cmp %ebx,%edx 10d308: 77 32 ja 10d33c <_Watchdog_Insert+0x9c> * 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 ); 10d30a: ff 75 f0 pushl -0x10(%ebp) 10d30d: 9d popf 10d30e: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10d30f: 83 7e 08 01 cmpl $0x1,0x8(%esi) 10d313: 74 d7 je 10d2ec <_Watchdog_Insert+0x4c> <== ALWAYS TAKEN _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10d315: 89 3d b8 f9 11 00 mov %edi,0x11f9b8 _Watchdog_Sync_count--; 10d31b: a1 60 fa 11 00 mov 0x11fa60,%eax 10d320: 48 dec %eax 10d321: a3 60 fa 11 00 mov %eax,0x11fa60 _ISR_Enable( level ); 10d326: ff 75 f0 pushl -0x10(%ebp) 10d329: 9d popf } 10d32a: 58 pop %eax 10d32b: 5b pop %ebx 10d32c: 5e pop %esi 10d32d: 5f pop %edi 10d32e: c9 leave 10d32f: c3 ret * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10d330: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10d333: 9d popf <== NOT EXECUTED exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10d334: 58 pop %eax <== NOT EXECUTED 10d335: 5b pop %ebx <== NOT EXECUTED 10d336: 5e pop %esi <== NOT EXECUTED 10d337: 5f pop %edi <== NOT EXECUTED 10d338: c9 leave <== NOT EXECUTED 10d339: c3 ret <== NOT EXECUTED 10d33a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10d33c: 29 da sub %ebx,%edx 10d33e: 89 51 10 mov %edx,0x10(%ecx) * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( 10d341: c7 46 08 02 00 00 00 movl $0x2,0x8(%esi) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10d348: 89 5e 10 mov %ebx,0x10(%esi) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10d34b: 8b 41 04 mov 0x4(%ecx),%eax 10d34e: 89 46 04 mov %eax,0x4(%esi) 10d351: 8b 10 mov (%eax),%edx 10d353: 89 30 mov %esi,(%eax) 10d355: 89 16 mov %edx,(%esi) 10d357: 89 72 04 mov %esi,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10d35a: a1 64 fa 11 00 mov 0x11fa64,%eax 10d35f: 89 46 14 mov %eax,0x14(%esi) 10d362: eb b1 jmp 10d315 <_Watchdog_Insert+0x75> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10d364: 89 3d b8 f9 11 00 mov %edi,0x11f9b8 10d36a: e9 61 ff ff ff jmp 10d2d0 <_Watchdog_Insert+0x30> =============================================================================== 0010d3d0 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10d3d0: 55 push %ebp 10d3d1: 89 e5 mov %esp,%ebp 10d3d3: 56 push %esi 10d3d4: 53 push %ebx 10d3d5: 8b 4d 08 mov 0x8(%ebp),%ecx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10d3d8: 9c pushf 10d3d9: fa cli 10d3da: 5e pop %esi previous_state = the_watchdog->state; 10d3db: 8b 59 08 mov 0x8(%ecx),%ebx switch ( previous_state ) { 10d3de: 83 fb 01 cmp $0x1,%ebx 10d3e1: 74 4d je 10d430 <_Watchdog_Remove+0x60> <== NEVER TAKEN 10d3e3: 73 13 jae 10d3f8 <_Watchdog_Remove+0x28> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10d3e5: a1 64 fa 11 00 mov 0x11fa64,%eax 10d3ea: 89 41 18 mov %eax,0x18(%ecx) _ISR_Enable( level ); 10d3ed: 56 push %esi 10d3ee: 9d popf return( previous_state ); } 10d3ef: 89 d8 mov %ebx,%eax 10d3f1: 5b pop %ebx 10d3f2: 5e pop %esi 10d3f3: c9 leave 10d3f4: c3 ret 10d3f5: 8d 76 00 lea 0x0(%esi),%esi Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10d3f8: 83 fb 03 cmp $0x3,%ebx 10d3fb: 77 e8 ja 10d3e5 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10d3fd: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) ); #ifdef __cplusplus } #endif 10d404: 8b 11 mov (%ecx),%edx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10d406: 8b 02 mov (%edx),%eax 10d408: 85 c0 test %eax,%eax 10d40a: 74 06 je 10d412 <_Watchdog_Remove+0x42> next_watchdog->delta_interval += the_watchdog->delta_interval; 10d40c: 8b 41 10 mov 0x10(%ecx),%eax 10d40f: 01 42 10 add %eax,0x10(%edx) if ( _Watchdog_Sync_count ) 10d412: a1 60 fa 11 00 mov 0x11fa60,%eax 10d417: 85 c0 test %eax,%eax 10d419: 74 0a je 10d425 <_Watchdog_Remove+0x55> _Watchdog_Sync_level = _ISR_Nest_level; 10d41b: a1 98 f9 11 00 mov 0x11f998,%eax 10d420: a3 b8 f9 11 00 mov %eax,0x11f9b8 10d425: 8b 41 04 mov 0x4(%ecx),%eax 10d428: 89 42 04 mov %eax,0x4(%edx) 10d42b: 89 10 mov %edx,(%eax) 10d42d: eb b6 jmp 10d3e5 <_Watchdog_Remove+0x15> 10d42f: 90 nop /* * 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; 10d430: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) <== NOT EXECUTED 10d437: eb ac jmp 10d3e5 <_Watchdog_Remove+0x15> <== NOT EXECUTED =============================================================================== 0010d43c <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10d43c: 55 push %ebp 10d43d: 89 e5 mov %esp,%ebp 10d43f: 57 push %edi 10d440: 56 push %esi 10d441: 53 push %ebx 10d442: 83 ec 0c sub $0xc,%esp 10d445: 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 ); 10d448: 9c pushf 10d449: fa cli 10d44a: 5e pop %esi * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10d44b: 8b 17 mov (%edi),%edx * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 10d44d: 8d 47 04 lea 0x4(%edi),%eax 10d450: 89 45 f0 mov %eax,-0x10(%ebp) if ( _Chain_Is_empty( header ) ) 10d453: 39 c2 cmp %eax,%edx 10d455: 74 11 je 10d468 <_Watchdog_Tickle+0x2c> 10d457: 89 d3 mov %edx,%ebx * 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) { 10d459: 8b 42 10 mov 0x10(%edx),%eax 10d45c: 85 c0 test %eax,%eax 10d45e: 74 34 je 10d494 <_Watchdog_Tickle+0x58> <== NEVER TAKEN the_watchdog->delta_interval--; 10d460: 48 dec %eax 10d461: 89 42 10 mov %eax,0x10(%edx) if ( the_watchdog->delta_interval != 0 ) 10d464: 85 c0 test %eax,%eax 10d466: 74 2c je 10d494 <_Watchdog_Tickle+0x58> the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10d468: 56 push %esi 10d469: 9d popf } 10d46a: 8d 65 f4 lea -0xc(%ebp),%esp 10d46d: 5b pop %ebx 10d46e: 5e pop %esi 10d46f: 5f pop %edi 10d470: c9 leave 10d471: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10d472: 83 ec 08 sub $0x8,%esp 10d475: ff 73 24 pushl 0x24(%ebx) 10d478: ff 73 20 pushl 0x20(%ebx) 10d47b: ff 53 1c call *0x1c(%ebx) 10d47e: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10d481: 9c pushf 10d482: fa cli 10d483: 5e pop %esi 10d484: 8b 07 mov (%edi),%eax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10d486: 39 45 f0 cmp %eax,-0x10(%ebp) 10d489: 74 dd je 10d468 <_Watchdog_Tickle+0x2c> 10d48b: 89 c3 mov %eax,%ebx 10d48d: 8b 40 10 mov 0x10(%eax),%eax 10d490: 85 c0 test %eax,%eax 10d492: 75 d4 jne 10d468 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10d494: 83 ec 0c sub $0xc,%esp 10d497: 53 push %ebx 10d498: e8 33 ff ff ff call 10d3d0 <_Watchdog_Remove> _ISR_Enable( level ); 10d49d: 56 push %esi 10d49e: 9d popf switch( watchdog_state ) { 10d49f: 83 c4 10 add $0x10,%esp 10d4a2: 83 f8 02 cmp $0x2,%eax 10d4a5: 75 da jne 10d481 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10d4a7: eb c9 jmp 10d472 <_Watchdog_Tickle+0x36> =============================================================================== 0010d504 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 10d504: 55 push %ebp 10d505: 89 e5 mov %esp,%ebp 10d507: 57 push %edi 10d508: 83 ec 04 sub $0x4,%esp 10d50b: 8b 55 08 mov 0x8(%ebp),%edx uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 10d50e: 85 d2 test %edx,%edx 10d510: 74 2e je 10d540 <_Workspace_Handler_initialization+0x3c> 10d512: f6 c2 03 test $0x3,%dl 10d515: 75 29 jne 10d540 <_Workspace_Handler_initialization+0x3c><== NEVER TAKEN INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 10d517: a1 94 f9 11 00 mov 0x11f994,%eax 10d51c: 80 78 28 00 cmpb $0x0,0x28(%eax) 10d520: 75 2a jne 10d54c <_Workspace_Handler_initialization+0x48><== NEVER TAKEN memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10d522: 6a 04 push $0x4 10d524: ff 75 0c pushl 0xc(%ebp) 10d527: 52 push %edx 10d528: 68 20 f9 11 00 push $0x11f920 10d52d: e8 aa de ff ff call 10b3dc <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10d532: 83 c4 10 add $0x10,%esp 10d535: 85 c0 test %eax,%eax 10d537: 74 1e je 10d557 <_Workspace_Handler_initialization+0x53><== NEVER TAKEN _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10d539: 8b 7d fc mov -0x4(%ebp),%edi 10d53c: c9 leave 10d53d: c3 ret 10d53e: 66 90 xchg %ax,%ax ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 10d540: 51 push %ecx 10d541: 6a 02 push $0x2 10d543: 6a 01 push $0x1 10d545: 6a 00 push $0x0 10d547: e8 78 e0 ff ff call 10b5c4 <_Internal_error_Occurred> TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 10d54c: 31 c0 xor %eax,%eax 10d54e: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d550: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10d553: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED 10d555: eb cb jmp 10d522 <_Workspace_Handler_initialization+0x1e><== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10d557: 52 push %edx <== NOT EXECUTED 10d558: 6a 03 push $0x3 <== NOT EXECUTED 10d55a: 6a 01 push $0x1 <== NOT EXECUTED 10d55c: 6a 00 push $0x0 <== NOT EXECUTED 10d55e: e8 61 e0 ff ff call 10b5c4 <_Internal_error_Occurred><== NOT EXECUTED =============================================================================== 00109fe8 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 109fe8: 55 push %ebp 109fe9: 89 e5 mov %esp,%ebp 109feb: 57 push %edi 109fec: 56 push %esi 109fed: 53 push %ebx 109fee: 83 ec 1c sub $0x1c,%esp 109ff1: 8b 75 08 mov 0x8(%ebp),%esi 109ff4: 8b 7d 0c mov 0xc(%ebp),%edi long adjustment; /* * Simple validations */ if ( !delta ) 109ff7: 85 f6 test %esi,%esi 109ff9: 0f 84 22 01 00 00 je 10a121 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 109fff: 8b 56 04 mov 0x4(%esi),%edx 10a002: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10a008: 0f 87 13 01 00 00 ja 10a121 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10a00e: 85 ff test %edi,%edi 10a010: 74 10 je 10a022 olddelta->tv_sec = 0; 10a012: c7 07 00 00 00 00 movl $0x0,(%edi) olddelta->tv_usec = 0; 10a018: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) 10a01f: 8b 56 04 mov 0x4(%esi),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10a022: 8b 06 mov (%esi),%eax 10a024: 8d 04 80 lea (%eax,%eax,4),%eax 10a027: 8d 04 80 lea (%eax,%eax,4),%eax 10a02a: 8d 04 80 lea (%eax,%eax,4),%eax 10a02d: 8d 04 80 lea (%eax,%eax,4),%eax 10a030: 8d 04 80 lea (%eax,%eax,4),%eax 10a033: 8d 04 80 lea (%eax,%eax,4),%eax 10a036: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < _TOD_Microseconds_per_tick ) 10a039: 8d 04 02 lea (%edx,%eax,1),%eax 10a03c: 3b 05 e0 19 12 00 cmp 0x1219e0,%eax 10a042: 73 0c jae 10a050 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 10a044: 31 c0 xor %eax,%eax return 0; } 10a046: 8d 65 f4 lea -0xc(%ebp),%esp 10a049: 5b pop %ebx 10a04a: 5e pop %esi 10a04b: 5f pop %edi 10a04c: c9 leave 10a04d: c3 ret 10a04e: 66 90 xchg %ax,%ax /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a050: a1 18 18 12 00 mov 0x121818,%eax 10a055: 40 inc %eax 10a056: a3 18 18 12 00 mov %eax,0x121818 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10a05b: 83 ec 0c sub $0xc,%esp 10a05e: 8d 45 ec lea -0x14(%ebp),%eax 10a061: 50 push %eax 10a062: e8 dd 19 00 00 call 10ba44 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10a067: 8b 1e mov (%esi),%ebx 10a069: 03 5d ec add -0x14(%ebp),%ebx 10a06c: 89 5d ec mov %ebx,-0x14(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10a06f: 8b 46 04 mov 0x4(%esi),%eax 10a072: 8d 04 80 lea (%eax,%eax,4),%eax 10a075: 8d 04 80 lea (%eax,%eax,4),%eax 10a078: 8d 04 80 lea (%eax,%eax,4),%eax 10a07b: c1 e0 03 shl $0x3,%eax 10a07e: 03 45 f0 add -0x10(%ebp),%eax 10a081: 89 45 f0 mov %eax,-0x10(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10a084: 83 c4 10 add $0x10,%esp 10a087: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10a08c: 76 3f jbe 10a0cd ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10a08e: 8d 88 00 36 65 c4 lea -0x3b9aca00(%eax),%ecx int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10a094: 89 ca mov %ecx,%edx 10a096: c1 ea 09 shr $0x9,%edx 10a099: b8 83 4b 04 00 mov $0x44b83,%eax 10a09e: f7 e2 mul %edx 10a0a0: c1 ea 07 shr $0x7,%edx 10a0a3: 8d 44 1a 01 lea 0x1(%edx,%ebx,1),%eax 10a0a7: 89 45 ec mov %eax,-0x14(%ebp) 10a0aa: 8d 14 92 lea (%edx,%edx,4),%edx 10a0ad: 8d 14 92 lea (%edx,%edx,4),%edx 10a0b0: 8d 14 92 lea (%edx,%edx,4),%edx 10a0b3: 8d 14 92 lea (%edx,%edx,4),%edx 10a0b6: 8d 14 92 lea (%edx,%edx,4),%edx 10a0b9: 8d 14 92 lea (%edx,%edx,4),%edx 10a0bc: 8d 14 92 lea (%edx,%edx,4),%edx 10a0bf: 8d 14 92 lea (%edx,%edx,4),%edx 10a0c2: 8d 14 92 lea (%edx,%edx,4),%edx 10a0c5: c1 e2 09 shl $0x9,%edx 10a0c8: 29 d1 sub %edx,%ecx 10a0ca: 89 4d f0 mov %ecx,-0x10(%ebp) 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) ) { 10a0cd: 8b 55 f0 mov -0x10(%ebp),%edx 10a0d0: 81 fa 00 36 65 c4 cmp $0xc4653600,%edx 10a0d6: 77 19 ja 10a0f1 <== NEVER TAKEN 10a0d8: 8b 45 ec mov -0x14(%ebp),%eax 10a0db: 90 nop ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10a0dc: 81 c2 00 ca 9a 3b add $0x3b9aca00,%edx int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10a0e2: 48 dec %eax 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) ) { 10a0e3: 81 fa 00 36 65 c4 cmp $0xc4653600,%edx 10a0e9: 76 f1 jbe 10a0dc 10a0eb: 89 45 ec mov %eax,-0x14(%ebp) 10a0ee: 89 55 f0 mov %edx,-0x10(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10a0f1: 83 ec 0c sub $0xc,%esp 10a0f4: 8d 45 ec lea -0x14(%ebp),%eax 10a0f7: 50 push %eax 10a0f8: e8 d7 19 00 00 call 10bad4 <_TOD_Set> _Thread_Enable_dispatch(); 10a0fd: e8 5e 2a 00 00 call 10cb60 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10a102: 83 c4 10 add $0x10,%esp 10a105: 85 ff test %edi,%edi 10a107: 0f 84 37 ff ff ff je 10a044 <== NEVER TAKEN *olddelta = *delta; 10a10d: 8b 16 mov (%esi),%edx 10a10f: 8b 46 04 mov 0x4(%esi),%eax 10a112: 89 47 04 mov %eax,0x4(%edi) 10a115: 89 17 mov %edx,(%edi) 10a117: 31 c0 xor %eax,%eax return 0; } 10a119: 8d 65 f4 lea -0xc(%ebp),%esp 10a11c: 5b pop %ebx 10a11d: 5e pop %esi 10a11e: 5f pop %edi 10a11f: c9 leave 10a120: c3 ret */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 10a121: e8 42 74 00 00 call 111568 <__errno> 10a126: c7 00 16 00 00 00 movl $0x16,(%eax) 10a12c: b8 ff ff ff ff mov $0xffffffff,%eax 10a131: e9 10 ff ff ff jmp 10a046 =============================================================================== 0010bc58 : } unsigned int alarm( unsigned int seconds ) { 10bc58: 55 push %ebp 10bc59: 89 e5 mov %esp,%ebp 10bc5b: 53 push %ebx 10bc5c: 83 ec 14 sub $0x14,%esp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10bc5f: a1 fc 50 12 00 mov 0x1250fc,%eax 10bc64: 85 c0 test %eax,%eax 10bc66: 74 68 je 10bcd0 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 10bc68: 83 ec 0c sub $0xc,%esp 10bc6b: 68 e0 50 12 00 push $0x1250e0 10bc70: e8 b7 48 00 00 call 11052c <_Watchdog_Remove> 10bc75: 83 c4 10 add $0x10,%esp 10bc78: 83 e8 02 sub $0x2,%eax 10bc7b: 83 f8 01 cmp $0x1,%eax 10bc7e: 77 4c ja 10bccc <== NEVER TAKEN * 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 - 10bc80: 8b 0d f8 50 12 00 mov 0x1250f8,%ecx 10bc86: 2b 0d f4 50 12 00 sub 0x1250f4,%ecx 10bc8c: b8 40 42 0f 00 mov $0xf4240,%eax 10bc91: 31 d2 xor %edx,%edx 10bc93: f7 35 a0 53 12 00 divl 0x1253a0 10bc99: 89 c3 mov %eax,%ebx 10bc9b: 89 c8 mov %ecx,%eax 10bc9d: 31 d2 xor %edx,%edx 10bc9f: f7 f3 div %ebx 10bca1: 8b 1d ec 50 12 00 mov 0x1250ec,%ebx 10bca7: 29 c3 sub %eax,%ebx * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. */ bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, 10bca9: 8b 45 08 mov 0x8(%ebp),%eax 10bcac: a3 ec 50 12 00 mov %eax,0x1250ec size_t size ); 10bcb1: 83 ec 08 sub $0x8,%esp 10bcb4: 68 e0 50 12 00 push $0x1250e0 10bcb9: 68 b0 52 12 00 push $0x1252b0 10bcbe: e8 39 47 00 00 call 1103fc <_Watchdog_Insert> } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 10bcc3: 89 d8 mov %ebx,%eax 10bcc5: 8b 5d fc mov -0x4(%ebp),%ebx 10bcc8: c9 leave 10bcc9: c3 ret 10bcca: 66 90 xchg %ax,%ax */ if ( !the_timer->routine ) { _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 10bccc: 31 db xor %ebx,%ebx 10bcce: eb d9 jmp 10bca9 <== NOT EXECUTED * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10bcd0: c7 05 e8 50 12 00 00 movl $0x0,0x1250e8 10bcd7: 00 00 00 * @param[in] the_heap is the heap to operate upon 10bcda: c7 05 fc 50 12 00 fc movl $0x10bcfc,0x1250fc 10bce1: bc 10 00 * @param[in] starting_address is the starting address of the memory for 10bce4: c7 05 00 51 12 00 00 movl $0x0,0x125100 10bceb: 00 00 00 * the heap 10bcee: c7 05 04 51 12 00 00 movl $0x0,0x125104 10bcf5: 00 00 00 10bcf8: 31 db xor %ebx,%ebx 10bcfa: eb ad jmp 10bca9 =============================================================================== 0010aae0 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10aae0: 55 push %ebp 10aae1: 89 e5 mov %esp,%ebp 10aae3: 83 ec 08 sub $0x8,%esp 10aae6: 8b 45 08 mov 0x8(%ebp),%eax 10aae9: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10aaec: 85 d2 test %edx,%edx 10aaee: 74 14 je 10ab04 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) 10aaf0: 83 f8 01 cmp $0x1,%eax 10aaf3: 74 47 je 10ab3c _TOD_Get(tp); #ifdef CLOCK_MONOTONIC else if ( clock_id == CLOCK_MONOTONIC ) 10aaf5: 83 f8 04 cmp $0x4,%eax 10aaf8: 74 1e je 10ab18 <== NEVER TAKEN _TOD_Get_uptime(tp); #endif #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10aafa: 83 f8 02 cmp $0x2,%eax 10aafd: 74 19 je 10ab18 _TOD_Get_uptime(tp); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10aaff: 83 f8 03 cmp $0x3,%eax 10ab02: 74 24 je 10ab28 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10ab04: e8 63 7b 00 00 call 11266c <__errno> 10ab09: c7 00 16 00 00 00 movl $0x16,(%eax) 10ab0f: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10ab14: c9 leave 10ab15: c3 ret 10ab16: 66 90 xchg %ax,%ax else if ( clock_id == CLOCK_MONOTONIC ) _TOD_Get_uptime(tp); #endif #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) _TOD_Get_uptime(tp); 10ab18: 83 ec 0c sub $0xc,%esp 10ab1b: 52 push %edx 10ab1c: e8 df 23 00 00 call 10cf00 <_TOD_Get_uptime> 10ab21: 31 c0 xor %eax,%eax 10ab23: 83 c4 10 add $0x10,%esp #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10ab26: c9 leave 10ab27: c3 ret else if ( clock_id == CLOCK_PROCESS_CPUTIME ) _TOD_Get_uptime(tp); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10ab28: e8 3f 7b 00 00 call 11266c <__errno> 10ab2d: c7 00 58 00 00 00 movl $0x58,(%eax) 10ab33: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10ab38: c9 leave 10ab39: c3 ret 10ab3a: 66 90 xchg %ax,%ax { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) _TOD_Get(tp); 10ab3c: 83 ec 0c sub $0xc,%esp 10ab3f: 52 push %edx 10ab40: e8 67 23 00 00 call 10ceac <_TOD_Get> 10ab45: 31 c0 xor %eax,%eax 10ab47: 83 c4 10 add $0x10,%esp #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10ab4a: c9 leave 10ab4b: c3 ret =============================================================================== 0010ab4c : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 10ab4c: 55 push %ebp 10ab4d: 89 e5 mov %esp,%ebp 10ab4f: 83 ec 08 sub $0x8,%esp 10ab52: 8b 45 08 mov 0x8(%ebp),%eax 10ab55: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10ab58: 85 d2 test %edx,%edx 10ab5a: 74 0f je 10ab6b <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10ab5c: 83 f8 01 cmp $0x1,%eax 10ab5f: 74 33 je 10ab94 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10ab61: 83 f8 02 cmp $0x2,%eax 10ab64: 74 1a je 10ab80 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10ab66: 83 f8 03 cmp $0x3,%eax 10ab69: 74 15 je 10ab80 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10ab6b: e8 fc 7a 00 00 call 11266c <__errno> 10ab70: c7 00 16 00 00 00 movl $0x16,(%eax) 10ab76: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10ab7b: c9 leave 10ab7c: c3 ret 10ab7d: 8d 76 00 lea 0x0(%esi),%esi else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10ab80: e8 e7 7a 00 00 call 11266c <__errno> 10ab85: c7 00 58 00 00 00 movl $0x58,(%eax) 10ab8b: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10ab90: c9 leave 10ab91: c3 ret 10ab92: 66 90 xchg %ax,%ax { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 10ab94: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 10ab9a: 76 cf jbe 10ab6b /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10ab9c: a1 f8 26 12 00 mov 0x1226f8,%eax 10aba1: 40 inc %eax 10aba2: a3 f8 26 12 00 mov %eax,0x1226f8 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 10aba7: 83 ec 0c sub $0xc,%esp 10abaa: 52 push %edx 10abab: e8 e0 23 00 00 call 10cf90 <_TOD_Set> _Thread_Enable_dispatch(); 10abb0: e8 67 34 00 00 call 10e01c <_Thread_Enable_dispatch> 10abb5: 31 c0 xor %eax,%eax 10abb7: 83 c4 10 add $0x10,%esp #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10abba: c9 leave 10abbb: c3 ret =============================================================================== 0011a0d0 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 11a0d0: 55 push %ebp 11a0d1: 89 e5 mov %esp,%ebp 11a0d3: 57 push %edi 11a0d4: 56 push %esi 11a0d5: 53 push %ebx 11a0d6: 83 ec 2c sub $0x2c,%esp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 11a0d9: e8 1e fc ff ff call 119cfc 11a0de: 3b 45 08 cmp 0x8(%ebp),%eax 11a0e1: 0f 85 85 02 00 00 jne 11a36c <== NEVER TAKEN /* * Validate the signal passed. */ if ( !sig ) 11a0e7: 8b 5d 0c mov 0xc(%ebp),%ebx 11a0ea: 85 db test %ebx,%ebx 11a0ec: 0f 84 92 02 00 00 je 11a384 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 11a0f2: 8b 4d 0c mov 0xc(%ebp),%ecx 11a0f5: 49 dec %ecx 11a0f6: 83 f9 1f cmp $0x1f,%ecx 11a0f9: 0f 87 85 02 00 00 ja 11a384 <== NEVER TAKEN /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 11a0ff: 8b 55 0c mov 0xc(%ebp),%edx 11a102: 8d 04 52 lea (%edx,%edx,2),%eax 11a105: 83 3c 85 88 bf 12 00 cmpl $0x1,0x12bf88(,%eax,4) 11a10c: 01 11a10d: 0f 84 e4 00 00 00 je 11a1f7 * 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 ) ) 11a113: 83 7d 0c 08 cmpl $0x8,0xc(%ebp) 11a117: 0f 84 e7 00 00 00 je 11a204 11a11d: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 11a121: 0f 84 dd 00 00 00 je 11a204 11a127: 83 7d 0c 0b cmpl $0xb,0xc(%ebp) 11a12b: 0f 84 d3 00 00 00 je 11a204 return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 11a131: be 01 00 00 00 mov $0x1,%esi 11a136: d3 e6 shl %cl,%esi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 11a138: 8b 45 0c mov 0xc(%ebp),%eax 11a13b: 89 45 e8 mov %eax,-0x18(%ebp) siginfo->si_code = SI_USER; 11a13e: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp) if ( !value ) { 11a145: 8b 4d 10 mov 0x10(%ebp),%ecx 11a148: 85 c9 test %ecx,%ecx 11a14a: 0f 84 fc 01 00 00 je 11a34c siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 11a150: 8b 55 10 mov 0x10(%ebp),%edx 11a153: 8b 02 mov (%edx),%eax 11a155: 89 45 f0 mov %eax,-0x10(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11a158: a1 f8 b8 12 00 mov 0x12b8f8,%eax 11a15d: 40 inc %eax 11a15e: a3 f8 b8 12 00 mov %eax,0x12b8f8 /* * 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; 11a163: 8b 0d bc b9 12 00 mov 0x12b9bc,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 11a169: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 11a16f: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 11a175: f7 d0 not %eax 11a177: 85 c6 test %eax,%esi 11a179: 75 38 jne 11a1b3 goto process_it; 11a17b: bf 20 c1 12 00 mov $0x12c120,%edi index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 11a180: 8b 17 mov (%edi),%edx _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); } 11a182: 8d 5f 04 lea 0x4(%edi),%ebx !_Chain_Is_tail( the_chain, the_node ) ; 11a185: 39 da cmp %ebx,%edx 11a187: 75 1d jne 11a1a6 11a189: e9 da 00 00 00 jmp 11a268 11a18e: 66 90 xchg %ax,%ax the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 11a190: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax <== NOT EXECUTED 11a196: f7 d0 not %eax <== NOT EXECUTED 11a198: 85 c6 test %eax,%esi <== NOT EXECUTED 11a19a: 75 17 jne 11a1b3 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 11a19c: 8b 12 mov (%edx),%edx <== NOT EXECUTED index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 11a19e: 39 da cmp %ebx,%edx <== NOT EXECUTED 11a1a0: 0f 84 c2 00 00 00 je 11a268 <== NOT EXECUTED the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 11a1a6: 89 d1 mov %edx,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11a1a8: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 11a1ae: 85 72 30 test %esi,0x30(%edx) 11a1b1: 74 dd je 11a190 <== NEVER TAKEN * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 11a1b3: c6 41 75 01 movb $0x1,0x75(%ecx) /* * 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 ) ) { 11a1b7: 50 push %eax 11a1b8: 8d 45 e8 lea -0x18(%ebp),%eax 11a1bb: 50 push %eax 11a1bc: ff 75 0c pushl 0xc(%ebp) 11a1bf: 51 push %ecx 11a1c0: e8 0f 02 00 00 call 11a3d4 <_POSIX_signals_Unblock_thread> 11a1c5: 83 c4 10 add $0x10,%esp 11a1c8: 84 c0 test %al,%al 11a1ca: 0f 85 8c 00 00 00 jne 11a25c /* * 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 ); 11a1d0: 83 ec 0c sub $0xc,%esp 11a1d3: 56 push %esi 11a1d4: e8 d7 01 00 00 call 11a3b0 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 11a1d9: 8b 55 0c mov 0xc(%ebp),%edx 11a1dc: 8d 04 52 lea (%edx,%edx,2),%eax 11a1df: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx 11a1e6: 83 c4 10 add $0x10,%esp 11a1e9: 83 bb 80 bf 12 00 02 cmpl $0x2,0x12bf80(%ebx) 11a1f0: 74 2e je 11a220 psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); 11a1f2: e8 65 36 ff ff call 10d85c <_Thread_Enable_dispatch> 11a1f7: 31 c0 xor %eax,%eax return 0; } 11a1f9: 8d 65 f4 lea -0xc(%ebp),%esp 11a1fc: 5b pop %ebx 11a1fd: 5e pop %esi 11a1fe: 5f pop %edi 11a1ff: c9 leave 11a200: c3 ret 11a201: 8d 76 00 lea 0x0(%esi),%esi * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 11a204: e8 a7 03 00 00 call 11a5b0 11a209: 83 ec 08 sub $0x8,%esp 11a20c: ff 75 0c pushl 0xc(%ebp) 11a20f: 50 push %eax 11a210: e8 db 02 00 00 call 11a4f0 11a215: 83 c4 10 add $0x10,%esp _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 11a218: 8d 65 f4 lea -0xc(%ebp),%esp 11a21b: 5b pop %ebx 11a21c: 5e pop %esi 11a21d: 5f pop %edi 11a21e: c9 leave 11a21f: c3 ret _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 11a220: 83 ec 0c sub $0xc,%esp 11a223: 68 00 c1 12 00 push $0x12c100 11a228: e8 c3 1e ff ff call 10c0f0 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 11a22d: 83 c4 10 add $0x10,%esp 11a230: 85 c0 test %eax,%eax 11a232: 0f 84 61 01 00 00 je 11a399 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 11a238: 8d 78 08 lea 0x8(%eax),%edi 11a23b: 8d 75 e8 lea -0x18(%ebp),%esi 11a23e: b9 03 00 00 00 mov $0x3,%ecx 11a243: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 11a245: 83 ec 08 sub $0x8,%esp 11a248: 50 push %eax 11a249: 8d 83 80 c1 12 00 lea 0x12c180(%ebx),%eax 11a24f: 50 push %eax 11a250: e8 77 1e ff ff call 10c0cc <_Chain_Append> 11a255: 83 c4 10 add $0x10,%esp 11a258: eb 98 jmp 11a1f2 11a25a: 66 90 xchg %ax,%ax * 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 ) ) { _Thread_Enable_dispatch(); 11a25c: e8 fb 35 ff ff call 10d85c <_Thread_Enable_dispatch> 11a261: 31 c0 xor %eax,%eax 11a263: eb b3 jmp 11a218 11a265: 8d 76 00 lea 0x0(%esi),%esi index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 11a268: 83 c7 0c add $0xc,%edi */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 11a26b: 81 ff 50 c1 12 00 cmp $0x12c150,%edi 11a271: 0f 85 09 ff ff ff jne 11a180 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 11a277: 0f b6 05 54 f5 11 00 movzbl 0x11f554,%eax 11a27e: 8d 78 01 lea 0x1(%eax),%edi 11a281: c7 45 d4 02 00 00 00 movl $0x2,-0x2c(%ebp) 11a288: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 11a28f: 8b 55 d4 mov -0x2c(%ebp),%edx 11a292: 8b 04 95 cc b8 12 00 mov 0x12b8cc(,%edx,4),%eax 11a299: 85 c0 test %eax,%eax 11a29b: 0f 84 93 00 00 00 je 11a334 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 11a2a1: 8b 40 04 mov 0x4(%eax),%eax /* * This cannot happen in the current (as of Dec 2007) implementation * of initialization but at some point, the object information * structure for a particular manager may not be installed. */ if ( !the_info ) 11a2a4: 85 c0 test %eax,%eax 11a2a6: 0f 84 88 00 00 00 je 11a334 <== NEVER TAKEN continue; maximum = the_info->maximum; 11a2ac: 0f b7 50 10 movzwl 0x10(%eax),%edx 11a2b0: 89 55 d8 mov %edx,-0x28(%ebp) object_table = the_info->local_table; 11a2b3: 8b 40 1c mov 0x1c(%eax),%eax 11a2b6: 89 45 dc mov %eax,-0x24(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 11a2b9: 85 d2 test %edx,%edx 11a2bb: 74 77 je 11a334 11a2bd: b9 01 00 00 00 mov $0x1,%ecx the_thread = (Thread_Control *) object_table[ index ]; 11a2c2: 8b 45 dc mov -0x24(%ebp),%eax 11a2c5: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 11a2c8: 85 d2 test %edx,%edx 11a2ca: 74 50 je 11a31c <== NEVER TAKEN /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 11a2cc: 8b 5a 14 mov 0x14(%edx),%ebx 11a2cf: 39 fb cmp %edi,%ebx 11a2d1: 77 49 ja 11a31c <== NEVER TAKEN /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11a2d3: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 11a2d9: 85 c0 test %eax,%eax 11a2db: 74 3f je 11a31c <== NEVER TAKEN 11a2dd: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 11a2e3: f7 d0 not %eax 11a2e5: 85 c6 test %eax,%esi 11a2e7: 74 33 je 11a31c * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 11a2e9: 39 fb cmp %edi,%ebx 11a2eb: 72 17 jb 11a304 <== ALWAYS TAKEN * Now the thread and the interested thread have the same priority. * If the interested thread is ready, then we don't need to send it * to a blocked thread. */ if ( _States_Is_ready( interested_thread->current_state ) ) 11a2ed: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 11a2f0: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 11a2f3: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 11a2f6: 85 c0 test %eax,%eax <== NOT EXECUTED 11a2f8: 74 22 je 11a31c <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 11a2fa: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED 11a2fd: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 11a300: 85 c0 test %eax,%eax <== NOT EXECUTED 11a302: 75 54 jne 11a358 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 11a304: 89 55 e0 mov %edx,-0x20(%ebp) continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11a307: 41 inc %ecx 11a308: 39 4d d8 cmp %ecx,-0x28(%ebp) 11a30b: 72 17 jb 11a324 <== NEVER TAKEN 11a30d: 8d 76 00 lea 0x0(%esi),%esi 11a310: 89 df mov %ebx,%edi the_thread = (Thread_Control *) object_table[ index ]; 11a312: 8b 45 dc mov -0x24(%ebp),%eax 11a315: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 11a318: 85 d2 test %edx,%edx 11a31a: 75 b0 jne 11a2cc * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 11a31c: 89 fb mov %edi,%ebx continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11a31e: 41 inc %ecx 11a31f: 39 4d d8 cmp %ecx,-0x28(%ebp) 11a322: 73 ec jae 11a310 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 11a324: ff 45 d4 incl -0x2c(%ebp) interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 11a327: 83 7d d4 05 cmpl $0x5,-0x2c(%ebp) 11a32b: 74 0b je 11a338 11a32d: 89 df mov %ebx,%edi 11a32f: e9 5b ff ff ff jmp 11a28f continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11a334: 89 fb mov %edi,%ebx 11a336: eb ec jmp 11a324 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 11a338: 8b 55 e0 mov -0x20(%ebp),%edx 11a33b: 85 d2 test %edx,%edx 11a33d: 0f 84 8d fe ff ff je 11a1d0 11a343: 8b 4d e0 mov -0x20(%ebp),%ecx 11a346: e9 68 fe ff ff jmp 11a1b3 11a34b: 90 nop siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 11a34c: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 11a353: e9 00 fe ff ff jmp 11a158 * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 11a358: f7 45 cc 00 00 00 10 testl $0x10000000,-0x34(%ebp) <== NOT EXECUTED 11a35f: 75 bb jne 11a31c <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 11a361: a9 00 00 00 10 test $0x10000000,%eax <== NOT EXECUTED 11a366: 75 9c jne 11a304 <== NOT EXECUTED 11a368: 89 fb mov %edi,%ebx <== NOT EXECUTED 11a36a: eb b2 jmp 11a31e <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 11a36c: e8 ef 7f ff ff call 112360 <__errno> <== NOT EXECUTED 11a371: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 11a377: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11a37c: e9 97 fe ff ff jmp 11a218 <== NOT EXECUTED 11a381: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 11a384: e8 d7 7f ff ff call 112360 <__errno> <== NOT EXECUTED 11a389: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11a38f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11a394: e9 7f fe ff ff jmp 11a218 <== NOT EXECUTED if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 11a399: e8 c2 7f ff ff call 112360 <__errno> <== NOT EXECUTED 11a39e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 11a3a4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11a3a9: e9 6a fe ff ff jmp 11a218 <== NOT EXECUTED =============================================================================== 0010dabc : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10dabc: 55 push %ebp 10dabd: 89 e5 mov %esp,%ebp 10dabf: 57 push %edi 10dac0: 56 push %esi 10dac1: 53 push %ebx 10dac2: 83 ec 1c sub $0x1c,%esp 10dac5: 8b 5d 0c mov 0xc(%ebp),%ebx /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10dac8: a1 58 7c 12 00 mov 0x127c58,%eax 10dacd: 40 inc %eax 10dace: a3 58 7c 12 00 mov %eax,0x127c58 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10dad3: 89 d8 mov %ebx,%eax 10dad5: 25 00 02 00 00 and $0x200,%eax 10dada: 89 45 dc mov %eax,-0x24(%ebp) 10dadd: 0f 85 c5 00 00 00 jne 10dba8 10dae3: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 10daea: 83 ec 0c sub $0xc,%esp 10daed: 68 c0 81 12 00 push $0x1281c0 10daf2: e8 49 2e 00 00 call 110940 <_Objects_Allocate> 10daf7: 89 c6 mov %eax,%esi attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 10daf9: 83 c4 10 add $0x10,%esp 10dafc: 85 c0 test %eax,%eax 10dafe: 0f 84 b0 00 00 00 je 10dbb4 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10db04: 89 58 14 mov %ebx,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10db07: 83 ec 08 sub $0x8,%esp 10db0a: 8d 45 f0 lea -0x10(%ebp),%eax 10db0d: 50 push %eax 10db0e: ff 75 08 pushl 0x8(%ebp) 10db11: e8 de 68 00 00 call 1143f4 <_POSIX_Message_queue_Name_to_id> 10db16: 89 c7 mov %eax,%edi * 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 ) { 10db18: 83 c4 10 add $0x10,%esp 10db1b: 85 c0 test %eax,%eax 10db1d: 74 35 je 10db54 /* * 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) ) ) { 10db1f: 83 f8 02 cmp $0x2,%eax 10db22: 0f 84 dc 00 00 00 je 10dc04 * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure 10db28: 83 ec 08 sub $0x8,%esp 10db2b: 56 push %esi 10db2c: 68 c0 81 12 00 push $0x1281c0 10db31: e8 ca 31 00 00 call 110d00 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10db36: e8 91 3b 00 00 call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10db3b: e8 90 8a 00 00 call 1165d0 <__errno> 10db40: 89 38 mov %edi,(%eax) 10db42: b8 ff ff ff ff mov $0xffffffff,%eax 10db47: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10db4a: 8d 65 f4 lea -0xc(%ebp),%esp 10db4d: 5b pop %ebx 10db4e: 5e pop %esi 10db4f: 5f pop %edi 10db50: c9 leave 10db51: c3 ret 10db52: 66 90 xchg %ax,%ax /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10db54: 81 e3 00 0a 00 00 and $0xa00,%ebx 10db5a: 81 fb 00 0a 00 00 cmp $0xa00,%ebx 10db60: 74 72 je 10dbd4 /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. * Any other value of @a alignment is taken "as is", i.e., even odd 10db62: 50 push %eax 10db63: 8d 45 e8 lea -0x18(%ebp),%eax 10db66: 50 push %eax 10db67: ff 75 f0 pushl -0x10(%ebp) 10db6a: 68 20 80 12 00 push $0x128020 10db6f: e8 c0 32 00 00 call 110e34 <_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 ); 10db74: 89 45 ec mov %eax,-0x14(%ebp) the_mq->open_count += 1; 10db77: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10db7a: 89 46 10 mov %eax,0x10(%esi) 10db7d: 0f b7 56 08 movzwl 0x8(%esi),%edx 10db81: a1 dc 81 12 00 mov 0x1281dc,%eax 10db86: 89 34 90 mov %esi,(%eax,%edx,4) 10db89: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10db90: e8 37 3b 00 00 call 1116cc <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10db95: e8 32 3b 00 00 call 1116cc <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10db9a: 8b 46 08 mov 0x8(%esi),%eax 10db9d: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10dba0: 8d 65 f4 lea -0xc(%ebp),%esp 10dba3: 5b pop %ebx 10dba4: 5e pop %esi 10dba5: 5f pop %edi 10dba6: c9 leave 10dba7: c3 ret _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 10dba8: 8b 45 14 mov 0x14(%ebp),%eax 10dbab: 89 45 e0 mov %eax,-0x20(%ebp) 10dbae: e9 37 ff ff ff jmp 10daea 10dbb3: 90 nop va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10dbb4: e8 13 3b 00 00 call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10dbb9: e8 12 8a 00 00 call 1165d0 <__errno> 10dbbe: c7 00 17 00 00 00 movl $0x17,(%eax) 10dbc4: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10dbc9: 8d 65 f4 lea -0xc(%ebp),%esp 10dbcc: 5b pop %ebx 10dbcd: 5e pop %esi 10dbce: 5f pop %edi 10dbcf: c9 leave 10dbd0: c3 ret 10dbd1: 8d 76 00 lea 0x0(%esi),%esi * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure 10dbd4: 83 ec 08 sub $0x8,%esp 10dbd7: 56 push %esi 10dbd8: 68 c0 81 12 00 push $0x1281c0 10dbdd: e8 1e 31 00 00 call 110d00 <_Objects_Free> * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10dbe2: e8 e5 3a 00 00 call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10dbe7: e8 e4 89 00 00 call 1165d0 <__errno> 10dbec: c7 00 11 00 00 00 movl $0x11,(%eax) 10dbf2: b8 ff ff ff ff mov $0xffffffff,%eax 10dbf7: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10dbfa: 8d 65 f4 lea -0xc(%ebp),%esp 10dbfd: 5b pop %ebx 10dbfe: 5e pop %esi 10dbff: 5f pop %edi 10dc00: c9 leave 10dc01: c3 ret 10dc02: 66 90 xchg %ax,%ax /* * 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) ) ) { 10dc04: 8b 55 dc mov -0x24(%ebp),%edx 10dc07: 85 d2 test %edx,%edx 10dc09: 0f 84 19 ff ff ff je 10db28 /* * 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( 10dc0f: 8d 45 ec lea -0x14(%ebp),%eax 10dc12: 50 push %eax 10dc13: ff 75 e0 pushl -0x20(%ebp) 10dc16: 6a 01 push $0x1 10dc18: ff 75 08 pushl 0x8(%ebp) 10dc1b: e8 24 66 00 00 call 114244 <_POSIX_Message_queue_Create_support> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10dc20: 83 c4 10 add $0x10,%esp 10dc23: 40 inc %eax 10dc24: 75 22 jne 10dc48 _Thread_Enable_dispatch(); 10dc26: e8 a1 3a 00 00 call 1116cc <_Thread_Enable_dispatch> 10dc2b: 83 ec 08 sub $0x8,%esp 10dc2e: 56 push %esi 10dc2f: 68 c0 81 12 00 push $0x1281c0 10dc34: e8 c7 30 00 00 call 110d00 <_Objects_Free> 10dc39: b8 ff ff ff ff mov $0xffffffff,%eax 10dc3e: 83 c4 10 add $0x10,%esp 10dc41: e9 04 ff ff ff jmp 10db4a 10dc46: 66 90 xchg %ax,%ax _POSIX_Message_queue_Free_fd( the_mq_fd ); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10dc48: 8b 45 ec mov -0x14(%ebp),%eax 10dc4b: 89 46 10 mov %eax,0x10(%esi) 10dc4e: 0f b7 56 08 movzwl 0x8(%esi),%edx 10dc52: a1 dc 81 12 00 mov 0x1281dc,%eax 10dc57: 89 34 90 mov %esi,(%eax,%edx,4) 10dc5a: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10dc61: e8 66 3a 00 00 call 1116cc <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10dc66: 8b 46 08 mov 0x8(%esi),%eax 10dc69: e9 dc fe ff ff jmp 10db4a =============================================================================== 0010dec8 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10dec8: 55 push %ebp 10dec9: 89 e5 mov %esp,%ebp 10decb: 56 push %esi 10decc: 53 push %ebx 10decd: 83 ec 10 sub $0x10,%esp 10ded0: 8b 75 0c mov 0xc(%ebp),%esi 10ded3: 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 ) 10ded6: 85 f6 test %esi,%esi 10ded8: 74 64 je 10df3e 10deda: 52 push %edx 10dedb: 8d 45 f4 lea -0xc(%ebp),%eax 10dede: 50 push %eax 10dedf: ff 75 08 pushl 0x8(%ebp) 10dee2: 68 c0 81 12 00 push $0x1281c0 10dee7: e8 48 2f 00 00 call 110e34 <_Objects_Get> 10deec: 89 c1 mov %eax,%ecx rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10deee: 83 c4 10 add $0x10,%esp 10def1: 8b 45 f4 mov -0xc(%ebp),%eax 10def4: 85 c0 test %eax,%eax 10def6: 75 34 jne 10df2c case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10def8: 8b 51 10 mov 0x10(%ecx),%edx /* * Return the old values. */ if ( omqstat ) { 10defb: 85 db test %ebx,%ebx 10defd: 74 17 je 10df16 omqstat->mq_flags = the_mq_fd->oflag; 10deff: 8b 41 14 mov 0x14(%ecx),%eax 10df02: 89 03 mov %eax,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10df04: 8b 42 68 mov 0x68(%edx),%eax 10df07: 89 43 08 mov %eax,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10df0a: 8b 42 60 mov 0x60(%edx),%eax 10df0d: 89 43 04 mov %eax,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10df10: 8b 42 64 mov 0x64(%edx),%eax 10df13: 89 43 0c mov %eax,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10df16: 8b 06 mov (%esi),%eax 10df18: 89 41 14 mov %eax,0x14(%ecx) _Thread_Enable_dispatch(); 10df1b: e8 ac 37 00 00 call 1116cc <_Thread_Enable_dispatch> 10df20: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10df22: 8d 65 f8 lea -0x8(%ebp),%esp 10df25: 5b pop %ebx 10df26: 5e pop %esi 10df27: c9 leave 10df28: c3 ret 10df29: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10df2c: e8 9f 86 00 00 call 1165d0 <__errno> 10df31: c7 00 09 00 00 00 movl $0x9,(%eax) 10df37: b8 ff ff ff ff mov $0xffffffff,%eax 10df3c: eb e4 jmp 10df22 POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 10df3e: e8 8d 86 00 00 call 1165d0 <__errno> 10df43: c7 00 16 00 00 00 movl $0x16,(%eax) 10df49: b8 ff ff ff ff mov $0xffffffff,%eax 10df4e: eb d2 jmp 10df22 =============================================================================== 0010dfc8 : */ int mq_unlink( const char *name ) { 10dfc8: 55 push %ebp 10dfc9: 89 e5 mov %esp,%ebp 10dfcb: 53 push %ebx 10dfcc: 83 ec 1c sub $0x1c,%esp /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10dfcf: a1 58 7c 12 00 mov 0x127c58,%eax 10dfd4: 40 inc %eax 10dfd5: a3 58 7c 12 00 mov %eax,0x127c58 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 ); 10dfda: 8d 45 f8 lea -0x8(%ebp),%eax 10dfdd: 50 push %eax 10dfde: ff 75 08 pushl 0x8(%ebp) 10dfe1: e8 0e 64 00 00 call 1143f4 <_POSIX_Message_queue_Name_to_id> 10dfe6: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10dfe8: 83 c4 10 add $0x10,%esp 10dfeb: 85 c0 test %eax,%eax 10dfed: 75 45 jne 10e034 <== NEVER TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 10dfef: 8b 45 f8 mov -0x8(%ebp),%eax bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 10dff2: 66 3b 05 30 80 12 00 cmp 0x128030,%ax 10dff9: 77 35 ja 10e030 <== NEVER TAKEN 10dffb: 0f b7 d0 movzwl %ax,%edx 10dffe: a1 3c 80 12 00 mov 0x12803c,%eax 10e003: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = FALSE; 10e006: c6 43 15 00 movb $0x0,0x15(%ebx) /** * This function attempts to allocate a block of @a size bytes from * @a the_heap. If insufficient memory is free in @a the_heap to allocate * a block of the requested size, then NULL is returned. * 10e00a: 83 ec 08 sub $0x8,%esp 10e00d: 53 push %ebx 10e00e: 68 20 80 12 00 push $0x128020 10e013: e8 40 2f 00 00 call 110f58 <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 10e018: 89 1c 24 mov %ebx,(%esp) 10e01b: e8 e4 f8 ff ff call 10d904 <_POSIX_Message_queue_Delete> _Thread_Enable_dispatch(); 10e020: e8 a7 36 00 00 call 1116cc <_Thread_Enable_dispatch> 10e025: 31 c0 xor %eax,%eax 10e027: 83 c4 10 add $0x10,%esp return 0; } 10e02a: 8b 5d fc mov -0x4(%ebp),%ebx 10e02d: c9 leave 10e02e: c3 ret 10e02f: 90 nop bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 10e030: 31 db xor %ebx,%ebx 10e032: eb d2 jmp 10e006 <== NOT EXECUTED _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); 10e034: e8 93 36 00 00 call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10e039: e8 92 85 00 00 call 1165d0 <__errno> 10e03e: 89 18 mov %ebx,(%eax) 10e040: b8 ff ff ff ff mov $0xffffffff,%eax 10e045: eb e3 jmp 10e02a =============================================================================== 0010f260 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 10f260: 55 push %ebp 10f261: 89 e5 mov %esp,%ebp 10f263: 56 push %esi 10f264: 53 push %ebx 10f265: 8b 5d 08 mov 0x8(%ebp),%ebx 10f268: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 10f26b: 83 ec 0c sub $0xc,%esp 10f26e: 53 push %ebx 10f26f: e8 d8 12 00 00 call 11054c <_Timespec_Is_valid> 10f274: 83 c4 10 add $0x10,%esp 10f277: 84 c0 test %al,%al 10f279: 0f 84 e1 00 00 00 je 10f360 * 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 ) 10f27f: 8b 03 mov (%ebx),%eax 10f281: 85 c0 test %eax,%eax 10f283: 0f 88 d7 00 00 00 js 10f360 <== NEVER TAKEN 10f289: 8b 43 04 mov 0x4(%ebx),%eax 10f28c: 85 c0 test %eax,%eax 10f28e: 0f 88 cc 00 00 00 js 10f360 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 10f294: 83 ec 0c sub $0xc,%esp 10f297: 53 push %ebx 10f298: e8 d7 12 00 00 call 110574 <_Timespec_To_ticks> 10f29d: 89 c3 mov %eax,%ebx * 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 ) { 10f29f: 83 c4 10 add $0x10,%esp 10f2a2: 85 c0 test %eax,%eax 10f2a4: 75 36 jne 10f2dc /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10f2a6: a1 98 00 12 00 mov 0x120098,%eax 10f2ab: 40 inc %eax 10f2ac: a3 98 00 12 00 mov %eax,0x120098 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 10f2b1: e8 ba e0 ff ff call 10d370 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 10f2b6: e8 ed d4 ff ff call 10c7a8 <_Thread_Enable_dispatch> if ( rmtp ) { 10f2bb: 85 f6 test %esi,%esi 10f2bd: 0f 84 92 00 00 00 je 10f355 <== NEVER TAKEN rmtp->tv_sec = 0; 10f2c3: c7 06 00 00 00 00 movl $0x0,(%esi) rmtp->tv_nsec = 0; 10f2c9: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10f2d0: 31 c0 xor %eax,%eax if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); } return 0; } 10f2d2: 8d 65 f8 lea -0x8(%ebp),%esp 10f2d5: 5b pop %ebx 10f2d6: 5e pop %esi 10f2d7: c9 leave 10f2d8: c3 ret 10f2d9: 8d 76 00 lea 0x0(%esi),%esi 10f2dc: a1 98 00 12 00 mov 0x120098,%eax 10f2e1: 40 inc %eax 10f2e2: a3 98 00 12 00 mov %eax,0x120098 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 10f2e7: 83 ec 08 sub $0x8,%esp 10f2ea: 68 08 00 00 10 push $0x10000008 10f2ef: ff 35 5c 01 12 00 pushl 0x12015c 10f2f5: e8 62 dd ff ff call 10d05c <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 10f2fa: a1 5c 01 12 00 mov 0x12015c,%eax 10f2ff: 8b 50 08 mov 0x8(%eax),%edx * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10f302: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) * @param[in] the_heap is the heap to operate upon 10f309: c7 40 64 10 c6 10 00 movl $0x10c610,0x64(%eax) * @param[in] starting_address is the starting address of the memory for 10f310: 89 50 68 mov %edx,0x68(%eax) * the heap 10f313: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10f31a: 89 58 54 mov %ebx,0x54(%eax) void *starting_address, size_t *size 10f31d: 5a pop %edx 10f31e: 59 pop %ecx 10f31f: 83 c0 48 add $0x48,%eax 10f322: 50 push %eax 10f323: 68 7c 01 12 00 push $0x12017c 10f328: e8 07 e4 ff ff call 10d734 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 10f32d: e8 76 d4 ff ff call 10c7a8 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 10f332: 83 c4 10 add $0x10,%esp 10f335: 85 f6 test %esi,%esi 10f337: 74 1c je 10f355 <== NEVER TAKEN ticks -= 10f339: a1 5c 01 12 00 mov 0x12015c,%eax 10f33e: 03 58 5c add 0x5c(%eax),%ebx 10f341: 2b 58 60 sub 0x60(%eax),%ebx _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 10f344: 83 ec 08 sub $0x8,%esp 10f347: 56 push %esi 10f348: 53 push %ebx 10f349: e8 b6 11 00 00 call 110504 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 10f34e: 83 c4 10 add $0x10,%esp 10f351: 85 db test %ebx,%ebx 10f353: 75 22 jne 10f377 rtems_set_errno_and_return_minus_one( EINTR ); 10f355: 31 c0 xor %eax,%eax } return 0; } 10f357: 8d 65 f8 lea -0x8(%ebp),%esp 10f35a: 5b pop %ebx 10f35b: 5e pop %esi 10f35c: c9 leave 10f35d: c3 ret 10f35e: 66 90 xchg %ax,%ax * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); 10f360: e8 af 1f 00 00 call 111314 <__errno> 10f365: c7 00 16 00 00 00 movl $0x16,(%eax) 10f36b: b8 ff ff ff ff mov $0xffffffff,%eax if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); } return 0; } 10f370: 8d 65 f8 lea -0x8(%ebp),%esp 10f373: 5b pop %ebx 10f374: 5e pop %esi 10f375: c9 leave 10f376: c3 ret /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 10f377: e8 98 1f 00 00 call 111314 <__errno> 10f37c: c7 00 04 00 00 00 movl $0x4,(%eax) 10f382: b8 ff ff ff ff mov $0xffffffff,%eax 10f387: e9 46 ff ff ff jmp 10f2d2 =============================================================================== 0010ddbc : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10ddbc: 55 push %ebp 10ddbd: 89 e5 mov %esp,%ebp 10ddbf: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10ddc2: 85 c0 test %eax,%eax 10ddc4: 74 12 je 10ddd8 10ddc6: 8b 10 mov (%eax),%edx 10ddc8: 85 d2 test %edx,%edx 10ddca: 74 0c je 10ddd8 return EINVAL; attr->is_initialized = FALSE; 10ddcc: c7 00 00 00 00 00 movl $0x0,(%eax) 10ddd2: 31 c0 xor %eax,%eax return 0; } 10ddd4: c9 leave 10ddd5: c3 ret 10ddd6: 66 90 xchg %ax,%ax { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = FALSE; return 0; 10ddd8: b8 16 00 00 00 mov $0x16,%eax } 10dddd: c9 leave 10ddde: c3 ret =============================================================================== 0010de30 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 10de30: 55 push %ebp 10de31: 89 e5 mov %esp,%ebp 10de33: 57 push %edi 10de34: 56 push %esi 10de35: 83 ec 04 sub $0x4,%esp 10de38: 8b 45 08 mov 0x8(%ebp),%eax 10de3b: 8b 7d 0c mov 0xc(%ebp),%edi if ( !attr || !attr->is_initialized || !param ) 10de3e: 85 c0 test %eax,%eax 10de40: 74 1e je 10de60 10de42: 8b 08 mov (%eax),%ecx 10de44: 85 c9 test %ecx,%ecx 10de46: 74 18 je 10de60 10de48: 85 ff test %edi,%edi 10de4a: 74 14 je 10de60 return EINVAL; *param = attr->schedparam; 10de4c: 8d 70 18 lea 0x18(%eax),%esi 10de4f: b9 06 00 00 00 mov $0x6,%ecx 10de54: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10de56: 31 c0 xor %eax,%eax return 0; } 10de58: 5a pop %edx 10de59: 5e pop %esi 10de5a: 5f pop %edi 10de5b: c9 leave 10de5c: c3 ret 10de5d: 8d 76 00 lea 0x0(%esi),%esi { if ( !attr || !attr->is_initialized || !param ) return EINVAL; *param = attr->schedparam; return 0; 10de60: b8 16 00 00 00 mov $0x16,%eax } 10de65: 5a pop %edx 10de66: 5e pop %esi 10de67: 5f pop %edi 10de68: c9 leave 10de69: c3 ret =============================================================================== 00110eec : #include int pthread_attr_init( pthread_attr_t *attr ) { 110eec: 55 push %ebp 110eed: 89 e5 mov %esp,%ebp 110eef: 57 push %edi 110ef0: 56 push %esi 110ef1: 83 ec 04 sub $0x4,%esp 110ef4: 8b 7d 08 mov 0x8(%ebp),%edi if ( !attr ) 110ef7: 85 ff test %edi,%edi 110ef9: 74 15 je 110f10 return EINVAL; *attr = _POSIX_Threads_Default_attributes; 110efb: be 60 ca 11 00 mov $0x11ca60,%esi 110f00: b9 0e 00 00 00 mov $0xe,%ecx 110f05: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 110f07: 31 c0 xor %eax,%eax return 0; } 110f09: 5a pop %edx 110f0a: 5e pop %esi 110f0b: 5f pop %edi 110f0c: c9 leave 110f0d: c3 ret 110f0e: 66 90 xchg %ax,%ax int pthread_attr_init( pthread_attr_t *attr ) { if ( !attr ) 110f10: b8 16 00 00 00 mov $0x16,%eax return EINVAL; *attr = _POSIX_Threads_Default_attributes; return 0; } 110f15: 5a pop %edx 110f16: 5e pop %esi 110f17: 5f pop %edi 110f18: c9 leave 110f19: c3 ret =============================================================================== 0010e91c : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 10e91c: 55 push %ebp 10e91d: 89 e5 mov %esp,%ebp 10e91f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10e922: 85 c0 test %eax,%eax 10e924: 74 0c je 10e932 10e926: 8b 10 mov (%eax),%edx 10e928: 85 d2 test %edx,%edx 10e92a: 74 06 je 10e932 return EINVAL; switch ( clock_allowed ) { 10e92c: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10e930: 76 0a jbe 10e93c case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; 10e932: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10e937: c9 leave 10e938: c3 ret 10e939: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 10e93c: 8b 55 0c mov 0xc(%ebp),%edx 10e93f: 89 50 30 mov %edx,0x30(%eax) 10e942: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10e944: c9 leave 10e945: c3 ret =============================================================================== 0010df3c : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 10df3c: 55 push %ebp 10df3d: 89 e5 mov %esp,%ebp 10df3f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10df42: 85 c0 test %eax,%eax 10df44: 74 0c je 10df52 10df46: 8b 10 mov (%eax),%edx 10df48: 85 d2 test %edx,%edx 10df4a: 74 06 je 10df52 return EINVAL; switch ( detachstate ) { 10df4c: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10df50: 76 0a jbe 10df5c case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; 10df52: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10df57: c9 leave 10df58: c3 ret 10df59: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 10df5c: 8b 55 0c mov 0xc(%ebp),%edx 10df5f: 89 50 34 mov %edx,0x34(%eax) 10df62: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10df64: c9 leave 10df65: c3 ret =============================================================================== 00110f1c : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 110f1c: 55 push %ebp 110f1d: 89 e5 mov %esp,%ebp 110f1f: 8b 55 08 mov 0x8(%ebp),%edx if ( !attr || !attr->is_initialized ) 110f22: 85 d2 test %edx,%edx 110f24: 74 22 je 110f48 110f26: 8b 02 mov (%edx),%eax 110f28: 85 c0 test %eax,%eax 110f2a: 74 1c je 110f48 return EINVAL; switch ( inheritsched ) { 110f2c: 8b 45 0c mov 0xc(%ebp),%eax 110f2f: 48 dec %eax 110f30: 83 f8 01 cmp $0x1,%eax 110f33: 76 07 jbe 110f3c 110f35: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 110f3a: c9 leave 110f3b: c3 ret return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 110f3c: 8b 45 0c mov 0xc(%ebp),%eax 110f3f: 89 42 10 mov %eax,0x10(%edx) 110f42: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 110f44: c9 leave 110f45: c3 ret 110f46: 66 90 xchg %ax,%ax switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; 110f48: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 110f4d: c9 leave 110f4e: c3 ret =============================================================================== 0010df9c : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 10df9c: 55 push %ebp 10df9d: 89 e5 mov %esp,%ebp 10df9f: 57 push %edi 10dfa0: 56 push %esi 10dfa1: 8b 45 08 mov 0x8(%ebp),%eax 10dfa4: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 10dfa7: 85 c0 test %eax,%eax 10dfa9: 74 1d je 10dfc8 10dfab: 8b 10 mov (%eax),%edx 10dfad: 85 d2 test %edx,%edx 10dfaf: 74 17 je 10dfc8 10dfb1: 85 f6 test %esi,%esi 10dfb3: 74 13 je 10dfc8 return EINVAL; attr->schedparam = *param; 10dfb5: 8d 78 18 lea 0x18(%eax),%edi 10dfb8: b9 06 00 00 00 mov $0x6,%ecx 10dfbd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10dfbf: 31 c0 xor %eax,%eax return 0; } 10dfc1: 5e pop %esi 10dfc2: 5f pop %edi 10dfc3: c9 leave 10dfc4: c3 ret 10dfc5: 8d 76 00 lea 0x0(%esi),%esi { if ( !attr || !attr->is_initialized || !param ) return EINVAL; attr->schedparam = *param; return 0; 10dfc8: b8 16 00 00 00 mov $0x16,%eax } 10dfcd: 5e pop %esi 10dfce: 5f pop %edi 10dfcf: c9 leave 10dfd0: c3 ret =============================================================================== 0010dfd4 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10dfd4: 55 push %ebp 10dfd5: 89 e5 mov %esp,%ebp 10dfd7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10dfda: 85 c0 test %eax,%eax 10dfdc: 74 22 je 10e000 <== NEVER TAKEN 10dfde: 8b 10 mov (%eax),%edx 10dfe0: 85 d2 test %edx,%edx 10dfe2: 74 1c je 10e000 <== NEVER TAKEN return EINVAL; switch ( policy ) { 10dfe4: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10dfe8: 76 0a jbe 10dff4 10dfea: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 10dfef: c9 leave 10dff0: c3 ret 10dff1: 8d 76 00 lea 0x0(%esi),%esi switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10dff4: 8b 55 0c mov 0xc(%ebp),%edx 10dff7: 89 50 14 mov %edx,0x14(%eax) 10dffa: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 10dffc: c9 leave 10dffd: c3 ret 10dffe: 66 90 xchg %ax,%ax case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; 10e000: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10e005: c9 leave 10e006: c3 ret =============================================================================== 0010e008 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 10e008: 55 push %ebp 10e009: 89 e5 mov %esp,%ebp 10e00b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10e00e: 85 c0 test %eax,%eax 10e010: 74 20 je 10e032 10e012: 8b 08 mov (%eax),%ecx 10e014: 85 c9 test %ecx,%ecx 10e016: 74 1a je 10e032 return EINVAL; switch ( contentionscope ) { 10e018: 8b 55 0c mov 0xc(%ebp),%edx 10e01b: 85 d2 test %edx,%edx 10e01d: 75 0d jne 10e02c case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 10e01f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10e026: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 10e028: c9 leave 10e029: c3 ret 10e02a: 66 90 xchg %ax,%ax ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10e02c: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10e030: 74 0a je 10e03c case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; 10e032: b8 16 00 00 00 mov $0x16,%eax return ENOTSUP; default: return EINVAL; } } 10e037: c9 leave 10e038: c3 ret 10e039: 8d 76 00 lea 0x0(%esi),%esi ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10e03c: b8 86 00 00 00 mov $0x86,%eax return ENOTSUP; default: return EINVAL; } } 10e041: c9 leave 10e042: c3 ret =============================================================================== 0010e044 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 10e044: 55 push %ebp 10e045: 89 e5 mov %esp,%ebp 10e047: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10e04a: 85 c0 test %eax,%eax 10e04c: 74 12 je 10e060 10e04e: 8b 10 mov (%eax),%edx 10e050: 85 d2 test %edx,%edx 10e052: 74 0c je 10e060 return EINVAL; attr->stackaddr = stackaddr; 10e054: 8b 55 0c mov 0xc(%ebp),%edx 10e057: 89 50 04 mov %edx,0x4(%eax) 10e05a: 31 c0 xor %eax,%eax return 0; } 10e05c: c9 leave 10e05d: c3 ret 10e05e: 66 90 xchg %ax,%ax { if ( !attr || !attr->is_initialized ) return EINVAL; attr->stackaddr = stackaddr; return 0; 10e060: b8 16 00 00 00 mov $0x16,%eax } 10e065: c9 leave 10e066: c3 ret =============================================================================== 00110f50 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 110f50: 55 push %ebp 110f51: 89 e5 mov %esp,%ebp 110f53: 8b 55 08 mov 0x8(%ebp),%edx if ( !attr || !attr->is_initialized ) 110f56: 85 d2 test %edx,%edx 110f58: 74 1e je 110f78 110f5a: 8b 02 mov (%edx),%eax 110f5c: 85 c0 test %eax,%eax 110f5e: 74 18 je 110f78 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 110f60: a1 54 e1 11 00 mov 0x11e154,%eax 110f65: d1 e0 shl %eax 110f67: 3b 45 0c cmp 0xc(%ebp),%eax 110f6a: 77 03 ja 110f6f attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 110f6c: 8b 45 0c mov 0xc(%ebp),%eax 110f6f: 89 42 08 mov %eax,0x8(%edx) 110f72: 31 c0 xor %eax,%eax return 0; } 110f74: c9 leave 110f75: c3 ret 110f76: 66 90 xchg %ax,%ax return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 110f78: b8 16 00 00 00 mov $0x16,%eax return 0; } 110f7d: c9 leave 110f7e: c3 ret =============================================================================== 0010a444 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10a444: 55 push %ebp 10a445: 89 e5 mov %esp,%ebp 10a447: 53 push %ebx 10a448: 83 ec 14 sub $0x14,%esp 10a44b: 8b 55 08 mov 0x8(%ebp),%edx POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10a44e: 85 d2 test %edx,%edx 10a450: 74 36 je 10a488 /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 10a452: 50 push %eax 10a453: 8d 45 f8 lea -0x8(%ebp),%eax 10a456: 50 push %eax 10a457: ff 32 pushl (%edx) 10a459: 68 a0 14 12 00 push $0x1214a0 10a45e: e8 a9 28 00 00 call 10cd0c <_Objects_Get> 10a463: 89 c3 mov %eax,%ebx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10a465: 83 c4 10 add $0x10,%esp 10a468: 8b 45 f8 mov -0x8(%ebp),%eax 10a46b: 85 c0 test %eax,%eax 10a46d: 75 19 jne 10a488 case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10a46f: 8b 4b 58 mov 0x58(%ebx),%ecx 10a472: 85 c9 test %ecx,%ecx 10a474: 74 1e je 10a494 _Thread_Enable_dispatch(); 10a476: e8 d5 30 00 00 call 10d550 <_Thread_Enable_dispatch> 10a47b: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a480: 8b 5d fc mov -0x4(%ebp),%ebx 10a483: c9 leave 10a484: c3 ret 10a485: 8d 76 00 lea 0x0(%esi),%esi _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return 0; 10a488: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a48d: 8b 5d fc mov -0x4(%ebp),%ebx 10a490: c9 leave 10a491: c3 ret 10a492: 66 90 xchg %ax,%ax if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); 10a494: 83 ec 08 sub $0x8,%esp 10a497: 53 push %ebx 10a498: 68 a0 14 12 00 push $0x1214a0 10a49d: e8 f6 23 00 00 call 10c898 <_Objects_Close> * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * 10a4a2: 58 pop %eax 10a4a3: 5a pop %edx 10a4a4: 53 push %ebx 10a4a5: 68 a0 14 12 00 push $0x1214a0 10a4aa: e8 29 27 00 00 call 10cbd8 <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10a4af: e8 9c 30 00 00 call 10d550 <_Thread_Enable_dispatch> 10a4b4: 31 c0 xor %eax,%eax 10a4b6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10a4b9: 8b 5d fc mov -0x4(%ebp),%ebx 10a4bc: c9 leave 10a4bd: c3 ret =============================================================================== 0010a4c0 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10a4c0: 55 push %ebp 10a4c1: 89 e5 mov %esp,%ebp 10a4c3: 57 push %edi 10a4c4: 56 push %esi 10a4c5: 53 push %ebx 10a4c6: 83 ec 1c sub $0x1c,%esp 10a4c9: 8b 7d 08 mov 0x8(%ebp),%edi 10a4cc: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10a4cf: 85 ff test %edi,%edi 10a4d1: 0f 84 89 00 00 00 je 10a560 return EINVAL; if ( count == 0 ) 10a4d7: 85 f6 test %esi,%esi 10a4d9: 0f 84 81 00 00 00 je 10a560 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10a4df: 8b 4d 0c mov 0xc(%ebp),%ecx 10a4e2: 85 c9 test %ecx,%ecx 10a4e4: 0f 84 92 00 00 00 je 10a57c 10a4ea: 8b 45 0c mov 0xc(%ebp),%eax } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10a4ed: 8b 10 mov (%eax),%edx 10a4ef: 85 d2 test %edx,%edx 10a4f1: 74 6d je 10a560 return EINVAL; switch ( the_attr->process_shared ) { 10a4f3: 8b 40 04 mov 0x4(%eax),%eax 10a4f6: 85 c0 test %eax,%eax 10a4f8: 75 66 jne 10a560 <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10a4fa: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) the_attributes.maximum_count = count; 10a501: 89 75 f0 mov %esi,-0x10(%ebp) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a504: a1 58 10 12 00 mov 0x121058,%eax 10a509: 40 inc %eax 10a50a: a3 58 10 12 00 mov %eax,0x121058 */ /**@{*/ #ifdef __cplusplus extern "C" { #endif 10a50f: 83 ec 0c sub $0xc,%esp 10a512: 68 a0 14 12 00 push $0x1214a0 10a517: e8 fc 22 00 00 call 10c818 <_Objects_Allocate> 10a51c: 89 c3 mov %eax,%ebx */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10a51e: 83 c4 10 add $0x10,%esp 10a521: 85 c0 test %eax,%eax 10a523: 74 4b je 10a570 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10a525: 83 ec 08 sub $0x8,%esp 10a528: 8d 45 ec lea -0x14(%ebp),%eax 10a52b: 50 push %eax 10a52c: 8d 43 10 lea 0x10(%ebx),%eax 10a52f: 50 push %eax 10a530: e8 3f 1a 00 00 call 10bf74 <_CORE_barrier_Initialize> 10a535: 8b 4b 08 mov 0x8(%ebx),%ecx 10a538: 0f b7 d1 movzwl %cx,%edx 10a53b: a1 bc 14 12 00 mov 0x1214bc,%eax 10a540: 89 1c 90 mov %ebx,(%eax,%edx,4) 10a543: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10a54a: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 10a54c: e8 ff 2f 00 00 call 10d550 <_Thread_Enable_dispatch> 10a551: 31 c0 xor %eax,%eax 10a553: 83 c4 10 add $0x10,%esp return 0; } 10a556: 8d 65 f4 lea -0xc(%ebp),%esp 10a559: 5b pop %ebx 10a55a: 5e pop %esi 10a55b: 5f pop %edi 10a55c: c9 leave 10a55d: c3 ret 10a55e: 66 90 xchg %ax,%ax /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 10a560: b8 16 00 00 00 mov $0x16,%eax } 10a565: 8d 65 f4 lea -0xc(%ebp),%esp 10a568: 5b pop %ebx 10a569: 5e pop %esi 10a56a: 5f pop %edi 10a56b: c9 leave 10a56c: c3 ret 10a56d: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 10a570: e8 db 2f 00 00 call 10d550 <_Thread_Enable_dispatch> 10a575: b8 0b 00 00 00 mov $0xb,%eax 10a57a: eb e9 jmp 10a565 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10a57c: 83 ec 0c sub $0xc,%esp 10a57f: 8d 5d e4 lea -0x1c(%ebp),%ebx 10a582: 53 push %ebx 10a583: e8 70 fe ff ff call 10a3f8 10a588: 89 d8 mov %ebx,%eax 10a58a: 83 c4 10 add $0x10,%esp 10a58d: e9 5b ff ff ff jmp 10a4ed =============================================================================== 0010a594 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10a594: 55 push %ebp 10a595: 89 e5 mov %esp,%ebp 10a597: 83 ec 18 sub $0x18,%esp 10a59a: 8b 55 08 mov 0x8(%ebp),%edx POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10a59d: 85 d2 test %edx,%edx 10a59f: 74 4f je 10a5f0 /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 10a5a1: 51 push %ecx 10a5a2: 8d 45 fc lea -0x4(%ebp),%eax 10a5a5: 50 push %eax 10a5a6: ff 32 pushl (%edx) 10a5a8: 68 a0 14 12 00 push $0x1214a0 10a5ad: e8 5a 27 00 00 call 10cd0c <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10a5b2: 83 c4 10 add $0x10,%esp 10a5b5: 8b 55 fc mov -0x4(%ebp),%edx 10a5b8: 85 d2 test %edx,%edx 10a5ba: 75 34 jne 10a5f0 case OBJECTS_LOCAL: _CORE_barrier_Wait( 10a5bc: 83 ec 0c sub $0xc,%esp 10a5bf: 6a 00 push $0x0 10a5c1: 6a 00 push $0x0 10a5c3: 6a 01 push $0x1 10a5c5: ff 70 08 pushl 0x8(%eax) 10a5c8: 83 c0 10 add $0x10,%eax 10a5cb: 50 push %eax 10a5cc: e8 d7 19 00 00 call 10bfa8 <_CORE_barrier_Wait> the_barrier->Object.id, TRUE, 0, NULL ); _Thread_Enable_dispatch(); 10a5d1: 83 c4 20 add $0x20,%esp 10a5d4: e8 77 2f 00 00 call 10d550 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10a5d9: 83 ec 0c sub $0xc,%esp 10a5dc: a1 1c 11 12 00 mov 0x12111c,%eax 10a5e1: ff 70 34 pushl 0x34(%eax) 10a5e4: e8 a7 5c 00 00 call 110290 <_POSIX_Barrier_Translate_core_barrier_return_code> 10a5e9: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10a5ec: c9 leave 10a5ed: c3 ret 10a5ee: 66 90 xchg %ax,%ax TRUE, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10a5f0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a5f5: c9 leave 10a5f6: c3 ret =============================================================================== 0010a3b0 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10a3b0: 55 push %ebp 10a3b1: 89 e5 mov %esp,%ebp 10a3b3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == FALSE ) 10a3b6: 85 c0 test %eax,%eax 10a3b8: 74 12 je 10a3cc 10a3ba: 8b 10 mov (%eax),%edx 10a3bc: 85 d2 test %edx,%edx 10a3be: 74 0c je 10a3cc return EINVAL; attr->is_initialized = FALSE; 10a3c0: c7 00 00 00 00 00 movl $0x0,(%eax) 10a3c6: 31 c0 xor %eax,%eax return 0; } 10a3c8: c9 leave 10a3c9: c3 ret 10a3ca: 66 90 xchg %ax,%ax { if ( !attr || attr->is_initialized == FALSE ) return EINVAL; attr->is_initialized = FALSE; return 0; 10a3cc: b8 16 00 00 00 mov $0x16,%eax } 10a3d1: c9 leave 10a3d2: c3 ret =============================================================================== 0010a418 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10a418: 55 push %ebp 10a419: 89 e5 mov %esp,%ebp 10a41b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10a41e: 85 c0 test %eax,%eax 10a420: 74 0c je 10a42e return EINVAL; if ( !attr->is_initialized ) 10a422: 8b 10 mov (%eax),%edx 10a424: 85 d2 test %edx,%edx 10a426: 74 06 je 10a42e return EINVAL; switch ( pshared ) { 10a428: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10a42c: 76 0a jbe 10a438 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10a42e: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a433: c9 leave 10a434: c3 ret 10a435: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10a438: 8b 55 0c mov 0xc(%ebp),%edx 10a43b: 89 50 04 mov %edx,0x4(%eax) 10a43e: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10a440: c9 leave 10a441: c3 ret =============================================================================== 00109bf0 : */ int pthread_cancel( pthread_t thread ) { 109bf0: 55 push %ebp 109bf1: 89 e5 mov %esp,%ebp 109bf3: 53 push %ebx 109bf4: 83 ec 14 sub $0x14,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 109bf7: a1 d8 23 12 00 mov 0x1223d8,%eax 109bfc: 85 c0 test %eax,%eax 109bfe: 74 0c je 109c0c <== ALWAYS TAKEN 109c00: b8 47 00 00 00 mov $0x47,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 109c05: 8b 5d fc mov -0x4(%ebp),%ebx 109c08: c9 leave 109c09: c3 ret 109c0a: 66 90 xchg %ax,%ax */ if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _Thread_Get( thread, &location ); 109c0c: 83 ec 08 sub $0x8,%esp 109c0f: 8d 45 f8 lea -0x8(%ebp),%eax 109c12: 50 push %eax 109c13: ff 75 08 pushl 0x8(%ebp) 109c16: e8 b5 31 00 00 call 10cdd0 <_Thread_Get> 109c1b: 89 c3 mov %eax,%ebx switch ( location ) { 109c1d: 83 c4 10 add $0x10,%esp 109c20: 8b 4d f8 mov -0x8(%ebp),%ecx 109c23: 85 c9 test %ecx,%ecx 109c25: 74 0d je 109c34 <== ALWAYS TAKEN 109c27: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 109c2c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109c2f: c9 leave <== NOT EXECUTED 109c30: c3 ret <== NOT EXECUTED 109c31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread = _Thread_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 109c34: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax thread_support->cancelation_requested = 1; 109c3a: c7 80 d4 00 00 00 01 movl $0x1,0xd4(%eax) 109c41: 00 00 00 if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 109c44: 8b 90 cc 00 00 00 mov 0xcc(%eax),%edx 109c4a: 85 d2 test %edx,%edx 109c4c: 75 09 jne 109c57 <== NEVER TAKEN 109c4e: 83 b8 d0 00 00 00 01 cmpl $0x1,0xd0(%eax) 109c55: 74 0d je 109c64 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS) cancel = true; _Thread_Enable_dispatch(); 109c57: e8 50 31 00 00 call 10cdac <_Thread_Enable_dispatch> 109c5c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 109c5e: 8b 5d fc mov -0x4(%ebp),%ebx 109c61: c9 leave 109c62: c3 ret 109c63: 90 nop if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS) cancel = true; _Thread_Enable_dispatch(); 109c64: e8 43 31 00 00 call 10cdac <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 109c69: 83 ec 08 sub $0x8,%esp 109c6c: 6a ff push $0xffffffff 109c6e: 53 push %ebx 109c6f: e8 38 03 00 00 call 109fac <_POSIX_Thread_Exit> 109c74: 31 c0 xor %eax,%eax 109c76: 83 c4 10 add $0x10,%esp 109c79: eb 8a jmp 109c05 =============================================================================== 0010a0c0 : */ void pthread_cleanup_pop( int execute ) { 10a0c0: 55 push %ebp 10a0c1: 89 e5 mov %esp,%ebp 10a0c3: 57 push %edi 10a0c4: 56 push %esi 10a0c5: 53 push %ebx 10a0c6: 83 ec 1c sub $0x1c,%esp 10a0c9: 8b 45 08 mov 0x8(%ebp),%eax 10a0cc: 89 45 e0 mov %eax,-0x20(%ebp) 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 ]; 10a0cf: a1 9c 30 12 00 mov 0x12309c,%eax 10a0d4: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a0da: a1 d8 2f 12 00 mov 0x122fd8,%eax 10a0df: 40 inc %eax 10a0e0: a3 d8 2f 12 00 mov %eax,0x122fd8 * 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 ); 10a0e5: 9c pushf 10a0e6: fa cli 10a0e7: 5f pop %edi * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 10a0e8: 8d 82 dc 00 00 00 lea 0xdc(%edx),%eax if ( _Chain_Is_empty( handler_stack ) ) { 10a0ee: 39 82 d8 00 00 00 cmp %eax,0xd8(%edx) 10a0f4: 74 5a je 10a150 _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10a0f6: 8b 40 04 mov 0x4(%eax),%eax 10a0f9: 89 45 d8 mov %eax,-0x28(%ebp) 10a0fc: 8b 10 mov (%eax),%edx 10a0fe: 8b 40 04 mov 0x4(%eax),%eax 10a101: 89 42 04 mov %eax,0x4(%edx) 10a104: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10a106: 57 push %edi 10a107: 9d popf tmp_handler = *handler; 10a108: 8d 7d e4 lea -0x1c(%ebp),%edi 10a10b: b9 04 00 00 00 mov $0x4,%ecx 10a110: 8b 75 d8 mov -0x28(%ebp),%esi 10a113: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a115: 8b 5d ec mov -0x14(%ebp),%ebx 10a118: 8b 7d f0 mov -0x10(%ebp),%edi _Workspace_Free( handler ); 10a11b: 83 ec 0c sub $0xc,%esp 10a11e: ff 75 d8 pushl -0x28(%ebp) 10a121: e8 9a 46 00 00 call 10e7c0 <_Workspace_Free> _Thread_Enable_dispatch(); 10a126: e8 d9 34 00 00 call 10d604 <_Thread_Enable_dispatch> if ( execute ) 10a12b: 83 c4 10 add $0x10,%esp 10a12e: 8b 45 e0 mov -0x20(%ebp),%eax 10a131: 85 c0 test %eax,%eax 10a133: 75 0b jne 10a140 <== ALWAYS TAKEN (*tmp_handler.routine)( tmp_handler.arg ); } 10a135: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a138: 5b pop %ebx <== NOT EXECUTED 10a139: 5e pop %esi <== NOT EXECUTED 10a13a: 5f pop %edi <== NOT EXECUTED 10a13b: c9 leave <== NOT EXECUTED 10a13c: c3 ret <== NOT EXECUTED 10a13d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10a140: 89 7d 08 mov %edi,0x8(%ebp) 10a143: 89 d9 mov %ebx,%ecx } 10a145: 8d 65 f4 lea -0xc(%ebp),%esp 10a148: 5b pop %ebx 10a149: 5e pop %esi 10a14a: 5f pop %edi 10a14b: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10a14c: ff e1 jmp *%ecx 10a14e: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10a150: e8 af 34 00 00 call 10d604 <_Thread_Enable_dispatch> _ISR_Enable( level ); 10a155: 57 push %edi 10a156: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10a157: 8d 65 f4 lea -0xc(%ebp),%esp 10a15a: 5b pop %ebx 10a15b: 5e pop %esi 10a15c: 5f pop %edi 10a15d: c9 leave 10a15e: c3 ret =============================================================================== 0010a160 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10a160: 55 push %ebp 10a161: 89 e5 mov %esp,%ebp 10a163: 56 push %esi 10a164: 53 push %ebx 10a165: 8b 5d 08 mov 0x8(%ebp),%ebx 10a168: 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 ) 10a16b: 85 db test %ebx,%ebx 10a16d: 74 4d je 10a1bc /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a16f: a1 d8 2f 12 00 mov 0x122fd8,%eax 10a174: 40 inc %eax 10a175: a3 d8 2f 12 00 mov %eax,0x122fd8 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10a17a: 83 ec 0c sub $0xc,%esp 10a17d: 6a 10 push $0x10 10a17f: e8 54 46 00 00 call 10e7d8 <_Workspace_Allocate> 10a184: 89 c2 mov %eax,%edx if ( handler ) { 10a186: 83 c4 10 add $0x10,%esp 10a189: 85 c0 test %eax,%eax 10a18b: 74 23 je 10a1b0 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10a18d: a1 9c 30 12 00 mov 0x12309c,%eax 10a192: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10a198: 05 d8 00 00 00 add $0xd8,%eax handler->routine = routine; 10a19d: 89 5a 08 mov %ebx,0x8(%edx) handler->arg = arg; 10a1a0: 89 72 0c mov %esi,0xc(%edx) _Chain_Append( handler_stack, &handler->Node ); 10a1a3: 83 ec 08 sub $0x8,%esp 10a1a6: 52 push %edx 10a1a7: 50 push %eax 10a1a8: e8 e7 1e 00 00 call 10c094 <_Chain_Append> 10a1ad: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10a1b0: 8d 65 f8 lea -0x8(%ebp),%esp 10a1b3: 5b pop %ebx 10a1b4: 5e pop %esi 10a1b5: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10a1b6: e9 49 34 00 00 jmp 10d604 <_Thread_Enable_dispatch> 10a1bb: 90 nop } 10a1bc: 8d 65 f8 lea -0x8(%ebp),%esp 10a1bf: 5b pop %ebx 10a1c0: 5e pop %esi 10a1c1: c9 leave 10a1c2: c3 ret =============================================================================== 0010ad9c : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10ad9c: 55 push %ebp 10ad9d: 89 e5 mov %esp,%ebp 10ad9f: 53 push %ebx 10ada0: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10ada3: 8d 45 f8 lea -0x8(%ebp),%eax 10ada6: 50 push %eax 10ada7: ff 75 08 pushl 0x8(%ebp) 10adaa: e8 65 00 00 00 call 10ae14 <_POSIX_Condition_variables_Get> 10adaf: 89 c3 mov %eax,%ebx switch ( location ) { 10adb1: 83 c4 10 add $0x10,%esp 10adb4: 8b 4d f8 mov -0x8(%ebp),%ecx 10adb7: 85 c9 test %ecx,%ecx 10adb9: 75 25 jne 10ade0 case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10adbb: 83 ec 0c sub $0xc,%esp 10adbe: 8d 40 18 lea 0x18(%eax),%eax 10adc1: 50 push %eax 10adc2: e8 89 3d 00 00 call 10eb50 <_Thread_queue_First> 10adc7: 83 c4 10 add $0x10,%esp 10adca: 85 c0 test %eax,%eax 10adcc: 74 1e je 10adec _Thread_Enable_dispatch(); 10adce: e8 75 36 00 00 call 10e448 <_Thread_Enable_dispatch> 10add3: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10add8: 8b 5d fc mov -0x4(%ebp),%ebx 10addb: c9 leave 10addc: c3 ret 10addd: 8d 76 00 lea 0x0(%esi),%esi { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 10ade0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ade5: 8b 5d fc mov -0x4(%ebp),%ebx 10ade8: c9 leave 10ade9: c3 ret 10adea: 66 90 xchg %ax,%ax if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10adec: 83 ec 08 sub $0x8,%esp 10adef: 53 push %ebx 10adf0: 68 00 2c 12 00 push $0x122c00 10adf5: e8 96 29 00 00 call 10d790 <_Objects_Close> * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * 10adfa: 58 pop %eax 10adfb: 5a pop %edx 10adfc: 53 push %ebx 10adfd: 68 00 2c 12 00 push $0x122c00 10ae02: e8 c9 2c 00 00 call 10dad0 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10ae07: e8 3c 36 00 00 call 10e448 <_Thread_Enable_dispatch> 10ae0c: 31 c0 xor %eax,%eax 10ae0e: 83 c4 10 add $0x10,%esp 10ae11: eb d2 jmp 10ade5 =============================================================================== 0010ae68 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10ae68: 55 push %ebp 10ae69: 89 e5 mov %esp,%ebp 10ae6b: 56 push %esi 10ae6c: 53 push %ebx 10ae6d: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10ae70: 85 c0 test %eax,%eax 10ae72: 0f 84 88 00 00 00 je 10af00 10ae78: 89 c3 mov %eax,%ebx /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10ae7a: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10ae7e: 74 06 je 10ae86 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10ae80: 8b 03 mov (%ebx),%eax 10ae82: 85 c0 test %eax,%eax 10ae84: 75 0e jne 10ae94 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 10ae86: b8 16 00 00 00 mov $0x16,%eax } 10ae8b: 8d 65 f8 lea -0x8(%ebp),%esp 10ae8e: 5b pop %ebx 10ae8f: 5e pop %esi 10ae90: c9 leave 10ae91: c3 ret 10ae92: 66 90 xchg %ax,%ax /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10ae94: a1 18 27 12 00 mov 0x122718,%eax 10ae99: 40 inc %eax 10ae9a: a3 18 27 12 00 mov %eax,0x122718 /**@{*/ #ifdef __cplusplus extern "C" { #endif 10ae9f: 83 ec 0c sub $0xc,%esp 10aea2: 68 00 2c 12 00 push $0x122c00 10aea7: e8 64 28 00 00 call 10d710 <_Objects_Allocate> 10aeac: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10aeae: 83 c4 10 add $0x10,%esp 10aeb1: 85 c0 test %eax,%eax 10aeb3: 74 57 je 10af0c _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10aeb5: 8b 43 04 mov 0x4(%ebx),%eax 10aeb8: 89 46 10 mov %eax,0x10(%esi) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10aebb: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10aec2: 6a 74 push $0x74 10aec4: 68 00 08 00 00 push $0x800 10aec9: 6a 00 push $0x0 10aecb: 8d 46 18 lea 0x18(%esi),%eax 10aece: 50 push %eax 10aecf: e8 00 3d 00 00 call 10ebd4 <_Thread_queue_Initialize> 10aed4: 8b 4e 08 mov 0x8(%esi),%ecx 10aed7: 0f b7 d1 movzwl %cx,%edx 10aeda: a1 1c 2c 12 00 mov 0x122c1c,%eax 10aedf: 89 34 90 mov %esi,(%eax,%edx,4) 10aee2: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10aee9: 8b 45 08 mov 0x8(%ebp),%eax 10aeec: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 10aeee: e8 55 35 00 00 call 10e448 <_Thread_Enable_dispatch> 10aef3: 31 c0 xor %eax,%eax 10aef5: 83 c4 10 add $0x10,%esp return 0; } 10aef8: 8d 65 f8 lea -0x8(%ebp),%esp 10aefb: 5b pop %ebx 10aefc: 5e pop %esi 10aefd: c9 leave 10aefe: c3 ret 10aeff: 90 nop ) { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10af00: bb 28 cb 11 00 mov $0x11cb28,%ebx 10af05: e9 70 ff ff ff jmp 10ae7a 10af0a: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10af0c: e8 37 35 00 00 call 10e448 <_Thread_Enable_dispatch> 10af11: b8 0c 00 00 00 mov $0xc,%eax 10af16: e9 70 ff ff ff jmp 10ae8b =============================================================================== 0010afa4 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 10afa4: 55 push %ebp 10afa5: 89 e5 mov %esp,%ebp 10afa7: 53 push %ebx 10afa8: 83 ec 1c sub $0x1c,%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) ) { 10afab: 8d 45 f8 lea -0x8(%ebp),%eax 10afae: 50 push %eax 10afaf: ff 75 10 pushl 0x10(%ebp) 10afb2: e8 8d 04 00 00 call 10b444 <_POSIX_Absolute_timeout_to_ticks> 10afb7: 83 c4 10 add $0x10,%esp 10afba: 83 f8 02 cmp $0x2,%eax 10afbd: 77 21 ja 10afe0 10afbf: 83 f8 01 cmp $0x1,%eax 10afc2: 72 28 jb 10afec 10afc4: b3 01 mov $0x1,%bl case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: already_timedout = FALSE; break; } return _POSIX_Condition_variables_Wait_support( 10afc6: 0f b6 c3 movzbl %bl,%eax 10afc9: 50 push %eax 10afca: ff 75 f8 pushl -0x8(%ebp) 10afcd: ff 75 0c pushl 0xc(%ebp) 10afd0: ff 75 08 pushl 0x8(%ebp) 10afd3: e8 38 00 00 00 call 10b010 <_POSIX_Condition_variables_Wait_support> 10afd8: 83 c4 10 add $0x10,%esp cond, mutex, ticks, already_timedout ); } 10afdb: 8b 5d fc mov -0x4(%ebp),%ebx 10afde: c9 leave 10afdf: c3 ret * 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) ) { 10afe0: 83 f8 03 cmp $0x3,%eax 10afe3: 75 e1 jne 10afc6 <== NEVER TAKEN 10afe5: 31 db xor %ebx,%ebx 10afe7: eb dd jmp 10afc6 10afe9: 8d 76 00 lea 0x0(%esi),%esi 10afec: b8 16 00 00 00 mov $0x16,%eax cond, mutex, ticks, already_timedout ); } 10aff1: 8b 5d fc mov -0x4(%ebp),%ebx 10aff4: c9 leave 10aff5: c3 ret =============================================================================== 0010acfc : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10acfc: 55 push %ebp 10acfd: 89 e5 mov %esp,%ebp 10acff: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == FALSE ) 10ad02: 85 c0 test %eax,%eax 10ad04: 74 12 je 10ad18 10ad06: 8b 10 mov (%eax),%edx 10ad08: 85 d2 test %edx,%edx 10ad0a: 74 0c je 10ad18 <== NEVER TAKEN return EINVAL; attr->is_initialized = FALSE; 10ad0c: c7 00 00 00 00 00 movl $0x0,(%eax) 10ad12: 31 c0 xor %eax,%eax return 0; } 10ad14: c9 leave 10ad15: c3 ret 10ad16: 66 90 xchg %ax,%ax { if ( !attr || attr->is_initialized == FALSE ) return EINVAL; attr->is_initialized = FALSE; return 0; 10ad18: b8 16 00 00 00 mov $0x16,%eax } 10ad1d: c9 leave 10ad1e: c3 ret =============================================================================== 0010ad20 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10ad20: 55 push %ebp 10ad21: 89 e5 mov %esp,%ebp 10ad23: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10ad26: 85 c0 test %eax,%eax 10ad28: 74 0e je 10ad38 return EINVAL; *pshared = attr->process_shared; 10ad2a: 8b 40 04 mov 0x4(%eax),%eax 10ad2d: 8b 55 0c mov 0xc(%ebp),%edx 10ad30: 89 02 mov %eax,(%edx) 10ad32: 31 c0 xor %eax,%eax return 0; } 10ad34: c9 leave 10ad35: c3 ret 10ad36: 66 90 xchg %ax,%ax int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) 10ad38: b0 16 mov $0x16,%al return EINVAL; *pshared = attr->process_shared; return 0; } 10ad3a: c9 leave 10ad3b: c3 ret =============================================================================== 0010ad3c : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 10ad3c: 55 push %ebp 10ad3d: 89 e5 mov %esp,%ebp 10ad3f: 8b 4d 08 mov 0x8(%ebp),%ecx if ( !attr ) 10ad42: 85 c9 test %ecx,%ecx 10ad44: 74 16 je 10ad5c return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 10ad46: a1 28 cb 11 00 mov 0x11cb28,%eax 10ad4b: 8b 15 2c cb 11 00 mov 0x11cb2c,%edx 10ad51: 89 01 mov %eax,(%ecx) 10ad53: 89 51 04 mov %edx,0x4(%ecx) 10ad56: 31 c0 xor %eax,%eax return 0; } 10ad58: c9 leave 10ad59: c3 ret 10ad5a: 66 90 xchg %ax,%ax int pthread_condattr_init( pthread_condattr_t *attr ) { if ( !attr ) 10ad5c: b8 16 00 00 00 mov $0x16,%eax return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; return 0; } 10ad61: c9 leave 10ad62: c3 ret =============================================================================== 0010ace8 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10ace8: 55 push %ebp 10ace9: 89 e5 mov %esp,%ebp 10aceb: 57 push %edi 10acec: 56 push %esi 10aced: 53 push %ebx 10acee: 83 ec 5c sub $0x5c,%esp 10acf1: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 10acf4: 8b 5d 10 mov 0x10(%ebp),%ebx 10acf7: 85 db test %ebx,%ebx 10acf9: 0f 84 b9 01 00 00 je 10aeb8 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10acff: 85 f6 test %esi,%esi 10ad01: 0f 84 7d 01 00 00 je 10ae84 10ad07: 89 75 a4 mov %esi,-0x5c(%ebp) if ( !the_attr->is_initialized ) 10ad0a: 8b 45 a4 mov -0x5c(%ebp),%eax 10ad0d: 8b 08 mov (%eax),%ecx 10ad0f: 85 c9 test %ecx,%ecx 10ad11: 74 29 je 10ad3c * 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) ) 10ad13: 8b 50 04 mov 0x4(%eax),%edx 10ad16: 85 d2 test %edx,%edx 10ad18: 74 0b je 10ad25 10ad1a: 8b 40 08 mov 0x8(%eax),%eax 10ad1d: 3b 05 54 e1 11 00 cmp 0x11e154,%eax 10ad23: 72 17 jb 10ad3c <== ALWAYS TAKEN * 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 ) { 10ad25: 8b 75 a4 mov -0x5c(%ebp),%esi 10ad28: 8b 46 10 mov 0x10(%esi),%eax 10ad2b: 83 f8 01 cmp $0x1,%eax 10ad2e: 0f 84 5c 01 00 00 je 10ae90 10ad34: 83 f8 02 cmp $0x2,%eax 10ad37: 74 13 je 10ad4c 10ad39: 8d 76 00 lea 0x0(%esi),%esi */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 10ad3c: b8 16 00 00 00 mov $0x16,%eax } 10ad41: 8d 65 f4 lea -0xc(%ebp),%esp 10ad44: 5b pop %ebx 10ad45: 5e pop %esi 10ad46: 5f pop %edi 10ad47: c9 leave 10ad48: c3 ret 10ad49: 8d 76 00 lea 0x0(%esi),%esi schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10ad4c: 8b 45 a4 mov -0x5c(%ebp),%eax 10ad4f: 8b 40 14 mov 0x14(%eax),%eax 10ad52: 89 45 cc mov %eax,-0x34(%ebp) schedparam = the_attr->schedparam; 10ad55: 8d 5d dc lea -0x24(%ebp),%ebx 10ad58: 8b 75 a4 mov -0x5c(%ebp),%esi 10ad5b: 83 c6 18 add $0x18,%esi 10ad5e: b9 06 00 00 00 mov $0x6,%ecx 10ad63: 89 df mov %ebx,%edi 10ad65: 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 ) 10ad67: 8b 45 a4 mov -0x5c(%ebp),%eax 10ad6a: 8b 40 0c mov 0xc(%eax),%eax 10ad6d: 85 c0 test %eax,%eax 10ad6f: 0f 85 4f 01 00 00 jne 10aec4 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10ad75: 8b 55 dc mov -0x24(%ebp),%edx 10ad78: 89 55 c0 mov %edx,-0x40(%ebp) 10ad7b: 89 d0 mov %edx,%eax 10ad7d: 48 dec %eax 10ad7e: 3d fd 00 00 00 cmp $0xfd,%eax 10ad83: 77 b7 ja 10ad3c <== NEVER TAKEN */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 10ad85: 83 7d cc 01 cmpl $0x1,-0x34(%ebp) 10ad89: 0f 84 55 01 00 00 je 10aee4 10ad8f: 0f 8e ef 01 00 00 jle 10af84 10ad95: 83 7d cc 02 cmpl $0x2,-0x34(%ebp) 10ad99: 0f 84 31 01 00 00 je 10aed0 <== NEVER TAKEN 10ad9f: 83 7d cc 03 cmpl $0x3,-0x34(%ebp) 10ada3: 75 97 jne 10ad3c <== NEVER TAKEN case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) < 10ada5: 83 ec 0c sub $0xc,%esp 10ada8: 8d 45 e4 lea -0x1c(%ebp),%eax 10adab: 50 push %eax 10adac: e8 ab 3f 00 00 call 10ed5c <_Timespec_To_ticks> 10adb1: 89 c6 mov %eax,%esi 10adb3: 8d 45 ec lea -0x14(%ebp),%eax 10adb6: 89 04 24 mov %eax,(%esp) 10adb9: e8 9e 3f 00 00 call 10ed5c <_Timespec_To_ticks> 10adbe: 83 c4 10 add $0x10,%esp 10adc1: 39 c6 cmp %eax,%esi 10adc3: 0f 82 73 ff ff ff jb 10ad3c _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 10adc9: 8b 45 e0 mov -0x20(%ebp),%eax 10adcc: 48 dec %eax 10adcd: 3d fd 00 00 00 cmp $0xfd,%eax 10add2: 0f 87 64 ff ff ff ja 10ad3c 10add8: c7 45 c4 03 00 00 00 movl $0x3,-0x3c(%ebp) 10addf: c7 45 c8 64 b3 10 00 movl $0x10b364,-0x38(%ebp) 10ade6: 66 90 xchg %ax,%ax #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10ade8: 83 ec 0c sub $0xc,%esp 10adeb: ff 35 b4 27 12 00 pushl 0x1227b4 10adf1: e8 82 1b 00 00 call 10c978 <_API_Mutex_Lock> * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 10adf6: c7 04 24 c0 29 12 00 movl $0x1229c0,(%esp) 10adfd: e8 e2 24 00 00 call 10d2e4 <_Objects_Allocate> 10ae02: 89 45 a8 mov %eax,-0x58(%ebp) * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10ae05: 83 c4 10 add $0x10,%esp 10ae08: 85 c0 test %eax,%eax 10ae0a: 0f 84 92 01 00 00 je 10afa2 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10ae10: 8b 75 a4 mov -0x5c(%ebp),%esi 10ae13: 8b 56 08 mov 0x8(%esi),%edx 10ae16: 50 push %eax 10ae17: 6a 00 push $0x0 10ae19: 6a 00 push $0x0 10ae1b: ff 75 c8 pushl -0x38(%ebp) 10ae1e: ff 75 c4 pushl -0x3c(%ebp) 10ae21: 6a 01 push $0x1 10ae23: b8 ff 00 00 00 mov $0xff,%eax 10ae28: 2b 45 c0 sub -0x40(%ebp),%eax 10ae2b: 50 push %eax 10ae2c: 6a 01 push $0x1 10ae2e: a1 54 e1 11 00 mov 0x11e154,%eax 10ae33: d1 e0 shl %eax 10ae35: 39 d0 cmp %edx,%eax 10ae37: 73 02 jae 10ae3b 10ae39: 89 d0 mov %edx,%eax 10ae3b: 50 push %eax 10ae3c: 8b 7d a4 mov -0x5c(%ebp),%edi 10ae3f: ff 77 04 pushl 0x4(%edi) 10ae42: ff 75 a8 pushl -0x58(%ebp) 10ae45: 68 c0 29 12 00 push $0x1229c0 10ae4a: e8 9d 32 00 00 call 10e0ec <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10ae4f: 83 c4 30 add $0x30,%esp 10ae52: 84 c0 test %al,%al 10ae54: 0f 85 9e 00 00 00 jne 10aef8 * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for 10ae5a: 83 ec 08 sub $0x8,%esp 10ae5d: ff 75 a8 pushl -0x58(%ebp) 10ae60: 68 c0 29 12 00 push $0x1229c0 10ae65: e8 3a 28 00 00 call 10d6a4 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10ae6a: 5f pop %edi 10ae6b: ff 35 b4 27 12 00 pushl 0x1227b4 10ae71: e8 4a 1b 00 00 call 10c9c0 <_API_Mutex_Unlock> 10ae76: b8 0b 00 00 00 mov $0xb,%eax 10ae7b: 83 c4 10 add $0x10,%esp 10ae7e: e9 be fe ff ff jmp 10ad41 10ae83: 90 nop Objects_Name name; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10ae84: c7 45 a4 60 ca 11 00 movl $0x11ca60,-0x5c(%ebp) 10ae8b: e9 7a fe ff ff jmp 10ad0a * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10ae90: a1 bc 27 12 00 mov 0x1227bc,%eax 10ae95: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax schedpolicy = api->schedpolicy; 10ae9b: 8b 78 7c mov 0x7c(%eax),%edi 10ae9e: 89 7d cc mov %edi,-0x34(%ebp) schedparam = api->schedparam; 10aea1: 8d 5d dc lea -0x24(%ebp),%ebx 10aea4: 8d b0 80 00 00 00 lea 0x80(%eax),%esi 10aeaa: b9 06 00 00 00 mov $0x6,%ecx 10aeaf: 89 df mov %ebx,%edi 10aeb1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10aeb3: e9 af fe ff ff jmp 10ad67 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 10aeb8: b8 0e 00 00 00 mov $0xe,%eax 10aebd: e9 7f fe ff ff jmp 10ad41 10aec2: 66 90 xchg %ax,%ax /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 10aec4: b8 86 00 00 00 mov $0x86,%eax 10aec9: e9 73 fe ff ff jmp 10ad41 10aece: 66 90 xchg %ax,%ax */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 10aed0: c7 45 c4 02 00 00 00 movl $0x2,-0x3c(%ebp) <== NOT EXECUTED 10aed7: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) <== NOT EXECUTED 10aede: e9 05 ff ff ff jmp 10ade8 <== NOT EXECUTED 10aee3: 90 nop <== NOT EXECUTED 10aee4: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 10aeeb: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 10aef2: e9 f1 fe ff ff jmp 10ade8 10aef7: 90 nop /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10aef8: 8b 45 a8 mov -0x58(%ebp),%eax 10aefb: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10af01: 89 45 d0 mov %eax,-0x30(%ebp) api->Attributes = *the_attr; 10af04: b9 0e 00 00 00 mov $0xe,%ecx 10af09: 89 c7 mov %eax,%edi 10af0b: 8b 75 a4 mov -0x5c(%ebp),%esi 10af0e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10af10: 8b 55 a4 mov -0x5c(%ebp),%edx 10af13: 8b 42 34 mov 0x34(%edx),%eax 10af16: 8b 75 d0 mov -0x30(%ebp),%esi 10af19: 89 46 38 mov %eax,0x38(%esi) api->schedpolicy = schedpolicy; 10af1c: 8b 7d cc mov -0x34(%ebp),%edi 10af1f: 89 7e 7c mov %edi,0x7c(%esi) api->schedparam = schedparam; 10af22: 89 f7 mov %esi,%edi 10af24: 83 ef 80 sub $0xffffff80,%edi 10af27: b1 06 mov $0x6,%cl 10af29: 89 de mov %ebx,%esi 10af2b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 10af2d: 8b 7d a8 mov -0x58(%ebp),%edi 10af30: c6 47 75 01 movb $0x1,0x75(%edi) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10af34: 83 ec 0c sub $0xc,%esp 10af37: 6a 00 push $0x0 10af39: ff 75 14 pushl 0x14(%ebp) 10af3c: ff 75 10 pushl 0x10(%ebp) 10af3f: 6a 01 push $0x1 10af41: 57 push %edi 10af42: e8 fd 3b 00 00 call 10eb44 <_Thread_Start> 10af47: 88 c3 mov %al,%bl start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 10af49: 83 c4 20 add $0x20,%esp 10af4c: 83 7d cc 03 cmpl $0x3,-0x34(%ebp) 10af50: 0f 84 8a 00 00 00 je 10afe0 * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 10af56: 84 db test %bl,%bl 10af58: 75 63 jne 10afbd <== ALWAYS TAKEN 10af5a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10af5d: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED 10af60: 68 c0 29 12 00 push $0x1229c0 <== NOT EXECUTED 10af65: e8 3a 27 00 00 call 10d6a4 <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10af6a: 58 pop %eax <== NOT EXECUTED 10af6b: ff 35 b4 27 12 00 pushl 0x1227b4 <== NOT EXECUTED 10af71: e8 4a 1a 00 00 call 10c9c0 <_API_Mutex_Unlock> <== NOT EXECUTED 10af76: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED 10af7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10af7e: e9 be fd ff ff jmp 10ad41 <== NOT EXECUTED 10af83: 90 nop <== NOT EXECUTED */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 10af84: 8b 45 cc mov -0x34(%ebp),%eax 10af87: 85 c0 test %eax,%eax 10af89: 0f 85 ad fd ff ff jne 10ad3c 10af8f: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) 10af96: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 10af9d: e9 46 fe ff ff jmp 10ade8 */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10afa2: 83 ec 0c sub $0xc,%esp 10afa5: ff 35 b4 27 12 00 pushl 0x1227b4 10afab: e8 10 1a 00 00 call 10c9c0 <_API_Mutex_Unlock> 10afb0: b8 0b 00 00 00 mov $0xb,%eax 10afb5: 83 c4 10 add $0x10,%esp 10afb8: e9 84 fd ff ff jmp 10ad41 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10afbd: 8b 75 a8 mov -0x58(%ebp),%esi 10afc0: 8b 46 08 mov 0x8(%esi),%eax 10afc3: 8b 7d 08 mov 0x8(%ebp),%edi 10afc6: 89 07 mov %eax,(%edi) _RTEMS_Unlock_allocator(); 10afc8: 83 ec 0c sub $0xc,%esp 10afcb: ff 35 b4 27 12 00 pushl 0x1227b4 10afd1: e8 ea 19 00 00 call 10c9c0 <_API_Mutex_Unlock> 10afd6: 31 c0 xor %eax,%eax 10afd8: 83 c4 10 add $0x10,%esp 10afdb: e9 61 fd ff ff jmp 10ad41 arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10afe0: 83 ec 0c sub $0xc,%esp 10afe3: 8b 45 d0 mov -0x30(%ebp),%eax 10afe6: 05 88 00 00 00 add $0x88,%eax 10afeb: 50 push %eax 10afec: e8 6b 3d 00 00 call 10ed5c <_Timespec_To_ticks> * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10aff1: 8b 55 d0 mov -0x30(%ebp),%edx 10aff4: 89 82 a8 00 00 00 mov %eax,0xa8(%edx) void *starting_address, size_t *size 10affa: 59 pop %ecx 10affb: 5e pop %esi 10affc: 89 d0 mov %edx,%eax 10affe: 05 9c 00 00 00 add $0x9c,%eax 10b003: 50 push %eax 10b004: 68 dc 27 12 00 push $0x1227dc 10b009: e8 d6 40 00 00 call 10f0e4 <_Watchdog_Insert> 10b00e: 83 c4 10 add $0x10,%esp 10b011: e9 40 ff ff ff jmp 10af56 =============================================================================== 0010a420 : #include int pthread_detach( pthread_t thread ) { 10a420: 55 push %ebp 10a421: 89 e5 mov %esp,%ebp 10a423: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _Thread_Get( thread, &location ); 10a426: 8d 45 fc lea -0x4(%ebp),%eax 10a429: 50 push %eax 10a42a: ff 75 08 pushl 0x8(%ebp) 10a42d: e8 42 2d 00 00 call 10d174 <_Thread_Get> switch ( location ) { 10a432: 83 c4 10 add $0x10,%esp 10a435: 8b 55 fc mov -0x4(%ebp),%edx 10a438: 85 d2 test %edx,%edx 10a43a: 75 18 jne 10a454 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10a43c: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10a442: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) _Thread_Enable_dispatch(); 10a449: e8 02 2d 00 00 call 10d150 <_Thread_Enable_dispatch> 10a44e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10a450: c9 leave 10a451: c3 ret 10a452: 66 90 xchg %ax,%ax register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _Thread_Get( thread, &location ); switch ( location ) { 10a454: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10a459: c9 leave 10a45a: c3 ret =============================================================================== 0011080c : } void pthread_exit( void *value_ptr ) { 11080c: 55 push %ebp 11080d: 89 e5 mov %esp,%ebp 11080f: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 110812: ff 75 08 pushl 0x8(%ebp) 110815: ff 35 bc f9 11 00 pushl 0x11f9bc 11081b: e8 88 ff ff ff call 1107a8 <_POSIX_Thread_Exit> 110820: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 110823: c9 leave <== NOT EXECUTED 110824: c3 ret <== NOT EXECUTED =============================================================================== 0010c55c : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10c55c: 55 push %ebp 10c55d: 89 e5 mov %esp,%ebp 10c55f: 57 push %edi 10c560: 56 push %esi 10c561: 53 push %ebx 10c562: 83 ec 1c sub $0x1c,%esp 10c565: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10c568: 85 f6 test %esi,%esi 10c56a: 74 6c je 10c5d8 10c56c: 8b 55 10 mov 0x10(%ebp),%edx 10c56f: 85 d2 test %edx,%edx 10c571: 74 65 je 10c5d8 return EINVAL; the_thread = _Thread_Get( thread, &location ); 10c573: 83 ec 08 sub $0x8,%esp 10c576: 8d 45 f0 lea -0x10(%ebp),%eax 10c579: 50 push %eax 10c57a: ff 75 08 pushl 0x8(%ebp) 10c57d: e8 3a 2e 00 00 call 10f3bc <_Thread_Get> 10c582: 89 c3 mov %eax,%ebx switch ( location ) { 10c584: 83 c4 10 add $0x10,%esp 10c587: 8b 45 f0 mov -0x10(%ebp),%eax 10c58a: 85 c0 test %eax,%eax 10c58c: 75 3a jne 10c5c8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c58e: 8b 93 f8 00 00 00 mov 0xf8(%ebx),%edx if ( policy ) *policy = api->schedpolicy; 10c594: 8b 42 7c mov 0x7c(%edx),%eax 10c597: 89 06 mov %eax,(%esi) if ( param ) { *param = api->schedparam; 10c599: 8d b2 80 00 00 00 lea 0x80(%edx),%esi 10c59f: b9 06 00 00 00 mov $0x6,%ecx 10c5a4: 8b 7d 10 mov 0x10(%ebp),%edi 10c5a7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10c5a9: b8 ff 00 00 00 mov $0xff,%eax 10c5ae: 2b 43 14 sub 0x14(%ebx),%eax 10c5b1: 8b 55 10 mov 0x10(%ebp),%edx 10c5b4: 89 02 mov %eax,(%edx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10c5b6: e8 dd 2d 00 00 call 10f398 <_Thread_Enable_dispatch> 10c5bb: 31 c0 xor %eax,%eax break; } return ESRCH; } 10c5bd: 8d 65 f4 lea -0xc(%ebp),%esp 10c5c0: 5b pop %ebx 10c5c1: 5e pop %esi 10c5c2: 5f pop %edi 10c5c3: c9 leave 10c5c4: c3 ret 10c5c5: 8d 76 00 lea 0x0(%esi),%esi if ( !policy || !param ) return EINVAL; the_thread = _Thread_Get( thread, &location ); switch ( location ) { 10c5c8: b8 03 00 00 00 mov $0x3,%eax break; } return ESRCH; } 10c5cd: 8d 65 f4 lea -0xc(%ebp),%esp 10c5d0: 5b pop %ebx 10c5d1: 5e pop %esi 10c5d2: 5f pop %edi 10c5d3: c9 leave 10c5d4: c3 ret 10c5d5: 8d 76 00 lea 0x0(%esi),%esi *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); return 0; 10c5d8: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10c5dd: 8d 65 f4 lea -0xc(%ebp),%esp 10c5e0: 5b pop %ebx 10c5e1: 5e pop %esi 10c5e2: 5f pop %edi 10c5e3: c9 leave 10c5e4: c3 ret =============================================================================== 0010a2b0 : */ void *pthread_getspecific( pthread_key_t key ) { 10a2b0: 55 push %ebp 10a2b1: 89 e5 mov %esp,%ebp 10a2b3: 53 push %ebx 10a2b4: 83 ec 18 sub $0x18,%esp static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) 10a2b7: 8d 45 f8 lea -0x8(%ebp),%eax 10a2ba: 50 push %eax 10a2bb: ff 75 08 pushl 0x8(%ebp) 10a2be: 68 60 28 12 00 push $0x122860 10a2c3: e8 ec 27 00 00 call 10cab4 <_Objects_Get> 10a2c8: 89 c1 mov %eax,%ecx uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10a2ca: 83 c4 10 add $0x10,%esp 10a2cd: 8b 45 f8 mov -0x8(%ebp),%eax 10a2d0: 85 c0 test %eax,%eax 10a2d2: 75 2c jne 10a300 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10a2d4: a1 7c 24 12 00 mov 0x12247c,%eax 10a2d9: 8b 50 08 mov 0x8(%eax),%edx index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 10a2dc: 89 d0 mov %edx,%eax 10a2de: c1 e8 18 shr $0x18,%eax 10a2e1: 83 e0 07 and $0x7,%eax 10a2e4: 81 e2 ff ff 00 00 and $0xffff,%edx 10a2ea: 8b 44 81 18 mov 0x18(%ecx,%eax,4),%eax 10a2ee: 8b 1c 90 mov (%eax,%edx,4),%ebx _Thread_Enable_dispatch(); 10a2f1: e8 02 30 00 00 call 10d2f8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return NULL; } 10a2f6: 89 d8 mov %ebx,%eax 10a2f8: 8b 5d fc mov -0x4(%ebp),%ebx 10a2fb: c9 leave 10a2fc: c3 ret 10a2fd: 8d 76 00 lea 0x0(%esi),%esi uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10a300: 31 db xor %ebx,%ebx case OBJECTS_ERROR: break; } return NULL; } 10a302: 89 d8 mov %ebx,%eax 10a304: 8b 5d fc mov -0x4(%ebp),%ebx 10a307: c9 leave 10a308: c3 ret =============================================================================== 0010a0f0 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10a0f0: 55 push %ebp 10a0f1: 89 e5 mov %esp,%ebp 10a0f3: 57 push %edi 10a0f4: 56 push %esi 10a0f5: 53 push %ebx 10a0f6: 83 ec 18 sub $0x18,%esp 10a0f9: a1 b8 23 12 00 mov 0x1223b8,%eax 10a0fe: 40 inc %eax 10a0ff: a3 b8 23 12 00 mov %eax,0x1223b8 * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 10a104: 68 60 28 12 00 push $0x122860 10a109: e8 b2 24 00 00 call 10c5c0 <_Objects_Allocate> 10a10e: 89 45 f0 mov %eax,-0x10(%ebp) _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10a111: 83 c4 10 add $0x10,%esp 10a114: 85 c0 test %eax,%eax 10a116: 0f 84 8c 00 00 00 je 10a1a8 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10a11c: 8b 55 0c mov 0xc(%ebp),%edx 10a11f: 8b 45 f0 mov -0x10(%ebp),%eax 10a122: 89 50 14 mov %edx,0x14(%eax) 10a125: bb 01 00 00 00 mov $0x1,%ebx for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 10a12a: 8b 04 9d 8c 23 12 00 mov 0x12238c(,%ebx,4),%eax 10a131: 85 c0 test %eax,%eax 10a133: 74 63 je 10a198 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10a135: 8b 40 04 mov 0x4(%eax),%eax 10a138: 0f b7 40 10 movzwl 0x10(%eax),%eax 10a13c: 8d 34 85 04 00 00 00 lea 0x4(,%eax,4),%esi (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 10a143: 83 ec 0c sub $0xc,%esp 10a146: 56 push %esi 10a147: e8 fc 43 00 00 call 10e548 <_Workspace_Allocate> 10a14c: 89 c7 mov %eax,%edi if ( !table ) { 10a14e: 83 c4 10 add $0x10,%esp 10a151: 85 c0 test %eax,%eax 10a153: 74 67 je 10a1bc _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10a155: 8b 55 f0 mov -0x10(%ebp),%edx 10a158: 89 44 9a 18 mov %eax,0x18(%edx,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10a15c: 89 f1 mov %esi,%ecx 10a15e: 31 c0 xor %eax,%eax 10a160: f3 aa rep stos %al,%es:(%edi) * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10a162: 43 inc %ebx * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 10a163: 83 fb 05 cmp $0x5,%ebx 10a166: 75 c2 jne 10a12a } } the_key->is_active = TRUE; 10a168: 8b 5d f0 mov -0x10(%ebp),%ebx 10a16b: c6 43 10 01 movb $0x1,0x10(%ebx) 10a16f: 8b 4b 08 mov 0x8(%ebx),%ecx 10a172: 0f b7 d1 movzwl %cx,%edx 10a175: a1 7c 28 12 00 mov 0x12287c,%eax 10a17a: 89 1c 90 mov %ebx,(%eax,%edx,4) 10a17d: 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; 10a184: 8b 45 08 mov 0x8(%ebp),%eax 10a187: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 10a189: e8 6a 31 00 00 call 10d2f8 <_Thread_Enable_dispatch> 10a18e: 31 c0 xor %eax,%eax return 0; } 10a190: 8d 65 f4 lea -0xc(%ebp),%esp 10a193: 5b pop %ebx 10a194: 5e pop %esi 10a195: 5f pop %edi 10a196: c9 leave 10a197: c3 ret } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 10a198: 8b 55 f0 mov -0x10(%ebp),%edx 10a19b: c7 44 9a 18 00 00 00 movl $0x0,0x18(%edx,%ebx,4) 10a1a2: 00 10a1a3: eb bd jmp 10a162 10a1a5: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10a1a8: e8 4b 31 00 00 call 10d2f8 <_Thread_Enable_dispatch> 10a1ad: b8 0b 00 00 00 mov $0xb,%eax *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10a1b2: 8d 65 f4 lea -0xc(%ebp),%esp 10a1b5: 5b pop %ebx 10a1b6: 5e pop %esi 10a1b7: 5f pop %edi 10a1b8: c9 leave 10a1b9: c3 ret 10a1ba: 66 90 xchg %ax,%ax bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 10a1bc: 89 de mov %ebx,%esi 10a1be: 4e dec %esi 10a1bf: 74 1a je 10a1db <== ALWAYS TAKEN 10a1c1: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10a1c4: 8d 5c 98 14 lea 0x14(%eax,%ebx,4),%ebx <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 10a1c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a1cb: ff 33 pushl (%ebx) <== NOT EXECUTED 10a1cd: e8 5e 43 00 00 call 10e530 <_Workspace_Free> <== NOT EXECUTED (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 10a1d2: 83 eb 04 sub $0x4,%ebx <== NOT EXECUTED bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 10a1d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a1d8: 4e dec %esi <== NOT EXECUTED 10a1d9: 75 ed jne 10a1c8 <== NOT EXECUTED * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for 10a1db: 83 ec 08 sub $0x8,%esp 10a1de: ff 75 f0 pushl -0x10(%ebp) 10a1e1: 68 60 28 12 00 push $0x122860 10a1e6: e8 95 27 00 00 call 10c980 <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10a1eb: e8 08 31 00 00 call 10d2f8 <_Thread_Enable_dispatch> 10a1f0: b8 0c 00 00 00 mov $0xc,%eax 10a1f5: 83 c4 10 add $0x10,%esp 10a1f8: eb 96 jmp 10a190 =============================================================================== 0010a1fc : */ int pthread_key_delete( pthread_key_t key ) { 10a1fc: 55 push %ebp 10a1fd: 89 e5 mov %esp,%ebp 10a1ff: 53 push %ebx 10a200: 83 ec 18 sub $0x18,%esp static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) 10a203: 8d 45 f8 lea -0x8(%ebp),%eax 10a206: 50 push %eax 10a207: ff 75 08 pushl 0x8(%ebp) 10a20a: 68 60 28 12 00 push $0x122860 10a20f: e8 a0 28 00 00 call 10cab4 <_Objects_Get> 10a214: 89 c3 mov %eax,%ebx register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10a216: 83 c4 10 add $0x10,%esp 10a219: 8b 45 f8 mov -0x8(%ebp),%eax 10a21c: 85 c0 test %eax,%eax 10a21e: 0f 85 80 00 00 00 jne 10a2a4 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 10a224: 83 ec 08 sub $0x8,%esp 10a227: 53 push %ebx 10a228: 68 60 28 12 00 push $0x122860 10a22d: e8 0e 24 00 00 call 10c640 <_Objects_Close> the_key->is_active = FALSE; 10a232: c6 43 10 00 movb $0x0,0x10(%ebx) for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 10a236: 8b 43 1c mov 0x1c(%ebx),%eax 10a239: 83 c4 10 add $0x10,%esp 10a23c: 85 c0 test %eax,%eax 10a23e: 74 0c je 10a24c <== NEVER TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 10a240: 83 ec 0c sub $0xc,%esp 10a243: 50 push %eax 10a244: e8 e7 42 00 00 call 10e530 <_Workspace_Free> 10a249: 83 c4 10 add $0x10,%esp the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 10a24c: 8b 43 20 mov 0x20(%ebx),%eax 10a24f: 85 c0 test %eax,%eax 10a251: 74 0c je 10a25f <== NEVER TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 10a253: 83 ec 0c sub $0xc,%esp 10a256: 50 push %eax 10a257: e8 d4 42 00 00 call 10e530 <_Workspace_Free> 10a25c: 83 c4 10 add $0x10,%esp the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 10a25f: 8b 43 24 mov 0x24(%ebx),%eax 10a262: 85 c0 test %eax,%eax 10a264: 74 0c je 10a272 <== NEVER TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 10a266: 83 ec 0c sub $0xc,%esp 10a269: 50 push %eax 10a26a: e8 c1 42 00 00 call 10e530 <_Workspace_Free> 10a26f: 83 c4 10 add $0x10,%esp the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 10a272: 8b 43 28 mov 0x28(%ebx),%eax 10a275: 85 c0 test %eax,%eax 10a277: 74 0c je 10a285 <== ALWAYS TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 10a279: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a27c: 50 push %eax <== NOT EXECUTED 10a27d: e8 ae 42 00 00 call 10e530 <_Workspace_Free> <== NOT EXECUTED 10a282: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for 10a285: 83 ec 08 sub $0x8,%esp 10a288: 53 push %ebx 10a289: 68 60 28 12 00 push $0x122860 10a28e: e8 ed 26 00 00 call 10c980 <_Objects_Free> * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10a293: e8 60 30 00 00 call 10d2f8 <_Thread_Enable_dispatch> 10a298: 31 c0 xor %eax,%eax 10a29a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10a29d: 8b 5d fc mov -0x4(%ebp),%ebx 10a2a0: c9 leave 10a2a1: c3 ret 10a2a2: 66 90 xchg %ax,%ax register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10a2a4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a2a9: 8b 5d fc mov -0x4(%ebp),%ebx 10a2ac: c9 leave 10a2ad: c3 ret =============================================================================== 0011a4f0 : int pthread_kill( pthread_t thread, int sig ) { 11a4f0: 55 push %ebp 11a4f1: 89 e5 mov %esp,%ebp 11a4f3: 57 push %edi 11a4f4: 56 push %esi 11a4f5: 53 push %ebx 11a4f6: 83 ec 1c sub $0x1c,%esp 11a4f9: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 11a4fc: 85 f6 test %esi,%esi 11a4fe: 0f 84 84 00 00 00 je 11a588 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 11a504: 8d 7e ff lea -0x1(%esi),%edi 11a507: 83 ff 1f cmp $0x1f,%edi 11a50a: 77 7c ja 11a588 rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _Thread_Get( thread, &location ); 11a50c: 83 ec 08 sub $0x8,%esp 11a50f: 8d 45 f0 lea -0x10(%ebp),%eax 11a512: 50 push %eax 11a513: ff 75 08 pushl 0x8(%ebp) 11a516: e8 91 33 ff ff call 10d8ac <_Thread_Get> 11a51b: 89 c3 mov %eax,%ebx switch ( location ) { 11a51d: 83 c4 10 add $0x10,%esp 11a520: 8b 55 f0 mov -0x10(%ebp),%edx 11a523: 85 d2 test %edx,%edx 11a525: 75 75 jne 11a59c <== NEVER TAKEN case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11a527: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 11a52d: 8d 04 76 lea (%esi,%esi,2),%eax 11a530: 83 3c 85 88 bf 12 00 cmpl $0x1,0x12bf88(,%eax,4) 11a537: 01 11a538: 74 31 je 11a56b <== NEVER TAKEN return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 11a53a: b8 01 00 00 00 mov $0x1,%eax 11a53f: 89 f9 mov %edi,%ecx 11a541: d3 e0 shl %cl,%eax 11a543: 09 82 c8 00 00 00 or %eax,0xc8(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 11a549: 50 push %eax 11a54a: 6a 00 push $0x0 11a54c: 56 push %esi 11a54d: 53 push %ebx 11a54e: e8 81 fe ff ff call 11a3d4 <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 11a553: c6 43 75 01 movb $0x1,0x75(%ebx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11a557: a1 98 b9 12 00 mov 0x12b998,%eax 11a55c: 83 c4 10 add $0x10,%esp 11a55f: 85 c0 test %eax,%eax 11a561: 74 08 je 11a56b 11a563: 3b 1d bc b9 12 00 cmp 0x12b9bc,%ebx 11a569: 74 11 je 11a57c <== NEVER TAKEN _ISR_Signals_to_thread_executing = TRUE; } _Thread_Enable_dispatch(); 11a56b: e8 ec 32 ff ff call 10d85c <_Thread_Enable_dispatch> 11a570: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 11a572: 8d 65 f4 lea -0xc(%ebp),%esp 11a575: 5b pop %ebx 11a576: 5e pop %esi 11a577: 5f pop %edi 11a578: c9 leave 11a579: c3 ret 11a57a: 66 90 xchg %ax,%ax (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = TRUE; 11a57c: c6 05 68 ba 12 00 01 movb $0x1,0x12ba68 <== NOT EXECUTED 11a583: eb e6 jmp 11a56b <== NOT EXECUTED 11a585: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 11a588: e8 d3 7d ff ff call 112360 <__errno> 11a58d: c7 00 16 00 00 00 movl $0x16,(%eax) 11a593: b8 ff ff ff ff mov $0xffffffff,%eax 11a598: eb d8 jmp 11a572 11a59a: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 11a59c: e8 bf 7d ff ff call 112360 <__errno> <== NOT EXECUTED 11a5a1: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 11a5a7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11a5ac: eb c4 jmp 11a572 <== NOT EXECUTED =============================================================================== 0010bcbc : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10bcbc: 55 push %ebp 10bcbd: 89 e5 mov %esp,%ebp 10bcbf: 53 push %ebx 10bcc0: 83 ec 1c sub $0x1c,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10bcc3: 8d 45 f8 lea -0x8(%ebp),%eax 10bcc6: 50 push %eax 10bcc7: ff 75 08 pushl 0x8(%ebp) 10bcca: e8 c5 00 00 00 call 10bd94 <_POSIX_Mutex_Get> 10bccf: 89 c3 mov %eax,%ebx switch ( location ) { 10bcd1: 83 c4 10 add $0x10,%esp 10bcd4: 8b 45 f8 mov -0x8(%ebp),%eax 10bcd7: 85 c0 test %eax,%eax 10bcd9: 74 0d je 10bce8 10bcdb: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bce0: 8b 5d fc mov -0x4(%ebp),%ebx 10bce3: c9 leave 10bce4: c3 ret 10bce5: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ) ) { 10bce8: 8b 4b 64 mov 0x64(%ebx),%ecx 10bceb: 85 c9 test %ecx,%ecx 10bced: 75 11 jne 10bd00 _Thread_Enable_dispatch(); 10bcef: e8 a4 36 00 00 call 10f398 <_Thread_Enable_dispatch> 10bcf4: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bcf9: 8b 5d fc mov -0x4(%ebp),%ebx 10bcfc: c9 leave 10bcfd: c3 ret 10bcfe: 66 90 xchg %ax,%ax if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 10bd00: 83 ec 08 sub $0x8,%esp 10bd03: 53 push %ebx 10bd04: 68 e0 56 12 00 push $0x1256e0 10bd09: e8 d2 29 00 00 call 10e6e0 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10bd0e: 83 c4 0c add $0xc,%esp 10bd11: 6a 16 push $0x16 10bd13: 6a 00 push $0x0 10bd15: 8d 43 14 lea 0x14(%ebx),%eax 10bd18: 50 push %eax 10bd19: e8 1a 22 00 00 call 10df38 <_CORE_mutex_Flush> * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for 10bd1e: 58 pop %eax 10bd1f: 5a pop %edx 10bd20: 53 push %ebx 10bd21: 68 e0 56 12 00 push $0x1256e0 10bd26: e8 f5 2c 00 00 call 10ea20 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10bd2b: e8 68 36 00 00 call 10f398 <_Thread_Enable_dispatch> 10bd30: 31 c0 xor %eax,%eax 10bd32: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10bd35: 8b 5d fc mov -0x4(%ebp),%ebx 10bd38: c9 leave 10bd39: c3 ret =============================================================================== 0010be34 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10be34: 55 push %ebp 10be35: 89 e5 mov %esp,%ebp 10be37: 57 push %edi 10be38: 56 push %esi 10be39: 53 push %ebx 10be3a: 83 ec 0c sub $0xc,%esp 10be3d: 8b 45 0c mov 0xc(%ebp),%eax #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 10be40: 85 c0 test %eax,%eax 10be42: 0f 84 e0 00 00 00 je 10bf28 10be48: 89 c3 mov %eax,%ebx else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10be4a: 8b 75 08 mov 0x8(%ebp),%esi 10be4d: 85 f6 test %esi,%esi 10be4f: 0f 84 c3 00 00 00 je 10bf18 break; } } #endif if ( !the_attr->is_initialized ) 10be55: 8b 0b mov (%ebx),%ecx 10be57: 85 c9 test %ecx,%ecx 10be59: 0f 84 b9 00 00 00 je 10bf18 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 10be5f: 8b 53 04 mov 0x4(%ebx),%edx 10be62: 85 d2 test %edx,%edx 10be64: 0f 85 ee 00 00 00 jne 10bf58 <== NEVER TAKEN /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10be6a: 8b 43 0c mov 0xc(%ebx),%eax 10be6d: 83 f8 01 cmp $0x1,%eax 10be70: 0f 84 be 00 00 00 je 10bf34 10be76: 83 f8 02 cmp $0x2,%eax 10be79: 0f 84 c1 00 00 00 je 10bf40 10be7f: 85 c0 test %eax,%eax 10be81: 0f 85 91 00 00 00 jne 10bf18 10be87: 31 ff xor %edi,%edi break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 10be89: 8b 43 08 mov 0x8(%ebx),%eax 10be8c: 48 dec %eax 10be8d: 3d fd 00 00 00 cmp $0xfd,%eax 10be92: 0f 87 80 00 00 00 ja 10bf18 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10be98: a1 d8 52 12 00 mov 0x1252d8,%eax 10be9d: 40 inc %eax 10be9e: a3 d8 52 12 00 mov %eax,0x1252d8 * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 10bea3: 83 ec 0c sub $0xc,%esp 10bea6: 68 e0 56 12 00 push $0x1256e0 10beab: e8 b0 27 00 00 call 10e660 <_Objects_Allocate> 10beb0: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10beb2: 83 c4 10 add $0x10,%esp 10beb5: 85 c0 test %eax,%eax 10beb7: 0f 84 8f 00 00 00 je 10bf4c _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10bebd: 8b 43 04 mov 0x4(%ebx),%eax 10bec0: 89 46 10 mov %eax,0x10(%esi) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10bec3: 31 c0 xor %eax,%eax 10bec5: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10bec9: 0f 94 c0 sete %al 10becc: 89 46 54 mov %eax,0x54(%esi) else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 10becf: c6 46 58 01 movb $0x1,0x58(%esi) the_mutex_attr->priority_ceiling = 10bed3: b8 ff 00 00 00 mov $0xff,%eax 10bed8: 2b 43 08 sub 0x8(%ebx),%eax 10bedb: 89 46 60 mov %eax,0x60(%esi) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10bede: 89 7e 5c mov %edi,0x5c(%esi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10bee1: 50 push %eax 10bee2: 6a 01 push $0x1 10bee4: 8d 46 54 lea 0x54(%esi),%eax 10bee7: 50 push %eax 10bee8: 8d 46 14 lea 0x14(%esi),%eax 10beeb: 50 push %eax 10beec: e8 53 20 00 00 call 10df44 <_CORE_mutex_Initialize> 10bef1: 8b 4e 08 mov 0x8(%esi),%ecx 10bef4: 0f b7 d1 movzwl %cx,%edx 10bef7: a1 fc 56 12 00 mov 0x1256fc,%eax 10befc: 89 34 90 mov %esi,(%eax,%edx,4) 10beff: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 10bf06: 8b 45 08 mov 0x8(%ebp),%eax 10bf09: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 10bf0b: e8 88 34 00 00 call 10f398 <_Thread_Enable_dispatch> 10bf10: 31 c0 xor %eax,%eax 10bf12: 83 c4 10 add $0x10,%esp 10bf15: eb 06 jmp 10bf1d 10bf17: 90 nop return 0; 10bf18: b8 16 00 00 00 mov $0x16,%eax } 10bf1d: 8d 65 f4 lea -0xc(%ebp),%esp 10bf20: 5b pop %ebx 10bf21: 5e pop %esi 10bf22: 5f pop %edi 10bf23: c9 leave 10bf24: c3 ret 10bf25: 8d 76 00 lea 0x0(%esi),%esi #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 10bf28: bb c8 e7 11 00 mov $0x11e7c8,%ebx 10bf2d: e9 18 ff ff ff jmp 10be4a 10bf32: 66 90 xchg %ax,%ax /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10bf34: bf 02 00 00 00 mov $0x2,%edi 10bf39: e9 4b ff ff ff jmp 10be89 10bf3e: 66 90 xchg %ax,%ax 10bf40: bf 03 00 00 00 mov $0x3,%edi 10bf45: e9 3f ff ff ff jmp 10be89 10bf4a: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10bf4c: e8 47 34 00 00 call 10f398 <_Thread_Enable_dispatch> 10bf51: b8 0b 00 00 00 mov $0xb,%eax 10bf56: eb c5 jmp 10bf1d /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 10bf58: 68 dc e7 11 00 push $0x11e7dc <== NOT EXECUTED 10bf5d: 68 59 e8 11 00 push $0x11e859 <== NOT EXECUTED 10bf62: 6a 68 push $0x68 <== NOT EXECUTED 10bf64: 68 10 e8 11 00 push $0x11e810 <== NOT EXECUTED 10bf69: e8 8a ce ff ff call 108df8 <__assert_func> <== NOT EXECUTED =============================================================================== 0010bfe8 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10bfe8: 55 push %ebp 10bfe9: 89 e5 mov %esp,%ebp 10bfeb: 56 push %esi 10bfec: 53 push %ebx 10bfed: 83 ec 10 sub $0x10,%esp 10bff0: 8b 75 10 mov 0x10(%ebp),%esi register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 10bff3: 85 f6 test %esi,%esi 10bff5: 74 0b je 10c002 <== NEVER TAKEN return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10bff7: 8b 45 0c mov 0xc(%ebp),%eax 10bffa: 48 dec %eax 10bffb: 3d fd 00 00 00 cmp $0xfd,%eax 10c000: 76 0e jbe 10c010 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); return 0; 10c002: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10c007: 89 d8 mov %ebx,%eax 10c009: 8d 65 f8 lea -0x8(%ebp),%esp 10c00c: 5b pop %ebx 10c00d: 5e pop %esi 10c00e: c9 leave 10c00f: c3 ret /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 10c010: 83 ec 0c sub $0xc,%esp 10c013: ff 75 08 pushl 0x8(%ebp) 10c016: e8 55 ff ff ff call 10bf70 10c01b: 89 c3 mov %eax,%ebx if ( status ) 10c01d: 83 c4 10 add $0x10,%esp 10c020: 85 c0 test %eax,%eax 10c022: 75 e3 jne 10c007 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10c024: 83 ec 08 sub $0x8,%esp 10c027: 8d 45 f4 lea -0xc(%ebp),%eax 10c02a: 50 push %eax 10c02b: ff 75 08 pushl 0x8(%ebp) 10c02e: e8 61 fd ff ff call 10bd94 <_POSIX_Mutex_Get> 10c033: 89 c1 mov %eax,%ecx switch ( location ) { 10c035: 83 c4 10 add $0x10,%esp 10c038: 8b 55 f4 mov -0xc(%ebp),%edx 10c03b: 85 d2 test %edx,%edx 10c03d: 75 c3 jne 10c002 <== NEVER TAKEN case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 10c03f: b8 ff 00 00 00 mov $0xff,%eax 10c044: 89 c2 mov %eax,%edx 10c046: 2b 51 60 sub 0x60(%ecx),%edx 10c049: 89 16 mov %edx,(%esi) the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 10c04b: 2b 45 0c sub 0xc(%ebp),%eax 10c04e: 89 41 60 mov %eax,0x60(%ecx) _CORE_mutex_Surrender( 10c051: 50 push %eax 10c052: 6a 00 push $0x0 10c054: ff 71 08 pushl 0x8(%ecx) 10c057: 8d 41 14 lea 0x14(%ecx),%eax 10c05a: 50 push %eax 10c05b: e8 78 20 00 00 call 10e0d8 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10c060: e8 33 33 00 00 call 10f398 <_Thread_Enable_dispatch> 10c065: 83 c4 10 add $0x10,%esp 10c068: eb 9d jmp 10c007 =============================================================================== 0010c06c : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10c06c: 55 push %ebp 10c06d: 89 e5 mov %esp,%ebp 10c06f: 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. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10c072: 8d 45 fc lea -0x4(%ebp),%eax 10c075: 50 push %eax 10c076: ff 75 0c pushl 0xc(%ebp) 10c079: e8 aa 00 00 00 call 10c128 <_POSIX_Absolute_timeout_to_ticks> switch ( status ) { 10c07e: 83 c4 10 add $0x10,%esp 10c081: 83 f8 02 cmp $0x2,%eax 10c084: 76 05 jbe 10c08b <== NEVER TAKEN 10c086: 83 f8 03 cmp $0x3,%eax 10c089: 74 15 je 10c0a0 <== ALWAYS TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 10c08b: 52 push %edx <== NOT EXECUTED 10c08c: ff 75 fc pushl -0x4(%ebp) <== NOT EXECUTED 10c08f: 6a 00 push $0x0 <== NOT EXECUTED 10c091: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10c094: e8 eb fe ff ff call 10bf84 <_POSIX_Mutex_Lock_support><== NOT EXECUTED 10c099: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } return lock_status; } 10c09c: c9 leave <== NOT EXECUTED 10c09d: c3 ret <== NOT EXECUTED 10c09e: 66 90 xchg %ax,%ax <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 10c0a0: 50 push %eax 10c0a1: ff 75 fc pushl -0x4(%ebp) 10c0a4: 6a 01 push $0x1 10c0a6: ff 75 08 pushl 0x8(%ebp) 10c0a9: e8 d6 fe ff ff call 10bf84 <_POSIX_Mutex_Lock_support> 10c0ae: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10c0b1: c9 leave 10c0b2: c3 ret =============================================================================== 0010bb68 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10bb68: 55 push %ebp 10bb69: 89 e5 mov %esp,%ebp 10bb6b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10bb6e: 85 c0 test %eax,%eax 10bb70: 74 12 je 10bb84 10bb72: 8b 10 mov (%eax),%edx 10bb74: 85 d2 test %edx,%edx 10bb76: 74 0c je 10bb84 return EINVAL; attr->is_initialized = FALSE; 10bb78: c7 00 00 00 00 00 movl $0x0,(%eax) 10bb7e: 31 c0 xor %eax,%eax return 0; } 10bb80: c9 leave 10bb81: c3 ret 10bb82: 66 90 xchg %ax,%ax { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = FALSE; return 0; 10bb84: b8 16 00 00 00 mov $0x16,%eax } 10bb89: c9 leave 10bb8a: c3 ret =============================================================================== 0010bc04 : */ int pthread_mutexattr_init( pthread_mutexattr_t *attr ) { 10bc04: 55 push %ebp 10bc05: 89 e5 mov %esp,%ebp 10bc07: 57 push %edi 10bc08: 56 push %esi 10bc09: 83 ec 04 sub $0x4,%esp 10bc0c: 8b 7d 08 mov 0x8(%ebp),%edi if ( !attr ) 10bc0f: 85 ff test %edi,%edi 10bc11: 74 15 je 10bc28 return EINVAL; *attr = _POSIX_Mutex_Default_attributes; 10bc13: be c8 e7 11 00 mov $0x11e7c8,%esi 10bc18: b9 05 00 00 00 mov $0x5,%ecx 10bc1d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bc1f: 31 c0 xor %eax,%eax return 0; } 10bc21: 5a pop %edx 10bc22: 5e pop %esi 10bc23: 5f pop %edi 10bc24: c9 leave 10bc25: c3 ret 10bc26: 66 90 xchg %ax,%ax int pthread_mutexattr_init( pthread_mutexattr_t *attr ) { if ( !attr ) 10bc28: b8 16 00 00 00 mov $0x16,%eax return EINVAL; *attr = _POSIX_Mutex_Default_attributes; return 0; } 10bc2d: 5a pop %edx 10bc2e: 5e pop %esi 10bc2f: 5f pop %edi 10bc30: c9 leave 10bc31: c3 ret =============================================================================== 0010bc34 : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10bc34: 55 push %ebp 10bc35: 89 e5 mov %esp,%ebp 10bc37: 8b 55 08 mov 0x8(%ebp),%edx if ( !attr || !attr->is_initialized ) 10bc3a: 85 d2 test %edx,%edx 10bc3c: 74 1e je 10bc5c 10bc3e: 8b 02 mov (%edx),%eax 10bc40: 85 c0 test %eax,%eax 10bc42: 74 18 je 10bc5c return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10bc44: 8b 45 0c mov 0xc(%ebp),%eax 10bc47: 48 dec %eax 10bc48: 3d fd 00 00 00 cmp $0xfd,%eax 10bc4d: 77 0d ja 10bc5c return EINVAL; attr->prio_ceiling = prioceiling; 10bc4f: 8b 45 0c mov 0xc(%ebp),%eax 10bc52: 89 42 08 mov %eax,0x8(%edx) 10bc55: 31 c0 xor %eax,%eax return 0; } 10bc57: c9 leave 10bc58: c3 ret 10bc59: 8d 76 00 lea 0x0(%esi),%esi if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; 10bc5c: b8 16 00 00 00 mov $0x16,%eax } 10bc61: c9 leave 10bc62: c3 ret =============================================================================== 0010bc64 : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10bc64: 55 push %ebp 10bc65: 89 e5 mov %esp,%ebp 10bc67: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10bc6a: 85 c0 test %eax,%eax 10bc6c: 74 0c je 10bc7a 10bc6e: 8b 10 mov (%eax),%edx 10bc70: 85 d2 test %edx,%edx 10bc72: 74 06 je 10bc7a return EINVAL; switch ( protocol ) { 10bc74: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10bc78: 76 0a jbe 10bc84 case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; 10bc7a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bc7f: c9 leave 10bc80: c3 ret 10bc81: 8d 76 00 lea 0x0(%esi),%esi switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10bc84: 8b 55 0c mov 0xc(%ebp),%edx 10bc87: 89 50 0c mov %edx,0xc(%eax) 10bc8a: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10bc8c: c9 leave 10bc8d: c3 ret =============================================================================== 0010bc90 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10bc90: 55 push %ebp 10bc91: 89 e5 mov %esp,%ebp 10bc93: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10bc96: 85 c0 test %eax,%eax 10bc98: 74 0c je 10bca6 10bc9a: 8b 10 mov (%eax),%edx 10bc9c: 85 d2 test %edx,%edx 10bc9e: 74 06 je 10bca6 return EINVAL; switch ( pshared ) { 10bca0: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10bca4: 76 0a jbe 10bcb0 <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10bca6: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bcab: c9 leave 10bcac: c3 ret 10bcad: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10bcb0: 8b 55 0c mov 0xc(%ebp),%edx 10bcb3: 89 50 04 mov %edx,0x4(%eax) 10bcb6: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10bcb8: c9 leave 10bcb9: c3 ret =============================================================================== 0010b430 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10b430: 55 push %ebp 10b431: 89 e5 mov %esp,%ebp 10b433: 56 push %esi 10b434: 53 push %ebx 10b435: 83 ec 10 sub $0x10,%esp 10b438: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !once_control || !init_routine ) 10b43b: 85 db test %ebx,%ebx 10b43d: 74 55 je 10b494 10b43f: 8b 45 0c mov 0xc(%ebp),%eax 10b442: 85 c0 test %eax,%eax 10b444: 74 4e je 10b494 return EINVAL; if ( !once_control->init_executed ) { 10b446: 8b 73 04 mov 0x4(%ebx),%esi 10b449: 85 f6 test %esi,%esi 10b44b: 74 0b je 10b458 10b44d: 31 c0 xor %eax,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10b44f: 8d 65 f8 lea -0x8(%ebp),%esp 10b452: 5b pop %ebx 10b453: 5e pop %esi 10b454: c9 leave 10b455: c3 ret 10b456: 66 90 xchg %ax,%ax if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10b458: 51 push %ecx 10b459: 8d 75 f4 lea -0xc(%ebp),%esi 10b45c: 56 push %esi 10b45d: 68 00 01 00 00 push $0x100 10b462: 68 00 01 00 00 push $0x100 10b467: e8 30 0e 00 00 call 10c29c if ( !once_control->init_executed ) { 10b46c: 83 c4 10 add $0x10,%esp 10b46f: 8b 53 04 mov 0x4(%ebx),%edx 10b472: 85 d2 test %edx,%edx 10b474: 74 2a je 10b4a0 <== ALWAYS TAKEN once_control->is_initialized = TRUE; once_control->init_executed = TRUE; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10b476: 50 push %eax 10b477: 56 push %esi 10b478: 68 00 01 00 00 push $0x100 10b47d: ff 75 f4 pushl -0xc(%ebp) 10b480: e8 17 0e 00 00 call 10c29c 10b485: 31 c0 xor %eax,%eax 10b487: 83 c4 10 add $0x10,%esp } return 0; } 10b48a: 8d 65 f8 lea -0x8(%ebp),%esp 10b48d: 5b pop %ebx 10b48e: 5e pop %esi 10b48f: c9 leave 10b490: c3 ret 10b491: 8d 76 00 lea 0x0(%esi),%esi if ( !once_control->init_executed ) { once_control->is_initialized = TRUE; once_control->init_executed = TRUE; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10b494: b8 16 00 00 00 mov $0x16,%eax } return 0; } 10b499: 8d 65 f8 lea -0x8(%ebp),%esp 10b49c: 5b pop %ebx 10b49d: 5e pop %esi 10b49e: c9 leave 10b49f: c3 ret if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = TRUE; 10b4a0: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = TRUE; 10b4a6: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10b4ad: ff 55 0c call *0xc(%ebp) 10b4b0: eb c4 jmp 10b476 =============================================================================== 0010ab1c : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10ab1c: 55 push %ebp 10ab1d: 89 e5 mov %esp,%ebp 10ab1f: 53 push %ebx 10ab20: 83 ec 14 sub $0x14,%esp 10ab23: 8b 55 08 mov 0x8(%ebp),%edx POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10ab26: 85 d2 test %edx,%edx 10ab28: 74 42 je 10ab6c /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 10ab2a: 53 push %ebx 10ab2b: 8d 45 f8 lea -0x8(%ebp),%eax 10ab2e: 50 push %eax 10ab2f: ff 32 pushl (%edx) 10ab31: 68 c0 23 12 00 push $0x1223c0 10ab36: e8 55 2e 00 00 call 10d990 <_Objects_Get> 10ab3b: 89 c3 mov %eax,%ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ab3d: 83 c4 10 add $0x10,%esp 10ab40: 8b 4d f8 mov -0x8(%ebp),%ecx 10ab43: 85 c9 test %ecx,%ecx 10ab45: 75 25 jne 10ab6c 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 ) { 10ab47: 83 ec 0c sub $0xc,%esp 10ab4a: 8d 40 10 lea 0x10(%eax),%eax 10ab4d: 50 push %eax 10ab4e: e8 7d 3e 00 00 call 10e9d0 <_Thread_queue_First> 10ab53: 83 c4 10 add $0x10,%esp 10ab56: 85 c0 test %eax,%eax 10ab58: 74 1e je 10ab78 _Thread_Enable_dispatch(); 10ab5a: e8 75 36 00 00 call 10e1d4 <_Thread_Enable_dispatch> 10ab5f: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ab64: 8b 5d fc mov -0x4(%ebp),%ebx 10ab67: c9 leave 10ab68: c3 ret 10ab69: 8d 76 00 lea 0x0(%esi),%esi _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0; 10ab6c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ab71: 8b 5d fc mov -0x4(%ebp),%ebx 10ab74: c9 leave 10ab75: c3 ret 10ab76: 66 90 xchg %ax,%ax /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10ab78: 83 ec 08 sub $0x8,%esp 10ab7b: 53 push %ebx 10ab7c: 68 c0 23 12 00 push $0x1223c0 10ab81: e8 96 29 00 00 call 10d51c <_Objects_Close> * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * 10ab86: 58 pop %eax 10ab87: 5a pop %edx 10ab88: 53 push %ebx 10ab89: 68 c0 23 12 00 push $0x1223c0 10ab8e: e8 c9 2c 00 00 call 10d85c <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10ab93: e8 3c 36 00 00 call 10e1d4 <_Thread_Enable_dispatch> 10ab98: 31 c0 xor %eax,%eax 10ab9a: 83 c4 10 add $0x10,%esp 10ab9d: eb d2 jmp 10ab71 =============================================================================== 0010aba0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10aba0: 55 push %ebp 10aba1: 89 e5 mov %esp,%ebp 10aba3: 56 push %esi 10aba4: 53 push %ebx 10aba5: 83 ec 10 sub $0x10,%esp 10aba8: 8b 75 08 mov 0x8(%ebp),%esi 10abab: 8b 45 0c mov 0xc(%ebp),%eax const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10abae: 85 f6 test %esi,%esi 10abb0: 74 15 je 10abc7 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10abb2: 85 c0 test %eax,%eax 10abb4: 0f 84 82 00 00 00 je 10ac3c <== NEVER TAKEN } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10abba: 8b 10 mov (%eax),%edx 10abbc: 85 d2 test %edx,%edx 10abbe: 74 07 je 10abc7 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10abc0: 8b 40 04 mov 0x4(%eax),%eax 10abc3: 85 c0 test %eax,%eax 10abc5: 74 0d je 10abd4 <== ALWAYS TAKEN ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 10abc7: b8 16 00 00 00 mov $0x16,%eax } 10abcc: 8d 65 f8 lea -0x8(%ebp),%esp 10abcf: 5b pop %ebx 10abd0: 5e pop %esi 10abd1: c9 leave 10abd2: c3 ret 10abd3: 90 nop /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10abd4: a1 38 21 12 00 mov 0x122138,%eax 10abd9: 40 inc %eax 10abda: a3 38 21 12 00 mov %eax,0x122138 */ /**@{*/ #ifdef __cplusplus extern "C" { #endif 10abdf: 83 ec 0c sub $0xc,%esp 10abe2: 68 c0 23 12 00 push $0x1223c0 10abe7: e8 b0 28 00 00 call 10d49c <_Objects_Allocate> 10abec: 89 c3 mov %eax,%ebx */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10abee: 83 c4 10 add $0x10,%esp 10abf1: 85 c0 test %eax,%eax 10abf3: 74 3b je 10ac30 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10abf5: 83 ec 08 sub $0x8,%esp 10abf8: 8d 45 f4 lea -0xc(%ebp),%eax 10abfb: 50 push %eax 10abfc: 8d 43 10 lea 0x10(%ebx),%eax 10abff: 50 push %eax 10ac00: e8 d7 21 00 00 call 10cddc <_CORE_RWLock_Initialize> 10ac05: 8b 4b 08 mov 0x8(%ebx),%ecx 10ac08: 0f b7 d1 movzwl %cx,%edx 10ac0b: a1 dc 23 12 00 mov 0x1223dc,%eax 10ac10: 89 1c 90 mov %ebx,(%eax,%edx,4) 10ac13: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10ac1a: 89 0e mov %ecx,(%esi) _Thread_Enable_dispatch(); 10ac1c: e8 b3 35 00 00 call 10e1d4 <_Thread_Enable_dispatch> 10ac21: 31 c0 xor %eax,%eax 10ac23: 83 c4 10 add $0x10,%esp return 0; } 10ac26: 8d 65 f8 lea -0x8(%ebp),%esp 10ac29: 5b pop %ebx 10ac2a: 5e pop %esi 10ac2b: c9 leave 10ac2c: c3 ret 10ac2d: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10ac30: e8 9f 35 00 00 call 10e1d4 <_Thread_Enable_dispatch> 10ac35: b8 0b 00 00 00 mov $0xb,%eax 10ac3a: eb 90 jmp 10abcc * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10ac3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ac3f: 8d 5d ec lea -0x14(%ebp),%ebx <== NOT EXECUTED 10ac42: 53 push %ebx <== NOT EXECUTED 10ac43: e8 24 0a 00 00 call 10b66c <== NOT EXECUTED 10ac48: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10ac4a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ac4d: e9 68 ff ff ff jmp 10abba <== NOT EXECUTED =============================================================================== 0010acbc : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10acbc: 55 push %ebp 10acbd: 89 e5 mov %esp,%ebp 10acbf: 57 push %edi 10acc0: 56 push %esi 10acc1: 53 push %ebx 10acc2: 83 ec 1c sub $0x1c,%esp 10acc5: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10acc8: 85 f6 test %esi,%esi 10acca: 74 78 je 10ad44 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10accc: 83 ec 08 sub $0x8,%esp 10accf: 8d 45 ec lea -0x14(%ebp),%eax 10acd2: 50 push %eax 10acd3: ff 75 0c pushl 0xc(%ebp) 10acd6: e8 c5 63 00 00 call 1110a0 <_POSIX_Absolute_timeout_to_ticks> 10acdb: 89 c3 mov %eax,%ebx switch (status) { 10acdd: 83 c4 10 add $0x10,%esp 10ace0: 83 f8 02 cmp $0x2,%eax 10ace3: 76 6f jbe 10ad54 10ace5: 83 f8 03 cmp $0x3,%eax 10ace8: 75 05 jne 10acef <== NEVER TAKEN 10acea: bf 01 00 00 00 mov $0x1,%edi 10acef: 52 push %edx 10acf0: 8d 45 f0 lea -0x10(%ebp),%eax 10acf3: 50 push %eax 10acf4: ff 36 pushl (%esi) 10acf6: 68 c0 23 12 00 push $0x1223c0 10acfb: e8 90 2c 00 00 call 10d990 <_Objects_Get> 10ad00: 89 c2 mov %eax,%edx do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ad02: 83 c4 10 add $0x10,%esp 10ad05: 8b 45 f0 mov -0x10(%ebp),%eax 10ad08: 85 c0 test %eax,%eax 10ad0a: 75 38 jne 10ad44 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10ad0c: 83 ec 0c sub $0xc,%esp 10ad0f: 6a 00 push $0x0 10ad11: ff 75 ec pushl -0x14(%ebp) 10ad14: 89 f9 mov %edi,%ecx 10ad16: 0f b6 c1 movzbl %cl,%eax 10ad19: 50 push %eax 10ad1a: ff 36 pushl (%esi) 10ad1c: 8d 42 10 lea 0x10(%edx),%eax 10ad1f: 50 push %eax 10ad20: e8 eb 20 00 00 call 10ce10 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10ad25: 83 c4 20 add $0x20,%esp 10ad28: e8 a7 34 00 00 call 10e1d4 <_Thread_Enable_dispatch> if ( !do_wait && 10ad2d: 89 f8 mov %edi,%eax 10ad2f: 84 c0 test %al,%al 10ad31: 75 25 jne 10ad58 <== ALWAYS TAKEN 10ad33: a1 fc 21 12 00 mov 0x1221fc,%eax <== NOT EXECUTED 10ad38: 83 78 34 02 cmpl $0x2,0x34(%eax) <== NOT EXECUTED 10ad3c: 75 1f jne 10ad5d <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10ad3e: 85 db test %ebx,%ebx <== NOT EXECUTED 10ad40: 75 32 jne 10ad74 <== NOT EXECUTED 10ad42: 66 90 xchg %ax,%ax <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ad44: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ad49: 8d 65 f4 lea -0xc(%ebp),%esp 10ad4c: 5b pop %ebx 10ad4d: 5e pop %esi 10ad4e: 5f pop %edi 10ad4f: c9 leave 10ad50: c3 ret 10ad51: 8d 76 00 lea 0x0(%esi),%esi * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); switch (status) { 10ad54: 31 ff xor %edi,%edi 10ad56: eb 97 jmp 10acef 10ad58: a1 fc 21 12 00 mov 0x1221fc,%eax case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ad5d: 83 ec 0c sub $0xc,%esp 10ad60: ff 70 34 pushl 0x34(%eax) 10ad63: e8 dc 00 00 00 call 10ae44 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10ad68: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10ad6b: 8d 65 f4 lea -0xc(%ebp),%esp 10ad6e: 5b pop %ebx 10ad6f: 5e pop %esi 10ad70: 5f pop %edi 10ad71: c9 leave 10ad72: c3 ret 10ad73: 90 nop ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10ad74: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 10ad77: 77 e4 ja 10ad5d <== NOT EXECUTED 10ad79: b8 74 00 00 00 mov $0x74,%eax <== NOT EXECUTED 10ad7e: eb c9 jmp 10ad49 <== NOT EXECUTED =============================================================================== 0010ad80 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10ad80: 55 push %ebp 10ad81: 89 e5 mov %esp,%ebp 10ad83: 57 push %edi 10ad84: 56 push %esi 10ad85: 53 push %ebx 10ad86: 83 ec 1c sub $0x1c,%esp 10ad89: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10ad8c: 85 f6 test %esi,%esi 10ad8e: 74 78 je 10ae08 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10ad90: 83 ec 08 sub $0x8,%esp 10ad93: 8d 45 ec lea -0x14(%ebp),%eax 10ad96: 50 push %eax 10ad97: ff 75 0c pushl 0xc(%ebp) 10ad9a: e8 01 63 00 00 call 1110a0 <_POSIX_Absolute_timeout_to_ticks> 10ad9f: 89 c3 mov %eax,%ebx switch (status) { 10ada1: 83 c4 10 add $0x10,%esp 10ada4: 83 f8 02 cmp $0x2,%eax 10ada7: 76 6f jbe 10ae18 10ada9: 83 f8 03 cmp $0x3,%eax 10adac: 75 05 jne 10adb3 <== NEVER TAKEN 10adae: bf 01 00 00 00 mov $0x1,%edi 10adb3: 52 push %edx 10adb4: 8d 45 f0 lea -0x10(%ebp),%eax 10adb7: 50 push %eax 10adb8: ff 36 pushl (%esi) 10adba: 68 c0 23 12 00 push $0x1223c0 10adbf: e8 cc 2b 00 00 call 10d990 <_Objects_Get> 10adc4: 89 c2 mov %eax,%edx do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10adc6: 83 c4 10 add $0x10,%esp 10adc9: 8b 45 f0 mov -0x10(%ebp),%eax 10adcc: 85 c0 test %eax,%eax 10adce: 75 38 jne 10ae08 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10add0: 83 ec 0c sub $0xc,%esp 10add3: 6a 00 push $0x0 10add5: ff 75 ec pushl -0x14(%ebp) 10add8: 89 f9 mov %edi,%ecx 10adda: 0f b6 c1 movzbl %cl,%eax 10addd: 50 push %eax 10adde: ff 36 pushl (%esi) 10ade0: 8d 42 10 lea 0x10(%edx),%eax 10ade3: 50 push %eax 10ade4: e8 ef 20 00 00 call 10ced8 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10ade9: 83 c4 20 add $0x20,%esp 10adec: e8 e3 33 00 00 call 10e1d4 <_Thread_Enable_dispatch> if ( !do_wait && 10adf1: 89 f8 mov %edi,%eax 10adf3: 84 c0 test %al,%al 10adf5: 75 25 jne 10ae1c <== ALWAYS TAKEN 10adf7: a1 fc 21 12 00 mov 0x1221fc,%eax <== NOT EXECUTED 10adfc: 83 78 34 02 cmpl $0x2,0x34(%eax) <== NOT EXECUTED 10ae00: 75 1f jne 10ae21 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10ae02: 85 db test %ebx,%ebx <== NOT EXECUTED 10ae04: 75 32 jne 10ae38 <== NOT EXECUTED 10ae06: 66 90 xchg %ax,%ax <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ae08: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ae0d: 8d 65 f4 lea -0xc(%ebp),%esp 10ae10: 5b pop %ebx 10ae11: 5e pop %esi 10ae12: 5f pop %edi 10ae13: c9 leave 10ae14: c3 ret 10ae15: 8d 76 00 lea 0x0(%esi),%esi * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); switch (status) { 10ae18: 31 ff xor %edi,%edi 10ae1a: eb 97 jmp 10adb3 10ae1c: a1 fc 21 12 00 mov 0x1221fc,%eax case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ae21: 83 ec 0c sub $0xc,%esp 10ae24: ff 70 34 pushl 0x34(%eax) 10ae27: e8 18 00 00 00 call 10ae44 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10ae2c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10ae2f: 8d 65 f4 lea -0xc(%ebp),%esp 10ae32: 5b pop %ebx 10ae33: 5e pop %esi 10ae34: 5f pop %edi 10ae35: c9 leave 10ae36: c3 ret 10ae37: 90 nop ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10ae38: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 10ae3b: 77 e4 ja 10ae21 <== NOT EXECUTED 10ae3d: b8 74 00 00 00 mov $0x74,%eax <== NOT EXECUTED 10ae42: eb c9 jmp 10ae0d <== NOT EXECUTED =============================================================================== 0010b624 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10b624: 55 push %ebp 10b625: 89 e5 mov %esp,%ebp 10b627: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == FALSE ) 10b62a: 85 c0 test %eax,%eax 10b62c: 74 12 je 10b640 10b62e: 8b 10 mov (%eax),%edx 10b630: 85 d2 test %edx,%edx 10b632: 74 0c je 10b640 return EINVAL; attr->is_initialized = FALSE; 10b634: c7 00 00 00 00 00 movl $0x0,(%eax) 10b63a: 31 c0 xor %eax,%eax return 0; } 10b63c: c9 leave 10b63d: c3 ret 10b63e: 66 90 xchg %ax,%ax { if ( !attr || attr->is_initialized == FALSE ) return EINVAL; attr->is_initialized = FALSE; return 0; 10b640: b8 16 00 00 00 mov $0x16,%eax } 10b645: c9 leave 10b646: c3 ret =============================================================================== 0010b68c : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10b68c: 55 push %ebp 10b68d: 89 e5 mov %esp,%ebp 10b68f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b692: 85 c0 test %eax,%eax 10b694: 74 0c je 10b6a2 return EINVAL; if ( !attr->is_initialized ) 10b696: 8b 10 mov (%eax),%edx 10b698: 85 d2 test %edx,%edx 10b69a: 74 06 je 10b6a2 return EINVAL; switch ( pshared ) { 10b69c: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b6a0: 76 0a jbe 10b6ac <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10b6a2: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b6a7: c9 leave 10b6a8: c3 ret 10b6a9: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b6ac: 8b 55 0c mov 0xc(%ebp),%edx 10b6af: 89 50 04 mov %edx,0x4(%eax) 10b6b2: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b6b4: c9 leave 10b6b5: c3 ret =============================================================================== 0010a3c8 : int pthread_setcancelstate( int state, int *oldstate ) { 10a3c8: 55 push %ebp 10a3c9: 89 e5 mov %esp,%ebp 10a3cb: 83 ec 08 sub $0x8,%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() ) 10a3ce: a1 d8 23 12 00 mov 0x1223d8,%eax 10a3d3: 85 c0 test %eax,%eax 10a3d5: 75 55 jne 10a42c <== NEVER TAKEN return EPROTO; if ( !oldstate ) 10a3d7: 8b 55 0c mov 0xc(%ebp),%edx 10a3da: 85 d2 test %edx,%edx 10a3dc: 74 06 je 10a3e4 <== NEVER TAKEN return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10a3de: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10a3e2: 76 08 jbe 10a3ec <== ALWAYS TAKEN if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a3e4: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 10a3e9: c9 leave <== NOT EXECUTED 10a3ea: c3 ret <== NOT EXECUTED 10a3eb: 90 nop <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a3ec: a1 fc 23 12 00 mov 0x1223fc,%eax 10a3f1: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a3f7: a1 38 23 12 00 mov 0x122338,%eax 10a3fc: 40 inc %eax 10a3fd: a3 38 23 12 00 mov %eax,0x122338 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10a402: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 10a408: 8b 4d 0c mov 0xc(%ebp),%ecx 10a40b: 89 01 mov %eax,(%ecx) thread_support->cancelability_state = state; 10a40d: 8b 45 08 mov 0x8(%ebp),%eax 10a410: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a416: 85 c0 test %eax,%eax 10a418: 75 09 jne 10a423 <== NEVER TAKEN 10a41a: 83 ba d0 00 00 00 01 cmpl $0x1,0xd0(%edx) 10a421: 74 11 je 10a434 <== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a423: e8 84 29 00 00 call 10cdac <_Thread_Enable_dispatch> 10a428: 31 c0 xor %eax,%eax if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 10a42a: c9 leave 10a42b: c3 ret * 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() ) 10a42c: b8 47 00 00 00 mov $0x47,%eax <== NOT EXECUTED _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 10a431: c9 leave <== NOT EXECUTED 10a432: c3 ret <== NOT EXECUTED 10a433: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a434: 8b 82 d4 00 00 00 mov 0xd4(%edx),%eax <== NOT EXECUTED 10a43a: 85 c0 test %eax,%eax <== NOT EXECUTED 10a43c: 74 e5 je 10a423 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a43e: e8 69 29 00 00 call 10cdac <_Thread_Enable_dispatch><== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10a443: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a446: 6a ff push $0xffffffff <== NOT EXECUTED 10a448: ff 35 fc 23 12 00 pushl 0x1223fc <== NOT EXECUTED 10a44e: e8 59 fb ff ff call 109fac <_POSIX_Thread_Exit> <== NOT EXECUTED 10a453: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a455: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 10a458: c9 leave <== NOT EXECUTED 10a459: c3 ret <== NOT EXECUTED =============================================================================== 0010a45c : int pthread_setcanceltype( int type, int *oldtype ) { 10a45c: 55 push %ebp 10a45d: 89 e5 mov %esp,%ebp 10a45f: 83 ec 08 sub $0x8,%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() ) 10a462: a1 d8 23 12 00 mov 0x1223d8,%eax 10a467: 85 c0 test %eax,%eax 10a469: 75 55 jne 10a4c0 <== NEVER TAKEN return EPROTO; if ( !oldtype ) 10a46b: 8b 45 0c mov 0xc(%ebp),%eax 10a46e: 85 c0 test %eax,%eax 10a470: 74 06 je 10a478 <== NEVER TAKEN return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10a472: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10a476: 76 08 jbe 10a480 <== ALWAYS TAKEN if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a478: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 10a47d: c9 leave <== NOT EXECUTED 10a47e: c3 ret <== NOT EXECUTED 10a47f: 90 nop <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a480: a1 fc 23 12 00 mov 0x1223fc,%eax 10a485: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10a48b: a1 38 23 12 00 mov 0x122338,%eax 10a490: 40 inc %eax 10a491: a3 38 23 12 00 mov %eax,0x122338 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10a496: 8b 82 d0 00 00 00 mov 0xd0(%edx),%eax 10a49c: 8b 4d 0c mov 0xc(%ebp),%ecx 10a49f: 89 01 mov %eax,(%ecx) thread_support->cancelability_type = type; 10a4a1: 8b 45 08 mov 0x8(%ebp),%eax 10a4a4: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a4aa: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx 10a4b0: 85 c9 test %ecx,%ecx 10a4b2: 75 03 jne 10a4b7 <== NEVER TAKEN 10a4b4: 48 dec %eax 10a4b5: 74 11 je 10a4c8 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a4b7: e8 f0 28 00 00 call 10cdac <_Thread_Enable_dispatch> 10a4bc: 31 c0 xor %eax,%eax if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 10a4be: c9 leave 10a4bf: c3 ret * 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() ) 10a4c0: b8 47 00 00 00 mov $0x47,%eax <== NOT EXECUTED _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 10a4c5: c9 leave <== NOT EXECUTED 10a4c6: c3 ret <== NOT EXECUTED 10a4c7: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a4c8: 8b 82 d4 00 00 00 mov 0xd4(%edx),%eax 10a4ce: 85 c0 test %eax,%eax 10a4d0: 74 e5 je 10a4b7 <== ALWAYS TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a4d2: e8 d5 28 00 00 call 10cdac <_Thread_Enable_dispatch><== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10a4d7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a4da: 6a ff push $0xffffffff <== NOT EXECUTED 10a4dc: ff 35 fc 23 12 00 pushl 0x1223fc <== NOT EXECUTED 10a4e2: e8 c5 fa ff ff call 109fac <_POSIX_Thread_Exit> <== NOT EXECUTED 10a4e7: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a4e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 10a4ec: c9 leave <== NOT EXECUTED 10a4ed: c3 ret <== NOT EXECUTED =============================================================================== 0010c97c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 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 2c sub $0x2c,%esp /* * Check all the parameters */ if ( !param ) 10c985: 8b 45 10 mov 0x10(%ebp),%eax 10c988: 85 c0 test %eax,%eax 10c98a: 74 29 je 10c9b5 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 10c98c: 8b 55 10 mov 0x10(%ebp),%edx 10c98f: 8b 02 mov (%edx),%eax 10c991: 48 dec %eax 10c992: 3d fd 00 00 00 cmp $0xfd,%eax 10c997: 77 1c ja 10c9b5 <== NEVER TAKEN return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 10c999: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10c99d: 74 25 je 10c9c4 10c99f: 0f 8e 33 01 00 00 jle 10cad8 10c9a5: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10c9a9: 0f 84 15 01 00 00 je 10cac4 10c9af: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10c9b3: 74 4b je 10ca00 <== ALWAYS TAKEN _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 10c9b5: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10c9ba: 8d 65 f4 lea -0xc(%ebp),%esp 10c9bd: 5b pop %ebx 10c9be: 5e pop %esi 10c9bf: 5f pop %edi 10c9c0: c9 leave 10c9c1: c3 ret 10c9c2: 66 90 xchg %ax,%ax return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 10c9c4: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) 10c9cb: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) 10c9d2: 50 push %eax 10c9d3: 8d 45 f0 lea -0x10(%ebp),%eax 10c9d6: 50 push %eax 10c9d7: ff 75 08 pushl 0x8(%ebp) 10c9da: 68 a0 55 12 00 push $0x1255a0 10c9df: e8 70 21 00 00 call 10eb54 <_Objects_Get> 10c9e4: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10c9e7: 83 c4 10 add $0x10,%esp 10c9ea: 8b 7d f0 mov -0x10(%ebp),%edi 10c9ed: 85 ff test %edi,%edi 10c9ef: 74 53 je 10ca44 10c9f1: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10c9f6: 8d 65 f4 lea -0xc(%ebp),%esp 10c9f9: 5b pop %ebx 10c9fa: 5e pop %esi 10c9fb: 5f pop %edi 10c9fc: c9 leave 10c9fd: c3 ret 10c9fe: 66 90 xchg %ax,%ax case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 10ca00: 83 ec 0c sub $0xc,%esp 10ca03: 8b 45 10 mov 0x10(%ebp),%eax 10ca06: 83 c0 08 add $0x8,%eax 10ca09: 50 push %eax 10ca0a: e8 79 36 00 00 call 110088 <_Timespec_To_ticks> 10ca0f: 89 c3 mov %eax,%ebx 10ca11: 8b 45 10 mov 0x10(%ebp),%eax 10ca14: 83 c0 10 add $0x10,%eax 10ca17: 89 04 24 mov %eax,(%esp) 10ca1a: e8 69 36 00 00 call 110088 <_Timespec_To_ticks> 10ca1f: 83 c4 10 add $0x10,%esp 10ca22: 39 c3 cmp %eax,%ebx 10ca24: 72 8f jb 10c9b5 <== NEVER TAKEN _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 10ca26: 8b 75 10 mov 0x10(%ebp),%esi 10ca29: 8b 46 04 mov 0x4(%esi),%eax 10ca2c: 48 dec %eax 10ca2d: 3d fd 00 00 00 cmp $0xfd,%eax 10ca32: 77 81 ja 10c9b5 10ca34: c7 45 dc 03 00 00 00 movl $0x3,-0x24(%ebp) 10ca3b: c7 45 e0 a0 c8 10 00 movl $0x10c8a0,-0x20(%ebp) 10ca42: eb 8e jmp 10c9d2 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10ca44: 8b 45 d4 mov -0x2c(%ebp),%eax 10ca47: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx if ( api->schedpolicy == SCHED_SPORADIC ) 10ca4d: 83 7b 7c 03 cmpl $0x3,0x7c(%ebx) 10ca51: 0f 84 d5 00 00 00 je 10cb2c (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10ca57: 8b 55 0c mov 0xc(%ebp),%edx 10ca5a: 89 53 7c mov %edx,0x7c(%ebx) api->schedparam = *param; 10ca5d: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 10ca63: b9 06 00 00 00 mov $0x6,%ecx 10ca68: 8b 75 10 mov 0x10(%ebp),%esi 10ca6b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10ca6d: 8b 55 dc mov -0x24(%ebp),%edx 10ca70: 8b 45 d4 mov -0x2c(%ebp),%eax 10ca73: 89 50 7c mov %edx,0x7c(%eax) the_thread->budget_callout = budget_callout; 10ca76: 8b 75 e0 mov -0x20(%ebp),%esi 10ca79: 89 b0 80 00 00 00 mov %esi,0x80(%eax) switch ( api->schedpolicy ) { 10ca7f: 8b 75 0c mov 0xc(%ebp),%esi 10ca82: 85 f6 test %esi,%esi 10ca84: 78 2c js 10cab2 <== NEVER TAKEN 10ca86: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10ca8a: 7f 6c jg 10caf8 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ca8c: a1 a4 52 12 00 mov 0x1252a4,%eax 10ca91: 8b 55 d4 mov -0x2c(%ebp),%edx 10ca94: 89 42 78 mov %eax,0x78(%edx) /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of 10ca97: b8 ff 00 00 00 mov $0xff,%eax 10ca9c: 2b 83 80 00 00 00 sub 0x80(%ebx),%eax the_thread->real_priority = 10caa2: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10caa5: 51 push %ecx 10caa6: 6a 01 push $0x1 10caa8: 50 push %eax 10caa9: 52 push %edx 10caaa: e8 0d 24 00 00 call 10eebc <_Thread_Change_priority> 10caaf: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10cab2: e8 e1 28 00 00 call 10f398 <_Thread_Enable_dispatch> 10cab7: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10cab9: 8d 65 f4 lea -0xc(%ebp),%esp 10cabc: 5b pop %ebx 10cabd: 5e pop %esi 10cabe: 5f pop %edi 10cabf: c9 leave 10cac0: c3 ret 10cac1: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 10cac4: c7 45 dc 02 00 00 00 movl $0x2,-0x24(%ebp) 10cacb: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10cad2: e9 fb fe ff ff jmp 10c9d2 10cad7: 90 nop 10cad8: 8b 45 0c mov 0xc(%ebp),%eax 10cadb: 85 c0 test %eax,%eax 10cadd: 0f 85 d2 fe ff ff jne 10c9b5 10cae3: c7 45 dc 01 00 00 00 movl $0x1,-0x24(%ebp) 10caea: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10caf1: e9 dc fe ff ff jmp 10c9d2 10caf6: 66 90 xchg %ax,%ax api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10caf8: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10cafc: 75 b4 jne 10cab2 <== NEVER TAKEN TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10cafe: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10cb04: 89 83 98 00 00 00 mov %eax,0x98(%ebx) _Watchdog_Remove( &api->Sporadic_timer ); 10cb0a: 83 ec 0c sub $0xc,%esp 10cb0d: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax 10cb13: 50 push %eax 10cb14: e8 27 3a 00 00 call 110540 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10cb19: 58 pop %eax 10cb1a: 5a pop %edx 10cb1b: ff 75 d4 pushl -0x2c(%ebp) 10cb1e: 6a 00 push $0x0 10cb20: e8 bb fd ff ff call 10c8e0 <_POSIX_Threads_Sporadic_budget_TSR> 10cb25: 83 c4 10 add $0x10,%esp 10cb28: eb 88 jmp 10cab2 10cb2a: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 10cb2c: 83 ec 0c sub $0xc,%esp 10cb2f: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax 10cb35: 50 push %eax 10cb36: e8 05 3a 00 00 call 110540 <_Watchdog_Remove> 10cb3b: 83 c4 10 add $0x10,%esp 10cb3e: e9 14 ff ff ff jmp 10ca57 =============================================================================== 001104d0 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 1104d0: 55 push %ebp 1104d1: 89 e5 mov %esp,%ebp 1104d3: 57 push %edi 1104d4: 56 push %esi 1104d5: 53 push %ebx 1104d6: 83 ec 0c sub $0xc,%esp 1104d9: 8b 5d 08 mov 0x8(%ebp),%ebx 1104dc: 8b 75 0c mov 0xc(%ebp),%esi 1104df: 8b 55 10 mov 0x10(%ebp),%edx POSIX_API_Control *api; if ( !set && !oset ) 1104e2: 85 f6 test %esi,%esi 1104e4: 0f 84 8e 00 00 00 je 110578 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 1104ea: 8b 3d bc 17 12 00 mov 0x1217bc,%edi 1104f0: 8b 8f f8 00 00 00 mov 0xf8(%edi),%ecx if ( oset ) 1104f6: 85 d2 test %edx,%edx 1104f8: 74 08 je 110502 *oset = api->signals_blocked; 1104fa: 8b 81 c4 00 00 00 mov 0xc4(%ecx),%eax 110500: 89 02 mov %eax,(%edx) if ( !set ) return 0; switch ( how ) { 110502: 83 fb 01 cmp $0x1,%ebx 110505: 74 65 je 11056c 110507: 83 fb 02 cmp $0x2,%ebx 11050a: 74 3c je 110548 11050c: 85 db test %ebx,%ebx 11050e: 75 44 jne 110554 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 110510: 8b 06 mov (%esi),%eax 110512: 89 81 c4 00 00 00 mov %eax,0xc4(%ecx) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 110518: 8b 15 20 1f 12 00 mov 0x121f20,%edx 11051e: 0b 91 c8 00 00 00 or 0xc8(%ecx),%edx 110524: 8b 81 c4 00 00 00 mov 0xc4(%ecx),%eax 11052a: f7 d0 not %eax 11052c: 85 c2 test %eax,%edx 11052e: 75 0c jne 11053c (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 110530: 31 c0 xor %eax,%eax } return 0; } 110532: 83 c4 0c add $0xc,%esp 110535: 5b pop %ebx 110536: 5e pop %esi 110537: 5f pop %edi 110538: c9 leave 110539: c3 ret 11053a: 66 90 xchg %ax,%ax /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 11053c: c6 47 75 01 movb $0x1,0x75(%edi) _Thread_Dispatch(); 110540: e8 37 cd ff ff call 10d27c <_Thread_Dispatch> 110545: eb e9 jmp 110530 110547: 90 nop switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 110548: 8b 06 mov (%esi),%eax 11054a: f7 d0 not %eax 11054c: 21 81 c4 00 00 00 and %eax,0xc4(%ecx) 110552: eb c4 jmp 110518 break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 110554: e8 ff 17 00 00 call 111d58 <__errno> 110559: c7 00 16 00 00 00 movl $0x16,(%eax) 11055f: b8 ff ff ff ff mov $0xffffffff,%eax _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 110564: 83 c4 0c add $0xc,%esp 110567: 5b pop %ebx 110568: 5e pop %esi 110569: 5f pop %edi 11056a: c9 leave 11056b: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 11056c: 8b 06 mov (%esi),%eax 11056e: 09 81 c4 00 00 00 or %eax,0xc4(%ecx) 110574: eb a2 jmp 110518 110576: 66 90 xchg %ax,%ax sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 110578: 85 d2 test %edx,%edx 11057a: 74 d8 je 110554 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; if ( oset ) *oset = api->signals_blocked; 11057c: a1 bc 17 12 00 mov 0x1217bc,%eax 110581: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 110587: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 11058d: 89 02 mov %eax,(%edx) 11058f: 31 c0 xor %eax,%eax _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 110591: 83 c4 0c add $0xc,%esp 110594: 5b pop %ebx 110595: 5e pop %esi 110596: 5f pop %edi 110597: c9 leave 110598: c3 ret =============================================================================== 0010a230 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10a230: 55 push %ebp 10a231: 89 e5 mov %esp,%ebp 10a233: 53 push %ebx 10a234: 83 ec 14 sub $0x14,%esp 10a237: 8b 55 08 mov 0x8(%ebp),%edx POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10a23a: 85 d2 test %edx,%edx 10a23c: 74 36 je 10a274 /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 10a23e: 53 push %ebx 10a23f: 8d 45 f8 lea -0x8(%ebp),%eax 10a242: 50 push %eax 10a243: ff 32 pushl (%edx) 10a245: 68 20 0d 12 00 push $0x120d20 10a24a: e8 61 23 00 00 call 10c5b0 <_Objects_Get> 10a24f: 89 c3 mov %eax,%ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a251: 83 c4 10 add $0x10,%esp 10a254: 8b 4d f8 mov -0x8(%ebp),%ecx 10a257: 85 c9 test %ecx,%ecx 10a259: 75 19 jne 10a274 * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10a25b: 8b 40 18 mov 0x18(%eax),%eax case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10a25e: 85 c0 test %eax,%eax 10a260: 74 1e je 10a280 _Thread_Enable_dispatch(); 10a262: e8 8d 2b 00 00 call 10cdf4 <_Thread_Enable_dispatch> 10a267: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a26c: 8b 5d fc mov -0x4(%ebp),%ebx 10a26f: c9 leave 10a270: c3 ret 10a271: 8d 76 00 lea 0x0(%esi),%esi _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); return 0; 10a274: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a279: 8b 5d fc mov -0x4(%ebp),%ebx 10a27c: c9 leave 10a27d: c3 ret 10a27e: 66 90 xchg %ax,%ax if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10a280: 83 ec 08 sub $0x8,%esp 10a283: 53 push %ebx 10a284: 68 20 0d 12 00 push $0x120d20 10a289: e8 ae 1e 00 00 call 10c13c <_Objects_Close> * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * 10a28e: 58 pop %eax 10a28f: 5a pop %edx 10a290: 53 push %ebx 10a291: 68 20 0d 12 00 push $0x120d20 10a296: e8 e1 21 00 00 call 10c47c <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10a29b: e8 54 2b 00 00 call 10cdf4 <_Thread_Enable_dispatch> 10a2a0: 31 c0 xor %eax,%eax 10a2a2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10a2a5: 8b 5d fc mov -0x4(%ebp),%ebx 10a2a8: c9 leave 10a2a9: c3 ret =============================================================================== 0010a518 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10a518: 55 push %ebp 10a519: 89 e5 mov %esp,%ebp 10a51b: 83 ec 08 sub $0x8,%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() ) 10a51e: a1 d8 23 12 00 mov 0x1223d8,%eax 10a523: 85 c0 test %eax,%eax 10a525: 75 42 jne 10a569 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a527: a1 fc 23 12 00 mov 0x1223fc,%eax 10a52c: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10a532: a1 38 23 12 00 mov 0x122338,%eax 10a537: 40 inc %eax 10a538: a3 38 23 12 00 mov %eax,0x122338 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a53d: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx 10a543: 85 c9 test %ecx,%ecx 10a545: 75 25 jne 10a56c <== NEVER TAKEN 10a547: 8b 82 d4 00 00 00 mov 0xd4(%edx),%eax 10a54d: 85 c0 test %eax,%eax 10a54f: 74 1b je 10a56c thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a551: e8 56 28 00 00 call 10cdac <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10a556: 83 ec 08 sub $0x8,%esp 10a559: 6a ff push $0xffffffff 10a55b: ff 35 fc 23 12 00 pushl 0x1223fc 10a561: e8 46 fa ff ff call 109fac <_POSIX_Thread_Exit> 10a566: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a569: c9 leave <== NOT EXECUTED 10a56a: c3 ret <== NOT EXECUTED 10a56b: 90 nop <== NOT EXECUTED 10a56c: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a56d: e9 3a 28 00 00 jmp 10cdac <_Thread_Enable_dispatch> =============================================================================== 0010a78c : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 10a78c: 55 push %ebp 10a78d: 89 e5 mov %esp,%ebp 10a78f: 56 push %esi 10a790: 53 push %ebx 10a791: 83 ec 10 sub $0x10,%esp 10a794: 8b 75 08 mov 0x8(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 10a797: 85 f6 test %esi,%esi 10a799: 0f 84 8d 00 00 00 je 10a82c <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 10a79f: 8b 55 14 mov 0x14(%ebp),%edx 10a7a2: 85 d2 test %edx,%edx 10a7a4: 0f 84 ba 00 00 00 je 10a864 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 10a7aa: f6 45 0c 10 testb $0x10,0xc(%ebp) 10a7ae: 0f 84 84 00 00 00 je 10a838 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 10a7b4: 8b 45 10 mov 0x10(%ebp),%eax 10a7b7: 85 c0 test %eax,%eax 10a7b9: 0f 84 85 00 00 00 je 10a844 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10a7bf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 10a7c6: 8b 45 10 mov 0x10(%ebp),%eax 10a7c9: 89 45 f4 mov %eax,-0xc(%ebp) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a7cc: a1 98 27 12 00 mov 0x122798,%eax 10a7d1: 40 inc %eax 10a7d2: a3 98 27 12 00 mov %eax,0x122798 #ifdef __cplusplus extern "C" { #endif /** 10a7d7: 83 ec 0c sub $0xc,%esp 10a7da: 68 a0 26 12 00 push $0x1226a0 10a7df: e8 f4 1d 00 00 call 10c5d8 <_Objects_Allocate> 10a7e4: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 10a7e6: 83 c4 10 add $0x10,%esp 10a7e9: 85 c0 test %eax,%eax 10a7eb: 74 63 je 10a850 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 10a7ed: 8b 45 0c mov 0xc(%ebp),%eax 10a7f0: 89 43 10 mov %eax,0x10(%ebx) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10a7f3: 83 ec 08 sub $0x8,%esp 10a7f6: 8d 45 f0 lea -0x10(%ebp),%eax 10a7f9: 50 push %eax 10a7fa: 8d 43 14 lea 0x14(%ebx),%eax 10a7fd: 50 push %eax 10a7fe: e8 01 15 00 00 call 10bd04 <_CORE_barrier_Initialize> 10a803: 8b 4b 08 mov 0x8(%ebx),%ecx 10a806: 0f b7 d1 movzwl %cx,%edx 10a809: a1 bc 26 12 00 mov 0x1226bc,%eax 10a80e: 89 1c 90 mov %ebx,(%eax,%edx,4) 10a811: 89 73 0c mov %esi,0xc(%ebx) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 10a814: 8b 45 14 mov 0x14(%ebp),%eax 10a817: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 10a819: e8 f2 2a 00 00 call 10d310 <_Thread_Enable_dispatch> 10a81e: 31 c0 xor %eax,%eax 10a820: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 10a823: 8d 65 f8 lea -0x8(%ebp),%esp 10a826: 5b pop %ebx 10a827: 5e pop %esi 10a828: c9 leave 10a829: c3 ret 10a82a: 66 90 xchg %ax,%ax ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 10a82c: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a831: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a834: 5b pop %ebx <== NOT EXECUTED 10a835: 5e pop %esi <== NOT EXECUTED 10a836: c9 leave <== NOT EXECUTED 10a837: c3 ret <== NOT EXECUTED if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 10a838: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) 10a83f: eb 85 jmp 10a7c6 10a841: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 10a844: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a849: 8d 65 f8 lea -0x8(%ebp),%esp 10a84c: 5b pop %ebx 10a84d: 5e pop %esi 10a84e: c9 leave 10a84f: c3 ret _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 10a850: e8 bb 2a 00 00 call 10d310 <_Thread_Enable_dispatch> 10a855: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a85a: 8d 65 f8 lea -0x8(%ebp),%esp 10a85d: 5b pop %ebx 10a85e: 5e pop %esi 10a85f: c9 leave 10a860: c3 ret 10a861: 8d 76 00 lea 0x0(%esi),%esi CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10a864: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 10a869: eb b8 jmp 10a823 <== NOT EXECUTED =============================================================================== 0010a8f8 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 10a8f8: 55 push %ebp 10a8f9: 89 e5 mov %esp,%ebp 10a8fb: 56 push %esi 10a8fc: 53 push %ebx 10a8fd: 83 ec 10 sub $0x10,%esp 10a900: 8b 5d 08 mov 0x8(%ebp),%ebx 10a903: 8b 75 0c mov 0xc(%ebp),%esi Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 10a906: 85 f6 test %esi,%esi 10a908: 74 46 je 10a950 <== NEVER TAKEN * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap 10a90a: 50 push %eax 10a90b: 8d 45 f4 lea -0xc(%ebp),%eax 10a90e: 50 push %eax 10a90f: 53 push %ebx 10a910: 68 a0 26 12 00 push $0x1226a0 10a915: e8 b2 21 00 00 call 10cacc <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 10a91a: 83 c4 10 add $0x10,%esp 10a91d: 8b 4d f4 mov -0xc(%ebp),%ecx 10a920: 85 c9 test %ecx,%ecx 10a922: 74 0c je 10a930 10a924: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a929: 8d 65 f8 lea -0x8(%ebp),%esp 10a92c: 5b pop %ebx 10a92d: 5e pop %esi 10a92e: c9 leave 10a92f: c3 ret the_barrier = _Barrier_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 10a930: 52 push %edx 10a931: 6a 00 push $0x0 10a933: 53 push %ebx 10a934: 83 c0 14 add $0x14,%eax 10a937: 50 push %eax 10a938: e8 fb 13 00 00 call 10bd38 <_CORE_barrier_Release> 10a93d: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10a93f: e8 cc 29 00 00 call 10d310 <_Thread_Enable_dispatch> 10a944: 31 c0 xor %eax,%eax 10a946: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a949: 8d 65 f8 lea -0x8(%ebp),%esp 10a94c: 5b pop %ebx 10a94d: 5e pop %esi 10a94e: c9 leave 10a94f: c3 ret ) { Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 10a950: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a955: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a958: 5b pop %ebx <== NOT EXECUTED 10a959: 5e pop %esi <== NOT EXECUTED 10a95a: c9 leave <== NOT EXECUTED 10a95b: c3 ret <== NOT EXECUTED =============================================================================== 00109b10 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 109b10: 55 push %ebp 109b11: 89 e5 mov %esp,%ebp 109b13: 53 push %ebx 109b14: 83 ec 04 sub $0x4,%esp 109b17: 8b 45 08 mov 0x8(%ebp),%eax 109b1a: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 109b1d: 85 db test %ebx,%ebx 109b1f: 74 5b je 109b7c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; switch ( option ) { 109b21: 83 f8 04 cmp $0x4,%eax 109b24: 76 0a jbe 109b30 109b26: b8 0a 00 00 00 mov $0xa,%eax break; } return RTEMS_INVALID_NUMBER; } 109b2b: 5a pop %edx 109b2c: 5b pop %ebx 109b2d: c9 leave 109b2e: c3 ret 109b2f: 90 nop ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { 109b30: ff 24 85 c8 90 11 00 jmp *0x1190c8(,%eax,4) 109b37: 90 nop *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 109b38: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 109b3b: 59 pop %ecx 109b3c: 5b pop %ebx 109b3d: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 109b3e: e9 3d 01 00 00 jmp 109c80 109b43: 90 nop return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 109b44: e8 6b 00 00 00 call 109bb4 109b49: 89 03 mov %eax,(%ebx) 109b4b: 31 c0 xor %eax,%eax break; } return RTEMS_INVALID_NUMBER; } 109b4d: 5a pop %edx 109b4e: 5b pop %ebx 109b4f: c9 leave 109b50: c3 ret 109b51: 8d 76 00 lea 0x0(%esi),%esi return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 109b54: e8 6f 00 00 00 call 109bc8 109b59: 89 03 mov %eax,(%ebx) 109b5b: 31 c0 xor %eax,%eax break; } return RTEMS_INVALID_NUMBER; } 109b5d: 5a pop %edx 109b5e: 5b pop %ebx 109b5f: c9 leave 109b60: c3 ret 109b61: 8d 76 00 lea 0x0(%esi),%esi switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 109b64: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 109b67: 5b pop %ebx 109b68: 5b pop %ebx 109b69: c9 leave switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 109b6a: e9 15 00 00 00 jmp 109b84 109b6f: 90 nop if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 109b70: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 109b73: 58 pop %eax 109b74: 5b pop %ebx 109b75: c9 leave if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 109b76: e9 59 00 00 00 jmp 109bd4 109b7b: 90 nop rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 109b7c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 109b81: eb a8 jmp 109b2b <== NOT EXECUTED =============================================================================== 00109b84 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 109b84: 55 push %ebp 109b85: 89 e5 mov %esp,%ebp 109b87: 8b 55 08 mov 0x8(%ebp),%edx if ( !the_interval ) 109b8a: 85 d2 test %edx,%edx 109b8c: 74 1e je 109bac <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 109b8e: 80 3d 0c f9 11 00 00 cmpb $0x0,0x11f90c 109b95: 74 0d je 109ba4 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch; 109b97: a1 8c f9 11 00 mov 0x11f98c,%eax 109b9c: 89 02 mov %eax,(%edx) 109b9e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 109ba0: c9 leave 109ba1: c3 ret 109ba2: 66 90 xchg %ax,%ax ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 109ba4: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch; return RTEMS_SUCCESSFUL; } 109ba9: c9 leave 109baa: c3 ret 109bab: 90 nop rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) 109bac: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch; return RTEMS_SUCCESSFUL; } 109bb1: c9 leave <== NOT EXECUTED 109bb2: c3 ret <== NOT EXECUTED =============================================================================== 00109bd4 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 109bd4: 55 push %ebp 109bd5: 89 e5 mov %esp,%ebp 109bd7: 56 push %esi 109bd8: 53 push %ebx 109bd9: 83 ec 40 sub $0x40,%esp 109bdc: 8b 75 08 mov 0x8(%ebp),%esi rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 109bdf: 85 f6 test %esi,%esi 109be1: 0f 84 8d 00 00 00 je 109c74 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 109be7: 80 3d 0c f9 11 00 00 cmpb $0x0,0x11f90c 109bee: 75 0c jne 109bfc 109bf0: b8 0b 00 00 00 mov $0xb,%eax tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; return RTEMS_SUCCESSFUL; } 109bf5: 8d 65 f8 lea -0x8(%ebp),%esp 109bf8: 5b pop %ebx 109bf9: 5e pop %esi 109bfa: c9 leave 109bfb: c3 ret ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** 109bfc: 9c pushf 109bfd: fa cli 109bfe: 5b pop %ebx * This routine grows @a the_heap memory area using the size bytes which 109bff: 83 ec 0c sub $0xc,%esp 109c02: 8d 45 e8 lea -0x18(%ebp),%eax 109c05: 50 push %eax 109c06: e8 d5 16 00 00 call 10b2e0 <_TOD_Get> * begin at @a starting_address. 109c0b: 53 push %ebx 109c0c: 9d popf * * @param[in] the_heap is the heap to operate upon 109c0d: 8b 45 e8 mov -0x18(%ebp),%eax 109c10: 89 45 f0 mov %eax,-0x10(%ebp) * @param[in] starting_address is the starting address of the memory 109c13: b8 d3 4d 62 10 mov $0x10624dd3,%eax 109c18: f7 65 ec mull -0x14(%ebp) 109c1b: c1 ea 06 shr $0x6,%edx 109c1e: 89 55 f4 mov %edx,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 109c21: 58 pop %eax 109c22: 5a pop %edx 109c23: 8d 45 c4 lea -0x3c(%ebp),%eax 109c26: 50 push %eax 109c27: 8d 45 f0 lea -0x10(%ebp),%eax 109c2a: 50 push %eax 109c2b: e8 34 78 00 00 call 111464 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 109c30: 8b 45 d8 mov -0x28(%ebp),%eax 109c33: 05 6c 07 00 00 add $0x76c,%eax 109c38: 89 06 mov %eax,(%esi) tmbuf->month = time.tm_mon + 1; 109c3a: 8b 45 d4 mov -0x2c(%ebp),%eax 109c3d: 40 inc %eax 109c3e: 89 46 04 mov %eax,0x4(%esi) tmbuf->day = time.tm_mday; 109c41: 8b 45 d0 mov -0x30(%ebp),%eax 109c44: 89 46 08 mov %eax,0x8(%esi) tmbuf->hour = time.tm_hour; 109c47: 8b 45 cc mov -0x34(%ebp),%eax 109c4a: 89 46 0c mov %eax,0xc(%esi) tmbuf->minute = time.tm_min; 109c4d: 8b 45 c8 mov -0x38(%ebp),%eax 109c50: 89 46 10 mov %eax,0x10(%esi) tmbuf->second = time.tm_sec; 109c53: 8b 45 c4 mov -0x3c(%ebp),%eax 109c56: 89 46 14 mov %eax,0x14(%esi) tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 109c59: 8b 45 f4 mov -0xc(%ebp),%eax 109c5c: 31 d2 xor %edx,%edx 109c5e: f7 35 c0 fa 11 00 divl 0x11fac0 109c64: 89 46 18 mov %eax,0x18(%esi) 109c67: 31 c0 xor %eax,%eax 109c69: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 109c6c: 8d 65 f8 lea -0x8(%ebp),%esp 109c6f: 5b pop %ebx 109c70: 5e pop %esi 109c71: c9 leave 109c72: c3 ret 109c73: 90 nop { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 109c74: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 109c79: e9 77 ff ff ff jmp 109bf5 <== NOT EXECUTED =============================================================================== 00109c80 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 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 if ( !time ) 109c8b: 85 f6 test %esi,%esi 109c8d: 74 45 je 109cd4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 109c8f: 80 3d 0c f9 11 00 00 cmpb $0x0,0x11f90c 109c96: 75 0c jne 109ca4 109c98: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 109c9d: 8d 65 f8 lea -0x8(%ebp),%esp 109ca0: 5b pop %ebx 109ca1: 5e pop %esi 109ca2: c9 leave 109ca3: c3 ret ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** 109ca4: 9c pushf 109ca5: fa cli 109ca6: 5b pop %ebx * This routine grows @a the_heap memory area using the size bytes which 109ca7: 83 ec 0c sub $0xc,%esp 109caa: 8d 45 f0 lea -0x10(%ebp),%eax 109cad: 50 push %eax 109cae: e8 2d 16 00 00 call 10b2e0 <_TOD_Get> * begin at @a starting_address. 109cb3: 53 push %ebx 109cb4: 9d popf * * @param[in] the_heap is the heap to operate upon 109cb5: 8b 45 f0 mov -0x10(%ebp),%eax 109cb8: 89 06 mov %eax,(%esi) * @param[in] starting_address is the starting address of the memory 109cba: b8 d3 4d 62 10 mov $0x10624dd3,%eax 109cbf: f7 65 f4 mull -0xc(%ebp) 109cc2: c1 ea 06 shr $0x6,%edx 109cc5: 89 56 04 mov %edx,0x4(%esi) 109cc8: 31 c0 xor %eax,%eax 109cca: 83 c4 10 add $0x10,%esp 109ccd: 8d 65 f8 lea -0x8(%ebp),%esp 109cd0: 5b pop %ebx 109cd1: 5e pop %esi 109cd2: c9 leave 109cd3: c3 ret rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 109cd4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 109cd9: eb c2 jmp 109c9d <== NOT EXECUTED =============================================================================== 00109ed4 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 109ed4: 55 push %ebp 109ed5: 89 e5 mov %esp,%ebp 109ed7: 83 ec 08 sub $0x8,%esp 109eda: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 109edd: 85 c0 test %eax,%eax 109edf: 74 13 je 109ef4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime( uptime ); 109ee1: 83 ec 0c sub $0xc,%esp 109ee4: 50 push %eax 109ee5: e8 a2 17 00 00 call 10b68c <_TOD_Get_uptime> 109eea: 31 c0 xor %eax,%eax 109eec: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 109eef: c9 leave 109ef0: c3 ret 109ef1: 8d 76 00 lea 0x0(%esi),%esi */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 109ef4: b0 09 mov $0x9,%al <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime( uptime ); return RTEMS_SUCCESSFUL; } 109ef6: c9 leave <== NOT EXECUTED 109ef7: c3 ret <== NOT EXECUTED =============================================================================== 0010aba0 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10aba0: 55 push %ebp 10aba1: 89 e5 mov %esp,%ebp 10aba3: 53 push %ebx 10aba4: 83 ec 14 sub $0x14,%esp 10aba7: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10abaa: 85 db test %ebx,%ebx 10abac: 74 66 je 10ac14 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10abae: 83 ec 0c sub $0xc,%esp 10abb1: 53 push %ebx 10abb2: e8 3d 01 00 00 call 10acf4 <_TOD_Validate> 10abb7: 83 c4 10 add $0x10,%esp 10abba: 84 c0 test %al,%al 10abbc: 75 0a jne 10abc8 10abbe: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10abc3: 8b 5d fc mov -0x4(%ebp),%ebx 10abc6: c9 leave 10abc7: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10abc8: 83 ec 0c sub $0xc,%esp 10abcb: 53 push %ebx 10abcc: e8 93 00 00 00 call 10ac64 <_TOD_To_seconds> 10abd1: 89 45 f4 mov %eax,-0xc(%ebp) newtime.tv_nsec = time_buffer->ticks * 10abd4: 8b 43 18 mov 0x18(%ebx),%eax 10abd7: 0f af 05 c0 ba 12 00 imul 0x12bac0,%eax 10abde: 8d 04 80 lea (%eax,%eax,4),%eax 10abe1: 8d 04 80 lea (%eax,%eax,4),%eax 10abe4: 8d 04 80 lea (%eax,%eax,4),%eax 10abe7: c1 e0 03 shl $0x3,%eax 10abea: 89 45 f8 mov %eax,-0x8(%ebp) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10abed: a1 f8 b8 12 00 mov 0x12b8f8,%eax 10abf2: 40 inc %eax 10abf3: a3 f8 b8 12 00 mov %eax,0x12b8f8 (_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10abf8: 8d 45 f4 lea -0xc(%ebp),%eax 10abfb: 89 04 24 mov %eax,(%esp) 10abfe: e8 6d 1a 00 00 call 10c670 <_TOD_Set> _Thread_Enable_dispatch(); 10ac03: e8 54 2c 00 00 call 10d85c <_Thread_Enable_dispatch> 10ac08: 31 c0 xor %eax,%eax 10ac0a: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10ac0d: 8b 5d fc mov -0x4(%ebp),%ebx 10ac10: c9 leave 10ac11: c3 ret 10ac12: 66 90 xchg %ax,%ax rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10ac14: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10ac19: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10ac1c: c9 leave <== NOT EXECUTED 10ac1d: c3 ret <== NOT EXECUTED =============================================================================== 00109cdc : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 109cdc: 55 push %ebp 109cdd: 89 e5 mov %esp,%ebp 109cdf: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 109ce2: 85 c0 test %eax,%eax 109ce4: 74 0a je 109cf0 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 109ce6: a3 c8 fa 11 00 mov %eax,0x11fac8 109ceb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 109ced: c9 leave 109cee: c3 ret 109cef: 90 nop */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 109cf0: b0 09 mov $0x9,%al <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 109cf2: c9 leave <== NOT EXECUTED 109cf3: c3 ret <== NOT EXECUTED =============================================================================== 00109cf4 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 109cf4: 55 push %ebp 109cf5: 89 e5 mov %esp,%ebp 109cf7: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 109cfa: e8 71 16 00 00 call 10b370 <_TOD_Tickle_ticks> * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. * Any other value of @a alignment is taken "as is", i.e., even odd * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if 109cff: 83 ec 0c sub $0xc,%esp 109d02: 68 dc f9 11 00 push $0x11f9dc 109d07: e8 30 37 00 00 call 10d43c <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 109d0c: e8 db 31 00 00 call 10ceec <_Thread_Tickle_timeslice> 109d11: a0 cc f9 11 00 mov 0x11f9cc,%al if ( _Thread_Is_context_switch_necessary() && 109d16: 83 c4 10 add $0x10,%esp 109d19: 84 c0 test %al,%al 109d1b: 74 09 je 109d26 109d1d: a1 f8 f8 11 00 mov 0x11f8f8,%eax 109d22: 85 c0 test %eax,%eax 109d24: 74 06 je 109d2c _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 109d26: 31 c0 xor %eax,%eax 109d28: c9 leave 109d29: c3 ret 109d2a: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 109d2c: e8 03 25 00 00 call 10c234 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 109d31: 31 c0 xor %eax,%eax 109d33: c9 leave 109d34: c3 ret =============================================================================== 00109d38 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 109d38: 55 push %ebp 109d39: 89 e5 mov %esp,%ebp 109d3b: 83 ec 08 sub $0x8,%esp 109d3e: 8b 4d 08 mov 0x8(%ebp),%ecx 109d41: 8b 55 14 mov 0x14(%ebp),%edx RTEMS_API_Control *api; if ( !event_out ) 109d44: 85 d2 test %edx,%edx 109d46: 74 44 je 109d8c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 109d48: a1 bc f9 11 00 mov 0x11f9bc,%eax 109d4d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax if ( _Event_sets_Is_empty( event_in ) ) { 109d53: 85 c9 test %ecx,%ecx 109d55: 75 09 jne 109d60 *event_out = api->pending_events; 109d57: 8b 00 mov (%eax),%eax 109d59: 89 02 mov %eax,(%edx) 109d5b: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 109d5d: c9 leave 109d5e: c3 ret 109d5f: 90 nop /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109d60: a1 f8 f8 11 00 mov 0x11f8f8,%eax 109d65: 40 inc %eax 109d66: a3 f8 f8 11 00 mov %eax,0x11f8f8 *event_out = api->pending_events; return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 109d6b: 52 push %edx 109d6c: ff 75 10 pushl 0x10(%ebp) 109d6f: ff 75 0c pushl 0xc(%ebp) 109d72: 51 push %ecx 109d73: e8 1c 00 00 00 call 109d94 <_Event_Seize> _Thread_Enable_dispatch(); 109d78: e8 13 26 00 00 call 10c390 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 109d7d: a1 bc f9 11 00 mov 0x11f9bc,%eax 109d82: 8b 40 34 mov 0x34(%eax),%eax 109d85: 83 c4 10 add $0x10,%esp } 109d88: c9 leave 109d89: c3 ret 109d8a: 66 90 xchg %ax,%ax rtems_event_set *event_out ) { RTEMS_API_Control *api; if ( !event_out ) 109d8c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 109d91: c9 leave <== NOT EXECUTED 109d92: c3 ret <== NOT EXECUTED =============================================================================== 0010bc84 : rtems_status_code rtems_extension_create( rtems_name name, rtems_extensions_table *extension_table, Objects_Id *id ) { 10bc84: 55 push %ebp 10bc85: 89 e5 mov %esp,%ebp 10bc87: 57 push %edi 10bc88: 56 push %esi 10bc89: 53 push %ebx 10bc8a: 83 ec 0c sub $0xc,%esp 10bc8d: 8b 7d 08 mov 0x8(%ebp),%edi 10bc90: 8b 75 10 mov 0x10(%ebp),%esi Extension_Control *the_extension; if ( !id ) 10bc93: 85 f6 test %esi,%esi 10bc95: 74 75 je 10bd0c return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10bc97: 85 ff test %edi,%edi 10bc99: 75 0d jne 10bca8 10bc9b: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bca0: 8d 65 f4 lea -0xc(%ebp),%esp 10bca3: 5b pop %ebx 10bca4: 5e pop %esi 10bca5: 5f pop %edi 10bca6: c9 leave 10bca7: c3 ret /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10bca8: a1 f8 b8 12 00 mov 0x12b8f8,%eax 10bcad: 40 inc %eax 10bcae: a3 f8 b8 12 00 mov %eax,0x12b8f8 * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 10bcb3: 83 ec 0c sub $0xc,%esp 10bcb6: 68 80 bb 12 00 push $0x12bb80 10bcbb: e8 64 0d 00 00 call 10ca24 <_Objects_Allocate> 10bcc0: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10bcc2: 83 c4 10 add $0x10,%esp 10bcc5: 85 c0 test %eax,%eax 10bcc7: 74 37 je 10bd00 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set( &the_extension->Extension, extension_table ); 10bcc9: 83 ec 08 sub $0x8,%esp 10bccc: ff 75 0c pushl 0xc(%ebp) 10bccf: 8d 40 10 lea 0x10(%eax),%eax 10bcd2: 50 push %eax 10bcd3: e8 a8 2a 00 00 call 10e780 <_User_extensions_Add_set> 10bcd8: 8b 4b 08 mov 0x8(%ebx),%ecx 10bcdb: 0f b7 d1 movzwl %cx,%edx 10bcde: a1 9c bb 12 00 mov 0x12bb9c,%eax 10bce3: 89 1c 90 mov %ebx,(%eax,%edx,4) 10bce6: 89 7b 0c mov %edi,0xc(%ebx) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10bce9: 89 0e mov %ecx,(%esi) _Thread_Enable_dispatch(); 10bceb: e8 6c 1b 00 00 call 10d85c <_Thread_Enable_dispatch> 10bcf0: 31 c0 xor %eax,%eax 10bcf2: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 10bcf5: 8d 65 f4 lea -0xc(%ebp),%esp 10bcf8: 5b pop %ebx 10bcf9: 5e pop %esi 10bcfa: 5f pop %edi 10bcfb: c9 leave 10bcfc: c3 ret 10bcfd: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10bd00: e8 57 1b 00 00 call 10d85c <_Thread_Enable_dispatch> 10bd05: b8 05 00 00 00 mov $0x5,%eax 10bd0a: eb 94 jmp 10bca0 Objects_Id *id ) { Extension_Control *the_extension; if ( !id ) 10bd0c: b8 09 00 00 00 mov $0x9,%eax 10bd11: eb 8d jmp 10bca0 =============================================================================== 0010c430 : */ rtems_status_code rtems_extension_delete( Objects_Id id ) { 10c430: 55 push %ebp 10c431: 89 e5 mov %esp,%ebp 10c433: 53 push %ebx 10c434: 83 ec 18 sub $0x18,%esp * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure 10c437: 8d 45 f8 lea -0x8(%ebp),%eax 10c43a: 50 push %eax 10c43b: ff 75 08 pushl 0x8(%ebp) 10c43e: 68 c0 4e 12 00 push $0x124ec0 10c443: e8 58 11 00 00 call 10d5a0 <_Objects_Get> 10c448: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10c44a: 83 c4 10 add $0x10,%esp 10c44d: 8b 45 f8 mov -0x8(%ebp),%eax 10c450: 85 c0 test %eax,%eax 10c452: 75 38 jne 10c48c case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10c454: 83 ec 0c sub $0xc,%esp 10c457: 8d 43 10 lea 0x10(%ebx),%eax 10c45a: 50 push %eax 10c45b: e8 98 28 00 00 call 10ecf8 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10c460: 59 pop %ecx 10c461: 58 pop %eax 10c462: 53 push %ebx 10c463: 68 c0 4e 12 00 push $0x124ec0 10c468: e8 bf 0c 00 00 call 10d12c <_Objects_Close> * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 10c46d: 58 pop %eax 10c46e: 5a pop %edx 10c46f: 53 push %ebx 10c470: 68 c0 4e 12 00 push $0x124ec0 10c475: e8 f2 0f 00 00 call 10d46c <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10c47a: e8 65 19 00 00 call 10dde4 <_Thread_Enable_dispatch> 10c47f: 31 c0 xor %eax,%eax 10c481: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c484: 8b 5d fc mov -0x4(%ebp),%ebx 10c487: c9 leave 10c488: c3 ret 10c489: 8d 76 00 lea 0x0(%esi),%esi { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10c48c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c491: 8b 5d fc mov -0x4(%ebp),%ebx 10c494: c9 leave 10c495: c3 ret =============================================================================== 0010a74c : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 10a74c: 55 push %ebp <== NOT EXECUTED 10a74d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a74f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a752: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10a755: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED if ( !_ISR_Is_vector_number_valid( vector ) ) 10a758: 81 7d 0c ff 00 00 00 cmpl $0xff,0xc(%ebp) <== NOT EXECUTED 10a75f: 77 23 ja 10a784 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 10a761: 85 d2 test %edx,%edx <== NOT EXECUTED 10a763: 74 17 je 10a77c <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 10a765: 85 c0 test %eax,%eax <== NOT EXECUTED 10a767: 74 13 je 10a77c <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 10a769: 51 push %ecx <== NOT EXECUTED 10a76a: 50 push %eax <== NOT EXECUTED 10a76b: 52 push %edx <== NOT EXECUTED 10a76c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10a76f: e8 90 c5 ff ff call 106d04 <_CPU_ISR_install_vector><== NOT EXECUTED 10a774: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a776: 83 c4 10 add $0x10,%esp <== NOT EXECUTED vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; } 10a779: c9 leave <== NOT EXECUTED 10a77a: c3 ret <== NOT EXECUTED 10a77b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 10a77c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED } 10a781: c9 leave <== NOT EXECUTED 10a782: c3 ret <== NOT EXECUTED 10a783: 90 nop <== NOT EXECUTED rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { if ( !_ISR_Is_vector_number_valid( vector ) ) 10a784: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED _ISR_Install_vector( vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; } 10a789: c9 leave <== NOT EXECUTED 10a78a: c3 ret <== NOT EXECUTED =============================================================================== 0010b8d8 : 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 ) { 10b8d8: 55 push %ebp 10b8d9: 89 e5 mov %esp,%ebp 10b8db: 57 push %edi 10b8dc: 56 push %esi 10b8dd: 53 push %ebx 10b8de: 83 ec 04 sub $0x4,%esp 10b8e1: 8b 55 08 mov 0x8(%ebp),%edx 10b8e4: 8b 75 0c mov 0xc(%ebp),%esi 10b8e7: 8b 5d 10 mov 0x10(%ebp),%ebx /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 10b8ea: 85 f6 test %esi,%esi 10b8ec: 0f 84 c6 00 00 00 je 10b9b8 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 10b8f2: 85 db test %ebx,%ebx 10b8f4: 0f 84 be 00 00 00 je 10b9b8 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 10b8fa: 8b 06 mov (%esi),%eax 10b8fc: 85 c0 test %eax,%eax 10b8fe: 0f 84 a8 00 00 00 je 10b9ac return RTEMS_INVALID_ADDRESS; *registered_major = 0; 10b904: c7 03 00 00 00 00 movl $0x0,(%ebx) /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 10b90a: a1 24 2a 12 00 mov 0x122a24,%eax 10b90f: 39 d0 cmp %edx,%eax 10b911: 76 5d jbe 10b970 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 10b913: 85 d2 test %edx,%edx 10b915: 75 65 jne 10b97c bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 10b917: 89 c2 mov %eax,%edx 10b919: 4a dec %edx 10b91a: 0f 84 80 00 00 00 je 10b9a0 <== NEVER TAKEN 10b920: 8d 04 40 lea (%eax,%eax,2),%eax 10b923: 8d 04 c5 e8 ff ff ff lea -0x18(,%eax,8),%eax 10b92a: 03 05 28 2a 12 00 add 0x122a28,%eax 10b930: eb 08 jmp 10b93a 10b932: 66 90 xchg %ax,%ax 10b934: 83 e8 18 sub $0x18,%eax 10b937: 4a dec %edx 10b938: 74 66 je 10b9a0 10b93a: 89 c7 mov %eax,%edi if ( !_IO_Driver_address_table[major].initialization_entry && 10b93c: 8b 08 mov (%eax),%ecx 10b93e: 85 c9 test %ecx,%ecx 10b940: 75 f2 jne 10b934 10b942: 8b 48 04 mov 0x4(%eax),%ecx 10b945: 85 c9 test %ecx,%ecx 10b947: 75 eb jne 10b934 <== NEVER TAKEN if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 10b949: b8 06 00 00 00 mov $0x6,%eax 10b94e: 89 c1 mov %eax,%ecx 10b950: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *registered_major = major; 10b952: 89 13 mov %edx,(%ebx) return rtems_io_initialize( major, 0, NULL ); 10b954: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10b95b: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10b962: 89 55 08 mov %edx,0x8(%ebp) } 10b965: 59 pop %ecx 10b966: 5b pop %ebx 10b967: 5e pop %esi 10b968: 5f pop %edi 10b969: c9 leave _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 10b96a: e9 f1 fd ff ff jmp 10b760 10b96f: 90 nop *registered_major = 0; /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 10b970: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); } 10b975: 5a pop %edx 10b976: 5b pop %ebx 10b977: 5e pop %esi 10b978: 5f pop %edi 10b979: c9 leave 10b97a: c3 ret 10b97b: 90 nop if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 10b97c: 8d 04 52 lea (%edx,%edx,2),%eax 10b97f: 8d 3c c5 00 00 00 00 lea 0x0(,%eax,8),%edi 10b986: 03 3d 28 2a 12 00 add 0x122a28,%edi 10b98c: 8b 07 mov (%edi),%eax 10b98e: 85 c0 test %eax,%eax 10b990: 74 32 je 10b9c4 <== NEVER TAKEN _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 10b992: b8 0c 00 00 00 mov $0xc,%eax } 10b997: 5a pop %edx 10b998: 5b pop %ebx 10b999: 5e pop %esi 10b99a: 5f pop %edi 10b99b: c9 leave 10b99c: c3 ret 10b99d: 8d 76 00 lea 0x0(%esi),%esi _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 10b9a0: b8 05 00 00 00 mov $0x5,%eax } 10b9a5: 5a pop %edx 10b9a6: 5b pop %ebx 10b9a7: 5e pop %esi 10b9a8: 5f pop %edi 10b9a9: c9 leave 10b9aa: c3 ret 10b9ab: 90 nop return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 10b9ac: 8b 7e 04 mov 0x4(%esi),%edi 10b9af: 85 ff test %edi,%edi 10b9b1: 0f 85 4d ff ff ff jne 10b904 <== NEVER TAKEN 10b9b7: 90 nop _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 10b9b8: b8 09 00 00 00 mov $0x9,%eax } 10b9bd: 5a pop %edx 10b9be: 5b pop %ebx 10b9bf: 5e pop %esi 10b9c0: 5f pop %edi 10b9c1: c9 leave 10b9c2: c3 ret 10b9c3: 90 nop if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 10b9c4: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED 10b9c7: 85 c0 test %eax,%eax <== NOT EXECUTED 10b9c9: 75 c7 jne 10b992 <== NOT EXECUTED 10b9cb: e9 79 ff ff ff jmp 10b949 <== NOT EXECUTED =============================================================================== 0010b9d0 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10b9d0: 55 push %ebp 10b9d1: 89 e5 mov %esp,%ebp 10b9d3: 57 push %edi 10b9d4: 83 ec 04 sub $0x4,%esp 10b9d7: 8b 45 08 mov 0x8(%ebp),%eax if ( major < _IO_Number_of_drivers ) { 10b9da: 39 05 24 2a 12 00 cmp %eax,0x122a24 10b9e0: 77 0a ja 10b9ec <== ALWAYS TAKEN 10b9e2: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED sizeof( rtems_driver_address_table ) ); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10b9e7: 5a pop %edx <== NOT EXECUTED 10b9e8: 5f pop %edi <== NOT EXECUTED 10b9e9: c9 leave <== NOT EXECUTED 10b9ea: c3 ret <== NOT EXECUTED 10b9eb: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( major < _IO_Number_of_drivers ) { memset( 10b9ec: 8d 3c 40 lea (%eax,%eax,2),%edi 10b9ef: c1 e7 03 shl $0x3,%edi 10b9f2: 03 3d 28 2a 12 00 add 0x122a28,%edi 10b9f8: b9 18 00 00 00 mov $0x18,%ecx 10b9fd: 31 c0 xor %eax,%eax 10b9ff: f3 aa rep stos %al,%es:(%edi) 10ba01: 31 c0 xor %eax,%eax sizeof( rtems_driver_address_table ) ); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10ba03: 5a pop %edx 10ba04: 5f pop %edi 10ba05: c9 leave 10ba06: c3 ret =============================================================================== 0010c9c4 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c9c4: 55 push %ebp 10c9c5: 89 e5 mov %esp,%ebp 10c9c7: 57 push %edi 10c9c8: 56 push %esi 10c9c9: 53 push %ebx 10c9ca: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c9cd: 8b 45 08 mov 0x8(%ebp),%eax 10c9d0: 85 c0 test %eax,%eax 10c9d2: 74 47 je 10ca1b <== NEVER TAKEN return; 10c9d4: bf 01 00 00 00 mov $0x1,%edi for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10c9d9: 8b 04 bd cc b8 12 00 mov 0x12b8cc(,%edi,4),%eax 10c9e0: 85 c0 test %eax,%eax 10c9e2: 74 31 je 10ca15 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10c9e4: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10c9e7: 85 f6 test %esi,%esi 10c9e9: 74 2a je 10ca15 <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 10c9eb: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10c9f0: 74 23 je 10ca15 10c9f2: bb 01 00 00 00 mov $0x1,%ebx 10c9f7: 90 nop the_thread = (Thread_Control *)information->local_table[ i ]; 10c9f8: 8b 46 1c mov 0x1c(%esi),%eax 10c9fb: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10c9fe: 85 c0 test %eax,%eax 10ca00: 74 0a je 10ca0c <== NEVER TAKEN continue; (*routine)(the_thread); 10ca02: 83 ec 0c sub $0xc,%esp 10ca05: 50 push %eax 10ca06: ff 55 08 call *0x8(%ebp) 10ca09: 83 c4 10 add $0x10,%esp api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 10ca0c: 43 inc %ebx 10ca0d: 0f b7 46 10 movzwl 0x10(%esi),%eax 10ca11: 39 d8 cmp %ebx,%eax 10ca13: 73 e3 jae 10c9f8 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10ca15: 47 inc %edi if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 10ca16: 83 ff 05 cmp $0x5,%edi 10ca19: 75 be jne 10c9d9 (*routine)(the_thread); } } } } 10ca1b: 8d 65 f4 lea -0xc(%ebp),%esp 10ca1e: 5b pop %ebx 10ca1f: 5e pop %esi 10ca20: 5f pop %edi 10ca21: c9 leave 10ca22: c3 ret =============================================================================== 0011236c : Objects_Id id, const void *buffer, size_t size, uint32_t *count ) { 11236c: 55 push %ebp 11236d: 89 e5 mov %esp,%ebp 11236f: 57 push %edi 112370: 56 push %esi 112371: 53 push %ebx 112372: 83 ec 1c sub $0x1c,%esp 112375: 8b 7d 08 mov 0x8(%ebp),%edi 112378: 8b 75 0c mov 0xc(%ebp),%esi 11237b: 8b 5d 14 mov 0x14(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 11237e: 85 f6 test %esi,%esi 112380: 74 62 je 1123e4 return RTEMS_INVALID_ADDRESS; if ( !count ) 112382: 85 db test %ebx,%ebx 112384: 74 5e je 1123e4 * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, 112386: 51 push %ecx 112387: 8d 45 f0 lea -0x10(%ebp),%eax 11238a: 50 push %eax 11238b: 57 push %edi 11238c: 68 a0 78 13 00 push $0x1378a0 112391: e8 ee 48 00 00 call 116c84 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 112396: 83 c4 10 add $0x10,%esp 112399: 8b 55 f0 mov -0x10(%ebp),%edx 11239c: 85 d2 test %edx,%edx 11239e: 74 10 je 1123b0 1123a0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1123a5: 8d 65 f4 lea -0xc(%ebp),%esp 1123a8: 5b pop %ebx 1123a9: 5e pop %esi 1123aa: 5f pop %edi 1123ab: c9 leave 1123ac: c3 ret 1123ad: 8d 76 00 lea 0x0(%esi),%esi the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 1123b0: 83 ec 08 sub $0x8,%esp 1123b3: 53 push %ebx 1123b4: 6a 00 push $0x0 1123b6: 57 push %edi 1123b7: ff 75 10 pushl 0x10(%ebp) 1123ba: 56 push %esi 1123bb: 83 c0 14 add $0x14,%eax 1123be: 50 push %eax 1123bf: e8 1c 32 00 00 call 1155e0 <_CORE_message_queue_Broadcast> 1123c4: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 1123c6: 83 c4 20 add $0x20,%esp 1123c9: e8 fa 50 00 00 call 1174c8 <_Thread_Enable_dispatch> return 1123ce: 83 ec 0c sub $0xc,%esp 1123d1: 53 push %ebx 1123d2: e8 5d 03 00 00 call 112734 <_Message_queue_Translate_core_message_queue_return_code> 1123d7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1123da: 8d 65 f4 lea -0xc(%ebp),%esp 1123dd: 5b pop %ebx 1123de: 5e pop %esi 1123df: 5f pop %edi 1123e0: c9 leave 1123e1: c3 ret 1123e2: 66 90 xchg %ax,%ax #endif count ); _Thread_Enable_dispatch(); return 1123e4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1123e9: 8d 65 f4 lea -0xc(%ebp),%esp 1123ec: 5b pop %ebx 1123ed: 5e pop %esi 1123ee: 5f pop %edi 1123ef: c9 leave 1123f0: c3 ret =============================================================================== 001123f4 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, Objects_Id *id ) { 1123f4: 55 push %ebp 1123f5: 89 e5 mov %esp,%ebp 1123f7: 56 push %esi 1123f8: 53 push %ebx 1123f9: 83 ec 10 sub $0x10,%esp 1123fc: 8b 75 08 mov 0x8(%ebp),%esi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 1123ff: 85 f6 test %esi,%esi 112401: 74 31 je 112434 return RTEMS_INVALID_NAME; if ( !id ) 112403: 8b 4d 18 mov 0x18(%ebp),%ecx 112406: 85 c9 test %ecx,%ecx 112408: 0f 84 92 00 00 00 je 1124a0 <== NEVER TAKEN if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 11240e: 8b 55 0c mov 0xc(%ebp),%edx 112411: 85 d2 test %edx,%edx 112413: 74 13 je 112428 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 112415: 8b 45 10 mov 0x10(%ebp),%eax 112418: 85 c0 test %eax,%eax 11241a: 75 24 jne 112440 <== ALWAYS TAKEN 11241c: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112421: 8d 65 f8 lea -0x8(%ebp),%esp 112424: 5b pop %ebx 112425: 5e pop %esi 112426: c9 leave 112427: c3 ret if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 112428: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11242d: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 112430: 5b pop %ebx <== NOT EXECUTED 112431: 5e pop %esi <== NOT EXECUTED 112432: c9 leave <== NOT EXECUTED 112433: c3 ret <== NOT EXECUTED CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 112434: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112439: 8d 65 f8 lea -0x8(%ebp),%esp 11243c: 5b pop %ebx 11243d: 5e pop %esi 11243e: c9 leave 11243f: c3 ret /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 112440: a1 b8 6e 13 00 mov 0x136eb8,%eax 112445: 40 inc %eax 112446: a3 b8 6e 13 00 mov %eax,0x136eb8 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 11244b: e8 ec 84 00 00 call 11a93c <_Message_queue_Allocate> 112450: 89 c3 mov %eax,%ebx if ( !the_message_queue ) { 112452: 85 c0 test %eax,%eax 112454: 74 7a je 1124d0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 112456: 8b 45 14 mov 0x14(%ebp),%eax 112459: 89 43 10 mov %eax,0x10(%ebx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11245c: a8 04 test $0x4,%al 11245e: 0f 95 c0 setne %al 112461: 0f b6 c0 movzbl %al,%eax 112464: 89 45 f4 mov %eax,-0xc(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 112467: ff 75 10 pushl 0x10(%ebp) 11246a: ff 75 0c pushl 0xc(%ebp) 11246d: 8d 45 f4 lea -0xc(%ebp),%eax 112470: 50 push %eax 112471: 8d 43 14 lea 0x14(%ebx),%eax 112474: 50 push %eax 112475: e8 86 32 00 00 call 115700 <_CORE_message_queue_Initialize> 11247a: 83 c4 10 add $0x10,%esp 11247d: 84 c0 test %al,%al 11247f: 75 2b jne 1124ac * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, 112481: 83 ec 08 sub $0x8,%esp 112484: 53 push %ebx 112485: 68 a0 78 13 00 push $0x1378a0 11248a: e8 81 46 00 00 call 116b10 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 11248f: e8 34 50 00 00 call 1174c8 <_Thread_Enable_dispatch> 112494: b8 0d 00 00 00 mov $0xd,%eax 112499: 83 c4 10 add $0x10,%esp 11249c: eb 83 jmp 112421 11249e: 66 90 xchg %ax,%ax #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 1124a0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 1124a5: e9 77 ff ff ff jmp 112421 <== NOT EXECUTED 1124aa: 66 90 xchg %ax,%ax <== NOT EXECUTED 1124ac: 8b 4b 08 mov 0x8(%ebx),%ecx 1124af: 0f b7 d1 movzwl %cx,%edx 1124b2: a1 bc 78 13 00 mov 0x1378bc,%eax 1124b7: 89 1c 90 mov %ebx,(%eax,%edx,4) 1124ba: 89 73 0c mov %esi,0xc(%ebx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 1124bd: 8b 45 18 mov 0x18(%ebp),%eax 1124c0: 89 08 mov %ecx,(%eax) name, 0 ); #endif _Thread_Enable_dispatch(); 1124c2: e8 01 50 00 00 call 1174c8 <_Thread_Enable_dispatch> 1124c7: 31 c0 xor %eax,%eax 1124c9: e9 53 ff ff ff jmp 112421 1124ce: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 1124d0: e8 f3 4f 00 00 call 1174c8 <_Thread_Enable_dispatch> 1124d5: b8 05 00 00 00 mov $0x5,%eax 1124da: e9 42 ff ff ff jmp 112421 =============================================================================== 001124e0 : */ rtems_status_code rtems_message_queue_delete( Objects_Id id ) { 1124e0: 55 push %ebp 1124e1: 89 e5 mov %esp,%ebp 1124e3: 53 push %ebx 1124e4: 83 ec 18 sub $0x18,%esp * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, 1124e7: 8d 45 f8 lea -0x8(%ebp),%eax 1124ea: 50 push %eax 1124eb: ff 75 08 pushl 0x8(%ebp) 1124ee: 68 a0 78 13 00 push $0x1378a0 1124f3: e8 8c 47 00 00 call 116c84 <_Objects_Get> 1124f8: 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 ) { 1124fa: 83 c4 10 add $0x10,%esp 1124fd: 8b 4d f8 mov -0x8(%ebp),%ecx 112500: 85 c9 test %ecx,%ecx 112502: 75 3c jne 112540 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 112504: 83 ec 08 sub $0x8,%esp 112507: 50 push %eax 112508: 68 a0 78 13 00 push $0x1378a0 11250d: e8 be 42 00 00 call 1167d0 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 112512: 83 c4 0c add $0xc,%esp 112515: 6a 05 push $0x5 112517: 6a 00 push $0x0 112519: 8d 43 14 lea 0x14(%ebx),%eax 11251c: 50 push %eax 11251d: e8 3a 31 00 00 call 11565c <_CORE_message_queue_Close> * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, 112522: 58 pop %eax 112523: 5a pop %edx 112524: 53 push %ebx 112525: 68 a0 78 13 00 push $0x1378a0 11252a: e8 e1 45 00 00 call 116b10 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11252f: e8 94 4f 00 00 call 1174c8 <_Thread_Enable_dispatch> 112534: 31 c0 xor %eax,%eax 112536: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112539: 8b 5d fc mov -0x4(%ebp),%ebx 11253c: c9 leave 11253d: c3 ret 11253e: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 112540: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112545: 8b 5d fc mov -0x4(%ebp),%ebx 112548: c9 leave 112549: c3 ret =============================================================================== 0011254c : rtems_status_code rtems_message_queue_flush( Objects_Id id, uint32_t *count ) { 11254c: 55 push %ebp 11254d: 89 e5 mov %esp,%ebp 11254f: 53 push %ebx 112550: 83 ec 14 sub $0x14,%esp 112553: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 112556: 85 db test %ebx,%ebx 112558: 74 46 je 1125a0 <== NEVER TAKEN * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, 11255a: 51 push %ecx 11255b: 8d 45 f8 lea -0x8(%ebp),%eax 11255e: 50 push %eax 11255f: ff 75 08 pushl 0x8(%ebp) 112562: 68 a0 78 13 00 push $0x1378a0 112567: e8 18 47 00 00 call 116c84 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 11256c: 83 c4 10 add $0x10,%esp 11256f: 8b 55 f8 mov -0x8(%ebp),%edx 112572: 85 d2 test %edx,%edx 112574: 74 0a je 112580 112576: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11257b: 8b 5d fc mov -0x4(%ebp),%ebx 11257e: c9 leave 11257f: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 112580: 83 ec 0c sub $0xc,%esp 112583: 83 c0 14 add $0x14,%eax 112586: 50 push %eax 112587: e8 0c 31 00 00 call 115698 <_CORE_message_queue_Flush> 11258c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 11258e: e8 35 4f 00 00 call 1174c8 <_Thread_Enable_dispatch> 112593: 31 c0 xor %eax,%eax 112595: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112598: 8b 5d fc mov -0x4(%ebp),%ebx 11259b: c9 leave 11259c: c3 ret 11259d: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1125a0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1125a5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1125a8: c9 leave <== NOT EXECUTED 1125a9: c3 ret <== NOT EXECUTED =============================================================================== 001125ac : rtems_status_code rtems_message_queue_get_number_pending( Objects_Id id, uint32_t *count ) { 1125ac: 55 push %ebp 1125ad: 89 e5 mov %esp,%ebp 1125af: 53 push %ebx 1125b0: 83 ec 14 sub $0x14,%esp 1125b3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1125b6: 85 db test %ebx,%ebx 1125b8: 74 3a je 1125f4 <== NEVER TAKEN 1125ba: 51 push %ecx 1125bb: 8d 45 f8 lea -0x8(%ebp),%eax 1125be: 50 push %eax 1125bf: ff 75 08 pushl 0x8(%ebp) 1125c2: 68 a0 78 13 00 push $0x1378a0 1125c7: e8 b8 46 00 00 call 116c84 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1125cc: 83 c4 10 add $0x10,%esp 1125cf: 8b 55 f8 mov -0x8(%ebp),%edx 1125d2: 85 d2 test %edx,%edx 1125d4: 74 0a je 1125e0 1125d6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1125db: 8b 5d fc mov -0x4(%ebp),%ebx 1125de: c9 leave 1125df: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 1125e0: 8b 40 5c mov 0x5c(%eax),%eax 1125e3: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1125e5: e8 de 4e 00 00 call 1174c8 <_Thread_Enable_dispatch> 1125ea: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1125ec: 8b 5d fc mov -0x4(%ebp),%ebx 1125ef: c9 leave 1125f0: c3 ret 1125f1: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1125f4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1125f9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1125fc: c9 leave <== NOT EXECUTED 1125fd: c3 ret <== NOT EXECUTED =============================================================================== 00112624 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 112624: 55 push %ebp 112625: 89 e5 mov %esp,%ebp 112627: 57 push %edi 112628: 56 push %esi 112629: 53 push %ebx 11262a: 83 ec 1c sub $0x1c,%esp 11262d: 8b 7d 0c mov 0xc(%ebp),%edi 112630: 8b 75 10 mov 0x10(%ebp),%esi 112633: 8b 5d 14 mov 0x14(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 112636: 85 ff test %edi,%edi 112638: 74 6e je 1126a8 return RTEMS_INVALID_ADDRESS; if ( !size ) 11263a: 85 f6 test %esi,%esi 11263c: 74 6a je 1126a8 11263e: 51 push %ecx 11263f: 8d 45 f0 lea -0x10(%ebp),%eax 112642: 50 push %eax 112643: ff 75 08 pushl 0x8(%ebp) 112646: 68 a0 78 13 00 push $0x1378a0 11264b: e8 34 46 00 00 call 116c84 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 112650: 83 c4 10 add $0x10,%esp 112653: 8b 55 f0 mov -0x10(%ebp),%edx 112656: 85 d2 test %edx,%edx 112658: 75 3e jne 112698 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 11265a: 83 ec 08 sub $0x8,%esp 11265d: ff 75 18 pushl 0x18(%ebp) 112660: 83 f3 01 xor $0x1,%ebx 112663: 83 e3 01 and $0x1,%ebx 112666: 53 push %ebx 112667: 56 push %esi 112668: 57 push %edi 112669: ff 70 08 pushl 0x8(%eax) 11266c: 83 c0 14 add $0x14,%eax 11266f: 50 push %eax 112670: e8 3f 31 00 00 call 1157b4 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 112675: 83 c4 20 add $0x20,%esp 112678: e8 4b 4e 00 00 call 1174c8 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 11267d: 83 ec 0c sub $0xc,%esp 112680: a1 7c 6f 13 00 mov 0x136f7c,%eax 112685: ff 70 34 pushl 0x34(%eax) 112688: e8 a7 00 00 00 call 112734 <_Message_queue_Translate_core_message_queue_return_code> 11268d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112690: 8d 65 f4 lea -0xc(%ebp),%esp 112693: 5b pop %ebx 112694: 5e pop %esi 112695: 5f pop %edi 112696: c9 leave 112697: c3 ret if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 112698: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11269d: 8d 65 f4 lea -0xc(%ebp),%esp 1126a0: 5b pop %ebx 1126a1: 5e pop %esi 1126a2: 5f pop %edi 1126a3: c9 leave 1126a4: c3 ret 1126a5: 8d 76 00 lea 0x0(%esi),%esi size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 1126a8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1126ad: 8d 65 f4 lea -0xc(%ebp),%esp 1126b0: 5b pop %ebx 1126b1: 5e pop %esi 1126b2: 5f pop %edi 1126b3: c9 leave 1126b4: c3 ret =============================================================================== 0010a0e4 : rtems_status_code rtems_message_queue_send( Objects_Id id, const void *buffer, size_t size ) { 10a0e4: 55 push %ebp 10a0e5: 89 e5 mov %esp,%ebp 10a0e7: 56 push %esi 10a0e8: 53 push %ebx 10a0e9: 83 ec 10 sub $0x10,%esp 10a0ec: 8b 75 08 mov 0x8(%ebp),%esi 10a0ef: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10a0f2: 85 db test %ebx,%ebx 10a0f4: 74 5e je 10a154 <== NEVER TAKEN * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, 10a0f6: 51 push %ecx 10a0f7: 8d 45 f4 lea -0xc(%ebp),%eax 10a0fa: 50 push %eax 10a0fb: 56 push %esi 10a0fc: 68 e0 02 12 00 push $0x1202e0 10a101: e8 46 1a 00 00 call 10bb4c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10a106: 83 c4 10 add $0x10,%esp 10a109: 8b 55 f4 mov -0xc(%ebp),%edx 10a10c: 85 d2 test %edx,%edx 10a10e: 74 0c je 10a11c 10a110: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a115: 8d 65 f8 lea -0x8(%ebp),%esp 10a118: 5b pop %ebx 10a119: 5e pop %esi 10a11a: c9 leave 10a11b: c3 ret * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 10a11c: 6a 00 push $0x0 10a11e: 6a 00 push $0x0 10a120: 68 ff ff ff 7f push $0x7fffffff 10a125: 6a 00 push $0x0 10a127: 56 push %esi 10a128: ff 75 10 pushl 0x10(%ebp) 10a12b: 53 push %ebx 10a12c: 83 c0 14 add $0x14,%eax 10a12f: 50 push %eax 10a130: e8 37 0d 00 00 call 10ae6c <_CORE_message_queue_Submit> 10a135: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, FALSE, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10a137: 83 c4 20 add $0x20,%esp 10a13a: e8 51 22 00 00 call 10c390 <_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); 10a13f: 83 ec 0c sub $0xc,%esp 10a142: 53 push %ebx 10a143: e8 18 00 00 00 call 10a160 <_Message_queue_Translate_core_message_queue_return_code> 10a148: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a14b: 8d 65 f8 lea -0x8(%ebp),%esp 10a14e: 5b pop %ebx 10a14f: 5e pop %esi 10a150: c9 leave 10a151: c3 ret 10a152: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10a154: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a159: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a15c: 5b pop %ebx <== NOT EXECUTED 10a15d: 5e pop %esi <== NOT EXECUTED 10a15e: c9 leave <== NOT EXECUTED 10a15f: c3 ret <== NOT EXECUTED =============================================================================== 00112744 : rtems_status_code rtems_message_queue_urgent( Objects_Id id, const void *buffer, size_t size ) { 112744: 55 push %ebp 112745: 89 e5 mov %esp,%ebp 112747: 56 push %esi 112748: 53 push %ebx 112749: 83 ec 10 sub $0x10,%esp 11274c: 8b 75 08 mov 0x8(%ebp),%esi 11274f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 112752: 85 db test %ebx,%ebx 112754: 74 5e je 1127b4 <== NEVER TAKEN * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, 112756: 51 push %ecx 112757: 8d 45 f4 lea -0xc(%ebp),%eax 11275a: 50 push %eax 11275b: 56 push %esi 11275c: 68 a0 78 13 00 push $0x1378a0 112761: e8 1e 45 00 00 call 116c84 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 112766: 83 c4 10 add $0x10,%esp 112769: 8b 55 f4 mov -0xc(%ebp),%edx 11276c: 85 d2 test %edx,%edx 11276e: 74 0c je 11277c 112770: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112775: 8d 65 f8 lea -0x8(%ebp),%esp 112778: 5b pop %ebx 112779: 5e pop %esi 11277a: c9 leave 11277b: c3 ret size_t size 11277c: 6a 00 push $0x0 11277e: 6a 00 push $0x0 112780: 68 00 00 00 80 push $0x80000000 112785: 6a 00 push $0x0 112787: 56 push %esi 112788: ff 75 10 pushl 0x10(%ebp) 11278b: 53 push %ebx 11278c: 83 c0 14 add $0x14,%eax 11278f: 50 push %eax 112790: e8 4b 31 00 00 call 1158e0 <_CORE_message_queue_Submit> 112795: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, FALSE, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 112797: 83 c4 20 add $0x20,%esp 11279a: e8 29 4d 00 00 call 1174c8 <_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); 11279f: 83 ec 0c sub $0xc,%esp 1127a2: 53 push %ebx 1127a3: e8 8c ff ff ff call 112734 <_Message_queue_Translate_core_message_queue_return_code> 1127a8: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1127ab: 8d 65 f8 lea -0x8(%ebp),%esp 1127ae: 5b pop %ebx 1127af: 5e pop %esi 1127b0: c9 leave 1127b1: c3 ret 1127b2: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1127b4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1127b9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1127bc: 5b pop %ebx <== NOT EXECUTED 1127bd: 5e pop %esi <== NOT EXECUTED 1127be: c9 leave <== NOT EXECUTED 1127bf: c3 ret <== NOT EXECUTED =============================================================================== 0010a694 : }; const char *rtems_object_get_api_name( uint32_t api ) { 10a694: 55 push %ebp 10a695: 89 e5 mov %esp,%ebp 10a697: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10a69a: ff 75 08 pushl 0x8(%ebp) 10a69d: 68 e0 0d 12 00 push $0x120de0 10a6a2: e8 a5 45 00 00 call 10ec4c if ( api_assoc ) 10a6a7: 83 c4 10 add $0x10,%esp 10a6aa: 85 c0 test %eax,%eax 10a6ac: 74 06 je 10a6b4 return api_assoc->name; 10a6ae: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10a6b0: c9 leave 10a6b1: c3 ret 10a6b2: 66 90 xchg %ax,%ax ) { const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) 10a6b4: b8 d8 ba 11 00 mov $0x11bad8,%eax return api_assoc->name; return "BAD CLASS"; } 10a6b9: c9 leave 10a6ba: c3 ret =============================================================================== 0010b7cc : rtems_status_code rtems_object_get_class_information( uint32_t the_api, uint32_t the_class, rtems_object_api_class_information *info ) { 10b7cc: 55 push %ebp 10b7cd: 89 e5 mov %esp,%ebp 10b7cf: 56 push %esi 10b7d0: 53 push %ebx 10b7d1: 8b 75 10 mov 0x10(%ebp),%esi uint32_t i; /* * Validate parameters and look up information structure. */ if ( !info ) 10b7d4: 85 f6 test %esi,%esi 10b7d6: 74 58 je 10b830 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10b7d8: 83 ec 08 sub $0x8,%esp 10b7db: ff 75 0c pushl 0xc(%ebp) 10b7de: ff 75 08 pushl 0x8(%ebp) 10b7e1: e8 c6 1a 00 00 call 10d2ac <_Objects_Get_information> 10b7e6: 89 c2 mov %eax,%edx if ( !obj_info ) 10b7e8: 83 c4 10 add $0x10,%esp 10b7eb: 85 c0 test %eax,%eax 10b7ed: 74 4d je 10b83c return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10b7ef: 8b 40 08 mov 0x8(%eax),%eax 10b7f2: 89 06 mov %eax,(%esi) info->maximum_id = obj_info->maximum_id; 10b7f4: 8b 42 0c mov 0xc(%edx),%eax 10b7f7: 89 46 04 mov %eax,0x4(%esi) info->auto_extend = obj_info->auto_extend; 10b7fa: 8a 42 12 mov 0x12(%edx),%al 10b7fd: 88 46 0c mov %al,0xc(%esi) info->maximum = obj_info->maximum; 10b800: 0f b7 42 10 movzwl 0x10(%edx),%eax 10b804: 89 46 08 mov %eax,0x8(%esi) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10b807: 85 c0 test %eax,%eax 10b809: 74 3d je 10b848 <== NEVER TAKEN 10b80b: 8b 5a 1c mov 0x1c(%edx),%ebx 10b80e: 31 c9 xor %ecx,%ecx 10b810: ba 01 00 00 00 mov $0x1,%edx 10b815: 8d 76 00 lea 0x0(%esi),%esi if ( !obj_info->local_table[i] ) unallocated++; 10b818: 83 3c 93 01 cmpl $0x1,(%ebx,%edx,4) 10b81c: 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++ ) 10b81f: 42 inc %edx 10b820: 39 d0 cmp %edx,%eax 10b822: 73 f4 jae 10b818 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10b824: 89 4e 10 mov %ecx,0x10(%esi) 10b827: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10b829: 8d 65 f8 lea -0x8(%ebp),%esp 10b82c: 5b pop %ebx 10b82d: 5e pop %esi 10b82e: c9 leave 10b82f: c3 ret uint32_t i; /* * Validate parameters and look up information structure. */ if ( !info ) 10b830: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10b835: 8d 65 f8 lea -0x8(%ebp),%esp 10b838: 5b pop %ebx 10b839: 5e pop %esi 10b83a: c9 leave 10b83b: c3 ret */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 10b83c: b8 0a 00 00 00 mov $0xa,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10b841: 8d 65 f8 lea -0x8(%ebp),%esp 10b844: 5b pop %ebx 10b845: 5e pop %esi 10b846: c9 leave 10b847: c3 ret 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++ ) 10b848: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 10b84a: eb d8 jmp 10b824 <== NOT EXECUTED =============================================================================== 0010b04c : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10b04c: 55 push %ebp 10b04d: 89 e5 mov %esp,%ebp 10b04f: 53 push %ebx 10b050: 83 ec 14 sub $0x14,%esp 10b053: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10b056: 85 db test %ebx,%ebx 10b058: 74 26 je 10b080 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10b05a: 83 ec 08 sub $0x8,%esp 10b05d: 8d 45 f8 lea -0x8(%ebp),%eax 10b060: 50 push %eax 10b061: ff 75 08 pushl 0x8(%ebp) 10b064: e8 77 1b 00 00 call 10cbe0 <_Objects_Id_to_name> *name = name_u.name_u32; 10b069: 8b 55 f8 mov -0x8(%ebp),%edx 10b06c: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10b06e: 8b 04 85 54 c5 11 00 mov 0x11c554(,%eax,4),%eax 10b075: 83 c4 10 add $0x10,%esp } 10b078: 8b 5d fc mov -0x4(%ebp),%ebx 10b07b: c9 leave 10b07c: c3 ret 10b07d: 8d 76 00 lea 0x0(%esi),%esi ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10b080: b8 09 00 00 00 mov $0x9,%eax status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 10b085: 8b 5d fc mov -0x4(%ebp),%ebx 10b088: c9 leave 10b089: c3 ret =============================================================================== 0010a6c8 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10a6c8: 55 push %ebp 10a6c9: 89 e5 mov %esp,%ebp 10a6cb: 57 push %edi 10a6cc: 56 push %esi 10a6cd: 53 push %ebx 10a6ce: 83 ec 1c sub $0x1c,%esp 10a6d1: 8b 45 08 mov 0x8(%ebp),%eax 10a6d4: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10a6d7: 85 ff test %edi,%edi 10a6d9: 74 65 je 10a740 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10a6db: 85 c0 test %eax,%eax 10a6dd: 74 45 je 10a724 10a6df: 89 c3 mov %eax,%ebx information = _Objects_Get_information_id( tmpId ); 10a6e1: 83 ec 0c sub $0xc,%esp 10a6e4: 53 push %ebx 10a6e5: e8 32 19 00 00 call 10c01c <_Objects_Get_information_id> 10a6ea: 89 c6 mov %eax,%esi if ( !information ) 10a6ec: 83 c4 10 add $0x10,%esp 10a6ef: 85 c0 test %eax,%eax 10a6f1: 74 3d je 10a730 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10a6f3: 50 push %eax 10a6f4: 8d 45 f0 lea -0x10(%ebp),%eax 10a6f7: 50 push %eax 10a6f8: 53 push %ebx 10a6f9: 56 push %esi 10a6fa: e8 dd 1a 00 00 call 10c1dc <_Objects_Get> switch ( location ) { 10a6ff: 83 c4 10 add $0x10,%esp 10a702: 8b 4d f0 mov -0x10(%ebp),%ecx 10a705: 85 c9 test %ecx,%ecx 10a707: 75 27 jne 10a730 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10a709: 52 push %edx 10a70a: 57 push %edi 10a70b: 50 push %eax 10a70c: 56 push %esi 10a70d: e8 ae 1c 00 00 call 10c3c0 <_Objects_Set_name> _Thread_Enable_dispatch(); 10a712: e8 fd 23 00 00 call 10cb14 <_Thread_Enable_dispatch> 10a717: 31 c0 xor %eax,%eax 10a719: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a71c: 8d 65 f4 lea -0xc(%ebp),%esp 10a71f: 5b pop %ebx 10a720: 5e pop %esi 10a721: 5f pop %edi 10a722: c9 leave 10a723: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10a724: a1 3c 31 12 00 mov 0x12313c,%eax 10a729: 8b 58 08 mov 0x8(%eax),%ebx 10a72c: eb b3 jmp 10a6e1 10a72e: 66 90 xchg %ax,%ax switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10a730: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a735: 8d 65 f4 lea -0xc(%ebp),%esp 10a738: 5b pop %ebx 10a739: 5e pop %esi 10a73a: 5f pop %edi 10a73b: c9 leave 10a73c: c3 ret 10a73d: 8d 76 00 lea 0x0(%esi),%esi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10a740: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 10a745: eb d5 jmp 10a71c <== NOT EXECUTED =============================================================================== 001127c0 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, Objects_Id *id ) { 1127c0: 55 push %ebp 1127c1: 89 e5 mov %esp,%ebp 1127c3: 56 push %esi 1127c4: 53 push %ebx 1127c5: 8b 75 08 mov 0x8(%ebp),%esi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1127c8: 85 f6 test %esi,%esi 1127ca: 74 48 je 112814 return RTEMS_INVALID_NAME; if ( !starting_address ) 1127cc: 8b 5d 0c mov 0xc(%ebp),%ebx 1127cf: 85 db test %ebx,%ebx 1127d1: 74 27 je 1127fa <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !id ) 1127d3: 8b 4d 1c mov 0x1c(%ebp),%ecx 1127d6: 85 c9 test %ecx,%ecx 1127d8: 74 20 je 1127fa <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1127da: 8b 55 10 mov 0x10(%ebp),%edx 1127dd: 85 d2 test %edx,%edx 1127df: 74 27 je 112808 1127e1: 8b 45 14 mov 0x14(%ebp),%eax 1127e4: 85 c0 test %eax,%eax 1127e6: 74 20 je 112808 1127e8: 8b 45 14 mov 0x14(%ebp),%eax 1127eb: 39 45 10 cmp %eax,0x10(%ebp) 1127ee: 72 18 jb 112808 1127f0: a8 03 test $0x3,%al 1127f2: 75 14 jne 112808 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 1127f4: f6 45 0c 03 testb $0x3,0xc(%ebp) 1127f8: 74 26 je 112820 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1127fa: b8 09 00 00 00 mov $0x9,%eax } 1127ff: 8d 65 f8 lea -0x8(%ebp),%esp 112802: 5b pop %ebx 112803: 5e pop %esi 112804: c9 leave 112805: c3 ret 112806: 66 90 xchg %ax,%ax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 112808: b8 08 00 00 00 mov $0x8,%eax } 11280d: 8d 65 f8 lea -0x8(%ebp),%esp 112810: 5b pop %ebx 112811: 5e pop %esi 112812: c9 leave 112813: c3 ret Objects_Id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 112814: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112819: 8d 65 f8 lea -0x8(%ebp),%esp 11281c: 5b pop %ebx 11281d: 5e pop %esi 11281e: c9 leave 11281f: c3 ret /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 112820: a1 b8 6e 13 00 mov 0x136eb8,%eax 112825: 40 inc %eax 112826: a3 b8 6e 13 00 mov %eax,0x136eb8 * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the user block * to obtain the size of 11282b: 83 ec 0c sub $0xc,%esp 11282e: 68 c0 6c 13 00 push $0x136cc0 112833: e8 18 3f 00 00 call 116750 <_Objects_Allocate> 112838: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 11283a: 83 c4 10 add $0x10,%esp 11283d: 85 c0 test %eax,%eax 11283f: 74 5f je 1128a0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 112841: 8b 45 0c mov 0xc(%ebp),%eax 112844: 89 43 10 mov %eax,0x10(%ebx) the_partition->length = length; 112847: 8b 45 10 mov 0x10(%ebp),%eax 11284a: 89 43 14 mov %eax,0x14(%ebx) the_partition->buffer_size = buffer_size; 11284d: 8b 45 14 mov 0x14(%ebp),%eax 112850: 89 43 18 mov %eax,0x18(%ebx) the_partition->attribute_set = attribute_set; 112853: 8b 45 18 mov 0x18(%ebp),%eax 112856: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 112859: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 112860: ff 75 14 pushl 0x14(%ebp) 112863: 8b 45 10 mov 0x10(%ebp),%eax 112866: 31 d2 xor %edx,%edx 112868: f7 75 14 divl 0x14(%ebp) 11286b: 50 push %eax 11286c: ff 75 0c pushl 0xc(%ebp) 11286f: 8d 43 24 lea 0x24(%ebx),%eax 112872: 50 push %eax 112873: e8 1c 2d 00 00 call 115594 <_Chain_Initialize> 112878: 8b 4b 08 mov 0x8(%ebx),%ecx 11287b: 0f b7 d1 movzwl %cx,%edx 11287e: a1 dc 6c 13 00 mov 0x136cdc,%eax 112883: 89 1c 90 mov %ebx,(%eax,%edx,4) 112886: 89 73 0c mov %esi,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 112889: 8b 45 1c mov 0x1c(%ebp),%eax 11288c: 89 08 mov %ecx,(%eax) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 11288e: e8 35 4c 00 00 call 1174c8 <_Thread_Enable_dispatch> 112893: 31 c0 xor %eax,%eax 112895: 83 c4 10 add $0x10,%esp 112898: e9 70 ff ff ff jmp 11280d 11289d: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1128a0: e8 23 4c 00 00 call 1174c8 <_Thread_Enable_dispatch> 1128a5: b8 05 00 00 00 mov $0x5,%eax 1128aa: e9 5e ff ff ff jmp 11280d =============================================================================== 001128b0 : */ rtems_status_code rtems_partition_delete( Objects_Id id ) { 1128b0: 55 push %ebp 1128b1: 89 e5 mov %esp,%ebp 1128b3: 53 push %ebx 1128b4: 83 ec 18 sub $0x18,%esp ); /** * This routine returns the block of memory which begins * at @a starting_address to @a the_heap. Any coalescing which is * possible with the freeing of this routine is performed. 1128b7: 8d 45 f8 lea -0x8(%ebp),%eax 1128ba: 50 push %eax 1128bb: ff 75 08 pushl 0x8(%ebp) 1128be: 68 c0 6c 13 00 push $0x136cc0 1128c3: e8 bc 43 00 00 call 116c84 <_Objects_Get> 1128c8: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1128ca: 83 c4 10 add $0x10,%esp 1128cd: 8b 45 f8 mov -0x8(%ebp),%eax 1128d0: 85 c0 test %eax,%eax 1128d2: 74 0c je 1128e0 1128d4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1128d9: 8b 5d fc mov -0x4(%ebp),%ebx 1128dc: c9 leave 1128dd: c3 ret 1128de: 66 90 xchg %ax,%ax the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 1128e0: 8b 4b 20 mov 0x20(%ebx),%ecx 1128e3: 85 c9 test %ecx,%ecx 1128e5: 74 11 je 1128f8 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1128e7: e8 dc 4b 00 00 call 1174c8 <_Thread_Enable_dispatch> 1128ec: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1128f1: 8b 5d fc mov -0x4(%ebp),%ebx 1128f4: c9 leave 1128f5: c3 ret 1128f6: 66 90 xchg %ax,%ax the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); 1128f8: 83 ec 08 sub $0x8,%esp 1128fb: 53 push %ebx 1128fc: 68 c0 6c 13 00 push $0x136cc0 112901: e8 ca 3e 00 00 call 1167d0 <_Objects_Close> size_t *size ); /** * This function tries to resize in place the block that is pointed to by the * @a starting_address to the new @a size. 112906: 58 pop %eax 112907: 5a pop %edx 112908: 53 push %ebx 112909: 68 c0 6c 13 00 push $0x136cc0 11290e: e8 fd 41 00 00 call 116b10 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 112913: e8 b0 4b 00 00 call 1174c8 <_Thread_Enable_dispatch> 112918: 31 c0 xor %eax,%eax 11291a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11291d: 8b 5d fc mov -0x4(%ebp),%ebx 112920: c9 leave 112921: c3 ret =============================================================================== 00112924 : rtems_status_code rtems_partition_get_buffer( Objects_Id id, void **buffer ) { 112924: 55 push %ebp 112925: 89 e5 mov %esp,%ebp 112927: 57 push %edi 112928: 56 push %esi 112929: 53 push %ebx 11292a: 83 ec 1c sub $0x1c,%esp 11292d: 8b 7d 0c mov 0xc(%ebp),%edi register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 112930: 85 ff test %edi,%edi 112932: 74 58 je 11298c <== NEVER TAKEN ); /** * This routine returns the block of memory which begins * at @a starting_address to @a the_heap. Any coalescing which is * possible with the freeing of this routine is performed. 112934: 52 push %edx 112935: 8d 45 f0 lea -0x10(%ebp),%eax 112938: 50 push %eax 112939: ff 75 08 pushl 0x8(%ebp) 11293c: 68 c0 6c 13 00 push $0x136cc0 112941: e8 3e 43 00 00 call 116c84 <_Objects_Get> 112946: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 112948: 83 c4 10 add $0x10,%esp 11294b: 8b 45 f0 mov -0x10(%ebp),%eax 11294e: 85 c0 test %eax,%eax 112950: 75 2a jne 11297c #endif /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of 112952: 83 ec 0c sub $0xc,%esp 112955: 8d 43 24 lea 0x24(%ebx),%eax 112958: 50 push %eax 112959: e8 0e 2c 00 00 call 11556c <_Chain_Get> 11295e: 89 c6 mov %eax,%esi case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 112960: 83 c4 10 add $0x10,%esp 112963: 85 c0 test %eax,%eax 112965: 74 35 je 11299c the_partition->number_of_used_blocks += 1; 112967: ff 43 20 incl 0x20(%ebx) _Thread_Enable_dispatch(); 11296a: e8 59 4b 00 00 call 1174c8 <_Thread_Enable_dispatch> *buffer = the_buffer; 11296f: 89 37 mov %esi,(%edi) 112971: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112973: 8d 65 f4 lea -0xc(%ebp),%esp 112976: 5b pop %ebx 112977: 5e pop %esi 112978: 5f pop %edi 112979: c9 leave 11297a: c3 ret 11297b: 90 nop if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11297c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112981: 8d 65 f4 lea -0xc(%ebp),%esp 112984: 5b pop %ebx 112985: 5e pop %esi 112986: 5f pop %edi 112987: c9 leave 112988: c3 ret 112989: 8d 76 00 lea 0x0(%esi),%esi { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11298c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112991: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112994: 5b pop %ebx <== NOT EXECUTED 112995: 5e pop %esi <== NOT EXECUTED 112996: 5f pop %edi <== NOT EXECUTED 112997: c9 leave <== NOT EXECUTED 112998: c3 ret <== NOT EXECUTED 112999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11299c: e8 27 4b 00 00 call 1174c8 <_Thread_Enable_dispatch> 1129a1: b8 0d 00 00 00 mov $0xd,%eax 1129a6: eb d9 jmp 112981 =============================================================================== 001129cc : rtems_status_code rtems_partition_return_buffer( Objects_Id id, void *buffer ) { 1129cc: 55 push %ebp 1129cd: 89 e5 mov %esp,%ebp 1129cf: 53 push %ebx 1129d0: 83 ec 18 sub $0x18,%esp ); /** * This routine returns the block of memory which begins * at @a starting_address to @a the_heap. Any coalescing which is * possible with the freeing of this routine is performed. 1129d3: 8d 45 f8 lea -0x8(%ebp),%eax 1129d6: 50 push %eax 1129d7: ff 75 08 pushl 0x8(%ebp) 1129da: 68 c0 6c 13 00 push $0x136cc0 1129df: e8 a0 42 00 00 call 116c84 <_Objects_Get> 1129e4: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1129e6: 83 c4 10 add $0x10,%esp 1129e9: 8b 45 f8 mov -0x8(%ebp),%eax 1129ec: 85 c0 test %eax,%eax 1129ee: 74 0c je 1129fc 1129f0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1129f5: 8b 5d fc mov -0x4(%ebp),%ebx 1129f8: c9 leave 1129f9: c3 ret 1129fa: 66 90 xchg %ax,%ax * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); 1129fc: 8b 53 10 mov 0x10(%ebx),%edx 1129ff: 8b 43 14 mov 0x14(%ebx),%eax Heap_Control *the_heap, void *starting_address, size_t *size ); /** 112a02: 39 55 0c cmp %edx,0xc(%ebp) 112a05: 73 11 jae 112a18 _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 112a07: e8 bc 4a 00 00 call 1174c8 <_Thread_Enable_dispatch> 112a0c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112a11: 8b 5d fc mov -0x4(%ebp),%ebx 112a14: c9 leave 112a15: c3 ret 112a16: 66 90 xchg %ax,%ax 112a18: 8d 04 02 lea (%edx,%eax,1),%eax 112a1b: 39 45 0c cmp %eax,0xc(%ebp) 112a1e: 77 e7 ja 112a07 <== NEVER TAKEN Heap_Control *the_heap, size_t size ); /** * This function attempts to allocate a memory block of @a size bytes from 112a20: 8b 45 0c mov 0xc(%ebp),%eax 112a23: 29 d0 sub %edx,%eax 112a25: 31 d2 xor %edx,%edx 112a27: f7 73 18 divl 0x18(%ebx) 112a2a: 85 d2 test %edx,%edx 112a2c: 75 d9 jne 112a07 * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( 112a2e: 83 ec 08 sub $0x8,%esp 112a31: ff 75 0c pushl 0xc(%ebp) 112a34: 8d 43 24 lea 0x24(%ebx),%eax 112a37: 50 push %eax 112a38: e8 0b 2b 00 00 call 115548 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 112a3d: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 112a40: e8 83 4a 00 00 call 1174c8 <_Thread_Enable_dispatch> 112a45: 31 c0 xor %eax,%eax 112a47: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112a4a: 8b 5d fc mov -0x4(%ebp),%ebx 112a4d: c9 leave 112a4e: c3 ret =============================================================================== 00111df8 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 111df8: 55 push %ebp 111df9: 89 e5 mov %esp,%ebp 111dfb: 56 push %esi 111dfc: 53 push %ebx 111dfd: 8b 75 08 mov 0x8(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 111e00: 85 f6 test %esi,%esi 111e02: 74 20 je 111e24 return RTEMS_INVALID_NAME; if ( !id ) 111e04: 8b 45 18 mov 0x18(%ebp),%eax 111e07: 85 c0 test %eax,%eax 111e09: 74 0a je 111e15 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 111e0b: 8b 45 10 mov 0x10(%ebp),%eax 111e0e: 0b 45 0c or 0xc(%ebp),%eax 111e11: a8 03 test $0x3,%al 111e13: 74 1b je 111e30 (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 111e15: b8 09 00 00 00 mov $0x9,%eax } 111e1a: 8d 65 f8 lea -0x8(%ebp),%esp 111e1d: 5b pop %ebx 111e1e: 5e pop %esi 111e1f: c9 leave 111e20: c3 ret 111e21: 8d 76 00 lea 0x0(%esi),%esi Objects_Id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 111e24: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111e29: 8d 65 f8 lea -0x8(%ebp),%esp 111e2c: 5b pop %ebx 111e2d: 5e pop %esi 111e2e: c9 leave 111e2f: c3 ret /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 111e30: a1 b8 6e 13 00 mov 0x136eb8,%eax 111e35: 40 inc %eax 111e36: a3 b8 6e 13 00 mov %eax,0x136eb8 #ifdef __cplusplus extern "C" { #endif /** * This routine initializes @a the_heap record to manage the 111e3b: 83 ec 0c sub $0xc,%esp 111e3e: 68 80 6c 13 00 push $0x136c80 111e43: e8 08 49 00 00 call 116750 <_Objects_Allocate> 111e48: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 111e4a: 83 c4 10 add $0x10,%esp 111e4d: 85 c0 test %eax,%eax 111e4f: 74 37 je 111e88 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 111e51: 8b 45 0c mov 0xc(%ebp),%eax 111e54: 89 43 10 mov %eax,0x10(%ebx) the_port->external_base = external_start; 111e57: 8b 45 10 mov 0x10(%ebp),%eax 111e5a: 89 43 14 mov %eax,0x14(%ebx) the_port->length = length - 1; 111e5d: 8b 45 14 mov 0x14(%ebp),%eax 111e60: 48 dec %eax 111e61: 89 43 18 mov %eax,0x18(%ebx) 111e64: 8b 4b 08 mov 0x8(%ebx),%ecx 111e67: 0f b7 d1 movzwl %cx,%edx 111e6a: a1 9c 6c 13 00 mov 0x136c9c,%eax 111e6f: 89 1c 90 mov %ebx,(%eax,%edx,4) 111e72: 89 73 0c mov %esi,0xc(%ebx) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 111e75: 8b 45 18 mov 0x18(%ebp),%eax 111e78: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 111e7a: e8 49 56 00 00 call 1174c8 <_Thread_Enable_dispatch> 111e7f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111e81: 8d 65 f8 lea -0x8(%ebp),%esp 111e84: 5b pop %ebx 111e85: 5e pop %esi 111e86: c9 leave 111e87: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 111e88: e8 3b 56 00 00 call 1174c8 <_Thread_Enable_dispatch> 111e8d: b8 05 00 00 00 mov $0x5,%eax 111e92: eb 86 jmp 111e1a =============================================================================== 00111e94 : */ rtems_status_code rtems_port_delete( Objects_Id id ) { 111e94: 55 push %ebp 111e95: 89 e5 mov %esp,%ebp 111e97: 53 push %ebx 111e98: 83 ec 18 sub $0x18,%esp * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add 111e9b: 8d 45 f8 lea -0x8(%ebp),%eax 111e9e: 50 push %eax 111e9f: ff 75 08 pushl 0x8(%ebp) 111ea2: 68 80 6c 13 00 push $0x136c80 111ea7: e8 d8 4d 00 00 call 116c84 <_Objects_Get> 111eac: 89 c3 mov %eax,%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 111eae: 83 c4 10 add $0x10,%esp 111eb1: 8b 4d f8 mov -0x8(%ebp),%ecx 111eb4: 85 c9 test %ecx,%ecx 111eb6: 75 2c jne 111ee4 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 111eb8: 83 ec 08 sub $0x8,%esp 111ebb: 50 push %eax 111ebc: 68 80 6c 13 00 push $0x136c80 111ec1: e8 0a 49 00 00 call 1167d0 <_Objects_Close> * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ 111ec6: 58 pop %eax 111ec7: 5a pop %edx 111ec8: 53 push %ebx 111ec9: 68 80 6c 13 00 push $0x136c80 111ece: e8 3d 4c 00 00 call 116b10 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 111ed3: e8 f0 55 00 00 call 1174c8 <_Thread_Enable_dispatch> 111ed8: 31 c0 xor %eax,%eax 111eda: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111edd: 8b 5d fc mov -0x4(%ebp),%ebx 111ee0: c9 leave 111ee1: c3 ret 111ee2: 66 90 xchg %ax,%ax { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 111ee4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111ee9: 8b 5d fc mov -0x4(%ebp),%ebx 111eec: c9 leave 111eed: c3 ret =============================================================================== 00111ef0 : rtems_status_code rtems_port_external_to_internal( Objects_Id id, void *external, void **internal ) { 111ef0: 55 push %ebp 111ef1: 89 e5 mov %esp,%ebp 111ef3: 53 push %ebx 111ef4: 83 ec 14 sub $0x14,%esp 111ef7: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 111efa: 85 db test %ebx,%ebx 111efc: 74 4e je 111f4c <== NEVER TAKEN * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add 111efe: 51 push %ecx 111eff: 8d 45 f8 lea -0x8(%ebp),%eax 111f02: 50 push %eax 111f03: ff 75 08 pushl 0x8(%ebp) 111f06: 68 80 6c 13 00 push $0x136c80 111f0b: e8 74 4d 00 00 call 116c84 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 111f10: 83 c4 10 add $0x10,%esp 111f13: 8b 55 f8 mov -0x8(%ebp),%edx 111f16: 85 d2 test %edx,%edx 111f18: 75 1e jne 111f38 * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 111f1a: 8b 55 0c mov 0xc(%ebp),%edx 111f1d: 2b 50 14 sub 0x14(%eax),%edx case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 111f20: 39 50 18 cmp %edx,0x18(%eax) 111f23: 73 1f jae 111f44 *internal = external; 111f25: 8b 45 0c mov 0xc(%ebp),%eax 111f28: 89 03 mov %eax,(%ebx) else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 111f2a: e8 99 55 00 00 call 1174c8 <_Thread_Enable_dispatch> 111f2f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111f31: 8b 5d fc mov -0x4(%ebp),%ebx 111f34: c9 leave 111f35: c3 ret 111f36: 66 90 xchg %ax,%ax if ( !internal ) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 111f38: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111f3d: 8b 5d fc mov -0x4(%ebp),%ebx 111f40: c9 leave 111f41: c3 ret 111f42: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 111f44: 03 50 10 add 0x10(%eax),%edx 111f47: 89 13 mov %edx,(%ebx) 111f49: eb df jmp 111f2a 111f4b: 90 nop { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 111f4c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111f51: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 111f54: c9 leave <== NOT EXECUTED 111f55: c3 ret <== NOT EXECUTED =============================================================================== 00111f7c : rtems_status_code rtems_port_internal_to_external( Objects_Id id, void *internal, void **external ) { 111f7c: 55 push %ebp 111f7d: 89 e5 mov %esp,%ebp 111f7f: 53 push %ebx 111f80: 83 ec 14 sub $0x14,%esp 111f83: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 111f86: 85 db test %ebx,%ebx 111f88: 74 4e je 111fd8 <== NEVER TAKEN * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add 111f8a: 51 push %ecx 111f8b: 8d 45 f8 lea -0x8(%ebp),%eax 111f8e: 50 push %eax 111f8f: ff 75 08 pushl 0x8(%ebp) 111f92: 68 80 6c 13 00 push $0x136c80 111f97: e8 e8 4c 00 00 call 116c84 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 111f9c: 83 c4 10 add $0x10,%esp 111f9f: 8b 55 f8 mov -0x8(%ebp),%edx 111fa2: 85 d2 test %edx,%edx 111fa4: 75 1e jne 111fc4 * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 111fa6: 8b 55 0c mov 0xc(%ebp),%edx 111fa9: 2b 50 10 sub 0x10(%eax),%edx case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 111fac: 39 50 18 cmp %edx,0x18(%eax) 111faf: 73 1f jae 111fd0 *external = internal; 111fb1: 8b 45 0c mov 0xc(%ebp),%eax 111fb4: 89 03 mov %eax,(%ebx) else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 111fb6: e8 0d 55 00 00 call 1174c8 <_Thread_Enable_dispatch> 111fbb: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111fbd: 8b 5d fc mov -0x4(%ebp),%ebx 111fc0: c9 leave 111fc1: c3 ret 111fc2: 66 90 xchg %ax,%ax if ( !external ) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 111fc4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111fc9: 8b 5d fc mov -0x4(%ebp),%ebx 111fcc: c9 leave 111fcd: c3 ret 111fce: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 111fd0: 03 50 14 add 0x14(%eax),%edx 111fd3: 89 13 mov %edx,(%ebx) 111fd5: eb df jmp 111fb6 111fd7: 90 nop { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 111fd8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111fdd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 111fe0: c9 leave <== NOT EXECUTED 111fe1: c3 ret <== NOT EXECUTED =============================================================================== 00112a50 : */ rtems_status_code rtems_rate_monotonic_cancel( Objects_Id id ) { 112a50: 55 push %ebp 112a51: 89 e5 mov %esp,%ebp 112a53: 53 push %ebx 112a54: 83 ec 18 sub $0x18,%esp /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 112a57: 8d 45 f8 lea -0x8(%ebp),%eax 112a5a: 50 push %eax 112a5b: ff 75 08 pushl 0x8(%ebp) 112a5e: 68 00 6d 13 00 push $0x136d00 112a63: e8 1c 42 00 00 call 116c84 <_Objects_Get> 112a68: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 112a6a: 83 c4 10 add $0x10,%esp 112a6d: 8b 45 f8 mov -0x8(%ebp),%eax 112a70: 85 c0 test %eax,%eax 112a72: 74 0c je 112a80 112a74: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112a79: 8b 5d fc mov -0x4(%ebp),%ebx 112a7c: c9 leave 112a7d: c3 ret 112a7e: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 112a80: 8b 43 50 mov 0x50(%ebx),%eax 112a83: 3b 05 7c 6f 13 00 cmp 0x136f7c,%eax 112a89: 74 11 je 112a9c _Thread_Enable_dispatch(); 112a8b: e8 38 4a 00 00 call 1174c8 <_Thread_Enable_dispatch> 112a90: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112a95: 8b 5d fc mov -0x4(%ebp),%ebx 112a98: c9 leave 112a99: c3 ret 112a9a: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); 112a9c: 83 ec 0c sub $0xc,%esp 112a9f: 8d 43 10 lea 0x10(%ebx),%eax 112aa2: 50 push %eax 112aa3: e8 18 5e 00 00 call 1188c0 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 112aa8: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 112aaf: e8 14 4a 00 00 call 1174c8 <_Thread_Enable_dispatch> 112ab4: 31 c0 xor %eax,%eax 112ab6: 83 c4 10 add $0x10,%esp 112ab9: eb be jmp 112a79 =============================================================================== 0010afdc : rtems_status_code rtems_rate_monotonic_create( rtems_name name, Objects_Id *id ) { 10afdc: 55 push %ebp 10afdd: 89 e5 mov %esp,%ebp 10afdf: 57 push %edi 10afe0: 56 push %esi 10afe1: 53 push %ebx 10afe2: 83 ec 0c sub $0xc,%esp 10afe5: 8b 75 08 mov 0x8(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10afe8: 85 f6 test %esi,%esi 10afea: 0f 84 a8 00 00 00 je 10b098 return RTEMS_INVALID_NAME; if ( !id ) 10aff0: 8b 45 0c mov 0xc(%ebp),%eax 10aff3: 85 c0 test %eax,%eax 10aff5: 0f 84 c1 00 00 00 je 10b0bc <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10affb: a1 78 40 12 00 mov 0x124078,%eax 10b000: 40 inc %eax 10b001: a3 78 40 12 00 mov %eax,0x124078 #ifdef __cplusplus extern "C" { #endif /** 10b006: 83 ec 0c sub $0xc,%esp 10b009: 68 80 3f 12 00 push $0x123f80 10b00e: e8 7d 1e 00 00 call 10ce90 <_Objects_Allocate> 10b013: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10b015: 83 c4 10 add $0x10,%esp 10b018: 85 c0 test %eax,%eax 10b01a: 0f 84 88 00 00 00 je 10b0a8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10b020: a1 3c 41 12 00 mov 0x12413c,%eax 10b025: 89 43 50 mov %eax,0x50(%ebx) the_period->state = RATE_MONOTONIC_INACTIVE; 10b028: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10b02f: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 10b036: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 10b03d: c7 43 30 00 00 00 00 movl $0x0,0x30(%ebx) * the heap 10b044: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 10b04b: 8d 7b 54 lea 0x54(%ebx),%edi 10b04e: b9 38 00 00 00 mov $0x38,%ecx 10b053: 31 c0 xor %eax,%eax 10b055: f3 aa rep stos %al,%es:(%edi) 10b057: c7 43 5c ff ff ff 7f movl $0x7fffffff,0x5c(%ebx) 10b05e: c7 43 60 ff ff ff 7f movl $0x7fffffff,0x60(%ebx) 10b065: c7 43 74 ff ff ff 7f movl $0x7fffffff,0x74(%ebx) 10b06c: c7 43 78 ff ff ff 7f movl $0x7fffffff,0x78(%ebx) 10b073: 8b 4b 08 mov 0x8(%ebx),%ecx 10b076: 0f b7 d1 movzwl %cx,%edx 10b079: a1 9c 3f 12 00 mov 0x123f9c,%eax 10b07e: 89 1c 90 mov %ebx,(%eax,%edx,4) 10b081: 89 73 0c mov %esi,0xc(%ebx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10b084: 8b 45 0c mov 0xc(%ebp),%eax 10b087: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 10b089: e8 3a 2c 00 00 call 10dcc8 <_Thread_Enable_dispatch> 10b08e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10b090: 8d 65 f4 lea -0xc(%ebp),%esp 10b093: 5b pop %ebx 10b094: 5e pop %esi 10b095: 5f pop %edi 10b096: c9 leave 10b097: c3 ret Objects_Id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10b098: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b09d: 8d 65 f4 lea -0xc(%ebp),%esp 10b0a0: 5b pop %ebx 10b0a1: 5e pop %esi 10b0a2: 5f pop %edi 10b0a3: c9 leave 10b0a4: c3 ret 10b0a5: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10b0a8: e8 1b 2c 00 00 call 10dcc8 <_Thread_Enable_dispatch> 10b0ad: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b0b2: 8d 65 f4 lea -0xc(%ebp),%esp 10b0b5: 5b pop %ebx 10b0b6: 5e pop %esi 10b0b7: 5f pop %edi 10b0b8: c9 leave 10b0b9: c3 ret 10b0ba: 66 90 xchg %ax,%ax Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10b0bc: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b0c1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b0c4: 5b pop %ebx <== NOT EXECUTED 10b0c5: 5e pop %esi <== NOT EXECUTED 10b0c6: 5f pop %edi <== NOT EXECUTED 10b0c7: c9 leave <== NOT EXECUTED 10b0c8: c3 ret <== NOT EXECUTED =============================================================================== 00110f78 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 110f78: 55 push %ebp 110f79: 89 e5 mov %esp,%ebp 110f7b: 57 push %edi 110f7c: 56 push %esi 110f7d: 83 ec 20 sub $0x20,%esp 110f80: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 110f83: 85 ff test %edi,%edi 110f85: 74 41 je 110fc8 <== NEVER TAKEN /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 110f87: 51 push %ecx 110f88: 8d 45 f4 lea -0xc(%ebp),%eax 110f8b: 50 push %eax 110f8c: ff 75 08 pushl 0x8(%ebp) 110f8f: 68 80 3f 12 00 push $0x123f80 110f94: e8 eb c4 ff ff call 10d484 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 110f99: 83 c4 10 add $0x10,%esp 110f9c: 8b 55 f4 mov -0xc(%ebp),%edx 110f9f: 85 d2 test %edx,%edx 110fa1: 74 0d je 110fb0 110fa3: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110fa8: 8d 65 f8 lea -0x8(%ebp),%esp 110fab: 5e pop %esi 110fac: 5f pop %edi 110fad: c9 leave 110fae: c3 ret 110faf: 90 nop the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *statistics = the_period->Statistics; 110fb0: 8d 70 54 lea 0x54(%eax),%esi 110fb3: b9 0e 00 00 00 mov $0xe,%ecx 110fb8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 110fba: e8 09 cd ff ff call 10dcc8 <_Thread_Enable_dispatch> 110fbf: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110fc1: 8d 65 f8 lea -0x8(%ebp),%esp 110fc4: 5e pop %esi 110fc5: 5f pop %edi 110fc6: c9 leave 110fc7: c3 ret ) { Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 110fc8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110fcd: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 110fd0: 5e pop %esi <== NOT EXECUTED 110fd1: 5f pop %edi <== NOT EXECUTED 110fd2: c9 leave <== NOT EXECUTED 110fd3: c3 ret <== NOT EXECUTED =============================================================================== 00110fd4 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 110fd4: 55 push %ebp 110fd5: 89 e5 mov %esp,%ebp 110fd7: 57 push %edi 110fd8: 56 push %esi 110fd9: 53 push %ebx 110fda: 83 ec 1c sub $0x1c,%esp 110fdd: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 110fe0: 85 f6 test %esi,%esi 110fe2: 74 70 je 111054 <== NEVER TAKEN 110fe4: 52 push %edx 110fe5: 8d 45 f0 lea -0x10(%ebp),%eax 110fe8: 50 push %eax 110fe9: ff 75 08 pushl 0x8(%ebp) 110fec: 68 80 3f 12 00 push $0x123f80 110ff1: e8 8e c4 ff ff call 10d484 <_Objects_Get> 110ff6: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 110ff8: 83 c4 10 add $0x10,%esp 110ffb: 8b 45 f0 mov -0x10(%ebp),%eax 110ffe: 85 c0 test %eax,%eax 111000: 75 42 jne 111044 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 111002: 8b 47 50 mov 0x50(%edi),%eax 111005: 85 c0 test %eax,%eax 111007: 74 03 je 11100c <== NEVER TAKEN 111009: 8b 40 08 mov 0x8(%eax),%eax 11100c: 89 06 mov %eax,(%esi) status->state = the_period->state; 11100e: 8b 47 38 mov 0x38(%edi),%eax 111011: 89 46 04 mov %eax,0x4(%esi) if ( status->state == RATE_MONOTONIC_INACTIVE ) { 111014: 85 c0 test %eax,%eax 111016: 75 4c jne 111064 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 111018: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) status->since_last_period.tv_nsec = 0; 11101f: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 111026: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) status->executed_since_last_period.tv_nsec = 0; 11102d: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 111034: e8 8f cc ff ff call 10dcc8 <_Thread_Enable_dispatch> 111039: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11103b: 8d 65 f4 lea -0xc(%ebp),%esp 11103e: 5b pop %ebx 11103f: 5e pop %esi 111040: 5f pop %edi 111041: c9 leave 111042: c3 ret 111043: 90 nop if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 111044: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111049: 8d 65 f4 lea -0xc(%ebp),%esp 11104c: 5b pop %ebx 11104d: 5e pop %esi 11104e: 5f pop %edi 11104f: c9 leave 111050: c3 ret 111051: 8d 76 00 lea 0x0(%esi),%esi ) { Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 111054: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111059: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11105c: 5b pop %ebx <== NOT EXECUTED 11105d: 5e pop %esi <== NOT EXECUTED 11105e: 5f pop %edi <== NOT EXECUTED 11105f: c9 leave <== NOT EXECUTED 111060: c3 ret <== NOT EXECUTED 111061: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 111064: 83 ec 0c sub $0xc,%esp 111067: 8d 5d e8 lea -0x18(%ebp),%ebx 11106a: 53 push %ebx 11106b: e8 a8 ba ff ff call 10cb18 <_TOD_Get_uptime> #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 111070: 83 c4 0c add $0xc,%esp 111073: 8d 46 08 lea 0x8(%esi),%eax 111076: 50 push %eax 111077: 53 push %ebx 111078: 8d 47 44 lea 0x44(%edi),%eax 11107b: 50 push %eax 11107c: e8 73 da ff ff call 10eaf4 <_Timespec_Subtract> status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 111081: 83 c4 0c add $0xc,%esp 111084: 8d 46 10 lea 0x10(%esi),%eax 111087: 50 push %eax 111088: 53 push %ebx 111089: 68 44 41 12 00 push $0x124144 11108e: e8 61 da ff ff call 10eaf4 <_Timespec_Subtract> 111093: 83 c4 10 add $0x10,%esp 111096: eb 9c jmp 111034 =============================================================================== 0010b2b4 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 10b2b4: 55 push %ebp 10b2b5: 89 e5 mov %esp,%ebp 10b2b7: 57 push %edi 10b2b8: 56 push %esi 10b2b9: 53 push %ebx 10b2ba: 83 ec 20 sub $0x20,%esp 10b2bd: 8b 75 08 mov 0x8(%ebp),%esi /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 10b2c0: 8d 45 f0 lea -0x10(%ebp),%eax 10b2c3: 50 push %eax 10b2c4: 56 push %esi 10b2c5: 68 80 3f 12 00 push $0x123f80 10b2ca: e8 b5 21 00 00 call 10d484 <_Objects_Get> 10b2cf: 89 c3 mov %eax,%ebx rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10b2d1: 83 c4 10 add $0x10,%esp 10b2d4: 8b 45 f0 mov -0x10(%ebp),%eax 10b2d7: 85 c0 test %eax,%eax 10b2d9: 74 11 je 10b2ec the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 10b2db: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b2e0: 89 d8 mov %ebx,%eax 10b2e2: 8d 65 f4 lea -0xc(%ebp),%esp 10b2e5: 5b pop %ebx 10b2e6: 5e pop %esi 10b2e7: 5f pop %edi 10b2e8: c9 leave 10b2e9: c3 ret 10b2ea: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10b2ec: 8b 43 50 mov 0x50(%ebx),%eax 10b2ef: 3b 05 3c 41 12 00 cmp 0x12413c,%eax 10b2f5: 74 15 je 10b30c _Thread_Enable_dispatch(); 10b2f7: e8 cc 29 00 00 call 10dcc8 <_Thread_Enable_dispatch> 10b2fc: bb 17 00 00 00 mov $0x17,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b301: 89 d8 mov %ebx,%eax 10b303: 8d 65 f4 lea -0xc(%ebp),%esp 10b306: 5b pop %ebx 10b307: 5e pop %esi 10b308: 5f pop %edi 10b309: c9 leave 10b30a: c3 ret 10b30b: 90 nop if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 10b30c: 8b 45 0c mov 0xc(%ebp),%eax 10b30f: 85 c0 test %eax,%eax 10b311: 0f 84 c1 00 00 00 je 10b3d8 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 10b317: 9c pushf 10b318: fa cli 10b319: 5f pop %edi switch ( the_period->state ) { 10b31a: 8b 43 38 mov 0x38(%ebx),%eax 10b31d: 83 f8 02 cmp $0x2,%eax 10b320: 74 62 je 10b384 10b322: 83 f8 04 cmp $0x4,%eax 10b325: 0f 84 c5 00 00 00 je 10b3f0 <== NEVER TAKEN 10b32b: 85 c0 test %eax,%eax 10b32d: 75 ac jne 10b2db <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10b32f: 57 push %edi 10b330: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10b331: 83 ec 0c sub $0xc,%esp 10b334: 53 push %ebx 10b335: e8 b6 fd ff ff call 10b0f0 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10b33a: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10b341: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 10b348: c7 43 2c 24 b7 10 00 movl $0x10b724,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 10b34f: 89 73 30 mov %esi,0x30(%ebx) * the heap 10b352: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10b359: 8b 45 0c mov 0xc(%ebp),%eax 10b35c: 89 43 4c mov %eax,0x4c(%ebx) * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10b35f: 89 43 1c mov %eax,0x1c(%ebx) void *starting_address, size_t *size 10b362: 5f pop %edi 10b363: 58 pop %eax 10b364: 8d 43 10 lea 0x10(%ebx),%eax 10b367: 50 push %eax 10b368: 68 5c 41 12 00 push $0x12415c 10b36d: e8 2a 3a 00 00 call 10ed9c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10b372: e8 51 29 00 00 call 10dcc8 <_Thread_Enable_dispatch> 10b377: 31 db xor %ebx,%ebx 10b379: 83 c4 10 add $0x10,%esp 10b37c: e9 5f ff ff ff jmp 10b2e0 10b381: 8d 76 00 lea 0x0(%esi),%esi case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10b384: 83 ec 0c sub $0xc,%esp 10b387: 53 push %ebx 10b388: e8 d3 fd ff ff call 10b160 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 10b38d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) the_period->next_length = length; 10b394: 8b 45 0c mov 0xc(%ebp),%eax 10b397: 89 43 4c mov %eax,0x4c(%ebx) _ISR_Enable( level ); 10b39a: 57 push %edi 10b39b: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10b39c: 8b 15 3c 41 12 00 mov 0x12413c,%edx 10b3a2: 8b 43 08 mov 0x8(%ebx),%eax 10b3a5: 89 42 20 mov %eax,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b3a8: 59 pop %ecx 10b3a9: 5e pop %esi 10b3aa: 68 00 40 00 00 push $0x4000 10b3af: 52 push %edx 10b3b0: e8 f3 31 00 00 call 10e5a8 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10b3b5: 9c pushf 10b3b6: fa cli 10b3b7: 58 pop %eax local_state = the_period->state; 10b3b8: 8b 53 38 mov 0x38(%ebx),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10b3bb: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) _ISR_Enable( level ); 10b3c2: 50 push %eax 10b3c3: 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 ) 10b3c4: 83 c4 10 add $0x10,%esp 10b3c7: 83 fa 03 cmp $0x3,%edx 10b3ca: 74 71 je 10b43d <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10b3cc: e8 f7 28 00 00 call 10dcc8 <_Thread_Enable_dispatch> 10b3d1: 31 db xor %ebx,%ebx 10b3d3: e9 08 ff ff ff jmp 10b2e0 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10b3d8: 8b 43 38 mov 0x38(%ebx),%eax 10b3db: 85 c0 test %eax,%eax 10b3dd: 75 51 jne 10b430 <== NEVER TAKEN 10b3df: bb 0b 00 00 00 mov $0xb,%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10b3e4: e8 df 28 00 00 call 10dcc8 <_Thread_Enable_dispatch> 10b3e9: e9 f2 fe ff ff jmp 10b2e0 10b3ee: 66 90 xchg %ax,%ax case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10b3f0: 83 ec 0c sub $0xc,%esp 10b3f3: 53 push %ebx 10b3f4: e8 67 fd ff ff call 10b160 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10b3f9: 57 push %edi 10b3fa: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10b3fb: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) the_period->next_length = length; 10b402: 8b 45 0c mov 0xc(%ebp),%eax 10b405: 89 43 4c mov %eax,0x4c(%ebx) * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10b408: 89 43 1c mov %eax,0x1c(%ebx) void *starting_address, size_t *size 10b40b: 58 pop %eax 10b40c: 5a pop %edx 10b40d: 8d 43 10 lea 0x10(%ebx),%eax 10b410: 50 push %eax 10b411: 68 5c 41 12 00 push $0x12415c 10b416: e8 81 39 00 00 call 10ed9c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10b41b: e8 a8 28 00 00 call 10dcc8 <_Thread_Enable_dispatch> 10b420: bb 06 00 00 00 mov $0x6,%ebx 10b425: 83 c4 10 add $0x10,%esp 10b428: e9 b3 fe ff ff jmp 10b2e0 10b42d: 8d 76 00 lea 0x0(%esi),%esi _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10b430: 83 e8 03 sub $0x3,%eax 10b433: 83 f8 02 cmp $0x2,%eax 10b436: 19 db sbb %ebx,%ebx 10b438: 83 e3 06 and $0x6,%ebx 10b43b: eb a7 jmp 10b3e4 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b43d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10b440: 68 00 40 00 00 push $0x4000 <== NOT EXECUTED 10b445: ff 35 3c 41 12 00 pushl 0x12413c <== NOT EXECUTED 10b44b: e8 d0 24 00 00 call 10d920 <_Thread_Clear_state> <== NOT EXECUTED 10b450: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b453: e9 74 ff ff ff jmp 10b3cc <== NOT EXECUTED =============================================================================== 0010b458 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10b458: 55 push %ebp 10b459: 89 e5 mov %esp,%ebp 10b45b: 57 push %edi 10b45c: 56 push %esi 10b45d: 53 push %ebx 10b45e: 81 ec 9c 00 00 00 sub $0x9c,%esp 10b464: 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 ) 10b467: 85 ff test %edi,%edi 10b469: 0f 84 c9 00 00 00 je 10b538 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b46f: 83 ec 08 sub $0x8,%esp 10b472: 68 10 cb 11 00 push $0x11cb10 10b477: ff 75 08 pushl 0x8(%ebp) 10b47a: ff d7 call *%edi #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 10b47c: 5e pop %esi 10b47d: 58 pop %eax 10b47e: 68 48 cb 11 00 push $0x11cb48 10b483: ff 75 08 pushl 0x8(%ebp) 10b486: ff d7 call *%edi #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 10b488: 59 pop %ecx 10b489: 5b pop %ebx 10b48a: 68 6c cb 11 00 push $0x11cb6c 10b48f: ff 75 08 pushl 0x8(%ebp) 10b492: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b494: 58 pop %eax 10b495: 5a pop %edx 10b496: 68 90 cb 11 00 push $0x11cb90 10b49b: ff 75 08 pushl 0x8(%ebp) 10b49e: ff d7 call *%edi #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 10b4a0: 5b pop %ebx 10b4a1: 5e pop %esi 10b4a2: 68 dc cb 11 00 push $0x11cbdc 10b4a7: ff 75 08 pushl 0x8(%ebp) 10b4aa: 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 ; 10b4ac: 8b 35 88 3f 12 00 mov 0x123f88,%esi id <= _Rate_monotonic_Information.maximum_id ; 10b4b2: 83 c4 10 add $0x10,%esp 10b4b5: 3b 35 8c 3f 12 00 cmp 0x123f8c,%esi 10b4bb: 76 0c jbe 10b4c9 <== ALWAYS TAKEN 10b4bd: eb 79 jmp 10b538 <== NOT EXECUTED 10b4bf: 90 nop <== NOT EXECUTED id++ ) { 10b4c0: 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 ; id <= _Rate_monotonic_Information.maximum_id ; 10b4c1: 39 35 8c 3f 12 00 cmp %esi,0x123f8c 10b4c7: 72 6f jb 10b538 id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b4c9: 83 ec 08 sub $0x8,%esp 10b4cc: 8d 45 90 lea -0x70(%ebp),%eax 10b4cf: 50 push %eax 10b4d0: 56 push %esi 10b4d1: e8 a2 5a 00 00 call 110f78 if ( status != RTEMS_SUCCESSFUL ) 10b4d6: 83 c4 10 add $0x10,%esp 10b4d9: 85 c0 test %eax,%eax 10b4db: 75 e3 jne 10b4c0 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10b4dd: 83 ec 08 sub $0x8,%esp 10b4e0: 8d 55 c8 lea -0x38(%ebp),%edx 10b4e3: 52 push %edx 10b4e4: 56 push %esi 10b4e5: e8 ea 5a 00 00 call 110fd4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 10b4ea: c6 45 eb 00 movb $0x0,-0x15(%ebp) if ( the_status.owner ) { 10b4ee: 8b 45 c8 mov -0x38(%ebp),%eax 10b4f1: 83 c4 10 add $0x10,%esp 10b4f4: 85 c0 test %eax,%eax 10b4f6: 0f 85 54 01 00 00 jne 10b650 <== ALWAYS TAKEN 10b4fc: 8d 5d eb lea -0x15(%ebp),%ebx <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b4ff: 83 ec 08 sub $0x8,%esp 10b502: ff 75 94 pushl -0x6c(%ebp) 10b505: ff 75 90 pushl -0x70(%ebp) 10b508: 53 push %ebx 10b509: 56 push %esi 10b50a: 68 2e cb 11 00 push $0x11cb2e 10b50f: ff 75 08 pushl 0x8(%ebp) 10b512: ff d7 call *%edi /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b514: 8b 45 90 mov -0x70(%ebp),%eax 10b517: 83 c4 20 add $0x20,%esp 10b51a: 85 c0 test %eax,%eax 10b51c: 75 22 jne 10b540 (*print)( context, "\n" ); 10b51e: 83 ec 08 sub $0x8,%esp 10b521: 68 99 b0 11 00 push $0x11b099 10b526: ff 75 08 pushl 0x8(%ebp) 10b529: ff d7 call *%edi 10b52b: 83 c4 10 add $0x10,%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++ ) { 10b52e: 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 ; id <= _Rate_monotonic_Information.maximum_id ; 10b52f: 39 35 8c 3f 12 00 cmp %esi,0x123f8c 10b535: 73 92 jae 10b4c9 <== ALWAYS TAKEN 10b537: 90 nop the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b538: 8d 65 f4 lea -0xc(%ebp),%esp 10b53b: 5b pop %ebx 10b53c: 5e pop %esi 10b53d: 5f pop %edi 10b53e: c9 leave 10b53f: c3 ret */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 10b540: 52 push %edx 10b541: 8d 55 e0 lea -0x20(%ebp),%edx 10b544: 52 push %edx 10b545: 50 push %eax 10b546: 8d 45 a8 lea -0x58(%ebp),%eax 10b549: 50 push %eax 10b54a: e8 e9 34 00 00 call 10ea38 <_Timespec_Divide_by_integer> &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 10b54f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b552: bb d3 4d 62 10 mov $0x10624dd3,%ebx 10b557: 89 c8 mov %ecx,%eax 10b559: f7 eb imul %ebx 10b55b: 89 45 88 mov %eax,-0x78(%ebp) 10b55e: 89 55 8c mov %edx,-0x74(%ebp) 10b561: 8b 45 8c mov -0x74(%ebp),%eax 10b564: c1 f8 06 sar $0x6,%eax 10b567: c1 f9 1f sar $0x1f,%ecx 10b56a: 29 c8 sub %ecx,%eax 10b56c: 50 push %eax 10b56d: ff 75 e0 pushl -0x20(%ebp) 10b570: 8b 4d a4 mov -0x5c(%ebp),%ecx 10b573: 89 c8 mov %ecx,%eax 10b575: f7 eb imul %ebx 10b577: 89 45 80 mov %eax,-0x80(%ebp) 10b57a: 89 55 84 mov %edx,-0x7c(%ebp) 10b57d: 8b 45 84 mov -0x7c(%ebp),%eax 10b580: c1 f8 06 sar $0x6,%eax 10b583: c1 f9 1f sar $0x1f,%ecx 10b586: 29 c8 sub %ecx,%eax 10b588: 50 push %eax 10b589: ff 75 a0 pushl -0x60(%ebp) 10b58c: 8b 4d 9c mov -0x64(%ebp),%ecx 10b58f: 89 c8 mov %ecx,%eax 10b591: f7 eb imul %ebx 10b593: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 10b599: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10b59f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10b5a5: c1 f8 06 sar $0x6,%eax 10b5a8: c1 f9 1f sar $0x1f,%ecx 10b5ab: 29 c8 sub %ecx,%eax 10b5ad: 50 push %eax 10b5ae: ff 75 98 pushl -0x68(%ebp) 10b5b1: 68 28 cc 11 00 push $0x11cc28 10b5b6: ff 75 08 pushl 0x8(%ebp) 10b5b9: ff d7 call *%edi * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 10b5bb: 83 c4 2c add $0x2c,%esp 10b5be: 8d 55 e0 lea -0x20(%ebp),%edx 10b5c1: 52 push %edx 10b5c2: ff 75 90 pushl -0x70(%ebp) 10b5c5: 8d 45 c0 lea -0x40(%ebp),%eax 10b5c8: 50 push %eax 10b5c9: e8 6a 34 00 00 call 10ea38 <_Timespec_Divide_by_integer> &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 10b5ce: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b5d1: 89 c8 mov %ecx,%eax 10b5d3: f7 eb imul %ebx 10b5d5: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10b5db: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10b5e1: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10b5e7: c1 f8 06 sar $0x6,%eax 10b5ea: c1 f9 1f sar $0x1f,%ecx 10b5ed: 29 c8 sub %ecx,%eax 10b5ef: 50 push %eax 10b5f0: ff 75 e0 pushl -0x20(%ebp) 10b5f3: 8b 4d bc mov -0x44(%ebp),%ecx 10b5f6: 89 c8 mov %ecx,%eax 10b5f8: f7 eb imul %ebx 10b5fa: 89 85 68 ff ff ff mov %eax,-0x98(%ebp) 10b600: 89 95 6c ff ff ff mov %edx,-0x94(%ebp) 10b606: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax 10b60c: c1 f8 06 sar $0x6,%eax 10b60f: c1 f9 1f sar $0x1f,%ecx 10b612: 29 c8 sub %ecx,%eax 10b614: 50 push %eax 10b615: ff 75 b8 pushl -0x48(%ebp) 10b618: 8b 4d b4 mov -0x4c(%ebp),%ecx 10b61b: 89 c8 mov %ecx,%eax 10b61d: f7 eb imul %ebx 10b61f: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) 10b625: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp) 10b62b: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax 10b631: c1 f8 06 sar $0x6,%eax 10b634: c1 f9 1f sar $0x1f,%ecx 10b637: 29 c8 sub %ecx,%eax 10b639: 50 push %eax 10b63a: ff 75 b0 pushl -0x50(%ebp) 10b63d: 68 48 cc 11 00 push $0x11cc48 10b642: ff 75 08 pushl 0x8(%ebp) 10b645: ff d7 call *%edi 10b647: 83 c4 30 add $0x30,%esp 10b64a: e9 71 fe ff ff jmp 10b4c0 10b64f: 90 nop #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b650: 51 push %ecx 10b651: 8d 5d eb lea -0x15(%ebp),%ebx 10b654: 53 push %ebx 10b655: 6a 05 push $0x5 10b657: 50 push %eax 10b658: e8 5b 01 00 00 call 10b7b8 10b65d: 83 c4 10 add $0x10,%esp 10b660: e9 9a fe ff ff jmp 10b4ff =============================================================================== 0010b680 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10b680: 55 push %ebp 10b681: 89 e5 mov %esp,%ebp 10b683: 53 push %ebx 10b684: 83 ec 04 sub $0x4,%esp /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10b687: a1 78 40 12 00 mov 0x124078,%eax 10b68c: 40 inc %eax 10b68d: a3 78 40 12 00 mov %eax,0x124078 /* * 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 ; 10b692: 8b 1d 88 3f 12 00 mov 0x123f88,%ebx id <= _Rate_monotonic_Information.maximum_id ; 10b698: 3b 1d 8c 3f 12 00 cmp 0x123f8c,%ebx 10b69e: 77 15 ja 10b6b5 <== NEVER TAKEN id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10b6a0: 83 ec 0c sub $0xc,%esp 10b6a3: 53 push %ebx 10b6a4: e8 17 00 00 00 call 10b6c0 * 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++ ) { 10b6a9: 43 inc %ebx /* * 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 ; 10b6aa: 83 c4 10 add $0x10,%esp 10b6ad: 39 1d 8c 3f 12 00 cmp %ebx,0x123f8c 10b6b3: 73 eb jae 10b6a0 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10b6b5: 8b 5d fc mov -0x4(%ebp),%ebx 10b6b8: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10b6b9: e9 0a 26 00 00 jmp 10dcc8 <_Thread_Enable_dispatch> =============================================================================== 001130fc : uint32_t length, uint32_t page_size, rtems_attribute attribute_set, Objects_Id *id ) { 1130fc: 55 push %ebp 1130fd: 89 e5 mov %esp,%ebp 1130ff: 57 push %edi 113100: 56 push %esi 113101: 53 push %ebx 113102: 83 ec 0c sub $0xc,%esp 113105: 8b 7d 08 mov 0x8(%ebp),%edi 113108: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 11310b: 85 ff test %edi,%edi 11310d: 74 25 je 113134 return RTEMS_INVALID_NAME; if ( !starting_address ) 11310f: 85 f6 test %esi,%esi 113111: 74 0f je 113122 return RTEMS_INVALID_ADDRESS; if ( !id ) 113113: 8b 45 1c mov 0x1c(%ebp),%eax 113116: 85 c0 test %eax,%eax 113118: 74 08 je 113122 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 11311a: f7 c6 03 00 00 00 test $0x3,%esi 113120: 74 22 je 113144 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 113122: bb 09 00 00 00 mov $0x9,%ebx } 113127: 89 d8 mov %ebx,%eax 113129: 8d 65 f4 lea -0xc(%ebp),%esp 11312c: 5b pop %ebx 11312d: 5e pop %esi 11312e: 5f pop %edi 11312f: c9 leave 113130: c3 ret 113131: 8d 76 00 lea 0x0(%esi),%esi ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 113134: bb 03 00 00 00 mov $0x3,%ebx } } _RTEMS_Unlock_allocator(); return return_status; } 113139: 89 d8 mov %ebx,%eax 11313b: 8d 65 f4 lea -0xc(%ebp),%esp 11313e: 5b pop %ebx 11313f: 5e pop %esi 113140: 5f pop %edi 113141: c9 leave 113142: c3 ret 113143: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 113144: 83 ec 0c sub $0xc,%esp 113147: ff 35 74 6f 13 00 pushl 0x136f74 11314d: e8 82 23 00 00 call 1154d4 <_API_Mutex_Lock> #ifdef __cplusplus extern "C" { #endif /** 113152: c7 04 24 40 6d 13 00 movl $0x136d40,(%esp) 113159: e8 f2 35 00 00 call 116750 <_Objects_Allocate> 11315e: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 113160: 83 c4 10 add $0x10,%esp 113163: 85 c0 test %eax,%eax 113165: 0f 84 9d 00 00 00 je 113208 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 11316b: ff 75 14 pushl 0x14(%ebp) 11316e: ff 75 10 pushl 0x10(%ebp) 113171: 56 push %esi 113172: 8d 40 68 lea 0x68(%eax),%eax 113175: 50 push %eax 113176: e8 01 31 00 00 call 11627c <_Heap_Initialize> 11317b: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 11317e: 83 c4 10 add $0x10,%esp 113181: 85 c0 test %eax,%eax 113183: 75 33 jne 1131b8 * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 113185: 83 ec 08 sub $0x8,%esp 113188: 53 push %ebx 113189: 68 40 6d 13 00 push $0x136d40 11318e: e8 7d 39 00 00 call 116b10 <_Objects_Free> 113193: bb 08 00 00 00 mov $0x8,%ebx 113198: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 11319b: 83 ec 0c sub $0xc,%esp 11319e: ff 35 74 6f 13 00 pushl 0x136f74 1131a4: e8 73 23 00 00 call 11551c <_API_Mutex_Unlock> 1131a9: 83 c4 10 add $0x10,%esp return return_status; } 1131ac: 89 d8 mov %ebx,%eax 1131ae: 8d 65 f4 lea -0xc(%ebp),%esp 1131b1: 5b pop %ebx 1131b2: 5e pop %esi 1131b3: 5f pop %edi 1131b4: c9 leave 1131b5: c3 ret 1131b6: 66 90 xchg %ax,%ax return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 1131b8: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 1131bb: 8b 45 10 mov 0x10(%ebp),%eax 1131be: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 1131c1: 8b 45 14 mov 0x14(%ebp),%eax 1131c4: 89 43 58 mov %eax,0x58(%ebx) the_region->attribute_set = attribute_set; 1131c7: 8b 45 18 mov 0x18(%ebp),%eax 1131ca: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 1131cd: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 1131d4: 6a 06 push $0x6 1131d6: 6a 40 push $0x40 1131d8: c1 e8 02 shr $0x2,%eax 1131db: 83 e0 01 and $0x1,%eax 1131de: 50 push %eax 1131df: 8d 43 10 lea 0x10(%ebx),%eax 1131e2: 50 push %eax 1131e3: e8 14 4a 00 00 call 117bfc <_Thread_queue_Initialize> 1131e8: 8b 4b 08 mov 0x8(%ebx),%ecx 1131eb: 0f b7 d1 movzwl %cx,%edx 1131ee: a1 5c 6d 13 00 mov 0x136d5c,%eax 1131f3: 89 1c 90 mov %ebx,(%eax,%edx,4) 1131f6: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 1131f9: 8b 45 1c mov 0x1c(%ebp),%eax 1131fc: 89 08 mov %ecx,(%eax) 1131fe: 31 db xor %ebx,%ebx 113200: 83 c4 10 add $0x10,%esp 113203: eb 96 jmp 11319b 113205: 8d 76 00 lea 0x0(%esi),%esi _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 113208: b3 05 mov $0x5,%bl 11320a: eb 8f jmp 11319b =============================================================================== 0011320c : */ rtems_status_code rtems_region_delete( Objects_Id id ) { 11320c: 55 push %ebp 11320d: 89 e5 mov %esp,%ebp 11320f: 53 push %ebx 113210: 83 ec 20 sub $0x20,%esp Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; _RTEMS_Lock_allocator(); 113213: ff 35 74 6f 13 00 pushl 0x136f74 113219: e8 b6 22 00 00 call 1154d4 <_API_Mutex_Lock> /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 11321e: 83 c4 0c add $0xc,%esp 113221: 8d 45 f8 lea -0x8(%ebp),%eax 113224: 50 push %eax 113225: ff 75 08 pushl 0x8(%ebp) 113228: 68 40 6d 13 00 push $0x136d40 11322d: e8 12 3a 00 00 call 116c44 <_Objects_Get_no_protection> 113232: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 113234: 83 c4 10 add $0x10,%esp 113237: 8b 45 f8 mov -0x8(%ebp),%eax 11323a: 85 c0 test %eax,%eax 11323c: 75 0e jne 11324c case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 11323e: 8b 4b 64 mov 0x64(%ebx),%ecx 113241: 85 c9 test %ecx,%ecx 113243: 74 2f je 113274 113245: bb 0c 00 00 00 mov $0xc,%ebx 11324a: eb 08 jmp 113254 register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 11324c: 48 dec %eax 11324d: 74 1d je 11326c <== ALWAYS TAKEN 11324f: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 113254: 83 ec 0c sub $0xc,%esp 113257: ff 35 74 6f 13 00 pushl 0x136f74 11325d: e8 ba 22 00 00 call 11551c <_API_Mutex_Unlock> return return_status; } 113262: 89 d8 mov %ebx,%eax 113264: 8b 5d fc mov -0x4(%ebp),%ebx 113267: c9 leave 113268: c3 ret 113269: 8d 76 00 lea 0x0(%esi),%esi register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 11326c: bb 04 00 00 00 mov $0x4,%ebx 113271: eb e1 jmp 113254 113273: 90 nop case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 113274: 83 ec 08 sub $0x8,%esp 113277: 53 push %ebx 113278: 68 40 6d 13 00 push $0x136d40 11327d: e8 4e 35 00 00 call 1167d0 <_Objects_Close> * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 113282: 58 pop %eax 113283: 5a pop %edx 113284: 53 push %ebx 113285: 68 40 6d 13 00 push $0x136d40 11328a: e8 81 38 00 00 call 116b10 <_Objects_Free> 11328f: 31 db xor %ebx,%ebx 113291: 83 c4 10 add $0x10,%esp 113294: eb be jmp 113254 =============================================================================== 00113298 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 113298: 55 push %ebp 113299: 89 e5 mov %esp,%ebp 11329b: 56 push %esi 11329c: 53 push %ebx 11329d: 83 ec 10 sub $0x10,%esp 1132a0: 8b 75 0c mov 0xc(%ebp),%esi Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 1132a3: 85 f6 test %esi,%esi 1132a5: 74 79 je 113320 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 1132a7: 83 ec 0c sub $0xc,%esp 1132aa: ff 35 74 6f 13 00 pushl 0x136f74 1132b0: e8 1f 22 00 00 call 1154d4 <_API_Mutex_Lock> /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 1132b5: 83 c4 0c add $0xc,%esp 1132b8: 8d 45 f0 lea -0x10(%ebp),%eax 1132bb: 50 push %eax 1132bc: ff 75 08 pushl 0x8(%ebp) 1132bf: 68 40 6d 13 00 push $0x136d40 1132c4: e8 7b 39 00 00 call 116c44 <_Objects_Get_no_protection> 1132c9: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 1132cb: 83 c4 10 add $0x10,%esp 1132ce: 8b 45 f0 mov -0x10(%ebp),%eax 1132d1: 85 c0 test %eax,%eax 1132d3: 74 23 je 1132f8 1132d5: 48 dec %eax 1132d6: 74 58 je 113330 <== ALWAYS TAKEN switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 1132d8: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1132dd: 83 ec 0c sub $0xc,%esp 1132e0: ff 35 74 6f 13 00 pushl 0x136f74 1132e6: e8 31 22 00 00 call 11551c <_API_Mutex_Unlock> 1132eb: 83 c4 10 add $0x10,%esp return return_status; } 1132ee: 89 d8 mov %ebx,%eax 1132f0: 8d 65 f8 lea -0x8(%ebp),%esp 1132f3: 5b pop %ebx 1132f4: 5e pop %esi 1132f5: c9 leave 1132f6: c3 ret 1132f7: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 1132f8: 8d 45 f4 lea -0xc(%ebp),%eax 1132fb: 50 push %eax 1132fc: ff 75 10 pushl 0x10(%ebp) 1132ff: 56 push %esi 113300: 8d 43 68 lea 0x68(%ebx),%eax 113303: 50 push %eax 113304: e8 9b 2c 00 00 call 115fa4 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 113309: 83 c4 10 add $0x10,%esp 11330c: 83 f8 01 cmp $0x1,%eax 11330f: 74 27 je 113338 113311: 73 2d jae 113340 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 113313: 8b 45 f4 mov -0xc(%ebp),%eax 113316: 01 43 54 add %eax,0x54(%ebx) the_region->maximum_segment_size += amount_extended; 113319: 01 43 5c add %eax,0x5c(%ebx) 11331c: 31 db xor %ebx,%ebx 11331e: eb bd jmp 1132dd Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 113320: bb 09 00 00 00 mov $0x9,%ebx <== NOT EXECUTED break; } _RTEMS_Unlock_allocator(); return return_status; } 113325: 89 d8 mov %ebx,%eax <== NOT EXECUTED 113327: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 11332a: 5b pop %ebx <== NOT EXECUTED 11332b: 5e pop %esi <== NOT EXECUTED 11332c: c9 leave <== NOT EXECUTED 11332d: c3 ret <== NOT EXECUTED 11332e: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 113330: bb 04 00 00 00 mov $0x4,%ebx 113335: eb a6 jmp 1132dd 113337: 90 nop starting_address, length, &amount_extended ); switch ( heap_status ) { 113338: bb 09 00 00 00 mov $0x9,%ebx 11333d: eb 9e jmp 1132dd 11333f: 90 nop 113340: 83 f8 02 cmp $0x2,%eax 113343: 75 93 jne 1132d8 <== NEVER TAKEN case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 113345: bb 18 00 00 00 mov $0x18,%ebx 11334a: eb 91 jmp 1132dd =============================================================================== 0011334c : rtems_status_code rtems_region_get_free_information( Objects_Id id, Heap_Information_block *the_info ) { 11334c: 55 push %ebp 11334d: 89 e5 mov %esp,%ebp 11334f: 53 push %ebx 113350: 83 ec 14 sub $0x14,%esp 113353: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; if ( !the_info ) 113356: 85 db test %ebx,%ebx 113358: 74 7a je 1133d4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11335a: 83 ec 0c sub $0xc,%esp 11335d: ff 35 74 6f 13 00 pushl 0x136f74 113363: e8 6c 21 00 00 call 1154d4 <_API_Mutex_Lock> 113368: 83 c4 0c add $0xc,%esp 11336b: 8d 45 f8 lea -0x8(%ebp),%eax 11336e: 50 push %eax 11336f: ff 75 08 pushl 0x8(%ebp) 113372: 68 40 6d 13 00 push $0x136d40 113377: e8 c8 38 00 00 call 116c44 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 11337c: 83 c4 10 add $0x10,%esp 11337f: 8b 55 f8 mov -0x8(%ebp),%edx 113382: 85 d2 test %edx,%edx 113384: 74 22 je 1133a8 113386: 4a dec %edx 113387: 74 57 je 1133e0 <== ALWAYS TAKEN 113389: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11338e: 83 ec 0c sub $0xc,%esp 113391: ff 35 74 6f 13 00 pushl 0x136f74 113397: e8 80 21 00 00 call 11551c <_API_Mutex_Unlock> 11339c: 83 c4 10 add $0x10,%esp return return_status; } 11339f: 89 d8 mov %ebx,%eax 1133a1: 8b 5d fc mov -0x4(%ebp),%ebx 1133a4: c9 leave 1133a5: c3 ret 1133a6: 66 90 xchg %ax,%ax the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1133a8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1133af: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 1133b6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 1133bd: 83 ec 08 sub $0x8,%esp 1133c0: 53 push %ebx 1133c1: 83 c0 68 add $0x68,%eax 1133c4: 50 push %eax 1133c5: e8 de 2d 00 00 call 1161a8 <_Heap_Get_free_information> 1133ca: 31 db xor %ebx,%ebx 1133cc: 83 c4 10 add $0x10,%esp 1133cf: eb bd jmp 11338e 1133d1: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; if ( !the_info ) 1133d4: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 1133d6: 89 d8 mov %ebx,%eax 1133d8: 8b 5d fc mov -0x4(%ebp),%ebx 1133db: c9 leave 1133dc: c3 ret 1133dd: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 1133e0: bb 04 00 00 00 mov $0x4,%ebx 1133e5: eb a7 jmp 11338e =============================================================================== 001133e8 : rtems_status_code rtems_region_get_information( Objects_Id id, Heap_Information_block *the_info ) { 1133e8: 55 push %ebp 1133e9: 89 e5 mov %esp,%ebp 1133eb: 53 push %ebx 1133ec: 83 ec 14 sub $0x14,%esp 1133ef: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; if ( !the_info ) 1133f2: 85 db test %ebx,%ebx 1133f4: 74 6a je 113460 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1133f6: 83 ec 0c sub $0xc,%esp 1133f9: ff 35 74 6f 13 00 pushl 0x136f74 1133ff: e8 d0 20 00 00 call 1154d4 <_API_Mutex_Lock> 113404: 83 c4 0c add $0xc,%esp 113407: 8d 45 f8 lea -0x8(%ebp),%eax 11340a: 50 push %eax 11340b: ff 75 08 pushl 0x8(%ebp) 11340e: 68 40 6d 13 00 push $0x136d40 113413: e8 2c 38 00 00 call 116c44 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 113418: 83 c4 10 add $0x10,%esp 11341b: 8b 55 f8 mov -0x8(%ebp),%edx 11341e: 85 d2 test %edx,%edx 113420: 74 22 je 113444 113422: 4a dec %edx 113423: 74 47 je 11346c <== ALWAYS TAKEN 113425: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11342a: 83 ec 0c sub $0xc,%esp 11342d: ff 35 74 6f 13 00 pushl 0x136f74 113433: e8 e4 20 00 00 call 11551c <_API_Mutex_Unlock> 113438: 83 c4 10 add $0x10,%esp return return_status; } 11343b: 89 d8 mov %ebx,%eax 11343d: 8b 5d fc mov -0x4(%ebp),%ebx 113440: c9 leave 113441: c3 ret 113442: 66 90 xchg %ax,%ax the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Heap_Get_information( &the_region->Memory, the_info ) != 113444: 83 ec 08 sub $0x8,%esp 113447: 53 push %ebx 113448: 83 c0 68 add $0x68,%eax 11344b: 50 push %eax 11344c: e8 9f 2d 00 00 call 1161f0 <_Heap_Get_information> 113451: 83 c4 10 add $0x10,%esp 113454: 83 f8 01 cmp $0x1,%eax 113457: 19 db sbb %ebx,%ebx 113459: f7 d3 not %ebx 11345b: 83 e3 09 and $0x9,%ebx 11345e: eb ca jmp 11342a { Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; if ( !the_info ) 113460: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 113462: 89 d8 mov %ebx,%eax 113464: 8b 5d fc mov -0x4(%ebp),%ebx 113467: c9 leave 113468: c3 ret 113469: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 11346c: bb 04 00 00 00 mov $0x4,%ebx 113471: eb b7 jmp 11342a =============================================================================== 00113474 : uint32_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 113474: 55 push %ebp 113475: 89 e5 mov %esp,%ebp 113477: 57 push %edi 113478: 56 push %esi 113479: 53 push %ebx 11347a: 83 ec 1c sub $0x1c,%esp 11347d: 8b 75 0c mov 0xc(%ebp),%esi 113480: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; void *the_segment; if ( !segment ) 113483: 85 db test %ebx,%ebx 113485: 0f 84 89 00 00 00 je 113514 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; *segment = NULL; 11348b: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 113491: 85 f6 test %esi,%esi 113493: 75 0f jne 1134a4 <== ALWAYS TAKEN 113495: bb 08 00 00 00 mov $0x8,%ebx <== NOT EXECUTED break; } _RTEMS_Unlock_allocator(); return return_status; } 11349a: 89 d8 mov %ebx,%eax 11349c: 8d 65 f4 lea -0xc(%ebp),%esp 11349f: 5b pop %ebx 1134a0: 5e pop %esi 1134a1: 5f pop %edi 1134a2: c9 leave 1134a3: c3 ret *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 1134a4: 83 ec 0c sub $0xc,%esp 1134a7: ff 35 74 6f 13 00 pushl 0x136f74 1134ad: e8 22 20 00 00 call 1154d4 <_API_Mutex_Lock> executing = _Thread_Executing; 1134b2: a1 7c 6f 13 00 mov 0x136f7c,%eax 1134b7: 89 45 e0 mov %eax,-0x20(%ebp) 1134ba: 83 c4 0c add $0xc,%esp 1134bd: 8d 45 f0 lea -0x10(%ebp),%eax 1134c0: 50 push %eax 1134c1: ff 75 08 pushl 0x8(%ebp) 1134c4: 68 40 6d 13 00 push $0x136d40 1134c9: e8 76 37 00 00 call 116c44 <_Objects_Get_no_protection> 1134ce: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 1134d0: 83 c4 10 add $0x10,%esp 1134d3: 8b 45 f0 mov -0x10(%ebp),%eax 1134d6: 85 c0 test %eax,%eax 1134d8: 74 26 je 113500 1134da: 48 dec %eax 1134db: 74 2f je 11350c <== ALWAYS TAKEN 1134dd: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1134e2: 83 ec 0c sub $0xc,%esp 1134e5: ff 35 74 6f 13 00 pushl 0x136f74 1134eb: e8 2c 20 00 00 call 11551c <_API_Mutex_Unlock> 1134f0: 83 c4 10 add $0x10,%esp return return_status; } 1134f3: 89 d8 mov %ebx,%eax 1134f5: 8d 65 f4 lea -0xc(%ebp),%esp 1134f8: 5b pop %ebx 1134f9: 5e pop %esi 1134fa: 5f pop %edi 1134fb: c9 leave 1134fc: c3 ret 1134fd: 8d 76 00 lea 0x0(%esi),%esi executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 113500: 3b 77 5c cmp 0x5c(%edi),%esi 113503: 76 13 jbe 113518 113505: bb 08 00 00 00 mov $0x8,%ebx 11350a: eb d6 jmp 1134e2 _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 11350c: bb 04 00 00 00 mov $0x4,%ebx 113511: eb cf jmp 1134e2 113513: 90 nop Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; void *the_segment; if ( !segment ) 113514: b3 09 mov $0x9,%bl <== NOT EXECUTED 113516: eb 82 jmp 11349a <== NOT EXECUTED /** * This function attempts to allocate a block of @a size bytes from * @a the_heap. If insufficient memory is free in @a the_heap to allocate * a block of the requested size, then NULL is returned. * 113518: 83 ec 08 sub $0x8,%esp 11351b: 56 push %esi 11351c: 8d 47 68 lea 0x68(%edi),%eax 11351f: 50 push %eax 113520: e8 eb 29 00 00 call 115f10 <_Heap_Allocate> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 113525: 83 c4 10 add $0x10,%esp 113528: 85 c0 test %eax,%eax 11352a: 74 09 je 113535 the_region->number_of_used_blocks += 1; 11352c: ff 47 64 incl 0x64(%edi) *segment = the_segment; 11352f: 89 03 mov %eax,(%ebx) 113531: 31 db xor %ebx,%ebx 113533: eb ad jmp 1134e2 return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 113535: f6 45 10 01 testb $0x1,0x10(%ebp) 113539: 74 07 je 113542 11353b: bb 0d 00 00 00 mov $0xd,%ebx 113540: eb a0 jmp 1134e2 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 113542: a1 b8 6e 13 00 mov 0x136eb8,%eax 113547: 40 inc %eax 113548: a3 b8 6e 13 00 mov %eax,0x136eb8 * 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(); 11354d: 83 ec 0c sub $0xc,%esp 113550: ff 35 74 6f 13 00 pushl 0x136f74 113556: e8 c1 1f 00 00 call 11551c <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 11355b: 8d 47 10 lea 0x10(%edi),%eax 11355e: 8b 55 e0 mov -0x20(%ebp),%edx 113561: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 113564: 8b 4d 08 mov 0x8(%ebp),%ecx 113567: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 11356a: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 11356d: 89 5a 28 mov %ebx,0x28(%edx) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 113570: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 113577: 83 c4 0c add $0xc,%esp 11357a: 68 d8 7c 11 00 push $0x117cd8 11357f: ff 75 14 pushl 0x14(%ebp) 113582: 50 push %eax 113583: e8 00 44 00 00 call 117988 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 113588: e8 3b 3f 00 00 call 1174c8 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 11358d: 8b 45 e0 mov -0x20(%ebp),%eax 113590: 8b 58 34 mov 0x34(%eax),%ebx 113593: 83 c4 10 add $0x10,%esp 113596: e9 ff fe ff ff jmp 11349a =============================================================================== 0011359c : rtems_status_code rtems_region_get_segment_size( Objects_Id id, void *segment, size_t *size ) { 11359c: 55 push %ebp 11359d: 89 e5 mov %esp,%ebp 11359f: 56 push %esi 1135a0: 53 push %ebx 1135a1: 83 ec 10 sub $0x10,%esp 1135a4: 8b 75 0c mov 0xc(%ebp),%esi 1135a7: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; if ( !segment ) 1135aa: 85 f6 test %esi,%esi 1135ac: 74 6a je 113618 return RTEMS_INVALID_ADDRESS; if ( !size ) 1135ae: 85 db test %ebx,%ebx 1135b0: 74 66 je 113618 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1135b2: 83 ec 0c sub $0xc,%esp 1135b5: ff 35 74 6f 13 00 pushl 0x136f74 1135bb: e8 14 1f 00 00 call 1154d4 <_API_Mutex_Lock> * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 1135c0: 83 c4 0c add $0xc,%esp 1135c3: 8d 45 f4 lea -0xc(%ebp),%eax 1135c6: 50 push %eax 1135c7: ff 75 08 pushl 0x8(%ebp) 1135ca: 68 40 6d 13 00 push $0x136d40 1135cf: e8 70 36 00 00 call 116c44 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1135d4: 83 c4 10 add $0x10,%esp 1135d7: 8b 55 f4 mov -0xc(%ebp),%edx 1135da: 85 d2 test %edx,%edx 1135dc: 74 22 je 113600 1135de: 4a dec %edx 1135df: 74 47 je 113628 <== ALWAYS TAKEN 1135e1: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1135e6: 83 ec 0c sub $0xc,%esp 1135e9: ff 35 74 6f 13 00 pushl 0x136f74 1135ef: e8 28 1f 00 00 call 11551c <_API_Mutex_Unlock> 1135f4: 83 c4 10 add $0x10,%esp return return_status; } 1135f7: 89 d8 mov %ebx,%eax 1135f9: 8d 65 f8 lea -0x8(%ebp),%esp 1135fc: 5b pop %ebx 1135fd: 5e pop %esi 1135fe: c9 leave 1135ff: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_user_area( &the_region->Memory, segment, size ) ) 113600: 52 push %edx 113601: 53 push %ebx 113602: 56 push %esi 113603: 83 c0 68 add $0x68,%eax 113606: 50 push %eax 113607: e8 44 30 00 00 call 116650 <_Heap_Size_of_user_area> 11360c: 83 c4 10 add $0x10,%esp 11360f: 3c 01 cmp $0x1,%al 113611: 19 db sbb %ebx,%ebx 113613: 83 e3 09 and $0x9,%ebx 113616: eb ce jmp 1135e6 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 113618: bb 09 00 00 00 mov $0x9,%ebx } 11361d: 89 d8 mov %ebx,%eax 11361f: 8d 65 f8 lea -0x8(%ebp),%esp 113622: 5b pop %ebx 113623: 5e pop %esi 113624: c9 leave 113625: c3 ret 113626: 66 90 xchg %ax,%ax return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 113628: bb 04 00 00 00 mov $0x4,%ebx 11362d: eb b7 jmp 1135e6 =============================================================================== 00113654 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 113654: 55 push %ebp 113655: 89 e5 mov %esp,%ebp 113657: 57 push %edi 113658: 56 push %esi 113659: 53 push %ebx 11365a: 83 ec 1c sub $0x1c,%esp 11365d: 8b 7d 14 mov 0x14(%ebp),%edi uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 113660: 85 ff test %edi,%edi 113662: 0f 84 bc 00 00 00 je 113724 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 113668: 83 ec 0c sub $0xc,%esp 11366b: ff 35 74 6f 13 00 pushl 0x136f74 113671: e8 5e 1e 00 00 call 1154d4 <_API_Mutex_Lock> 113676: 83 c4 0c add $0xc,%esp 113679: 8d 45 ec lea -0x14(%ebp),%eax 11367c: 50 push %eax 11367d: ff 75 08 pushl 0x8(%ebp) 113680: 68 40 6d 13 00 push $0x136d40 113685: e8 ba 35 00 00 call 116c44 <_Objects_Get_no_protection> 11368a: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 11368c: 83 c4 10 add $0x10,%esp 11368f: 8b 45 ec mov -0x14(%ebp),%eax 113692: 85 c0 test %eax,%eax 113694: 74 2a je 1136c0 113696: 48 dec %eax 113697: 0f 84 97 00 00 00 je 113734 <== ALWAYS TAKEN 11369d: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1136a2: 83 ec 0c sub $0xc,%esp 1136a5: ff 35 74 6f 13 00 pushl 0x136f74 1136ab: e8 6c 1e 00 00 call 11551c <_API_Mutex_Unlock> 1136b0: 83 c4 10 add $0x10,%esp return return_status; } 1136b3: 89 d8 mov %ebx,%eax 1136b5: 8d 65 f4 lea -0xc(%ebp),%esp 1136b8: 5b pop %ebx 1136b9: 5e pop %esi 1136ba: 5f pop %edi 1136bb: c9 leave 1136bc: c3 ret 1136bd: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1136c0: 83 ec 0c sub $0xc,%esp 1136c3: 8d 45 f0 lea -0x10(%ebp),%eax 1136c6: 50 push %eax 1136c7: 8d 45 e8 lea -0x18(%ebp),%eax 1136ca: 50 push %eax 1136cb: ff 75 10 pushl 0x10(%ebp) 1136ce: ff 75 0c pushl 0xc(%ebp) 1136d1: 8d 46 68 lea 0x68(%esi),%eax 1136d4: 50 push %eax 1136d5: e8 8a 2d 00 00 call 116464 <_Heap_Resize_block> 1136da: 89 c3 mov %eax,%ebx segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1136dc: 8b 45 e8 mov -0x18(%ebp),%eax 1136df: 89 07 mov %eax,(%edi) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 1136e1: 83 c4 20 add $0x20,%esp 1136e4: 85 db test %ebx,%ebx 1136e6: 75 24 jne 11370c <== ALWAYS TAKEN 1136e8: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 1136eb: 85 c0 test %eax,%eax <== NOT EXECUTED 1136ed: 75 51 jne 113740 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1136ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1136f2: ff 35 74 6f 13 00 pushl 0x136f74 <== NOT EXECUTED 1136f8: e8 1f 1e 00 00 call 11551c <_API_Mutex_Unlock> <== NOT EXECUTED 1136fd: 31 db xor %ebx,%ebx <== NOT EXECUTED 1136ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } _RTEMS_Unlock_allocator(); return return_status; } 113702: 89 d8 mov %ebx,%eax <== NOT EXECUTED 113704: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 113707: 5b pop %ebx <== NOT EXECUTED 113708: 5e pop %esi <== NOT EXECUTED 113709: 5f pop %edi <== NOT EXECUTED 11370a: c9 leave <== NOT EXECUTED 11370b: c3 ret <== NOT EXECUTED _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 11370c: 83 ec 0c sub $0xc,%esp 11370f: ff 35 74 6f 13 00 pushl 0x136f74 113715: e8 02 1e 00 00 call 11551c <_API_Mutex_Unlock> return 11371a: 83 c4 10 add $0x10,%esp 11371d: 83 fb 01 cmp $0x1,%ebx 113720: 74 32 je 113754 <== NEVER TAKEN 113722: 66 90 xchg %ax,%ax return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 113724: bb 09 00 00 00 mov $0x9,%ebx } 113729: 89 d8 mov %ebx,%eax 11372b: 8d 65 f4 lea -0xc(%ebp),%esp 11372e: 5b pop %ebx 11372f: 5e pop %esi 113730: 5f pop %edi 113731: c9 leave 113732: c3 ret 113733: 90 nop if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); return 113734: bb 04 00 00 00 mov $0x4,%ebx 113739: e9 64 ff ff ff jmp 1136a2 11373e: 66 90 xchg %ax,%ax *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 113740: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113743: 56 push %esi <== NOT EXECUTED 113744: e8 7b 72 00 00 call 11a9c4 <_Region_Process_queue> <== NOT EXECUTED 113749: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11374c: e9 62 ff ff ff jmp 1136b3 <== NOT EXECUTED 113751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED else _RTEMS_Unlock_allocator(); return 113754: b3 0d mov $0xd,%bl <== NOT EXECUTED 113756: e9 58 ff ff ff jmp 1136b3 <== NOT EXECUTED =============================================================================== 0011375c : rtems_status_code rtems_region_return_segment( Objects_Id id, void *segment ) { 11375c: 55 push %ebp 11375d: 89 e5 mov %esp,%ebp 11375f: 53 push %ebx 113760: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 113763: ff 35 74 6f 13 00 pushl 0x136f74 113769: e8 66 1d 00 00 call 1154d4 <_API_Mutex_Lock> 11376e: 83 c4 0c add $0xc,%esp 113771: 8d 45 f8 lea -0x8(%ebp),%eax 113774: 50 push %eax 113775: ff 75 08 pushl 0x8(%ebp) 113778: 68 40 6d 13 00 push $0x136d40 11377d: e8 c2 34 00 00 call 116c44 <_Objects_Get_no_protection> 113782: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 113784: 83 c4 10 add $0x10,%esp 113787: 8b 45 f8 mov -0x8(%ebp),%eax 11378a: 85 c0 test %eax,%eax 11378c: 75 1e jne 1137ac ); /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. 11378e: 83 ec 08 sub $0x8,%esp 113791: ff 75 0c pushl 0xc(%ebp) 113794: 8d 43 68 lea 0x68(%ebx),%eax 113797: 50 push %eax 113798: e8 ab 28 00 00 call 116048 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11379d: 83 c4 10 add $0x10,%esp 1137a0: 84 c0 test %al,%al 1137a2: 75 30 jne 1137d4 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 1137a4: bb 09 00 00 00 mov $0x9,%ebx 1137a9: eb 09 jmp 1137b4 1137ab: 90 nop register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 1137ac: 48 dec %eax 1137ad: 74 1d je 1137cc <== ALWAYS TAKEN 1137af: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1137b4: 83 ec 0c sub $0xc,%esp 1137b7: ff 35 74 6f 13 00 pushl 0x136f74 1137bd: e8 5a 1d 00 00 call 11551c <_API_Mutex_Unlock> 1137c2: 83 c4 10 add $0x10,%esp return return_status; } 1137c5: 89 d8 mov %ebx,%eax 1137c7: 8b 5d fc mov -0x4(%ebp),%ebx 1137ca: c9 leave 1137cb: c3 ret register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 1137cc: bb 04 00 00 00 mov $0x4,%ebx 1137d1: eb e1 jmp 1137b4 1137d3: 90 nop if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 1137d4: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 1137d7: 83 ec 0c sub $0xc,%esp 1137da: 53 push %ebx 1137db: e8 e4 71 00 00 call 11a9c4 <_Region_Process_queue> 1137e0: 31 db xor %ebx,%ebx 1137e2: 83 c4 10 add $0x10,%esp 1137e5: eb de jmp 1137c5 =============================================================================== 0010a170 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10a170: 55 push %ebp 10a171: 89 e5 mov %esp,%ebp 10a173: 57 push %edi 10a174: 56 push %esi 10a175: 53 push %ebx 10a176: 83 ec 2c sub $0x2c,%esp 10a179: 8b 7d 08 mov 0x8(%ebp),%edi register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 10a17c: 85 ff test %edi,%edi 10a17e: 74 64 je 10a1e4 return RTEMS_INVALID_NAME; if ( !id ) 10a180: 8b 4d 18 mov 0x18(%ebp),%ecx 10a183: 85 c9 test %ecx,%ecx 10a185: 0f 84 01 01 00 00 je 10a28c <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10a18b: 8b 45 10 mov 0x10(%ebp),%eax 10a18e: 25 c0 00 00 00 and $0xc0,%eax 10a193: 74 1f je 10a1b4 * @param[in] alignment the required alignment * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, 10a195: 8b 5d 10 mov 0x10(%ebp),%ebx 10a198: 83 e3 30 and $0x30,%ebx _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 10a19b: 83 fb 10 cmp $0x10,%ebx 10a19e: 74 34 je 10a1d4 10a1a0: 83 fb 20 cmp $0x20,%ebx 10a1a3: 74 2f je 10a1d4 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10a1a5: b8 0b 00 00 00 mov $0xb,%eax } 10a1aa: 8d 65 f4 lea -0xc(%ebp),%esp 10a1ad: 5b pop %ebx 10a1ae: 5e pop %esi 10a1af: 5f pop %edi 10a1b0: c9 leave 10a1b1: c3 ret 10a1b2: 66 90 xchg %ax,%ax return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10a1b4: 8b 5d 10 mov 0x10(%ebp),%ebx 10a1b7: 83 e3 30 and $0x30,%ebx if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10a1ba: 85 db test %ebx,%ebx 10a1bc: 74 36 je 10a1f4 10a1be: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10a1c2: 76 30 jbe 10a1f4 10a1c4: b8 0a 00 00 00 mov $0xa,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a1c9: 8d 65 f4 lea -0xc(%ebp),%esp 10a1cc: 5b pop %ebx 10a1cd: 5e pop %esi 10a1ce: 5f pop %edi 10a1cf: c9 leave 10a1d0: c3 ret 10a1d1: 8d 76 00 lea 0x0(%esi),%esi #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 10a1d4: f6 45 10 04 testb $0x4,0x10(%ebp) 10a1d8: 74 cb je 10a1a5 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10a1da: 3d c0 00 00 00 cmp $0xc0,%eax 10a1df: 75 d9 jne 10a1ba 10a1e1: eb c2 jmp 10a1a5 10a1e3: 90 nop { register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 10a1e4: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a1e9: 8d 65 f4 lea -0xc(%ebp),%esp 10a1ec: 5b pop %ebx 10a1ed: 5e pop %esi 10a1ee: 5f pop %edi 10a1ef: c9 leave 10a1f0: c3 ret 10a1f1: 8d 76 00 lea 0x0(%esi),%esi /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a1f4: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10a1f9: 40 inc %eax 10a1fa: a3 f8 f8 11 00 mov %eax,0x11f8f8 #ifdef __cplusplus extern "C" { #endif /** 10a1ff: 83 ec 0c sub $0xc,%esp 10a202: 68 40 f8 11 00 push $0x11f840 10a207: e8 4c 14 00 00 call 10b658 <_Objects_Allocate> 10a20c: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10a20e: 83 c4 10 add $0x10,%esp 10a211: 85 c0 test %eax,%eax 10a213: 0f 84 eb 00 00 00 je 10a304 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10a219: 8b 45 10 mov 0x10(%ebp),%eax 10a21c: 89 46 10 mov %eax,0x10(%esi) * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 10a21f: 85 db test %ebx,%ebx 10a221: 74 75 je 10a298 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 10a223: a8 40 test $0x40,%al 10a225: 0f 84 c5 00 00 00 je 10a2f0 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10a22b: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10a232: 83 fb 10 cmp $0x10,%ebx 10a235: 0f 84 d9 00 00 00 je 10a314 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10a23b: c7 45 dc 02 00 00 00 movl $0x2,-0x24(%ebp) the_mutex_attributes.only_owner_release = FALSE; 10a242: c6 45 e0 00 movb $0x0,-0x20(%ebp) } the_mutex_attributes.priority_ceiling = priority_ceiling; 10a246: 8b 45 14 mov 0x14(%ebp),%eax 10a249: 89 45 e8 mov %eax,-0x18(%ebp) mutex_status = _CORE_mutex_Initialize( 10a24c: 52 push %edx 10a24d: 31 c0 xor %eax,%eax 10a24f: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10a253: 0f 94 c0 sete %al 10a256: 50 push %eax 10a257: 8d 45 dc lea -0x24(%ebp),%eax 10a25a: 50 push %eax 10a25b: 8d 46 14 lea 0x14(%esi),%eax 10a25e: 50 push %eax 10a25f: e8 44 0d 00 00 call 10afa8 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 10a264: 83 c4 10 add $0x10,%esp 10a267: 83 f8 06 cmp $0x6,%eax 10a26a: 75 61 jne 10a2cd <== ALWAYS TAKEN * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 10a26c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a26f: 56 push %esi <== NOT EXECUTED 10a270: 68 40 f8 11 00 push $0x11f840 <== NOT EXECUTED 10a275: e8 9e 17 00 00 call 10ba18 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10a27a: e8 11 21 00 00 call 10c390 <_Thread_Enable_dispatch><== NOT EXECUTED 10a27f: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED 10a284: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a287: e9 1e ff ff ff jmp 10a1aa <== NOT EXECUTED CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10a28c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 10a291: e9 14 ff ff ff jmp 10a1aa <== NOT EXECUTED 10a296: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10a298: 31 c0 xor %eax,%eax 10a29a: f6 45 10 04 testb $0x4,0x10(%ebp) 10a29e: 0f 95 c0 setne %al 10a2a1: 89 45 f0 mov %eax,-0x10(%ebp) /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 10a2a4: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10a2ab: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 10a2b2: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) _CORE_semaphore_Initialize( 10a2b9: 50 push %eax 10a2ba: ff 75 0c pushl 0xc(%ebp) 10a2bd: 8d 45 ec lea -0x14(%ebp),%eax 10a2c0: 50 push %eax 10a2c1: 8d 46 14 lea 0x14(%esi),%eax 10a2c4: 50 push %eax 10a2c5: e8 96 0f 00 00 call 10b260 <_CORE_semaphore_Initialize> 10a2ca: 83 c4 10 add $0x10,%esp 10a2cd: 8b 4e 08 mov 0x8(%esi),%ecx 10a2d0: 0f b7 d1 movzwl %cx,%edx 10a2d3: a1 5c f8 11 00 mov 0x11f85c,%eax 10a2d8: 89 34 90 mov %esi,(%eax,%edx,4) 10a2db: 89 7e 0c mov %edi,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10a2de: 8b 45 18 mov 0x18(%ebp),%eax 10a2e1: 89 08 mov %ecx,(%eax) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10a2e3: e8 a8 20 00 00 call 10c390 <_Thread_Enable_dispatch> 10a2e8: 31 c0 xor %eax,%eax 10a2ea: e9 bb fe ff ff jmp 10a1aa 10a2ef: 90 nop if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 10a2f0: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10a2f4: 79 43 jns 10a339 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10a2f6: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) 10a2fd: e9 30 ff ff ff jmp 10a232 10a302: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10a304: e8 87 20 00 00 call 10c390 <_Thread_Enable_dispatch> 10a309: b8 05 00 00 00 mov $0x5,%eax 10a30e: e9 97 fe ff ff jmp 10a1aa 10a313: 90 nop else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10a314: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) switch ( the_mutex_attributes.discipline ) { 10a31b: 8b 45 e4 mov -0x1c(%ebp),%eax 10a31e: 83 f8 01 cmp $0x1,%eax 10a321: 0f 86 1b ff ff ff jbe 10a242 10a327: 83 f8 03 cmp $0x3,%eax 10a32a: 0f 87 16 ff ff ff ja 10a246 <== NEVER TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 10a330: c6 45 e0 01 movb $0x1,-0x20(%ebp) 10a334: e9 0d ff ff ff jmp 10a246 if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 10a339: 31 c0 xor %eax,%eax 10a33b: f6 45 10 04 testb $0x4,0x10(%ebp) 10a33f: 0f 95 c0 setne %al 10a342: 89 45 e4 mov %eax,-0x1c(%ebp) 10a345: e9 e8 fe ff ff jmp 10a232 =============================================================================== 0010a34c : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10a34c: 55 push %ebp 10a34d: 89 e5 mov %esp,%ebp 10a34f: 53 push %ebx 10a350: 83 ec 18 sub $0x18,%esp * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap 10a353: 8d 45 f8 lea -0x8(%ebp),%eax 10a356: 50 push %eax 10a357: ff 75 08 pushl 0x8(%ebp) 10a35a: 68 40 f8 11 00 push $0x11f840 10a35f: e8 e8 17 00 00 call 10bb4c <_Objects_Get> 10a364: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10a366: 83 c4 10 add $0x10,%esp 10a369: 8b 4d f8 mov -0x8(%ebp),%ecx 10a36c: 85 c9 test %ecx,%ecx 10a36e: 74 0c je 10a37c 10a370: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a375: 8b 5d fc mov -0x4(%ebp),%ebx 10a378: c9 leave 10a379: c3 ret 10a37a: 66 90 xchg %ax,%ax ); /** * This function tries to resize in place the block that is pointed to by the * @a starting_address to the new @a size. * 10a37c: 8b 40 10 mov 0x10(%eax),%eax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10a37f: 83 e0 30 and $0x30,%eax 10a382: 74 58 je 10a3dc if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10a384: 8b 53 64 mov 0x64(%ebx),%edx 10a387: 85 d2 test %edx,%edx 10a389: 75 15 jne 10a3a0 10a38b: 83 f8 20 cmp $0x20,%eax 10a38e: 74 10 je 10a3a0 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10a390: e8 fb 1f 00 00 call 10c390 <_Thread_Enable_dispatch> 10a395: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a39a: 8b 5d fc mov -0x4(%ebp),%ebx 10a39d: c9 leave 10a39e: c3 ret 10a39f: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10a3a0: 50 push %eax 10a3a1: 6a 04 push $0x4 10a3a3: 6a 00 push $0x0 10a3a5: 8d 43 14 lea 0x14(%ebx),%eax 10a3a8: 50 push %eax 10a3a9: e8 ee 0b 00 00 call 10af9c <_CORE_mutex_Flush> 10a3ae: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10a3b1: 83 ec 08 sub $0x8,%esp 10a3b4: 53 push %ebx 10a3b5: 68 40 f8 11 00 push $0x11f840 10a3ba: e8 19 13 00 00 call 10b6d8 <_Objects_Close> * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 10a3bf: 58 pop %eax 10a3c0: 5a pop %edx 10a3c1: 53 push %ebx 10a3c2: 68 40 f8 11 00 push $0x11f840 10a3c7: e8 4c 16 00 00 call 10ba18 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10a3cc: e8 bf 1f 00 00 call 10c390 <_Thread_Enable_dispatch> 10a3d1: 31 c0 xor %eax,%eax 10a3d3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a3d6: 8b 5d fc mov -0x4(%ebp),%ebx 10a3d9: c9 leave 10a3da: c3 ret 10a3db: 90 nop &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10a3dc: 51 push %ecx 10a3dd: 6a 02 push $0x2 10a3df: 6a 00 push $0x0 10a3e1: 8d 43 14 lea 0x14(%ebx),%eax 10a3e4: 50 push %eax 10a3e5: e8 6a 0e 00 00 call 10b254 <_CORE_semaphore_Flush> 10a3ea: 83 c4 10 add $0x10,%esp 10a3ed: eb c2 jmp 10a3b1 =============================================================================== 00113a68 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 113a68: 55 push %ebp 113a69: 89 e5 mov %esp,%ebp 113a6b: 83 ec 1c sub $0x1c,%esp * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap 113a6e: 8d 45 fc lea -0x4(%ebp),%eax 113a71: 50 push %eax 113a72: ff 75 08 pushl 0x8(%ebp) 113a75: 68 80 6d 13 00 push $0x136d80 113a7a: e8 05 32 00 00 call 116c84 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 113a7f: 83 c4 10 add $0x10,%esp 113a82: 8b 55 fc mov -0x4(%ebp),%edx 113a85: 85 d2 test %edx,%edx 113a87: 74 07 je 113a90 113a89: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a8e: c9 leave 113a8f: c3 ret the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 113a90: f6 40 10 30 testb $0x30,0x10(%eax) 113a94: 75 1a jne 113ab0 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 113a96: 52 push %edx <== NOT EXECUTED 113a97: 6a 01 push $0x1 <== NOT EXECUTED 113a99: 6a 00 push $0x0 <== NOT EXECUTED 113a9b: 83 c0 14 add $0x14,%eax <== NOT EXECUTED 113a9e: 50 push %eax <== NOT EXECUTED 113a9f: e8 24 22 00 00 call 115cc8 <_CORE_semaphore_Flush> <== NOT EXECUTED 113aa4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 113aa7: e8 1c 3a 00 00 call 1174c8 <_Thread_Enable_dispatch> 113aac: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113aae: c9 leave 113aaf: c3 ret the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 113ab0: 51 push %ecx 113ab1: 6a 01 push $0x1 113ab3: 6a 00 push $0x0 113ab5: 83 c0 14 add $0x14,%eax 113ab8: 50 push %eax 113ab9: e8 52 1f 00 00 call 115a10 <_CORE_mutex_Flush> 113abe: 83 c4 10 add $0x10,%esp 113ac1: eb e4 jmp 113aa7 =============================================================================== 0010a3f0 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10a3f0: 55 push %ebp 10a3f1: 89 e5 mov %esp,%ebp 10a3f3: 56 push %esi 10a3f4: 53 push %ebx 10a3f5: 83 ec 10 sub $0x10,%esp 10a3f8: 8b 5d 08 mov 0x8(%ebp),%ebx * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size 10a3fb: 8d 45 f0 lea -0x10(%ebp),%eax 10a3fe: 50 push %eax 10a3ff: 8d 45 f4 lea -0xc(%ebp),%eax 10a402: 50 push %eax 10a403: 53 push %ebx 10a404: 68 40 f8 11 00 push $0x11f840 10a409: e8 f2 16 00 00 call 10bb00 <_Objects_Get_isr_disable> 10a40e: 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 ) { 10a410: 83 c4 10 add $0x10,%esp 10a413: 8b 4d f4 mov -0xc(%ebp),%ecx 10a416: 85 c9 test %ecx,%ecx 10a418: 74 0e je 10a428 10a41a: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10a41f: 8d 65 f8 lea -0x8(%ebp),%esp 10a422: 5b pop %ebx 10a423: 5e pop %esi 10a424: c9 leave 10a425: c3 ret 10a426: 66 90 xchg %ax,%ax the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10a428: f6 40 10 30 testb $0x30,0x10(%eax) 10a42c: 74 3a je 10a468 _CORE_mutex_Seize( 10a42e: 83 ec 0c sub $0xc,%esp 10a431: ff 75 f0 pushl -0x10(%ebp) 10a434: ff 75 10 pushl 0x10(%ebp) 10a437: 83 75 0c 01 xorl $0x1,0xc(%ebp) 10a43b: 83 65 0c 01 andl $0x1,0xc(%ebp) 10a43f: ff 75 0c pushl 0xc(%ebp) 10a442: 53 push %ebx 10a443: 8d 40 14 lea 0x14(%eax),%eax 10a446: 50 push %eax 10a447: e8 54 0c 00 00 call 10b0a0 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10a44c: 83 c4 14 add $0x14,%esp 10a44f: a1 bc f9 11 00 mov 0x11f9bc,%eax 10a454: ff 70 34 pushl 0x34(%eax) 10a457: e8 0c 01 00 00 call 10a568 <_Semaphore_Translate_core_mutex_return_code> 10a45c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10a45f: 8d 65 f8 lea -0x8(%ebp),%esp 10a462: 5b pop %ebx 10a463: 5e pop %esi 10a464: c9 leave 10a465: c3 ret 10a466: 66 90 xchg %ax,%ax /** * This function attempts to allocate a block of @a size bytes from * @a the_heap. If insufficient memory is free in @a the_heap to allocate * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon 10a468: 8b 75 f0 mov -0x10(%ebp),%esi * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate( 10a46b: 8b 0d bc f9 11 00 mov 0x11f9bc,%ecx Heap_Control *the_heap, 10a471: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) size_t size 10a478: 8b 40 5c mov 0x5c(%eax),%eax 10a47b: 85 c0 test %eax,%eax 10a47d: 75 29 jne 10a4a8 ); /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. 10a47f: f6 45 0c 01 testb $0x1,0xc(%ebp) 10a483: 74 2b je 10a4b0 * Any other value of @a alignment is taken "as is", i.e., even odd 10a485: 56 push %esi 10a486: 9d popf * alignments are possible. 10a487: c7 41 34 01 00 00 00 movl $0x1,0x34(%ecx) id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10a48e: 83 ec 0c sub $0xc,%esp 10a491: a1 bc f9 11 00 mov 0x11f9bc,%eax 10a496: ff 70 34 pushl 0x34(%eax) 10a499: e8 da 00 00 00 call 10a578 <_Semaphore_Translate_core_semaphore_return_code> 10a49e: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10a4a1: 8d 65 f8 lea -0x8(%ebp),%esp 10a4a4: 5b pop %ebx 10a4a5: 5e pop %esi 10a4a6: c9 leave 10a4a7: c3 ret * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); 10a4a8: 48 dec %eax 10a4a9: 89 42 5c mov %eax,0x5c(%edx) 10a4ac: 56 push %esi 10a4ad: 9d popf 10a4ae: eb de jmp 10a48e /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a4b0: a1 f8 f8 11 00 mov 0x11f8f8,%eax 10a4b5: 40 inc %eax 10a4b6: a3 f8 f8 11 00 mov %eax,0x11f8f8 { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10a4bb: c7 42 44 01 00 00 00 movl $0x1,0x44(%edx) * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @param[in] alignment the required alignment 10a4c2: 8d 42 14 lea 0x14(%edx),%eax 10a4c5: 89 41 44 mov %eax,0x44(%ecx) * @return NULL if unsuccessful and a pointer to the block if successful 10a4c8: 89 59 20 mov %ebx,0x20(%ecx) */ 10a4cb: 56 push %esi 10a4cc: 9d popf void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, 10a4cd: 52 push %edx 10a4ce: 68 a0 cb 10 00 push $0x10cba0 10a4d3: ff 75 10 pushl 0x10(%ebp) 10a4d6: 50 push %eax 10a4d7: e8 74 23 00 00 call 10c850 <_Thread_queue_Enqueue_with_handler> size_t size, 10a4dc: e8 af 1e 00 00 call 10c390 <_Thread_Enable_dispatch> 10a4e1: 83 c4 10 add $0x10,%esp 10a4e4: eb a8 jmp 10a48e =============================================================================== 0010a4e8 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10a4e8: 55 push %ebp 10a4e9: 89 e5 mov %esp,%ebp 10a4eb: 53 push %ebx 10a4ec: 83 ec 18 sub $0x18,%esp 10a4ef: 8b 5d 08 mov 0x8(%ebp),%ebx * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap 10a4f2: 8d 45 f8 lea -0x8(%ebp),%eax 10a4f5: 50 push %eax 10a4f6: 53 push %ebx 10a4f7: 68 40 f8 11 00 push $0x11f840 10a4fc: e8 4b 16 00 00 call 10bb4c <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10a501: 83 c4 10 add $0x10,%esp 10a504: 8b 55 f8 mov -0x8(%ebp),%edx 10a507: 85 d2 test %edx,%edx 10a509: 74 0d je 10a518 10a50b: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a510: 8b 5d fc mov -0x4(%ebp),%ebx 10a513: c9 leave 10a514: c3 ret 10a515: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10a518: f6 40 10 30 testb $0x30,0x10(%eax) 10a51c: 75 26 jne 10a544 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10a51e: 52 push %edx 10a51f: 6a 00 push $0x0 10a521: 53 push %ebx 10a522: 83 c0 14 add $0x14,%eax 10a525: 50 push %eax 10a526: e8 75 0d 00 00 call 10b2a0 <_CORE_semaphore_Surrender> 10a52b: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a52d: e8 5e 1e 00 00 call 10c390 <_Thread_Enable_dispatch> return 10a532: 89 1c 24 mov %ebx,(%esp) 10a535: e8 3e 00 00 00 call 10a578 <_Semaphore_Translate_core_semaphore_return_code> 10a53a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a53d: 8b 5d fc mov -0x4(%ebp),%ebx 10a540: c9 leave 10a541: c3 ret 10a542: 66 90 xchg %ax,%ax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( 10a544: 51 push %ecx 10a545: 6a 00 push $0x0 10a547: 53 push %ebx 10a548: 83 c0 14 add $0x14,%eax 10a54b: 50 push %eax 10a54c: e8 eb 0b 00 00 call 10b13c <_CORE_mutex_Surrender> 10a551: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a553: e8 38 1e 00 00 call 10c390 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10a558: 89 1c 24 mov %ebx,(%esp) 10a55b: e8 08 00 00 00 call 10a568 <_Semaphore_Translate_core_mutex_return_code> 10a560: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a563: 8b 5d fc mov -0x4(%ebp),%ebx 10a566: c9 leave 10a567: c3 ret =============================================================================== 00117388 : */ void rtems_shutdown_executive( uint32_t result ) { 117388: 55 push %ebp 117389: 89 e5 mov %esp,%ebp 11738b: 83 ec 28 sub $0x28,%esp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 11738e: 83 3d c4 fa 11 00 04 cmpl $0x4,0x11fac4 117395: 74 1e je 1173b5 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 117397: c7 05 c4 fa 11 00 04 movl $0x4,0x11fac4 11739e: 00 00 00 #endif } /** * This routine sets the current system state to that specified by * the called. 1173a1: 83 ec 08 sub $0x8,%esp 1173a4: 68 e0 f8 11 00 push $0x11f8e0 1173a9: 8d 45 e8 lea -0x18(%ebp),%eax 1173ac: 50 push %eax 1173ad: e8 be 61 ff ff call 10d570 <_CPU_Context_switch> 1173b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 1173b5: c9 leave <== NOT EXECUTED 1173b6: c3 ret <== NOT EXECUTED =============================================================================== 0010b224 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10b224: 55 push %ebp 10b225: 89 e5 mov %esp,%ebp 10b227: 83 ec 08 sub $0x8,%esp 10b22a: 8b 4d 08 mov 0x8(%ebp),%ecx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 10b22d: a1 3c 28 12 00 mov 0x12283c,%eax 10b232: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10b238: a1 78 27 12 00 mov 0x122778,%eax 10b23d: 40 inc %eax 10b23e: a3 78 27 12 00 mov %eax,0x122778 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10b243: 85 c9 test %ecx,%ecx 10b245: 74 15 je 10b25c <== NEVER TAKEN asr->mode_set = mode_set; 10b247: 8b 45 0c mov 0xc(%ebp),%eax 10b24a: 89 42 10 mov %eax,0x10(%edx) asr->handler = asr_handler; 10b24d: 89 4a 0c mov %ecx,0xc(%edx) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10b250: e8 af 21 00 00 call 10d404 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10b255: 31 c0 xor %eax,%eax 10b257: c9 leave 10b258: c3 ret 10b259: 8d 76 00 lea 0x0(%esi),%esi #endif /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of 10b25c: c6 42 08 01 movb $0x1,0x8(%edx) <== NOT EXECUTED * @a page_size byte units. If @a page_size is 0 or is not multiple of 10b260: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) <== NOT EXECUTED * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. 10b267: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) <== NOT EXECUTED * 10b26e: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) <== NOT EXECUTED * @param[in] the_heap is the heap to operate upon 10b275: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) <== NOT EXECUTED * @param[in] starting_address is the starting address of the memory for 10b27c: c7 42 1c 00 00 00 00 movl $0x0,0x1c(%edx) <== NOT EXECUTED asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10b283: e8 7c 21 00 00 call 10d404 <_Thread_Enable_dispatch><== NOT EXECUTED return RTEMS_SUCCESSFUL; } 10b288: 31 c0 xor %eax,%eax <== NOT EXECUTED 10b28a: c9 leave <== NOT EXECUTED 10b28b: c3 ret <== NOT EXECUTED =============================================================================== 00113c80 : rtems_status_code rtems_signal_send( Objects_Id id, rtems_signal_set signal_set ) { 113c80: 55 push %ebp 113c81: 89 e5 mov %esp,%ebp 113c83: 53 push %ebx 113c84: 83 ec 14 sub $0x14,%esp 113c87: 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 ) 113c8a: 85 db test %ebx,%ebx 113c8c: 75 0a jne 113c98 <== ALWAYS TAKEN 113c8e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c93: 8b 5d fc mov -0x4(%ebp),%ebx 113c96: c9 leave 113c97: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 113c98: 83 ec 08 sub $0x8,%esp 113c9b: 8d 45 f8 lea -0x8(%ebp),%eax 113c9e: 50 push %eax 113c9f: ff 75 08 pushl 0x8(%ebp) 113ca2: e8 45 38 00 00 call 1174ec <_Thread_Get> 113ca7: 89 c1 mov %eax,%ecx switch ( location ) { 113ca9: 83 c4 10 add $0x10,%esp 113cac: 8b 55 f8 mov -0x8(%ebp),%edx 113caf: 85 d2 test %edx,%edx 113cb1: 74 0d je 113cc0 113cb3: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113cb8: 8b 5d fc mov -0x4(%ebp),%ebx 113cbb: c9 leave 113cbc: c3 ret 113cbd: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 113cc0: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 113cc6: 8b 42 0c mov 0xc(%edx),%eax 113cc9: 85 c0 test %eax,%eax 113ccb: 74 43 je 113d10 if ( asr->is_enabled ) { 113ccd: 80 7a 08 00 cmpb $0x0,0x8(%edx) 113cd1: 74 29 je 113cfc <== NEVER TAKEN * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 113cd3: 9c pushf 113cd4: fa cli 113cd5: 58 pop %eax ); 113cd6: 09 5a 14 or %ebx,0x14(%edx) 113cd9: 50 push %eax 113cda: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 113cdb: c6 41 75 01 movb $0x1,0x75(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 113cdf: a1 58 6f 13 00 mov 0x136f58,%eax 113ce4: 85 c0 test %eax,%eax 113ce6: 74 1c je 113d04 113ce8: 3b 0d 7c 6f 13 00 cmp 0x136f7c,%ecx 113cee: 75 14 jne 113d04 <== NEVER TAKEN _ISR_Signals_to_thread_executing = TRUE; 113cf0: c6 05 28 70 13 00 01 movb $0x1,0x137028 113cf7: eb 0b jmp 113d04 113cf9: 8d 76 00 lea 0x0(%esi),%esi * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 113cfc: 9c pushf <== NOT EXECUTED 113cfd: fa cli <== NOT EXECUTED 113cfe: 58 pop %eax <== NOT EXECUTED ); 113cff: 09 5a 18 or %ebx,0x18(%edx) <== NOT EXECUTED 113d02: 50 push %eax <== NOT EXECUTED 113d03: 9d popf <== NOT EXECUTED } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 113d04: e8 bf 37 00 00 call 1174c8 <_Thread_Enable_dispatch> 113d09: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113d0b: 8b 5d fc mov -0x4(%ebp),%ebx 113d0e: c9 leave 113d0f: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 113d10: e8 b3 37 00 00 call 1174c8 <_Thread_Enable_dispatch> 113d15: b8 0b 00 00 00 mov $0xb,%eax 113d1a: e9 74 ff ff ff jmp 113c93 =============================================================================== 0010a588 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, Objects_Id *id ) { 10a588: 55 push %ebp 10a589: 89 e5 mov %esp,%ebp 10a58b: 57 push %edi 10a58c: 56 push %esi 10a58d: 53 push %ebx 10a58e: 83 ec 0c sub $0xc,%esp 10a591: 8b 7d 08 mov 0x8(%ebp),%edi 10a594: 8b 5d 18 mov 0x18(%ebp),%ebx Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10a597: 8b 45 1c mov 0x1c(%ebp),%eax 10a59a: 85 c0 test %eax,%eax 10a59c: 0f 84 32 01 00 00 je 10a6d4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10a5a2: 85 ff test %edi,%edi 10a5a4: 0f 84 c2 00 00 00 je 10a66c /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10a5aa: 66 85 db test %bx,%bx 10a5ad: 78 1b js 10a5ca bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ); 10a5af: 8b 45 0c mov 0xc(%ebp),%eax 10a5b2: 85 c0 test %eax,%eax 10a5b4: 0f 84 f2 00 00 00 je 10a6ac 10a5ba: 0f b6 05 14 b3 11 00 movzbl 0x11b314,%eax 10a5c1: 39 45 0c cmp %eax,0xc(%ebp) 10a5c4: 0f 87 e2 00 00 00 ja 10a6ac <== NEVER TAKEN */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a5ca: 83 ec 0c sub $0xc,%esp 10a5cd: ff 35 b4 f9 11 00 pushl 0x11f9b4 10a5d3: e8 d4 07 00 00 call 10adac <_API_Mutex_Lock> #ifdef __cplusplus extern "C" { #endif /** 10a5d8: c7 04 24 80 f8 11 00 movl $0x11f880,(%esp) 10a5df: e8 74 10 00 00 call 10b658 <_Objects_Allocate> 10a5e4: 89 c6 mov %eax,%esi * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10a5e6: 83 c4 10 add $0x10,%esp 10a5e9: 85 c0 test %eax,%eax 10a5eb: 0f 84 cb 00 00 00 je 10a6bc /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10a5f1: 50 push %eax 10a5f2: 57 push %edi 10a5f3: 8b 45 14 mov 0x14(%ebp),%eax 10a5f6: 83 e0 01 and $0x1,%eax 10a5f9: 50 push %eax 10a5fa: 6a 00 push $0x0 10a5fc: 8b 45 14 mov 0x14(%ebp),%eax 10a5ff: c1 e8 09 shr $0x9,%eax 10a602: 83 e0 01 and $0x1,%eax 10a605: 50 push %eax 10a606: 8b 45 14 mov 0x14(%ebp),%eax 10a609: c1 e8 08 shr $0x8,%eax 10a60c: 83 f0 01 xor $0x1,%eax 10a60f: 83 e0 01 and $0x1,%eax 10a612: 50 push %eax 10a613: ff 75 0c pushl 0xc(%ebp) 10a616: 83 e3 01 and $0x1,%ebx 10a619: 53 push %ebx 10a61a: ff 75 10 pushl 0x10(%ebp) 10a61d: 6a 00 push $0x0 10a61f: 56 push %esi 10a620: 68 80 f8 11 00 push $0x11f880 10a625: e8 0a 1e 00 00 call 10c434 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10a62a: 83 c4 30 add $0x30,%esp 10a62d: 84 c0 test %al,%al 10a62f: 74 4b je 10a67c } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10a631: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax 10a637: c1 6d 14 0a shrl $0xa,0x14(%ebp) 10a63b: 83 75 14 01 xorl $0x1,0x14(%ebp) 10a63f: 8a 55 14 mov 0x14(%ebp),%dl 10a642: 83 e2 01 and $0x1,%edx 10a645: 88 50 08 mov %dl,0x8(%eax) *id = the_thread->Object.id; 10a648: 8b 46 08 mov 0x8(%esi),%eax 10a64b: 8b 55 1c mov 0x1c(%ebp),%edx 10a64e: 89 02 mov %eax,(%edx) ); } #endif _RTEMS_Unlock_allocator(); 10a650: 83 ec 0c sub $0xc,%esp 10a653: ff 35 b4 f9 11 00 pushl 0x11f9b4 10a659: e8 96 07 00 00 call 10adf4 <_API_Mutex_Unlock> 10a65e: 31 c0 xor %eax,%eax 10a660: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 10a663: 8d 65 f4 lea -0xc(%ebp),%esp 10a666: 5b pop %ebx 10a667: 5e pop %esi 10a668: 5f pop %edi 10a669: c9 leave 10a66a: c3 ret 10a66b: 90 nop if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10a66c: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10a671: 8d 65 f4 lea -0xc(%ebp),%esp 10a674: 5b pop %ebx 10a675: 5e pop %esi 10a676: 5f pop %edi 10a677: c9 leave 10a678: c3 ret 10a679: 8d 76 00 lea 0x0(%esi),%esi * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 10a67c: 83 ec 0c sub $0xc,%esp 10a67f: ff 76 08 pushl 0x8(%esi) 10a682: e8 05 14 00 00 call 10ba8c <_Objects_Get_information_id> 10a687: 5a pop %edx 10a688: 59 pop %ecx 10a689: 56 push %esi 10a68a: 50 push %eax 10a68b: e8 88 13 00 00 call 10ba18 <_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(); 10a690: 58 pop %eax 10a691: ff 35 b4 f9 11 00 pushl 0x11f9b4 10a697: e8 58 07 00 00 call 10adf4 <_API_Mutex_Unlock> 10a69c: b8 0d 00 00 00 mov $0xd,%eax 10a6a1: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10a6a4: 8d 65 f4 lea -0xc(%ebp),%esp 10a6a7: 5b pop %ebx 10a6a8: 5e pop %esi 10a6a9: 5f pop %edi 10a6aa: c9 leave 10a6ab: c3 ret } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10a6ac: b8 13 00 00 00 mov $0x13,%eax } 10a6b1: 8d 65 f4 lea -0xc(%ebp),%esp 10a6b4: 5b pop %ebx 10a6b5: 5e pop %esi 10a6b6: 5f pop %edi 10a6b7: c9 leave 10a6b8: c3 ret 10a6b9: 8d 76 00 lea 0x0(%esi),%esi */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10a6bc: 83 ec 0c sub $0xc,%esp 10a6bf: ff 35 b4 f9 11 00 pushl 0x11f9b4 10a6c5: e8 2a 07 00 00 call 10adf4 <_API_Mutex_Unlock> 10a6ca: b8 05 00 00 00 mov $0x5,%eax 10a6cf: 83 c4 10 add $0x10,%esp 10a6d2: eb 9d jmp 10a671 Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10a6d4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 10a6d9: eb 96 jmp 10a671 <== NOT EXECUTED =============================================================================== 0010a6dc : */ rtems_status_code rtems_task_delete( Objects_Id id ) { 10a6dc: 55 push %ebp 10a6dd: 89 e5 mov %esp,%ebp 10a6df: 53 push %ebx 10a6e0: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10a6e3: ff 35 b4 f9 11 00 pushl 0x11f9b4 10a6e9: e8 be 06 00 00 call 10adac <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10a6ee: 58 pop %eax 10a6ef: 5a pop %edx 10a6f0: 8d 45 f8 lea -0x8(%ebp),%eax 10a6f3: 50 push %eax 10a6f4: ff 75 08 pushl 0x8(%ebp) 10a6f7: e8 b8 1c 00 00 call 10c3b4 <_Thread_Get> 10a6fc: 89 c3 mov %eax,%ebx switch ( location ) { 10a6fe: 83 c4 10 add $0x10,%esp 10a701: 8b 45 f8 mov -0x8(%ebp),%eax 10a704: 85 c0 test %eax,%eax 10a706: 75 44 jne 10a74c case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10a708: 83 ec 0c sub $0xc,%esp 10a70b: ff 73 08 pushl 0x8(%ebx) 10a70e: e8 79 13 00 00 call 10ba8c <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10a713: 5a pop %edx 10a714: 59 pop %ecx 10a715: 53 push %ebx 10a716: 50 push %eax 10a717: e8 58 19 00 00 call 10c074 <_Thread_Close> 10a71c: 58 pop %eax 10a71d: ff 73 08 pushl 0x8(%ebx) 10a720: e8 67 13 00 00 call 10ba8c <_Objects_Get_information_id> 10a725: 5a pop %edx 10a726: 59 pop %ecx 10a727: 53 push %ebx 10a728: 50 push %eax 10a729: e8 ea 12 00 00 call 10ba18 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a72e: 58 pop %eax 10a72f: ff 35 b4 f9 11 00 pushl 0x11f9b4 10a735: e8 ba 06 00 00 call 10adf4 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10a73a: e8 51 1c 00 00 call 10c390 <_Thread_Enable_dispatch> 10a73f: 31 c0 xor %eax,%eax 10a741: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10a744: 8b 5d fc mov -0x4(%ebp),%ebx 10a747: c9 leave 10a748: c3 ret 10a749: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10a74c: 83 ec 0c sub $0xc,%esp 10a74f: ff 35 b4 f9 11 00 pushl 0x11f9b4 10a755: e8 9a 06 00 00 call 10adf4 <_API_Mutex_Unlock> 10a75a: b8 04 00 00 00 mov $0x4,%eax 10a75f: 83 c4 10 add $0x10,%esp return RTEMS_INVALID_ID; } 10a762: 8b 5d fc mov -0x4(%ebp),%ebx 10a765: c9 leave 10a766: c3 ret =============================================================================== 0010be34 : rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 10be34: 55 push %ebp 10be35: 89 e5 mov %esp,%ebp 10be37: 83 ec 18 sub $0x18,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10be3a: a1 d4 4c 12 00 mov 0x124cd4,%eax 10be3f: 8b 40 40 mov 0x40(%eax),%eax 10be42: 80 78 04 00 cmpb $0x0,0x4(%eax) 10be46: 74 64 je 10beac <== NEVER TAKEN return RTEMS_NOT_CONFIGURED; if ( !note ) 10be48: 8b 45 10 mov 0x10(%ebp),%eax 10be4b: 85 c0 test %eax,%eax 10be4d: 0f 84 85 00 00 00 je 10bed8 <== NEVER TAKEN /* * 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 ) 10be53: 83 7d 0c 0f cmpl $0xf,0xc(%ebp) 10be57: 77 4b ja 10bea4 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10be59: 8b 4d 08 mov 0x8(%ebp),%ecx 10be5c: 85 c9 test %ecx,%ecx 10be5e: 74 54 je 10beb4 10be60: a1 fc 4c 12 00 mov 0x124cfc,%eax 10be65: 8b 55 08 mov 0x8(%ebp),%edx 10be68: 3b 50 08 cmp 0x8(%eax),%edx 10be6b: 74 4c je 10beb9 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10be6d: 83 ec 08 sub $0x8,%esp 10be70: 8d 45 fc lea -0x4(%ebp),%eax 10be73: 50 push %eax 10be74: ff 75 08 pushl 0x8(%ebp) 10be77: e8 8c 1f 00 00 call 10de08 <_Thread_Get> switch ( location ) { 10be7c: 83 c4 10 add $0x10,%esp 10be7f: 8b 55 fc mov -0x4(%ebp),%edx 10be82: 85 d2 test %edx,%edx 10be84: 75 4a jne 10bed0 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10be86: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax <== NOT EXECUTED 10be8c: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10be8f: 8b 44 90 20 mov 0x20(%eax,%edx,4),%eax <== NOT EXECUTED 10be93: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10be96: 89 02 mov %eax,(%edx) <== NOT EXECUTED _Thread_Enable_dispatch(); 10be98: e8 47 1f 00 00 call 10dde4 <_Thread_Enable_dispatch><== NOT EXECUTED 10be9d: 31 c0 xor %eax,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be9f: c9 leave <== NOT EXECUTED 10bea0: c3 ret <== NOT EXECUTED 10bea1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * 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 ) 10bea4: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bea9: c9 leave 10beaa: c3 ret 10beab: 90 nop { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10beac: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10beb1: c9 leave <== NOT EXECUTED 10beb2: c3 ret <== NOT EXECUTED 10beb3: 90 nop <== NOT EXECUTED 10beb4: a1 fc 4c 12 00 mov 0x124cfc,%eax */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10beb9: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10bebf: 8b 55 0c mov 0xc(%ebp),%edx 10bec2: 8b 44 90 20 mov 0x20(%eax,%edx,4),%eax 10bec6: 8b 55 10 mov 0x10(%ebp),%edx 10bec9: 89 02 mov %eax,(%edx) 10becb: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10becd: c9 leave 10bece: c3 ret 10becf: 90 nop *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10bed0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bed5: c9 leave 10bed6: c3 ret 10bed7: 90 nop RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10bed8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bedd: c9 leave <== NOT EXECUTED 10bede: c3 ret <== NOT EXECUTED =============================================================================== 0010a768 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, Objects_Id *id ) { 10a768: 55 push %ebp 10a769: 89 e5 mov %esp,%ebp 10a76b: 83 ec 08 sub $0x8,%esp 10a76e: 8b 45 08 mov 0x8(%ebp),%eax 10a771: 8b 55 10 mov 0x10(%ebp),%edx Objects_Name_or_id_lookup_errors status; if ( !id ) 10a774: 85 d2 test %edx,%edx 10a776: 74 30 je 10a7a8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10a778: 85 c0 test %eax,%eax 10a77a: 75 10 jne 10a78c *id = _Thread_Executing->Object.id; 10a77c: a1 bc f9 11 00 mov 0x11f9bc,%eax 10a781: 8b 40 08 mov 0x8(%eax),%eax 10a784: 89 02 mov %eax,(%edx) 10a786: 31 c0 xor %eax,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10a788: c9 leave 10a789: c3 ret 10a78a: 66 90 xchg %ax,%ax if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10a78c: 52 push %edx 10a78d: ff 75 0c pushl 0xc(%ebp) 10a790: 50 push %eax 10a791: 68 80 f8 11 00 push $0x11f880 10a796: e8 09 15 00 00 call 10bca4 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10a79b: 8b 04 85 b4 91 11 00 mov 0x1191b4(,%eax,4),%eax 10a7a2: 83 c4 10 add $0x10,%esp } 10a7a5: c9 leave 10a7a6: c3 ret 10a7a7: 90 nop Objects_Id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) 10a7a8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10a7ad: c9 leave <== NOT EXECUTED 10a7ae: c3 ret <== NOT EXECUTED =============================================================================== 0010ad1c : */ rtems_status_code rtems_task_is_suspended( Objects_Id id ) { 10ad1c: 55 push %ebp 10ad1d: 89 e5 mov %esp,%ebp 10ad1f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ad22: 8d 45 fc lea -0x4(%ebp),%eax 10ad25: 50 push %eax 10ad26: ff 75 08 pushl 0x8(%ebp) 10ad29: e8 8e 1c 00 00 call 10c9bc <_Thread_Get> switch ( location ) { 10ad2e: 83 c4 10 add $0x10,%esp 10ad31: 8b 55 fc mov -0x4(%ebp),%edx 10ad34: 85 d2 test %edx,%edx 10ad36: 74 08 je 10ad40 <== ALWAYS TAKEN 10ad38: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ad3d: c9 leave <== NOT EXECUTED 10ad3e: c3 ret <== NOT EXECUTED 10ad3f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10ad40: f6 40 10 02 testb $0x2,0x10(%eax) 10ad44: 74 0e je 10ad54 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ad46: e8 4d 1c 00 00 call 10c998 <_Thread_Enable_dispatch> 10ad4b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ad50: c9 leave 10ad51: c3 ret 10ad52: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 10ad54: e8 3f 1c 00 00 call 10c998 <_Thread_Enable_dispatch> 10ad59: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ad5b: c9 leave 10ad5c: c3 ret =============================================================================== 00110828 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 110828: 55 push %ebp 110829: 89 e5 mov %esp,%ebp 11082b: 57 push %edi 11082c: 56 push %esi 11082d: 53 push %ebx 11082e: 83 ec 0c sub $0xc,%esp 110831: 8b 7d 08 mov 0x8(%ebp),%edi ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 110834: 8b 4d 10 mov 0x10(%ebp),%ecx 110837: 85 c9 test %ecx,%ecx 110839: 0f 84 31 01 00 00 je 110970 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 11083f: a1 bc f9 11 00 mov 0x11f9bc,%eax 110844: 89 45 ec mov %eax,-0x14(%ebp) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 110847: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx 11084d: 89 55 f0 mov %edx,-0x10(%ebp) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 110850: 80 78 76 01 cmpb $0x1,0x76(%eax) 110854: 19 f6 sbb %esi,%esi 110856: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 11085c: 8b 50 7c mov 0x7c(%eax),%edx 11085f: 85 d2 test %edx,%edx 110861: 0f 85 bd 00 00 00 jne 110924 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 110867: 8b 5d f0 mov -0x10(%ebp),%ebx 11086a: 80 7b 08 01 cmpb $0x1,0x8(%ebx) 11086e: 19 db sbb %ebx,%ebx 110870: 81 e3 00 04 00 00 and $0x400,%ebx old_mode |= _ISR_Get_level(); 110876: e8 d1 ce ff ff call 10d74c <_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; 11087b: 09 c3 or %eax,%ebx old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 11087d: 09 f3 or %esi,%ebx 11087f: 8b 45 10 mov 0x10(%ebp),%eax 110882: 89 18 mov %ebx,(%eax) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 110884: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 11088b: 74 11 je 11089e executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE; 11088d: 89 f8 mov %edi,%eax 11088f: c1 e8 08 shr $0x8,%eax 110892: 83 f0 01 xor $0x1,%eax 110895: 83 e0 01 and $0x1,%eax 110898: 8b 55 ec mov -0x14(%ebp),%edx 11089b: 88 42 76 mov %al,0x76(%edx) if ( mask & RTEMS_TIMESLICE_MASK ) { 11089e: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1108a5: 74 1e je 1108c5 if ( _Modes_Is_timeslice(mode_set) ) { 1108a7: f7 c7 00 02 00 00 test $0x200,%edi 1108ad: 0f 84 81 00 00 00 je 110934 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1108b3: 8b 5d ec mov -0x14(%ebp),%ebx 1108b6: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1108bd: a1 c4 f8 11 00 mov 0x11f8c4,%eax 1108c2: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 1108c5: f6 45 0c 01 testb $0x1,0xc(%ebp) 1108c9: 74 09 je 1108d4 * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @param[in] alignment the required alignment 1108cb: f7 c7 01 00 00 00 test $0x1,%edi 1108d1: 74 5d je 110930 1108d3: fa cli */ is_asr_enabled = FALSE; needs_asr_dispatching = FALSE; if ( mask & RTEMS_ASR_MASK ) { 1108d4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1108db: 74 31 je 11090e 1108dd: c1 ef 0a shr $0xa,%edi 1108e0: 83 f7 01 xor $0x1,%edi 1108e3: 89 f8 mov %edi,%eax 1108e5: 83 e0 01 and $0x1,%eax is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 1108e8: 8b 55 f0 mov -0x10(%ebp),%edx 1108eb: 38 42 08 cmp %al,0x8(%edx) 1108ee: 74 1e je 11090e asr->is_enabled = is_asr_enabled; 1108f0: 88 42 08 mov %al,0x8(%edx) uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 1108f3: 9c pushf 1108f4: fa cli 1108f5: 59 pop %ecx /** 1108f6: 8b 5d f0 mov -0x10(%ebp),%ebx 1108f9: 8b 53 18 mov 0x18(%ebx),%edx * This routine grows @a the_heap memory area using the size bytes which 1108fc: 8b 43 14 mov 0x14(%ebx),%eax 1108ff: 89 43 18 mov %eax,0x18(%ebx) * begin at @a starting_address. 110902: 89 53 14 mov %edx,0x14(%ebx) * 110905: 51 push %ecx 110906: 9d popf _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 110907: 8b 43 14 mov 0x14(%ebx),%eax 11090a: 85 c0 test %eax,%eax 11090c: 75 56 jne 110964 <== NEVER TAKEN needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 11090e: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up(_System_state_Current) ) 110910: 83 3d c4 fa 11 00 03 cmpl $0x3,0x11fac4 110917: 74 2f je 110948 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 110919: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11091b: 83 c4 0c add $0xc,%esp 11091e: 5b pop %ebx 11091f: 5e pop %esi 110920: 5f pop %edi 110921: c9 leave 110922: c3 ret 110923: 90 nop old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 110924: 81 ce 00 02 00 00 or $0x200,%esi 11092a: e9 38 ff ff ff jmp 110867 11092f: 90 nop * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @param[in] alignment the required alignment 110930: fb sti 110931: eb a1 jmp 1108d4 110933: 90 nop if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 110934: 8b 45 ec mov -0x14(%ebp),%eax 110937: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 11093e: f6 45 0c 01 testb $0x1,0xc(%ebp) 110942: 74 90 je 1108d4 110944: eb 85 jmp 1108cb 110946: 66 90 xchg %ax,%ax } } } if ( _System_state_Is_up(_System_state_Current) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 110948: e8 73 01 00 00 call 110ac0 <_Thread_Evaluate_mode> 11094d: 84 c0 test %al,%al 11094f: 75 04 jne 110955 110951: 84 db test %bl,%bl 110953: 74 c4 je 110919 <== ALWAYS TAKEN _Thread_Dispatch(); 110955: e8 da b8 ff ff call 10c234 <_Thread_Dispatch> 11095a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11095c: 83 c4 0c add $0xc,%esp 11095f: 5b pop %ebx 110960: 5e pop %esi 110961: 5f pop %edi 110962: c9 leave 110963: c3 ret 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; 110964: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED 110967: c6 40 75 01 movb $0x1,0x75(%eax) <== NOT EXECUTED 11096b: b3 01 mov $0x1,%bl <== NOT EXECUTED 11096d: eb a1 jmp 110910 <== NOT EXECUTED 11096f: 90 nop <== NOT EXECUTED ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 110970: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED if ( _System_state_Is_up(_System_state_Current) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 110975: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 110978: 5b pop %ebx <== NOT EXECUTED 110979: 5e pop %esi <== NOT EXECUTED 11097a: 5f pop %edi <== NOT EXECUTED 11097b: c9 leave <== NOT EXECUTED 11097c: c3 ret <== NOT EXECUTED =============================================================================== 0010b974 : */ rtems_status_code rtems_task_resume( Objects_Id id ) { 10b974: 55 push %ebp 10b975: 89 e5 mov %esp,%ebp 10b977: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10b97a: 8d 45 fc lea -0x4(%ebp),%eax 10b97d: 50 push %eax 10b97e: ff 75 08 pushl 0x8(%ebp) 10b981: e8 26 1f 00 00 call 10d8ac <_Thread_Get> switch ( location ) { 10b986: 83 c4 10 add $0x10,%esp 10b989: 8b 55 fc mov -0x4(%ebp),%edx 10b98c: 85 d2 test %edx,%edx 10b98e: 74 08 je 10b998 10b990: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b995: c9 leave 10b996: c3 ret 10b997: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10b998: f6 40 10 02 testb $0x2,0x10(%eax) 10b99c: 75 0e jne 10b9ac _Thread_Resume( the_thread, TRUE ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10b99e: e8 b9 1e 00 00 call 10d85c <_Thread_Enable_dispatch> 10b9a3: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9a8: c9 leave 10b9a9: c3 ret 10b9aa: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, TRUE ); 10b9ac: 83 ec 08 sub $0x8,%esp 10b9af: 6a 01 push $0x1 10b9b1: 50 push %eax 10b9b2: e8 19 27 00 00 call 10e0d0 <_Thread_Resume> _Thread_Enable_dispatch(); 10b9b7: e8 a0 1e 00 00 call 10d85c <_Thread_Enable_dispatch> 10b9bc: 31 c0 xor %eax,%eax 10b9be: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9c1: c9 leave 10b9c2: c3 ret =============================================================================== 0010bfb8 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 10bfb8: 55 push %ebp 10bfb9: 89 e5 mov %esp,%ebp 10bfbb: 83 ec 18 sub $0x18,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10bfbe: a1 d4 4c 12 00 mov 0x124cd4,%eax 10bfc3: 8b 40 40 mov 0x40(%eax),%eax 10bfc6: 80 78 04 00 cmpb $0x0,0x4(%eax) 10bfca: 74 54 je 10c020 <== NEVER TAKEN /* * 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 ) 10bfcc: 83 7d 0c 0f cmpl $0xf,0xc(%ebp) 10bfd0: 77 46 ja 10c018 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10bfd2: 8b 4d 08 mov 0x8(%ebp),%ecx 10bfd5: 85 c9 test %ecx,%ecx 10bfd7: 74 4f je 10c028 <== NEVER TAKEN 10bfd9: a1 fc 4c 12 00 mov 0x124cfc,%eax 10bfde: 8b 55 08 mov 0x8(%ebp),%edx 10bfe1: 3b 50 08 cmp 0x8(%eax),%edx 10bfe4: 74 47 je 10c02d <== NEVER TAKEN api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10bfe6: 83 ec 08 sub $0x8,%esp 10bfe9: 8d 45 fc lea -0x4(%ebp),%eax 10bfec: 50 push %eax 10bfed: ff 75 08 pushl 0x8(%ebp) 10bff0: e8 13 1e 00 00 call 10de08 <_Thread_Get> switch ( location ) { 10bff5: 83 c4 10 add $0x10,%esp 10bff8: 8b 55 fc mov -0x4(%ebp),%edx 10bffb: 85 d2 test %edx,%edx 10bffd: 75 45 jne 10c044 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10bfff: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c005: 8b 55 10 mov 0x10(%ebp),%edx 10c008: 8b 4d 0c mov 0xc(%ebp),%ecx 10c00b: 89 54 88 20 mov %edx,0x20(%eax,%ecx,4) _Thread_Enable_dispatch(); 10c00f: e8 d0 1d 00 00 call 10dde4 <_Thread_Enable_dispatch> 10c014: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c016: c9 leave 10c017: c3 ret /* * 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 ) 10c018: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c01d: c9 leave 10c01e: c3 ret 10c01f: 90 nop { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10c020: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c025: c9 leave <== NOT EXECUTED 10c026: c3 ret <== NOT EXECUTED 10c027: 90 nop <== NOT EXECUTED 10c028: a1 fc 4c 12 00 mov 0x124cfc,%eax */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10c02d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c033: 8b 55 10 mov 0x10(%ebp),%edx 10c036: 8b 4d 0c mov 0xc(%ebp),%ecx 10c039: 89 54 88 20 mov %edx,0x20(%eax,%ecx,4) 10c03d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c03f: c9 leave 10c040: c3 ret 10c041: 8d 76 00 lea 0x0(%esi),%esi api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c044: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c049: c9 leave 10c04a: c3 ret =============================================================================== 0010b744 : rtems_status_code rtems_task_set_priority( Objects_Id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10b744: 55 push %ebp 10b745: 89 e5 mov %esp,%ebp 10b747: 56 push %esi 10b748: 53 push %ebx 10b749: 83 ec 10 sub $0x10,%esp 10b74c: 8b 5d 0c mov 0xc(%ebp),%ebx 10b74f: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10b752: 85 db test %ebx,%ebx 10b754: 74 0b je 10b761 bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ); 10b756: 0f b6 05 94 f1 11 00 movzbl 0x11f194,%eax 10b75d: 39 c3 cmp %eax,%ebx 10b75f: 77 5f ja 10b7c0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10b761: 85 f6 test %esi,%esi 10b763: 74 67 je 10b7cc <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10b765: 83 ec 08 sub $0x8,%esp 10b768: 8d 45 f4 lea -0xc(%ebp),%eax 10b76b: 50 push %eax 10b76c: ff 75 08 pushl 0x8(%ebp) 10b76f: e8 04 1d 00 00 call 10d478 <_Thread_Get> 10b774: 89 c2 mov %eax,%edx switch ( location ) { 10b776: 83 c4 10 add $0x10,%esp 10b779: 8b 45 f4 mov -0xc(%ebp),%eax 10b77c: 85 c0 test %eax,%eax 10b77e: 74 0c je 10b78c 10b780: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b785: 8d 65 f8 lea -0x8(%ebp),%esp 10b788: 5b pop %ebx 10b789: 5e pop %esi 10b78a: c9 leave 10b78b: c3 ret the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10b78c: 8b 42 14 mov 0x14(%edx),%eax 10b78f: 89 06 mov %eax,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10b791: 85 db test %ebx,%ebx 10b793: 74 1c je 10b7b1 the_thread->real_priority = new_priority; 10b795: 89 5a 18 mov %ebx,0x18(%edx) if ( the_thread->resource_count == 0 || 10b798: 8b 4a 1c mov 0x1c(%edx),%ecx 10b79b: 85 c9 test %ecx,%ecx 10b79d: 74 05 je 10b7a4 10b79f: 3b 5a 14 cmp 0x14(%edx),%ebx 10b7a2: 73 0d jae 10b7b1 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, FALSE ); 10b7a4: 50 push %eax 10b7a5: 6a 00 push $0x0 10b7a7: 53 push %ebx 10b7a8: 52 push %edx 10b7a9: e8 ca 17 00 00 call 10cf78 <_Thread_Change_priority> 10b7ae: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10b7b1: e8 9e 1c 00 00 call 10d454 <_Thread_Enable_dispatch> 10b7b6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7b8: 8d 65 f8 lea -0x8(%ebp),%esp 10b7bb: 5b pop %ebx 10b7bc: 5e pop %esi 10b7bd: c9 leave 10b7be: c3 ret 10b7bf: 90 nop 10b7c0: b8 13 00 00 00 mov $0x13,%eax 10b7c5: 8d 65 f8 lea -0x8(%ebp),%esp 10b7c8: 5b pop %ebx 10b7c9: 5e pop %esi 10b7ca: c9 leave 10b7cb: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10b7cc: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7d1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10b7d4: 5b pop %ebx <== NOT EXECUTED 10b7d5: 5e pop %esi <== NOT EXECUTED 10b7d6: c9 leave <== NOT EXECUTED 10b7d7: c3 ret <== NOT EXECUTED =============================================================================== 0010a828 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10a828: 55 push %ebp 10a829: 89 e5 mov %esp,%ebp 10a82b: 53 push %ebx 10a82c: 83 ec 14 sub $0x14,%esp 10a82f: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10a832: 85 db test %ebx,%ebx 10a834: 74 5a je 10a890 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10a836: 83 ec 08 sub $0x8,%esp 10a839: 8d 45 f8 lea -0x8(%ebp),%eax 10a83c: 50 push %eax 10a83d: ff 75 08 pushl 0x8(%ebp) 10a840: e8 6f 1b 00 00 call 10c3b4 <_Thread_Get> switch ( location ) { 10a845: 83 c4 10 add $0x10,%esp 10a848: 8b 55 f8 mov -0x8(%ebp),%edx 10a84b: 85 d2 test %edx,%edx 10a84d: 74 0d je 10a85c 10a84f: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a854: 8b 5d fc mov -0x4(%ebp),%ebx 10a857: c9 leave 10a858: c3 ret 10a859: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( 10a85c: 83 ec 0c sub $0xc,%esp 10a85f: ff 75 10 pushl 0x10(%ebp) 10a862: 6a 00 push $0x0 10a864: 53 push %ebx 10a865: 6a 00 push $0x0 10a867: 50 push %eax 10a868: e8 1f 26 00 00 call 10ce8c <_Thread_Start> 10a86d: 83 c4 20 add $0x20,%esp 10a870: 84 c0 test %al,%al 10a872: 75 10 jne 10a884 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10a874: e8 17 1b 00 00 call 10c390 <_Thread_Enable_dispatch> 10a879: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a87e: 8b 5d fc mov -0x4(%ebp),%ebx 10a881: c9 leave 10a882: c3 ret 10a883: 90 nop switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10a884: e8 07 1b 00 00 call 10c390 <_Thread_Enable_dispatch> 10a889: 31 c0 xor %eax,%eax 10a88b: eb c7 jmp 10a854 10a88d: 8d 76 00 lea 0x0(%esi),%esi ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10a890: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a895: 8b 5d fc mov -0x4(%ebp),%ebx 10a898: c9 leave 10a899: c3 ret =============================================================================== 0010ba38 : */ rtems_status_code rtems_task_suspend( Objects_Id id ) { 10ba38: 55 push %ebp 10ba39: 89 e5 mov %esp,%ebp 10ba3b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ba3e: 8d 45 fc lea -0x4(%ebp),%eax 10ba41: 50 push %eax 10ba42: ff 75 08 pushl 0x8(%ebp) 10ba45: e8 62 1e 00 00 call 10d8ac <_Thread_Get> switch ( location ) { 10ba4a: 83 c4 10 add $0x10,%esp 10ba4d: 8b 55 fc mov -0x4(%ebp),%edx 10ba50: 85 d2 test %edx,%edx 10ba52: 74 08 je 10ba5c 10ba54: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba59: c9 leave 10ba5a: c3 ret 10ba5b: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10ba5c: f6 40 10 02 testb $0x2,0x10(%eax) 10ba60: 74 0e je 10ba70 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ba62: e8 f5 1d 00 00 call 10d85c <_Thread_Enable_dispatch> 10ba67: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba6c: c9 leave 10ba6d: c3 ret 10ba6e: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 10ba70: 83 ec 0c sub $0xc,%esp 10ba73: 50 push %eax 10ba74: e8 1b 2a 00 00 call 10e494 <_Thread_Suspend> _Thread_Enable_dispatch(); 10ba79: e8 de 1d 00 00 call 10d85c <_Thread_Enable_dispatch> 10ba7e: 31 c0 xor %eax,%eax 10ba80: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba83: c9 leave 10ba84: c3 ret =============================================================================== 0010b650 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10b650: 55 push %ebp 10b651: 89 e5 mov %esp,%ebp 10b653: 56 push %esi 10b654: 53 push %ebx 10b655: 83 ec 10 sub $0x10,%esp 10b658: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10b65b: 85 db test %ebx,%ebx 10b65d: 0f 84 a1 00 00 00 je 10b704 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10b663: 83 ec 08 sub $0x8,%esp 10b666: 8d 45 f4 lea -0xc(%ebp),%eax 10b669: 50 push %eax 10b66a: ff 75 08 pushl 0x8(%ebp) 10b66d: e8 12 1d 00 00 call 10d384 <_Thread_Get> 10b672: 89 c6 mov %eax,%esi switch (location) { 10b674: 83 c4 10 add $0x10,%esp 10b677: 8b 45 f4 mov -0xc(%ebp),%eax 10b67a: 85 c0 test %eax,%eax 10b67c: 75 2e jne 10b6ac <== NEVER TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10b67e: 8b 86 04 01 00 00 mov 0x104(%esi),%eax while (tvp) { 10b684: 85 c0 test %eax,%eax 10b686: 75 0a jne 10b692 10b688: eb 2e jmp 10b6b8 10b68a: 66 90 xchg %ax,%ax if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10b68c: 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) { 10b68e: 85 c0 test %eax,%eax 10b690: 74 26 je 10b6b8 if (tvp->ptr == ptr) { 10b692: 39 58 04 cmp %ebx,0x4(%eax) 10b695: 75 f5 jne 10b68c tvp->dtor = dtor; 10b697: 8b 55 10 mov 0x10(%ebp),%edx 10b69a: 89 50 10 mov %edx,0x10(%eax) _Thread_Enable_dispatch(); 10b69d: e8 be 1c 00 00 call 10d360 <_Thread_Enable_dispatch> 10b6a2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6a4: 8d 65 f8 lea -0x8(%ebp),%esp 10b6a7: 5b pop %ebx 10b6a8: 5e pop %esi 10b6a9: c9 leave 10b6aa: c3 ret 10b6ab: 90 nop if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 10b6ac: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6b1: 8d 65 f8 lea -0x8(%ebp),%esp 10b6b4: 5b pop %ebx 10b6b5: 5e pop %esi 10b6b6: c9 leave 10b6b7: c3 ret } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 10b6b8: 83 ec 0c sub $0xc,%esp 10b6bb: 6a 14 push $0x14 10b6bd: e8 d2 2d 00 00 call 10e494 <_Workspace_Allocate> 10b6c2: 89 c2 mov %eax,%edx _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 10b6c4: 83 c4 10 add $0x10,%esp 10b6c7: 85 c0 test %eax,%eax 10b6c9: 74 2d je 10b6f8 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10b6cb: 8b 03 mov (%ebx),%eax 10b6cd: 89 42 08 mov %eax,0x8(%edx) new->ptr = ptr; 10b6d0: 89 5a 04 mov %ebx,0x4(%edx) new->dtor = dtor; 10b6d3: 8b 45 10 mov 0x10(%ebp),%eax 10b6d6: 89 42 10 mov %eax,0x10(%edx) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10b6d9: 8b 86 04 01 00 00 mov 0x104(%esi),%eax 10b6df: 89 02 mov %eax,(%edx) the_thread->task_variables = new; 10b6e1: 89 96 04 01 00 00 mov %edx,0x104(%esi) _Thread_Enable_dispatch(); 10b6e7: e8 74 1c 00 00 call 10d360 <_Thread_Enable_dispatch> 10b6ec: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6ee: 8d 65 f8 lea -0x8(%ebp),%esp 10b6f1: 5b pop %ebx 10b6f2: 5e pop %esi 10b6f3: c9 leave 10b6f4: c3 ret 10b6f5: 8d 76 00 lea 0x0(%esi),%esi * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 10b6f8: e8 63 1c 00 00 call 10d360 <_Thread_Enable_dispatch> 10b6fd: b8 1a 00 00 00 mov $0x1a,%eax 10b702: eb ad jmp 10b6b1 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10b704: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b709: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10b70c: 5b pop %ebx <== NOT EXECUTED 10b70d: 5e pop %esi <== NOT EXECUTED 10b70e: c9 leave <== NOT EXECUTED 10b70f: c3 ret <== NOT EXECUTED =============================================================================== 0010b710 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10b710: 55 push %ebp 10b711: 89 e5 mov %esp,%ebp 10b713: 56 push %esi 10b714: 53 push %ebx 10b715: 83 ec 10 sub $0x10,%esp 10b718: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10b71b: 85 db test %ebx,%ebx 10b71d: 74 3f je 10b75e return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10b71f: 83 ec 08 sub $0x8,%esp 10b722: 8d 45 f4 lea -0xc(%ebp),%eax 10b725: 50 push %eax 10b726: ff 75 08 pushl 0x8(%ebp) 10b729: e8 56 1c 00 00 call 10d384 <_Thread_Get> 10b72e: 89 c6 mov %eax,%esi switch (location) { 10b730: 83 c4 10 add $0x10,%esp 10b733: 8b 45 f4 mov -0xc(%ebp),%eax 10b736: 85 c0 test %eax,%eax 10b738: 75 32 jne 10b76c <== NEVER TAKEN case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10b73a: 8b 96 04 01 00 00 mov 0x104(%esi),%edx while (tvp) { 10b740: 85 d2 test %edx,%edx 10b742: 74 15 je 10b759 if (tvp->ptr == ptr) { 10b744: 39 5a 04 cmp %ebx,0x4(%edx) 10b747: 75 08 jne 10b751 10b749: eb 4c jmp 10b797 10b74b: 90 nop 10b74c: 39 5a 04 cmp %ebx,0x4(%edx) 10b74f: 74 27 je 10b778 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b751: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10b753: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10b755: 85 d2 test %edx,%edx 10b757: 75 f3 jne 10b74c <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10b759: e8 02 1c 00 00 call 10d360 <_Thread_Enable_dispatch> 10b75e: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b763: 8d 65 f8 lea -0x8(%ebp),%esp 10b766: 5b pop %ebx 10b767: 5e pop %esi 10b768: c9 leave 10b769: c3 ret 10b76a: 66 90 xchg %ax,%ax return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 10b76c: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b771: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10b774: 5b pop %ebx <== NOT EXECUTED 10b775: 5e pop %esi <== NOT EXECUTED 10b776: c9 leave <== NOT EXECUTED 10b777: c3 ret <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10b778: 8b 02 mov (%edx),%eax 10b77a: 89 01 mov %eax,(%ecx) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 10b77c: 83 ec 08 sub $0x8,%esp 10b77f: 52 push %edx 10b780: 56 push %esi 10b781: e8 a6 00 00 00 call 10b82c <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10b786: e8 d5 1b 00 00 call 10d360 <_Thread_Enable_dispatch> 10b78b: 31 c0 xor %eax,%eax 10b78d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b790: 8d 65 f8 lea -0x8(%ebp),%esp 10b793: 5b pop %ebx 10b794: 5e pop %esi 10b795: c9 leave 10b796: c3 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 10b797: 8b 02 mov (%edx),%eax 10b799: 89 86 04 01 00 00 mov %eax,0x104(%esi) 10b79f: eb db jmp 10b77c =============================================================================== 0010b7a4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10b7a4: 55 push %ebp 10b7a5: 89 e5 mov %esp,%ebp 10b7a7: 56 push %esi 10b7a8: 53 push %ebx 10b7a9: 83 ec 10 sub $0x10,%esp 10b7ac: 8b 5d 0c mov 0xc(%ebp),%ebx 10b7af: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10b7b2: 85 db test %ebx,%ebx 10b7b4: 74 56 je 10b80c return RTEMS_INVALID_ADDRESS; if ( !result ) 10b7b6: 85 f6 test %esi,%esi 10b7b8: 74 52 je 10b80c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10b7ba: 83 ec 08 sub $0x8,%esp 10b7bd: 8d 45 f4 lea -0xc(%ebp),%eax 10b7c0: 50 push %eax 10b7c1: ff 75 08 pushl 0x8(%ebp) 10b7c4: e8 bb 1b 00 00 call 10d384 <_Thread_Get> switch (location) { 10b7c9: 83 c4 10 add $0x10,%esp 10b7cc: 8b 55 f4 mov -0xc(%ebp),%edx 10b7cf: 85 d2 test %edx,%edx 10b7d1: 75 2d jne 10b800 <== NEVER TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10b7d3: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 10b7d9: 85 c0 test %eax,%eax 10b7db: 75 09 jne 10b7e6 10b7dd: eb 39 jmp 10b818 10b7df: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10b7e0: 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) { 10b7e2: 85 c0 test %eax,%eax 10b7e4: 74 32 je 10b818 <== NEVER TAKEN if (tvp->ptr == ptr) { 10b7e6: 39 58 04 cmp %ebx,0x4(%eax) 10b7e9: 75 f5 jne 10b7e0 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10b7eb: 8b 40 0c mov 0xc(%eax),%eax 10b7ee: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10b7f0: e8 6b 1b 00 00 call 10d360 <_Thread_Enable_dispatch> 10b7f5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7f7: 8d 65 f8 lea -0x8(%ebp),%esp 10b7fa: 5b pop %ebx 10b7fb: 5e pop %esi 10b7fc: c9 leave 10b7fd: c3 ret 10b7fe: 66 90 xchg %ax,%ax if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 10b800: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b805: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10b808: 5b pop %ebx <== NOT EXECUTED 10b809: 5e pop %esi <== NOT EXECUTED 10b80a: c9 leave <== NOT EXECUTED 10b80b: c3 ret <== NOT EXECUTED return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 10b80c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b811: 8d 65 f8 lea -0x8(%ebp),%esp 10b814: 5b pop %ebx 10b815: 5e pop %esi 10b816: c9 leave 10b817: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10b818: e8 43 1b 00 00 call 10d360 <_Thread_Enable_dispatch> 10b81d: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b822: 8d 65 f8 lea -0x8(%ebp),%esp 10b825: 5b pop %ebx 10b826: 5e pop %esi 10b827: c9 leave 10b828: c3 ret =============================================================================== 0010b524 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10b524: 55 push %ebp 10b525: 89 e5 mov %esp,%ebp 10b527: 53 push %ebx 10b528: 83 ec 04 sub $0x4,%esp 10b52b: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10b52e: 80 3d 0c 31 12 00 00 cmpb $0x0,0x12310c 10b535: 0f 84 a1 00 00 00 je 10b5dc return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10b53b: 85 db test %ebx,%ebx 10b53d: 0f 84 a5 00 00 00 je 10b5e8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10b543: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10b54a: 83 ec 0c sub $0xc,%esp 10b54d: 53 push %ebx 10b54e: e8 c1 f3 ff ff call 10a914 <_TOD_Validate> 10b553: 83 c4 10 add $0x10,%esp 10b556: 84 c0 test %al,%al 10b558: 75 0a jne 10b564 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b55a: b8 14 00 00 00 mov $0x14,%eax } 10b55f: 8b 5d fc mov -0x4(%ebp),%ebx 10b562: c9 leave 10b563: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10b564: 83 ec 0c sub $0xc,%esp 10b567: 53 push %ebx 10b568: e8 17 f3 ff ff call 10a884 <_TOD_To_seconds> 10b56d: 89 c3 mov %eax,%ebx if ( seconds <= _TOD_Seconds_since_epoch ) 10b56f: 83 c4 10 add $0x10,%esp 10b572: 3b 05 8c 31 12 00 cmp 0x12318c,%eax 10b578: 76 e0 jbe 10b55a /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10b57a: a1 f8 30 12 00 mov 0x1230f8,%eax 10b57f: 40 inc %eax 10b580: a3 f8 30 12 00 mov %eax,0x1230f8 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10b585: 83 ec 08 sub $0x8,%esp 10b588: 6a 10 push $0x10 10b58a: ff 35 bc 31 12 00 pushl 0x1231bc 10b590: e8 23 24 00 00 call 10d9b8 <_Thread_Set_state> _Watchdog_Initialize( 10b595: a1 bc 31 12 00 mov 0x1231bc,%eax 10b59a: 8b 50 08 mov 0x8(%eax),%edx * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10b59d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) * @param[in] the_heap is the heap to operate upon 10b5a4: c7 40 64 6c cf 10 00 movl $0x10cf6c,0x64(%eax) * @param[in] starting_address is the starting address of the memory for 10b5ab: 89 50 68 mov %edx,0x68(%eax) * the heap 10b5ae: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. */ bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, 10b5b5: 2b 1d 8c 31 12 00 sub 0x12318c,%ebx 10b5bb: 89 58 54 mov %ebx,0x54(%eax) size_t size ); 10b5be: 5a pop %edx 10b5bf: 59 pop %ecx 10b5c0: 83 c0 48 add $0x48,%eax 10b5c3: 50 push %eax 10b5c4: 68 d0 31 12 00 push $0x1231d0 10b5c9: e8 c2 2a 00 00 call 10e090 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); 10b5ce: e8 31 1b 00 00 call 10d104 <_Thread_Enable_dispatch> 10b5d3: 31 c0 xor %eax,%eax 10b5d5: 83 c4 10 add $0x10,%esp 10b5d8: eb 85 jmp 10b55f 10b5da: 66 90 xchg %ax,%ax rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10b5dc: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b5e1: 8b 5d fc mov -0x4(%ebp),%ebx 10b5e4: c9 leave 10b5e5: c3 ret 10b5e6: 66 90 xchg %ax,%ax Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10b5e8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b5ed: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10b5f0: c9 leave <== NOT EXECUTED 10b5f1: c3 ret <== NOT EXECUTED =============================================================================== 00114448 : */ rtems_status_code rtems_timer_cancel( Objects_Id id ) { 114448: 55 push %ebp 114449: 89 e5 mov %esp,%ebp 11444b: 83 ec 1c sub $0x1c,%esp /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 11444e: 8d 45 fc lea -0x4(%ebp),%eax 114451: 50 push %eax 114452: ff 75 08 pushl 0x8(%ebp) 114455: 68 e0 78 13 00 push $0x1378e0 11445a: e8 25 28 00 00 call 116c84 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11445f: 83 c4 10 add $0x10,%esp 114462: 8b 55 fc mov -0x4(%ebp),%edx 114465: 85 d2 test %edx,%edx 114467: 74 07 je 114470 114469: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11446e: c9 leave 11446f: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 114470: 83 78 38 04 cmpl $0x4,0x38(%eax) 114474: 74 0f je 114485 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 114476: 83 ec 0c sub $0xc,%esp 114479: 83 c0 10 add $0x10,%eax 11447c: 50 push %eax 11447d: e8 3e 44 00 00 call 1188c0 <_Watchdog_Remove> 114482: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 114485: e8 3e 30 00 00 call 1174c8 <_Thread_Enable_dispatch> 11448a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11448c: c9 leave 11448d: c3 ret =============================================================================== 0010b3bc : rtems_status_code rtems_timer_create( rtems_name name, Objects_Id *id ) { 10b3bc: 55 push %ebp 10b3bd: 89 e5 mov %esp,%ebp 10b3bf: 57 push %edi 10b3c0: 56 push %esi 10b3c1: 53 push %ebx 10b3c2: 83 ec 0c sub $0xc,%esp 10b3c5: 8b 75 08 mov 0x8(%ebp),%esi 10b3c8: 8b 7d 0c mov 0xc(%ebp),%edi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10b3cb: 85 f6 test %esi,%esi 10b3cd: 74 71 je 10b440 return RTEMS_INVALID_NAME; if ( !id ) 10b3cf: 85 ff test %edi,%edi 10b3d1: 0f 84 8d 00 00 00 je 10b464 <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10b3d7: a1 38 2f 12 00 mov 0x122f38,%eax 10b3dc: 40 inc %eax 10b3dd: a3 38 2f 12 00 mov %eax,0x122f38 #ifdef __cplusplus extern "C" { #endif /** 10b3e2: 83 ec 0c sub $0xc,%esp 10b3e5: 68 c0 35 12 00 push $0x1235c0 10b3ea: e8 51 0f 00 00 call 10c340 <_Objects_Allocate> 10b3ef: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10b3f1: 83 c4 10 add $0x10,%esp 10b3f4: 85 c0 test %eax,%eax 10b3f6: 74 58 je 10b450 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10b3f8: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10b3ff: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) * @param[in] the_heap is the heap to operate upon 10b406: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) * @param[in] starting_address is the starting address of the memory for 10b40d: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) * the heap 10b414: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) 10b41b: 8b 48 08 mov 0x8(%eax),%ecx 10b41e: 0f b7 d1 movzwl %cx,%edx 10b421: a1 dc 35 12 00 mov 0x1235dc,%eax 10b426: 89 1c 90 mov %ebx,(%eax,%edx,4) 10b429: 89 73 0c mov %esi,0xc(%ebx) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10b42c: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 10b42e: e8 45 1c 00 00 call 10d078 <_Thread_Enable_dispatch> 10b433: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10b435: 8d 65 f4 lea -0xc(%ebp),%esp 10b438: 5b pop %ebx 10b439: 5e pop %esi 10b43a: 5f pop %edi 10b43b: c9 leave 10b43c: c3 ret 10b43d: 8d 76 00 lea 0x0(%esi),%esi Objects_Id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10b440: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b445: 8d 65 f4 lea -0xc(%ebp),%esp 10b448: 5b pop %ebx 10b449: 5e pop %esi 10b44a: 5f pop %edi 10b44b: c9 leave 10b44c: c3 ret 10b44d: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10b450: e8 23 1c 00 00 call 10d078 <_Thread_Enable_dispatch> 10b455: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b45a: 8d 65 f4 lea -0xc(%ebp),%esp 10b45d: 5b pop %ebx 10b45e: 5e pop %esi 10b45f: 5f pop %edi 10b460: c9 leave 10b461: c3 ret 10b462: 66 90 xchg %ax,%ax Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10b464: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b469: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b46c: 5b pop %ebx <== NOT EXECUTED 10b46d: 5e pop %esi <== NOT EXECUTED 10b46e: 5f pop %edi <== NOT EXECUTED 10b46f: c9 leave <== NOT EXECUTED 10b470: c3 ret <== NOT EXECUTED =============================================================================== 00114548 : */ rtems_status_code rtems_timer_delete( Objects_Id id ) { 114548: 55 push %ebp 114549: 89 e5 mov %esp,%ebp 11454b: 53 push %ebx 11454c: 83 ec 18 sub $0x18,%esp /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 11454f: 8d 45 f8 lea -0x8(%ebp),%eax 114552: 50 push %eax 114553: ff 75 08 pushl 0x8(%ebp) 114556: 68 e0 78 13 00 push $0x1378e0 11455b: e8 24 27 00 00 call 116c84 <_Objects_Get> 114560: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 114562: 83 c4 10 add $0x10,%esp 114565: 8b 4d f8 mov -0x8(%ebp),%ecx 114568: 85 c9 test %ecx,%ecx 11456a: 75 38 jne 1145a4 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 11456c: 83 ec 08 sub $0x8,%esp 11456f: 50 push %eax 114570: 68 e0 78 13 00 push $0x1378e0 114575: e8 56 22 00 00 call 1167d0 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 11457a: 8d 43 10 lea 0x10(%ebx),%eax 11457d: 89 04 24 mov %eax,(%esp) 114580: e8 3b 43 00 00 call 1188c0 <_Watchdog_Remove> * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 114585: 58 pop %eax 114586: 5a pop %edx 114587: 53 push %ebx 114588: 68 e0 78 13 00 push $0x1378e0 11458d: e8 7e 25 00 00 call 116b10 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 114592: e8 31 2f 00 00 call 1174c8 <_Thread_Enable_dispatch> 114597: 31 c0 xor %eax,%eax 114599: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11459c: 8b 5d fc mov -0x4(%ebp),%ebx 11459f: c9 leave 1145a0: c3 ret 1145a1: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1145a4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1145a9: 8b 5d fc mov -0x4(%ebp),%ebx 1145ac: c9 leave 1145ad: c3 ret =============================================================================== 0010b474 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10b474: 55 push %ebp 10b475: 89 e5 mov %esp,%ebp 10b477: 57 push %edi 10b478: 56 push %esi 10b479: 53 push %ebx 10b47a: 83 ec 1c sub $0x1c,%esp 10b47d: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10b480: 85 f6 test %esi,%esi 10b482: 0f 84 98 00 00 00 je 10b520 return RTEMS_INVALID_NUMBER; if ( !routine ) 10b488: 8b 7d 10 mov 0x10(%ebp),%edi 10b48b: 85 ff test %edi,%edi 10b48d: 0f 84 9d 00 00 00 je 10b530 <== NEVER TAKEN /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 10b493: 53 push %ebx 10b494: 8d 45 f0 lea -0x10(%ebp),%eax 10b497: 50 push %eax 10b498: ff 75 08 pushl 0x8(%ebp) 10b49b: 68 c0 35 12 00 push $0x1235c0 10b4a0: e8 8f 13 00 00 call 10c834 <_Objects_Get> 10b4a5: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10b4a7: 83 c4 10 add $0x10,%esp 10b4aa: 8b 4d f0 mov -0x10(%ebp),%ecx 10b4ad: 85 c9 test %ecx,%ecx 10b4af: 75 5f jne 10b510 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10b4b1: 8d 78 10 lea 0x10(%eax),%edi 10b4b4: 83 ec 0c sub $0xc,%esp 10b4b7: 57 push %edi 10b4b8: e8 77 2c 00 00 call 10e134 <_Watchdog_Remove> _ISR_Disable( level ); 10b4bd: 9c pushf 10b4be: fa cli 10b4bf: 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 ) { 10b4c0: 83 c4 10 add $0x10,%esp 10b4c3: 8b 53 18 mov 0x18(%ebx),%edx 10b4c6: 85 d2 test %edx,%edx 10b4c8: 75 76 jne 10b540 <== NEVER TAKEN /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 10b4ca: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10b4d1: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 10b4d8: 8b 55 10 mov 0x10(%ebp),%edx 10b4db: 89 53 2c mov %edx,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 10b4de: 8b 55 08 mov 0x8(%ebp),%edx 10b4e1: 89 53 30 mov %edx,0x30(%ebx) * the heap 10b4e4: 8b 55 14 mov 0x14(%ebp),%edx 10b4e7: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10b4ea: 50 push %eax 10b4eb: 9d popf * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10b4ec: 89 73 1c mov %esi,0x1c(%ebx) void *starting_address, size_t *size 10b4ef: 83 ec 08 sub $0x8,%esp 10b4f2: 57 push %edi 10b4f3: 68 1c 30 12 00 push $0x12301c 10b4f8: e8 07 2b 00 00 call 10e004 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10b4fd: e8 76 1b 00 00 call 10d078 <_Thread_Enable_dispatch> 10b502: 31 c0 xor %eax,%eax 10b504: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b507: 8d 65 f4 lea -0xc(%ebp),%esp 10b50a: 5b pop %ebx 10b50b: 5e pop %esi 10b50c: 5f pop %edi 10b50d: c9 leave 10b50e: c3 ret 10b50f: 90 nop if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10b510: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b515: 8d 65 f4 lea -0xc(%ebp),%esp 10b518: 5b pop %ebx 10b519: 5e pop %esi 10b51a: 5f pop %edi 10b51b: c9 leave 10b51c: c3 ret 10b51d: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10b520: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b525: 8d 65 f4 lea -0xc(%ebp),%esp 10b528: 5b pop %ebx 10b529: 5e pop %esi 10b52a: 5f pop %edi 10b52b: c9 leave 10b52c: c3 ret 10b52d: 8d 76 00 lea 0x0(%esi),%esi ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 10b530: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b535: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b538: 5b pop %ebx <== NOT EXECUTED 10b539: 5e pop %esi <== NOT EXECUTED 10b53a: 5f pop %edi <== NOT EXECUTED 10b53b: c9 leave <== NOT EXECUTED 10b53c: c3 ret <== NOT EXECUTED 10b53d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10b540: 50 push %eax <== NOT EXECUTED 10b541: 9d popf <== NOT EXECUTED _Thread_Enable_dispatch(); 10b542: e8 31 1b 00 00 call 10d078 <_Thread_Enable_dispatch><== NOT EXECUTED 10b547: 31 c0 xor %eax,%eax <== NOT EXECUTED 10b549: eb ca jmp 10b515 <== NOT EXECUTED =============================================================================== 00114688 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 114688: 55 push %ebp 114689: 89 e5 mov %esp,%ebp 11468b: 57 push %edi 11468c: 56 push %esi 11468d: 53 push %ebx 11468e: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 114691: 80 3d cc 6e 13 00 00 cmpb $0x0,0x136ecc 114698: 75 0e jne 1146a8 11469a: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11469f: 8d 65 f4 lea -0xc(%ebp),%esp 1146a2: 5b pop %ebx 1146a3: 5e pop %esi 1146a4: 5f pop %edi 1146a5: c9 leave 1146a6: c3 ret 1146a7: 90 nop rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 1146a8: 83 ec 0c sub $0xc,%esp 1146ab: ff 75 0c pushl 0xc(%ebp) 1146ae: e8 d1 d6 ff ff call 111d84 <_TOD_Validate> 1146b3: 83 c4 10 add $0x10,%esp 1146b6: 84 c0 test %al,%al 1146b8: 74 23 je 1146dd return RTEMS_INVALID_CLOCK; if ( !routine ) 1146ba: 8b 75 10 mov 0x10(%ebp),%esi 1146bd: 85 f6 test %esi,%esi 1146bf: 0f 84 a3 00 00 00 je 114768 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 1146c5: 83 ec 0c sub $0xc,%esp 1146c8: ff 75 0c pushl 0xc(%ebp) 1146cb: e8 24 d6 ff ff call 111cf4 <_TOD_To_seconds> 1146d0: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch ) 1146d2: 83 c4 10 add $0x10,%esp 1146d5: 3b 05 4c 6f 13 00 cmp 0x136f4c,%eax 1146db: 77 0f ja 1146ec _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1146dd: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1146e2: 8d 65 f4 lea -0xc(%ebp),%esp 1146e5: 5b pop %ebx 1146e6: 5e pop %esi 1146e7: 5f pop %edi 1146e8: c9 leave 1146e9: c3 ret 1146ea: 66 90 xchg %ax,%ax /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 1146ec: 53 push %ebx 1146ed: 8d 45 f0 lea -0x10(%ebp),%eax 1146f0: 50 push %eax 1146f1: ff 75 08 pushl 0x8(%ebp) 1146f4: 68 e0 78 13 00 push $0x1378e0 1146f9: e8 86 25 00 00 call 116c84 <_Objects_Get> 1146fe: 89 c6 mov %eax,%esi seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 114700: 83 c4 10 add $0x10,%esp 114703: 8b 4d f0 mov -0x10(%ebp),%ecx 114706: 85 c9 test %ecx,%ecx 114708: 75 52 jne 11475c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11470a: 8d 58 10 lea 0x10(%eax),%ebx 11470d: 83 ec 0c sub $0xc,%esp 114710: 53 push %ebx 114711: e8 aa 41 00 00 call 1188c0 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 114716: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 11471d: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) * @param[in] the_heap is the heap to operate upon 114724: 8b 45 10 mov 0x10(%ebp),%eax 114727: 89 46 2c mov %eax,0x2c(%esi) * @param[in] starting_address is the starting address of the memory for 11472a: 8b 45 08 mov 0x8(%ebp),%eax 11472d: 89 46 30 mov %eax,0x30(%esi) * the heap 114730: 8b 45 14 mov 0x14(%ebp),%eax 114733: 89 46 34 mov %eax,0x34(%esi) * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. */ bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, 114736: 2b 3d 4c 6f 13 00 sub 0x136f4c,%edi 11473c: 89 7e 1c mov %edi,0x1c(%esi) size_t size ); 11473f: 58 pop %eax 114740: 5a pop %edx 114741: 53 push %ebx 114742: 68 90 6f 13 00 push $0x136f90 114747: e8 44 40 00 00 call 118790 <_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(); 11474c: e8 77 2d 00 00 call 1174c8 <_Thread_Enable_dispatch> 114751: 31 c0 xor %eax,%eax 114753: 83 c4 10 add $0x10,%esp 114756: e9 44 ff ff ff jmp 11469f 11475b: 90 nop seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11475c: b8 04 00 00 00 mov $0x4,%eax 114761: e9 39 ff ff ff jmp 11469f 114766: 66 90 xchg %ax,%ax return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 114768: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 11476d: e9 2d ff ff ff jmp 11469f <== NOT EXECUTED =============================================================================== 00114774 : rtems_status_code rtems_timer_get_information( Objects_Id id, rtems_timer_information *the_info ) { 114774: 55 push %ebp 114775: 89 e5 mov %esp,%ebp 114777: 53 push %ebx 114778: 83 ec 14 sub $0x14,%esp 11477b: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 11477e: 85 db test %ebx,%ebx 114780: 74 4e je 1147d0 <== NEVER TAKEN /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 114782: 52 push %edx 114783: 8d 45 f8 lea -0x8(%ebp),%eax 114786: 50 push %eax 114787: ff 75 08 pushl 0x8(%ebp) 11478a: 68 e0 78 13 00 push $0x1378e0 11478f: e8 f0 24 00 00 call 116c84 <_Objects_Get> 114794: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 114796: 83 c4 10 add $0x10,%esp 114799: 8b 45 f8 mov -0x8(%ebp),%eax 11479c: 85 c0 test %eax,%eax 11479e: 74 0c je 1147ac 1147a0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1147a5: 8b 5d fc mov -0x4(%ebp),%ebx 1147a8: c9 leave 1147a9: c3 ret 1147aa: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 1147ac: 8b 42 38 mov 0x38(%edx),%eax 1147af: 89 03 mov %eax,(%ebx) the_info->initial = the_timer->Ticker.initial; 1147b1: 8b 42 1c mov 0x1c(%edx),%eax 1147b4: 89 43 04 mov %eax,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 1147b7: 8b 42 24 mov 0x24(%edx),%eax 1147ba: 89 43 08 mov %eax,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 1147bd: 8b 42 28 mov 0x28(%edx),%eax 1147c0: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 1147c3: e8 00 2d 00 00 call 1174c8 <_Thread_Enable_dispatch> 1147c8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1147ca: 8b 5d fc mov -0x4(%ebp),%ebx 1147cd: c9 leave 1147ce: c3 ret 1147cf: 90 nop ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1147d0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1147d5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1147d8: c9 leave <== NOT EXECUTED 1147d9: c3 ret <== NOT EXECUTED =============================================================================== 00114a84 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 114a84: 55 push %ebp 114a85: 89 e5 mov %esp,%ebp 114a87: 56 push %esi 114a88: 53 push %ebx 114a89: 83 ec 10 sub $0x10,%esp 114a8c: 8b 55 08 mov 0x8(%ebp),%edx bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ); 114a8f: 85 d2 test %edx,%edx 114a91: 75 0d jne 114aa0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 114a93: b8 13 00 00 00 mov $0x13,%eax } return status; } 114a98: 8d 65 f8 lea -0x8(%ebp),%esp 114a9b: 5b pop %ebx 114a9c: 5e pop %esi 114a9d: c9 leave 114a9e: c3 ret 114a9f: 90 nop 114aa0: 0f b6 05 f4 e4 12 00 movzbl 0x12e4f4,%eax 114aa7: 39 c2 cmp %eax,%edx 114aa9: 77 31 ja 114adc <== ALWAYS TAKEN 114aab: 89 d6 mov %edx,%esi <== NOT EXECUTED /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 114aad: a1 b8 6e 13 00 mov 0x136eb8,%eax 114ab2: 40 inc %eax 114ab3: a3 b8 6e 13 00 mov %eax,0x136eb8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 114ab8: 8a 1d 80 28 13 00 mov 0x132880,%bl initialized = true; 114abe: c6 05 80 28 13 00 01 movb $0x1,0x132880 _Thread_Enable_dispatch(); 114ac5: e8 fe 29 00 00 call 1174c8 <_Thread_Enable_dispatch> if ( tmpInitialized ) 114aca: 84 db test %bl,%bl 114acc: 74 16 je 114ae4 114ace: b8 0e 00 00 00 mov $0xe,%eax */ initialized = false; } return status; } 114ad3: 8d 65 f8 lea -0x8(%ebp),%esp 114ad6: 5b pop %ebx 114ad7: 5e pop %esi 114ad8: c9 leave 114ad9: c3 ret 114ada: 66 90 xchg %ax,%ax * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 114adc: 42 inc %edx 114add: 75 b4 jne 114a93 114adf: 31 f6 xor %esi,%esi 114ae1: eb ca jmp 114aad 114ae3: 90 nop 114ae4: c7 05 20 6e 13 00 24 movl $0x136e24,0x136e20 114aeb: 6e 13 00 114aee: c7 05 24 6e 13 00 00 movl $0x0,0x136e24 114af5: 00 00 00 114af8: c7 05 28 6e 13 00 20 movl $0x136e20,0x136e28 114aff: 6e 13 00 * 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( 114b02: 83 ec 08 sub $0x8,%esp 114b05: 8d 45 f4 lea -0xc(%ebp),%eax 114b08: 50 push %eax 114b09: 81 4d 10 00 80 00 00 orl $0x8000,0x10(%ebp) 114b10: ff 75 10 pushl 0x10(%ebp) 114b13: 68 00 01 00 00 push $0x100 114b18: ff 75 0c pushl 0xc(%ebp) 114b1b: 56 push %esi 114b1c: 68 45 4d 49 54 push $0x54494d45 114b21: e8 fa f1 ff ff call 113d20 /* 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) { 114b26: 83 c4 20 add $0x20,%esp 114b29: 85 c0 test %eax,%eax 114b2b: 0f 85 b2 00 00 00 jne 114be3 * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 114b31: 8b 4d f4 mov -0xc(%ebp),%ecx bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 114b34: 66 3b 0d d0 6d 13 00 cmp 0x136dd0,%cx 114b3b: 0f 86 b3 00 00 00 jbe 114bf4 <== ALWAYS TAKEN 114b41: 31 c0 xor %eax,%eax 114b43: a3 24 79 13 00 mov %eax,0x137924 114b48: c7 05 00 6e 13 00 04 movl $0x136e04,0x136e00 114b4f: 6e 13 00 114b52: c7 05 04 6e 13 00 00 movl $0x0,0x136e04 114b59: 00 00 00 114b5c: c7 05 08 6e 13 00 00 movl $0x136e00,0x136e08 114b63: 6e 13 00 114b66: c7 05 14 6e 13 00 18 movl $0x136e18,0x136e14 114b6d: 6e 13 00 114b70: c7 05 18 6e 13 00 00 movl $0x0,0x136e18 114b77: 00 00 00 114b7a: c7 05 1c 6e 13 00 14 movl $0x136e14,0x136e1c 114b81: 6e 13 00 * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 114b84: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) * @param[in] the_heap is the heap to operate upon 114b8b: c7 40 64 30 73 11 00 movl $0x117330,0x64(%eax) * @param[in] starting_address is the starting address of the memory for 114b92: 89 48 68 mov %ecx,0x68(%eax) * the heap 114b95: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 114b9c: c7 05 48 6e 13 00 00 movl $0x0,0x136e48 114ba3: 00 00 00 * @param[in] the_heap is the heap to operate upon 114ba6: c7 05 5c 6e 13 00 30 movl $0x117330,0x136e5c 114bad: 73 11 00 * @param[in] starting_address is the starting address of the memory for 114bb0: 89 0d 60 6e 13 00 mov %ecx,0x136e60 * the heap 114bb6: c7 05 64 6e 13 00 00 movl $0x0,0x136e64 114bbd: 00 00 00 /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 114bc0: c7 05 20 79 13 00 04 movl $0x114c04,0x137920 114bc7: 4c 11 00 /* * Start the timer server */ status = rtems_task_start( 114bca: 50 push %eax 114bcb: 6a 00 push $0x0 114bcd: 68 a0 4c 11 00 push $0x114ca0 114bd2: 51 push %ecx 114bd3: e8 5c f6 ff ff call 114234 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 114bd8: 83 c4 10 add $0x10,%esp 114bdb: 85 c0 test %eax,%eax 114bdd: 0f 84 b5 fe ff ff je 114a98 <== ALWAYS TAKEN * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 114be3: c6 05 80 28 13 00 00 movb $0x0,0x132880 } return status; } 114bea: 8d 65 f8 lea -0x8(%ebp),%esp 114bed: 5b pop %ebx 114bee: 5e pop %esi 114bef: c9 leave 114bf0: c3 ret 114bf1: 8d 76 00 lea 0x0(%esi),%esi bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 114bf4: 0f b7 d1 movzwl %cx,%edx 114bf7: a1 dc 6d 13 00 mov 0x136ddc,%eax 114bfc: 8b 04 90 mov (%eax,%edx,4),%eax 114bff: e9 3f ff ff ff jmp 114b43 =============================================================================== 00114800 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 114800: 55 push %ebp 114801: 89 e5 mov %esp,%ebp 114803: 53 push %ebx 114804: 83 ec 18 sub $0x18,%esp 114807: 8d 45 f8 lea -0x8(%ebp),%eax 11480a: 50 push %eax 11480b: ff 75 08 pushl 0x8(%ebp) 11480e: 68 e0 78 13 00 push $0x1378e0 114813: e8 6c 24 00 00 call 116c84 <_Objects_Get> 114818: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11481a: 83 c4 10 add $0x10,%esp 11481d: 8b 45 f8 mov -0x8(%ebp),%eax 114820: 85 c0 test %eax,%eax 114822: 74 0c je 114830 114824: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114829: 8b 5d fc mov -0x4(%ebp),%ebx 11482c: c9 leave 11482d: c3 ret 11482e: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 114830: 8b 43 38 mov 0x38(%ebx),%eax 114833: 83 f8 01 cmp $0x1,%eax 114836: 74 40 je 114878 114838: 73 2a jae 114864 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 11483a: 83 c3 10 add $0x10,%ebx 11483d: 83 ec 0c sub $0xc,%esp 114840: 53 push %ebx 114841: e8 7a 40 00 00 call 1188c0 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 114846: 5a pop %edx 114847: 59 pop %ecx 114848: 53 push %ebx 114849: 68 9c 6f 13 00 push $0x136f9c 11484e: e8 3d 3f 00 00 call 118790 <_Watchdog_Insert> 114853: 83 c4 10 add $0x10,%esp case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 114856: e8 6d 2c 00 00 call 1174c8 <_Thread_Enable_dispatch> 11485b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11485d: 8b 5d fc mov -0x4(%ebp),%ebx 114860: c9 leave 114861: c3 ret 114862: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 114864: 83 f8 04 cmp $0x4,%eax 114867: 77 ed ja 114856 <== NEVER TAKEN (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 114869: e8 5a 2c 00 00 call 1174c8 <_Thread_Enable_dispatch> 11486e: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114873: 8b 5d fc mov -0x4(%ebp),%ebx 114876: c9 leave 114877: c3 ret case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 114878: a1 20 79 13 00 mov 0x137920,%eax 11487d: 85 c0 test %eax,%eax 11487f: 74 1b je 11489c <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 114881: 83 ec 0c sub $0xc,%esp 114884: 8d 43 10 lea 0x10(%ebx),%eax 114887: 50 push %eax 114888: e8 33 40 00 00 call 1188c0 <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 11488d: 89 1c 24 mov %ebx,(%esp) 114890: ff 15 20 79 13 00 call *0x137920 114896: 83 c4 10 add $0x10,%esp 114899: eb bb jmp 114856 11489b: 90 nop _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 11489c: e8 27 2c 00 00 call 1174c8 <_Thread_Enable_dispatch><== NOT EXECUTED 1148a1: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED 1148a6: eb 81 jmp 114829 <== NOT EXECUTED =============================================================================== 001148a8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1148a8: 55 push %ebp 1148a9: 89 e5 mov %esp,%ebp 1148ab: 53 push %ebx 1148ac: 83 ec 14 sub $0x14,%esp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 1148af: a1 24 79 13 00 mov 0x137924,%eax 1148b4: 85 c0 test %eax,%eax 1148b6: 0f 84 b0 00 00 00 je 11496c return RTEMS_INCORRECT_STATE; if ( !routine ) 1148bc: 8b 45 10 mov 0x10(%ebp),%eax 1148bf: 85 c0 test %eax,%eax 1148c1: 0f 84 b1 00 00 00 je 114978 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 1148c7: 8b 45 0c mov 0xc(%ebp),%eax 1148ca: 85 c0 test %eax,%eax 1148cc: 75 0a jne 1148d8 1148ce: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1148d3: 8b 5d fc mov -0x4(%ebp),%ebx 1148d6: c9 leave 1148d7: c3 ret 1148d8: 53 push %ebx 1148d9: 8d 45 f8 lea -0x8(%ebp),%eax 1148dc: 50 push %eax 1148dd: ff 75 08 pushl 0x8(%ebp) 1148e0: 68 e0 78 13 00 push $0x1378e0 1148e5: e8 9a 23 00 00 call 116c84 <_Objects_Get> 1148ea: 89 c3 mov %eax,%ebx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1148ec: 83 c4 10 add $0x10,%esp 1148ef: 8b 4d f8 mov -0x8(%ebp),%ecx 1148f2: 85 c9 test %ecx,%ecx 1148f4: 75 5a jne 114950 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1148f6: 83 ec 0c sub $0xc,%esp 1148f9: 8d 40 10 lea 0x10(%eax),%eax 1148fc: 50 push %eax 1148fd: e8 be 3f 00 00 call 1188c0 <_Watchdog_Remove> _ISR_Disable( level ); 114902: 9c pushf 114903: fa cli 114904: 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 ) { 114905: 83 c4 10 add $0x10,%esp 114908: 8b 53 18 mov 0x18(%ebx),%edx 11490b: 85 d2 test %edx,%edx 11490d: 75 4d jne 11495c <== NEVER TAKEN /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 11490f: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 114916: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 11491d: 8b 55 10 mov 0x10(%ebp),%edx 114920: 89 53 2c mov %edx,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 114923: 8b 55 08 mov 0x8(%ebp),%edx 114926: 89 53 30 mov %edx,0x30(%ebx) * the heap 114929: 8b 55 14 mov 0x14(%ebp),%edx 11492c: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 11492f: 8b 55 0c mov 0xc(%ebp),%edx 114932: 89 53 1c mov %edx,0x1c(%ebx) _ISR_Enable( level ); 114935: 50 push %eax 114936: 9d popf /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 114937: 83 ec 0c sub $0xc,%esp 11493a: 53 push %ebx 11493b: ff 15 20 79 13 00 call *0x137920 _Thread_Enable_dispatch(); 114941: e8 82 2b 00 00 call 1174c8 <_Thread_Enable_dispatch> 114946: 31 c0 xor %eax,%eax 114948: 83 c4 10 add $0x10,%esp 11494b: eb 86 jmp 1148d3 11494d: 8d 76 00 lea 0x0(%esi),%esi if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 114950: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114955: 8b 5d fc mov -0x4(%ebp),%ebx 114958: c9 leave 114959: c3 ret 11495a: 66 90 xchg %ax,%ax * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 11495c: 50 push %eax <== NOT EXECUTED 11495d: 9d popf <== NOT EXECUTED _Thread_Enable_dispatch(); 11495e: e8 65 2b 00 00 call 1174c8 <_Thread_Enable_dispatch><== NOT EXECUTED 114963: 31 c0 xor %eax,%eax <== NOT EXECUTED 114965: e9 69 ff ff ff jmp 1148d3 <== NOT EXECUTED 11496a: 66 90 xchg %ax,%ax <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 11496c: b8 0e 00 00 00 mov $0xe,%eax 114971: e9 5d ff ff ff jmp 1148d3 114976: 66 90 xchg %ax,%ax return RTEMS_INCORRECT_STATE; if ( !routine ) 114978: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 11497d: e9 51 ff ff ff jmp 1148d3 <== NOT EXECUTED =============================================================================== 00114984 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 114984: 55 push %ebp 114985: 89 e5 mov %esp,%ebp 114987: 56 push %esi 114988: 53 push %ebx 114989: 83 ec 10 sub $0x10,%esp Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 11498c: 8b 1d 24 79 13 00 mov 0x137924,%ebx 114992: 85 db test %ebx,%ebx 114994: 0f 84 d2 00 00 00 je 114a6c return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 11499a: 80 3d cc 6e 13 00 00 cmpb $0x0,0x136ecc 1149a1: 0f 84 ad 00 00 00 je 114a54 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 1149a7: 8b 4d 10 mov 0x10(%ebp),%ecx 1149aa: 85 c9 test %ecx,%ecx 1149ac: 0f 84 ae 00 00 00 je 114a60 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1149b2: 83 ec 0c sub $0xc,%esp 1149b5: ff 75 0c pushl 0xc(%ebp) 1149b8: e8 c7 d3 ff ff call 111d84 <_TOD_Validate> 1149bd: 83 c4 10 add $0x10,%esp 1149c0: 84 c0 test %al,%al 1149c2: 75 0c jne 1149d0 */ (*_Timer_Server_schedule_operation)( the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1149c4: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1149c9: 8d 65 f8 lea -0x8(%ebp),%esp 1149cc: 5b pop %ebx 1149cd: 5e pop %esi 1149ce: c9 leave 1149cf: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1149d0: 83 ec 0c sub $0xc,%esp 1149d3: ff 75 0c pushl 0xc(%ebp) 1149d6: e8 19 d3 ff ff call 111cf4 <_TOD_To_seconds> 1149db: 89 c6 mov %eax,%esi if ( seconds <= _TOD_Seconds_since_epoch ) 1149dd: 83 c4 10 add $0x10,%esp 1149e0: 3b 05 4c 6f 13 00 cmp 0x136f4c,%eax 1149e6: 76 dc jbe 1149c4 /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 1149e8: 52 push %edx 1149e9: 8d 45 f4 lea -0xc(%ebp),%eax 1149ec: 50 push %eax 1149ed: ff 75 08 pushl 0x8(%ebp) 1149f0: 68 e0 78 13 00 push $0x1378e0 1149f5: e8 8a 22 00 00 call 116c84 <_Objects_Get> 1149fa: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1149fc: 83 c4 10 add $0x10,%esp 1149ff: 8b 45 f4 mov -0xc(%ebp),%eax 114a02: 85 c0 test %eax,%eax 114a04: 75 72 jne 114a78 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 114a06: 83 ec 0c sub $0xc,%esp 114a09: 8d 43 10 lea 0x10(%ebx),%eax 114a0c: 50 push %eax 114a0d: e8 ae 3e 00 00 call 1188c0 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 114a12: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 114a19: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 114a20: 8b 45 10 mov 0x10(%ebp),%eax 114a23: 89 43 2c mov %eax,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 114a26: 8b 45 08 mov 0x8(%ebp),%eax 114a29: 89 43 30 mov %eax,0x30(%ebx) * the heap 114a2c: 8b 45 14 mov 0x14(%ebp),%eax 114a2f: 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; 114a32: 2b 35 4c 6f 13 00 sub 0x136f4c,%esi 114a38: 89 73 1c mov %esi,0x1c(%ebx) /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 114a3b: 89 1c 24 mov %ebx,(%esp) 114a3e: ff 15 20 79 13 00 call *0x137920 _Thread_Enable_dispatch(); 114a44: e8 7f 2a 00 00 call 1174c8 <_Thread_Enable_dispatch> 114a49: 31 c0 xor %eax,%eax 114a4b: 83 c4 10 add $0x10,%esp 114a4e: e9 76 ff ff ff jmp 1149c9 114a53: 90 nop rtems_interval seconds; if ( !_Timer_Server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 114a54: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114a59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 114a5c: 5b pop %ebx <== NOT EXECUTED 114a5d: 5e pop %esi <== NOT EXECUTED 114a5e: c9 leave <== NOT EXECUTED 114a5f: c3 ret <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 114a60: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 114a65: e9 5f ff ff ff jmp 1149c9 <== NOT EXECUTED 114a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 114a6c: b8 0e 00 00 00 mov $0xe,%eax 114a71: e9 53 ff ff ff jmp 1149c9 114a76: 66 90 xchg %ax,%ax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 114a78: b8 04 00 00 00 mov $0x4,%eax 114a7d: e9 47 ff ff ff jmp 1149c9 =============================================================================== 0010b0e0 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 10b0e0: 55 push %ebp 10b0e1: 89 e5 mov %esp,%ebp 10b0e3: 53 push %ebx 10b0e4: 83 ec 04 sub $0x4,%esp 10b0e7: 8b 45 08 mov 0x8(%ebp),%eax 10b0ea: 8b 5d 0c mov 0xc(%ebp),%ebx void *ptr; /* * check the arguments */ if ( !pointer ) 10b0ed: 85 db test %ebx,%ebx 10b0ef: 74 04 je 10b0f5 <== NEVER TAKEN return false; if ( !bytes ) 10b0f1: 85 c0 test %eax,%eax 10b0f3: 75 07 jne 10b0fc <== ALWAYS TAKEN ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) return false; *pointer = ptr; return true; 10b0f5: 31 c0 xor %eax,%eax } 10b0f7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10b0fa: c9 leave <== NOT EXECUTED 10b0fb: c3 ret <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 10b0fc: 83 ec 08 sub $0x8,%esp 10b0ff: 50 push %eax 10b100: 68 e0 3d 12 00 push $0x123de0 10b105: e8 b2 15 00 00 call 10c6bc <_Protected_heap_Allocate> if (!ptr) 10b10a: 83 c4 10 add $0x10,%esp 10b10d: 85 c0 test %eax,%eax 10b10f: 74 e4 je 10b0f5 <== NEVER TAKEN return false; *pointer = ptr; 10b111: 89 03 mov %eax,(%ebx) 10b113: b0 01 mov $0x1,%al return true; } 10b115: 8b 5d fc mov -0x4(%ebp),%ebx 10b118: c9 leave 10b119: c3 ret =============================================================================== 0010b0c8 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 10b0c8: 55 push %ebp <== NOT EXECUTED 10b0c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b0cb: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 10b0ce: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10b0d1: 68 e0 3d 12 00 push $0x123de0 <== NOT EXECUTED 10b0d6: e8 15 16 00 00 call 10c6f0 <_Protected_heap_Free> <== NOT EXECUTED } 10b0db: c9 leave <== NOT EXECUTED 10b0dc: c3 ret <== NOT EXECUTED =============================================================================== 0010b11c : #include /* for memset */ bool rtems_workspace_get_information( Heap_Information_block *the_info ) { 10b11c: 55 push %ebp 10b11d: 89 e5 mov %esp,%ebp 10b11f: 83 ec 08 sub $0x8,%esp 10b122: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_info ) 10b125: 85 c0 test %eax,%eax 10b127: 74 11 je 10b13a <== NEVER TAKEN return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 10b129: 83 ec 08 sub $0x8,%esp 10b12c: 50 push %eax 10b12d: 68 e0 3d 12 00 push $0x123de0 10b132: e8 ed 15 00 00 call 10c724 <_Protected_heap_Get_information> 10b137: 83 c4 10 add $0x10,%esp } 10b13a: c9 leave 10b13b: c3 ret =============================================================================== 0010b4c4 : #include int sched_get_priority_max( int policy ) { 10b4c4: 55 push %ebp 10b4c5: 89 e5 mov %esp,%ebp 10b4c7: 83 ec 08 sub $0x8,%esp switch ( policy ) { 10b4ca: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10b4ce: 76 14 jbe 10b4e4 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10b4d0: e8 97 71 00 00 call 11266c <__errno> 10b4d5: c7 00 16 00 00 00 movl $0x16,(%eax) 10b4db: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10b4e0: c9 leave 10b4e1: c3 ret 10b4e2: 66 90 xchg %ax,%ax int sched_get_priority_max( int policy ) { switch ( policy ) { 10b4e4: b8 fe 00 00 00 mov $0xfe,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10b4e9: c9 leave 10b4ea: c3 ret =============================================================================== 0010b4ec : #include int sched_get_priority_min( int policy ) { 10b4ec: 55 push %ebp 10b4ed: 89 e5 mov %esp,%ebp 10b4ef: 83 ec 08 sub $0x8,%esp switch ( policy ) { 10b4f2: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10b4f6: 76 14 jbe 10b50c case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10b4f8: e8 6f 71 00 00 call 11266c <__errno> 10b4fd: c7 00 16 00 00 00 movl $0x16,(%eax) 10b503: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10b508: c9 leave 10b509: c3 ret 10b50a: 66 90 xchg %ax,%ax int sched_get_priority_min( int policy ) { switch ( policy ) { 10b50c: b8 01 00 00 00 mov $0x1,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10b511: c9 leave 10b512: c3 ret =============================================================================== 0010b514 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10b514: 55 push %ebp 10b515: 89 e5 mov %esp,%ebp 10b517: 56 push %esi 10b518: 53 push %ebx 10b519: 8b 5d 08 mov 0x8(%ebp),%ebx 10b51c: 8b 75 0c mov 0xc(%ebp),%esi /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10b51f: 85 db test %ebx,%ebx 10b521: 75 21 jne 10b544 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10b523: 85 f6 test %esi,%esi 10b525: 74 38 je 10b55f rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10b527: 83 ec 08 sub $0x8,%esp 10b52a: 56 push %esi 10b52b: ff 35 c4 26 12 00 pushl 0x1226c4 10b531: e8 7a 37 00 00 call 10ecb0 <_Timespec_From_ticks> 10b536: 31 c0 xor %eax,%eax 10b538: 83 c4 10 add $0x10,%esp return 0; } 10b53b: 8d 65 f8 lea -0x8(%ebp),%esp 10b53e: 5b pop %ebx 10b53f: 5e pop %esi 10b540: c9 leave 10b541: c3 ret 10b542: 66 90 xchg %ax,%ax { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10b544: e8 e3 ca ff ff call 10802c 10b549: 39 d8 cmp %ebx,%eax 10b54b: 74 d6 je 10b523 rtems_set_errno_and_return_minus_one( ESRCH ); 10b54d: e8 1a 71 00 00 call 11266c <__errno> 10b552: c7 00 03 00 00 00 movl $0x3,(%eax) 10b558: b8 ff ff ff ff mov $0xffffffff,%eax 10b55d: eb dc jmp 10b53b if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b55f: e8 08 71 00 00 call 11266c <__errno> 10b564: c7 00 16 00 00 00 movl $0x16,(%eax) 10b56a: b8 ff ff ff ff mov $0xffffffff,%eax 10b56f: eb ca jmp 10b53b =============================================================================== 0010c844 : */ int sem_close( sem_t *sem ) { 10c844: 55 push %ebp 10c845: 89 e5 mov %esp,%ebp 10c847: 83 ec 1c sub $0x1c,%esp * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, 10c84a: 8d 45 fc lea -0x4(%ebp),%eax 10c84d: 50 push %eax 10c84e: 8b 45 08 mov 0x8(%ebp),%eax 10c851: ff 30 pushl (%eax) 10c853: 68 60 5d 12 00 push $0x125d60 10c858: e8 07 23 00 00 call 10eb64 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10c85d: 83 c4 10 add $0x10,%esp 10c860: 8b 55 fc mov -0x4(%ebp),%edx 10c863: 85 d2 test %edx,%edx 10c865: 74 15 je 10c87c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c867: e8 a8 7c 00 00 call 114514 <__errno> 10c86c: c7 00 16 00 00 00 movl $0x16,(%eax) 10c872: b8 ff ff ff ff mov $0xffffffff,%eax } 10c877: c9 leave 10c878: c3 ret 10c879: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 10c87c: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10c87f: 83 ec 0c sub $0xc,%esp 10c882: 50 push %eax 10c883: e8 c0 5f 00 00 call 112848 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10c888: e8 1b 2b 00 00 call 10f3a8 <_Thread_Enable_dispatch> 10c88d: 31 c0 xor %eax,%eax 10c88f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c892: c9 leave 10c893: c3 ret =============================================================================== 0010c894 : */ int sem_destroy( sem_t *sem ) { 10c894: 55 push %ebp 10c895: 89 e5 mov %esp,%ebp 10c897: 83 ec 1c sub $0x1c,%esp 10c89a: 8d 45 fc lea -0x4(%ebp),%eax 10c89d: 50 push %eax 10c89e: 8b 45 08 mov 0x8(%ebp),%eax 10c8a1: ff 30 pushl (%eax) 10c8a3: 68 60 5d 12 00 push $0x125d60 10c8a8: e8 b7 22 00 00 call 10eb64 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10c8ad: 83 c4 10 add $0x10,%esp 10c8b0: 8b 55 fc mov -0x4(%ebp),%edx 10c8b3: 85 d2 test %edx,%edx 10c8b5: 74 15 je 10c8cc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c8b7: e8 58 7c 00 00 call 114514 <__errno> 10c8bc: c7 00 16 00 00 00 movl $0x16,(%eax) 10c8c2: b8 ff ff ff ff mov $0xffffffff,%eax } 10c8c7: c9 leave 10c8c8: c3 ret 10c8c9: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 10c8cc: 80 78 14 00 cmpb $0x0,0x14(%eax) 10c8d0: 75 16 jne 10c8e8 <== NEVER TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10c8d2: 83 ec 0c sub $0xc,%esp 10c8d5: 50 push %eax 10c8d6: e8 6d 5f 00 00 call 112848 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10c8db: e8 c8 2a 00 00 call 10f3a8 <_Thread_Enable_dispatch> 10c8e0: 31 c0 xor %eax,%eax 10c8e2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c8e5: c9 leave 10c8e6: c3 ret 10c8e7: 90 nop /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 10c8e8: e8 bb 2a 00 00 call 10f3a8 <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 10c8ed: e8 22 7c 00 00 call 114514 <__errno> <== NOT EXECUTED 10c8f2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10c8f8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c8fd: c9 leave <== NOT EXECUTED 10c8fe: c3 ret <== NOT EXECUTED =============================================================================== 0010c900 : int sem_getvalue( sem_t *sem, int *sval ) { 10c900: 55 push %ebp 10c901: 89 e5 mov %esp,%ebp 10c903: 83 ec 1c sub $0x1c,%esp 10c906: 8d 45 fc lea -0x4(%ebp),%eax 10c909: 50 push %eax 10c90a: 8b 45 08 mov 0x8(%ebp),%eax 10c90d: ff 30 pushl (%eax) 10c90f: 68 60 5d 12 00 push $0x125d60 10c914: e8 4b 22 00 00 call 10eb64 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10c919: 83 c4 10 add $0x10,%esp 10c91c: 8b 55 fc mov -0x4(%ebp),%edx 10c91f: 85 d2 test %edx,%edx 10c921: 74 15 je 10c938 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c923: e8 ec 7b 00 00 call 114514 <__errno> 10c928: c7 00 16 00 00 00 movl $0x16,(%eax) 10c92e: b8 ff ff ff ff mov $0xffffffff,%eax } 10c933: c9 leave 10c934: c3 ret 10c935: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 10c938: 8b 40 64 mov 0x64(%eax),%eax 10c93b: 8b 55 0c mov 0xc(%ebp),%edx 10c93e: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10c940: e8 63 2a 00 00 call 10f3a8 <_Thread_Enable_dispatch> 10c945: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c947: c9 leave 10c948: c3 ret =============================================================================== 0010c94c : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 10c94c: 55 push %ebp 10c94d: 89 e5 mov %esp,%ebp 10c94f: 53 push %ebx 10c950: 83 ec 14 sub $0x14,%esp 10c953: 8b 5d 08 mov 0x8(%ebp),%ebx int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 10c956: 85 db test %ebx,%ebx 10c958: 74 2a je 10c984 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 10c95a: 8d 45 f8 lea -0x8(%ebp),%eax 10c95d: 50 push %eax 10c95e: ff 75 10 pushl 0x10(%ebp) 10c961: ff 75 0c pushl 0xc(%ebp) 10c964: 6a 00 push $0x0 10c966: e8 c5 5d 00 00 call 112730 <_POSIX_Semaphore_Create_support> 10c96b: 89 c2 mov %eax,%edx pshared, value, &the_semaphore ); if ( status != -1 ) 10c96d: 83 c4 10 add $0x10,%esp 10c970: 83 f8 ff cmp $0xffffffff,%eax 10c973: 74 08 je 10c97d *sem = the_semaphore->Object.id; 10c975: 8b 45 f8 mov -0x8(%ebp),%eax 10c978: 8b 40 08 mov 0x8(%eax),%eax 10c97b: 89 03 mov %eax,(%ebx) return status; } 10c97d: 89 d0 mov %edx,%eax 10c97f: 8b 5d fc mov -0x4(%ebp),%ebx 10c982: c9 leave 10c983: c3 ret { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c984: e8 8b 7b 00 00 call 114514 <__errno> <== NOT EXECUTED 10c989: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10c98f: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 10c994: eb e7 jmp 10c97d <== NOT EXECUTED =============================================================================== 0010c998 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10c998: 55 push %ebp 10c999: 89 e5 mov %esp,%ebp 10c99b: 57 push %edi 10c99c: 56 push %esi 10c99d: 53 push %ebx 10c99e: 83 ec 1c sub $0x1c,%esp 10c9a1: 8b 75 0c mov 0xc(%ebp),%esi /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10c9a4: a1 18 5a 12 00 mov 0x125a18,%eax 10c9a9: 40 inc %eax 10c9aa: a3 18 5a 12 00 mov %eax,0x125a18 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10c9af: 89 f7 mov %esi,%edi 10c9b1: 81 e7 00 02 00 00 and $0x200,%edi 10c9b7: 0f 85 8b 00 00 00 jne 10ca48 10c9bd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10c9c4: 83 ec 08 sub $0x8,%esp 10c9c7: 8d 45 f0 lea -0x10(%ebp),%eax 10c9ca: 50 push %eax 10c9cb: ff 75 08 pushl 0x8(%ebp) 10c9ce: e8 c5 5e 00 00 call 112898 <_POSIX_Semaphore_Name_to_id> 10c9d3: 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 ) { 10c9d5: 83 c4 10 add $0x10,%esp 10c9d8: 85 c0 test %eax,%eax 10c9da: 74 28 je 10ca04 /* * 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) ) ) { 10c9dc: 83 f8 02 cmp $0x2,%eax 10c9df: 75 08 jne 10c9e9 <== NEVER TAKEN 10c9e1: 85 ff test %edi,%edi 10c9e3: 0f 85 8b 00 00 00 jne 10ca74 _Thread_Enable_dispatch(); 10c9e9: e8 ba 29 00 00 call 10f3a8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10c9ee: e8 21 7b 00 00 call 114514 <__errno> 10c9f3: 89 18 mov %ebx,(%eax) 10c9f5: b8 ff ff ff ff mov $0xffffffff,%eax if ( status == -1 ) return SEM_FAILED; id = &the_semaphore->Object.id; return (sem_t *)id; } 10c9fa: 8d 65 f4 lea -0xc(%ebp),%esp 10c9fd: 5b pop %ebx 10c9fe: 5e pop %esi 10c9ff: 5f pop %edi 10ca00: c9 leave 10ca01: c3 ret 10ca02: 66 90 xchg %ax,%ax /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10ca04: 81 e6 00 0a 00 00 and $0xa00,%esi 10ca0a: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10ca10: 74 42 je 10ca54 * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, 10ca12: 50 push %eax 10ca13: 8d 45 e8 lea -0x18(%ebp),%eax 10ca16: 50 push %eax 10ca17: ff 75 f0 pushl -0x10(%ebp) 10ca1a: 68 60 5d 12 00 push $0x125d60 10ca1f: e8 40 21 00 00 call 10eb64 <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10ca24: 89 45 ec mov %eax,-0x14(%ebp) the_semaphore->open_count += 1; 10ca27: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10ca2a: e8 79 29 00 00 call 10f3a8 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10ca2f: e8 74 29 00 00 call 10f3a8 <_Thread_Enable_dispatch> id = &the_semaphore->Object.id; return (sem_t *)id; 10ca34: 8b 45 ec mov -0x14(%ebp),%eax 10ca37: 83 c0 08 add $0x8,%eax 10ca3a: 83 c4 10 add $0x10,%esp if ( status == -1 ) return SEM_FAILED; id = &the_semaphore->Object.id; return (sem_t *)id; } 10ca3d: 8d 65 f4 lea -0xc(%ebp),%esp 10ca40: 5b pop %ebx 10ca41: 5e pop %esi 10ca42: 5f pop %edi 10ca43: c9 leave 10ca44: c3 ret 10ca45: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10ca48: 8b 45 14 mov 0x14(%ebp),%eax 10ca4b: 89 45 e0 mov %eax,-0x20(%ebp) 10ca4e: e9 71 ff ff ff jmp 10c9c4 10ca53: 90 nop /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10ca54: e8 4f 29 00 00 call 10f3a8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10ca59: e8 b6 7a 00 00 call 114514 <__errno> 10ca5e: c7 00 11 00 00 00 movl $0x11,(%eax) 10ca64: b8 ff ff ff ff mov $0xffffffff,%eax if ( status == -1 ) return SEM_FAILED; id = &the_semaphore->Object.id; return (sem_t *)id; } 10ca69: 8d 65 f4 lea -0xc(%ebp),%esp 10ca6c: 5b pop %ebx 10ca6d: 5e pop %esi 10ca6e: 5f pop %edi 10ca6f: c9 leave 10ca70: c3 ret 10ca71: 8d 76 00 lea 0x0(%esi),%esi /* * 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( 10ca74: 8d 45 ec lea -0x14(%ebp),%eax 10ca77: 50 push %eax 10ca78: ff 75 e0 pushl -0x20(%ebp) 10ca7b: 6a 00 push $0x0 10ca7d: ff 75 08 pushl 0x8(%ebp) 10ca80: e8 ab 5c 00 00 call 112730 <_POSIX_Semaphore_Create_support> 10ca85: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10ca87: e8 1c 29 00 00 call 10f3a8 <_Thread_Enable_dispatch> if ( status == -1 ) 10ca8c: 83 c4 10 add $0x10,%esp 10ca8f: 43 inc %ebx 10ca90: 74 0a je 10ca9c <== NEVER TAKEN return SEM_FAILED; id = &the_semaphore->Object.id; return (sem_t *)id; 10ca92: 8b 45 ec mov -0x14(%ebp),%eax 10ca95: 83 c0 08 add $0x8,%eax 10ca98: eb a3 jmp 10ca3d 10ca9a: 66 90 xchg %ax,%ax * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) 10ca9c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10caa1: eb 9a jmp 10ca3d <== NOT EXECUTED =============================================================================== 0010caa4 : */ int sem_post( sem_t *sem ) { 10caa4: 55 push %ebp 10caa5: 89 e5 mov %esp,%ebp 10caa7: 83 ec 1c sub $0x1c,%esp 10caaa: 8d 45 fc lea -0x4(%ebp),%eax 10caad: 50 push %eax 10caae: 8b 45 08 mov 0x8(%ebp),%eax 10cab1: ff 30 pushl (%eax) 10cab3: 68 60 5d 12 00 push $0x125d60 10cab8: e8 a7 20 00 00 call 10eb64 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cabd: 83 c4 10 add $0x10,%esp 10cac0: 8b 4d fc mov -0x4(%ebp),%ecx 10cac3: 85 c9 test %ecx,%ecx 10cac5: 74 15 je 10cadc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cac7: e8 48 7a 00 00 call 114514 <__errno> 10cacc: c7 00 16 00 00 00 movl $0x16,(%eax) 10cad2: b8 ff ff ff ff mov $0xffffffff,%eax } 10cad7: c9 leave 10cad8: c3 ret 10cad9: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10cadc: 52 push %edx 10cadd: 6a 00 push $0x0 10cadf: ff 70 08 pushl 0x8(%eax) 10cae2: 83 c0 1c add $0x1c,%eax 10cae5: 50 push %eax 10cae6: e8 cd 17 00 00 call 10e2b8 <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10caeb: e8 b8 28 00 00 call 10f3a8 <_Thread_Enable_dispatch> 10caf0: 31 c0 xor %eax,%eax 10caf2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10caf5: c9 leave 10caf6: c3 ret =============================================================================== 0010caf8 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10caf8: 55 push %ebp 10caf9: 89 e5 mov %esp,%ebp 10cafb: 53 push %ebx 10cafc: 83 ec 1c sub $0x1c,%esp 10caff: 8b 5d 08 mov 0x8(%ebp),%ebx * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10cb02: 8d 45 f8 lea -0x8(%ebp),%eax 10cb05: 50 push %eax 10cb06: ff 75 0c pushl 0xc(%ebp) 10cb09: e8 fa 52 00 00 call 111e08 <_POSIX_Absolute_timeout_to_ticks> switch ( status ) { 10cb0e: 83 c4 10 add $0x10,%esp 10cb11: 83 f8 02 cmp $0x2,%eax 10cb14: 76 16 jbe 10cb2c <== NEVER TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10cb16: 52 push %edx 10cb17: ff 75 f8 pushl -0x8(%ebp) 10cb1a: 6a 01 push $0x1 10cb1c: 53 push %ebx 10cb1d: e8 da 5d 00 00 call 1128fc <_POSIX_Semaphore_Wait_support> 10cb22: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10cb25: 8b 5d fc mov -0x4(%ebp),%ebx 10cb28: c9 leave 10cb29: c3 ret 10cb2a: 66 90 xchg %ax,%ax case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10cb2c: 50 push %eax <== NOT EXECUTED 10cb2d: ff 75 f8 pushl -0x8(%ebp) <== NOT EXECUTED 10cb30: 6a 00 push $0x0 <== NOT EXECUTED 10cb32: 53 push %ebx <== NOT EXECUTED 10cb33: e8 c4 5d 00 00 call 1128fc <_POSIX_Semaphore_Wait_support><== NOT EXECUTED 10cb38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } return lock_status; } 10cb3b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10cb3e: c9 leave <== NOT EXECUTED 10cb3f: c3 ret <== NOT EXECUTED =============================================================================== 0010cb54 : */ int sem_unlink( const char *name ) { 10cb54: 55 push %ebp 10cb55: 89 e5 mov %esp,%ebp 10cb57: 53 push %ebx 10cb58: 83 ec 1c sub $0x1c,%esp /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10cb5b: a1 18 5a 12 00 mov 0x125a18,%eax 10cb60: 40 inc %eax 10cb61: a3 18 5a 12 00 mov %eax,0x125a18 register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10cb66: 8d 45 f8 lea -0x8(%ebp),%eax 10cb69: 50 push %eax 10cb6a: ff 75 08 pushl 0x8(%ebp) 10cb6d: e8 26 5d 00 00 call 112898 <_POSIX_Semaphore_Name_to_id> 10cb72: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10cb74: 83 c4 10 add $0x10,%esp 10cb77: 85 c0 test %eax,%eax 10cb79: 75 45 jne 10cbc0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 10cb7b: 8b 45 f8 mov -0x8(%ebp),%eax bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 10cb7e: 66 3b 05 70 5d 12 00 cmp 0x125d70,%ax 10cb85: 77 35 ja 10cbbc <== NEVER TAKEN 10cb87: 0f b7 d0 movzwl %ax,%edx 10cb8a: a1 7c 5d 12 00 mov 0x125d7c,%eax 10cb8f: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = FALSE; 10cb92: c6 43 15 00 movb $0x0,0x15(%ebx) static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) 10cb96: 83 ec 08 sub $0x8,%esp 10cb99: 53 push %ebx 10cb9a: 68 60 5d 12 00 push $0x125d60 10cb9f: e8 e4 20 00 00 call 10ec88 <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 10cba4: 89 1c 24 mov %ebx,(%esp) 10cba7: e8 9c 5c 00 00 call 112848 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10cbac: e8 f7 27 00 00 call 10f3a8 <_Thread_Enable_dispatch> 10cbb1: 31 c0 xor %eax,%eax 10cbb3: 83 c4 10 add $0x10,%esp return 0; } 10cbb6: 8b 5d fc mov -0x4(%ebp),%ebx 10cbb9: c9 leave 10cbba: c3 ret 10cbbb: 90 nop bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 10cbbc: 31 db xor %ebx,%ebx 10cbbe: eb d2 jmp 10cb92 <== NOT EXECUTED _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); 10cbc0: e8 e3 27 00 00 call 10f3a8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10cbc5: e8 4a 79 00 00 call 114514 <__errno> 10cbca: 89 18 mov %ebx,(%eax) 10cbcc: b8 ff ff ff ff mov $0xffffffff,%eax 10cbd1: eb e3 jmp 10cbb6 =============================================================================== 0010a9cc : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10a9cc: 55 push %ebp 10a9cd: 89 e5 mov %esp,%ebp 10a9cf: 57 push %edi 10a9d0: 56 push %esi 10a9d1: 53 push %ebx 10a9d2: 83 ec 0c sub $0xc,%esp 10a9d5: 8b 5d 08 mov 0x8(%ebp),%ebx 10a9d8: 8b 7d 10 mov 0x10(%ebp),%edi ISR_Level level; if ( oact ) 10a9db: 85 ff test %edi,%edi 10a9dd: 74 11 je 10a9f0 *oact = _POSIX_signals_Vectors[ sig ]; 10a9df: 8d 04 5b lea (%ebx,%ebx,2),%eax 10a9e2: 8d 34 85 40 1d 12 00 lea 0x121d40(,%eax,4),%esi 10a9e9: b9 03 00 00 00 mov $0x3,%ecx 10a9ee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10a9f0: 85 db test %ebx,%ebx 10a9f2: 74 74 je 10aa68 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10a9f4: 8d 4b ff lea -0x1(%ebx),%ecx 10a9f7: 83 f9 1f cmp $0x1f,%ecx 10a9fa: 77 6c ja 10aa68 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10a9fc: 83 fb 09 cmp $0x9,%ebx 10a9ff: 74 67 je 10aa68 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10aa01: 8b 55 0c mov 0xc(%ebp),%edx 10aa04: 85 d2 test %edx,%edx 10aa06: 74 3a je 10aa42 <== NEVER TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 10aa08: 9c pushf 10aa09: fa cli 10aa0a: 8f 45 f0 popl -0x10(%ebp) if ( act->sa_handler == SIG_DFL ) { 10aa0d: 8b 45 0c mov 0xc(%ebp),%eax 10aa10: 8b 40 08 mov 0x8(%eax),%eax 10aa13: 85 c0 test %eax,%eax 10aa15: 74 35 je 10aa4c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( signo_to_mask(sig) ); 10aa17: 83 ec 0c sub $0xc,%esp 10aa1a: b8 01 00 00 00 mov $0x1,%eax 10aa1f: d3 e0 shl %cl,%eax 10aa21: 50 push %eax 10aa22: e8 d5 56 00 00 call 1100fc <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10aa27: 8d 04 5b lea (%ebx,%ebx,2),%eax 10aa2a: 8d 3c 85 40 1d 12 00 lea 0x121d40(,%eax,4),%edi 10aa31: b9 03 00 00 00 mov $0x3,%ecx 10aa36: 8b 75 0c mov 0xc(%ebp),%esi 10aa39: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10aa3b: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10aa3e: ff 75 f0 pushl -0x10(%ebp) 10aa41: 9d popf 10aa42: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10aa44: 8d 65 f4 lea -0xc(%ebp),%esp 10aa47: 5b pop %ebx 10aa48: 5e pop %esi 10aa49: 5f pop %edi 10aa4a: c9 leave 10aa4b: c3 ret * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10aa4c: 8d 04 5b lea (%ebx,%ebx,2),%eax 10aa4f: c1 e0 02 shl $0x2,%eax 10aa52: 8d b8 40 1d 12 00 lea 0x121d40(%eax),%edi 10aa58: 8d b0 40 c0 11 00 lea 0x11c040(%eax),%esi 10aa5e: b9 03 00 00 00 mov $0x3,%ecx 10aa63: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10aa65: eb d7 jmp 10aa3e 10aa67: 90 nop * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 10aa68: e8 eb 72 00 00 call 111d58 <__errno> 10aa6d: c7 00 16 00 00 00 movl $0x16,(%eax) 10aa73: b8 ff ff ff ff mov $0xffffffff,%eax 10aa78: eb ca jmp 10aa44 =============================================================================== 0010aa7c : int sigaddset( sigset_t *set, int signo ) { 10aa7c: 55 push %ebp 10aa7d: 89 e5 mov %esp,%ebp 10aa7f: 83 ec 08 sub $0x8,%esp 10aa82: 8b 55 08 mov 0x8(%ebp),%edx 10aa85: 8b 45 0c mov 0xc(%ebp),%eax if ( !set ) 10aa88: 85 d2 test %edx,%edx 10aa8a: 74 1c je 10aaa8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10aa8c: 85 c0 test %eax,%eax 10aa8e: 74 18 je 10aaa8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10aa90: 8d 48 ff lea -0x1(%eax),%ecx 10aa93: 83 f9 1f cmp $0x1f,%ecx 10aa96: 77 10 ja 10aaa8 rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 10aa98: b8 01 00 00 00 mov $0x1,%eax 10aa9d: d3 e0 shl %cl,%eax 10aa9f: 09 02 or %eax,(%edx) 10aaa1: 31 c0 xor %eax,%eax return 0; } 10aaa3: c9 leave 10aaa4: c3 ret 10aaa5: 8d 76 00 lea 0x0(%esi),%esi if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10aaa8: e8 ab 72 00 00 call 111d58 <__errno> 10aaad: c7 00 16 00 00 00 movl $0x16,(%eax) 10aab3: b8 ff ff ff ff mov $0xffffffff,%eax *set |= signo_to_mask(signo); return 0; } 10aab8: c9 leave 10aab9: c3 ret =============================================================================== 0010c784 : int sigdelset( sigset_t *set, int signo ) { 10c784: 55 push %ebp 10c785: 89 e5 mov %esp,%ebp 10c787: 83 ec 08 sub $0x8,%esp 10c78a: 8b 55 08 mov 0x8(%ebp),%edx 10c78d: 8b 45 0c mov 0xc(%ebp),%eax if ( !set ) 10c790: 85 d2 test %edx,%edx 10c792: 74 1c je 10c7b0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10c794: 85 c0 test %eax,%eax 10c796: 74 13 je 10c7ab return 0; if ( !is_valid_signo(signo) ) 10c798: 8d 48 ff lea -0x1(%eax),%ecx 10c79b: 83 f9 1f cmp $0x1f,%ecx 10c79e: 77 10 ja 10c7b0 rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); 10c7a0: b8 fe ff ff ff mov $0xfffffffe,%eax 10c7a5: d3 c0 rol %cl,%eax 10c7a7: 21 02 and %eax,(%edx) 10c7a9: 31 c0 xor %eax,%eax return 0; } 10c7ab: c9 leave 10c7ac: c3 ret 10c7ad: 8d 76 00 lea 0x0(%esi),%esi if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c7b0: e8 83 78 00 00 call 114038 <__errno> 10c7b5: c7 00 16 00 00 00 movl $0x16,(%eax) 10c7bb: b8 ff ff ff ff mov $0xffffffff,%eax *set &= ~signo_to_mask(signo); return 0; } 10c7c0: c9 leave 10c7c1: c3 ret =============================================================================== 0010c81c : int sigismember( const sigset_t *set, int signo ) { 10c81c: 55 push %ebp 10c81d: 89 e5 mov %esp,%ebp 10c81f: 83 ec 08 sub $0x8,%esp 10c822: 8b 55 08 mov 0x8(%ebp),%edx 10c825: 8b 45 0c mov 0xc(%ebp),%eax if ( !set ) 10c828: 85 d2 test %edx,%edx 10c82a: 74 20 je 10c84c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10c82c: 85 c0 test %eax,%eax 10c82e: 74 17 je 10c847 return 0; if ( !is_valid_signo(signo) ) 10c830: 8d 48 ff lea -0x1(%eax),%ecx 10c833: 83 f9 1f cmp $0x1f,%ecx 10c836: 77 14 ja 10c84c rtems_set_errno_and_return_minus_one( EINVAL ); 10c838: b8 01 00 00 00 mov $0x1,%eax 10c83d: d3 e0 shl %cl,%eax 10c83f: 85 02 test %eax,(%edx) 10c841: 0f 95 c0 setne %al 10c844: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10c847: c9 leave 10c848: c3 ret 10c849: 8d 76 00 lea 0x0(%esi),%esi if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c84c: e8 e7 77 00 00 call 114038 <__errno> 10c851: c7 00 16 00 00 00 movl $0x16,(%eax) 10c857: b8 ff ff ff ff mov $0xffffffff,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10c85c: c9 leave 10c85d: c3 ret =============================================================================== 0010c8c0 : #include int sigsuspend( const sigset_t *sigmask ) { 10c8c0: 55 push %ebp 10c8c1: 89 e5 mov %esp,%ebp 10c8c3: 56 push %esi 10c8c4: 53 push %ebx 10c8c5: 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 ); 10c8c8: 8d 5d f4 lea -0xc(%ebp),%ebx 10c8cb: 53 push %ebx 10c8cc: ff 75 08 pushl 0x8(%ebp) 10c8cf: 6a 01 push $0x1 10c8d1: e8 c6 ff ff ff call 10c89c (void) sigfillset( &all_signals ); 10c8d6: 8d 75 f0 lea -0x10(%ebp),%esi 10c8d9: 89 34 24 mov %esi,(%esp) 10c8dc: e8 0f ff ff ff call 10c7f0 status = sigtimedwait( &all_signals, NULL, NULL ); 10c8e1: 83 c4 0c add $0xc,%esp 10c8e4: 6a 00 push $0x0 10c8e6: 6a 00 push $0x0 10c8e8: 56 push %esi 10c8e9: e8 7e 00 00 00 call 10c96c 10c8ee: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10c8f0: 83 c4 0c add $0xc,%esp 10c8f3: 6a 00 push $0x0 10c8f5: 53 push %ebx 10c8f6: 6a 00 push $0x0 10c8f8: e8 9f ff ff ff call 10c89c /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10c8fd: 83 c4 10 add $0x10,%esp 10c900: 46 inc %esi 10c901: 75 0d jne 10c910 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 10c903: b8 ff ff ff ff mov $0xffffffff,%eax 10c908: 8d 65 f8 lea -0x8(%ebp),%esp 10c90b: 5b pop %ebx 10c90c: 5e pop %esi 10c90d: c9 leave 10c90e: c3 ret 10c90f: 90 nop /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 10c910: e8 23 77 00 00 call 114038 <__errno> 10c915: c7 00 04 00 00 00 movl $0x4,(%eax) 10c91b: eb e6 jmp 10c903 =============================================================================== 0010ae04 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10ae04: 55 push %ebp 10ae05: 89 e5 mov %esp,%ebp 10ae07: 57 push %edi 10ae08: 56 push %esi 10ae09: 53 push %ebx 10ae0a: 83 ec 1c sub $0x1c,%esp 10ae0d: 8b 75 0c mov 0xc(%ebp),%esi 10ae10: 8b 5d 10 mov 0x10(%ebp),%ebx * NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10ae13: 85 db test %ebx,%ebx 10ae15: 0f 84 1d 01 00 00 je 10af38 if ( !_Timespec_Is_valid( timeout ) ) 10ae1b: 83 ec 0c sub $0xc,%esp 10ae1e: 53 push %ebx 10ae1f: e8 60 36 00 00 call 10e484 <_Timespec_Is_valid> 10ae24: 83 c4 10 add $0x10,%esp 10ae27: 84 c0 test %al,%al 10ae29: 0f 84 55 01 00 00 je 10af84 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10ae2f: 83 ec 0c sub $0xc,%esp 10ae32: 53 push %ebx 10ae33: e8 b0 36 00 00 call 10e4e8 <_Timespec_To_ticks> 10ae38: 89 c3 mov %eax,%ebx if ( !interval ) 10ae3a: 83 c4 10 add $0x10,%esp 10ae3d: 85 c0 test %eax,%eax 10ae3f: 0f 84 3f 01 00 00 je 10af84 <== NEVER TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10ae45: 85 f6 test %esi,%esi 10ae47: 0f 84 f5 00 00 00 je 10af42 <== NEVER TAKEN the_thread = _Thread_Executing; 10ae4d: 8b 0d 9c 2c 12 00 mov 0x122c9c,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10ae53: 8b b9 f8 00 00 00 mov 0xf8(%ecx),%edi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10ae59: 9c pushf 10ae5a: fa cli 10ae5b: 8f 45 e0 popl -0x20(%ebp) if ( *set & api->signals_pending ) { 10ae5e: 8b 45 08 mov 0x8(%ebp),%eax 10ae61: 8b 10 mov (%eax),%edx 10ae63: 8b 87 c8 00 00 00 mov 0xc8(%edi),%eax 10ae69: 85 c2 test %eax,%edx 10ae6b: 0f 85 db 00 00 00 jne 10af4c return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10ae71: a1 00 34 12 00 mov 0x123400,%eax 10ae76: 85 c2 test %eax,%edx 10ae78: 0f 85 82 00 00 00 jne 10af00 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10ae7e: c7 06 ff ff ff ff movl $0xffffffff,(%esi) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10ae84: a1 d8 2b 12 00 mov 0x122bd8,%eax 10ae89: 40 inc %eax 10ae8a: a3 d8 2b 12 00 mov %eax,0x122bd8 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10ae8f: c7 41 44 c0 33 12 00 movl $0x1233c0,0x44(%ecx) the_thread->Wait.return_code = EINTR; 10ae96: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) the_thread->Wait.option = *set; 10ae9d: 8b 55 08 mov 0x8(%ebp),%edx 10aea0: 8b 02 mov (%edx),%eax 10aea2: 89 41 30 mov %eax,0x30(%ecx) the_thread->Wait.return_argument = the_info; 10aea5: 89 71 28 mov %esi,0x28(%ecx) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10aea8: c7 05 f0 33 12 00 01 movl $0x1,0x1233f0 10aeaf: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10aeb2: ff 75 e0 pushl -0x20(%ebp) 10aeb5: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10aeb6: 50 push %eax 10aeb7: 68 2c e0 10 00 push $0x10e02c 10aebc: 53 push %ebx 10aebd: 68 c0 33 12 00 push $0x1233c0 10aec2: e8 15 2e 00 00 call 10dcdc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10aec7: e8 50 29 00 00 call 10d81c <_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 ); 10aecc: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10aed3: 6a 00 push $0x0 10aed5: 56 push %esi 10aed6: ff 36 pushl (%esi) 10aed8: 57 push %edi 10aed9: e8 22 59 00 00 call 110800 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10aede: 83 c4 20 add $0x20,%esp 10aee1: e8 f6 74 00 00 call 1123dc <__errno> 10aee6: 8b 15 9c 2c 12 00 mov 0x122c9c,%edx 10aeec: 8b 52 34 mov 0x34(%edx),%edx 10aeef: 89 10 mov %edx,(%eax) return the_info->si_signo; 10aef1: 8b 1e mov (%esi),%ebx } 10aef3: 89 d8 mov %ebx,%eax 10aef5: 8d 65 f4 lea -0xc(%ebp),%esp 10aef8: 5b pop %ebx 10aef9: 5e pop %esi 10aefa: 5f pop %edi 10aefb: c9 leave 10aefc: c3 ret 10aefd: 8d 76 00 lea 0x0(%esi),%esi } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10af00: 50 push %eax 10af01: e8 b2 fe ff ff call 10adb8 <_POSIX_signals_Get_highest> 10af06: 89 c3 mov %eax,%ebx _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10af08: 83 ec 08 sub $0x8,%esp 10af0b: 6a 00 push $0x0 10af0d: 6a 01 push $0x1 10af0f: 56 push %esi 10af10: 50 push %eax 10af11: 57 push %edi 10af12: e8 e9 58 00 00 call 110800 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10af17: ff 75 e0 pushl -0x20(%ebp) 10af1a: 9d popf the_info->si_signo = signo; 10af1b: 89 1e mov %ebx,(%esi) the_info->si_code = SI_USER; 10af1d: c7 46 04 01 00 00 00 movl $0x1,0x4(%esi) the_info->si_value.sival_int = 0; 10af24: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) 10af2b: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10af2e: 89 d8 mov %ebx,%eax 10af30: 8d 65 f4 lea -0xc(%ebp),%esp 10af33: 5b pop %ebx 10af34: 5e pop %esi 10af35: 5f pop %edi 10af36: c9 leave 10af37: c3 ret rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10af38: 31 db xor %ebx,%ebx /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10af3a: 85 f6 test %esi,%esi 10af3c: 0f 85 0b ff ff ff jne 10ae4d 10af42: 8d 75 e8 lea -0x18(%ebp),%esi 10af45: e9 03 ff ff ff jmp 10ae4d 10af4a: 66 90 xchg %ax,%ax /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 10af4c: 50 push %eax 10af4d: e8 66 fe ff ff call 10adb8 <_POSIX_signals_Get_highest> 10af52: 89 06 mov %eax,(%esi) _POSIX_signals_Clear_signals( 10af54: 83 ec 08 sub $0x8,%esp 10af57: 6a 00 push $0x0 10af59: 6a 00 push $0x0 10af5b: 56 push %esi 10af5c: 50 push %eax 10af5d: 57 push %edi 10af5e: e8 9d 58 00 00 call 110800 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10af63: ff 75 e0 pushl -0x20(%ebp) 10af66: 9d popf the_info->si_code = SI_USER; 10af67: c7 46 04 01 00 00 00 movl $0x1,0x4(%esi) the_info->si_value.sival_int = 0; 10af6e: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) return the_info->si_signo; 10af75: 8b 1e mov (%esi),%ebx 10af77: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10af7a: 89 d8 mov %ebx,%eax 10af7c: 8d 65 f4 lea -0xc(%ebp),%esp 10af7f: 5b pop %ebx 10af80: 5e pop %esi 10af81: 5f pop %edi 10af82: c9 leave 10af83: c3 ret rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10af84: e8 53 74 00 00 call 1123dc <__errno> 10af89: c7 00 16 00 00 00 movl $0x16,(%eax) 10af8f: bb ff ff ff ff mov $0xffffffff,%ebx 10af94: e9 5a ff ff ff jmp 10aef3 =============================================================================== 0010cb1c : int sigwait( const sigset_t *set, int *sig ) { 10cb1c: 55 push %ebp 10cb1d: 89 e5 mov %esp,%ebp 10cb1f: 53 push %ebx 10cb20: 83 ec 08 sub $0x8,%esp 10cb23: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10cb26: 6a 00 push $0x0 10cb28: 6a 00 push $0x0 10cb2a: ff 75 08 pushl 0x8(%ebp) 10cb2d: e8 3a fe ff ff call 10c96c if ( status != -1 ) { 10cb32: 83 c4 10 add $0x10,%esp 10cb35: 83 f8 ff cmp $0xffffffff,%eax 10cb38: 74 0e je 10cb48 <== NEVER TAKEN if ( sig ) 10cb3a: 85 db test %ebx,%ebx 10cb3c: 74 02 je 10cb40 <== NEVER TAKEN *sig = status; 10cb3e: 89 03 mov %eax,(%ebx) 10cb40: 31 c0 xor %eax,%eax return 0; } return errno; } 10cb42: 8b 5d fc mov -0x4(%ebp),%ebx 10cb45: c9 leave 10cb46: c3 ret 10cb47: 90 nop if ( sig ) *sig = status; return 0; } return errno; 10cb48: e8 eb 74 00 00 call 114038 <__errno> <== NOT EXECUTED 10cb4d: 8b 00 mov (%eax),%eax <== NOT EXECUTED } 10cb4f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10cb52: c9 leave <== NOT EXECUTED 10cb53: c3 ret <== NOT EXECUTED =============================================================================== 00109ce4 : */ long sysconf( int name ) { 109ce4: 55 push %ebp 109ce5: 89 e5 mov %esp,%ebp 109ce7: 83 ec 08 sub $0x8,%esp switch (name) { 109cea: 83 7d 08 04 cmpl $0x4,0x8(%ebp) 109cee: 74 38 je 109d28 109cf0: 7e 16 jle 109d08 109cf2: 83 7d 08 08 cmpl $0x8,0x8(%ebp) 109cf6: 74 28 je 109d20 109cf8: 83 7d 08 33 cmpl $0x33,0x8(%ebp) 109cfc: 75 10 jne 109d0e 109cfe: b8 00 04 00 00 mov $0x400,%eax default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 109d03: c9 leave 109d04: c3 ret 109d05: 8d 76 00 lea 0x0(%esi),%esi long sysconf( int name ) { switch (name) { 109d08: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 109d0c: 74 22 je 109d30 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 109d0e: e8 3d 75 00 00 call 111250 <__errno> 109d13: c7 00 16 00 00 00 movl $0x16,(%eax) 109d19: b8 ff ff ff ff mov $0xffffffff,%eax } 109d1e: c9 leave 109d1f: c3 ret long sysconf( int name ) { switch (name) { 109d20: b8 00 10 00 00 mov $0x1000,%eax default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 109d25: c9 leave 109d26: c3 ret 109d27: 90 nop switch (name) { case _SC_CLK_TCK: return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick); case _SC_OPEN_MAX: { return rtems_libio_number_iops; 109d28: a1 e0 d6 11 00 mov 0x11d6e0,%eax default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 109d2d: c9 leave 109d2e: c3 ret 109d2f: 90 nop ) { switch (name) { case _SC_CLK_TCK: return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick); 109d30: b8 40 42 0f 00 mov $0xf4240,%eax 109d35: 31 d2 xor %edx,%edx 109d37: f7 35 60 1f 12 00 divl 0x121f60 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 109d3d: c9 leave 109d3e: c3 ret =============================================================================== 0010eb1c : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10eb1c: 55 push %ebp 10eb1d: 89 e5 mov %esp,%ebp 10eb1f: 57 push %edi 10eb20: 56 push %esi 10eb21: 53 push %ebx 10eb22: 83 ec 0c sub $0xc,%esp 10eb25: 8b 75 0c mov 0xc(%ebp),%esi 10eb28: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10eb2b: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10eb2f: 0f 85 db 00 00 00 jne 10ec10 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10eb35: 85 ff test %edi,%edi 10eb37: 0f 84 d3 00 00 00 je 10ec10 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10eb3d: 85 f6 test %esi,%esi 10eb3f: 74 21 je 10eb62 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10eb41: 8b 06 mov (%esi),%eax 10eb43: 48 dec %eax 10eb44: 83 f8 01 cmp $0x1,%eax 10eb47: 0f 87 c3 00 00 00 ja 10ec10 <== NEVER TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 10eb4d: 8b 46 04 mov 0x4(%esi),%eax 10eb50: 85 c0 test %eax,%eax 10eb52: 0f 84 b8 00 00 00 je 10ec10 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10eb58: 48 dec %eax 10eb59: 83 f8 1f cmp $0x1f,%eax 10eb5c: 0f 87 ae 00 00 00 ja 10ec10 <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10eb62: a1 58 7c 12 00 mov 0x127c58,%eax 10eb67: 40 inc %eax 10eb68: a3 58 7c 12 00 mov %eax,0x127c58 #ifdef __cplusplus extern "C" { #endif /** * This routine initializes @a the_heap record to manage the 10eb6d: 83 ec 0c sub $0xc,%esp 10eb70: 68 e0 7f 12 00 push $0x127fe0 10eb75: e8 c6 1d 00 00 call 110940 <_Objects_Allocate> 10eb7a: 89 c3 mov %eax,%ebx /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10eb7c: 83 c4 10 add $0x10,%esp 10eb7f: 85 c0 test %eax,%eax 10eb81: 0f 84 a1 00 00 00 je 10ec28 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 10eb87: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10eb8b: a1 1c 7d 12 00 mov 0x127d1c,%eax 10eb90: 8b 40 08 mov 0x8(%eax),%eax 10eb93: 89 43 38 mov %eax,0x38(%ebx) if ( evp != NULL ) { 10eb96: 85 f6 test %esi,%esi 10eb98: 74 11 je 10ebab ptimer->inf.sigev_notify = evp->sigev_notify; 10eb9a: 8b 06 mov (%esi),%eax 10eb9c: 89 43 40 mov %eax,0x40(%ebx) ptimer->inf.sigev_signo = evp->sigev_signo; 10eb9f: 8b 46 04 mov 0x4(%esi),%eax 10eba2: 89 43 44 mov %eax,0x44(%ebx) ptimer->inf.sigev_value = evp->sigev_value; 10eba5: 8b 46 08 mov 0x8(%esi),%eax 10eba8: 89 43 48 mov %eax,0x48(%ebx) } ptimer->overrun = 0; 10ebab: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) ptimer->timer_data.it_value.tv_sec = 0; 10ebb2: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) ptimer->timer_data.it_value.tv_nsec = 0; 10ebb9: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) ptimer->timer_data.it_interval.tv_sec = 0; 10ebc0: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) ptimer->timer_data.it_interval.tv_nsec = 0; 10ebc7: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10ebce: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 10ebd5: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 10ebdc: c7 43 30 00 00 00 00 movl $0x0,0x30(%ebx) * the heap 10ebe3: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) 10ebea: 8b 4b 08 mov 0x8(%ebx),%ecx 10ebed: 0f b7 d1 movzwl %cx,%edx 10ebf0: a1 fc 7f 12 00 mov 0x127ffc,%eax 10ebf5: 89 1c 90 mov %ebx,(%eax,%edx,4) 10ebf8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 10ebff: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 10ec01: e8 c6 2a 00 00 call 1116cc <_Thread_Enable_dispatch> 10ec06: 31 c0 xor %eax,%eax return 0; } 10ec08: 8d 65 f4 lea -0xc(%ebp),%esp 10ec0b: 5b pop %ebx 10ec0c: 5e pop %esi 10ec0d: 5f pop %edi 10ec0e: c9 leave 10ec0f: c3 ret if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10ec10: e8 bb 79 00 00 call 1165d0 <__errno> 10ec15: c7 00 16 00 00 00 movl $0x16,(%eax) 10ec1b: b8 ff ff ff ff mov $0xffffffff,%eax _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 10ec20: 8d 65 f4 lea -0xc(%ebp),%esp 10ec23: 5b pop %ebx 10ec24: 5e pop %esi 10ec25: 5f pop %edi 10ec26: c9 leave 10ec27: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10ec28: e8 9f 2a 00 00 call 1116cc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10ec2d: e8 9e 79 00 00 call 1165d0 <__errno> 10ec32: c7 00 0b 00 00 00 movl $0xb,(%eax) 10ec38: b8 ff ff ff ff mov $0xffffffff,%eax 10ec3d: eb c9 jmp 10ec08 =============================================================================== 0010a358 : int timer_delete( timer_t timerid ) { 10a358: 55 push %ebp 10a359: 89 e5 mov %esp,%ebp 10a35b: 53 push %ebx 10a35c: 83 ec 18 sub $0x18,%esp * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size 10a35f: 8d 45 f8 lea -0x8(%ebp),%eax 10a362: 50 push %eax 10a363: ff 75 08 pushl 0x8(%ebp) 10a366: 68 c0 2f 12 00 push $0x122fc0 10a36b: e8 f4 22 00 00 call 10c664 <_Objects_Get> 10a370: 89 c3 mov %eax,%ebx */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10a372: 83 c4 10 add $0x10,%esp 10a375: 8b 4d f8 mov -0x8(%ebp),%ecx 10a378: 85 c9 test %ecx,%ecx 10a37a: 74 18 je 10a394 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a37c: e8 1f 7b 00 00 call 111ea0 <__errno> 10a381: c7 00 16 00 00 00 movl $0x16,(%eax) 10a387: b8 ff ff ff ff mov $0xffffffff,%eax } 10a38c: 8b 5d fc mov -0x4(%ebp),%ebx 10a38f: c9 leave 10a390: c3 ret 10a391: 8d 76 00 lea 0x0(%esi),%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 10a394: 83 ec 08 sub $0x8,%esp 10a397: 50 push %eax 10a398: 68 c0 2f 12 00 push $0x122fc0 10a39d: e8 4e 1e 00 00 call 10c1f0 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10a3a2: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10a3a6: 8d 43 10 lea 0x10(%ebx),%eax 10a3a9: 89 04 24 mov %eax,(%esp) 10a3ac: e8 07 3c 00 00 call 10dfb8 <_Watchdog_Remove> * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, 10a3b1: 58 pop %eax 10a3b2: 5a pop %edx 10a3b3: 53 push %ebx 10a3b4: 68 c0 2f 12 00 push $0x122fc0 10a3b9: e8 72 21 00 00 call 10c530 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10a3be: e8 e5 2a 00 00 call 10cea8 <_Thread_Enable_dispatch> 10a3c3: 31 c0 xor %eax,%eax 10a3c5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10a3c8: 8b 5d fc mov -0x4(%ebp),%ebx 10a3cb: c9 leave 10a3cc: c3 ret =============================================================================== 0010b4fc : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10b4fc: 55 push %ebp 10b4fd: 89 e5 mov %esp,%ebp 10b4ff: 53 push %ebx 10b500: 83 ec 18 sub $0x18,%esp * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size 10b503: 8d 45 f8 lea -0x8(%ebp),%eax 10b506: 50 push %eax 10b507: ff 75 08 pushl 0x8(%ebp) 10b50a: 68 00 43 12 00 push $0x124300 10b50f: e8 7c 22 00 00 call 10d790 <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b514: 83 c4 10 add $0x10,%esp 10b517: 8b 55 f8 mov -0x8(%ebp),%edx 10b51a: 85 d2 test %edx,%edx 10b51c: 74 1a je 10b538 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b51e: e8 09 77 00 00 call 112c2c <__errno> 10b523: c7 00 16 00 00 00 movl $0x16,(%eax) 10b529: bb ff ff ff ff mov $0xffffffff,%ebx } 10b52e: 89 d8 mov %ebx,%eax 10b530: 8b 5d fc mov -0x4(%ebp),%ebx 10b533: c9 leave 10b534: c3 ret 10b535: 8d 76 00 lea 0x0(%esi),%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10b538: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10b53b: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10b542: e8 8d 2a 00 00 call 10dfd4 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b547: 89 d8 mov %ebx,%eax 10b549: 8b 5d fc mov -0x4(%ebp),%ebx 10b54c: c9 leave 10b54d: c3 ret =============================================================================== 0010b550 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10b550: 55 push %ebp 10b551: 89 e5 mov %esp,%ebp 10b553: 56 push %esi 10b554: 53 push %ebx 10b555: 83 ec 10 sub $0x10,%esp 10b558: 8b 75 0c mov 0xc(%ebp),%esi POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10b55b: 85 f6 test %esi,%esi 10b55d: 74 65 je 10b5c4 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10b55f: 83 ec 0c sub $0xc,%esp 10b562: 8d 45 ec lea -0x14(%ebp),%eax 10b565: 50 push %eax 10b566: e8 b9 19 00 00 call 10cf24 <_TOD_Get> 10b56b: 83 c4 0c add $0xc,%esp 10b56e: 8d 45 f4 lea -0xc(%ebp),%eax 10b571: 50 push %eax 10b572: ff 75 08 pushl 0x8(%ebp) 10b575: 68 00 43 12 00 push $0x124300 10b57a: e8 11 22 00 00 call 10d790 <_Objects_Get> 10b57f: 89 c3 mov %eax,%ebx ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b581: 83 c4 10 add $0x10,%esp 10b584: 8b 45 f4 mov -0xc(%ebp),%eax 10b587: 85 c0 test %eax,%eax 10b589: 75 39 jne 10b5c4 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = 10b58b: 8b 15 e4 40 12 00 mov 0x1240e4,%edx (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10b591: 83 ec 08 sub $0x8,%esp 10b594: 8d 46 08 lea 0x8(%esi),%eax 10b597: 50 push %eax 10b598: 8b 43 1c mov 0x1c(%ebx),%eax 10b59b: 03 43 24 add 0x24(%ebx),%eax 10b59e: 29 d0 sub %edx,%eax 10b5a0: 50 push %eax 10b5a1: e8 96 36 00 00 call 10ec3c <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10b5a6: 8b 53 54 mov 0x54(%ebx),%edx 10b5a9: 8b 43 58 mov 0x58(%ebx),%eax 10b5ac: 89 46 04 mov %eax,0x4(%esi) 10b5af: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b5b1: e8 1e 2a 00 00 call 10dfd4 <_Thread_Enable_dispatch> 10b5b6: 31 c0 xor %eax,%eax 10b5b8: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b5bb: 8d 65 f8 lea -0x8(%ebp),%esp 10b5be: 5b pop %ebx 10b5bf: 5e pop %esi 10b5c0: c9 leave 10b5c1: c3 ret 10b5c2: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b5c4: e8 63 76 00 00 call 112c2c <__errno> 10b5c9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b5cf: b8 ff ff ff ff mov $0xffffffff,%eax 10b5d4: eb e5 jmp 10b5bb =============================================================================== 0010b5d8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10b5d8: 55 push %ebp 10b5d9: 89 e5 mov %esp,%ebp 10b5db: 57 push %edi 10b5dc: 56 push %esi 10b5dd: 53 push %ebx 10b5de: 83 ec 3c sub $0x3c,%esp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10b5e1: 8b 45 10 mov 0x10(%ebp),%eax 10b5e4: 85 c0 test %eax,%eax 10b5e6: 0f 84 04 01 00 00 je 10b6f0 <== NEVER 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 ) || 10b5ec: 8b 45 10 mov 0x10(%ebp),%eax 10b5ef: 81 78 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%eax) 10b5f6: 0f 87 f4 00 00 00 ja 10b6f0 10b5fc: 8b 40 04 mov 0x4(%eax),%eax 10b5ff: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b604: 0f 87 e6 00 00 00 ja 10b6f0 <== NEVER TAKEN 10b60a: 85 c0 test %eax,%eax 10b60c: 0f 88 de 00 00 00 js 10b6f0 <== NEVER 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 ) { 10b612: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10b616: 0f 84 2c 01 00 00 je 10b748 10b61c: 8b 45 0c mov 0xc(%ebp),%eax 10b61f: 85 c0 test %eax,%eax 10b621: 0f 85 c9 00 00 00 jne 10b6f0 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b627: 8d 45 e0 lea -0x20(%ebp),%eax 10b62a: 89 45 b8 mov %eax,-0x48(%ebp) 10b62d: b9 04 00 00 00 mov $0x4,%ecx 10b632: 89 c7 mov %eax,%edi 10b634: 8b 75 10 mov 0x10(%ebp),%esi 10b637: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10b639: 50 push %eax 10b63a: 8d 45 f0 lea -0x10(%ebp),%eax 10b63d: 50 push %eax 10b63e: ff 75 08 pushl 0x8(%ebp) 10b641: 68 00 43 12 00 push $0x124300 10b646: e8 45 21 00 00 call 10d790 <_Objects_Get> 10b64b: 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 ) { 10b64d: 83 c4 10 add $0x10,%esp 10b650: 8b 7d f0 mov -0x10(%ebp),%edi 10b653: 85 ff test %edi,%edi 10b655: 0f 85 95 00 00 00 jne 10b6f0 <== NEVER TAKEN case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 10b65b: 8b 75 e8 mov -0x18(%ebp),%esi 10b65e: 85 f6 test %esi,%esi 10b660: 75 0b jne 10b66d 10b662: 8b 4d ec mov -0x14(%ebp),%ecx 10b665: 85 c9 test %ecx,%ecx 10b667: 0f 84 9b 00 00 00 je 10b708 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10b66d: 83 ec 0c sub $0xc,%esp 10b670: ff 75 10 pushl 0x10(%ebp) 10b673: e8 6c 36 00 00 call 10ece4 <_Timespec_To_ticks> 10b678: 89 43 64 mov %eax,0x64(%ebx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10b67b: 8d 45 e8 lea -0x18(%ebp),%eax 10b67e: 89 04 24 mov %eax,(%esp) 10b681: e8 5e 36 00 00 call 10ece4 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10b686: 89 1c 24 mov %ebx,(%esp) 10b689: 68 a4 b7 10 00 push $0x10b7a4 10b68e: ff 73 08 pushl 0x8(%ebx) 10b691: 50 push %eax 10b692: 8d 43 10 lea 0x10(%ebx),%eax 10b695: 50 push %eax 10b696: e8 05 5c 00 00 call 1112a0 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10b69b: 83 c4 20 add $0x20,%esp 10b69e: 84 c0 test %al,%al 10b6a0: 0f 84 e2 00 00 00 je 10b788 <== NEVER TAKEN /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10b6a6: 8b 45 14 mov 0x14(%ebp),%eax 10b6a9: 85 c0 test %eax,%eax 10b6ab: 0f 84 e3 00 00 00 je 10b794 *ovalue = ptimer->timer_data; 10b6b1: 8d 43 54 lea 0x54(%ebx),%eax 10b6b4: b9 04 00 00 00 mov $0x4,%ecx 10b6b9: 8b 7d 14 mov 0x14(%ebp),%edi 10b6bc: 89 c6 mov %eax,%esi 10b6be: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10b6c0: b9 04 00 00 00 mov $0x4,%ecx 10b6c5: 89 c7 mov %eax,%edi 10b6c7: 8b 75 b8 mov -0x48(%ebp),%esi 10b6ca: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b6cc: c6 43 3c 03 movb $0x3,0x3c(%ebx) _TOD_Get( &ptimer->time ); 10b6d0: 83 ec 0c sub $0xc,%esp 10b6d3: 8d 43 6c lea 0x6c(%ebx),%eax 10b6d6: 50 push %eax 10b6d7: e8 48 18 00 00 call 10cf24 <_TOD_Get> _Thread_Enable_dispatch(); 10b6dc: e8 f3 28 00 00 call 10dfd4 <_Thread_Enable_dispatch> 10b6e1: 31 c0 xor %eax,%eax 10b6e3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b6e6: 8d 65 f4 lea -0xc(%ebp),%esp 10b6e9: 5b pop %ebx 10b6ea: 5e pop %esi 10b6eb: 5f pop %edi 10b6ec: c9 leave 10b6ed: c3 ret 10b6ee: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b6f0: e8 37 75 00 00 call 112c2c <__errno> 10b6f5: c7 00 16 00 00 00 movl $0x16,(%eax) 10b6fb: b8 ff ff ff ff mov $0xffffffff,%eax } 10b700: 8d 65 f4 lea -0xc(%ebp),%esp 10b703: 5b pop %ebx 10b704: 5e pop %esi 10b705: 5f pop %edi 10b706: c9 leave 10b707: c3 ret 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 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10b708: 83 ec 0c sub $0xc,%esp 10b70b: 8d 40 10 lea 0x10(%eax),%eax 10b70e: 50 push %eax 10b70f: e8 0c 3a 00 00 call 10f120 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10b714: 83 c4 10 add $0x10,%esp 10b717: 8b 55 14 mov 0x14(%ebp),%edx 10b71a: 85 d2 test %edx,%edx 10b71c: 74 7e je 10b79c <== ALWAYS TAKEN *ovalue = ptimer->timer_data; 10b71e: 8d 43 54 lea 0x54(%ebx),%eax <== NOT EXECUTED 10b721: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 10b726: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 10b729: 89 c6 mov %eax,%esi <== NOT EXECUTED 10b72b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 10b72d: b9 04 00 00 00 mov $0x4,%ecx 10b732: 89 c7 mov %eax,%edi 10b734: 8b 75 b8 mov -0x48(%ebp),%esi 10b737: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b739: c6 43 3c 04 movb $0x4,0x3c(%ebx) /* Returns with success */ _Thread_Enable_dispatch(); 10b73d: e8 92 28 00 00 call 10dfd4 <_Thread_Enable_dispatch> 10b742: 31 c0 xor %eax,%eax 10b744: eb ba jmp 10b700 10b746: 66 90 xchg %ax,%ax if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b748: 8d 75 e0 lea -0x20(%ebp),%esi 10b74b: 89 75 b8 mov %esi,-0x48(%ebp) 10b74e: 89 f7 mov %esi,%edi 10b750: 8b 75 10 mov 0x10(%ebp),%esi 10b753: 8b 4d 0c mov 0xc(%ebp),%ecx 10b756: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 10b758: 83 ec 08 sub $0x8,%esp 10b75b: 8d 5d e8 lea -0x18(%ebp),%ebx 10b75e: 53 push %ebx 10b75f: 68 0c 40 12 00 push $0x12400c 10b764: e8 1b 35 00 00 call 10ec84 <_Timespec_Greater_than> 10b769: 83 c4 10 add $0x10,%esp 10b76c: 84 c0 test %al,%al 10b76e: 75 80 jne 10b6f0 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 10b770: 50 push %eax 10b771: 53 push %ebx 10b772: 53 push %ebx 10b773: 68 0c 40 12 00 push $0x12400c 10b778: e8 2b 35 00 00 call 10eca8 <_Timespec_Subtract> 10b77d: 83 c4 10 add $0x10,%esp 10b780: e9 b4 fe ff ff jmp 10b639 10b785: 8d 76 00 lea 0x0(%esi),%esi ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10b788: e8 47 28 00 00 call 10dfd4 <_Thread_Enable_dispatch><== NOT EXECUTED 10b78d: 31 c0 xor %eax,%eax <== NOT EXECUTED 10b78f: e9 6c ff ff ff jmp 10b700 <== NOT EXECUTED 10b794: 8d 43 54 lea 0x54(%ebx),%eax 10b797: e9 24 ff ff ff jmp 10b6c0 10b79c: 8d 43 54 lea 0x54(%ebx),%eax 10b79f: eb 8c jmp 10b72d =============================================================================== 00109f94 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 109f94: 55 push %ebp 109f95: 89 e5 mov %esp,%ebp 109f97: 57 push %edi 109f98: 56 push %esi 109f99: 53 push %ebx 109f9a: 83 ec 1c sub $0x1c,%esp 109f9d: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 109fa0: 8b 0d fc 22 12 00 mov 0x1222fc,%ecx 109fa6: 85 c9 test %ecx,%ecx 109fa8: 0f 84 ea 00 00 00 je 10a098 <== NEVER TAKEN _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 109fae: 83 ec 0c sub $0xc,%esp 109fb1: 68 e0 22 12 00 push $0x1222e0 109fb6: e8 dd 3a 00 00 call 10da98 <_Watchdog_Remove> 109fbb: 83 c4 10 add $0x10,%esp 109fbe: 83 e8 02 sub $0x2,%eax 109fc1: 83 f8 01 cmp $0x1,%eax 109fc4: 76 72 jbe 10a038 109fc6: 31 ff xor %edi,%edi <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 109fc8: 85 f6 test %esi,%esi 109fca: 74 62 je 10a02e <== NEVER TAKEN Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 109fcc: ba 83 de 1b 43 mov $0x431bde83,%edx 109fd1: 89 f0 mov %esi,%eax 109fd3: f7 e2 mul %edx 109fd5: c1 ea 12 shr $0x12,%edx 109fd8: 89 55 e8 mov %edx,-0x18(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 109fdb: 8d 14 92 lea (%edx,%edx,4),%edx 109fde: 8d 14 92 lea (%edx,%edx,4),%edx 109fe1: 8d 14 92 lea (%edx,%edx,4),%edx 109fe4: 8d 14 92 lea (%edx,%edx,4),%edx 109fe7: 8d 14 92 lea (%edx,%edx,4),%edx 109fea: 8d 14 92 lea (%edx,%edx,4),%edx 109fed: c1 e2 06 shl $0x6,%edx 109ff0: 29 d6 sub %edx,%esi 109ff2: 8d 04 b6 lea (%esi,%esi,4),%eax 109ff5: 8d 04 80 lea (%eax,%eax,4),%eax 109ff8: 8d 04 80 lea (%eax,%eax,4),%eax 109ffb: c1 e0 03 shl $0x3,%eax 109ffe: 89 45 ec mov %eax,-0x14(%ebp) ticks = _Timespec_To_ticks( &tp ); 10a001: 83 ec 0c sub $0xc,%esp 10a004: 8d 5d e8 lea -0x18(%ebp),%ebx 10a007: 53 push %ebx 10a008: e8 0f 36 00 00 call 10d61c <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10a00d: 89 1c 24 mov %ebx,(%esp) 10a010: e8 07 36 00 00 call 10d61c <_Timespec_To_ticks> * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10a015: a3 ec 22 12 00 mov %eax,0x1222ec void *starting_address, size_t *size 10a01a: 58 pop %eax 10a01b: 5a pop %edx 10a01c: 68 e0 22 12 00 push $0x1222e0 10a021: 68 bc 24 12 00 push $0x1224bc 10a026: e8 3d 39 00 00 call 10d968 <_Watchdog_Insert> 10a02b: 83 c4 10 add $0x10,%esp } return remaining; } 10a02e: 89 f8 mov %edi,%eax 10a030: 8d 65 f4 lea -0xc(%ebp),%esp 10a033: 5b pop %ebx 10a034: 5e pop %esi 10a035: 5f pop %edi 10a036: c9 leave 10a037: c3 ret * 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); 10a038: a1 f4 22 12 00 mov 0x1222f4,%eax 10a03d: 03 05 ec 22 12 00 add 0x1222ec,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10a043: 83 ec 08 sub $0x8,%esp 10a046: 8d 55 e8 lea -0x18(%ebp),%edx 10a049: 52 push %edx 10a04a: 2b 05 f8 22 12 00 sub 0x1222f8,%eax 10a050: 50 push %eax 10a051: e8 42 35 00 00 call 10d598 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10a056: 8b 45 e8 mov -0x18(%ebp),%eax 10a059: 8d 04 80 lea (%eax,%eax,4),%eax 10a05c: 8d 04 80 lea (%eax,%eax,4),%eax 10a05f: 8d 04 80 lea (%eax,%eax,4),%eax 10a062: 8d 04 80 lea (%eax,%eax,4),%eax 10a065: 8d 04 80 lea (%eax,%eax,4),%eax 10a068: 8d 3c 80 lea (%eax,%eax,4),%edi 10a06b: c1 e7 06 shl $0x6,%edi remaining += tp.tv_nsec / 1000; 10a06e: 8b 5d ec mov -0x14(%ebp),%ebx 10a071: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10a076: 89 d8 mov %ebx,%eax 10a078: f7 e9 imul %ecx 10a07a: 89 45 d8 mov %eax,-0x28(%ebp) 10a07d: 89 55 dc mov %edx,-0x24(%ebp) 10a080: 8b 55 dc mov -0x24(%ebp),%edx 10a083: c1 fa 06 sar $0x6,%edx 10a086: c1 fb 1f sar $0x1f,%ebx 10a089: 29 da sub %ebx,%edx 10a08b: 8d 3c 3a lea (%edx,%edi,1),%edi 10a08e: 83 c4 10 add $0x10,%esp 10a091: e9 32 ff ff ff jmp 109fc8 10a096: 66 90 xchg %ax,%ax * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10a098: c7 05 e8 22 12 00 00 movl $0x0,0x1222e8 10a09f: 00 00 00 * @param[in] the_heap is the heap to operate upon 10a0a2: c7 05 fc 22 12 00 c8 movl $0x10a0c8,0x1222fc 10a0a9: a0 10 00 * @param[in] starting_address is the starting address of the memory for 10a0ac: c7 05 00 23 12 00 00 movl $0x0,0x122300 10a0b3: 00 00 00 * the heap 10a0b6: c7 05 04 23 12 00 00 movl $0x0,0x122304 10a0bd: 00 00 00 10a0c0: 31 ff xor %edi,%edi 10a0c2: e9 01 ff ff ff jmp 109fc8