=============================================================================== 001099a9 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 1099a9: 55 push %ebp 1099aa: 89 e5 mov %esp,%ebp 1099ac: 53 push %ebx 1099ad: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 1099b0: 8b 1d bc d9 11 00 mov 0x11d9bc,%ebx 1099b6: eb 0b jmp 1099c3 <_API_extensions_Run_postdriver+0x1a> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 1099b8: 8b 43 0c mov 0xc(%ebx),%eax 1099bb: 85 c0 test %eax,%eax 1099bd: 74 02 je 1099c1 <_API_extensions_Run_postdriver+0x18><== NEVER TAKEN (*the_extension->postdriver_hook)(); 1099bf: 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 ) { 1099c1: 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 ) ; 1099c3: 81 fb c0 d9 11 00 cmp $0x11d9c0,%ebx 1099c9: 75 ed jne 1099b8 <_API_extensions_Run_postdriver+0xf> the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 1099cb: 5a pop %edx 1099cc: 5b pop %ebx 1099cd: c9 leave 1099ce: c3 ret =============================================================================== 001099cf <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 1099cf: 55 push %ebp 1099d0: 89 e5 mov %esp,%ebp 1099d2: 53 push %ebx 1099d3: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 1099d6: 8b 1d bc d9 11 00 mov 0x11d9bc,%ebx 1099dc: eb 17 jmp 1099f5 <_API_extensions_Run_postswitch+0x26> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 1099de: 8b 43 10 mov 0x10(%ebx),%eax 1099e1: 85 c0 test %eax,%eax 1099e3: 74 0e je 1099f3 <_API_extensions_Run_postswitch+0x24><== NEVER TAKEN (*the_extension->postswitch_hook)( _Thread_Executing ); 1099e5: 83 ec 0c sub $0xc,%esp 1099e8: ff 35 58 d8 11 00 pushl 0x11d858 1099ee: ff d0 call *%eax 1099f0: 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 ) { 1099f3: 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 ) ; 1099f5: 81 fb c0 d9 11 00 cmp $0x11d9c0,%ebx 1099fb: 75 e1 jne 1099de <_API_extensions_Run_postswitch+0xf> the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); } } 1099fd: 8b 5d fc mov -0x4(%ebp),%ebx 109a00: c9 leave 109a01: c3 ret =============================================================================== 00109983 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 109983: 55 push %ebp 109984: 89 e5 mov %esp,%ebp 109986: 53 push %ebx 109987: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10998a: 8b 1d bc d9 11 00 mov 0x11d9bc,%ebx 109990: eb 0b jmp 10999d <_API_extensions_Run_predriver+0x1a> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 109992: 8b 43 08 mov 0x8(%ebx),%eax 109995: 85 c0 test %eax,%eax 109997: 74 02 je 10999b <_API_extensions_Run_predriver+0x18><== ALWAYS TAKEN (*the_extension->predriver_hook)(); 109999: 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 ) { 10999b: 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 ) ; 10999d: 81 fb c0 d9 11 00 cmp $0x11d9c0,%ebx 1099a3: 75 ed jne 109992 <_API_extensions_Run_predriver+0xf> the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 1099a5: 58 pop %eax 1099a6: 5b pop %ebx 1099a7: c9 leave 1099a8: c3 ret =============================================================================== 0010b720 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10b720: 55 push %ebp 10b721: 89 e5 mov %esp,%ebp 10b723: 57 push %edi 10b724: 56 push %esi 10b725: 53 push %ebx 10b726: 83 ec 0c sub $0xc,%esp 10b729: 8b 5d 08 mov 0x8(%ebp),%ebx 10b72c: 8b 45 0c mov 0xc(%ebp),%eax 10b72f: 89 45 f0 mov %eax,-0x10(%ebp) 10b732: 8b 45 14 mov 0x14(%ebp),%eax 10b735: 89 45 e8 mov %eax,-0x18(%ebp) 10b738: 8a 45 10 mov 0x10(%ebp),%al 10b73b: 88 45 ef mov %al,-0x11(%ebp) ISR_Level level; Thread_Control *executing = _Thread_Executing; 10b73e: 8b 35 90 fc 11 00 mov 0x11fc90,%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 ); 10b744: 9c pushf 10b745: fa cli 10b746: 5f pop %edi switch ( the_rwlock->current_state ) { 10b747: 8b 43 44 mov 0x44(%ebx),%eax 10b74a: 85 c0 test %eax,%eax 10b74c: 74 05 je 10b753 <_CORE_RWLock_Obtain_for_reading+0x33> 10b74e: 48 dec %eax 10b74f: 75 2e jne 10b77f <_CORE_RWLock_Obtain_for_reading+0x5f> 10b751: eb 0e jmp 10b761 <_CORE_RWLock_Obtain_for_reading+0x41> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10b753: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10b75a: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10b75d: 57 push %edi 10b75e: 9d popf 10b75f: eb 15 jmp 10b776 <_CORE_RWLock_Obtain_for_reading+0x56> 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 ); 10b761: 83 ec 0c sub $0xc,%esp 10b764: 53 push %ebx 10b765: e8 2e 19 00 00 call 10d098 <_Thread_queue_First> if ( !waiter ) { 10b76a: 83 c4 10 add $0x10,%esp 10b76d: 85 c0 test %eax,%eax 10b76f: 75 0e jne 10b77f <_CORE_RWLock_Obtain_for_reading+0x5f><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10b771: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10b774: 57 push %edi 10b775: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10b776: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) 10b77d: eb 4d jmp 10b7cc <_CORE_RWLock_Obtain_for_reading+0xac> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10b77f: 80 7d ef 00 cmpb $0x0,-0x11(%ebp) 10b783: 75 0b jne 10b790 <_CORE_RWLock_Obtain_for_reading+0x70> _ISR_Enable( level ); 10b785: 57 push %edi 10b786: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10b787: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) 10b78e: eb 3c jmp 10b7cc <_CORE_RWLock_Obtain_for_reading+0xac> { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10b790: 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; 10b797: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10b79a: 8b 45 f0 mov -0x10(%ebp),%eax 10b79d: 89 46 20 mov %eax,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10b7a0: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10b7a7: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10b7ae: 57 push %edi 10b7af: 9d popf _Thread_queue_Enqueue_with_handler( 10b7b0: c7 45 10 f0 b8 10 00 movl $0x10b8f0,0x10(%ebp) 10b7b7: 8b 45 e8 mov -0x18(%ebp),%eax 10b7ba: 89 45 0c mov %eax,0xc(%ebp) 10b7bd: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10b7c0: 8d 65 f4 lea -0xc(%ebp),%esp 10b7c3: 5b pop %ebx 10b7c4: 5e pop %esi 10b7c5: 5f pop %edi 10b7c6: 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( 10b7c7: e9 d0 15 00 00 jmp 10cd9c <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10b7cc: 8d 65 f4 lea -0xc(%ebp),%esp 10b7cf: 5b pop %ebx 10b7d0: 5e pop %esi 10b7d1: 5f pop %edi 10b7d2: c9 leave 10b7d3: c3 ret =============================================================================== 0010b850 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10b850: 55 push %ebp 10b851: 89 e5 mov %esp,%ebp 10b853: 53 push %ebx 10b854: 83 ec 04 sub $0x4,%esp 10b857: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10b85a: 8b 0d 90 fc 11 00 mov 0x11fc90,%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 ); 10b860: 9c pushf 10b861: fa cli 10b862: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10b863: 8b 43 44 mov 0x44(%ebx),%eax 10b866: 85 c0 test %eax,%eax 10b868: 75 0b jne 10b875 <_CORE_RWLock_Release+0x25><== ALWAYS TAKEN _ISR_Enable( level ); 10b86a: 52 push %edx <== NOT EXECUTED 10b86b: 9d popf <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10b86c: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) <== NOT EXECUTED 10b873: eb 72 jmp 10b8e7 <_CORE_RWLock_Release+0x97><== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10b875: 48 dec %eax 10b876: 75 0f jne 10b887 <_CORE_RWLock_Release+0x37> the_rwlock->number_of_readers -= 1; 10b878: 8b 43 48 mov 0x48(%ebx),%eax 10b87b: 48 dec %eax 10b87c: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10b87f: 85 c0 test %eax,%eax 10b881: 74 04 je 10b887 <_CORE_RWLock_Release+0x37> /* must be unlocked again */ _ISR_Enable( level ); 10b883: 52 push %edx 10b884: 9d popf 10b885: eb 60 jmp 10b8e7 <_CORE_RWLock_Release+0x97> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10b887: 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; 10b88e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10b895: 52 push %edx 10b896: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10b897: 83 ec 0c sub $0xc,%esp 10b89a: 53 push %ebx 10b89b: e8 e4 13 00 00 call 10cc84 <_Thread_queue_Dequeue> if ( next ) { 10b8a0: 83 c4 10 add $0x10,%esp 10b8a3: 85 c0 test %eax,%eax 10b8a5: 74 40 je 10b8e7 <_CORE_RWLock_Release+0x97> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10b8a7: 83 78 30 01 cmpl $0x1,0x30(%eax) 10b8ab: 75 09 jne 10b8b6 <_CORE_RWLock_Release+0x66> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10b8ad: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) 10b8b4: eb 31 jmp 10b8e7 <_CORE_RWLock_Release+0x97> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10b8b6: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10b8b9: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10b8c0: 83 ec 0c sub $0xc,%esp 10b8c3: 53 push %ebx 10b8c4: e8 cf 17 00 00 call 10d098 <_Thread_queue_First> if ( !next || 10b8c9: 83 c4 10 add $0x10,%esp 10b8cc: 85 c0 test %eax,%eax 10b8ce: 74 17 je 10b8e7 <_CORE_RWLock_Release+0x97> 10b8d0: 83 78 30 01 cmpl $0x1,0x30(%eax) 10b8d4: 74 11 je 10b8e7 <_CORE_RWLock_Release+0x97><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10b8d6: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10b8d9: 52 push %edx 10b8da: 52 push %edx 10b8db: 50 push %eax 10b8dc: 53 push %ebx 10b8dd: e8 9e 16 00 00 call 10cf80 <_Thread_queue_Extract> 10b8e2: 83 c4 10 add $0x10,%esp 10b8e5: eb d9 jmp 10b8c0 <_CORE_RWLock_Release+0x70> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10b8e7: 31 c0 xor %eax,%eax 10b8e9: 8b 5d fc mov -0x4(%ebp),%ebx 10b8ec: c9 leave 10b8ed: c3 ret =============================================================================== 0010b8f0 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10b8f0: 55 push %ebp 10b8f1: 89 e5 mov %esp,%ebp 10b8f3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10b8f6: 8d 45 fc lea -0x4(%ebp),%eax 10b8f9: 50 push %eax 10b8fa: ff 75 08 pushl 0x8(%ebp) 10b8fd: e8 6a 10 00 00 call 10c96c <_Thread_Get> switch ( location ) { 10b902: 83 c4 10 add $0x10,%esp 10b905: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 10b909: 75 17 jne 10b922 <_CORE_RWLock_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10b90b: 83 ec 0c sub $0xc,%esp 10b90e: 50 push %eax 10b90f: e8 74 18 00 00 call 10d188 <_Thread_queue_Process_timeout> 10b914: a1 d0 fb 11 00 mov 0x11fbd0,%eax 10b919: 48 dec %eax 10b91a: a3 d0 fb 11 00 mov %eax,0x11fbd0 10b91f: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10b922: c9 leave 10b923: c3 ret =============================================================================== 0010aa34 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 10aa34: 55 push %ebp 10aa35: 89 e5 mov %esp,%ebp 10aa37: 57 push %edi 10aa38: 56 push %esi 10aa39: 53 push %ebx 10aa3a: 83 ec 04 sub $0x4,%esp 10aa3d: 8b 55 08 mov 0x8(%ebp),%edx 10aa40: 8b 75 0c mov 0xc(%ebp),%esi 10aa43: 8b 45 14 mov 0x14(%ebp),%eax 10aa46: 89 45 f0 mov %eax,-0x10(%ebp) 10aa49: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 10aa4c: 8b 0d 50 ed 11 00 mov 0x11ed50,%ecx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 10aa52: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 10aa59: 9c pushf 10aa5a: fa cli 10aa5b: 5b pop %ebx the_barrier->number_of_waiting_threads++; 10aa5c: 8b 42 48 mov 0x48(%edx),%eax 10aa5f: 40 inc %eax 10aa60: 89 42 48 mov %eax,0x48(%edx) if ( the_barrier->number_of_waiting_threads == 10aa63: 3b 42 44 cmp 0x44(%edx),%eax 10aa66: 75 22 jne 10aa8a <_CORE_barrier_Wait+0x56> the_barrier->Attributes.maximum_count) { if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 10aa68: 83 7a 40 00 cmpl $0x0,0x40(%edx) 10aa6c: 75 1c jne 10aa8a <_CORE_barrier_Wait+0x56><== NEVER TAKEN executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 10aa6e: c7 41 34 01 00 00 00 movl $0x1,0x34(%ecx) _ISR_Enable( level ); 10aa75: 53 push %ebx 10aa76: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10aa77: 89 7d 10 mov %edi,0x10(%ebp) 10aa7a: 89 75 0c mov %esi,0xc(%ebp) 10aa7d: 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 ); } 10aa80: 5a pop %edx 10aa81: 5b pop %ebx 10aa82: 5e pop %esi 10aa83: 5f pop %edi 10aa84: 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 ); 10aa85: e9 c6 42 00 00 jmp 10ed50 <_CORE_barrier_Release> { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10aa8a: 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; 10aa91: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 10aa94: 89 71 20 mov %esi,0x20(%ecx) _ISR_Enable( level ); 10aa97: 53 push %ebx 10aa98: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10aa99: c7 45 10 5c c5 10 00 movl $0x10c55c,0x10(%ebp) 10aaa0: 8b 45 f0 mov -0x10(%ebp),%eax 10aaa3: 89 45 0c mov %eax,0xc(%ebp) 10aaa6: 89 55 08 mov %edx,0x8(%ebp) } 10aaa9: 58 pop %eax 10aaaa: 5b pop %ebx 10aaab: 5e pop %esi 10aaac: 5f pop %edi 10aaad: 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 ); 10aaae: e9 a5 17 00 00 jmp 10c258 <_Thread_queue_Enqueue_with_handler> =============================================================================== 00113b08 <_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 ) { 113b08: 55 push %ebp 113b09: 89 e5 mov %esp,%ebp 113b0b: 57 push %edi 113b0c: 56 push %esi 113b0d: 53 push %ebx 113b0e: 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 ) { 113b11: b8 01 00 00 00 mov $0x1,%eax 113b16: 8b 4d 10 mov 0x10(%ebp),%ecx 113b19: 8b 55 08 mov 0x8(%ebp),%edx 113b1c: 3b 4a 4c cmp 0x4c(%edx),%ecx 113b1f: 77 43 ja 113b64 <_CORE_message_queue_Broadcast+0x5c><== 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))) { 113b21: 31 db xor %ebx,%ebx * 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 ) { 113b23: 8b 75 08 mov 0x8(%ebp),%esi 113b26: 83 7e 48 00 cmpl $0x0,0x48(%esi) 113b2a: 74 21 je 113b4d <_CORE_message_queue_Broadcast+0x45><== ALWAYS TAKEN *count = 0; 113b2c: 8b 45 1c mov 0x1c(%ebp),%eax <== NOT EXECUTED 113b2f: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 113b35: 31 c0 xor %eax,%eax <== NOT EXECUTED 113b37: eb 2b jmp 113b64 <_CORE_message_queue_Broadcast+0x5c><== NOT EXECUTED */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 113b39: 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 113b3a: 8b 78 2c mov 0x2c(%eax),%edi 113b3d: 8b 75 0c mov 0xc(%ebp),%esi 113b40: 8b 4d 10 mov 0x10(%ebp),%ecx 113b43: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 113b45: 8b 40 28 mov 0x28(%eax),%eax 113b48: 8b 55 10 mov 0x10(%ebp),%edx 113b4b: 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))) { 113b4d: 83 ec 0c sub $0xc,%esp 113b50: ff 75 08 pushl 0x8(%ebp) 113b53: e8 98 1f 00 00 call 115af0 <_Thread_queue_Dequeue> 113b58: 83 c4 10 add $0x10,%esp 113b5b: 85 c0 test %eax,%eax 113b5d: 75 da jne 113b39 <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 113b5f: 8b 4d 1c mov 0x1c(%ebp),%ecx 113b62: 89 19 mov %ebx,(%ecx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 113b64: 8d 65 f4 lea -0xc(%ebp),%esp 113b67: 5b pop %ebx 113b68: 5e pop %esi 113b69: 5f pop %edi 113b6a: c9 leave 113b6b: c3 ret =============================================================================== 00112ec8 <_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 ) { 112ec8: 55 push %ebp 112ec9: 89 e5 mov %esp,%ebp 112ecb: 57 push %edi 112ecc: 56 push %esi 112ecd: 53 push %ebx 112ece: 83 ec 0c sub $0xc,%esp 112ed1: 8b 5d 08 mov 0x8(%ebp),%ebx 112ed4: 8b 7d 10 mov 0x10(%ebp),%edi 112ed7: 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; 112eda: 89 7b 44 mov %edi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 112edd: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 112ee4: 89 53 4c mov %edx,0x4c(%ebx) 112ee7: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 112eee: 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)) { 112ef5: 89 d0 mov %edx,%eax 112ef7: f6 c2 03 test $0x3,%dl 112efa: 74 0a je 112f06 <_CORE_message_queue_Initialize+0x3e> allocated_message_size += sizeof(uint32_t); 112efc: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 112eff: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 112f02: 39 d0 cmp %edx,%eax 112f04: 72 5f jb 112f65 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 112f06: 8d 70 14 lea 0x14(%eax),%esi 112f09: 89 f2 mov %esi,%edx 112f0b: 0f af d7 imul %edi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 112f0e: 39 c2 cmp %eax,%edx 112f10: 72 53 jb 112f65 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 112f12: 83 ec 0c sub $0xc,%esp 112f15: 52 push %edx 112f16: e8 92 de ff ff call 110dad <_Workspace_Allocate> 112f1b: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 112f1e: 83 c4 10 add $0x10,%esp 112f21: 85 c0 test %eax,%eax 112f23: 74 40 je 112f65 <_CORE_message_queue_Initialize+0x9d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112f25: 56 push %esi 112f26: 57 push %edi 112f27: 50 push %eax 112f28: 8d 43 68 lea 0x68(%ebx),%eax 112f2b: 50 push %eax 112f2c: e8 93 fe ff ff call 112dc4 <_Chain_Initialize> 112f31: 8d 43 54 lea 0x54(%ebx),%eax 112f34: 89 43 50 mov %eax,0x50(%ebx) 112f37: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) 112f3e: 8d 43 50 lea 0x50(%ebx),%eax 112f41: 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( 112f44: 6a 06 push $0x6 112f46: 68 80 00 00 00 push $0x80 112f4b: 8b 45 0c mov 0xc(%ebp),%eax 112f4e: 83 38 01 cmpl $0x1,(%eax) 112f51: 0f 94 c0 sete %al 112f54: 0f b6 c0 movzbl %al,%eax 112f57: 50 push %eax 112f58: 53 push %ebx 112f59: e8 5a d4 ff ff call 1103b8 <_Thread_queue_Initialize> 112f5e: b0 01 mov $0x1,%al 112f60: 83 c4 20 add $0x20,%esp 112f63: eb 02 jmp 112f67 <_CORE_message_queue_Initialize+0x9f> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 112f65: 31 c0 xor %eax,%eax } 112f67: 8d 65 f4 lea -0xc(%ebp),%esp 112f6a: 5b pop %ebx 112f6b: 5e pop %esi 112f6c: 5f pop %edi 112f6d: c9 leave 112f6e: c3 ret =============================================================================== 0010e7f8 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 10e7f8: 55 push %ebp 10e7f9: 89 e5 mov %esp,%ebp 10e7fb: 57 push %edi 10e7fc: 56 push %esi 10e7fd: 53 push %ebx 10e7fe: 83 ec 2c sub $0x2c,%esp 10e801: 8b 45 08 mov 0x8(%ebp),%eax 10e804: 89 45 d0 mov %eax,-0x30(%ebp) 10e807: 8b 55 0c mov 0xc(%ebp),%edx 10e80a: 89 55 ec mov %edx,-0x14(%ebp) 10e80d: 8b 7d 10 mov 0x10(%ebp),%edi 10e810: 89 7d e8 mov %edi,-0x18(%ebp) 10e813: 8b 45 14 mov 0x14(%ebp),%eax 10e816: 89 45 e4 mov %eax,-0x1c(%ebp) 10e819: 8b 55 1c mov 0x1c(%ebp),%edx 10e81c: 89 55 dc mov %edx,-0x24(%ebp) 10e81f: 8a 45 18 mov 0x18(%ebp),%al 10e822: 88 45 e3 mov %al,-0x1d(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 10e825: 8b 35 18 64 12 00 mov 0x126418,%esi executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10e82b: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Disable( level ); 10e832: 9c pushf 10e833: fa cli 10e834: 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( 10e835: 8b 55 d0 mov -0x30(%ebp),%edx 10e838: 8b 5a 50 mov 0x50(%edx),%ebx 10e83b: 89 d0 mov %edx,%eax 10e83d: 83 c0 54 add $0x54,%eax 10e840: 39 c3 cmp %eax,%ebx 10e842: 0f 84 9e 00 00 00 je 10e8e6 <_CORE_message_queue_Seize+0xee> 10e848: 8b 13 mov (%ebx),%edx 10e84a: 8b 7d d0 mov -0x30(%ebp),%edi 10e84d: 89 57 50 mov %edx,0x50(%edi) 10e850: 89 f8 mov %edi,%eax 10e852: 83 c0 50 add $0x50,%eax 10e855: 89 42 04 mov %eax,0x4(%edx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 10e858: 85 db test %ebx,%ebx 10e85a: 0f 84 86 00 00 00 je 10e8e6 <_CORE_message_queue_Seize+0xee><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 10e860: ff 4f 48 decl 0x48(%edi) _ISR_Enable( level ); 10e863: 51 push %ecx 10e864: 9d popf *size_p = the_message->Contents.size; 10e865: 8b 43 0c mov 0xc(%ebx),%eax 10e868: 8b 55 e4 mov -0x1c(%ebp),%edx 10e86b: 89 02 mov %eax,(%edx) _Thread_Executing->Wait.count = the_message->priority; 10e86d: 8b 53 08 mov 0x8(%ebx),%edx 10e870: a1 18 64 12 00 mov 0x126418,%eax 10e875: 89 50 24 mov %edx,0x24(%eax) _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p); 10e878: 8d 7b 10 lea 0x10(%ebx),%edi 10e87b: 89 7d f0 mov %edi,-0x10(%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 10e87e: 8b 45 e4 mov -0x1c(%ebp),%eax 10e881: 8b 08 mov (%eax),%ecx 10e883: 8b 7d e8 mov -0x18(%ebp),%edi 10e886: 8b 75 f0 mov -0x10(%ebp),%esi 10e889: 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 ); 10e88b: 83 ec 0c sub $0xc,%esp 10e88e: ff 75 d0 pushl -0x30(%ebp) 10e891: e8 d6 17 00 00 call 11006c <_Thread_queue_Dequeue> 10e896: 89 c2 mov %eax,%edx if ( !the_thread ) { 10e898: 83 c4 10 add $0x10,%esp 10e89b: 85 c0 test %eax,%eax 10e89d: 75 18 jne 10e8b7 <_CORE_message_queue_Seize+0xbf> * @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 10e89f: 89 5d 0c mov %ebx,0xc(%ebp) 10e8a2: 8b 45 d0 mov -0x30(%ebp),%eax 10e8a5: 83 c0 68 add $0x68,%eax 10e8a8: 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 ); } 10e8ab: 8d 65 f4 lea -0xc(%ebp),%esp 10e8ae: 5b pop %ebx 10e8af: 5e pop %esi 10e8b0: 5f pop %edi 10e8b1: c9 leave 10e8b2: e9 71 fe ff ff jmp 10e728 <_Chain_Append> * 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; 10e8b7: 8b 40 24 mov 0x24(%eax),%eax 10e8ba: 89 43 08 mov %eax,0x8(%ebx) the_message->Contents.size = (size_t) the_thread->Wait.option; 10e8bd: 8b 4a 30 mov 0x30(%edx),%ecx 10e8c0: 89 4b 0c mov %ecx,0xc(%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 10e8c3: 8b 72 2c mov 0x2c(%edx),%esi 10e8c6: 8b 7d f0 mov -0x10(%ebp),%edi 10e8c9: 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( 10e8cb: 8b 43 08 mov 0x8(%ebx),%eax 10e8ce: 89 45 10 mov %eax,0x10(%ebp) 10e8d1: 89 5d 0c mov %ebx,0xc(%ebp) 10e8d4: 8b 45 d0 mov -0x30(%ebp),%eax 10e8d7: 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 ); } 10e8da: 8d 65 f4 lea -0xc(%ebp),%esp 10e8dd: 5b pop %ebx 10e8de: 5e pop %esi 10e8df: 5f pop %edi 10e8e0: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 10e8e1: e9 16 45 00 00 jmp 112dfc <_CORE_message_queue_Insert_message> the_message->priority ); return; } if ( !wait ) { 10e8e6: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10e8ea: 75 11 jne 10e8fd <_CORE_message_queue_Seize+0x105> _ISR_Enable( level ); 10e8ec: 51 push %ecx 10e8ed: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 10e8ee: c7 46 34 04 00 00 00 movl $0x4,0x34(%esi) 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 ); } 10e8f5: 8d 65 f4 lea -0xc(%ebp),%esp 10e8f8: 5b pop %ebx 10e8f9: 5e pop %esi 10e8fa: 5f pop %edi 10e8fb: c9 leave 10e8fc: 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 10e8fd: 8b 55 d0 mov -0x30(%ebp),%edx 10e900: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 10e907: 89 56 44 mov %edx,0x44(%esi) executing->Wait.id = id; 10e90a: 8b 7d ec mov -0x14(%ebp),%edi 10e90d: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.return_argument_second.mutable_object = buffer; 10e910: 8b 45 e8 mov -0x18(%ebp),%eax 10e913: 89 46 2c mov %eax,0x2c(%esi) executing->Wait.return_argument = size_p; 10e916: 8b 55 e4 mov -0x1c(%ebp),%edx 10e919: 89 56 28 mov %edx,0x28(%esi) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 10e91c: 51 push %ecx 10e91d: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10e91e: c7 45 10 88 04 11 00 movl $0x110488,0x10(%ebp) 10e925: 8b 7d dc mov -0x24(%ebp),%edi 10e928: 89 7d 0c mov %edi,0xc(%ebp) 10e92b: 8b 45 d0 mov -0x30(%ebp),%eax 10e92e: 89 45 08 mov %eax,0x8(%ebp) } 10e931: 8d 65 f4 lea -0xc(%ebp),%esp 10e934: 5b pop %ebx 10e935: 5e pop %esi 10e936: 5f pop %edi 10e937: 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 ); 10e938: e9 47 18 00 00 jmp 110184 <_Thread_queue_Enqueue_with_handler> =============================================================================== 00109b38 <_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 ) { 109b38: 55 push %ebp 109b39: 89 e5 mov %esp,%ebp 109b3b: 57 push %edi 109b3c: 56 push %esi 109b3d: 53 push %ebx 109b3e: 83 ec 1c sub $0x1c,%esp 109b41: 8b 5d 10 mov 0x10(%ebp),%ebx 109b44: 8a 45 20 mov 0x20(%ebp),%al 109b47: 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 ) { 109b4a: b8 01 00 00 00 mov $0x1,%eax 109b4f: 8b 55 08 mov 0x8(%ebp),%edx 109b52: 3b 5a 4c cmp 0x4c(%edx),%ebx 109b55: 0f 87 d9 00 00 00 ja 109c34 <_CORE_message_queue_Submit+0xfc> /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 109b5b: 8b 75 08 mov 0x8(%ebp),%esi 109b5e: 83 7e 48 00 cmpl $0x0,0x48(%esi) 109b62: 75 2e jne 109b92 <_CORE_message_queue_Submit+0x5a> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 109b64: 83 ec 0c sub $0xc,%esp 109b67: 56 push %esi 109b68: e8 57 16 00 00 call 10b1c4 <_Thread_queue_Dequeue> 109b6d: 89 c2 mov %eax,%edx if ( the_thread ) { 109b6f: 83 c4 10 add $0x10,%esp 109b72: 85 c0 test %eax,%eax 109b74: 74 1c je 109b92 <_CORE_message_queue_Submit+0x5a> * 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 109b76: 8b 78 2c mov 0x2c(%eax),%edi 109b79: 8b 75 0c mov 0xc(%ebp),%esi 109b7c: 89 d9 mov %ebx,%ecx 109b7e: 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; 109b80: 8b 40 28 mov 0x28(%eax),%eax 109b83: 89 18 mov %ebx,(%eax) the_thread->Wait.count = submit_type; 109b85: 8b 45 1c mov 0x1c(%ebp),%eax 109b88: 89 42 24 mov %eax,0x24(%edx) 109b8b: 31 c0 xor %eax,%eax 109b8d: e9 a2 00 00 00 jmp 109c34 <_CORE_message_queue_Submit+0xfc> /* * 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 < 109b92: 8b 55 08 mov 0x8(%ebp),%edx 109b95: 8b 42 48 mov 0x48(%edx),%eax 109b98: 3b 42 44 cmp 0x44(%edx),%eax 109b9b: 73 37 jae 109bd4 <_CORE_message_queue_Submit+0x9c> ); /** * 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. 109b9d: 83 ec 0c sub $0xc,%esp 109ba0: 89 d0 mov %edx,%eax 109ba2: 83 c0 68 add $0x68,%eax 109ba5: 50 push %eax 109ba6: e8 65 ff ff ff call 109b10 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 109bab: 83 c4 10 add $0x10,%esp 109bae: 85 c0 test %eax,%eax 109bb0: 74 7d je 109c2f <_CORE_message_queue_Submit+0xf7><== 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 109bb2: 8d 78 10 lea 0x10(%eax),%edi 109bb5: 8b 75 0c mov 0xc(%ebp),%esi 109bb8: 89 d9 mov %ebx,%ecx 109bba: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 109bbc: 89 58 0c mov %ebx,0xc(%eax) the_message->priority = submit_type; 109bbf: 8b 55 1c mov 0x1c(%ebp),%edx 109bc2: 89 50 08 mov %edx,0x8(%eax) _CORE_message_queue_Insert_message( 109bc5: 51 push %ecx 109bc6: 52 push %edx 109bc7: 50 push %eax 109bc8: ff 75 08 pushl 0x8(%ebp) 109bcb: e8 c4 41 00 00 call 10dd94 <_CORE_message_queue_Insert_message> 109bd0: 31 c0 xor %eax,%eax 109bd2: eb 56 jmp 109c2a <_CORE_message_queue_Submit+0xf2> * 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 ) { 109bd4: b8 02 00 00 00 mov $0x2,%eax 109bd9: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 109bdd: 74 55 je 109c34 <_CORE_message_queue_Submit+0xfc> /* * 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() ) { 109bdf: a1 34 d8 11 00 mov 0x11d834,%eax 109be4: 85 c0 test %eax,%eax 109be6: 75 47 jne 109c2f <_CORE_message_queue_Submit+0xf7><== 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; 109be8: a1 58 d8 11 00 mov 0x11d858,%eax _ISR_Disable( level ); 109bed: 9c pushf 109bee: fa cli 109bef: 59 pop %ecx { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 109bf0: 8b 75 08 mov 0x8(%ebp),%esi 109bf3: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 109bfa: 89 70 44 mov %esi,0x44(%eax) executing->Wait.id = id; 109bfd: 8b 55 14 mov 0x14(%ebp),%edx 109c00: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 109c03: 8b 55 0c mov 0xc(%ebp),%edx 109c06: 89 50 2c mov %edx,0x2c(%eax) executing->Wait.option = (uint32_t) size; 109c09: 89 58 30 mov %ebx,0x30(%eax) executing->Wait.count = submit_type; 109c0c: 8b 75 1c mov 0x1c(%ebp),%esi 109c0f: 89 70 24 mov %esi,0x24(%eax) _ISR_Enable( level ); 109c12: 51 push %ecx 109c13: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 109c14: 50 push %eax 109c15: 68 e0 b5 10 00 push $0x10b5e0 109c1a: ff 75 24 pushl 0x24(%ebp) 109c1d: ff 75 08 pushl 0x8(%ebp) 109c20: e8 b7 16 00 00 call 10b2dc <_Thread_queue_Enqueue_with_handler> 109c25: b8 07 00 00 00 mov $0x7,%eax 109c2a: 83 c4 10 add $0x10,%esp 109c2d: eb 05 jmp 109c34 <_CORE_message_queue_Submit+0xfc> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 109c2f: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED } 109c34: 8d 65 f4 lea -0xc(%ebp),%esp 109c37: 5b pop %ebx 109c38: 5e pop %esi 109c39: 5f pop %edi 109c3a: c9 leave 109c3b: c3 ret =============================================================================== 00109c48 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 109c48: 55 push %ebp 109c49: 89 e5 mov %esp,%ebp 109c4b: 57 push %edi 109c4c: 56 push %esi 109c4d: 53 push %ebx 109c4e: 83 ec 0c sub $0xc,%esp 109c51: 8b 5d 08 mov 0x8(%ebp),%ebx 109c54: 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; 109c57: 8d 7b 40 lea 0x40(%ebx),%edi 109c5a: b9 04 00 00 00 mov $0x4,%ecx 109c5f: 8b 75 0c mov 0xc(%ebp),%esi 109c62: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 109c64: 89 43 50 mov %eax,0x50(%ebx) the_mutex->blocked_count = 0; 109c67: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) if ( initial_lock == CORE_MUTEX_LOCKED ) { 109c6e: 85 c0 test %eax,%eax 109c70: 75 35 jne 109ca7 <_CORE_mutex_Initialize+0x5f> the_mutex->nest_count = 1; 109c72: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) the_mutex->holder = _Thread_Executing; 109c79: 8b 15 58 d8 11 00 mov 0x11d858,%edx 109c7f: 89 53 5c mov %edx,0x5c(%ebx) the_mutex->holder_id = _Thread_Executing->Object.id; 109c82: 8b 42 08 mov 0x8(%edx),%eax 109c85: 89 43 60 mov %eax,0x60(%ebx) /** * 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 109c88: 8b 43 48 mov 0x48(%ebx),%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 109c8b: 83 f8 02 cmp $0x2,%eax 109c8e: 74 05 je 109c95 <_CORE_mutex_Initialize+0x4d> 109c90: 83 f8 03 cmp $0x3,%eax 109c93: 75 27 jne 109cbc <_CORE_mutex_Initialize+0x74><== ALWAYS TAKEN _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 109c95: 8b 42 14 mov 0x14(%edx),%eax 109c98: b9 06 00 00 00 mov $0x6,%ecx 109c9d: 3b 43 4c cmp 0x4c(%ebx),%eax 109ca0: 72 3a jb 109cdc <_CORE_mutex_Initialize+0x94><== 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++; 109ca2: ff 42 1c incl 0x1c(%edx) 109ca5: eb 15 jmp 109cbc <_CORE_mutex_Initialize+0x74> } } else { the_mutex->nest_count = 0; 109ca7: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_mutex->holder = NULL; 109cae: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 109cb5: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) } _Thread_queue_Initialize( 109cbc: 6a 05 push $0x5 109cbe: 68 00 04 00 00 push $0x400 109cc3: 8b 45 0c mov 0xc(%ebp),%eax 109cc6: 83 78 08 00 cmpl $0x0,0x8(%eax) 109cca: 0f 95 c0 setne %al 109ccd: 0f b6 c0 movzbl %al,%eax 109cd0: 50 push %eax 109cd1: 53 push %ebx 109cd2: e8 39 18 00 00 call 10b510 <_Thread_queue_Initialize> 109cd7: 31 c9 xor %ecx,%ecx 109cd9: 83 c4 10 add $0x10,%esp STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 109cdc: 89 c8 mov %ecx,%eax 109cde: 8d 65 f4 lea -0xc(%ebp),%esp 109ce1: 5b pop %ebx 109ce2: 5e pop %esi 109ce3: 5f pop %edi 109ce4: c9 leave 109ce5: c3 ret =============================================================================== 00109d34 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 109d34: 55 push %ebp 109d35: 89 e5 mov %esp,%ebp 109d37: 56 push %esi 109d38: 53 push %ebx 109d39: 8b 75 08 mov 0x8(%ebp),%esi 109d3c: 8a 5d 10 mov 0x10(%ebp),%bl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 109d3f: a1 98 d7 11 00 mov 0x11d798,%eax 109d44: 85 c0 test %eax,%eax 109d46: 74 19 je 109d61 <_CORE_mutex_Seize+0x2d> 109d48: 84 db test %bl,%bl 109d4a: 74 15 je 109d61 <_CORE_mutex_Seize+0x2d><== NEVER TAKEN 109d4c: 83 3d 38 d9 11 00 01 cmpl $0x1,0x11d938 109d53: 76 0c jbe 109d61 <_CORE_mutex_Seize+0x2d> 109d55: 50 push %eax 109d56: 6a 13 push $0x13 109d58: 6a 00 push $0x0 109d5a: 6a 00 push $0x0 109d5c: e8 93 04 00 00 call 10a1f4 <_Internal_error_Occurred> 109d61: 50 push %eax 109d62: 50 push %eax 109d63: 8d 45 18 lea 0x18(%ebp),%eax 109d66: 50 push %eax 109d67: 56 push %esi 109d68: e8 f3 40 00 00 call 10de60 <_CORE_mutex_Seize_interrupt_trylock> 109d6d: 83 c4 10 add $0x10,%esp 109d70: 85 c0 test %eax,%eax 109d72: 74 49 je 109dbd <_CORE_mutex_Seize+0x89> 109d74: 84 db test %bl,%bl 109d76: 75 12 jne 109d8a <_CORE_mutex_Seize+0x56> 109d78: ff 75 18 pushl 0x18(%ebp) 109d7b: 9d popf 109d7c: a1 58 d8 11 00 mov 0x11d858,%eax 109d81: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 109d88: eb 33 jmp 109dbd <_CORE_mutex_Seize+0x89> { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 109d8a: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) 109d91: 8b 15 58 d8 11 00 mov 0x11d858,%edx 109d97: 89 72 44 mov %esi,0x44(%edx) 109d9a: 8b 45 0c mov 0xc(%ebp),%eax 109d9d: 89 42 20 mov %eax,0x20(%edx) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109da0: a1 98 d7 11 00 mov 0x11d798,%eax 109da5: 40 inc %eax 109da6: a3 98 d7 11 00 mov %eax,0x11d798 109dab: ff 75 18 pushl 0x18(%ebp) 109dae: 9d popf 109daf: 53 push %ebx 109db0: 53 push %ebx 109db1: ff 75 14 pushl 0x14(%ebp) 109db4: 56 push %esi 109db5: e8 2e ff ff ff call 109ce8 <_CORE_mutex_Seize_interrupt_blocking> 109dba: 83 c4 10 add $0x10,%esp } 109dbd: 8d 65 f8 lea -0x8(%ebp),%esp 109dc0: 5b pop %ebx 109dc1: 5e pop %esi 109dc2: c9 leave 109dc3: c3 ret =============================================================================== 0010de60 <_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 ) { 10de60: 55 push %ebp 10de61: 89 e5 mov %esp,%ebp 10de63: 56 push %esi 10de64: 53 push %ebx 10de65: 8b 4d 08 mov 0x8(%ebp),%ecx bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size ); 10de68: 8b 45 0c mov 0xc(%ebp),%eax 10de6b: 8b 30 mov (%eax),%esi /** * This function tries to resize in place the block that is pointed to by the * @a starting_address to the new @a size. * 10de6d: 8b 15 58 d8 11 00 mov 0x11d858,%edx * @param[in] the_heap is the heap to operate upon 10de73: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) * @param[in] starting_address is the starting address of the user block 10de7a: 83 79 50 00 cmpl $0x0,0x50(%ecx) 10de7e: 0f 84 82 00 00 00 je 10df06 <_CORE_mutex_Seize_interrupt_trylock+0xa6> * to be resized 10de84: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx) * @param[in] size is the new size 10de8b: 89 51 5c mov %edx,0x5c(%ecx) * 10de8e: 8b 42 08 mov 0x8(%edx),%eax 10de91: 89 41 60 mov %eax,0x60(%ecx) * @return TRUE if successfully able to resize the block. 10de94: 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 10de9b: 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. 10de9e: 83 f8 02 cmp $0x2,%eax 10dea1: 74 05 je 10dea8 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10dea3: 83 f8 03 cmp $0x3,%eax 10dea6: 75 03 jne 10deab <_CORE_mutex_Seize_interrupt_trylock+0x4b> void *starting_address, size_t size ); /** * This routine returns the block of memory which begins 10dea8: 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. * 10deab: 83 79 48 03 cmpl $0x3,0x48(%ecx) 10deaf: 74 04 je 10deb5 <_CORE_mutex_Seize_interrupt_trylock+0x55> * @param[in] the_heap is the heap to operate upon 10deb1: 56 push %esi 10deb2: 9d popf 10deb3: eb 74 jmp 10df29 <_CORE_mutex_Seize_interrupt_trylock+0xc9> void *start_address ); /** * This routine walks the heap to verify its integrity. * 10deb5: 8b 42 14 mov 0x14(%edx),%eax * @param[in] the_heap is the heap to operate upon 10deb8: 3b 41 4c cmp 0x4c(%ecx),%eax 10debb: 75 04 jne 10dec1 <_CORE_mutex_Seize_interrupt_trylock+0x61><== ALWAYS TAKEN * @param[in] source is a user specified integer which may be used to 10debd: 56 push %esi <== NOT EXECUTED 10debe: 9d popf <== NOT EXECUTED 10debf: eb 68 jmp 10df29 <_CORE_mutex_Seize_interrupt_trylock+0xc9><== NOT EXECUTED * 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. */ 10dec1: 76 27 jbe 10deea <_CORE_mutex_Seize_interrupt_trylock+0x8a> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10dec3: a1 98 d7 11 00 mov 0x11d798,%eax 10dec8: 40 inc %eax 10dec9: a3 98 d7 11 00 mov %eax,0x11d798 * 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, 10dece: 56 push %esi 10decf: 9d popf int source, 10ded0: 50 push %eax 10ded1: 6a 00 push $0x0 10ded3: ff 71 4c pushl 0x4c(%ecx) 10ded6: ff 71 5c pushl 0x5c(%ecx) 10ded9: e8 0e cb ff ff call 10a9ec <_Thread_Change_priority> bool do_dump ); /** * This routine walks the heap and tots up the free and allocated 10dede: e8 a9 cf ff ff call 10ae8c <_Thread_Enable_dispatch> 10dee3: 31 c0 xor %eax,%eax 10dee5: 83 c4 10 add $0x10,%esp 10dee8: eb 48 jmp 10df32 <_CORE_mutex_Seize_interrupt_trylock+0xd2> * sizes. * * @param[in] the_heap pointer to heap header * @param[in] the_info pointer to a status information area 10deea: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) * 10def1: c7 41 50 01 00 00 00 movl $0x1,0x50(%ecx) * @return true if successfully able to return information 10def8: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx) */ 10deff: ff 4a 1c decl 0x1c(%edx) bool _Protected_heap_Get_information( 10df02: 56 push %esi 10df03: 9d popf 10df04: eb 23 jmp 10df29 <_CORE_mutex_Seize_interrupt_trylock+0xc9> * 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. 10df06: 8b 59 5c mov 0x5c(%ecx),%ebx 10df09: 39 d3 cmp %edx,%ebx 10df0b: 75 20 jne 10df2d <_CORE_mutex_Seize_interrupt_trylock+0xcd> */ 10df0d: 8b 41 40 mov 0x40(%ecx),%eax 10df10: 85 c0 test %eax,%eax 10df12: 74 05 je 10df19 <_CORE_mutex_Seize_interrupt_trylock+0xb9> 10df14: 48 dec %eax 10df15: 75 16 jne 10df2d <_CORE_mutex_Seize_interrupt_trylock+0xcd> 10df17: eb 07 jmp 10df20 <_CORE_mutex_Seize_interrupt_trylock+0xc0> bool _Protected_heap_Get_free_information( Heap_Control *the_heap, 10df19: ff 41 54 incl 0x54(%ecx) Heap_Information *info 10df1c: 56 push %esi 10df1d: 9d popf 10df1e: eb 09 jmp 10df29 <_CORE_mutex_Seize_interrupt_trylock+0xc9> ); #ifdef __cplusplus 10df20: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) } 10df27: 56 push %esi 10df28: 9d popf 10df29: 31 c0 xor %eax,%eax 10df2b: eb 05 jmp 10df32 <_CORE_mutex_Seize_interrupt_trylock+0xd2> 10df2d: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10df32: 8d 65 f8 lea -0x8(%ebp),%esp 10df35: 5b pop %ebx 10df36: 5e pop %esi 10df37: c9 leave 10df38: c3 ret =============================================================================== 00109dc4 <_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 ) { 109dc4: 55 push %ebp 109dc5: 89 e5 mov %esp,%ebp 109dc7: 53 push %ebx 109dc8: 83 ec 04 sub $0x4,%esp 109dcb: 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; 109dce: 8b 4b 5c mov 0x5c(%ebx),%ecx * 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 ) { 109dd1: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 109dd5: 74 11 je 109de8 <_CORE_mutex_Surrender+0x24> if ( !_Thread_Is_executing( holder ) ) 109dd7: b8 03 00 00 00 mov $0x3,%eax 109ddc: 3b 0d 58 d8 11 00 cmp 0x11d858,%ecx 109de2: 0f 85 cb 00 00 00 jne 109eb3 <_CORE_mutex_Surrender+0xef> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 109de8: 8b 43 54 mov 0x54(%ebx),%eax 109deb: 85 c0 test %eax,%eax 109ded: 0f 84 be 00 00 00 je 109eb1 <_CORE_mutex_Surrender+0xed> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 109df3: 48 dec %eax 109df4: 89 43 54 mov %eax,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 109df7: 85 c0 test %eax,%eax 109df9: 74 17 je 109e12 <_CORE_mutex_Surrender+0x4e> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 109dfb: 8b 53 40 mov 0x40(%ebx),%edx 109dfe: 85 d2 test %edx,%edx 109e00: 0f 84 ab 00 00 00 je 109eb1 <_CORE_mutex_Surrender+0xed><== ALWAYS TAKEN 109e06: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 109e0b: 4a dec %edx <== NOT EXECUTED 109e0c: 0f 84 a1 00 00 00 je 109eb3 <_CORE_mutex_Surrender+0xef><== NOT EXECUTED /** * 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 109e12: 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 ) || 109e15: 83 f8 02 cmp $0x2,%eax 109e18: 74 05 je 109e1f <_CORE_mutex_Surrender+0x5b> 109e1a: 83 f8 03 cmp $0x3,%eax 109e1d: 75 03 jne 109e22 <_CORE_mutex_Surrender+0x5e> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 109e1f: ff 49 1c decl 0x1c(%ecx) } the_mutex->holder = NULL; 109e22: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 109e29: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 109e30: 8b 43 48 mov 0x48(%ebx),%eax /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 109e33: 83 f8 02 cmp $0x2,%eax 109e36: 74 05 je 109e3d <_CORE_mutex_Surrender+0x79> 109e38: 83 f8 03 cmp $0x3,%eax 109e3b: 75 1b jne 109e58 <_CORE_mutex_Surrender+0x94> _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 && 109e3d: 83 79 1c 00 cmpl $0x0,0x1c(%ecx) 109e41: 75 15 jne 109e58 <_CORE_mutex_Surrender+0x94> 109e43: 8b 41 18 mov 0x18(%ecx),%eax 109e46: 3b 41 14 cmp 0x14(%ecx),%eax 109e49: 74 0d je 109e58 <_CORE_mutex_Surrender+0x94> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 109e4b: 52 push %edx 109e4c: 6a 01 push $0x1 109e4e: 50 push %eax 109e4f: 51 push %ecx 109e50: e8 97 0b 00 00 call 10a9ec <_Thread_Change_priority> 109e55: 83 c4 10 add $0x10,%esp /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 109e58: 83 ec 0c sub $0xc,%esp 109e5b: 53 push %ebx 109e5c: e8 63 13 00 00 call 10b1c4 <_Thread_queue_Dequeue> 109e61: 89 c2 mov %eax,%edx 109e63: 83 c4 10 add $0x10,%esp 109e66: 85 c0 test %eax,%eax 109e68: 74 40 je 109eaa <_CORE_mutex_Surrender+0xe6> } else #endif { the_mutex->holder = the_thread; 109e6a: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 109e6d: 8b 40 08 mov 0x8(%eax),%eax 109e70: 89 43 60 mov %eax,0x60(%ebx) the_mutex->nest_count = 1; 109e73: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 109e7a: 8b 43 48 mov 0x48(%ebx),%eax 109e7d: 83 f8 02 cmp $0x2,%eax 109e80: 74 07 je 109e89 <_CORE_mutex_Surrender+0xc5> 109e82: 83 f8 03 cmp $0x3,%eax 109e85: 75 2a jne 109eb1 <_CORE_mutex_Surrender+0xed> 109e87: eb 05 jmp 109e8e <_CORE_mutex_Surrender+0xca> 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++; 109e89: ff 42 1c incl 0x1c(%edx) 109e8c: eb 23 jmp 109eb1 <_CORE_mutex_Surrender+0xed> 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++; 109e8e: ff 42 1c incl 0x1c(%edx) if (the_mutex->Attributes.priority_ceiling < 109e91: 8b 43 4c mov 0x4c(%ebx),%eax 109e94: 3b 42 14 cmp 0x14(%edx),%eax 109e97: 73 18 jae 109eb1 <_CORE_mutex_Surrender+0xed><== NEVER TAKEN the_thread->current_priority){ _Thread_Change_priority( 109e99: 51 push %ecx 109e9a: 6a 00 push $0x0 109e9c: 50 push %eax 109e9d: 52 push %edx 109e9e: e8 49 0b 00 00 call 10a9ec <_Thread_Change_priority> 109ea3: 31 c0 xor %eax,%eax 109ea5: 83 c4 10 add $0x10,%esp 109ea8: eb 09 jmp 109eb3 <_CORE_mutex_Surrender+0xef> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 109eaa: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 109eb1: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 109eb3: 8b 5d fc mov -0x4(%ebp),%ebx 109eb6: c9 leave 109eb7: c3 ret =============================================================================== 00109f04 <_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 ) { 109f04: 55 push %ebp 109f05: 89 e5 mov %esp,%ebp 109f07: 53 push %ebx 109f08: 83 ec 10 sub $0x10,%esp 109f0b: 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)) ) { 109f0e: 53 push %ebx 109f0f: e8 b0 12 00 00 call 10b1c4 <_Thread_queue_Dequeue> 109f14: 83 c4 10 add $0x10,%esp 109f17: 31 d2 xor %edx,%edx 109f19: 85 c0 test %eax,%eax 109f1b: 75 18 jne 109f35 <_CORE_semaphore_Surrender+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 109f1d: 9c pushf 109f1e: fa cli 109f1f: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 109f20: 8b 43 48 mov 0x48(%ebx),%eax 109f23: ba 04 00 00 00 mov $0x4,%edx 109f28: 3b 43 40 cmp 0x40(%ebx),%eax 109f2b: 73 06 jae 109f33 <_CORE_semaphore_Surrender+0x2f><== NEVER TAKEN the_semaphore->count += 1; 109f2d: 40 inc %eax 109f2e: 89 43 48 mov %eax,0x48(%ebx) 109f31: 31 d2 xor %edx,%edx else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 109f33: 51 push %ecx 109f34: 9d popf } return status; } 109f35: 89 d0 mov %edx,%eax 109f37: 8b 5d fc mov -0x4(%ebp),%ebx 109f3a: c9 leave 109f3b: c3 ret =============================================================================== 0010a750 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10a750: 55 push %ebp 10a751: 89 e5 mov %esp,%ebp 10a753: 53 push %ebx 10a754: 8b 4d 08 mov 0x8(%ebp),%ecx ISR_Level level; _ISR_Disable( level ); 10a757: 9c pushf 10a758: fa cli 10a759: 5b pop %ebx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10a75a: 8b 41 04 mov 0x4(%ecx),%eax 10a75d: 85 c0 test %eax,%eax 10a75f: 75 06 jne 10a767 <_CORE_spinlock_Release+0x17> _ISR_Enable( level ); 10a761: 53 push %ebx 10a762: 9d popf 10a763: b0 06 mov $0x6,%al 10a765: eb 2f jmp 10a796 <_CORE_spinlock_Release+0x46> } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10a767: 8b 51 0c mov 0xc(%ecx),%edx 10a76a: a1 d8 e7 11 00 mov 0x11e7d8,%eax 10a76f: 3b 50 08 cmp 0x8(%eax),%edx 10a772: 74 09 je 10a77d <_CORE_spinlock_Release+0x2d><== ALWAYS TAKEN _ISR_Enable( level ); 10a774: 53 push %ebx <== NOT EXECUTED 10a775: 9d popf <== NOT EXECUTED 10a776: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 10a77b: eb 19 jmp 10a796 <_CORE_spinlock_Release+0x46><== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10a77d: 8b 41 08 mov 0x8(%ecx),%eax 10a780: 48 dec %eax 10a781: 89 41 08 mov %eax,0x8(%ecx) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10a784: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_spinlock->holder = 0; 10a78b: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx) _ISR_Enable( level ); 10a792: 53 push %ebx 10a793: 9d popf 10a794: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; } 10a796: 5b pop %ebx 10a797: c9 leave 10a798: c3 ret =============================================================================== 0010a79c <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10a79c: 55 push %ebp 10a79d: 89 e5 mov %esp,%ebp 10a79f: 57 push %edi 10a7a0: 56 push %esi 10a7a1: 53 push %ebx 10a7a2: 83 ec 0c sub $0xc,%esp 10a7a5: 8b 5d 08 mov 0x8(%ebp),%ebx 10a7a8: 8b 7d 10 mov 0x10(%ebp),%edi 10a7ab: 8a 45 0c mov 0xc(%ebp),%al 10a7ae: 88 45 f3 mov %al,-0xd(%ebp) ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 10a7b1: a1 68 e8 11 00 mov 0x11e868,%eax 10a7b6: 8d 34 07 lea (%edi,%eax,1),%esi _ISR_Disable( level ); 10a7b9: 9c pushf 10a7ba: fa cli 10a7bb: 59 pop %ecx if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10a7bc: 8b 43 04 mov 0x4(%ebx),%eax 10a7bf: 48 dec %eax 10a7c0: 75 16 jne 10a7d8 <_CORE_spinlock_Wait+0x3c> 10a7c2: 8b 53 0c mov 0xc(%ebx),%edx 10a7c5: a1 d8 e7 11 00 mov 0x11e7d8,%eax 10a7ca: 3b 50 08 cmp 0x8(%eax),%edx 10a7cd: 75 09 jne 10a7d8 <_CORE_spinlock_Wait+0x3c> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 10a7cf: 51 push %ecx 10a7d0: 9d popf 10a7d1: b8 01 00 00 00 mov $0x1,%eax 10a7d6: eb 70 jmp 10a848 <_CORE_spinlock_Wait+0xac> return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10a7d8: 8b 43 08 mov 0x8(%ebx),%eax 10a7db: 40 inc %eax 10a7dc: 89 43 08 mov %eax,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10a7df: 8b 43 04 mov 0x4(%ebx),%eax 10a7e2: 85 c0 test %eax,%eax 10a7e4: 75 18 jne 10a7fe <_CORE_spinlock_Wait+0x62> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10a7e6: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10a7ed: a1 d8 e7 11 00 mov 0x11e7d8,%eax 10a7f2: 8b 40 08 mov 0x8(%eax),%eax 10a7f5: 89 43 0c mov %eax,0xc(%ebx) _ISR_Enable( level ); 10a7f8: 51 push %ecx 10a7f9: 9d popf 10a7fa: 31 c0 xor %eax,%eax 10a7fc: eb 4a jmp 10a848 <_CORE_spinlock_Wait+0xac> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10a7fe: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10a802: 75 10 jne 10a814 <_CORE_spinlock_Wait+0x78><== ALWAYS TAKEN the_spinlock->users -= 1; 10a804: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a807: 48 dec %eax <== NOT EXECUTED 10a808: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED _ISR_Enable( level ); 10a80b: 51 push %ecx <== NOT EXECUTED 10a80c: 9d popf <== NOT EXECUTED 10a80d: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED 10a812: eb 34 jmp 10a848 <_CORE_spinlock_Wait+0xac><== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 10a814: 85 ff test %edi,%edi 10a816: 74 19 je 10a831 <_CORE_spinlock_Wait+0x95><== ALWAYS TAKEN 10a818: a1 68 e8 11 00 mov 0x11e868,%eax <== NOT EXECUTED 10a81d: 39 c6 cmp %eax,%esi <== NOT EXECUTED 10a81f: 77 10 ja 10a831 <_CORE_spinlock_Wait+0x95><== NOT EXECUTED the_spinlock->users -= 1; 10a821: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a824: 48 dec %eax <== NOT EXECUTED 10a825: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED _ISR_Enable( level ); 10a828: 51 push %ecx <== NOT EXECUTED 10a829: 9d popf <== NOT EXECUTED 10a82a: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED 10a82f: eb 17 jmp 10a848 <_CORE_spinlock_Wait+0xac><== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10a831: 51 push %ecx 10a832: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10a833: e8 68 0f 00 00 call 10b7a0 <_Thread_Enable_dispatch> 10a838: a1 18 e7 11 00 mov 0x11e718,%eax 10a83d: 40 inc %eax 10a83e: a3 18 e7 11 00 mov %eax,0x11e718 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10a843: 9c pushf 10a844: fa cli 10a845: 59 pop %ecx 10a846: eb 97 jmp 10a7df <_CORE_spinlock_Wait+0x43> } } 10a848: 83 c4 0c add $0xc,%esp 10a84b: 5b pop %ebx 10a84c: 5e pop %esi 10a84d: 5f pop %edi 10a84e: c9 leave 10a84f: c3 ret =============================================================================== 0010dcf1 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 10dcf1: 55 push %ebp <== NOT EXECUTED 10dcf2: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10dcf4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10dcf7: 85 05 5c d8 11 00 test %eax,0x11d85c <== NOT EXECUTED 10dcfd: 0f 95 c0 setne %al <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 10dd00: c9 leave <== NOT EXECUTED 10dd01: c3 ret <== NOT EXECUTED =============================================================================== 00108bcc <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 108bcc: 55 push %ebp 108bcd: 89 e5 mov %esp,%ebp 108bcf: 57 push %edi 108bd0: 56 push %esi 108bd1: 53 push %ebx 108bd2: 83 ec 0c sub $0xc,%esp 108bd5: 8b 45 08 mov 0x8(%ebp),%eax 108bd8: 8b 75 0c mov 0xc(%ebp),%esi 108bdb: 8b 55 10 mov 0x10(%ebp),%edx 108bde: 89 55 ec mov %edx,-0x14(%ebp) 108be1: 8b 4d 14 mov 0x14(%ebp),%ecx 108be4: 89 4d e8 mov %ecx,-0x18(%ebp) rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 108be7: 8b 1d 58 d8 11 00 mov 0x11d858,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 108bed: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 108bf4: 8b 93 f4 00 00 00 mov 0xf4(%ebx),%edx 108bfa: 89 55 f0 mov %edx,-0x10(%ebp) _ISR_Disable( level ); 108bfd: 9c pushf 108bfe: fa cli 108bff: 5f pop %edi pending_events = api->pending_events; 108c00: 8b 4d f0 mov -0x10(%ebp),%ecx 108c03: 8b 11 mov (%ecx),%edx seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 108c05: 89 c1 mov %eax,%ecx 108c07: 21 d1 and %edx,%ecx 108c09: 74 23 je 108c2e <_Event_Seize+0x62> 108c0b: 39 c1 cmp %eax,%ecx 108c0d: 74 08 je 108c17 <_Event_Seize+0x4b> 108c0f: f7 c6 02 00 00 00 test $0x2,%esi 108c15: 74 17 je 108c2e <_Event_Seize+0x62> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 108c17: 89 c8 mov %ecx,%eax 108c19: f7 d0 not %eax 108c1b: 21 d0 and %edx,%eax 108c1d: 8b 55 f0 mov -0x10(%ebp),%edx 108c20: 89 02 mov %eax,(%edx) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 108c22: 57 push %edi 108c23: 9d popf *event_out = seized_events; 108c24: 8b 45 e8 mov -0x18(%ebp),%eax 108c27: 89 08 mov %ecx,(%eax) 108c29: e9 ad 00 00 00 jmp 108cdb <_Event_Seize+0x10f> return; } if ( _Options_Is_no_wait( option_set ) ) { 108c2e: f7 c6 01 00 00 00 test $0x1,%esi 108c34: 74 13 je 108c49 <_Event_Seize+0x7d> _ISR_Enable( level ); 108c36: 57 push %edi 108c37: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 108c38: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 108c3f: 8b 55 e8 mov -0x18(%ebp),%edx 108c42: 89 0a mov %ecx,(%edx) 108c44: e9 92 00 00 00 jmp 108cdb <_Event_Seize+0x10f> return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 108c49: c7 05 8c e0 11 00 01 movl $0x1,0x11e08c 108c50: 00 00 00 executing->Wait.option = (uint32_t) option_set; 108c53: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 108c56: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 108c59: 8b 4d e8 mov -0x18(%ebp),%ecx 108c5c: 89 4b 28 mov %ecx,0x28(%ebx) _ISR_Enable( level ); 108c5f: 57 push %edi 108c60: 9d popf if ( ticks ) { 108c61: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 108c65: 74 34 je 108c9b <_Event_Seize+0xcf> _Watchdog_Initialize( 108c67: 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. * 108c6a: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) * @param[in] the_heap is the heap to operate upon 108c71: c7 43 64 1c 8e 10 00 movl $0x108e1c,0x64(%ebx) * @param[in] starting_address is the starting address of the memory for 108c78: 89 43 68 mov %eax,0x68(%ebx) * the heap 108c7b: 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, 108c82: 8b 45 ec mov -0x14(%ebp),%eax 108c85: 89 43 54 mov %eax,0x54(%ebx) void *starting_address, size_t *size 108c88: 52 push %edx 108c89: 52 push %edx 108c8a: 8d 43 48 lea 0x48(%ebx),%eax 108c8d: 50 push %eax 108c8e: 68 78 d8 11 00 push $0x11d878 108c93: e8 90 2f 00 00 call 10bc28 <_Watchdog_Insert> 108c98: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 108c9b: 50 push %eax 108c9c: 50 push %eax 108c9d: 68 00 01 00 00 push $0x100 108ca2: 53 push %ebx 108ca3: e8 d4 29 00 00 call 10b67c <_Thread_Set_state> _ISR_Disable( level ); 108ca8: 9c pushf 108ca9: fa cli 108caa: 5a pop %edx sync_state = _Event_Sync_state; 108cab: a1 8c e0 11 00 mov 0x11e08c,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 108cb0: c7 05 8c e0 11 00 00 movl $0x0,0x11e08c 108cb7: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 108cba: 83 c4 10 add $0x10,%esp 108cbd: 83 f8 01 cmp $0x1,%eax 108cc0: 75 04 jne 108cc6 <_Event_Seize+0xfa> _ISR_Enable( level ); 108cc2: 52 push %edx 108cc3: 9d popf 108cc4: eb 15 jmp 108cdb <_Event_Seize+0x10f> * 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 ); 108cc6: 89 55 10 mov %edx,0x10(%ebp) 108cc9: 89 5d 0c mov %ebx,0xc(%ebp) 108ccc: 89 45 08 mov %eax,0x8(%ebp) } 108ccf: 8d 65 f4 lea -0xc(%ebp),%esp 108cd2: 5b pop %ebx 108cd3: 5e pop %esi 108cd4: 5f pop %edi 108cd5: 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 ); 108cd6: e9 c5 1c 00 00 jmp 10a9a0 <_Thread_blocking_operation_Cancel> } 108cdb: 8d 65 f4 lea -0xc(%ebp),%esp 108cde: 5b pop %ebx 108cdf: 5e pop %esi 108ce0: 5f pop %edi 108ce1: c9 leave 108ce2: c3 ret =============================================================================== 00108d30 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 108d30: 55 push %ebp 108d31: 89 e5 mov %esp,%ebp 108d33: 57 push %edi 108d34: 56 push %esi 108d35: 53 push %ebx 108d36: 83 ec 0c sub $0xc,%esp 108d39: 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 ]; 108d3c: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 108d42: 89 45 f0 mov %eax,-0x10(%ebp) option_set = (rtems_option) the_thread->Wait.option; 108d45: 8b 53 30 mov 0x30(%ebx),%edx 108d48: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 108d4b: 9c pushf 108d4c: fa cli 108d4d: 5f pop %edi pending_events = api->pending_events; 108d4e: 8b 30 mov (%eax),%esi event_condition = (rtems_event_set) the_thread->Wait.count; 108d50: 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 ) ) { 108d53: 89 d1 mov %edx,%ecx 108d55: 21 f1 and %esi,%ecx 108d57: 75 07 jne 108d60 <_Event_Surrender+0x30> _ISR_Enable( level ); 108d59: 57 push %edi 108d5a: 9d popf 108d5b: e9 b1 00 00 00 jmp 108e11 <_Event_Surrender+0xe1> /* * 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() && 108d60: a1 34 d8 11 00 mov 0x11d834,%eax 108d65: 85 c0 test %eax,%eax 108d67: 74 49 je 108db2 <_Event_Surrender+0x82> 108d69: 3b 1d 58 d8 11 00 cmp 0x11d858,%ebx 108d6f: 75 41 jne 108db2 <_Event_Surrender+0x82> <== NEVER TAKEN 108d71: a1 8c e0 11 00 mov 0x11e08c,%eax 108d76: 48 dec %eax 108d77: 74 0a je 108d83 <_Event_Surrender+0x53> <== ALWAYS TAKEN 108d79: a1 8c e0 11 00 mov 0x11e08c,%eax <== NOT EXECUTED 108d7e: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 108d81: 75 2f jne 108db2 <_Event_Surrender+0x82> <== 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) ) { 108d83: 39 d1 cmp %edx,%ecx 108d85: 74 06 je 108d8d <_Event_Surrender+0x5d> <== ALWAYS TAKEN 108d87: f6 45 ec 02 testb $0x2,-0x14(%ebp) <== NOT EXECUTED 108d8b: 74 21 je 108dae <_Event_Surrender+0x7e> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 108d8d: 89 c8 mov %ecx,%eax 108d8f: f7 d0 not %eax 108d91: 21 f0 and %esi,%eax 108d93: 8b 55 f0 mov -0x10(%ebp),%edx 108d96: 89 02 mov %eax,(%edx) the_thread->Wait.count = 0; 108d98: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 108d9f: 8b 43 28 mov 0x28(%ebx),%eax 108da2: 89 08 mov %ecx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 108da4: c7 05 8c e0 11 00 03 movl $0x3,0x11e08c 108dab: 00 00 00 } _ISR_Enable( level ); 108dae: 57 push %edi 108daf: 9d popf 108db0: eb 5f jmp 108e11 <_Event_Surrender+0xe1> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 108db2: f6 43 11 01 testb $0x1,0x11(%ebx) 108db6: 74 57 je 108e0f <_Event_Surrender+0xdf> <== NEVER TAKEN if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 108db8: 39 d1 cmp %edx,%ecx 108dba: 74 06 je 108dc2 <_Event_Surrender+0x92> 108dbc: f6 45 ec 02 testb $0x2,-0x14(%ebp) 108dc0: 74 4d je 108e0f <_Event_Surrender+0xdf> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 108dc2: 89 c8 mov %ecx,%eax 108dc4: f7 d0 not %eax 108dc6: 21 f0 and %esi,%eax 108dc8: 8b 55 f0 mov -0x10(%ebp),%edx 108dcb: 89 02 mov %eax,(%edx) the_thread->Wait.count = 0; 108dcd: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 108dd4: 8b 43 28 mov 0x28(%ebx),%eax 108dd7: 89 08 mov %ecx,(%eax) _ISR_Flash( level ); 108dd9: 57 push %edi 108dda: 9d popf 108ddb: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 108ddc: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 108de0: 74 06 je 108de8 <_Event_Surrender+0xb8> _ISR_Enable( level ); 108de2: 57 push %edi 108de3: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 108de4: 51 push %ecx 108de5: 51 push %ecx 108de6: eb 17 jmp 108dff <_Event_Surrender+0xcf> * 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 */ 108de8: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 108def: 57 push %edi 108df0: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 108df1: 83 ec 0c sub $0xc,%esp 108df4: 8d 43 48 lea 0x48(%ebx),%eax 108df7: 50 push %eax 108df8: e8 43 2f 00 00 call 10bd40 <_Watchdog_Remove> void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 108dfd: 58 pop %eax 108dfe: 5a pop %edx 108dff: 68 f8 ff 03 10 push $0x1003fff8 108e04: 53 push %ebx 108e05: e8 02 1d 00 00 call 10ab0c <_Thread_Clear_state> 108e0a: 83 c4 10 add $0x10,%esp 108e0d: eb 02 jmp 108e11 <_Event_Surrender+0xe1> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 108e0f: 57 push %edi <== NOT EXECUTED 108e10: 9d popf <== NOT EXECUTED } 108e11: 8d 65 f4 lea -0xc(%ebp),%esp 108e14: 5b pop %ebx 108e15: 5e pop %esi 108e16: 5f pop %edi 108e17: c9 leave 108e18: c3 ret =============================================================================== 00108e1c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 108e1c: 55 push %ebp 108e1d: 89 e5 mov %esp,%ebp 108e1f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 108e22: 8d 45 fc lea -0x4(%ebp),%eax 108e25: 50 push %eax 108e26: ff 75 08 pushl 0x8(%ebp) 108e29: e8 7e 20 00 00 call 10aeac <_Thread_Get> 108e2e: 89 c2 mov %eax,%edx switch ( location ) { 108e30: 83 c4 10 add $0x10,%esp 108e33: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 108e37: 75 5f jne 108e98 <_Event_Timeout+0x7c> <== NEVER TAKEN * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 108e39: 9c pushf 108e3a: fa cli 108e3b: 59 pop %ecx if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 108e3c: 83 78 24 00 cmpl $0x0,0x24(%eax) 108e40: 75 0f jne 108e51 <_Event_Timeout+0x35> <== ALWAYS TAKEN 108e42: a1 98 d7 11 00 mov 0x11d798,%eax <== NOT EXECUTED 108e47: 48 dec %eax <== NOT EXECUTED 108e48: a3 98 d7 11 00 mov %eax,0x11d798 <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 108e4d: 51 push %ecx <== NOT EXECUTED 108e4e: 9d popf <== NOT EXECUTED 108e4f: eb 47 jmp 108e98 <_Event_Timeout+0x7c> <== NOT EXECUTED return; } the_thread->Wait.count = 0; 108e51: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 108e58: 3b 05 58 d8 11 00 cmp 0x11d858,%eax 108e5e: 75 14 jne 108e74 <_Event_Timeout+0x58> Thread_blocking_operation_States sync = _Event_Sync_state; 108e60: a1 8c e0 11 00 mov 0x11e08c,%eax if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 108e65: 83 f8 01 cmp $0x1,%eax 108e68: 77 0a ja 108e74 <_Event_Timeout+0x58> <== NEVER TAKEN (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 108e6a: c7 05 8c e0 11 00 02 movl $0x2,0x11e08c 108e71: 00 00 00 } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 108e74: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) _ISR_Enable( level ); 108e7b: 51 push %ecx 108e7c: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 108e7d: 50 push %eax 108e7e: 50 push %eax 108e7f: 68 f8 ff 03 10 push $0x1003fff8 108e84: 52 push %edx 108e85: e8 82 1c 00 00 call 10ab0c <_Thread_Clear_state> 108e8a: a1 98 d7 11 00 mov 0x11d798,%eax 108e8f: 48 dec %eax 108e90: a3 98 d7 11 00 mov %eax,0x11d798 108e95: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 108e98: c9 leave 108e99: c3 ret =============================================================================== 0010df90 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 10df90: 55 push %ebp 10df91: 89 e5 mov %esp,%ebp 10df93: 57 push %edi 10df94: 56 push %esi 10df95: 53 push %ebx 10df96: 83 ec 10 sub $0x10,%esp 10df99: 8b 75 08 mov 0x8(%ebp),%esi Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 10df9c: ff 76 14 pushl 0x14(%esi) 10df9f: ff 76 10 pushl 0x10(%esi) 10dfa2: ff 75 0c pushl 0xc(%ebp) 10dfa5: e8 91 c1 ff ff call 10a13b <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 10dfaa: 83 c4 10 add $0x10,%esp 10dfad: 31 d2 xor %edx,%edx 10dfaf: 85 c0 test %eax,%eax 10dfb1: 74 3c je 10dfef <_Heap_Allocate+0x5f> <== 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( 10dfb3: 8b 5e 08 mov 0x8(%esi),%ebx 10dfb6: 31 ff xor %edi,%edi 10dfb8: eb 27 jmp 10dfe1 <_Heap_Allocate+0x51> /* 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) { 10dfba: 39 43 04 cmp %eax,0x4(%ebx) 10dfbd: 72 1e jb 10dfdd <_Heap_Allocate+0x4d> (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 10dfbf: 52 push %edx 10dfc0: 50 push %eax 10dfc1: 53 push %ebx 10dfc2: 56 push %esi 10dfc3: e8 b0 c1 ff ff call 10a178 <_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 10dfc8: 8d 53 08 lea 0x8(%ebx),%edx ptr = _Heap_User_area(the_block); stats->allocs += 1; 10dfcb: ff 46 48 incl 0x48(%esi) stats->searches += search_count + 1; 10dfce: 8b 46 4c mov 0x4c(%esi),%eax 10dfd1: 8d 44 07 01 lea 0x1(%edi,%eax,1),%eax 10dfd5: 89 46 4c mov %eax,0x4c(%esi) 10dfd8: 83 c4 10 add $0x10,%esp 10dfdb: eb 0a jmp 10dfe7 <_Heap_Allocate+0x57> 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) 10dfdd: 8b 5b 08 mov 0x8(%ebx),%ebx 10dfe0: 47 inc %edi if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 10dfe1: 39 f3 cmp %esi,%ebx 10dfe3: 75 d5 jne 10dfba <_Heap_Allocate+0x2a> 10dfe5: 31 d2 xor %edx,%edx _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 10dfe7: 39 7e 44 cmp %edi,0x44(%esi) 10dfea: 73 03 jae 10dfef <_Heap_Allocate+0x5f> stats->max_search = search_count; 10dfec: 89 7e 44 mov %edi,0x44(%esi) return ptr; } 10dfef: 89 d0 mov %edx,%eax 10dff1: 8d 65 f4 lea -0xc(%ebp),%esp 10dff4: 5b pop %ebx 10dff5: 5e pop %esi 10dff6: 5f pop %edi 10dff7: c9 leave 10dff8: c3 ret =============================================================================== 0010b7f8 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 10b7f8: 55 push %ebp 10b7f9: 89 e5 mov %esp,%ebp 10b7fb: 57 push %edi 10b7fc: 56 push %esi 10b7fd: 53 push %ebx 10b7fe: 83 ec 30 sub $0x30,%esp 10b801: 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; 10b804: 8b 55 08 mov 0x8(%ebp),%edx 10b807: 8b 52 10 mov 0x10(%edx),%edx 10b80a: 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; 10b80d: 8d 48 fc lea -0x4(%eax),%ecx 10b810: 89 4d e0 mov %ecx,-0x20(%ebp) uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 10b813: 8b 55 08 mov 0x8(%ebp),%edx 10b816: ff 72 14 pushl 0x14(%edx) 10b819: ff 75 dc pushl -0x24(%ebp) 10b81c: 50 push %eax 10b81d: e8 2d 04 00 00 call 10bc4f <_Heap_Calc_block_size> 10b822: 89 45 e4 mov %eax,-0x1c(%ebp) if(the_size == 0) 10b825: 83 c4 10 add $0x10,%esp 10b828: 31 c0 xor %eax,%eax 10b82a: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b82e: 0f 84 30 01 00 00 je 10b964 <_Heap_Allocate_aligned+0x16c><== NEVER TAKEN return NULL; if(alignment == 0) 10b834: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10b838: 75 07 jne 10b841 <_Heap_Allocate_aligned+0x49> 10b83a: c7 45 10 04 00 00 00 movl $0x4,0x10(%ebp) ) { return ( the_thread == _Thread_Heir ); } /** 10b841: 8b 4d 08 mov 0x8(%ebp),%ecx 10b844: 8b 59 08 mov 0x8(%ecx),%ebx 10b847: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) 10b84e: e9 f8 00 00 00 jmp 10b94b <_Heap_Allocate_aligned+0x153> 10b853: 8b 43 04 mov 0x4(%ebx),%eax 10b856: 83 e0 fe and $0xfffffffe,%eax 10b859: 89 45 e8 mov %eax,-0x18(%ebp) 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. */ 10b85c: 8b 55 e4 mov -0x1c(%ebp),%edx 10b85f: 39 d0 cmp %edx,%eax 10b861: 0f 82 de 00 00 00 jb 10b945 <_Heap_Allocate_aligned+0x14d> _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 10b867: 8d 4b 08 lea 0x8(%ebx),%ecx /* 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; 10b86a: 01 d8 add %ebx,%eax 10b86c: 89 45 ec mov %eax,-0x14(%ebp) aligned_user_addr = block_end - end_to_user_offs; 10b86f: 89 c6 mov %eax,%esi 10b871: 2b 75 e0 sub -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; } 10b874: 89 f0 mov %esi,%eax 10b876: 31 d2 xor %edx,%edx 10b878: f7 75 10 divl 0x10(%ebp) 10b87b: 89 f7 mov %esi,%edi 10b87d: 29 d7 sub %edx,%edi 10b87f: 89 f8 mov %edi,%eax 10b881: 31 d2 xor %edx,%edx 10b883: f7 75 dc divl -0x24(%ebp) 10b886: 89 fe mov %edi,%esi 10b888: 29 d6 sub %edx,%esi 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) { 10b88a: 39 ce cmp %ecx,%esi 10b88c: 0f 82 b3 00 00 00 jb 10b945 <_Heap_Allocate_aligned+0x14d> /* 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) { 10b892: 8b 55 08 mov 0x8(%ebp),%edx 10b895: 8b 52 14 mov 0x14(%edx),%edx 10b898: 89 55 f0 mov %edx,-0x10(%ebp) 10b89b: 89 f0 mov %esi,%eax 10b89d: 29 c8 sub %ecx,%eax 10b89f: 39 d0 cmp %edx,%eax 10b8a1: 73 2f jae 10b8d2 <_Heap_Allocate_aligned+0xda> '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) { 10b8a3: 89 f8 mov %edi,%eax 10b8a5: 29 c8 sub %ecx,%eax 10b8a7: 89 ce mov %ecx,%esi 10b8a9: 3b 45 dc cmp -0x24(%ebp),%eax 10b8ac: 72 24 jb 10b8d2 <_Heap_Allocate_aligned+0xda> RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); } /** 10b8ae: 89 c8 mov %ecx,%eax 10b8b0: 31 d2 xor %edx,%edx 10b8b2: f7 75 10 divl 0x10(%ebp) 10b8b5: 89 d6 mov %edx,%esi * This function returns TRUE if dispatching is disabled, and FALSE 10b8b7: 89 ca mov %ecx,%edx 10b8b9: 85 f6 test %esi,%esi 10b8bb: 74 08 je 10b8c5 <_Heap_Allocate_aligned+0xcd> 10b8bd: 8b 45 10 mov 0x10(%ebp),%eax 10b8c0: 8d 14 01 lea (%ecx,%eax,1),%edx 10b8c3: 29 f2 sub %esi,%edx /* 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) { 10b8c5: 89 d0 mov %edx,%eax 10b8c7: 29 c8 sub %ecx,%eax 10b8c9: 3b 45 dc cmp -0x24(%ebp),%eax 10b8cc: 73 77 jae 10b945 <_Heap_Allocate_aligned+0x14d> 10b8ce: 89 ce mov %ecx,%esi 10b8d0: 89 d7 mov %edx,%edi aligned_user_addr = 0; } } } if(aligned_user_addr) { 10b8d2: 85 ff test %edi,%edi 10b8d4: 74 6f je 10b945 <_Heap_Allocate_aligned+0x14d><== NEVER TAKEN /* 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; 10b8d6: 8b 55 ec mov -0x14(%ebp),%edx 10b8d9: 83 c2 08 add $0x8,%edx 10b8dc: 29 f2 sub %esi,%edx 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; 10b8de: 8b 4d e8 mov -0x18(%ebp),%ecx 10b8e1: 29 d1 sub %edx,%ecx _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) { 10b8e3: 3b 4d f0 cmp -0x10(%ebp),%ecx 10b8e6: 72 14 jb 10b8fc <_Heap_Allocate_aligned+0x104> /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 10b8e8: 89 c8 mov %ecx,%eax 10b8ea: 83 c8 01 or $0x1,%eax 10b8ed: 89 43 04 mov %eax,0x4(%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 ); 10b8f0: 8d 04 0b lea (%ebx,%ecx,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 10b8f3: 89 c3 mov %eax,%ebx the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 10b8f5: 89 08 mov %ecx,(%eax) the_block->size = alloc_size; 10b8f7: 89 50 04 mov %edx,0x4(%eax) 10b8fa: eb 15 jmp 10b911 <_Heap_Allocate_aligned+0x119> * This routine resets the current context of the calling thread * to that of its initial state. */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { 10b8fc: 8b 53 08 mov 0x8(%ebx),%edx #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 10b8ff: 8b 43 0c mov 0xc(%ebx),%eax if ( _Thread_Executing->fp_context != NULL ) 10b902: 89 50 08 mov %edx,0x8(%eax) _Context_Restore_fp( &_Thread_Executing->fp_context ); 10b905: 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; 10b908: 8b 55 08 mov 0x8(%ebp),%edx 10b90b: ff 4a 38 decl 0x38(%edx) 10b90e: 8b 55 e8 mov -0x18(%ebp),%edx } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 10b911: 83 4c 13 04 01 orl $0x1,0x4(%ebx,%edx,1) /* Update statistics */ stats->free_size -= alloc_size; 10b916: 8b 4d 08 mov 0x8(%ebp),%ecx 10b919: 8b 41 30 mov 0x30(%ecx),%eax 10b91c: 29 d0 sub %edx,%eax 10b91e: 89 41 30 mov %eax,0x30(%ecx) if(stats->min_free_size > stats->free_size) 10b921: 39 41 34 cmp %eax,0x34(%ecx) 10b924: 76 03 jbe 10b929 <_Heap_Allocate_aligned+0x131> stats->min_free_size = stats->free_size; 10b926: 89 41 34 mov %eax,0x34(%ecx) stats->used_blocks += 1; 10b929: 8b 45 08 mov 0x8(%ebp),%eax 10b92c: ff 40 40 incl 0x40(%eax) _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; 10b92f: 89 c2 mov %eax,%edx 10b931: 8b 40 4c mov 0x4c(%eax),%eax 10b934: 8b 4d d8 mov -0x28(%ebp),%ecx 10b937: 8d 44 01 01 lea 0x1(%ecx,%eax,1),%eax 10b93b: 89 42 4c mov %eax,0x4c(%edx) stats->allocs += 1; 10b93e: ff 42 48 incl 0x48(%edx) check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 10b941: 89 f8 mov %edi,%eax 10b943: eb 11 jmp 10b956 <_Heap_Allocate_aligned+0x15e> /* 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) 10b945: 8b 5b 08 mov 0x8(%ebx),%ebx 10b948: ff 45 d8 incl -0x28(%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; 10b94b: 3b 5d 08 cmp 0x8(%ebp),%ebx 10b94e: 0f 85 ff fe ff ff jne 10b853 <_Heap_Allocate_aligned+0x5b> 10b954: 31 c0 xor %eax,%eax } } } } if(stats->max_search < search_count) 10b956: 8b 55 d8 mov -0x28(%ebp),%edx 10b959: 8b 4d 08 mov 0x8(%ebp),%ecx 10b95c: 39 51 44 cmp %edx,0x44(%ecx) 10b95f: 73 03 jae 10b964 <_Heap_Allocate_aligned+0x16c> stats->max_search = search_count; 10b961: 89 51 44 mov %edx,0x44(%ecx) return user_ptr; } 10b964: 8d 65 f4 lea -0xc(%ebp),%esp 10b967: 5b pop %ebx 10b968: 5e pop %esi 10b969: 5f pop %edi 10b96a: c9 leave 10b96b: c3 ret =============================================================================== 0010ff58 <_Heap_Extend>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t *amount_extended ) { 10ff58: 55 push %ebp 10ff59: 89 e5 mov %esp,%ebp 10ff5b: 57 push %edi 10ff5c: 56 push %esi 10ff5d: 53 push %ebx 10ff5e: 83 ec 0c sub $0xc,%esp 10ff61: 8b 4d 08 mov 0x8(%ebp),%ecx 10ff64: 8b 55 0c mov 0xc(%ebp),%edx 10ff67: 8b 75 10 mov 0x10(%ebp),%esi * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( starting_address >= the_heap->begin && /* case 3 */ 10ff6a: 3b 51 18 cmp 0x18(%ecx),%edx 10ff6d: 72 0a jb 10ff79 <_Heap_Extend+0x21> 10ff6f: b8 01 00 00 00 mov $0x1,%eax 10ff74: 3b 51 1c cmp 0x1c(%ecx),%edx 10ff77: 72 5f jb 10ffd8 <_Heap_Extend+0x80> starting_address < the_heap->end ) return HEAP_EXTEND_ERROR; if ( starting_address != the_heap->end ) 10ff79: b8 02 00 00 00 mov $0x2,%eax 10ff7e: 3b 51 1c cmp 0x1c(%ecx),%edx 10ff81: 75 55 jne 10ffd8 <_Heap_Extend+0x80> * 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; 10ff83: 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 ); 10ff86: 8d 04 32 lea (%edx,%esi,1),%eax the_heap->end = _Addresses_Add_offset( the_heap->end, size ); 10ff89: 89 41 1c mov %eax,0x1c(%ecx) the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD; 10ff8c: 29 d8 sub %ebx,%eax 10ff8e: 8d 78 f8 lea -0x8(%eax),%edi * 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) || \ 10ff91: 89 f8 mov %edi,%eax 10ff93: 31 d2 xor %edx,%edx 10ff95: f7 71 10 divl 0x10(%ecx) 10ff98: 29 d7 sub %edx,%edi _Heap_Align_down( &the_size, the_heap->page_size ); *amount_extended = size; 10ff9a: 8b 45 14 mov 0x14(%ebp),%eax 10ff9d: 89 30 mov %esi,(%eax) if( the_size < the_heap->min_block_size ) 10ff9f: 31 c0 xor %eax,%eax 10ffa1: 3b 79 14 cmp 0x14(%ecx),%edi 10ffa4: 72 32 jb 10ffd8 <_Heap_Extend+0x80> <== NEVER TAKEN return HEAP_EXTEND_SUCCESSFUL; old_final->size = the_size | (old_final->size & HEAP_PREV_USED); 10ffa6: 8b 43 04 mov 0x4(%ebx),%eax 10ffa9: 83 e0 01 and $0x1,%eax 10ffac: 09 f8 or %edi,%eax 10ffae: 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 10ffb1: 8d 04 3b lea (%ebx,%edi,1),%eax new_final = _Heap_Block_at( old_final, the_size ); new_final->size = HEAP_PREV_USED; 10ffb4: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_heap->final = new_final; 10ffbb: 89 41 24 mov %eax,0x24(%ecx) stats->size += size; 10ffbe: 01 71 2c add %esi,0x2c(%ecx) stats->used_blocks += 1; 10ffc1: ff 41 40 incl 0x40(%ecx) stats->frees -= 1; /* Don't count subsequent call as actual free() */ 10ffc4: ff 49 50 decl 0x50(%ecx) _Heap_Free( the_heap, _Heap_User_area( old_final ) ); 10ffc7: 50 push %eax 10ffc8: 50 push %eax 10ffc9: 8d 43 08 lea 0x8(%ebx),%eax 10ffcc: 50 push %eax 10ffcd: 51 push %ecx 10ffce: e8 05 ba ff ff call 10b9d8 <_Heap_Free> 10ffd3: 31 c0 xor %eax,%eax 10ffd5: 83 c4 10 add $0x10,%esp return HEAP_EXTEND_SUCCESSFUL; } 10ffd8: 8d 65 f4 lea -0xc(%ebp),%esp 10ffdb: 5b pop %ebx 10ffdc: 5e pop %esi 10ffdd: 5f pop %edi 10ffde: c9 leave 10ffdf: c3 ret =============================================================================== 0010dffc <_Heap_Free>: bool _Heap_Free( Heap_Control *the_heap, void *starting_address ) { 10dffc: 55 push %ebp 10dffd: 89 e5 mov %esp,%ebp 10dfff: 57 push %edi 10e000: 56 push %esi 10e001: 53 push %ebx 10e002: 83 ec 14 sub $0x14,%esp 10e005: 8b 7d 08 mov 0x8(%ebp),%edi 10e008: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t the_size; uint32_t next_size; Heap_Statistics *const stats = &the_heap->stats; bool next_is_free; if ( !_Addresses_Is_in_range( 10e00b: 8b 47 24 mov 0x24(%edi),%eax 10e00e: 89 45 e0 mov %eax,-0x20(%ebp) 10e011: 8b 57 20 mov 0x20(%edi),%edx 10e014: 89 55 e4 mov %edx,-0x1c(%ebp) 10e017: 39 d1 cmp %edx,%ecx 10e019: 0f 93 c2 setae %dl 10e01c: 39 c1 cmp %eax,%ecx 10e01e: 0f 96 c0 setbe %al 10e021: 84 d0 test %dl,%al 10e023: 0f 84 2f 01 00 00 je 10e158 <_Heap_Free+0x15c> 10e029: 8d 59 f8 lea -0x8(%ecx),%ebx 10e02c: 89 c8 mov %ecx,%eax 10e02e: 31 d2 xor %edx,%edx 10e030: f7 77 10 divl 0x10(%edi) 10e033: 29 d3 sub %edx,%ebx return( FALSE ); } _Heap_Start_of_block( the_heap, starting_address, &the_block ); if ( !_Heap_Is_block_in( the_heap, the_block ) ) { 10e035: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e038: 0f 93 c2 setae %dl 10e03b: 3b 5d e0 cmp -0x20(%ebp),%ebx 10e03e: 0f 96 c0 setbe %al 10e041: 84 d0 test %dl,%al 10e043: 0f 84 0f 01 00 00 je 10e158 <_Heap_Free+0x15c> <== NEVER TAKEN 10e049: 8b 4b 04 mov 0x4(%ebx),%ecx 10e04c: 89 c8 mov %ecx,%eax 10e04e: 83 e0 fe and $0xfffffffe,%eax 10e051: 89 45 e8 mov %eax,-0x18(%ebp) 10e054: 8d 34 03 lea (%ebx,%eax,1),%esi } the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); if ( !_Heap_Is_block_in( the_heap, next_block ) ) { 10e057: 3b 75 e4 cmp -0x1c(%ebp),%esi 10e05a: 0f 93 c2 setae %dl 10e05d: 3b 75 e0 cmp -0x20(%ebp),%esi 10e060: 0f 96 c0 setbe %al 10e063: 84 d0 test %dl,%al 10e065: 0f 84 ed 00 00 00 je 10e158 <_Heap_Free+0x15c> <== NEVER TAKEN 10e06b: 8b 46 04 mov 0x4(%esi),%eax _HAssert( FALSE ); return( FALSE ); } if ( !_Heap_Is_prev_used( next_block ) ) { 10e06e: a8 01 test $0x1,%al 10e070: 0f 84 e2 00 00 00 je 10e158 <_Heap_Free+0x15c> <== NEVER TAKEN 10e076: 83 e0 fe and $0xfffffffe,%eax 10e079: 89 45 ec mov %eax,-0x14(%ebp) _HAssert( FALSE ); return( FALSE ); } next_size = _Heap_Block_size( next_block ); next_is_free = next_block < the_heap->final && 10e07c: 31 c0 xor %eax,%eax 10e07e: 3b 75 e0 cmp -0x20(%ebp),%esi 10e081: 73 0c jae 10e08f <_Heap_Free+0x93> 10e083: 8b 55 ec mov -0x14(%ebp),%edx 10e086: 8b 44 16 04 mov 0x4(%esi,%edx,1),%eax 10e08a: f7 d0 not %eax 10e08c: 83 e0 01 and $0x1,%eax 10e08f: 88 45 f3 mov %al,-0xd(%ebp) !_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size)); if ( !_Heap_Is_prev_used( the_block ) ) { 10e092: 80 e1 01 and $0x1,%cl 10e095: 75 56 jne 10e0ed <_Heap_Free+0xf1> uint32_t const prev_size = the_block->prev_size; 10e097: 8b 0b mov (%ebx),%ecx 10e099: 29 cb sub %ecx,%ebx Heap_Block *const prev_block = _Heap_Block_at( the_block, -prev_size ); if ( !_Heap_Is_block_in( the_heap, prev_block ) ) { 10e09b: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e09e: 0f 93 c2 setae %dl 10e0a1: 3b 5d e0 cmp -0x20(%ebp),%ebx 10e0a4: 0f 96 c0 setbe %al 10e0a7: 84 d0 test %dl,%al 10e0a9: 0f 84 a9 00 00 00 je 10e158 <_Heap_Free+0x15c> <== 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) ) { 10e0af: f6 43 04 01 testb $0x1,0x4(%ebx) 10e0b3: 0f 84 9f 00 00 00 je 10e158 <_Heap_Free+0x15c> <== NEVER TAKEN _HAssert( FALSE ); return( FALSE ); } if ( next_is_free ) { /* coalesce both */ 10e0b9: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10e0bd: 74 19 je 10e0d8 <_Heap_Free+0xdc> uint32_t const size = the_size + prev_size + next_size; 10e0bf: 8b 55 e8 mov -0x18(%ebp),%edx 10e0c2: 03 55 ec add -0x14(%ebp),%edx 10e0c5: 01 ca add %ecx,%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 10e0c7: 8b 4e 08 mov 0x8(%esi),%ecx * @param[in] size is the amount of memory to allocate in bytes 10e0ca: 8b 46 0c mov 0xc(%esi),%eax * @param[in] alignment the required alignment 10e0cd: 89 48 08 mov %ecx,0x8(%eax) * @return NULL if unsuccessful and a pointer to the block if successful 10e0d0: 89 41 0c mov %eax,0xc(%ecx) _Heap_Block_remove( next_block ); stats->free_blocks -= 1; 10e0d3: ff 4f 38 decl 0x38(%edi) 10e0d6: eb 33 jmp 10e10b <_Heap_Free+0x10f> 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; 10e0d8: 8b 55 e8 mov -0x18(%ebp),%edx 10e0db: 01 ca add %ecx,%edx prev_block->size = size | HEAP_PREV_USED; 10e0dd: 89 d0 mov %edx,%eax 10e0df: 83 c8 01 or $0x1,%eax 10e0e2: 89 43 04 mov %eax,0x4(%ebx) next_block->size &= ~HEAP_PREV_USED; 10e0e5: 83 66 04 fe andl $0xfffffffe,0x4(%esi) next_block->prev_size = size; 10e0e9: 89 16 mov %edx,(%esi) 10e0eb: eb 5b jmp 10e148 <_Heap_Free+0x14c> } } else if ( next_is_free ) { /* coalesce next */ 10e0ed: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10e0f1: 74 25 je 10e118 <_Heap_Free+0x11c> uint32_t const size = the_size + next_size; 10e0f3: 8b 55 ec mov -0x14(%ebp),%edx 10e0f6: 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 */ 10e0f9: 8b 4e 08 mov 0x8(%esi),%ecx bool _Protected_heap_Get_block_size( 10e0fc: 8b 46 0c mov 0xc(%esi),%eax Heap_Control *the_heap, void *starting_address, size_t *size 10e0ff: 89 4b 08 mov %ecx,0x8(%ebx) ); 10e102: 89 43 0c mov %eax,0xc(%ebx) 10e105: 89 58 08 mov %ebx,0x8(%eax) 10e108: 89 59 0c mov %ebx,0xc(%ecx) _Heap_Block_replace( next_block, the_block ); the_block->size = size | HEAP_PREV_USED; 10e10b: 89 d0 mov %edx,%eax 10e10d: 83 c8 01 or $0x1,%eax 10e110: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( the_block, size ); next_block->prev_size = size; 10e113: 89 14 13 mov %edx,(%ebx,%edx,1) 10e116: eb 30 jmp 10e148 <_Heap_Free+0x14c> bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, size_t size ); 10e118: 8b 47 08 mov 0x8(%edi),%eax /** 10e11b: 89 43 08 mov %eax,0x8(%ebx) * This routine returns the block of memory which begins 10e11e: 89 7b 0c mov %edi,0xc(%ebx) * at @a starting_address to @a the_heap. Any coalescing which is 10e121: 89 5f 08 mov %ebx,0x8(%edi) 10e124: 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; 10e127: 8b 45 e8 mov -0x18(%ebp),%eax 10e12a: 83 c8 01 or $0x1,%eax 10e12d: 89 43 04 mov %eax,0x4(%ebx) next_block->size &= ~HEAP_PREV_USED; 10e130: 83 66 04 fe andl $0xfffffffe,0x4(%esi) next_block->prev_size = the_size; 10e134: 8b 45 e8 mov -0x18(%ebp),%eax 10e137: 89 06 mov %eax,(%esi) stats->free_blocks += 1; 10e139: 8b 47 38 mov 0x38(%edi),%eax 10e13c: 40 inc %eax 10e13d: 89 47 38 mov %eax,0x38(%edi) if ( stats->max_free_blocks < stats->free_blocks ) 10e140: 39 47 3c cmp %eax,0x3c(%edi) 10e143: 73 03 jae 10e148 <_Heap_Free+0x14c> stats->max_free_blocks = stats->free_blocks; 10e145: 89 47 3c mov %eax,0x3c(%edi) } stats->used_blocks -= 1; 10e148: ff 4f 40 decl 0x40(%edi) stats->free_size += the_size; 10e14b: 8b 55 e8 mov -0x18(%ebp),%edx 10e14e: 01 57 30 add %edx,0x30(%edi) stats->frees += 1; 10e151: ff 47 50 incl 0x50(%edi) 10e154: b0 01 mov $0x1,%al 10e156: eb 02 jmp 10e15a <_Heap_Free+0x15e> return( TRUE ); 10e158: 31 c0 xor %eax,%eax } 10e15a: 83 c4 14 add $0x14,%esp 10e15d: 5b pop %ebx 10e15e: 5e pop %esi 10e15f: 5f pop %edi 10e160: c9 leave 10e161: c3 ret =============================================================================== 0010ffe0 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 10ffe0: 55 push %ebp 10ffe1: 89 e5 mov %esp,%ebp 10ffe3: 53 push %ebx 10ffe4: 8b 5d 08 mov 0x8(%ebp),%ebx 10ffe7: 8b 55 0c mov 0xc(%ebp),%edx Heap_Block *the_block; Heap_Block *const tail = _Heap_Tail(the_heap); info->number = 0; 10ffea: c7 02 00 00 00 00 movl $0x0,(%edx) info->largest = 0; 10fff0: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) info->total = 0; 10fff7: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) ) { return ( the_thread == _Thread_Heir ); } /** 10fffe: 8b 4b 08 mov 0x8(%ebx),%ecx 110001: eb 16 jmp 110019 <_Heap_Get_free_information+0x39> 110003: 8b 41 04 mov 0x4(%ecx),%eax 110006: 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++; 110009: ff 02 incl (%edx) info->total += the_size; 11000b: 01 42 08 add %eax,0x8(%edx) if ( info->largest < the_size ) 11000e: 39 42 04 cmp %eax,0x4(%edx) 110011: 73 03 jae 110016 <_Heap_Get_free_information+0x36><== NEVER TAKEN info->largest = the_size; 110013: 89 42 04 mov %eax,0x4(%edx) info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; the_block = the_block->next) 110016: 8b 49 08 mov 0x8(%ecx),%ecx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; 110019: 39 d9 cmp %ebx,%ecx 11001b: 75 e6 jne 110003 <_Heap_Get_free_information+0x23> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 11001d: 5b pop %ebx 11001e: c9 leave 11001f: c3 ret =============================================================================== 00110020 <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 110020: 55 push %ebp 110021: 89 e5 mov %esp,%ebp 110023: 53 push %ebx 110024: 8b 45 08 mov 0x8(%ebp),%eax 110027: 8b 55 0c mov 0xc(%ebp),%edx Heap_Block *the_block = the_heap->start; 11002a: 8b 48 20 mov 0x20(%eax),%ecx Heap_Block *const end = the_heap->final; 11002d: 8b 58 24 mov 0x24(%eax),%ebx _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 110030: c7 02 00 00 00 00 movl $0x0,(%edx) the_info->Free.total = 0; 110036: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) the_info->Free.largest = 0; 11003d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_info->Used.number = 0; 110044: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) the_info->Used.total = 0; 11004b: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) the_info->Used.largest = 0; 110052: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 110059: eb 36 jmp 110091 <_Heap_Get_information+0x71> 11005b: 8b 41 04 mov 0x4(%ecx),%eax 11005e: 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 110061: 01 c1 add %eax,%ecx while ( the_block != end ) { 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) ) { 110063: f6 41 04 01 testb $0x1,0x4(%ecx) 110067: 74 10 je 110079 <_Heap_Get_information+0x59> the_info->Used.number++; 110069: ff 42 0c incl 0xc(%edx) the_info->Used.total += the_size; 11006c: 01 42 14 add %eax,0x14(%edx) if ( the_info->Used.largest < the_size ) 11006f: 39 42 10 cmp %eax,0x10(%edx) 110072: 73 1d jae 110091 <_Heap_Get_information+0x71> the_info->Used.largest = the_size; 110074: 89 42 10 mov %eax,0x10(%edx) 110077: eb 18 jmp 110091 <_Heap_Get_information+0x71> } else { the_info->Free.number++; 110079: ff 02 incl (%edx) the_info->Free.total += the_size; 11007b: 01 42 08 add %eax,0x8(%edx) if ( the_info->Free.largest < the_size ) 11007e: 39 42 04 cmp %eax,0x4(%edx) 110081: 73 03 jae 110086 <_Heap_Get_information+0x66><== NEVER TAKEN the_info->Free.largest = the_size; 110083: 89 42 04 mov %eax,0x4(%edx) if ( the_size != next_block->prev_size ) 110086: 3b 01 cmp (%ecx),%eax 110088: 74 07 je 110091 <_Heap_Get_information+0x71><== ALWAYS TAKEN 11008a: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 11008f: eb 0a jmp 11009b <_Heap_Get_information+0x7b><== NOT EXECUTED the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 110091: 39 d9 cmp %ebx,%ecx 110093: 75 c6 jne 11005b <_Heap_Get_information+0x3b> } /* 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; 110095: 83 42 14 08 addl $0x8,0x14(%edx) 110099: 31 c0 xor %eax,%eax return HEAP_GET_INFORMATION_SUCCESSFUL; } 11009b: 5b pop %ebx 11009c: c9 leave 11009d: c3 ret =============================================================================== 0010a02c <_Heap_Initialize>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 10a02c: 55 push %ebp 10a02d: 89 e5 mov %esp,%ebp 10a02f: 57 push %edi 10a030: 56 push %esi 10a031: 53 push %ebx 10a032: 83 ec 0c sub $0xc,%esp 10a035: 8b 75 08 mov 0x8(%ebp),%esi 10a038: 8b 7d 0c mov 0xc(%ebp),%edi 10a03b: 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) 10a03e: 85 c9 test %ecx,%ecx 10a040: 75 04 jne 10a046 <_Heap_Initialize+0x1a> 10a042: b1 04 mov $0x4,%cl 10a044: eb 0c jmp 10a052 <_Heap_Initialize+0x26> * * @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 */ 10a046: 89 c8 mov %ecx,%eax 10a048: 83 e0 03 and $0x3,%eax 10a04b: 74 05 je 10a052 <_Heap_Initialize+0x26> 10a04d: 83 c1 04 add $0x4,%ecx 10a050: 29 c1 sub %eax,%ecx /* 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; 10a052: 8d 5f 08 lea 0x8(%edi),%ebx 10a055: 89 d8 mov %ebx,%eax 10a057: 31 d2 xor %edx,%edx 10a059: f7 f1 div %ecx 10a05b: 85 d2 test %edx,%edx 10a05d: 74 05 je 10a064 <_Heap_Initialize+0x38> 10a05f: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 10a062: 29 d3 sub %edx,%ebx _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; 10a064: 83 eb 08 sub $0x8,%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 10a067: b8 10 00 00 00 mov $0x10,%eax 10a06c: 31 d2 xor %edx,%edx 10a06e: f7 f1 div %ecx */ 10a070: b8 10 00 00 00 mov $0x10,%eax 10a075: 85 d2 test %edx,%edx 10a077: 74 05 je 10a07e <_Heap_Initialize+0x52> 10a079: 8d 41 10 lea 0x10(%ecx),%eax 10a07c: 29 d0 sub %edx,%eax 10a07e: 89 46 14 mov %eax,0x14(%esi) /* 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); 10a081: 89 d8 mov %ebx,%eax 10a083: 29 f8 sub %edi,%eax 10a085: 83 c0 08 add $0x8,%eax if ( size < overhead ) 10a088: 39 45 10 cmp %eax,0x10(%ebp) 10a08b: 0f 82 a0 00 00 00 jb 10a131 <_Heap_Initialize+0x105> return 0; /* Too small area for the heap */ the_size = size - overhead; 10a091: 8b 55 10 mov 0x10(%ebp),%edx 10a094: 29 c2 sub %eax,%edx 10a096: 89 55 e8 mov %edx,-0x18(%ebp) * * @return free block information filled in. */ bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info 10a099: 89 d0 mov %edx,%eax 10a09b: 31 d2 xor %edx,%edx 10a09d: f7 f1 div %ecx _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) 10a09f: 8b 45 e8 mov -0x18(%ebp),%eax 10a0a2: 29 d0 sub %edx,%eax 10a0a4: 89 c2 mov %eax,%edx 10a0a6: 0f 84 85 00 00 00 je 10a131 <_Heap_Initialize+0x105><== NEVER TAKEN return 0; /* Too small area for the heap */ the_heap->page_size = page_size; 10a0ac: 89 4e 10 mov %ecx,0x10(%esi) the_heap->begin = starting_address; 10a0af: 89 7e 18 mov %edi,0x18(%esi) the_heap->end = starting_address + size; 10a0b2: 03 7d 10 add 0x10(%ebp),%edi 10a0b5: 89 7e 1c mov %edi,0x1c(%esi) the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; 10a0b8: 89 0b mov %ecx,(%ebx) the_block->size = the_size | HEAP_PREV_USED; 10a0ba: 83 c8 01 or $0x1,%eax 10a0bd: 89 43 04 mov %eax,0x4(%ebx) the_block->next = _Heap_Tail( the_heap ); 10a0c0: 89 73 08 mov %esi,0x8(%ebx) the_block->prev = _Heap_Head( the_heap ); 10a0c3: 89 73 0c mov %esi,0xc(%ebx) _Heap_Head(the_heap)->next = the_block; 10a0c6: 89 5e 08 mov %ebx,0x8(%esi) _Heap_Tail(the_heap)->prev = the_block; 10a0c9: 89 5e 0c mov %ebx,0xc(%esi) the_heap->start = the_block; 10a0cc: 89 5e 20 mov %ebx,0x20(%esi) * @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 10a0cf: 8d 04 13 lea (%ebx,%edx,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 */ 10a0d2: 89 46 24 mov %eax,0x24(%esi) the_block->prev_size = the_size; /* Previous block is free */ 10a0d5: 89 10 mov %edx,(%eax) the_block->size = page_size; 10a0d7: 89 48 04 mov %ecx,0x4(%eax) stats->size = size; 10a0da: 8b 45 10 mov 0x10(%ebp),%eax 10a0dd: 89 46 2c mov %eax,0x2c(%esi) stats->free_size = the_size; 10a0e0: 89 56 30 mov %edx,0x30(%esi) stats->min_free_size = the_size; 10a0e3: 89 56 34 mov %edx,0x34(%esi) stats->free_blocks = 1; 10a0e6: c7 46 38 01 00 00 00 movl $0x1,0x38(%esi) stats->max_free_blocks = 1; 10a0ed: c7 46 3c 01 00 00 00 movl $0x1,0x3c(%esi) stats->used_blocks = 0; 10a0f4: c7 46 40 00 00 00 00 movl $0x0,0x40(%esi) stats->max_search = 0; 10a0fb: c7 46 44 00 00 00 00 movl $0x0,0x44(%esi) stats->allocs = 0; 10a102: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) stats->searches = 0; 10a109: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) stats->frees = 0; 10a110: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) stats->resizes = 0; 10a117: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) stats->instance = instance++; 10a11e: a1 4c d5 11 00 mov 0x11d54c,%eax 10a123: 89 46 28 mov %eax,0x28(%esi) 10a126: 40 inc %eax 10a127: a3 4c d5 11 00 mov %eax,0x11d54c return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 10a12c: 8d 42 fc lea -0x4(%edx),%eax 10a12f: eb 02 jmp 10a133 <_Heap_Initialize+0x107> 10a131: 31 c0 xor %eax,%eax } 10a133: 83 c4 0c add $0xc,%esp 10a136: 5b pop %ebx 10a137: 5e pop %esi 10a138: 5f pop %edi 10a139: c9 leave 10a13a: c3 ret =============================================================================== 00115a54 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 115a54: 55 push %ebp 115a55: 89 e5 mov %esp,%ebp 115a57: 57 push %edi 115a58: 56 push %esi 115a59: 53 push %ebx 115a5a: 83 ec 2c sub $0x2c,%esp 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; 115a5d: 8b 45 08 mov 0x8(%ebp),%eax 115a60: 8b 40 14 mov 0x14(%eax),%eax 115a63: 89 45 ec mov %eax,-0x14(%ebp) uint32_t const page_size = the_heap->page_size; 115a66: 8b 55 08 mov 0x8(%ebp),%edx 115a69: 8b 72 10 mov 0x10(%edx),%esi *old_mem_size = 0; 115a6c: 8b 4d 14 mov 0x14(%ebp),%ecx 115a6f: c7 01 00 00 00 00 movl $0x0,(%ecx) *avail_mem_size = 0; 115a75: 8b 45 18 mov 0x18(%ebp),%eax 115a78: c7 00 00 00 00 00 movl $0x0,(%eax) 115a7e: 8b 55 0c mov 0xc(%ebp),%edx 115a81: 83 ea 08 sub $0x8,%edx 115a84: 89 55 f0 mov %edx,-0x10(%ebp) 115a87: 8b 45 0c mov 0xc(%ebp),%eax 115a8a: 8b 4d 08 mov 0x8(%ebp),%ecx 115a8d: 31 d2 xor %edx,%edx 115a8f: f7 71 10 divl 0x10(%ecx) 115a92: 29 55 f0 sub %edx,-0x10(%ebp) 115a95: 89 c8 mov %ecx,%eax 115a97: 8b 49 24 mov 0x24(%ecx),%ecx 115a9a: 8b 58 20 mov 0x20(%eax),%ebx _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)) 115a9d: 39 5d f0 cmp %ebx,-0x10(%ebp) 115aa0: 0f 93 c2 setae %dl 115aa3: 39 4d f0 cmp %ecx,-0x10(%ebp) 115aa6: 0f 96 c0 setbe %al 115aa9: 84 d0 test %dl,%al 115aab: 0f 84 7e 01 00 00 je 115c2f <_Heap_Resize_block+0x1db> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 115ab1: 8b 55 f0 mov -0x10(%ebp),%edx 115ab4: 8b 52 04 mov 0x4(%edx),%edx 115ab7: 89 55 d8 mov %edx,-0x28(%ebp) 115aba: 83 e2 fe and $0xfffffffe,%edx 115abd: 89 55 e4 mov %edx,-0x1c(%ebp) 115ac0: 8b 7d f0 mov -0x10(%ebp),%edi 115ac3: 01 d7 add %edx,%edi 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) || 115ac5: 39 df cmp %ebx,%edi 115ac7: 0f 93 c2 setae %dl 115aca: 39 cf cmp %ecx,%edi 115acc: 0f 96 c0 setbe %al 115acf: 84 d0 test %dl,%al 115ad1: 0f 84 58 01 00 00 je 115c2f <_Heap_Resize_block+0x1db><== NEVER TAKEN 115ad7: 8b 47 04 mov 0x4(%edi),%eax 115ada: a8 01 test $0x1,%al 115adc: 0f 84 4d 01 00 00 je 115c2f <_Heap_Resize_block+0x1db><== NEVER TAKEN 115ae2: 83 e0 fe and $0xfffffffe,%eax 115ae5: 89 45 dc mov %eax,-0x24(%ebp) 115ae8: 01 f8 add %edi,%eax 115aea: 89 45 e0 mov %eax,-0x20(%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) || 115aed: b8 01 00 00 00 mov $0x1,%eax 115af2: 39 cf cmp %ecx,%edi 115af4: 74 09 je 115aff <_Heap_Resize_block+0xab><== NEVER TAKEN 115af6: 8b 4d e0 mov -0x20(%ebp),%ecx 115af9: 8b 41 04 mov 0x4(%ecx),%eax 115afc: 83 e0 01 and $0x1,%eax _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; 115aff: 8b 55 d8 mov -0x28(%ebp),%edx 115b02: 83 e2 01 and $0x1,%edx 115b05: 89 55 e8 mov %edx,-0x18(%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) || 115b08: 88 c1 mov %al,%cl _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) 115b0a: 89 f8 mov %edi,%eax 115b0c: 2b 45 0c sub 0xc(%ebp),%eax 115b0f: 83 c0 04 add $0x4,%eax + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 115b12: 8b 55 14 mov 0x14(%ebp),%edx 115b15: 89 02 mov %eax,(%edx) if (size > old_user_size) { 115b17: 39 45 10 cmp %eax,0x10(%ebp) 115b1a: 76 50 jbe 115b6c <_Heap_Resize_block+0x118> /* 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 */ 115b1c: 84 c9 test %cl,%cl 115b1e: 0f 85 12 01 00 00 jne 115c36 <_Heap_Resize_block+0x1e2> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 115b24: 8b 4d 10 mov 0x10(%ebp),%ecx 115b27: 29 c1 sub %eax,%ecx 115b29: 89 c8 mov %ecx,%eax 115b2b: 31 d2 xor %edx,%edx 115b2d: f7 f6 div %esi 115b2f: 85 d2 test %edx,%edx 115b31: 74 04 je 115b37 <_Heap_Resize_block+0xe3><== NEVER TAKEN 115b33: 01 f1 add %esi,%ecx 115b35: 29 d1 sub %edx,%ecx 115b37: 89 c8 mov %ecx,%eax 115b39: 3b 4d ec cmp -0x14(%ebp),%ecx 115b3c: 73 03 jae 115b41 <_Heap_Resize_block+0xed><== NEVER TAKEN 115b3e: 8b 45 ec mov -0x14(%ebp),%eax _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) 115b41: 3b 45 dc cmp -0x24(%ebp),%eax 115b44: 0f 87 ec 00 00 00 ja 115c36 <_Heap_Resize_block+0x1e2><== NEVER TAKEN return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 115b4a: 53 push %ebx 115b4b: 50 push %eax 115b4c: 57 push %edi 115b4d: ff 75 08 pushl 0x8(%ebp) 115b50: e8 23 46 ff ff call 10a178 <_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; 115b55: 03 45 e4 add -0x1c(%ebp),%eax 115b58: 0b 45 e8 or -0x18(%ebp),%eax 115b5b: 8b 55 f0 mov -0x10(%ebp),%edx 115b5e: 89 42 04 mov %eax,0x4(%edx) --stats->used_blocks; 115b61: 8b 4d 08 mov 0x8(%ebp),%ecx 115b64: ff 49 40 decl 0x40(%ecx) 115b67: e9 b6 00 00 00 jmp 115c22 <_Heap_Resize_block+0x1ce> } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 115b6c: 89 c3 mov %eax,%ebx 115b6e: 2b 5d 10 sub 0x10(%ebp),%ebx 115b71: 89 d8 mov %ebx,%eax 115b73: 31 d2 xor %edx,%edx 115b75: f7 f6 div %esi _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 115b77: 89 de mov %ebx,%esi 115b79: 29 d6 sub %edx,%esi 115b7b: 0f 84 a4 00 00 00 je 115c25 <_Heap_Resize_block+0x1d1> /* 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; 115b81: 8b 5d e4 mov -0x1c(%ebp),%ebx 115b84: 29 f3 sub %esi,%ebx if (new_block_size < min_block_size) { 115b86: 3b 5d ec cmp -0x14(%ebp),%ebx 115b89: 73 16 jae 115ba1 <_Heap_Resize_block+0x14d> uint32_t delta = min_block_size - new_block_size; 115b8b: 8b 45 ec mov -0x14(%ebp),%eax 115b8e: 29 d8 sub %ebx,%eax _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 115b90: 29 c6 sub %eax,%esi 115b92: 75 0b jne 115b9f <_Heap_Resize_block+0x14b><== NEVER TAKEN ++stats->resizes; 115b94: 8b 55 08 mov 0x8(%ebp),%edx 115b97: ff 42 54 incl 0x54(%edx) 115b9a: e9 8c 00 00 00 jmp 115c2b <_Heap_Resize_block+0x1d7> return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 115b9f: 01 c3 add %eax,%ebx <== 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) { 115ba1: 84 c9 test %cl,%cl 115ba3: 75 43 jne 115be8 <_Heap_Resize_block+0x194><== NEVER TAKEN 115ba5: 8b 55 f0 mov -0x10(%ebp),%edx 115ba8: 01 da add %ebx,%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; 115baa: 8b 45 dc mov -0x24(%ebp),%eax 115bad: 8d 0c 06 lea (%esi,%eax,1),%ecx _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 115bb0: 0b 5d e8 or -0x18(%ebp),%ebx 115bb3: 8b 45 f0 mov -0x10(%ebp),%eax 115bb6: 89 58 04 mov %ebx,0x4(%eax) new_next_block->size = new_next_block_size | HEAP_PREV_USED; 115bb9: 89 c8 mov %ecx,%eax 115bbb: 83 c8 01 or $0x1,%eax 115bbe: 89 42 04 mov %eax,0x4(%edx) next_next_block->prev_size = new_next_block_size; 115bc1: 8b 45 e0 mov -0x20(%ebp),%eax 115bc4: 89 08 mov %ecx,(%eax) { return (state == SYSTEM_STATE_FAILED); } /**@}*/ 115bc6: 8b 5f 08 mov 0x8(%edi),%ebx #endif 115bc9: 8b 47 0c mov 0xc(%edi),%eax /* end of include file */ 115bcc: 89 5a 08 mov %ebx,0x8(%edx) 115bcf: 89 42 0c mov %eax,0xc(%edx) 115bd2: 89 50 08 mov %edx,0x8(%eax) 115bd5: 89 53 0c mov %edx,0xc(%ebx) _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 115bd8: 8b 55 08 mov 0x8(%ebp),%edx 115bdb: 01 72 30 add %esi,0x30(%edx) *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 115bde: 83 e9 04 sub $0x4,%ecx 115be1: 8b 45 18 mov 0x18(%ebp),%eax 115be4: 89 08 mov %ecx,(%eax) 115be6: eb 3d jmp 115c25 <_Heap_Resize_block+0x1d1> } else if (free_block_size >= min_block_size) { 115be8: 3b 75 ec cmp -0x14(%ebp),%esi <== NOT EXECUTED 115beb: 72 38 jb 115c25 <_Heap_Resize_block+0x1d1><== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 115bed: 09 5d e8 or %ebx,-0x18(%ebp) <== NOT EXECUTED 115bf0: 8b 4d e8 mov -0x18(%ebp),%ecx <== NOT EXECUTED 115bf3: 8b 55 f0 mov -0x10(%ebp),%edx <== NOT EXECUTED 115bf6: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED 115bf9: 89 d0 mov %edx,%eax <== NOT EXECUTED 115bfb: 01 d8 add %ebx,%eax <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 115bfd: 89 f2 mov %esi,%edx <== NOT EXECUTED 115bff: 83 ca 01 or $0x1,%edx <== NOT EXECUTED 115c02: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 115c05: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 115c08: ff 42 40 incl 0x40(%edx) <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 115c0b: ff 4a 50 decl 0x50(%edx) <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 115c0e: 51 push %ecx <== NOT EXECUTED 115c0f: 51 push %ecx <== NOT EXECUTED 115c10: 83 c0 08 add $0x8,%eax <== NOT EXECUTED 115c13: 50 push %eax <== NOT EXECUTED 115c14: 52 push %edx <== NOT EXECUTED 115c15: e8 e2 83 ff ff call 10dffc <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 115c1a: 8d 46 fc lea -0x4(%esi),%eax <== NOT EXECUTED 115c1d: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 115c20: 89 01 mov %eax,(%ecx) <== NOT EXECUTED 115c22: 83 c4 10 add $0x10,%esp } } } ++stats->resizes; 115c25: 8b 45 08 mov 0x8(%ebp),%eax 115c28: ff 40 54 incl 0x54(%eax) 115c2b: 31 c0 xor %eax,%eax 115c2d: eb 0c jmp 115c3b <_Heap_Resize_block+0x1e7> return HEAP_RESIZE_SUCCESSFUL; 115c2f: b8 02 00 00 00 mov $0x2,%eax 115c34: eb 05 jmp 115c3b <_Heap_Resize_block+0x1e7> 115c36: b8 01 00 00 00 mov $0x1,%eax } 115c3b: 8d 65 f4 lea -0xc(%ebp),%esp 115c3e: 5b pop %ebx 115c3f: 5e pop %esi 115c40: 5f pop %edi 115c41: c9 leave 115c42: c3 ret =============================================================================== 00115c44 <_Heap_Size_of_user_area>: bool _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, size_t *size ) { 115c44: 55 push %ebp 115c45: 89 e5 mov %esp,%ebp 115c47: 57 push %edi 115c48: 56 push %esi 115c49: 53 push %ebx 115c4a: 8b 75 08 mov 0x8(%ebp),%esi Heap_Block *the_block; Heap_Block *next_block; uint32_t the_size; if ( !_Addresses_Is_in_range( 115c4d: 8b 7e 24 mov 0x24(%esi),%edi 115c50: 8b 5e 20 mov 0x20(%esi),%ebx 115c53: 39 5d 0c cmp %ebx,0xc(%ebp) 115c56: 0f 93 c2 setae %dl 115c59: 39 7d 0c cmp %edi,0xc(%ebp) 115c5c: 0f 96 c0 setbe %al 115c5f: 84 d0 test %dl,%al 115c61: 74 49 je 115cac <_Heap_Size_of_user_area+0x68> 115c63: 8b 4d 0c mov 0xc(%ebp),%ecx 115c66: 83 e9 08 sub $0x8,%ecx 115c69: 8b 45 0c mov 0xc(%ebp),%eax 115c6c: 31 d2 xor %edx,%edx 115c6e: f7 76 10 divl 0x10(%esi) 115c71: 29 d1 sub %edx,%ecx return( FALSE ); _Heap_Start_of_block( the_heap, starting_address, &the_block ); _HAssert(_Heap_Is_block_in( the_heap, the_block )); if ( !_Heap_Is_block_in( the_heap, the_block ) ) 115c73: 39 d9 cmp %ebx,%ecx 115c75: 0f 93 c2 setae %dl 115c78: 39 f9 cmp %edi,%ecx 115c7a: 0f 96 c0 setbe %al 115c7d: 84 d0 test %dl,%al 115c7f: 74 2b je 115cac <_Heap_Size_of_user_area+0x68><== NEVER TAKEN 115c81: 8b 41 04 mov 0x4(%ecx),%eax 115c84: 83 e0 fe and $0xfffffffe,%eax 115c87: 01 c1 add %eax,%ecx 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 ( 115c89: 39 d9 cmp %ebx,%ecx 115c8b: 0f 93 c2 setae %dl 115c8e: 39 f9 cmp %edi,%ecx 115c90: 0f 96 c0 setbe %al 115c93: 84 d0 test %dl,%al 115c95: 74 15 je 115cac <_Heap_Size_of_user_area+0x68><== NEVER TAKEN 115c97: f6 41 04 01 testb $0x1,0x4(%ecx) 115c9b: 74 0f je 115cac <_Heap_Size_of_user_area+0x68><== 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 ) 115c9d: 2b 4d 0c sub 0xc(%ebp),%ecx 115ca0: 8d 51 04 lea 0x4(%ecx),%edx 115ca3: 8b 45 10 mov 0x10(%ebp),%eax 115ca6: 89 10 mov %edx,(%eax) 115ca8: b0 01 mov $0x1,%al 115caa: eb 02 jmp 115cae <_Heap_Size_of_user_area+0x6a> + HEAP_BLOCK_HEADER_OFFSET; return( TRUE ); 115cac: 31 c0 xor %eax,%eax } 115cae: 5b pop %ebx 115caf: 5e pop %esi 115cb0: 5f pop %edi 115cb1: c9 leave 115cb2: c3 ret =============================================================================== 00110110 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110110: 55 push %ebp 110111: 89 e5 mov %esp,%ebp 110113: 57 push %edi 110114: 56 push %esi 110115: 53 push %ebx 110116: 83 ec 1c sub $0x1c,%esp 110119: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->start; 11011c: 8b 45 08 mov 0x8(%ebp),%eax 11011f: 8b 70 20 mov 0x20(%eax),%esi Heap_Block *const end = the_heap->final; 110122: 8b 50 24 mov 0x24(%eax),%edx 110125: 89 55 e8 mov %edx,-0x18(%ebp) /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 110128: 85 db test %ebx,%ebx 11012a: 79 03 jns 11012f <_Heap_Walk+0x1f> <== ALWAYS TAKEN source = the_heap->stats.instance; 11012c: 8b 58 28 mov 0x28(%eax),%ebx <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 11012f: 31 c9 xor %ecx,%ecx 110131: f6 46 04 01 testb $0x1,0x4(%esi) 110135: 75 15 jne 11014c <_Heap_Walk+0x3c> <== ALWAYS TAKEN printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 110137: 50 push %eax <== NOT EXECUTED 110138: 50 push %eax <== NOT EXECUTED 110139: 53 push %ebx <== NOT EXECUTED 11013a: 68 18 bb 11 00 push $0x11bb18 <== NOT EXECUTED 11013f: e8 92 83 ff ff call 1084d6 <== NOT EXECUTED 110144: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 110149: 83 c4 10 add $0x10,%esp <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 11014c: 8b 06 mov (%esi),%eax 11014e: 8b 7d 08 mov 0x8(%ebp),%edi 110151: 3b 47 10 cmp 0x10(%edi),%eax 110154: 0f 84 38 01 00 00 je 110292 <_Heap_Walk+0x182> <== ALWAYS TAKEN printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 11015a: 50 push %eax <== NOT EXECUTED 11015b: 50 push %eax <== NOT EXECUTED 11015c: 53 push %ebx <== NOT EXECUTED 11015d: 68 4e bb 11 00 push $0x11bb4e <== NOT EXECUTED 110162: e8 6f 83 ff ff call 1084d6 <== NOT EXECUTED 110167: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 11016c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11016f: e9 1e 01 00 00 jmp 110292 <_Heap_Walk+0x182> <== NOT EXECUTED 110174: 8b 46 04 mov 0x4(%esi),%eax 110177: 89 45 f0 mov %eax,-0x10(%ebp) 11017a: 83 e0 fe and $0xfffffffe,%eax 11017d: 89 45 ec mov %eax,-0x14(%ebp) /** @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 110180: 01 f0 add %esi,%eax 110182: 89 45 e0 mov %eax,-0x20(%ebp) printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 110185: 8b 55 08 mov 0x8(%ebp),%edx 110188: 3b 42 20 cmp 0x20(%edx),%eax 11018b: 0f 93 c2 setae %dl 11018e: 8b 7d 08 mov 0x8(%ebp),%edi 110191: 3b 47 24 cmp 0x24(%edi),%eax 110194: 0f 96 c0 setbe %al 110197: 84 d0 test %dl,%al 110199: 75 0f jne 1101aa <_Heap_Walk+0x9a> <== ALWAYS TAKEN if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 11019b: 50 push %eax <== NOT EXECUTED 11019c: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 11019f: 53 push %ebx <== NOT EXECUTED 1101a0: 68 80 bb 11 00 push $0x11bb80 <== NOT EXECUTED 1101a5: e9 d7 00 00 00 jmp 110281 <_Heap_Walk+0x171> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 1101aa: 8b 45 e0 mov -0x20(%ebp),%eax 1101ad: f6 40 04 01 testb $0x1,0x4(%eax) 1101b1: 0f 85 85 00 00 00 jne 11023c <_Heap_Walk+0x12c> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 1101b7: 8b 55 ec mov -0x14(%ebp),%edx 1101ba: 3b 10 cmp (%eax),%edx 1101bc: 74 15 je 1101d3 <_Heap_Walk+0xc3> <== ALWAYS TAKEN if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 1101be: 50 push %eax <== NOT EXECUTED 1101bf: 50 push %eax <== NOT EXECUTED 1101c0: 53 push %ebx <== NOT EXECUTED 1101c1: 68 a3 bb 11 00 push $0x11bba3 <== NOT EXECUTED 1101c6: e8 0b 83 ff ff call 1084d6 <== NOT EXECUTED 1101cb: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 1101d0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED error = 1; } if (!prev_used) { 1101d3: f6 45 f0 01 testb $0x1,-0x10(%ebp) 1101d7: 75 29 jne 110202 <_Heap_Walk+0xf2> <== ALWAYS TAKEN if (do_dump || error) printk("\n"); 1101d9: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1101db: 74 10 je 1101ed <_Heap_Walk+0xdd> <== NOT EXECUTED 1101dd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1101e0: 68 75 b6 11 00 push $0x11b675 <== NOT EXECUTED 1101e5: e8 ec 82 ff ff call 1084d6 <== NOT EXECUTED 1101ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 1101ed: 57 push %edi <== NOT EXECUTED 1101ee: 57 push %edi <== NOT EXECUTED 1101ef: 53 push %ebx <== NOT EXECUTED 1101f0: 68 ce bb 11 00 push $0x11bbce <== NOT EXECUTED 1101f5: e8 dc 82 ff ff call 1084d6 <== NOT EXECUTED 1101fa: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 1101ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED ) { return ( the_thread == _Thread_Heir ); } /** 110202: 8b 7d 08 mov 0x8(%ebp),%edi 110205: 8b 47 08 mov 0x8(%edi),%eax 110208: eb 03 jmp 11020d <_Heap_Walk+0xfd> } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; 11020a: 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) 11020d: 39 f0 cmp %esi,%eax 11020f: 74 2b je 11023c <_Heap_Walk+0x12c> 110211: 3b 45 08 cmp 0x8(%ebp),%eax 110214: 75 f4 jne 11020a <_Heap_Walk+0xfa> <== ALWAYS TAKEN block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 110216: 85 c9 test %ecx,%ecx <== NOT EXECUTED 110218: 74 10 je 11022a <_Heap_Walk+0x11a> <== NOT EXECUTED 11021a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11021d: 68 75 b6 11 00 push $0x11b675 <== NOT EXECUTED 110222: e8 af 82 ff ff call 1084d6 <== NOT EXECUTED 110227: 83 c4 10 add $0x10,%esp <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 11022a: 51 push %ecx <== NOT EXECUTED 11022b: 51 push %ecx <== NOT EXECUTED 11022c: 53 push %ebx <== NOT EXECUTED 11022d: 68 f8 bb 11 00 push $0x11bbf8 <== NOT EXECUTED 110232: e8 9f 82 ff ff call 1084d6 <== NOT EXECUTED 110237: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11023a: eb 04 jmp 110240 <_Heap_Walk+0x130> <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 11023c: 85 c9 test %ecx,%ecx 11023e: 74 15 je 110255 <_Heap_Walk+0x145> <== ALWAYS TAKEN 110240: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110243: 68 75 b6 11 00 push $0x11b675 <== NOT EXECUTED 110248: e8 89 82 ff ff call 1084d6 <== NOT EXECUTED 11024d: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 110252: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 110255: 8b 55 ec mov -0x14(%ebp),%edx 110258: 8b 45 08 mov 0x8(%ebp),%eax 11025b: 3b 50 14 cmp 0x14(%eax),%edx 11025e: 73 0a jae 11026a <_Heap_Walk+0x15a> <== ALWAYS TAKEN printk("PASS: %d !block size is too small\n", source); 110260: 52 push %edx <== NOT EXECUTED 110261: 52 push %edx <== NOT EXECUTED 110262: 53 push %ebx <== NOT EXECUTED 110263: 68 21 bc 11 00 push $0x11bc21 <== NOT EXECUTED 110268: eb 17 jmp 110281 <_Heap_Walk+0x171> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 11026a: 8b 45 ec mov -0x14(%ebp),%eax 11026d: 8b 7d 08 mov 0x8(%ebp),%edi 110270: 31 d2 xor %edx,%edx 110272: f7 77 10 divl 0x10(%edi) 110275: 85 d2 test %edx,%edx 110277: 74 12 je 11028b <_Heap_Walk+0x17b> <== ALWAYS TAKEN printk("PASS: %d !block size is misaligned\n", source); 110279: 50 push %eax <== NOT EXECUTED 11027a: 50 push %eax <== NOT EXECUTED 11027b: 53 push %ebx <== NOT EXECUTED 11027c: 68 44 bc 11 00 push $0x11bc44 <== NOT EXECUTED 110281: e8 50 82 ff ff call 1084d6 <== NOT EXECUTED 110286: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110289: eb 12 jmp 11029d <_Heap_Walk+0x18d> <== NOT EXECUTED error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 11028b: 85 c9 test %ecx,%ecx 11028d: 75 0e jne 11029d <_Heap_Walk+0x18d> <== NEVER TAKEN break; 11028f: 8b 75 e0 mov -0x20(%ebp),%esi 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 ) { 110292: 3b 75 e8 cmp -0x18(%ebp),%esi 110295: 0f 85 d9 fe ff ff jne 110174 <_Heap_Walk+0x64> 11029b: eb 17 jmp 1102b4 <_Heap_Walk+0x1a4> the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 11029d: ff 75 e8 pushl -0x18(%ebp) <== NOT EXECUTED 1102a0: 56 push %esi <== NOT EXECUTED 1102a1: 53 push %ebx <== NOT EXECUTED 1102a2: 68 68 bc 11 00 push $0x11bc68 <== NOT EXECUTED 1102a7: e8 2a 82 ff ff call 1084d6 <== NOT EXECUTED 1102ac: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 1102b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1102b4: 8b 46 04 mov 0x4(%esi),%eax 1102b7: 83 e0 fe and $0xfffffffe,%eax source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 1102ba: 8b 75 08 mov 0x8(%ebp),%esi 1102bd: 8b 56 10 mov 0x10(%esi),%edx 1102c0: 39 d0 cmp %edx,%eax 1102c2: 74 15 je 1102d9 <_Heap_Walk+0x1c9> <== ALWAYS TAKEN printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 1102c4: 52 push %edx <== NOT EXECUTED 1102c5: 50 push %eax <== NOT EXECUTED 1102c6: 53 push %ebx <== NOT EXECUTED 1102c7: 68 a3 bc 11 00 push $0x11bca3 <== NOT EXECUTED 1102cc: e8 05 82 ff ff call 1084d6 <== NOT EXECUTED 1102d1: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 1102d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1102d9: 88 c8 mov %cl,%al if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 1102db: 8d 65 f4 lea -0xc(%ebp),%esp 1102de: 5b pop %ebx 1102df: 5e pop %esi 1102e0: 5f pop %edi 1102e1: c9 leave 1102e2: c3 ret =============================================================================== 0010a1f4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, uint32_t the_error ) { 10a1f4: 55 push %ebp 10a1f5: 89 e5 mov %esp,%ebp 10a1f7: 53 push %ebx 10a1f8: 83 ec 08 sub $0x8,%esp 10a1fb: 8b 55 08 mov 0x8(%ebp),%edx 10a1fe: 8b 45 0c mov 0xc(%ebp),%eax 10a201: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10a204: 89 15 40 d8 11 00 mov %edx,0x11d840 _Internal_errors_What_happened.is_internal = is_internal; 10a20a: a2 44 d8 11 00 mov %al,0x11d844 _Internal_errors_What_happened.the_error = the_error; 10a20f: 89 1d 48 d8 11 00 mov %ebx,0x11d848 _User_extensions_Fatal( the_source, is_internal, the_error ); 10a215: 53 push %ebx 10a216: 0f b6 c0 movzbl %al,%eax 10a219: 50 push %eax 10a21a: 52 push %edx 10a21b: e8 eb 18 00 00 call 10bb0b <_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( 10a220: c7 05 38 d9 11 00 05 movl $0x5,0x11d938 <== NOT EXECUTED 10a227: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10a22a: fa cli <== NOT EXECUTED 10a22b: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10a22d: f4 hlt <== NOT EXECUTED 10a22e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a231: eb fe jmp 10a231 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010a288 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10a288: 55 push %ebp 10a289: 89 e5 mov %esp,%ebp 10a28b: 56 push %esi 10a28c: 53 push %ebx 10a28d: 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 ) 10a290: 31 c9 xor %ecx,%ecx 10a292: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10a296: 74 59 je 10a2f1 <_Objects_Allocate+0x69><== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10a298: 8d 73 20 lea 0x20(%ebx),%esi 10a29b: 83 ec 0c sub $0xc,%esp 10a29e: 56 push %esi 10a29f: e8 6c f8 ff ff call 109b10 <_Chain_Get> 10a2a4: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10a2a6: 83 c4 10 add $0x10,%esp 10a2a9: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10a2ad: 74 42 je 10a2f1 <_Objects_Allocate+0x69> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10a2af: 85 c0 test %eax,%eax 10a2b1: 75 1a jne 10a2cd <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10a2b3: 83 ec 0c sub $0xc,%esp 10a2b6: 53 push %ebx 10a2b7: e8 64 00 00 00 call 10a320 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10a2bc: 89 34 24 mov %esi,(%esp) 10a2bf: e8 4c f8 ff ff call 109b10 <_Chain_Get> 10a2c4: 89 c1 mov %eax,%ecx } if ( the_object ) { 10a2c6: 83 c4 10 add $0x10,%esp 10a2c9: 85 c0 test %eax,%eax 10a2cb: 74 24 je 10a2f1 <_Objects_Allocate+0x69><== NEVER TAKEN uint32_t block; block = _Objects_Get_index( the_object->id ) - 10a2cd: 8b 41 08 mov 0x8(%ecx),%eax 10a2d0: 25 ff ff 00 00 and $0xffff,%eax 10a2d5: 8b 53 08 mov 0x8(%ebx),%edx 10a2d8: 81 e2 ff ff 00 00 and $0xffff,%edx 10a2de: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10a2e0: 31 d2 xor %edx,%edx 10a2e2: f7 73 14 divl 0x14(%ebx) 10a2e5: c1 e0 02 shl $0x2,%eax 10a2e8: 03 43 30 add 0x30(%ebx),%eax 10a2eb: ff 08 decl (%eax) information->inactive--; 10a2ed: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10a2f1: 89 c8 mov %ecx,%eax 10a2f3: 8d 65 f8 lea -0x8(%ebp),%esp 10a2f6: 5b pop %ebx 10a2f7: 5e pop %esi 10a2f8: c9 leave 10a2f9: c3 ret =============================================================================== 0010a320 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10a320: 55 push %ebp 10a321: 89 e5 mov %esp,%ebp 10a323: 57 push %edi 10a324: 56 push %esi 10a325: 53 push %ebx 10a326: 83 ec 5c sub $0x5c,%esp 10a329: 8b 5d 08 mov 0x8(%ebp),%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 10a32c: 8b 43 08 mov 0x8(%ebx),%eax 10a32f: 25 ff ff 00 00 and $0xffff,%eax 10a334: 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 ) 10a337: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10a33b: 39 c1 cmp %eax,%ecx 10a33d: 73 13 jae 10a352 <_Objects_Extend_information+0x32> 10a33f: 89 45 c4 mov %eax,-0x3c(%ebp) 10a342: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 10a349: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 10a350: eb 35 jmp 10a387 <_Objects_Extend_information+0x67> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10a352: 8b 7b 14 mov 0x14(%ebx),%edi 10a355: 89 c8 mov %ecx,%eax 10a357: 31 d2 xor %edx,%edx 10a359: f7 f7 div %edi 10a35b: 89 c6 mov %eax,%esi 10a35d: 89 45 bc mov %eax,-0x44(%ebp) 10a360: 8b 45 c8 mov -0x38(%ebp),%eax 10a363: 89 45 c4 mov %eax,-0x3c(%ebp) 10a366: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 10a36d: eb 13 jmp 10a382 <_Objects_Extend_information+0x62> for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 10a36f: 8b 43 34 mov 0x34(%ebx),%eax 10a372: 8b 55 c0 mov -0x40(%ebp),%edx 10a375: 83 3c 90 00 cmpl $0x0,(%eax,%edx,4) 10a379: 74 0c je 10a387 <_Objects_Extend_information+0x67> break; else index_base += information->allocation_size; 10a37b: 01 7d c4 add %edi,-0x3c(%ebp) if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10a37e: 42 inc %edx 10a37f: 89 55 c0 mov %edx,-0x40(%ebp) 10a382: 39 75 c0 cmp %esi,-0x40(%ebp) 10a385: 72 e8 jb 10a36f <_Objects_Extend_information+0x4f> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10a387: 39 4d c4 cmp %ecx,-0x3c(%ebp) 10a38a: 0f 82 30 01 00 00 jb 10a4c0 <_Objects_Extend_information+0x1a0> /* * Up the block count and maximum */ block_count++; 10a390: 8b 75 bc mov -0x44(%ebp),%esi 10a393: 46 inc %esi maximum = information->maximum + information->allocation_size; 10a394: 03 4b 14 add 0x14(%ebx),%ecx 10a397: 89 4d d0 mov %ecx,-0x30(%ebp) /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 10a39a: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10a39e: 8b 7d c8 mov -0x38(%ebp),%edi 10a3a1: 8d 14 39 lea (%ecx,%edi,1),%edx 10a3a4: 74 21 je 10a3c7 <_Objects_Extend_information+0xa7> object_blocks = (void**) 10a3a6: 83 ec 0c sub $0xc,%esp 10a3a9: 8d 04 76 lea (%esi,%esi,2),%eax 10a3ac: 8d 04 02 lea (%edx,%eax,1),%eax 10a3af: c1 e0 02 shl $0x2,%eax 10a3b2: 50 push %eax 10a3b3: e8 71 1a 00 00 call 10be29 <_Workspace_Allocate> 10a3b8: 89 45 a0 mov %eax,-0x60(%ebp) block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 10a3bb: 83 c4 10 add $0x10,%esp 10a3be: 85 c0 test %eax,%eax 10a3c0: 75 1d jne 10a3df <_Objects_Extend_information+0xbf><== ALWAYS TAKEN 10a3c2: e9 c9 01 00 00 jmp 10a590 <_Objects_Extend_information+0x270><== NOT EXECUTED return; } else { object_blocks = (void**) 10a3c7: 83 ec 0c sub $0xc,%esp 10a3ca: 8d 04 76 lea (%esi,%esi,2),%eax 10a3cd: 8d 04 02 lea (%edx,%eax,1),%eax 10a3d0: c1 e0 02 shl $0x2,%eax 10a3d3: 50 push %eax 10a3d4: e8 65 1a 00 00 call 10be3e <_Workspace_Allocate_or_fatal_error> 10a3d9: 89 45 a0 mov %eax,-0x60(%ebp) 10a3dc: 83 c4 10 add $0x10,%esp /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 10a3df: 8b 45 a0 mov -0x60(%ebp),%eax 10a3e2: 8d 04 b0 lea (%eax,%esi,4),%eax 10a3e5: 89 45 cc mov %eax,-0x34(%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 10a3e8: 8b 55 a0 mov -0x60(%ebp),%edx 10a3eb: 8d 34 f2 lea (%edx,%esi,8),%esi 10a3ee: 89 75 d4 mov %esi,-0x2c(%ebp) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10a3f1: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10a3f5: 31 d2 xor %edx,%edx 10a3f7: 3b 45 c8 cmp -0x38(%ebp),%eax 10a3fa: 76 39 jbe 10a435 <_Objects_Extend_information+0x115> /* * 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, 10a3fc: 8b 45 bc mov -0x44(%ebp),%eax 10a3ff: c1 e0 02 shl $0x2,%eax 10a402: 8b 73 34 mov 0x34(%ebx),%esi 10a405: 8b 7d a0 mov -0x60(%ebp),%edi 10a408: 89 c1 mov %eax,%ecx 10a40a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10a40c: 8b 73 30 mov 0x30(%ebx),%esi 10a40f: 8b 7d cc mov -0x34(%ebp),%edi 10a412: 89 c1 mov %eax,%ecx 10a414: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10a416: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10a41a: 03 4d c8 add -0x38(%ebp),%ecx 10a41d: c1 e1 02 shl $0x2,%ecx 10a420: 8b 73 1c mov 0x1c(%ebx),%esi 10a423: 8b 7d d4 mov -0x2c(%ebp),%edi 10a426: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10a428: eb 10 jmp 10a43a <_Objects_Extend_information+0x11a> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10a42a: 8b 45 d4 mov -0x2c(%ebp),%eax 10a42d: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10a434: 42 inc %edx 10a435: 3b 55 c8 cmp -0x38(%ebp),%edx 10a438: 72 f0 jb 10a42a <_Objects_Extend_information+0x10a> /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10a43a: 8b 55 bc mov -0x44(%ebp),%edx 10a43d: 8b 4d a0 mov -0x60(%ebp),%ecx 10a440: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) inactive_per_block[block_count] = 0; 10a447: 8b 75 cc mov -0x34(%ebp),%esi 10a44a: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10a451: 8b 4d c4 mov -0x3c(%ebp),%ecx 10a454: 03 4b 14 add 0x14(%ebx),%ecx 10a457: 8b 7d c4 mov -0x3c(%ebp),%edi 10a45a: 8b 45 d4 mov -0x2c(%ebp),%eax 10a45d: 8d 14 b8 lea (%eax,%edi,4),%edx 10a460: 89 f8 mov %edi,%eax 10a462: eb 0a jmp 10a46e <_Objects_Extend_information+0x14e> index++ ) { local_table[ index ] = NULL; 10a464: 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++ ) { 10a46a: 40 inc %eax 10a46b: 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 ); 10a46e: 39 c8 cmp %ecx,%eax 10a470: 72 f2 jb 10a464 <_Objects_Extend_information+0x144> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10a472: 9c pushf 10a473: fa cli 10a474: 59 pop %ecx old_tables = information->object_blocks; 10a475: 8b 73 34 mov 0x34(%ebx),%esi information->object_blocks = object_blocks; 10a478: 8b 55 a0 mov -0x60(%ebp),%edx 10a47b: 89 53 34 mov %edx,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10a47e: 8b 7d cc mov -0x34(%ebp),%edi 10a481: 89 7b 30 mov %edi,0x30(%ebx) information->local_table = local_table; 10a484: 8b 45 d4 mov -0x2c(%ebp),%eax 10a487: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = maximum; 10a48a: 8b 55 d0 mov -0x30(%ebp),%edx 10a48d: 66 89 53 10 mov %dx,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10a491: 8b 13 mov (%ebx),%edx 10a493: c1 e2 18 shl $0x18,%edx 10a496: 81 ca 00 00 01 00 or $0x10000,%edx 10a49c: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10a4a0: c1 e0 1b shl $0x1b,%eax 10a4a3: 09 c2 or %eax,%edx 10a4a5: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10a4a9: 09 c2 or %eax,%edx 10a4ab: 89 53 0c mov %edx,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10a4ae: 51 push %ecx 10a4af: 9d popf if ( old_tables ) 10a4b0: 85 f6 test %esi,%esi 10a4b2: 74 0c je 10a4c0 <_Objects_Extend_information+0x1a0> _Workspace_Free( old_tables ); 10a4b4: 83 ec 0c sub $0xc,%esp 10a4b7: 56 push %esi 10a4b8: e8 57 19 00 00 call 10be14 <_Workspace_Free> 10a4bd: 83 c4 10 add $0x10,%esp /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 10a4c0: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10a4c4: 8b 43 18 mov 0x18(%ebx),%eax 10a4c7: 74 32 je 10a4fb <_Objects_Extend_information+0x1db> information->object_blocks[ block ] = 10a4c9: 8b 4d c0 mov -0x40(%ebp),%ecx 10a4cc: 8b 73 34 mov 0x34(%ebx),%esi 10a4cf: 8d 0c 8e lea (%esi,%ecx,4),%ecx 10a4d2: 89 4d d8 mov %ecx,-0x28(%ebp) 10a4d5: 83 ec 0c sub $0xc,%esp 10a4d8: 0f af 43 14 imul 0x14(%ebx),%eax 10a4dc: 50 push %eax 10a4dd: e8 47 19 00 00 call 10be29 <_Workspace_Allocate> 10a4e2: 8b 7d d8 mov -0x28(%ebp),%edi 10a4e5: 89 07 mov %eax,(%edi) _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 10a4e7: 8b 43 34 mov 0x34(%ebx),%eax 10a4ea: 83 c4 10 add $0x10,%esp 10a4ed: 8b 55 c0 mov -0x40(%ebp),%edx 10a4f0: 83 3c 90 00 cmpl $0x0,(%eax,%edx,4) 10a4f4: 75 26 jne 10a51c <_Objects_Extend_information+0x1fc><== ALWAYS TAKEN 10a4f6: e9 95 00 00 00 jmp 10a590 <_Objects_Extend_information+0x270><== NOT EXECUTED return; } else { information->object_blocks[ block ] = 10a4fb: 8b 4d c0 mov -0x40(%ebp),%ecx 10a4fe: 8b 73 34 mov 0x34(%ebx),%esi 10a501: 8d 0c 8e lea (%esi,%ecx,4),%ecx 10a504: 89 4d dc mov %ecx,-0x24(%ebp) 10a507: 83 ec 0c sub $0xc,%esp 10a50a: 0f af 43 14 imul 0x14(%ebx),%eax 10a50e: 50 push %eax 10a50f: e8 2a 19 00 00 call 10be3e <_Workspace_Allocate_or_fatal_error> 10a514: 8b 7d dc mov -0x24(%ebp),%edi 10a517: 89 07 mov %eax,(%edi) 10a519: 83 c4 10 add $0x10,%esp /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10a51c: 8b 45 c0 mov -0x40(%ebp),%eax 10a51f: c1 e0 02 shl $0x2,%eax 10a522: 89 45 e0 mov %eax,-0x20(%ebp) 10a525: ff 73 18 pushl 0x18(%ebx) 10a528: ff 73 14 pushl 0x14(%ebx) 10a52b: 8b 43 34 mov 0x34(%ebx),%eax 10a52e: 8b 55 c0 mov -0x40(%ebp),%edx 10a531: ff 34 90 pushl (%eax,%edx,4) 10a534: 8d 7d e8 lea -0x18(%ebp),%edi 10a537: 57 push %edi 10a538: e8 1f 38 00 00 call 10dd5c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10a53d: 8d 4b 20 lea 0x20(%ebx),%ecx 10a540: 89 4d b8 mov %ecx,-0x48(%ebp) 10a543: 8b 75 c4 mov -0x3c(%ebp),%esi 10a546: eb 24 jmp 10a56c <_Objects_Extend_information+0x24c> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 10a548: 8b 03 mov (%ebx),%eax 10a54a: c1 e0 18 shl $0x18,%eax 10a54d: 0d 00 00 01 00 or $0x10000,%eax 10a552: 0f b7 53 04 movzwl 0x4(%ebx),%edx 10a556: c1 e2 1b shl $0x1b,%edx 10a559: 09 d0 or %edx,%eax 10a55b: 09 f0 or %esi,%eax 10a55d: 89 41 08 mov %eax,0x8(%ecx) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10a560: 50 push %eax 10a561: 50 push %eax 10a562: 51 push %ecx 10a563: ff 75 b8 pushl -0x48(%ebp) 10a566: e8 81 f5 ff ff call 109aec <_Chain_Append> index++; 10a56b: 46 inc %esi * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 10a56c: 89 3c 24 mov %edi,(%esp) 10a56f: e8 9c f5 ff ff call 109b10 <_Chain_Get> 10a574: 89 c1 mov %eax,%ecx 10a576: 83 c4 10 add $0x10,%esp 10a579: 85 c0 test %eax,%eax 10a57b: 75 cb jne 10a548 <_Objects_Extend_information+0x228> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10a57d: 8b 43 30 mov 0x30(%ebx),%eax 10a580: 8b 53 14 mov 0x14(%ebx),%edx 10a583: 8b 75 e0 mov -0x20(%ebp),%esi 10a586: 89 14 30 mov %edx,(%eax,%esi,1) information->inactive += information->allocation_size; 10a589: 8b 43 14 mov 0x14(%ebx),%eax 10a58c: 66 01 43 2c add %ax,0x2c(%ebx) } 10a590: 8d 65 f4 lea -0xc(%ebp),%esp 10a593: 5b pop %ebx 10a594: 5e pop %esi 10a595: 5f pop %edi 10a596: c9 leave 10a597: c3 ret =============================================================================== 0010a62c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10a62c: 55 push %ebp 10a62d: 89 e5 mov %esp,%ebp 10a62f: 56 push %esi 10a630: 53 push %ebx 10a631: 8b 5d 08 mov 0x8(%ebp),%ebx 10a634: 8b 75 0c mov 0xc(%ebp),%esi /** * 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. 10a637: 8d 43 ff lea -0x1(%ebx),%eax 10a63a: 83 f8 03 cmp $0x3,%eax 10a63d: 77 2f ja 10a66e <_Objects_Get_information+0x42> 10a63f: eb 36 jmp 10a677 <_Objects_Get_information+0x4b> return NULL; if ( !the_class ) return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10a641: 83 ec 0c sub $0xc,%esp 10a644: 53 push %ebx 10a645: e8 1a 3b 00 00 call 10e164 <_Objects_API_maximum_class> if ( the_class_api_maximum < 0 || 10a64a: 83 c4 10 add $0x10,%esp 10a64d: 85 c0 test %eax,%eax 10a64f: 78 1d js 10a66e <_Objects_Get_information+0x42><== NEVER TAKEN 10a651: 39 c6 cmp %eax,%esi 10a653: 77 19 ja 10a66e <_Objects_Get_information+0x42><== NEVER TAKEN the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10a655: 8b 04 9d 6c d7 11 00 mov 0x11d76c(,%ebx,4),%eax 10a65c: 85 c0 test %eax,%eax 10a65e: 74 0e je 10a66e <_Objects_Get_information+0x42><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10a660: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !info ) 10a663: 85 c0 test %eax,%eax 10a665: 74 09 je 10a670 <_Objects_Get_information+0x44><== 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 ) 10a667: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10a66c: 75 02 jne 10a670 <_Objects_Get_information+0x44> 10a66e: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10a670: 8d 65 f8 lea -0x8(%ebp),%esp 10a673: 5b pop %ebx 10a674: 5e pop %esi 10a675: c9 leave 10a676: c3 ret int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 10a677: 85 f6 test %esi,%esi 10a679: 74 f3 je 10a66e <_Objects_Get_information+0x42> 10a67b: eb c4 jmp 10a641 <_Objects_Get_information+0x15> =============================================================================== 00114fbc <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 114fbc: 55 push %ebp 114fbd: 89 e5 mov %esp,%ebp 114fbf: 53 push %ebx 114fc0: 8b 4d 08 mov 0x8(%ebp),%ecx 114fc3: 8b 5d 10 mov 0x10(%ebp),%ebx /* * 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; 114fc6: ba 01 00 00 00 mov $0x1,%edx 114fcb: 2b 51 08 sub 0x8(%ecx),%edx 114fce: 03 55 0c add 0xc(%ebp),%edx if ( information->maximum >= index ) { 114fd1: 0f b7 41 10 movzwl 0x10(%ecx),%eax 114fd5: 39 d0 cmp %edx,%eax 114fd7: 72 12 jb 114feb <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 114fd9: 8b 41 1c mov 0x1c(%ecx),%eax 114fdc: 8b 04 90 mov (%eax,%edx,4),%eax 114fdf: 85 c0 test %eax,%eax 114fe1: 74 08 je 114feb <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 114fe3: c7 03 00 00 00 00 movl $0x0,(%ebx) 114fe9: eb 08 jmp 114ff3 <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 114feb: c7 03 01 00 00 00 movl $0x1,(%ebx) 114ff1: 31 c0 xor %eax,%eax return NULL; } 114ff3: 5b pop %ebx 114ff4: c9 leave 114ff5: c3 ret =============================================================================== 0010b66c <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10b66c: 55 push %ebp 10b66d: 89 e5 mov %esp,%ebp 10b66f: 53 push %ebx 10b670: 83 ec 14 sub $0x14,%esp 10b673: 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 ) 10b676: b8 01 00 00 00 mov $0x1,%eax 10b67b: 85 db test %ebx,%ebx 10b67d: 74 59 je 10b6d8 <_Objects_Id_to_name+0x6c><== NEVER TAKEN return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b67f: 8b 4d 08 mov 0x8(%ebp),%ecx 10b682: 85 c9 test %ecx,%ecx 10b684: 75 08 jne 10b68e <_Objects_Id_to_name+0x22> 10b686: a1 44 15 12 00 mov 0x121544,%eax 10b68b: 8b 48 08 mov 0x8(%eax),%ecx uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10b68e: 89 ca mov %ecx,%edx 10b690: c1 ea 18 shr $0x18,%edx 10b693: 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. 10b696: 8d 42 ff lea -0x1(%edx),%eax 10b699: 83 f8 03 cmp $0x3,%eax 10b69c: 77 35 ja 10b6d3 <_Objects_Id_to_name+0x67> 10b69e: eb 3d jmp 10b6dd <_Objects_Id_to_name+0x71> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10b6a0: 89 c8 mov %ecx,%eax 10b6a2: c1 e8 1b shr $0x1b,%eax 10b6a5: 8b 14 82 mov (%edx,%eax,4),%edx if ( !information ) 10b6a8: 85 d2 test %edx,%edx 10b6aa: 74 27 je 10b6d3 <_Objects_Id_to_name+0x67><== NEVER TAKEN return OBJECTS_INVALID_ID; if ( information->is_string ) 10b6ac: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10b6b0: 75 21 jne 10b6d3 <_Objects_Id_to_name+0x67><== NEVER TAKEN return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 10b6b2: 50 push %eax 10b6b3: 8d 45 f8 lea -0x8(%ebp),%eax 10b6b6: 50 push %eax 10b6b7: 51 push %ecx 10b6b8: 52 push %edx 10b6b9: e8 56 ff ff ff call 10b614 <_Objects_Get> if ( !the_object ) 10b6be: 83 c4 10 add $0x10,%esp 10b6c1: 85 c0 test %eax,%eax 10b6c3: 74 0e je 10b6d3 <_Objects_Id_to_name+0x67> return OBJECTS_INVALID_ID; *name = the_object->name; 10b6c5: 8b 40 0c mov 0xc(%eax),%eax 10b6c8: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10b6ca: e8 85 07 00 00 call 10be54 <_Thread_Enable_dispatch> 10b6cf: 31 c0 xor %eax,%eax 10b6d1: eb 05 jmp 10b6d8 <_Objects_Id_to_name+0x6c> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10b6d3: b8 03 00 00 00 mov $0x3,%eax } 10b6d8: 8b 5d fc mov -0x4(%ebp),%ebx 10b6db: c9 leave 10b6dc: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10b6dd: 8b 14 95 58 14 12 00 mov 0x121458(,%edx,4),%edx 10b6e4: 85 d2 test %edx,%edx 10b6e6: 75 b8 jne 10b6a0 <_Objects_Id_to_name+0x34><== ALWAYS TAKEN 10b6e8: eb e9 jmp 10b6d3 <_Objects_Id_to_name+0x67><== NOT EXECUTED =============================================================================== 001132d0 <_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 ) { 1132d0: 55 push %ebp 1132d1: 89 e5 mov %esp,%ebp 1132d3: 57 push %edi 1132d4: 56 push %esi 1132d5: 53 push %ebx 1132d6: 83 ec 0c sub $0xc,%esp 1132d9: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 1132dc: b8 02 00 00 00 mov $0x2,%eax 1132e1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1132e5: 74 59 je 113340 <_Objects_Name_to_id_string+0x70><== NEVER TAKEN return OBJECTS_INVALID_ADDRESS; if ( !name ) 1132e7: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 1132eb: 74 4e je 11333b <_Objects_Name_to_id_string+0x6b><== NEVER TAKEN return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 1132ed: 8b 47 10 mov 0x10(%edi),%eax 1132f0: 66 85 c0 test %ax,%ax 1132f3: 74 46 je 11333b <_Objects_Name_to_id_string+0x6b><== NEVER TAKEN 1132f5: be 01 00 00 00 mov $0x1,%esi name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1132fa: 0f b7 c0 movzwl %ax,%eax 1132fd: 89 45 f0 mov %eax,-0x10(%ebp) 113300: eb 34 jmp 113336 <_Objects_Name_to_id_string+0x66> the_object = information->local_table[ index ]; 113302: 8b 47 1c mov 0x1c(%edi),%eax 113305: 8b 1c b0 mov (%eax,%esi,4),%ebx if ( !the_object ) 113308: 85 db test %ebx,%ebx 11330a: 74 29 je 113335 <_Objects_Name_to_id_string+0x65> continue; if ( !the_object->name.name_p ) 11330c: 8b 53 0c mov 0xc(%ebx),%edx 11330f: 85 d2 test %edx,%edx 113311: 74 22 je 113335 <_Objects_Name_to_id_string+0x65> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 113313: 50 push %eax 113314: 0f b7 47 3a movzwl 0x3a(%edi),%eax 113318: 50 push %eax 113319: 52 push %edx 11331a: ff 75 0c pushl 0xc(%ebp) 11331d: e8 5e 25 00 00 call 115880 113322: 83 c4 10 add $0x10,%esp 113325: 85 c0 test %eax,%eax 113327: 75 0c jne 113335 <_Objects_Name_to_id_string+0x65> *id = the_object->id; 113329: 8b 43 08 mov 0x8(%ebx),%eax 11332c: 8b 55 10 mov 0x10(%ebp),%edx 11332f: 89 02 mov %eax,(%edx) 113331: 31 c0 xor %eax,%eax 113333: eb 0b jmp 113340 <_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++ ) { 113335: 46 inc %esi 113336: 3b 75 f0 cmp -0x10(%ebp),%esi 113339: 76 c7 jbe 113302 <_Objects_Name_to_id_string+0x32> 11333b: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 113340: 8d 65 f4 lea -0xc(%ebp),%esp 113343: 5b pop %ebx 113344: 5e pop %esi 113345: 5f pop %edi 113346: c9 leave 113347: c3 ret =============================================================================== 0010a814 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10a814: 55 push %ebp 10a815: 89 e5 mov %esp,%ebp 10a817: 57 push %edi 10a818: 56 push %esi 10a819: 53 push %ebx 10a81a: 8b 7d 08 mov 0x8(%ebp),%edi 10a81d: 8b 5d 0c mov 0xc(%ebp),%ebx 10a820: 8b 55 10 mov 0x10(%ebp),%edx 10a823: 8b 75 14 mov 0x14(%ebp),%esi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 10a826: b8 02 00 00 00 mov $0x2,%eax 10a82b: 85 f6 test %esi,%esi 10a82d: 74 49 je 10a878 <_Objects_Name_to_id_u32+0x64> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10a82f: 85 db test %ebx,%ebx 10a831: 74 40 je 10a873 <_Objects_Name_to_id_u32+0x5f> return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 10a833: 8b 47 10 mov 0x10(%edi),%eax 10a836: 66 85 c0 test %ax,%ax 10a839: 74 38 je 10a873 <_Objects_Name_to_id_u32+0x5f><== NEVER TAKEN 10a83b: 85 d2 test %edx,%edx 10a83d: 74 28 je 10a867 <_Objects_Name_to_id_u32+0x53> 10a83f: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10a845: 74 20 je 10a867 <_Objects_Name_to_id_u32+0x53> 10a847: 4a dec %edx 10a848: 75 29 jne 10a873 <_Objects_Name_to_id_u32+0x5f> 10a84a: eb 1b jmp 10a867 <_Objects_Name_to_id_u32+0x53> if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 10a84c: 8b 47 1c mov 0x1c(%edi),%eax 10a84f: 8b 04 90 mov (%eax,%edx,4),%eax if ( !the_object ) 10a852: 85 c0 test %eax,%eax 10a854: 74 0e je 10a864 <_Objects_Name_to_id_u32+0x50> continue; if ( name == the_object->name.name_u32 ) { 10a856: 3b 58 0c cmp 0xc(%eax),%ebx 10a859: 75 09 jne 10a864 <_Objects_Name_to_id_u32+0x50> *id = the_object->id; 10a85b: 8b 40 08 mov 0x8(%eax),%eax 10a85e: 89 06 mov %eax,(%esi) 10a860: 31 c0 xor %eax,%eax 10a862: eb 14 jmp 10a878 <_Objects_Name_to_id_u32+0x64> search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10a864: 42 inc %edx 10a865: eb 08 jmp 10a86f <_Objects_Name_to_id_u32+0x5b> 10a867: ba 01 00 00 00 mov $0x1,%edx 10a86c: 0f b7 c8 movzwl %ax,%ecx 10a86f: 39 ca cmp %ecx,%edx 10a871: 76 d9 jbe 10a84c <_Objects_Name_to_id_u32+0x38> 10a873: 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 } 10a878: 5b pop %ebx 10a879: 5e pop %esi 10a87a: 5f pop %edi 10a87b: c9 leave 10a87c: c3 ret =============================================================================== 0010ae7c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10ae7c: 55 push %ebp 10ae7d: 89 e5 mov %esp,%ebp 10ae7f: 57 push %edi 10ae80: 56 push %esi 10ae81: 53 push %ebx 10ae82: 83 ec 14 sub $0x14,%esp 10ae85: 8b 5d 08 mov 0x8(%ebp),%ebx 10ae88: 8b 7d 10 mov 0x10(%ebp),%edi size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 10ae8b: 0f b7 43 3a movzwl 0x3a(%ebx),%eax 10ae8f: 50 push %eax 10ae90: 57 push %edi 10ae91: e8 a6 63 00 00 call 11123c 10ae96: 89 45 f0 mov %eax,-0x10(%ebp) 10ae99: 89 c6 mov %eax,%esi 10ae9b: 46 inc %esi if ( information->is_string ) { 10ae9c: 83 c4 10 add $0x10,%esp 10ae9f: 80 7b 38 00 cmpb $0x0,0x38(%ebx) 10aea3: 74 56 je 10aefb <_Objects_Set_name+0x7f> char *d; d = _Workspace_Allocate( length ); 10aea5: 83 ec 0c sub $0xc,%esp 10aea8: 56 push %esi 10aea9: e8 4f 16 00 00 call 10c4fd <_Workspace_Allocate> 10aeae: 89 c3 mov %eax,%ebx if ( !d ) 10aeb0: 83 c4 10 add $0x10,%esp 10aeb3: 31 c0 xor %eax,%eax 10aeb5: 85 db test %ebx,%ebx 10aeb7: 0f 84 81 00 00 00 je 10af3e <_Objects_Set_name+0xc2><== NEVER TAKEN return FALSE; if ( the_object->name.name_p ) { 10aebd: 8b 55 0c mov 0xc(%ebp),%edx 10aec0: 8b 42 0c mov 0xc(%edx),%eax 10aec3: 85 c0 test %eax,%eax 10aec5: 74 16 je 10aedd <_Objects_Set_name+0x61> _Workspace_Free( (void *)the_object->name.name_p ); 10aec7: 83 ec 0c sub $0xc,%esp 10aeca: 50 push %eax 10aecb: e8 18 16 00 00 call 10c4e8 <_Workspace_Free> the_object->name.name_p = NULL; 10aed0: 8b 45 0c mov 0xc(%ebp),%eax 10aed3: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10aeda: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10aedd: 50 push %eax 10aede: 56 push %esi 10aedf: 57 push %edi 10aee0: 53 push %ebx 10aee1: e8 ce 62 00 00 call 1111b4 d[ length ] = '\0'; 10aee6: 8b 55 f0 mov -0x10(%ebp),%edx 10aee9: c6 44 13 01 00 movb $0x0,0x1(%ebx,%edx,1) the_object->name.name_p = d; 10aeee: 8b 45 0c mov 0xc(%ebp),%eax 10aef1: 89 58 0c mov %ebx,0xc(%eax) 10aef4: b0 01 mov $0x1,%al 10aef6: 83 c4 10 add $0x10,%esp 10aef9: eb 43 jmp 10af3e <_Objects_Set_name+0xc2> } else { the_object->name.name_u32 = _Objects_Build_name( 10aefb: b8 00 00 00 20 mov $0x20000000,%eax 10af00: 85 f6 test %esi,%esi 10af02: 74 4e je 10af52 <_Objects_Set_name+0xd6><== NEVER TAKEN 10af04: 0f be 07 movsbl (%edi),%eax 10af07: c1 e0 18 shl $0x18,%eax 10af0a: 83 fe 01 cmp $0x1,%esi 10af0d: 74 43 je 10af52 <_Objects_Set_name+0xd6> 10af0f: 0f be 5f 01 movsbl 0x1(%edi),%ebx 10af13: c1 e3 10 shl $0x10,%ebx 10af16: 83 fe 02 cmp $0x2,%esi 10af19: 76 2b jbe 10af46 <_Objects_Set_name+0xca> 10af1b: 0f be 57 02 movsbl 0x2(%edi),%edx 10af1f: c1 e2 08 shl $0x8,%edx 10af22: b9 20 00 00 00 mov $0x20,%ecx 10af27: 83 fe 03 cmp $0x3,%esi 10af2a: 76 04 jbe 10af30 <_Objects_Set_name+0xb4> 10af2c: 0f be 4f 03 movsbl 0x3(%edi),%ecx 10af30: 09 d8 or %ebx,%eax 10af32: 09 d0 or %edx,%eax 10af34: 09 c8 or %ecx,%eax 10af36: 8b 55 0c mov 0xc(%ebp),%edx 10af39: 89 42 0c mov %eax,0xc(%edx) 10af3c: b0 01 mov $0x1,%al ); } return TRUE; } 10af3e: 8d 65 f4 lea -0xc(%ebp),%esp 10af41: 5b pop %ebx 10af42: 5e pop %esi 10af43: 5f pop %edi 10af44: c9 leave 10af45: c3 ret strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 10af46: b9 20 00 00 00 mov $0x20,%ecx 10af4b: ba 00 20 00 00 mov $0x2000,%edx 10af50: eb de jmp 10af30 <_Objects_Set_name+0xb4> 10af52: bb 00 00 20 00 mov $0x200000,%ebx 10af57: eb ed jmp 10af46 <_Objects_Set_name+0xca> =============================================================================== 0010a888 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10a888: 55 push %ebp 10a889: 89 e5 mov %esp,%ebp 10a88b: 57 push %edi 10a88c: 56 push %esi 10a88d: 53 push %ebx 10a88e: 83 ec 0c sub $0xc,%esp 10a891: 8b 75 08 mov 0x8(%ebp),%esi * 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 10a894: 8b 46 08 mov 0x8(%esi),%eax 10a897: 0f b7 f8 movzwl %ax,%edi /* * 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; 10a89a: 8b 4e 14 mov 0x14(%esi),%ecx 10a89d: 0f b7 46 10 movzwl 0x10(%esi),%eax 10a8a1: 29 f8 sub %edi,%eax 10a8a3: 31 d2 xor %edx,%edx 10a8a5: f7 f1 div %ecx 10a8a7: 89 c3 mov %eax,%ebx 10a8a9: 31 d2 xor %edx,%edx 10a8ab: eb 7c jmp 10a929 <_Objects_Shrink_information+0xa1> for ( block = 0; block < block_count; block++ ) { 10a8ad: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax 10a8b4: 89 45 f0 mov %eax,-0x10(%ebp) if ( information->inactive_per_block[ block ] == information->allocation_size ) { 10a8b7: 8b 46 30 mov 0x30(%esi),%eax 10a8ba: 39 0c 90 cmp %ecx,(%eax,%edx,4) 10a8bd: 75 67 jne 10a926 <_Objects_Shrink_information+0x9e> /* * 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; 10a8bf: 8b 56 20 mov 0x20(%esi),%edx 10a8c2: 8b 42 08 mov 0x8(%edx),%eax 10a8c5: 0f b7 c8 movzwl %ax,%ecx */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 10a8c8: 39 f9 cmp %edi,%ecx 10a8ca: 72 1b jb 10a8e7 <_Objects_Shrink_information+0x5f> 10a8cc: 89 f8 mov %edi,%eax 10a8ce: 03 46 14 add 0x14(%esi),%eax 10a8d1: 39 c1 cmp %eax,%ecx 10a8d3: 73 12 jae 10a8e7 <_Objects_Shrink_information+0x5f> * @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, 10a8d5: 8b 1a mov (%edx),%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 ); 10a8d7: 83 ec 0c sub $0xc,%esp 10a8da: 52 push %edx 10a8db: e8 64 34 00 00 call 10dd44 <_Chain_Extract> 10a8e0: 89 da mov %ebx,%edx 10a8e2: 83 c4 10 add $0x10,%esp 10a8e5: eb 02 jmp 10a8e9 <_Objects_Shrink_information+0x61> } else { the_object = (Objects_Control *) the_object->Node.next; 10a8e7: 8b 12 mov (%edx),%edx } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 10a8e9: 85 d2 test %edx,%edx 10a8eb: 74 05 je 10a8f2 <_Objects_Shrink_information+0x6a><== NEVER TAKEN 10a8ed: 83 3a 00 cmpl $0x0,(%edx) 10a8f0: 75 d0 jne 10a8c2 <_Objects_Shrink_information+0x3a> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10a8f2: 83 ec 0c sub $0xc,%esp 10a8f5: 8b 46 34 mov 0x34(%esi),%eax 10a8f8: 8b 55 f0 mov -0x10(%ebp),%edx 10a8fb: ff 34 10 pushl (%eax,%edx,1) 10a8fe: e8 11 15 00 00 call 10be14 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10a903: 8b 46 34 mov 0x34(%esi),%eax 10a906: 8b 55 f0 mov -0x10(%ebp),%edx 10a909: c7 04 10 00 00 00 00 movl $0x0,(%eax,%edx,1) information->inactive_per_block[ block ] = 0; 10a910: 8b 46 30 mov 0x30(%esi),%eax 10a913: c7 04 10 00 00 00 00 movl $0x0,(%eax,%edx,1) information->inactive -= information->allocation_size; 10a91a: 8b 46 14 mov 0x14(%esi),%eax 10a91d: 66 29 46 2c sub %ax,0x2c(%esi) 10a921: 83 c4 10 add $0x10,%esp 10a924: eb 07 jmp 10a92d <_Objects_Shrink_information+0xa5> return; } index_base += information->allocation_size; 10a926: 01 cf add %ecx,%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++ ) { 10a928: 42 inc %edx 10a929: 39 da cmp %ebx,%edx 10a92b: 72 80 jb 10a8ad <_Objects_Shrink_information+0x25> return; } index_base += information->allocation_size; } } 10a92d: 8d 65 f4 lea -0xc(%ebp),%esp 10a930: 5b pop %ebx 10a931: 5e pop %esi 10a932: 5f pop %edi 10a933: c9 leave 10a934: c3 ret =============================================================================== 00109844 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 109844: 55 push %ebp 109845: 89 e5 mov %esp,%ebp 109847: 53 push %ebx 109848: 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; 10984b: 8b 45 08 mov 0x8(%ebp),%eax 10984e: 8b 58 44 mov 0x44(%eax),%ebx if ( !api_configuration ) 109851: 85 db test %ebx,%ebx 109853: 75 05 jne 10985a <_POSIX_API_Initialize+0x16><== ALWAYS TAKEN 109855: bb e8 72 11 00 mov $0x1172e8,%ebx <== NOT EXECUTED api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 10985a: c7 05 78 d7 11 00 4c movl $0x11dc4c,0x11d778 109861: dc 11 00 _POSIX_signals_Manager_Initialization( 109864: 83 ec 0c sub $0xc,%esp 109867: ff 73 14 pushl 0x14(%ebx) 10986a: e8 f5 3b 00 00 call 10d464 <_POSIX_signals_Manager_Initialization> api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 10986f: 83 c4 0c add $0xc,%esp 109872: ff 73 30 pushl 0x30(%ebx) 109875: ff 73 2c pushl 0x2c(%ebx) 109878: ff 33 pushl (%ebx) 10987a: e8 67 3d 00 00 call 10d5e6 <_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( 10987f: 58 pop %eax 109880: ff 73 08 pushl 0x8(%ebx) 109883: e8 cc 3a 00 00 call 10d354 <_POSIX_Condition_variables_Manager_initialization> api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 109888: 58 pop %eax 109889: ff 73 0c pushl 0xc(%ebx) 10988c: e8 eb 3a 00 00 call 10d37c <_POSIX_Key_Manager_initialization> _POSIX_Mutex_Manager_initialization( 109891: 58 pop %eax 109892: ff 73 04 pushl 0x4(%ebx) 109895: e8 52 3b 00 00 call 10d3ec <_POSIX_Mutex_Manager_initialization> api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 10989a: 58 pop %eax 10989b: ff 73 18 pushl 0x18(%ebx) 10989e: e8 01 3b 00 00 call 10d3a4 <_POSIX_Message_queue_Manager_initialization> api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 1098a3: 58 pop %eax 1098a4: ff 73 1c pushl 0x1c(%ebx) 1098a7: e8 40 40 00 00 call 10d8ec <_POSIX_Semaphore_Manager_initialization> api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 1098ac: 59 pop %ecx 1098ad: ff 73 10 pushl 0x10(%ebx) 1098b0: e8 0f 40 00 00 call 10d8c4 <_POSIX_Timer_Manager_initialization> _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 1098b5: 5a pop %edx 1098b6: ff 73 20 pushl 0x20(%ebx) 1098b9: e8 56 3b 00 00 call 10d414 <_POSIX_Barrier_Manager_initialization> _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 1098be: 58 pop %eax 1098bf: ff 73 24 pushl 0x24(%ebx) 1098c2: e8 75 3b 00 00 call 10d43c <_POSIX_RWLock_Manager_initialization> _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 1098c7: 83 c4 10 add $0x10,%esp 1098ca: 8b 43 28 mov 0x28(%ebx),%eax 1098cd: 89 45 08 mov %eax,0x8(%ebp) } 1098d0: 8b 5d fc mov -0x4(%ebp),%ebx 1098d3: 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); 1098d4: e9 d3 3c 00 00 jmp 10d5ac <_POSIX_Spinlock_Manager_initialization> =============================================================================== 00109a50 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 109a50: 55 push %ebp 109a51: 89 e5 mov %esp,%ebp 109a53: 56 push %esi 109a54: 53 push %ebx 109a55: 8b 5d 08 mov 0x8(%ebp),%ebx 109a58: 8b 75 0c mov 0xc(%ebp),%esi Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 109a5b: 85 db test %ebx,%ebx 109a5d: 74 16 je 109a75 <_POSIX_Condition_variables_Get+0x25> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 109a5f: 83 3b ff cmpl $0xffffffff,(%ebx) 109a62: 75 1b jne 109a7f <_POSIX_Condition_variables_Get+0x2f><== ALWAYS TAKEN /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 109a64: 52 push %edx <== NOT EXECUTED 109a65: 52 push %edx <== NOT EXECUTED 109a66: 6a 00 push $0x0 <== NOT EXECUTED 109a68: 53 push %ebx <== NOT EXECUTED 109a69: e8 2a 00 00 00 call 109a98 <== NOT EXECUTED if ( status ) { 109a6e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a71: 85 c0 test %eax,%eax <== NOT EXECUTED 109a73: 74 0a je 109a7f <_POSIX_Condition_variables_Get+0x2f><== NOT EXECUTED *location = OBJECTS_ERROR; 109a75: c7 06 01 00 00 00 movl $0x1,(%esi) 109a7b: 31 c0 xor %eax,%eax 109a7d: eb 11 jmp 109a90 <_POSIX_Condition_variables_Get+0x40> /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 109a7f: 50 push %eax 109a80: 56 push %esi 109a81: ff 33 pushl (%ebx) 109a83: 68 d4 14 12 00 push $0x1214d4 109a88: e8 3b 29 00 00 call 10c3c8 <_Objects_Get> 109a8d: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 109a90: 8d 65 f8 lea -0x8(%ebp),%esp 109a93: 5b pop %ebx 109a94: 5e pop %esi 109a95: c9 leave 109a96: c3 ret =============================================================================== 00109c00 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 109c00: 55 push %ebp 109c01: 89 e5 mov %esp,%ebp 109c03: 57 push %edi 109c04: 56 push %esi 109c05: 53 push %ebx 109c06: 83 ec 24 sub $0x24,%esp 109c09: 8b 7d 08 mov 0x8(%ebp),%edi 109c0c: 8b 75 0c mov 0xc(%ebp),%esi 109c0f: 8a 45 14 mov 0x14(%ebp),%al 109c12: 88 45 e3 mov %al,-0x1d(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 109c15: 8d 5d f0 lea -0x10(%ebp),%ebx 109c18: 53 push %ebx 109c19: 56 push %esi 109c1a: e8 82 01 00 00 call 109da1 <_POSIX_Mutex_Get> 109c1f: 83 c4 10 add $0x10,%esp 109c22: 85 c0 test %eax,%eax 109c24: 0f 84 af 00 00 00 je 109cd9 <_POSIX_Condition_variables_Wait_support+0xd9> 109c2a: a1 60 10 12 00 mov 0x121060,%eax 109c2f: 48 dec %eax 109c30: a3 60 10 12 00 mov %eax,0x121060 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 109c35: 52 push %edx 109c36: 52 push %edx 109c37: 53 push %ebx 109c38: 57 push %edi 109c39: e8 12 fe ff ff call 109a50 <_POSIX_Condition_variables_Get> 109c3e: 89 c3 mov %eax,%ebx switch ( location ) { 109c40: 83 c4 10 add $0x10,%esp 109c43: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 109c47: 0f 85 8c 00 00 00 jne 109cd9 <_POSIX_Condition_variables_Wait_support+0xd9> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 109c4d: 8b 40 14 mov 0x14(%eax),%eax 109c50: 85 c0 test %eax,%eax 109c52: 74 0b je 109c5f <_POSIX_Condition_variables_Wait_support+0x5f> 109c54: 3b 06 cmp (%esi),%eax 109c56: 74 07 je 109c5f <_POSIX_Condition_variables_Wait_support+0x5f><== ALWAYS TAKEN _Thread_Enable_dispatch(); 109c58: e8 2b 2f 00 00 call 10cb88 <_Thread_Enable_dispatch><== NOT EXECUTED 109c5d: eb 7a jmp 109cd9 <_POSIX_Condition_variables_Wait_support+0xd9><== NOT EXECUTED return EINVAL; } (void) pthread_mutex_unlock( mutex ); 109c5f: 83 ec 0c sub $0xc,%esp 109c62: 56 push %esi 109c63: e8 10 03 00 00 call 109f78 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 109c68: 83 c4 10 add $0x10,%esp 109c6b: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 109c6f: 75 4e jne 109cbf <_POSIX_Condition_variables_Wait_support+0xbf> the_cond->Mutex = *mutex; 109c71: 8b 06 mov (%esi),%eax 109c73: 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 109c76: 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; 109c7d: 8b 15 20 11 12 00 mov 0x121120,%edx 109c83: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 109c8a: 8d 4b 18 lea 0x18(%ebx),%ecx 109c8d: 89 4a 44 mov %ecx,0x44(%edx) _Thread_Executing->Wait.id = *cond; 109c90: 8b 07 mov (%edi),%eax 109c92: 89 42 20 mov %eax,0x20(%edx) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 109c95: 50 push %eax 109c96: 68 28 d3 10 00 push $0x10d328 109c9b: ff 75 10 pushl 0x10(%ebp) 109c9e: 51 push %ecx 109c9f: e8 34 33 00 00 call 10cfd8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 109ca4: e8 df 2e 00 00 call 10cb88 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 109ca9: a1 20 11 12 00 mov 0x121120,%eax 109cae: 8b 58 34 mov 0x34(%eax),%ebx if ( status && status != ETIMEDOUT ) 109cb1: 83 c4 10 add $0x10,%esp 109cb4: 85 db test %ebx,%ebx 109cb6: 74 11 je 109cc9 <_POSIX_Condition_variables_Wait_support+0xc9> 109cb8: 83 fb 74 cmp $0x74,%ebx 109cbb: 75 21 jne 109cde <_POSIX_Condition_variables_Wait_support+0xde><== NEVER TAKEN 109cbd: eb 0a jmp 109cc9 <_POSIX_Condition_variables_Wait_support+0xc9> return status; } else { _Thread_Enable_dispatch(); 109cbf: e8 c4 2e 00 00 call 10cb88 <_Thread_Enable_dispatch> 109cc4: bb 74 00 00 00 mov $0x74,%ebx /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 109cc9: 83 ec 0c sub $0xc,%esp 109ccc: 56 push %esi 109ccd: e8 26 02 00 00 call 109ef8 if ( mutex_status ) 109cd2: 83 c4 10 add $0x10,%esp 109cd5: 85 c0 test %eax,%eax 109cd7: 74 05 je 109cde <_POSIX_Condition_variables_Wait_support+0xde> 109cd9: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 109cde: 89 d8 mov %ebx,%eax 109ce0: 8d 65 f4 lea -0xc(%ebp),%esp 109ce3: 5b pop %ebx 109ce4: 5e pop %esi 109ce5: 5f pop %edi 109ce6: c9 leave 109ce7: c3 ret =============================================================================== 0010ea38 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 10ea38: 55 push %ebp 10ea39: 89 e5 mov %esp,%ebp 10ea3b: 57 push %edi 10ea3c: 56 push %esi 10ea3d: 53 push %ebx 10ea3e: 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 ); 10ea41: 8b 45 08 mov 0x8(%ebp),%eax 10ea44: 8b 40 08 mov 0x8(%eax),%eax uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10ea47: 89 c2 mov %eax,%edx 10ea49: c1 ea 18 shr $0x18,%edx 10ea4c: 83 e2 07 and $0x7,%edx 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 ]; 10ea4f: 25 ff ff 00 00 and $0xffff,%eax 10ea54: c1 e0 02 shl $0x2,%eax 10ea57: 89 45 ec mov %eax,-0x14(%ebp) 10ea5a: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ea61: 83 c2 04 add $0x4,%edx 10ea64: 89 55 e8 mov %edx,-0x18(%ebp) 10ea67: be 01 00 00 00 mov $0x1,%esi 10ea6c: bf 01 00 00 00 mov $0x1,%edi 10ea71: eb 49 jmp 10eabc <_POSIX_Keys_Run_destructors+0x84> are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { the_key = (POSIX_Keys_Control *) 10ea73: a1 e8 db 11 00 mov 0x11dbe8,%eax 10ea78: 8b 1c b0 mov (%eax,%esi,4),%ebx _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 10ea7b: 85 db test %ebx,%ebx 10ea7d: 74 3c je 10eabb <_POSIX_Keys_Run_destructors+0x83> 10ea7f: 80 7b 10 00 cmpb $0x0,0x10(%ebx) 10ea83: 74 36 je 10eabb <_POSIX_Keys_Run_destructors+0x83><== NEVER TAKEN 10ea85: 8b 53 14 mov 0x14(%ebx),%edx 10ea88: 85 d2 test %edx,%edx 10ea8a: 74 2f je 10eabb <_POSIX_Keys_Run_destructors+0x83><== NEVER TAKEN value = the_key->Values[ thread_api ][ thread_index ]; 10ea8c: 8b 4d e8 mov -0x18(%ebp),%ecx 10ea8f: 8b 44 8b 08 mov 0x8(%ebx,%ecx,4),%eax 10ea93: 8b 4d ec mov -0x14(%ebp),%ecx 10ea96: 8b 04 08 mov (%eax,%ecx,1),%eax if ( value ) { 10ea99: 85 c0 test %eax,%eax 10ea9b: 74 1e je 10eabb <_POSIX_Keys_Run_destructors+0x83><== NEVER TAKEN (*the_key->destructor)( value ); 10ea9d: 83 ec 0c sub $0xc,%esp 10eaa0: 50 push %eax 10eaa1: ff d2 call *%edx if ( the_key->Values[ thread_api ][ thread_index ] ) 10eaa3: 8b 55 e8 mov -0x18(%ebp),%edx 10eaa6: 8b 44 93 08 mov 0x8(%ebx,%edx,4),%eax 10eaaa: 83 c4 10 add $0x10,%esp 10eaad: 8b 4d ec mov -0x14(%ebp),%ecx 10eab0: 83 3c 08 00 cmpl $0x0,(%eax,%ecx,1) 10eab4: 0f 94 c0 sete %al 10eab7: f7 d8 neg %eax 10eab9: 21 c7 and %eax,%edi for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 10eabb: 46 inc %esi 10eabc: 0f b7 05 dc db 11 00 movzwl 0x11dbdc,%eax 10eac3: 39 c6 cmp %eax,%esi 10eac5: 76 ac jbe 10ea73 <_POSIX_Keys_Run_destructors+0x3b> are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 10eac7: 89 f8 mov %edi,%eax 10eac9: 84 c0 test %al,%al 10eacb: 75 09 jne 10ead6 <_POSIX_Keys_Run_destructors+0x9e> return; iterations++; 10eacd: ff 45 f0 incl -0x10(%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 ) 10ead0: 83 7d f0 04 cmpl $0x4,-0x10(%ebp) 10ead4: 75 91 jne 10ea67 <_POSIX_Keys_Run_destructors+0x2f> return; } } 10ead6: 8d 65 f4 lea -0xc(%ebp),%esp 10ead9: 5b pop %ebx 10eada: 5e pop %esi 10eadb: 5f pop %edi 10eadc: c9 leave 10eadd: c3 ret =============================================================================== 001123e4 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 1123e4: 55 push %ebp 1123e5: 89 e5 mov %esp,%ebp 1123e7: 57 push %edi 1123e8: 56 push %esi 1123e9: 53 push %ebx 1123ea: 83 ec 24 sub $0x24,%esp 1123ed: 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 ); 1123f0: 68 ff 00 00 00 push $0xff 1123f5: ff 75 08 pushl 0x8(%ebp) 1123f8: e8 b7 35 00 00 call 1159b4 1123fd: 89 c3 mov %eax,%ebx if ( n > NAME_MAX ) 1123ff: 83 c4 10 add $0x10,%esp 112402: b8 5b 00 00 00 mov $0x5b,%eax 112407: 81 fb ff 00 00 00 cmp $0xff,%ebx 11240d: 0f 87 34 01 00 00 ja 112547 <_POSIX_Message_queue_Create_support+0x163><== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 112413: a1 58 63 12 00 mov 0x126358,%eax 112418: 40 inc %eax 112419: a3 58 63 12 00 mov %eax,0x126358 * 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 ) { 11241e: 85 f6 test %esi,%esi 112420: 75 0d jne 11242f <_POSIX_Message_queue_Create_support+0x4b> 112422: c7 45 e0 10 00 00 00 movl $0x10,-0x20(%ebp) 112429: 66 be 0a 00 mov $0xa,%si 11242d: eb 31 jmp 112460 <_POSIX_Message_queue_Create_support+0x7c> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 11242f: 83 7e 04 00 cmpl $0x0,0x4(%esi) 112433: 7e 06 jle 11243b <_POSIX_Message_queue_Create_support+0x57> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 112435: 83 7e 08 00 cmpl $0x0,0x8(%esi) 112439: 7f 12 jg 11244d <_POSIX_Message_queue_Create_support+0x69> _Thread_Enable_dispatch(); 11243b: e8 f4 d8 ff ff call 10fd34 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 112440: e8 c7 1f 00 00 call 11440c <__errno> 112445: c7 00 16 00 00 00 movl $0x16,(%eax) 11244b: eb 39 jmp 112486 <_POSIX_Message_queue_Create_support+0xa2> } attr = *attr_ptr; 11244d: 8d 7d e4 lea -0x1c(%ebp),%edi 112450: b9 04 00 00 00 mov $0x4,%ecx 112455: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 112457: 8b 45 ec mov -0x14(%ebp),%eax 11245a: 89 45 e0 mov %eax,-0x20(%ebp) 11245d: 8b 75 e8 mov -0x18(%ebp),%esi * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus extern "C" { 112460: 83 ec 0c sub $0xc,%esp 112463: 68 c8 66 12 00 push $0x1266c8 112468: e8 77 cc ff ff call 10f0e4 <_Objects_Allocate> 11246d: 89 c7 mov %eax,%edi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 11246f: 83 c4 10 add $0x10,%esp 112472: 85 c0 test %eax,%eax 112474: 75 18 jne 11248e <_POSIX_Message_queue_Create_support+0xaa><== ALWAYS TAKEN _Thread_Enable_dispatch(); 112476: e8 b9 d8 ff ff call 10fd34 <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 11247b: e8 8c 1f 00 00 call 11440c <__errno> <== NOT EXECUTED 112480: c7 00 17 00 00 00 movl $0x17,(%eax) <== NOT EXECUTED 112486: 83 c8 ff or $0xffffffff,%eax 112489: e9 b9 00 00 00 jmp 112547 <_POSIX_Message_queue_Create_support+0x163> } the_mq->process_shared = pshared; 11248e: 8b 45 0c mov 0xc(%ebp),%eax 112491: 89 47 10 mov %eax,0x10(%edi) the_mq->named = TRUE; 112494: c6 47 14 01 movb $0x1,0x14(%edi) the_mq->open_count = 1; 112498: c7 47 18 01 00 00 00 movl $0x1,0x18(%edi) the_mq->linked = TRUE; 11249f: 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); 1124a3: 83 ec 0c sub $0xc,%esp 1124a6: 53 push %ebx 1124a7: e8 01 e9 ff ff call 110dad <_Workspace_Allocate> 1124ac: 89 c3 mov %eax,%ebx if (!name) { 1124ae: 83 c4 10 add $0x10,%esp 1124b1: 85 c0 test %eax,%eax 1124b3: 75 1f jne 1124d4 <_POSIX_Message_queue_Create_support+0xf0><== ALWAYS TAKEN Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 1124b5: 51 push %ecx <== NOT EXECUTED 1124b6: 51 push %ecx <== NOT EXECUTED 1124b7: 57 push %edi <== NOT EXECUTED 1124b8: 68 c8 66 12 00 push $0x1266c8 <== NOT EXECUTED 1124bd: e8 32 cf ff ff call 10f3f4 <_Objects_Free> <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 1124c2: e8 6d d8 ff ff call 10fd34 <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 1124c7: e8 40 1f 00 00 call 11440c <__errno> <== NOT EXECUTED 1124cc: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1124d2: eb 4f jmp 112523 <_POSIX_Message_queue_Create_support+0x13f><== NOT EXECUTED } strcpy( name, name_arg ); 1124d4: 52 push %edx 1124d5: 52 push %edx 1124d6: ff 75 08 pushl 0x8(%ebp) 1124d9: 50 push %eax 1124da: e8 b9 30 00 00 call 115598 * 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; 1124df: c7 47 5c 00 00 00 00 movl $0x0,0x5c(%edi) if ( ! _CORE_message_queue_Initialize( 1124e6: ff 75 e0 pushl -0x20(%ebp) 1124e9: 56 push %esi 1124ea: 8d 47 5c lea 0x5c(%edi),%eax 1124ed: 50 push %eax 1124ee: 8d 47 1c lea 0x1c(%edi),%eax 1124f1: 50 push %eax 1124f2: e8 d1 09 00 00 call 112ec8 <_CORE_message_queue_Initialize> 1124f7: 83 c4 20 add $0x20,%esp 1124fa: 84 c0 test %al,%al 1124fc: 75 2d jne 11252b <_POSIX_Message_queue_Create_support+0x147><== ALWAYS TAKEN 1124fe: 50 push %eax <== NOT EXECUTED 1124ff: 50 push %eax <== NOT EXECUTED 112500: 57 push %edi <== NOT EXECUTED 112501: 68 c8 66 12 00 push $0x1266c8 <== NOT EXECUTED 112506: e8 e9 ce ff ff call 10f3f4 <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 11250b: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 11250e: e8 85 e8 ff ff call 110d98 <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); 112513: e8 1c d8 ff ff call 10fd34 <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 112518: e8 ef 1e 00 00 call 11440c <__errno> <== NOT EXECUTED 11251d: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 112523: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 112526: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112529: eb 1c jmp 112547 <_POSIX_Message_queue_Create_support+0x163><== NOT EXECUTED 11252b: 0f b7 47 08 movzwl 0x8(%edi),%eax 11252f: 8b 15 e4 66 12 00 mov 0x1266e4,%edx 112535: 89 3c 82 mov %edi,(%edx,%eax,4) 112538: 89 5f 0c mov %ebx,0xc(%edi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 11253b: 8b 45 14 mov 0x14(%ebp),%eax 11253e: 89 38 mov %edi,(%eax) _Thread_Enable_dispatch(); 112540: e8 ef d7 ff ff call 10fd34 <_Thread_Enable_dispatch> 112545: 31 c0 xor %eax,%eax return 0; } 112547: 8d 65 f4 lea -0xc(%ebp),%esp 11254a: 5b pop %ebx 11254b: 5e pop %esi 11254c: 5f pop %edi 11254d: c9 leave 11254e: c3 ret =============================================================================== 0010c4fc <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 53 push %ebx 10c500: 83 ec 04 sub $0x4,%esp 10c503: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !the_mq->linked && !the_mq->open_count ) { 10c506: 80 7b 15 00 cmpb $0x0,0x15(%ebx) 10c50a: 75 46 jne 10c552 <_POSIX_Message_queue_Delete+0x56> 10c50c: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10c510: 75 40 jne 10c552 <_POSIX_Message_queue_Delete+0x56> /* the name memory may have been freed by unlink. */ Objects_Control *the_object = &the_mq->Object; if ( the_object->name.name_p ) 10c512: 8b 43 0c mov 0xc(%ebx),%eax 10c515: 85 c0 test %eax,%eax 10c517: 74 0c je 10c525 <_POSIX_Message_queue_Delete+0x29><== ALWAYS TAKEN _Workspace_Free( (void *)the_object->name.name_p ); 10c519: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c51c: 50 push %eax <== NOT EXECUTED 10c51d: e8 76 48 00 00 call 110d98 <_Workspace_Free> <== NOT EXECUTED 10c522: 83 c4 10 add $0x10,%esp <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 10c525: 51 push %ecx 10c526: 51 push %ecx 10c527: 53 push %ebx 10c528: 68 c8 66 12 00 push $0x1266c8 10c52d: e8 26 2c 00 00 call 10f158 <_Objects_Close> _CORE_message_queue_Close( 10c532: 83 c4 0c add $0xc,%esp 10c535: 6a 05 push $0x5 10c537: 6a 00 push $0x0 10c539: 8d 43 1c lea 0x1c(%ebx),%eax 10c53c: 50 push %eax 10c53d: e8 32 22 00 00 call 10e774 <_CORE_message_queue_Close> Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 10c542: 58 pop %eax 10c543: 5a pop %edx 10c544: 53 push %ebx 10c545: 68 c8 66 12 00 push $0x1266c8 10c54a: e8 a5 2e 00 00 call 10f3f4 <_Objects_Free> 10c54f: 83 c4 10 add $0x10,%esp ); _POSIX_Message_queue_Free( the_mq ); } } 10c552: 8b 5d fc mov -0x4(%ebp),%ebx 10c555: c9 leave 10c556: c3 ret =============================================================================== 0010c820 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10c820: 55 push %ebp 10c821: 89 e5 mov %esp,%ebp 10c823: 57 push %edi 10c824: 56 push %esi 10c825: 53 push %ebx 10c826: 83 ec 20 sub $0x20,%esp 10c829: 8b 7d 08 mov 0x8(%ebp),%edi 10c82c: 8b 75 14 mov 0x14(%ebp),%esi 10c82f: 8a 5d 18 mov 0x18(%ebp),%bl */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ); 10c832: 8d 45 f0 lea -0x10(%ebp),%eax 10c835: 50 push %eax 10c836: 57 push %edi 10c837: 68 44 68 12 00 push $0x126844 10c83c: e8 e7 2c 00 00 call 10f528 <_Objects_Get> 10c841: 89 c1 mov %eax,%ecx Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10c843: 83 c4 10 add $0x10,%esp 10c846: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10c84a: 0f 85 b0 00 00 00 jne 10c900 <_POSIX_Message_queue_Receive_support+0xe0> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10c850: 8b 50 14 mov 0x14(%eax),%edx 10c853: 89 d0 mov %edx,%eax 10c855: 83 e0 03 and $0x3,%eax 10c858: 48 dec %eax 10c859: 75 0a jne 10c865 <_POSIX_Message_queue_Receive_support+0x45> _Thread_Enable_dispatch(); 10c85b: e8 d4 34 00 00 call 10fd34 <_Thread_Enable_dispatch> 10c860: e9 9b 00 00 00 jmp 10c900 <_POSIX_Message_queue_Receive_support+0xe0> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10c865: 8b 49 10 mov 0x10(%ecx),%ecx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10c868: 8b 45 10 mov 0x10(%ebp),%eax 10c86b: 3b 41 68 cmp 0x68(%ecx),%eax 10c86e: 73 15 jae 10c885 <_POSIX_Message_queue_Receive_support+0x65> _Thread_Enable_dispatch(); 10c870: e8 bf 34 00 00 call 10fd34 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10c875: e8 92 7b 00 00 call 11440c <__errno> 10c87a: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10c880: e9 86 00 00 00 jmp 10c90b <_POSIX_Message_queue_Receive_support+0xeb> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10c885: 31 c0 xor %eax,%eax 10c887: 84 db test %bl,%bl 10c889: 74 0b je 10c896 <_POSIX_Message_queue_Receive_support+0x76><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 10c88b: c1 ea 0e shr $0xe,%edx 10c88e: 83 f2 01 xor $0x1,%edx 10c891: 88 d0 mov %dl,%al 10c893: 83 e0 01 and $0x1,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10c896: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10c89d: 52 push %edx 10c89e: 52 push %edx 10c89f: ff 75 1c pushl 0x1c(%ebp) 10c8a2: 0f b6 c0 movzbl %al,%eax 10c8a5: 50 push %eax 10c8a6: 8d 45 ec lea -0x14(%ebp),%eax 10c8a9: 50 push %eax 10c8aa: ff 75 0c pushl 0xc(%ebp) 10c8ad: 57 push %edi 10c8ae: 8d 41 1c lea 0x1c(%ecx),%eax 10c8b1: 50 push %eax 10c8b2: e8 41 1f 00 00 call 10e7f8 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10c8b7: 83 c4 20 add $0x20,%esp 10c8ba: e8 75 34 00 00 call 10fd34 <_Thread_Enable_dispatch> *msg_prio = 10c8bf: 8b 0d 18 64 12 00 mov 0x126418,%ecx 10c8c5: 8b 41 24 mov 0x24(%ecx),%eax 10c8c8: c1 f8 1f sar $0x1f,%eax 10c8cb: 89 c2 mov %eax,%edx 10c8cd: 33 51 24 xor 0x24(%ecx),%edx 10c8d0: 89 16 mov %edx,(%esi) 10c8d2: 29 06 sub %eax,(%esi) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10c8d4: 83 79 34 00 cmpl $0x0,0x34(%ecx) 10c8d8: 75 05 jne 10c8df <_POSIX_Message_queue_Receive_support+0xbf> return length_out; 10c8da: 8b 45 ec mov -0x14(%ebp),%eax 10c8dd: eb 2f jmp 10c90e <_POSIX_Message_queue_Receive_support+0xee> rtems_set_errno_and_return_minus_one( 10c8df: e8 28 7b 00 00 call 11440c <__errno> 10c8e4: 89 c3 mov %eax,%ebx 10c8e6: 83 ec 0c sub $0xc,%esp 10c8e9: a1 18 64 12 00 mov 0x126418,%eax 10c8ee: ff 70 34 pushl 0x34(%eax) 10c8f1: e8 fa 01 00 00 call 10caf0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10c8f6: 89 03 mov %eax,(%ebx) 10c8f8: 83 c8 ff or $0xffffffff,%eax 10c8fb: 83 c4 10 add $0x10,%esp 10c8fe: eb 0e jmp 10c90e <_POSIX_Message_queue_Receive_support+0xee> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10c900: e8 07 7b 00 00 call 11440c <__errno> 10c905: c7 00 09 00 00 00 movl $0x9,(%eax) 10c90b: 83 c8 ff or $0xffffffff,%eax } 10c90e: 8d 65 f4 lea -0xc(%ebp),%esp 10c911: 5b pop %ebx 10c912: 5e pop %esi 10c913: 5f pop %edi 10c914: c9 leave 10c915: c3 ret =============================================================================== 0010c938 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10c938: 55 push %ebp 10c939: 89 e5 mov %esp,%ebp 10c93b: 56 push %esi 10c93c: 53 push %ebx 10c93d: 83 ec 20 sub $0x20,%esp 10c940: 8b 75 08 mov 0x8(%ebp),%esi 10c943: 8b 5d 14 mov 0x14(%ebp),%ebx 10c946: 8a 45 18 mov 0x18(%ebp),%al 10c949: 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 ) 10c94c: 83 fb 20 cmp $0x20,%ebx 10c94f: 76 10 jbe 10c961 <_POSIX_Message_queue_Send_support+0x29> rtems_set_errno_and_return_minus_one( EINVAL ); 10c951: e8 b6 7a 00 00 call 11440c <__errno> 10c956: c7 00 16 00 00 00 movl $0x16,(%eax) 10c95c: e9 9c 00 00 00 jmp 10c9fd <_POSIX_Message_queue_Send_support+0xc5> 10c961: 50 push %eax 10c962: 8d 45 f4 lea -0xc(%ebp),%eax 10c965: 50 push %eax 10c966: 56 push %esi 10c967: 68 44 68 12 00 push $0x126844 10c96c: e8 b7 2b 00 00 call 10f528 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10c971: 83 c4 10 add $0x10,%esp 10c974: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c978: 75 78 jne 10c9f2 <_POSIX_Message_queue_Send_support+0xba> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10c97a: 8b 50 14 mov 0x14(%eax),%edx 10c97d: f6 c2 03 test $0x3,%dl 10c980: 75 07 jne 10c989 <_POSIX_Message_queue_Send_support+0x51> _Thread_Enable_dispatch(); 10c982: e8 ad 33 00 00 call 10fd34 <_Thread_Enable_dispatch> 10c987: eb 69 jmp 10c9f2 <_POSIX_Message_queue_Send_support+0xba> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10c989: 8b 48 10 mov 0x10(%eax),%ecx /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10c98c: 31 c0 xor %eax,%eax 10c98e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10c992: 74 0b je 10c99f <_POSIX_Message_queue_Send_support+0x67><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 10c994: c1 ea 0e shr $0xe,%edx 10c997: 83 f2 01 xor $0x1,%edx 10c99a: 88 d0 mov %dl,%al 10c99c: 83 e0 01 and $0x1,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10c99f: ff 75 1c pushl 0x1c(%ebp) 10c9a2: 0f b6 c0 movzbl %al,%eax 10c9a5: 50 push %eax 10c9a6: f7 db neg %ebx 10c9a8: 53 push %ebx 10c9a9: 6a 00 push $0x0 10c9ab: 56 push %esi 10c9ac: ff 75 10 pushl 0x10(%ebp) 10c9af: ff 75 0c pushl 0xc(%ebp) 10c9b2: 8d 41 1c lea 0x1c(%ecx),%eax 10c9b5: 50 push %eax 10c9b6: e8 85 1f 00 00 call 10e940 <_CORE_message_queue_Submit> 10c9bb: 89 c6 mov %eax,%esi _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10c9bd: 83 c4 20 add $0x20,%esp 10c9c0: e8 6f 33 00 00 call 10fd34 <_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 ) 10c9c5: 83 fe 07 cmp $0x7,%esi 10c9c8: 75 08 jne 10c9d2 <_POSIX_Message_queue_Send_support+0x9a> msg_status = _Thread_Executing->Wait.return_code; 10c9ca: a1 18 64 12 00 mov 0x126418,%eax 10c9cf: 8b 70 34 mov 0x34(%eax),%esi if ( !msg_status ) 10c9d2: 31 c0 xor %eax,%eax 10c9d4: 85 f6 test %esi,%esi 10c9d6: 74 28 je 10ca00 <_POSIX_Message_queue_Send_support+0xc8> return msg_status; rtems_set_errno_and_return_minus_one( 10c9d8: e8 2f 7a 00 00 call 11440c <__errno> 10c9dd: 89 c3 mov %eax,%ebx 10c9df: 83 ec 0c sub $0xc,%esp 10c9e2: 56 push %esi 10c9e3: e8 08 01 00 00 call 10caf0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10c9e8: 89 03 mov %eax,(%ebx) 10c9ea: 83 c8 ff or $0xffffffff,%eax 10c9ed: 83 c4 10 add $0x10,%esp 10c9f0: eb 0e jmp 10ca00 <_POSIX_Message_queue_Send_support+0xc8> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10c9f2: e8 15 7a 00 00 call 11440c <__errno> 10c9f7: c7 00 09 00 00 00 movl $0x9,(%eax) 10c9fd: 83 c8 ff or $0xffffffff,%eax } 10ca00: 8d 65 f8 lea -0x8(%ebp),%esp 10ca03: 5b pop %ebx 10ca04: 5e pop %esi 10ca05: c9 leave 10ca06: c3 ret =============================================================================== 0010a80d <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10a80d: 55 push %ebp 10a80e: 89 e5 mov %esp,%ebp 10a810: 56 push %esi 10a811: 53 push %ebx 10a812: 8b 5d 08 mov 0x8(%ebp),%ebx 10a815: 8b 75 0c mov 0xc(%ebp),%esi Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 10a818: 85 db test %ebx,%ebx 10a81a: 74 16 je 10a832 <_POSIX_Mutex_Get+0x25> 10a81c: 83 3b ff cmpl $0xffffffff,(%ebx) 10a81f: 75 1b jne 10a83c <_POSIX_Mutex_Get+0x2f> <== ALWAYS TAKEN 10a821: 51 push %ecx <== NOT EXECUTED 10a822: 51 push %ecx <== NOT EXECUTED 10a823: 6a 00 push $0x0 <== NOT EXECUTED 10a825: 53 push %ebx <== NOT EXECUTED 10a826: e8 6d 00 00 00 call 10a898 <== NOT EXECUTED 10a82b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a82e: 85 c0 test %eax,%eax <== NOT EXECUTED 10a830: 74 0a je 10a83c <_POSIX_Mutex_Get+0x2f> <== NOT EXECUTED 10a832: c7 06 01 00 00 00 movl $0x1,(%esi) 10a838: 31 c0 xor %eax,%eax 10a83a: eb 11 jmp 10a84d <_POSIX_Mutex_Get+0x40> return (POSIX_Mutex_Control *) 10a83c: 52 push %edx 10a83d: 56 push %esi 10a83e: ff 33 pushl (%ebx) 10a840: 68 18 2f 12 00 push $0x122f18 10a845: e8 1a 29 00 00 call 10d164 <_Objects_Get> 10a84a: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 10a84d: 8d 65 f8 lea -0x8(%ebp),%esp 10a850: 5b pop %ebx 10a851: 5e pop %esi 10a852: c9 leave 10a853: c3 ret =============================================================================== 0010a7c4 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10a7c4: 55 push %ebp 10a7c5: 89 e5 mov %esp,%ebp 10a7c7: 56 push %esi 10a7c8: 53 push %ebx 10a7c9: 8b 5d 08 mov 0x8(%ebp),%ebx 10a7cc: 8b 75 0c mov 0xc(%ebp),%esi Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 10a7cf: 85 db test %ebx,%ebx 10a7d1: 74 16 je 10a7e9 <_POSIX_Mutex_Get_interrupt_disable+0x25><== NEVER TAKEN 10a7d3: 83 3b ff cmpl $0xffffffff,(%ebx) 10a7d6: 75 1b jne 10a7f3 <_POSIX_Mutex_Get_interrupt_disable+0x2f><== ALWAYS TAKEN 10a7d8: 50 push %eax <== NOT EXECUTED 10a7d9: 50 push %eax <== NOT EXECUTED 10a7da: 6a 00 push $0x0 <== NOT EXECUTED 10a7dc: 53 push %ebx <== NOT EXECUTED 10a7dd: e8 b6 00 00 00 call 10a898 <== NOT EXECUTED 10a7e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a7e5: 85 c0 test %eax,%eax <== NOT EXECUTED 10a7e7: 74 0a je 10a7f3 <_POSIX_Mutex_Get_interrupt_disable+0x2f><== NOT EXECUTED 10a7e9: c7 06 01 00 00 00 movl $0x1,(%esi) <== NOT EXECUTED 10a7ef: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a7f1: eb 13 jmp 10a806 <_POSIX_Mutex_Get_interrupt_disable+0x42><== NOT EXECUTED return (POSIX_Mutex_Control *) 10a7f3: ff 75 10 pushl 0x10(%ebp) 10a7f6: 56 push %esi 10a7f7: ff 33 pushl (%ebx) 10a7f9: 68 18 2f 12 00 push $0x122f18 10a7fe: e8 15 29 00 00 call 10d118 <_Objects_Get_isr_disable> 10a803: 83 c4 10 add $0x10,%esp _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 10a806: 8d 65 f8 lea -0x8(%ebp),%esp 10a809: 5b pop %ebx 10a80a: 5e pop %esi 10a80b: c9 leave 10a80c: c3 ret =============================================================================== 00110ae0 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 110ae0: 55 push %ebp 110ae1: 89 e5 mov %esp,%ebp 110ae3: 57 push %edi 110ae4: 56 push %esi 110ae5: 53 push %ebx 110ae6: 83 ec 0c sub $0xc,%esp 110ae9: 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 110aec: a1 10 35 12 00 mov 0x123510,%eax 110af1: 40 inc %eax 110af2: a3 10 35 12 00 mov %eax,0x123510 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 110af7: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 110afb: 74 12 je 110b0f <_POSIX_Semaphore_Create_support+0x2f> _Thread_Enable_dispatch(); 110afd: e8 e6 d1 ff ff call 10dce8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); 110b02: e8 5d 1b 00 00 call 112664 <__errno> 110b07: c7 00 58 00 00 00 movl $0x58,(%eax) 110b0d: eb 28 jmp 110b37 <_POSIX_Semaphore_Create_support+0x57> } if ( name ) { 110b0f: 85 f6 test %esi,%esi 110b11: 74 2c je 110b3f <_POSIX_Semaphore_Create_support+0x5f> if( strlen(name) > PATH_MAX ) { 110b13: 31 c0 xor %eax,%eax 110b15: 83 c9 ff or $0xffffffff,%ecx 110b18: 89 f7 mov %esi,%edi 110b1a: f2 ae repnz scas %es:(%edi),%al 110b1c: f7 d1 not %ecx 110b1e: 49 dec %ecx 110b1f: 81 f9 ff 00 00 00 cmp $0xff,%ecx 110b25: 76 18 jbe 110b3f <_POSIX_Semaphore_Create_support+0x5f><== ALWAYS TAKEN _Thread_Enable_dispatch(); 110b27: e8 bc d1 ff ff call 10dce8 <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 110b2c: e8 33 1b 00 00 call 112664 <__errno> <== NOT EXECUTED 110b31: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED 110b37: 83 c8 ff or $0xffffffff,%eax 110b3a: e9 90 00 00 00 jmp 110bcf <_POSIX_Semaphore_Create_support+0xef> * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 110b3f: 83 ec 0c sub $0xc,%esp 110b42: 68 00 38 12 00 push $0x123800 110b47: e8 98 c5 ff ff call 10d0e4 <_Objects_Allocate> 110b4c: 89 c3 mov %eax,%ebx } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 110b4e: 83 c4 10 add $0x10,%esp 110b51: 85 c0 test %eax,%eax 110b53: 75 12 jne 110b67 <_POSIX_Semaphore_Create_support+0x87> _Thread_Enable_dispatch(); 110b55: e8 8e d1 ff ff call 10dce8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 110b5a: e8 05 1b 00 00 call 112664 <__errno> 110b5f: c7 00 1c 00 00 00 movl $0x1c,(%eax) 110b65: eb d0 jmp 110b37 <_POSIX_Semaphore_Create_support+0x57> } the_semaphore->process_shared = pshared; 110b67: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 110b6e: 85 f6 test %esi,%esi 110b70: 74 11 je 110b83 <_POSIX_Semaphore_Create_support+0xa3> the_semaphore->named = TRUE; 110b72: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 110b76: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = TRUE; 110b7d: c6 40 15 01 movb $0x1,0x15(%eax) 110b81: eb 0f jmp 110b92 <_POSIX_Semaphore_Create_support+0xb2> } else { the_semaphore->named = FALSE; 110b83: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 110b87: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = FALSE; 110b8e: c6 40 15 00 movb $0x0,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; 110b92: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 110b99: c7 43 5c ff ff ff ff movl $0xffffffff,0x5c(%ebx) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 110ba0: 50 push %eax 110ba1: ff 75 10 pushl 0x10(%ebp) 110ba4: 8d 43 5c lea 0x5c(%ebx),%eax 110ba7: 50 push %eax 110ba8: 8d 43 1c lea 0x1c(%ebx),%eax 110bab: 50 push %eax 110bac: e8 6f c1 ff ff call 10cd20 <_CORE_semaphore_Initialize> 110bb1: 0f b7 53 08 movzwl 0x8(%ebx),%edx 110bb5: a1 1c 38 12 00 mov 0x12381c,%eax 110bba: 89 1c 90 mov %ebx,(%eax,%edx,4) 110bbd: 89 73 0c mov %esi,0xc(%ebx) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 110bc0: 8b 45 14 mov 0x14(%ebp),%eax 110bc3: 89 18 mov %ebx,(%eax) _Thread_Enable_dispatch(); 110bc5: e8 1e d1 ff ff call 10dce8 <_Thread_Enable_dispatch> 110bca: 31 c0 xor %eax,%eax 110bcc: 83 c4 10 add $0x10,%esp return 0; } 110bcf: 8d 65 f4 lea -0xc(%ebp),%esp 110bd2: 5b pop %ebx 110bd3: 5e pop %esi 110bd4: 5f pop %edi 110bd5: c9 leave 110bd6: c3 ret =============================================================================== 0010d6cd <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10d6cd: 55 push %ebp 10d6ce: 89 e5 mov %esp,%ebp 10d6d0: 57 push %edi 10d6d1: 56 push %esi 10d6d2: 53 push %ebx 10d6d3: 83 ec 18 sub $0x18,%esp POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 10d6d6: 68 e4 00 00 00 push $0xe4 10d6db: e8 49 e7 ff ff call 10be29 <_Workspace_Allocate> 10d6e0: 89 c3 mov %eax,%ebx if ( !api ) 10d6e2: 83 c4 10 add $0x10,%esp 10d6e5: 31 c0 xor %eax,%eax 10d6e7: 85 db test %ebx,%ebx 10d6e9: 0f 84 05 01 00 00 je 10d7f4 <_POSIX_Threads_Create_extension+0x127><== NEVER TAKEN return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 10d6ef: 8b 45 0c mov 0xc(%ebp),%eax 10d6f2: 89 98 f8 00 00 00 mov %ebx,0xf8(%eax) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 10d6f8: be 38 79 11 00 mov $0x117938,%esi 10d6fd: b9 0e 00 00 00 mov $0xe,%ecx 10d702: 89 df mov %ebx,%edi 10d704: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 10d706: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 10d70d: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 10d714: be 50 79 11 00 mov $0x117950,%esi 10d719: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 10d71f: b1 06 mov $0x6,%cl 10d721: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 10d723: b8 ff 00 00 00 mov $0xff,%eax 10d728: 8b 55 0c mov 0xc(%ebp),%edx 10d72b: 2b 42 14 sub 0x14(%edx),%eax 10d72e: 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; 10d734: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 10d73b: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 10d73e: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d745: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 10d748: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d74f: 00 00 00 10d752: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10d758: 89 83 d8 00 00 00 mov %eax,0xd8(%ebx) 10d75e: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 10d765: 00 00 00 10d768: 8d 83 d8 00 00 00 lea 0xd8(%ebx),%eax 10d76e: 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; 10d774: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) 10d77b: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API && 10d77e: 8b 52 08 mov 0x8(%edx),%edx 10d781: 89 d0 mov %edx,%eax 10d783: c1 e8 18 shr $0x18,%eax 10d786: 83 e0 07 and $0x7,%eax 10d789: 83 f8 03 cmp $0x3,%eax 10d78c: 75 1f jne 10d7ad <_POSIX_Threads_Create_extension+0xe0> 10d78e: c1 ea 1b shr $0x1b,%edx 10d791: 4a dec %edx 10d792: 75 19 jne 10d7ad <_POSIX_Threads_Create_extension+0xe0><== 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; 10d794: a1 58 d8 11 00 mov 0x11d858,%eax 10d799: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10d79f: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 10d7a5: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) 10d7ab: eb 0a jmp 10d7b7 <_POSIX_Threads_Create_extension+0xea> } else { api->signals_blocked = 0xffffffff; 10d7ad: c7 83 c4 00 00 00 ff movl $0xffffffff,0xc4(%ebx) 10d7b4: ff ff ff } _Thread_queue_Initialize( 10d7b7: 6a 00 push $0x0 10d7b9: 68 00 10 00 00 push $0x1000 10d7be: 6a 00 push $0x0 10d7c0: 8d 43 3c lea 0x3c(%ebx),%eax 10d7c3: 50 push %eax 10d7c4: e8 47 dd ff ff call 10b510 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 10d7c9: 8b 55 0c mov 0xc(%ebp),%edx 10d7cc: 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. * 10d7cf: c7 83 a4 00 00 00 00 movl $0x0,0xa4(%ebx) 10d7d6: 00 00 00 * @param[in] the_heap is the heap to operate upon 10d7d9: c7 83 b8 00 00 00 3a movl $0x10d83a,0xb8(%ebx) 10d7e0: d8 10 00 * @param[in] starting_address is the starting address of the memory for 10d7e3: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) * the heap 10d7e9: 89 93 c0 00 00 00 mov %edx,0xc0(%ebx) 10d7ef: b0 01 mov $0x1,%al 10d7f1: 83 c4 10 add $0x10,%esp created->Object.id, created ); return true; } 10d7f4: 8d 65 f4 lea -0xc(%ebp),%esp 10d7f7: 5b pop %ebx 10d7f8: 5e pop %esi 10d7f9: 5f pop %edi 10d7fa: c9 leave 10d7fb: c3 ret =============================================================================== 00109d4c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body( void ) { 109d4c: 55 push %ebp 109d4d: 89 e5 mov %esp,%ebp 109d4f: 57 push %edi 109d50: 56 push %esi 109d51: 53 push %ebx 109d52: 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; 109d55: 8b 35 20 15 12 00 mov 0x121520,%esi maximum = _POSIX_Threads_Number_of_initialization_threads; 109d5b: a1 d8 15 12 00 mov 0x1215d8,%eax 109d60: 89 45 b0 mov %eax,-0x50(%ebp) if ( !user_threads || maximum == 0 ) 109d63: 85 f6 test %esi,%esi 109d65: 74 51 je 109db8 <_POSIX_Threads_Initialize_user_threads_body+0x6c><== NEVER TAKEN 109d67: 85 c0 test %eax,%eax 109d69: 74 4d je 109db8 <_POSIX_Threads_Initialize_user_threads_body+0x6c><== NEVER TAKEN return; 109d6b: 31 db xor %ebx,%ebx for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 109d6d: 8d 7d b8 lea -0x48(%ebp),%edi 109d70: eb 41 jmp 109db3 <_POSIX_Threads_Initialize_user_threads_body+0x67> 109d72: 83 ec 0c sub $0xc,%esp 109d75: 57 push %edi 109d76: e8 cd 54 00 00 call 10f248 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 109d7b: 58 pop %eax 109d7c: 5a pop %edx 109d7d: 6a 02 push $0x2 109d7f: 57 push %edi 109d80: e8 eb 54 00 00 call 10f270 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 109d85: 59 pop %ecx 109d86: 58 pop %eax 109d87: ff 74 de 04 pushl 0x4(%esi,%ebx,8) 109d8b: 57 push %edi 109d8c: e8 13 55 00 00 call 10f2a4 status = pthread_create( 109d91: 6a 00 push $0x0 109d93: ff 34 de pushl (%esi,%ebx,8) 109d96: 57 push %edi 109d97: 8d 45 f0 lea -0x10(%ebp),%eax 109d9a: 50 push %eax 109d9b: e8 84 fc ff ff call 109a24 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 109da0: 83 c4 20 add $0x20,%esp 109da3: 85 c0 test %eax,%eax 109da5: 74 0b je 109db2 <_POSIX_Threads_Initialize_user_threads_body+0x66> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status ); 109da7: 52 push %edx 109da8: 50 push %eax 109da9: 6a 01 push $0x1 109dab: 6a 02 push $0x2 109dad: e8 36 1e 00 00 call 10bbe8 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 109db2: 43 inc %ebx 109db3: 3b 5d b0 cmp -0x50(%ebp),%ebx 109db6: 72 ba jb 109d72 <_POSIX_Threads_Initialize_user_threads_body+0x26> NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status ); } } 109db8: 8d 65 f4 lea -0xc(%ebp),%esp 109dbb: 5b pop %ebx 109dbc: 5e pop %esi 109dbd: 5f pop %edi 109dbe: c9 leave 109dbf: c3 ret =============================================================================== 0010d83a <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 10d83a: 55 push %ebp 10d83b: 89 e5 mov %esp,%ebp 10d83d: 56 push %esi 10d83e: 53 push %ebx 10d83f: 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 ]; 10d842: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 10d848: 83 ec 0c sub $0xc,%esp 10d84b: 8d 86 90 00 00 00 lea 0x90(%esi),%eax 10d851: 50 push %eax 10d852: e8 99 0c 00 00 call 10e4f0 <_Timespec_To_ticks> if ( !ticks ) 10d857: 83 c4 10 add $0x10,%esp 10d85a: 85 c0 test %eax,%eax 10d85c: 75 02 jne 10d860 <_POSIX_Threads_Sporadic_budget_TSR+0x26><== ALWAYS TAKEN 10d85e: b0 01 mov $0x1,%al <== NOT EXECUTED ticks = 1; the_thread->cpu_time_budget = ticks; 10d860: 89 43 78 mov %eax,0x78(%ebx) 10d863: b8 ff 00 00 00 mov $0xff,%eax 10d868: 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; 10d86e: 89 43 18 mov %eax,0x18(%ebx) if ( the_thread->resource_count == 0 || 10d871: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10d875: 74 05 je 10d87c <_POSIX_Threads_Sporadic_budget_TSR+0x42> 10d877: 39 43 14 cmp %eax,0x14(%ebx) 10d87a: 76 0d jbe 10d889 <_POSIX_Threads_Sporadic_budget_TSR+0x4f><== NEVER TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 10d87c: 52 push %edx 10d87d: 6a 01 push $0x1 10d87f: 50 push %eax 10d880: 53 push %ebx 10d881: e8 66 d1 ff ff call 10a9ec <_Thread_Change_priority> 10d886: 83 c4 10 add $0x10,%esp ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 10d889: 83 ec 0c sub $0xc,%esp 10d88c: 8d 86 88 00 00 00 lea 0x88(%esi),%eax 10d892: 50 push %eax 10d893: e8 58 0c 00 00 call 10e4f0 <_Timespec_To_ticks> if ( !ticks ) 10d898: 83 c4 10 add $0x10,%esp 10d89b: 85 c0 test %eax,%eax 10d89d: 75 02 jne 10d8a1 <_POSIX_Threads_Sporadic_budget_TSR+0x67><== ALWAYS TAKEN 10d89f: 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, 10d8a1: 89 86 a8 00 00 00 mov %eax,0xa8(%esi) void *starting_address, size_t *size 10d8a7: 8d 86 9c 00 00 00 lea 0x9c(%esi),%eax 10d8ad: 89 45 0c mov %eax,0xc(%ebp) 10d8b0: c7 45 08 78 d8 11 00 movl $0x11d878,0x8(%ebp) ticks = 1; _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 10d8b7: 8d 65 f8 lea -0x8(%ebp),%esp 10d8ba: 5b pop %ebx 10d8bb: 5e pop %esi 10d8bc: c9 leave 10d8bd: e9 66 e3 ff ff jmp 10bc28 <_Watchdog_Insert> =============================================================================== 0010d7fc <_POSIX_Threads_Sporadic_budget_callout>: */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10d7fc: 55 push %ebp 10d7fd: 89 e5 mov %esp,%ebp 10d7ff: 83 ec 08 sub $0x8,%esp 10d802: 8b 4d 08 mov 0x8(%ebp),%ecx POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d805: 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 */ 10d80b: 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 10d812: ba ff 00 00 00 mov $0xff,%edx 10d817: 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; 10d81d: 89 51 18 mov %edx,0x18(%ecx) if ( the_thread->resource_count == 0 || 10d820: 83 79 1c 00 cmpl $0x0,0x1c(%ecx) 10d824: 74 05 je 10d82b <_POSIX_Threads_Sporadic_budget_callout+0x2f><== ALWAYS TAKEN 10d826: 39 51 14 cmp %edx,0x14(%ecx) <== NOT EXECUTED 10d829: 76 0d jbe 10d838 <_POSIX_Threads_Sporadic_budget_callout+0x3c><== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 10d82b: 50 push %eax 10d82c: 6a 01 push $0x1 10d82e: 52 push %edx 10d82f: 51 push %ecx 10d830: e8 b7 d1 ff ff call 10a9ec <_Thread_Change_priority> 10d835: 83 c4 10 add $0x10,%esp } 10d838: c9 leave 10d839: c3 ret =============================================================================== 0010e9dc <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 10e9dc: 55 push %ebp 10e9dd: 89 e5 mov %esp,%ebp 10e9df: 57 push %edi 10e9e0: 56 push %esi 10e9e1: 53 push %ebx 10e9e2: 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 ]; 10e9e5: 8b 45 08 mov 0x8(%ebp),%eax 10e9e8: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 10e9ee: c7 86 cc 00 00 00 01 movl $0x1,0xcc(%esi) 10e9f5: 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 10e9f8: 8d be dc 00 00 00 lea 0xdc(%esi),%edi 10e9fe: eb 26 jmp 10ea26 <_POSIX_Threads_cancel_run+0x4a> while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 10ea00: 9c pushf <== NOT EXECUTED 10ea01: fa cli <== NOT EXECUTED 10ea02: 59 pop %ecx <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 10ea03: 8b 5f 04 mov 0x4(%edi),%ebx <== NOT EXECUTED 10ea06: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10ea08: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 10ea0b: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED 10ea0e: 89 10 mov %edx,(%eax) <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10ea10: 51 push %ecx <== NOT EXECUTED 10ea11: 9d popf <== NOT EXECUTED (*handler->routine)( handler->arg ); 10ea12: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ea15: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10ea18: ff 53 08 call *0x8(%ebx) <== NOT EXECUTED _Workspace_Free( handler ); 10ea1b: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10ea1e: e8 f1 d3 ff ff call 10be14 <_Workspace_Free> <== NOT EXECUTED 10ea23: 83 c4 10 add $0x10,%esp <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 10ea26: 39 be d8 00 00 00 cmp %edi,0xd8(%esi) 10ea2c: 75 d2 jne 10ea00 <_POSIX_Threads_cancel_run+0x24><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 10ea2e: 8d 65 f4 lea -0xc(%ebp),%esp 10ea31: 5b pop %ebx 10ea32: 5e pop %esi 10ea33: 5f pop %edi 10ea34: c9 leave 10ea35: c3 ret =============================================================================== 0010f508 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 10f508: 55 push %ebp 10f509: 89 e5 mov %esp,%ebp 10f50b: 56 push %esi 10f50c: 53 push %ebx 10f50d: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 10f510: 83 ec 0c sub $0xc,%esp 10f513: 53 push %ebx 10f514: e8 4b e2 ff ff call 10d764 <_Watchdog_Remove> _ISR_Disable( level ); 10f519: 9c pushf 10f51a: fa cli 10f51b: 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 ) { 10f51c: 83 c4 10 add $0x10,%esp 10f51f: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10f523: 74 06 je 10f52b <_POSIX_Timer_Insert_helper+0x23><== ALWAYS TAKEN _ISR_Enable( level ); 10f525: 56 push %esi <== NOT EXECUTED 10f526: 9d popf <== NOT EXECUTED 10f527: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f529: eb 33 jmp 10f55e <_POSIX_Timer_Insert_helper+0x56><== 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. * 10f52b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) * @param[in] the_heap is the heap to operate upon 10f532: 8b 45 14 mov 0x14(%ebp),%eax 10f535: 89 43 1c mov %eax,0x1c(%ebx) * @param[in] starting_address is the starting address of the memory for 10f538: 8b 45 10 mov 0x10(%ebp),%eax 10f53b: 89 43 20 mov %eax,0x20(%ebx) * the heap 10f53e: 8b 45 18 mov 0x18(%ebp),%eax 10f541: 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, 10f544: 8b 45 0c mov 0xc(%ebp),%eax 10f547: 89 43 0c mov %eax,0xc(%ebx) void *starting_address, size_t *size 10f54a: 50 push %eax 10f54b: 50 push %eax 10f54c: 53 push %ebx 10f54d: 68 30 1b 12 00 push $0x121b30 10f552: e8 f5 e0 ff ff call 10d64c <_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 ); 10f557: 56 push %esi 10f558: 9d popf 10f559: b0 01 mov $0x1,%al 10f55b: 83 c4 10 add $0x10,%esp return true; } 10f55e: 8d 65 f8 lea -0x8(%ebp),%esp 10f561: 5b pop %ebx 10f562: 5e pop %esi 10f563: c9 leave 10f564: c3 ret =============================================================================== 0010a310 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 10a310: 55 push %ebp 10a311: 89 e5 mov %esp,%ebp 10a313: 53 push %ebx 10a314: 83 ec 04 sub $0x4,%esp 10a317: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10a31a: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a31d: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 10a321: 75 06 jne 10a329 <_POSIX_Timer_TSR+0x19> <== ALWAYS TAKEN 10a323: 83 7b 58 00 cmpl $0x0,0x58(%ebx) <== NOT EXECUTED 10a327: 74 34 je 10a35d <_POSIX_Timer_TSR+0x4d> <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 10a329: 83 ec 0c sub $0xc,%esp 10a32c: 53 push %ebx 10a32d: 68 10 a3 10 00 push $0x10a310 10a332: ff 73 08 pushl 0x8(%ebx) 10a335: ff 73 64 pushl 0x64(%ebx) 10a338: 8d 43 10 lea 0x10(%ebx),%eax 10a33b: 50 push %eax 10a33c: e8 c7 51 00 00 call 10f508 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10a341: 83 c4 20 add $0x20,%esp 10a344: 84 c0 test %al,%al 10a346: 74 30 je 10a378 <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10a348: 83 ec 0c sub $0xc,%esp 10a34b: 8d 43 6c lea 0x6c(%ebx),%eax 10a34e: 50 push %eax 10a34f: e8 28 15 00 00 call 10b87c <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a354: c6 43 3c 03 movb $0x3,0x3c(%ebx) 10a358: 83 c4 10 add $0x10,%esp 10a35b: eb 04 jmp 10a361 <_POSIX_Timer_TSR+0x51> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a35d: 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 ) ) { 10a361: 50 push %eax 10a362: 50 push %eax 10a363: ff 73 44 pushl 0x44(%ebx) 10a366: ff 73 38 pushl 0x38(%ebx) 10a369: e8 0a 4f 00 00 call 10f278 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10a36e: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10a375: 83 c4 10 add $0x10,%esp } 10a378: 8b 5d fc mov -0x4(%ebp),%ebx 10a37b: c9 leave 10a37c: c3 ret =============================================================================== 0010eae0 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 10eae0: 55 push %ebp 10eae1: 89 e5 mov %esp,%ebp 10eae3: 57 push %edi 10eae4: 56 push %esi 10eae5: 53 push %ebx 10eae6: 83 ec 28 sub $0x28,%esp 10eae9: 8b 7d 08 mov 0x8(%ebp),%edi 10eaec: 8b 75 0c mov 0xc(%ebp),%esi siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 10eaef: 6a 01 push $0x1 10eaf1: 0f b6 45 10 movzbl 0x10(%ebp),%eax 10eaf5: 50 push %eax 10eaf6: 8d 45 e8 lea -0x18(%ebp),%eax 10eaf9: 50 push %eax 10eafa: 56 push %esi 10eafb: 57 push %edi 10eafc: e8 5f 00 00 00 call 10eb60 <_POSIX_signals_Clear_signals> 10eb01: 83 c4 20 add $0x20,%esp 10eb04: 84 c0 test %al,%al 10eb06: 74 4e je 10eb56 <_POSIX_signals_Check_signal+0x76> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 10eb08: 6b d6 0c imul $0xc,%esi,%edx 10eb0b: 8b 8a 44 dd 11 00 mov 0x11dd44(%edx),%ecx 10eb11: 83 f9 01 cmp $0x1,%ecx 10eb14: 74 40 je 10eb56 <_POSIX_signals_Check_signal+0x76><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 10eb16: 8b 9f c4 00 00 00 mov 0xc4(%edi),%ebx api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 10eb1c: 89 d8 mov %ebx,%eax 10eb1e: 0b 82 40 dd 11 00 or 0x11dd40(%edx),%eax 10eb24: 89 87 c4 00 00 00 mov %eax,0xc4(%edi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 10eb2a: 83 ba 3c dd 11 00 02 cmpl $0x2,0x11dd3c(%edx) 10eb31: 75 10 jne 10eb43 <_POSIX_signals_Check_signal+0x63> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 10eb33: 50 push %eax 10eb34: 6a 00 push $0x0 10eb36: 8d 45 e8 lea -0x18(%ebp),%eax 10eb39: 50 push %eax 10eb3a: 56 push %esi 10eb3b: ff 92 44 dd 11 00 call *0x11dd44(%edx) 10eb41: eb 06 jmp 10eb49 <_POSIX_signals_Check_signal+0x69> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 10eb43: 83 ec 0c sub $0xc,%esp 10eb46: 56 push %esi 10eb47: ff d1 call *%ecx 10eb49: 83 c4 10 add $0x10,%esp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 10eb4c: 89 9f c4 00 00 00 mov %ebx,0xc4(%edi) 10eb52: b0 01 mov $0x1,%al 10eb54: eb 02 jmp 10eb58 <_POSIX_signals_Check_signal+0x78> return true; 10eb56: 31 c0 xor %eax,%eax } 10eb58: 8d 65 f4 lea -0xc(%ebp),%esp 10eb5b: 5b pop %ebx 10eb5c: 5e pop %esi 10eb5d: 5f pop %edi 10eb5e: c9 leave 10eb5f: c3 ret =============================================================================== 0010f0ec <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( sigset_t mask ) { 10f0ec: 55 push %ebp 10f0ed: 89 e5 mov %esp,%ebp 10f0ef: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10f0f2: 9c pushf 10f0f3: fa cli 10f0f4: 5a pop %edx _POSIX_signals_Pending &= ~mask; 10f0f5: f7 d0 not %eax 10f0f7: 23 05 08 df 11 00 and 0x11df08,%eax 10f0fd: a3 08 df 11 00 mov %eax,0x11df08 if ( !_POSIX_signals_Pending ) 10f102: 85 c0 test %eax,%eax 10f104: 75 06 jne 10f10c <_POSIX_signals_Clear_process_signals+0x20><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 10f106: ff 0d 3c d8 11 00 decl 0x11d83c _ISR_Enable( level ); 10f10c: 52 push %edx 10f10d: 9d popf } 10f10e: c9 leave 10f10f: c3 ret =============================================================================== 0010eb60 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 10eb60: 55 push %ebp 10eb61: 89 e5 mov %esp,%ebp 10eb63: 57 push %edi 10eb64: 56 push %esi 10eb65: 53 push %ebx 10eb66: 83 ec 0c sub $0xc,%esp 10eb69: 8b 5d 08 mov 0x8(%ebp),%ebx 10eb6c: 8b 7d 0c mov 0xc(%ebp),%edi 10eb6f: 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 ); 10eb72: 8d 4f ff lea -0x1(%edi),%ecx 10eb75: be 01 00 00 00 mov $0x1,%esi 10eb7a: d3 e6 shl %cl,%esi /* 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 ) 10eb7c: 83 ca ff or $0xffffffff,%edx 10eb7f: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 10eb83: 74 08 je 10eb8d <_POSIX_signals_Clear_signals+0x2d> signals_blocked = ~api->signals_blocked; 10eb85: 8b 93 c4 00 00 00 mov 0xc4(%ebx),%edx 10eb8b: f7 d2 not %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 ); 10eb8d: 9c pushf 10eb8e: fa cli 10eb8f: 8f 45 f0 popl -0x10(%ebp) if ( is_global ) { 10eb92: 84 c0 test %al,%al 10eb94: 0f 84 8d 00 00 00 je 10ec27 <_POSIX_signals_Clear_signals+0xc7> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 10eb9a: 89 f0 mov %esi,%eax 10eb9c: 23 05 08 df 11 00 and 0x11df08,%eax 10eba2: 85 d0 test %edx,%eax 10eba4: 0f 84 9b 00 00 00 je 10ec45 <_POSIX_signals_Clear_signals+0xe5> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 10ebaa: 6b d7 0c imul $0xc,%edi,%edx 10ebad: 83 ba 3c dd 11 00 02 cmpl $0x2,0x11dd3c(%edx) 10ebb4: 75 61 jne 10ec17 <_POSIX_signals_Clear_signals+0xb7> psiginfo = (POSIX_signals_Siginfo_node *) 10ebb6: 8d 8a 0c df 11 00 lea 0x11df0c(%edx),%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( 10ebbc: 8b 9a 0c df 11 00 mov 0x11df0c(%edx),%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 10ebc2: 8d 79 04 lea 0x4(%ecx),%edi 10ebc5: 39 fb cmp %edi,%ebx 10ebc7: 75 04 jne 10ebcd <_POSIX_signals_Clear_signals+0x6d><== ALWAYS TAKEN 10ebc9: 31 db xor %ebx,%ebx 10ebcb: eb 0b jmp 10ebd8 <_POSIX_signals_Clear_signals+0x78><== NOT EXECUTED 10ebcd: 8b 03 mov (%ebx),%eax 10ebcf: 89 82 0c df 11 00 mov %eax,0x11df0c(%edx) 10ebd5: 89 48 04 mov %ecx,0x4(%eax) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 10ebd8: 39 ba 0c df 11 00 cmp %edi,0x11df0c(%edx) 10ebde: 75 0c jne 10ebec <_POSIX_signals_Clear_signals+0x8c><== NEVER TAKEN _POSIX_signals_Clear_process_signals( mask ); 10ebe0: 83 ec 0c sub $0xc,%esp 10ebe3: 56 push %esi 10ebe4: e8 03 05 00 00 call 10f0ec <_POSIX_signals_Clear_process_signals> 10ebe9: 83 c4 10 add $0x10,%esp if ( psiginfo ) { 10ebec: b0 01 mov $0x1,%al 10ebee: 85 db test %ebx,%ebx 10ebf0: 74 55 je 10ec47 <_POSIX_signals_Clear_signals+0xe7><== NEVER TAKEN *info = psiginfo->Info; 10ebf2: 8d 73 08 lea 0x8(%ebx),%esi 10ebf5: b9 03 00 00 00 mov $0x3,%ecx 10ebfa: 8b 7d 10 mov 0x10(%ebp),%edi 10ebfd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10ebff: c7 03 c0 de 11 00 movl $0x11dec0,(%ebx) 10ec05: a1 c4 de 11 00 mov 0x11dec4,%eax 10ec0a: 89 1d c4 de 11 00 mov %ebx,0x11dec4 10ec10: 89 18 mov %ebx,(%eax) 10ec12: 89 43 04 mov %eax,0x4(%ebx) 10ec15: eb 2a jmp 10ec41 <_POSIX_signals_Clear_signals+0xe1> &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 10ec17: 83 ec 0c sub $0xc,%esp 10ec1a: 56 push %esi 10ec1b: e8 cc 04 00 00 call 10f0ec <_POSIX_signals_Clear_process_signals> 10ec20: b0 01 mov $0x1,%al 10ec22: 83 c4 10 add $0x10,%esp 10ec25: eb 20 jmp 10ec47 <_POSIX_signals_Clear_signals+0xe7> do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 10ec27: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx 10ec2d: 89 f0 mov %esi,%eax 10ec2f: 21 c8 and %ecx,%eax 10ec31: 85 d0 test %edx,%eax 10ec33: 74 10 je 10ec45 <_POSIX_signals_Clear_signals+0xe5> api->signals_pending &= ~mask; 10ec35: 89 f0 mov %esi,%eax 10ec37: f7 d0 not %eax 10ec39: 21 c8 and %ecx,%eax 10ec3b: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) 10ec41: b0 01 mov $0x1,%al 10ec43: eb 02 jmp 10ec47 <_POSIX_signals_Clear_signals+0xe7> 10ec45: 31 c0 xor %eax,%eax do_callout = true; } } _ISR_Enable( level ); 10ec47: ff 75 f0 pushl -0x10(%ebp) 10ec4a: 9d popf return do_callout; } 10ec4b: 8d 65 f4 lea -0xc(%ebp),%esp 10ec4e: 5b pop %ebx 10ec4f: 5e pop %esi 10ec50: 5f pop %edi 10ec51: c9 leave 10ec52: c3 ret =============================================================================== 001099f8 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 1099f8: 55 push %ebp 1099f9: 89 e5 mov %esp,%ebp 1099fb: 56 push %esi 1099fc: 53 push %ebx 1099fd: 8b 5d 08 mov 0x8(%ebp),%ebx 109a00: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 109a05: ba 01 00 00 00 mov $0x1,%edx 109a0a: 8d 48 ff lea -0x1(%eax),%ecx 109a0d: 89 d6 mov %edx,%esi 109a0f: d3 e6 shl %cl,%esi 109a11: 85 de test %ebx,%esi 109a13: 75 20 jne 109a35 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 109a15: 40 inc %eax 109a16: 83 f8 20 cmp $0x20,%eax 109a19: 75 ef jne 109a0a <_POSIX_signals_Get_highest+0x12> 109a1b: 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 ) ) 109a1d: ba 01 00 00 00 mov $0x1,%edx 109a22: 8d 48 ff lea -0x1(%eax),%ecx 109a25: 89 d6 mov %edx,%esi 109a27: d3 e6 shl %cl,%esi 109a29: 85 de test %ebx,%esi 109a2b: 75 08 jne 109a35 <_POSIX_signals_Get_highest+0x3d> return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 109a2d: 40 inc %eax 109a2e: 83 f8 1b cmp $0x1b,%eax 109a31: 75 ef jne 109a22 <_POSIX_signals_Get_highest+0x2a><== ALWAYS TAKEN 109a33: 30 c0 xor %al,%al <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 109a35: 5b pop %ebx 109a36: 5e pop %esi 109a37: c9 leave 109a38: c3 ret =============================================================================== 0010d509 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10d509: 55 push %ebp 10d50a: 89 e5 mov %esp,%ebp 10d50c: 56 push %esi 10d50d: 53 push %ebx POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d50e: 8b 45 08 mov 0x8(%ebp),%eax 10d511: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( !api ) 10d517: 85 f6 test %esi,%esi 10d519: 74 7a je 10d595 <_POSIX_signals_Post_switch_extension+0x8c><== NEVER TAKEN * 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 ); 10d51b: 9c pushf 10d51c: fa cli 10d51d: 59 pop %ecx if ( !(~api->signals_blocked & 10d51e: 8b 15 08 df 11 00 mov 0x11df08,%edx 10d524: 0b 96 c8 00 00 00 or 0xc8(%esi),%edx 10d52a: 8b 86 c4 00 00 00 mov 0xc4(%esi),%eax 10d530: f7 d0 not %eax 10d532: 85 c2 test %eax,%edx 10d534: 75 04 jne 10d53a <_POSIX_signals_Post_switch_extension+0x31> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10d536: 51 push %ecx 10d537: 9d popf 10d538: eb 5b jmp 10d595 <_POSIX_signals_Post_switch_extension+0x8c> break; } _ISR_Enable( level ); 10d53a: 51 push %ecx 10d53b: 9d popf 10d53c: bb 1b 00 00 00 mov $0x1b,%ebx for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 10d541: 50 push %eax 10d542: 6a 00 push $0x0 10d544: 53 push %ebx 10d545: 56 push %esi 10d546: e8 95 15 00 00 call 10eae0 <_POSIX_signals_Check_signal> 10d54b: 83 c4 10 add $0x10,%esp 10d54e: 84 c0 test %al,%al 10d550: 75 c9 jne 10d51b <_POSIX_signals_Post_switch_extension+0x12><== NEVER TAKEN goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 10d552: 51 push %ecx 10d553: 6a 01 push $0x1 10d555: 53 push %ebx 10d556: 56 push %esi 10d557: e8 84 15 00 00 call 10eae0 <_POSIX_signals_Check_signal> 10d55c: 83 c4 10 add $0x10,%esp 10d55f: 84 c0 test %al,%al 10d561: 75 b8 jne 10d51b <_POSIX_signals_Post_switch_extension+0x12><== NEVER TAKEN _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10d563: 43 inc %ebx 10d564: 83 fb 20 cmp $0x20,%ebx 10d567: 75 d8 jne 10d541 <_POSIX_signals_Post_switch_extension+0x38> 10d569: 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 ) ) 10d56b: 52 push %edx 10d56c: 6a 00 push $0x0 10d56e: 53 push %ebx 10d56f: 56 push %esi 10d570: e8 6b 15 00 00 call 10eae0 <_POSIX_signals_Check_signal> 10d575: 83 c4 10 add $0x10,%esp 10d578: 84 c0 test %al,%al 10d57a: 75 9f jne 10d51b <_POSIX_signals_Post_switch_extension+0x12> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 10d57c: 50 push %eax 10d57d: 6a 01 push $0x1 10d57f: 53 push %ebx 10d580: 56 push %esi 10d581: e8 5a 15 00 00 call 10eae0 <_POSIX_signals_Check_signal> 10d586: 83 c4 10 add $0x10,%esp 10d589: 84 c0 test %al,%al 10d58b: 75 8e jne 10d51b <_POSIX_signals_Post_switch_extension+0x12> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10d58d: 43 inc %ebx 10d58e: 83 fb 1b cmp $0x1b,%ebx 10d591: 75 d8 jne 10d56b <_POSIX_signals_Post_switch_extension+0x62><== ALWAYS TAKEN 10d593: eb 86 jmp 10d51b <_POSIX_signals_Post_switch_extension+0x12><== NOT EXECUTED goto restart; } } return; } 10d595: 8d 65 f8 lea -0x8(%ebp),%esp 10d598: 5b pop %ebx 10d599: 5e pop %esi 10d59a: c9 leave 10d59b: c3 ret =============================================================================== 0011868c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 11868c: 55 push %ebp 11868d: 89 e5 mov %esp,%ebp 11868f: 57 push %edi 118690: 56 push %esi 118691: 53 push %ebx 118692: 83 ec 0c sub $0xc,%esp 118695: 8b 5d 08 mov 0x8(%ebp),%ebx 118698: 8b 75 10 mov 0x10(%ebp),%esi POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11869b: 8b bb f8 00 00 00 mov 0xf8(%ebx),%edi mask = signo_to_mask( signo ); 1186a1: 8b 4d 0c mov 0xc(%ebp),%ecx 1186a4: 49 dec %ecx 1186a5: ba 01 00 00 00 mov $0x1,%edx 1186aa: d3 e2 shl %cl,%edx /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1186ac: 8b 4b 10 mov 0x10(%ebx),%ecx 1186af: 89 c8 mov %ecx,%eax 1186b1: 25 00 80 00 10 and $0x10008000,%eax 1186b6: 3d 00 80 00 10 cmp $0x10008000,%eax 1186bb: 75 4c jne 118709 <_POSIX_signals_Unblock_thread+0x7d> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 1186bd: 85 53 30 test %edx,0x30(%ebx) 1186c0: 75 10 jne 1186d2 <_POSIX_signals_Unblock_thread+0x46> 1186c2: 8b 87 c4 00 00 00 mov 0xc4(%edi),%eax 1186c8: f7 d0 not %eax 1186ca: 85 c2 test %eax,%edx 1186cc: 0f 84 a0 00 00 00 je 118772 <_POSIX_signals_Unblock_thread+0xe6><== ALWAYS TAKEN the_thread->Wait.return_code = EINTR; 1186d2: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 1186d9: 8b 7b 28 mov 0x28(%ebx),%edi if ( !info ) { 1186dc: 85 f6 test %esi,%esi 1186de: 75 15 jne 1186f5 <_POSIX_signals_Unblock_thread+0x69> the_info->si_signo = signo; 1186e0: 8b 45 0c mov 0xc(%ebp),%eax 1186e3: 89 07 mov %eax,(%edi) the_info->si_code = SI_USER; 1186e5: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 1186ec: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) 1186f3: eb 07 jmp 1186fc <_POSIX_signals_Unblock_thread+0x70> } else { *the_info = *info; 1186f5: b9 03 00 00 00 mov $0x3,%ecx 1186fa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 1186fc: 83 ec 0c sub $0xc,%esp 1186ff: 53 push %ebx 118700: e8 67 41 ff ff call 10c86c <_Thread_queue_Extract_with_proxy> 118705: b0 01 mov $0x1,%al 118707: eb 48 jmp 118751 <_POSIX_signals_Unblock_thread+0xc5> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 118709: 8b 87 c4 00 00 00 mov 0xc4(%edi),%eax 11870f: f7 d0 not %eax 118711: 85 c2 test %eax,%edx 118713: 74 5d je 118772 <_POSIX_signals_Unblock_thread+0xe6> * 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; 118715: c6 43 75 01 movb $0x1,0x75(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 118719: f7 c1 00 00 00 10 test $0x10000000,%ecx 11871f: 74 35 je 118756 <_POSIX_signals_Unblock_thread+0xca> the_thread->Wait.return_code = EINTR; 118721: 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) ){ 118728: 80 e1 08 and $0x8,%cl 11872b: 74 45 je 118772 <_POSIX_signals_Unblock_thread+0xe6><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11872d: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 118731: 75 0f jne 118742 <_POSIX_signals_Unblock_thread+0xb6><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 118733: 83 ec 0c sub $0xc,%esp 118736: 8d 43 48 lea 0x48(%ebx),%eax 118739: 50 push %eax 11873a: e8 a5 4c ff ff call 10d3e4 <_Watchdog_Remove> 11873f: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 118742: 50 push %eax 118743: 50 push %eax 118744: 68 f8 ff 03 10 push $0x1003fff8 118749: 53 push %ebx 11874a: e8 3d 37 ff ff call 10be8c <_Thread_Clear_state> 11874f: 31 c0 xor %eax,%eax 118751: 83 c4 10 add $0x10,%esp 118754: eb 1e jmp 118774 <_POSIX_signals_Unblock_thread+0xe8> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 118756: 85 c9 test %ecx,%ecx 118758: 75 18 jne 118772 <_POSIX_signals_Unblock_thread+0xe6><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11875a: a1 30 93 12 00 mov 0x129330,%eax 11875f: 85 c0 test %eax,%eax 118761: 74 0f je 118772 <_POSIX_signals_Unblock_thread+0xe6> 118763: 3b 1d 54 93 12 00 cmp 0x129354,%ebx 118769: 75 07 jne 118772 <_POSIX_signals_Unblock_thread+0xe6><== NEVER TAKEN _ISR_Signals_to_thread_executing = TRUE; 11876b: c6 05 e8 93 12 00 01 movb $0x1,0x1293e8 118772: 31 c0 xor %eax,%eax } } return false; } 118774: 8d 65 f4 lea -0xc(%ebp),%esp 118777: 5b pop %ebx 118778: 5e pop %esi 118779: 5f pop %edi 11877a: c9 leave 11877b: c3 ret =============================================================================== 0010c788 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10c788: 55 push %ebp 10c789: 89 e5 mov %esp,%ebp 10c78b: 56 push %esi 10c78c: 53 push %ebx 10c78d: 8b 75 08 mov 0x8(%ebp),%esi 10c790: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Get_information_status status; if ( !the_heap ) 10c793: 85 f6 test %esi,%esi 10c795: 74 33 je 10c7ca <_Protected_heap_Get_information+0x42><== NEVER TAKEN return false; if ( !the_info ) 10c797: 85 db test %ebx,%ebx 10c799: 74 2f je 10c7ca <_Protected_heap_Get_information+0x42><== NEVER TAKEN return false; _RTEMS_Lock_allocator(); 10c79b: 83 ec 0c sub $0xc,%esp 10c79e: ff 35 3c 2b 12 00 pushl 0x122b3c 10c7a4: e8 3f ea ff ff call 10b1e8 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 10c7a9: 5a pop %edx 10c7aa: 59 pop %ecx 10c7ab: 53 push %ebx 10c7ac: 56 push %esi 10c7ad: e8 6e 38 00 00 call 110020 <_Heap_Get_information> 10c7b2: 89 c3 mov %eax,%ebx _RTEMS_Unlock_allocator(); 10c7b4: 58 pop %eax 10c7b5: ff 35 3c 2b 12 00 pushl 0x122b3c 10c7bb: e8 70 ea ff ff call 10b230 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 10c7c0: 83 c4 10 add $0x10,%esp 10c7c3: 85 db test %ebx,%ebx 10c7c5: 0f 94 c0 sete %al 10c7c8: eb 02 jmp 10c7cc <_Protected_heap_Get_information+0x44> 10c7ca: 31 c0 xor %eax,%eax return true; return false; } 10c7cc: 8d 65 f8 lea -0x8(%ebp),%esp 10c7cf: 5b pop %ebx 10c7d0: 5e pop %esi 10c7d1: c9 leave 10c7d2: c3 ret =============================================================================== 0010dbf3 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10dbf3: 55 push %ebp 10dbf4: 89 e5 mov %esp,%ebp 10dbf6: 53 push %ebx 10dbf7: 83 ec 10 sub $0x10,%esp 10dbfa: 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() ) 10dbfd: a1 30 d8 11 00 mov 0x11d830,%eax 10dc02: 8b 40 40 mov 0x40(%eax),%eax 10dc05: 80 78 04 01 cmpb $0x1,0x4(%eax) 10dc09: 19 c0 sbb %eax,%eax 10dc0b: 83 e0 c0 and $0xffffffc0,%eax 10dc0e: 83 c0 60 add $0x60,%eax to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 10dc11: 50 push %eax 10dc12: e8 12 e2 ff ff call 10be29 <_Workspace_Allocate> 10dc17: 89 c2 mov %eax,%edx if ( !api ) 10dc19: 83 c4 10 add $0x10,%esp 10dc1c: 31 c0 xor %eax,%eax 10dc1e: 85 d2 test %edx,%edx 10dc20: 74 5d je 10dc7f <_RTEMS_tasks_Create_extension+0x8c><== NEVER TAKEN return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 10dc22: 89 93 f4 00 00 00 mov %edx,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 10dc28: c7 02 00 00 00 00 movl $0x0,(%edx) #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 10dc2e: c6 42 08 01 movb $0x1,0x8(%edx) * @a page_size byte units. If @a page_size is 0 or is not multiple of 10dc32: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. 10dc39: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) * 10dc40: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) * @param[in] the_heap is the heap to operate upon 10dc47: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) * @param[in] starting_address is the starting address of the memory for 10dc4e: c7 42 1c 00 00 00 00 movl $0x0,0x1c(%edx) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 10dc55: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx) 10dc5c: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 10dc5f: a1 30 d8 11 00 mov 0x11d830,%eax 10dc64: 8b 40 40 mov 0x40(%eax),%eax 10dc67: 80 78 04 00 cmpb $0x0,0x4(%eax) 10dc6b: 74 10 je 10dc7d <_RTEMS_tasks_Create_extension+0x8a> 10dc6d: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 10dc6f: c7 44 82 20 00 00 00 movl $0x0,0x20(%edx,%eax,4) 10dc76: 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++) 10dc77: 40 inc %eax 10dc78: 83 f8 10 cmp $0x10,%eax 10dc7b: 75 f2 jne 10dc6f <_RTEMS_tasks_Create_extension+0x7c> 10dc7d: b0 01 mov $0x1,%al api->Notepads[i] = 0; } return true; } 10dc7f: 8b 5d fc mov -0x4(%ebp),%ebx 10dc82: c9 leave 10dc83: c3 ret =============================================================================== 001094e4 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 1094e4: 55 push %ebp 1094e5: 89 e5 mov %esp,%ebp 1094e7: 57 push %edi 1094e8: 56 push %esi 1094e9: 53 push %ebx 1094ea: 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; 1094ed: a1 30 d8 11 00 mov 0x11d830,%eax 1094f2: 8b 40 40 mov 0x40(%eax),%eax /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 1094f5: 8b 50 2c mov 0x2c(%eax),%edx maximum = api_configuration->number_of_initialization_tasks; 1094f8: 8b 78 28 mov 0x28(%eax),%edi if ( !user_tasks || maximum == 0 ) 1094fb: 85 d2 test %edx,%edx 1094fd: 74 53 je 109552 <_RTEMS_tasks_Initialize_user_tasks_body+0x6e><== NEVER TAKEN 1094ff: 85 ff test %edi,%edi 109501: 74 4f je 109552 <_RTEMS_tasks_Initialize_user_tasks_body+0x6e><== NEVER TAKEN return; 109503: 89 d3 mov %edx,%ebx 109505: 31 f6 xor %esi,%esi 109507: eb 45 jmp 10954e <_RTEMS_tasks_Initialize_user_tasks_body+0x6a> for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 109509: 50 push %eax 10950a: 50 push %eax 10950b: 8d 45 f0 lea -0x10(%ebp),%eax 10950e: 50 push %eax 10950f: ff 73 0c pushl 0xc(%ebx) 109512: ff 73 14 pushl 0x14(%ebx) 109515: ff 73 04 pushl 0x4(%ebx) 109518: ff 73 08 pushl 0x8(%ebx) 10951b: ff 33 pushl (%ebx) 10951d: e8 ca fd ff ff call 1092ec user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 109522: 83 c4 20 add $0x20,%esp 109525: 85 c0 test %eax,%eax 109527: 75 19 jne 109542 <_RTEMS_tasks_Initialize_user_tasks_body+0x5e> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 109529: 51 push %ecx 10952a: ff 73 18 pushl 0x18(%ebx) 10952d: ff 73 10 pushl 0x10(%ebx) 109530: ff 75 f0 pushl -0x10(%ebp) 109533: e8 24 00 00 00 call 10955c 109538: 83 c3 1c add $0x1c,%ebx id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10953b: 83 c4 10 add $0x10,%esp 10953e: 85 c0 test %eax,%eax 109540: 74 0b je 10954d <_RTEMS_tasks_Initialize_user_tasks_body+0x69> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 109542: 52 push %edx 109543: 50 push %eax 109544: 6a 01 push $0x1 109546: 6a 01 push $0x1 109548: e8 a7 0c 00 00 call 10a1f4 <_Internal_error_Occurred> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 10954d: 46 inc %esi 10954e: 39 fe cmp %edi,%esi 109550: 72 b7 jb 109509 <_RTEMS_tasks_Initialize_user_tasks_body+0x25> ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 109552: 8d 65 f4 lea -0xc(%ebp),%esp 109555: 5b pop %ebx 109556: 5e pop %esi 109557: 5f pop %edi 109558: c9 leave 109559: c3 ret =============================================================================== 0010db40 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10db40: 55 push %ebp 10db41: 89 e5 mov %esp,%ebp 10db43: 57 push %edi 10db44: 56 push %esi 10db45: 53 push %ebx 10db46: 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 ]; 10db49: 8b 45 08 mov 0x8(%ebp),%eax 10db4c: 8b b0 f4 00 00 00 mov 0xf4(%eax),%esi if ( !api ) 10db52: 85 f6 test %esi,%esi 10db54: 74 45 je 10db9b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10db56: 9c pushf 10db57: fa cli 10db58: 58 pop %eax signal_set = asr->signals_posted; 10db59: 8b 7e 14 mov 0x14(%esi),%edi asr->signals_posted = 0; 10db5c: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) _ISR_Enable( level ); 10db63: 50 push %eax 10db64: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10db65: 85 ff test %edi,%edi 10db67: 74 32 je 10db9b <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10db69: ff 46 1c incl 0x1c(%esi) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10db6c: 50 push %eax 10db6d: 8d 5d f0 lea -0x10(%ebp),%ebx 10db70: 53 push %ebx 10db71: 68 ff ff 00 00 push $0xffff 10db76: ff 76 10 pushl 0x10(%esi) 10db79: e8 56 11 00 00 call 10ecd4 (*asr->handler)( signal_set ); 10db7e: 89 3c 24 mov %edi,(%esp) 10db81: ff 56 0c call *0xc(%esi) asr->nest_level -= 1; 10db84: ff 4e 1c decl 0x1c(%esi) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10db87: 83 c4 0c add $0xc,%esp 10db8a: 53 push %ebx 10db8b: 68 ff ff 00 00 push $0xffff 10db90: ff 75 f0 pushl -0x10(%ebp) 10db93: e8 3c 11 00 00 call 10ecd4 10db98: 83 c4 10 add $0x10,%esp } 10db9b: 8d 65 f4 lea -0xc(%ebp),%esp 10db9e: 5b pop %ebx 10db9f: 5e pop %esi 10dba0: 5f pop %edi 10dba1: c9 leave 10dba2: c3 ret =============================================================================== 0010a314 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10a314: 55 push %ebp 10a315: 89 e5 mov %esp,%ebp 10a317: 53 push %ebx 10a318: 83 ec 18 sub $0x18,%esp 10a31b: 8d 45 f8 lea -0x8(%ebp),%eax 10a31e: 50 push %eax 10a31f: ff 75 08 pushl 0x8(%ebp) 10a322: 68 44 1b 12 00 push $0x121b44 10a327: e8 98 1a 00 00 call 10bdc4 <_Objects_Get> 10a32c: 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 ) { 10a32e: 83 c4 10 add $0x10,%esp 10a331: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 10a335: 75 64 jne 10a39b <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10a337: 8b 50 50 mov 0x50(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10a33a: f6 42 11 40 testb $0x40,0x11(%edx) 10a33e: 74 18 je 10a358 <_Rate_monotonic_Timeout+0x44> 10a340: 8b 42 20 mov 0x20(%edx),%eax 10a343: 3b 43 08 cmp 0x8(%ebx),%eax 10a346: 75 10 jne 10a358 <_Rate_monotonic_Timeout+0x44><== NEVER TAKEN void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10a348: 50 push %eax 10a349: 50 push %eax 10a34a: 68 f8 ff 03 10 push $0x1003fff8 10a34f: 52 push %edx 10a350: e8 af 1e 00 00 call 10c204 <_Thread_Clear_state> the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10a355: 59 pop %ecx 10a356: eb 10 jmp 10a368 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10a358: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10a35c: 75 2b jne 10a389 <_Rate_monotonic_Timeout+0x75><== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10a35e: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 10a365: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a368: 53 push %ebx 10a369: e8 6a fa ff ff call 109dd8 <_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, 10a36e: 8b 43 4c mov 0x4c(%ebx),%eax 10a371: 89 43 1c mov %eax,0x1c(%ebx) void *starting_address, size_t *size 10a374: 58 pop %eax 10a375: 5a pop %edx 10a376: 8d 43 10 lea 0x10(%ebx),%eax 10a379: 50 push %eax 10a37a: 68 1c 1d 12 00 push $0x121d1c 10a37f: e8 5c 31 00 00 call 10d4e0 <_Watchdog_Insert> 10a384: 83 c4 10 add $0x10,%esp 10a387: eb 07 jmp 10a390 <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10a389: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) 10a390: a1 3c 1c 12 00 mov 0x121c3c,%eax 10a395: 48 dec %eax 10a396: a3 3c 1c 12 00 mov %eax,0x121c3c case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a39b: 8b 5d fc mov -0x4(%ebp),%ebx 10a39e: c9 leave 10a39f: c3 ret =============================================================================== 00109a64 <_TOD_Validate>: */ bool _TOD_Validate( rtems_time_of_day *the_tod ) { 109a64: 55 push %ebp 109a65: 89 e5 mov %esp,%ebp 109a67: 53 push %ebx 109a68: 83 ec 04 sub $0x4,%esp 109a6b: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t days_in_month; if ((!the_tod) || 109a6e: 85 db test %ebx,%ebx 109a70: 74 5d je 109acf <_TOD_Validate+0x6b> <== NEVER TAKEN 109a72: b8 40 42 0f 00 mov $0xf4240,%eax 109a77: 31 d2 xor %edx,%edx 109a79: f7 35 30 94 12 00 divl 0x129430 109a7f: 39 43 18 cmp %eax,0x18(%ebx) 109a82: 73 4b jae 109acf <_TOD_Validate+0x6b> 109a84: 83 7b 14 3b cmpl $0x3b,0x14(%ebx) 109a88: 77 45 ja 109acf <_TOD_Validate+0x6b> 109a8a: 83 7b 10 3b cmpl $0x3b,0x10(%ebx) 109a8e: 77 3f ja 109acf <_TOD_Validate+0x6b> 109a90: 83 7b 0c 17 cmpl $0x17,0xc(%ebx) 109a94: 77 39 ja 109acf <_TOD_Validate+0x6b> 109a96: 8b 43 04 mov 0x4(%ebx),%eax 109a99: 85 c0 test %eax,%eax 109a9b: 74 32 je 109acf <_TOD_Validate+0x6b> <== NEVER TAKEN 109a9d: 83 f8 0c cmp $0xc,%eax 109aa0: 77 2d ja 109acf <_TOD_Validate+0x6b> 109aa2: 8b 0b mov (%ebx),%ecx 109aa4: 81 f9 c3 07 00 00 cmp $0x7c3,%ecx 109aaa: 76 23 jbe 109acf <_TOD_Validate+0x6b> 109aac: 8b 53 08 mov 0x8(%ebx),%edx 109aaf: 85 d2 test %edx,%edx 109ab1: 74 1c je 109acf <_TOD_Validate+0x6b> <== 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 ) 109ab3: 80 e1 03 and $0x3,%cl 109ab6: 75 09 jne 109ac1 <_TOD_Validate+0x5d> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 109ab8: 8b 04 85 64 a7 11 00 mov 0x11a764(,%eax,4),%eax 109abf: eb 07 jmp 109ac8 <_TOD_Validate+0x64> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 109ac1: 8b 04 85 30 a7 11 00 mov 0x11a730(,%eax,4),%eax 109ac8: 39 c2 cmp %eax,%edx 109aca: 0f 96 c0 setbe %al 109acd: eb 02 jmp 109ad1 <_TOD_Validate+0x6d> 109acf: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 109ad1: 5a pop %edx 109ad2: 5b pop %ebx 109ad3: c9 leave 109ad4: c3 ret =============================================================================== 0010a9ec <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10a9ec: 55 push %ebp 10a9ed: 89 e5 mov %esp,%ebp 10a9ef: 57 push %edi 10a9f0: 56 push %esi 10a9f1: 53 push %ebx 10a9f2: 83 ec 18 sub $0x18,%esp 10a9f5: 8b 5d 08 mov 0x8(%ebp),%ebx 10a9f8: 8b 75 0c mov 0xc(%ebp),%esi 10a9fb: 8a 45 10 mov 0x10(%ebp),%al 10a9fe: 88 45 f3 mov %al,-0xd(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10aa01: 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 ); 10aa04: 53 push %ebx 10aa05: e8 3e 0d 00 00 call 10b748 <_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 ) 10aa0a: 83 c4 10 add $0x10,%esp 10aa0d: 39 73 14 cmp %esi,0x14(%ebx) 10aa10: 74 0c je 10aa1e <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10aa12: 50 push %eax 10aa13: 50 push %eax 10aa14: 56 push %esi 10aa15: 53 push %ebx 10aa16: e8 f9 0b 00 00 call 10b614 <_Thread_Set_priority> 10aa1b: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10aa1e: 9c pushf 10aa1f: fa cli 10aa20: 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; 10aa21: 8b 53 10 mov 0x10(%ebx),%edx if ( state != STATES_TRANSIENT ) { 10aa24: 83 fa 04 cmp $0x4,%edx 10aa27: 74 30 je 10aa59 <_Thread_Change_priority+0x6d> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10aa29: 83 e7 04 and $0x4,%edi 10aa2c: 75 08 jne 10aa36 <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10aa2e: 89 d0 mov %edx,%eax 10aa30: 83 e0 fb and $0xfffffffb,%eax 10aa33: 89 43 10 mov %eax,0x10(%ebx) _ISR_Enable( level ); 10aa36: 56 push %esi 10aa37: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10aa38: 81 e2 e0 be 03 00 and $0x3bee0,%edx 10aa3e: 0f 84 c0 00 00 00 je 10ab04 <_Thread_Change_priority+0x118> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10aa44: 89 5d 0c mov %ebx,0xc(%ebp) 10aa47: 8b 43 44 mov 0x44(%ebx),%eax 10aa4a: 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 ); } 10aa4d: 8d 65 f4 lea -0xc(%ebp),%esp 10aa50: 5b pop %ebx 10aa51: 5e pop %esi 10aa52: 5f pop %edi 10aa53: 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 ); 10aa54: e9 33 0b 00 00 jmp 10b58c <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10aa59: 83 e7 04 and $0x4,%edi 10aa5c: 75 53 jne 10aab1 <_Thread_Change_priority+0xc5><== 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 ); 10aa5e: 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 10aa65: 8b 93 90 00 00 00 mov 0x90(%ebx),%edx 10aa6b: 66 8b 83 96 00 00 00 mov 0x96(%ebx),%ax 10aa72: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10aa75: 66 a1 4c d8 11 00 mov 0x11d84c,%ax 10aa7b: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10aa81: 66 a3 4c d8 11 00 mov %ax,0x11d84c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10aa87: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10aa8b: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx 10aa91: 74 0e je 10aaa1 <_Thread_Change_priority+0xb5> 10aa93: 89 53 04 mov %edx,0x4(%ebx) 10aa96: 8b 02 mov (%edx),%eax 10aa98: 89 1a mov %ebx,(%edx) 10aa9a: 89 03 mov %eax,(%ebx) 10aa9c: 89 58 04 mov %ebx,0x4(%eax) 10aa9f: eb 10 jmp 10aab1 <_Thread_Change_priority+0xc5> 10aaa1: 8d 42 04 lea 0x4(%edx),%eax 10aaa4: 89 03 mov %eax,(%ebx) 10aaa6: 8b 42 08 mov 0x8(%edx),%eax 10aaa9: 89 5a 08 mov %ebx,0x8(%edx) 10aaac: 89 18 mov %ebx,(%eax) 10aaae: 89 43 04 mov %eax,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10aab1: 56 push %esi 10aab2: 9d popf 10aab3: fa cli void *starting_address, size_t size ); /** * This routine returns the block of memory which begins 10aab4: 66 8b 0d 4c d8 11 00 mov 0x11d84c,%cx 10aabb: 31 d2 xor %edx,%edx 10aabd: 89 d0 mov %edx,%eax 10aabf: 66 0f bc c1 bsf %cx,%ax * at @a starting_address to @a the_heap. Any coalescing which is 10aac3: 0f b7 c0 movzwl %ax,%eax 10aac6: 66 8b 8c 00 c4 d8 11 mov 0x11d8c4(%eax,%eax,1),%cx 10aacd: 00 10aace: 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. 10aad2: c1 e0 04 shl $0x4,%eax 10aad5: 0f b7 d2 movzwl %dx,%edx 10aad8: 01 d0 add %edx,%eax 10aada: 6b c0 0c imul $0xc,%eax,%eax 10aadd: 8b 15 60 d7 11 00 mov 0x11d760,%edx 10aae3: 8b 04 10 mov (%eax,%edx,1),%eax 10aae6: a3 24 d8 11 00 mov %eax,0x11d824 void *starting_address, size_t size ); /** * This function attempts to allocate a block of @a size bytes from 10aaeb: 8b 15 58 d8 11 00 mov 0x11d858,%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() && 10aaf1: 39 c2 cmp %eax,%edx 10aaf3: 74 0d je 10ab02 <_Thread_Change_priority+0x116> 10aaf5: 80 7a 76 00 cmpb $0x0,0x76(%edx) 10aaf9: 74 07 je 10ab02 <_Thread_Change_priority+0x116><== NEVER TAKEN _Thread_Executing->is_preemptible ) _Context_Switch_necessary = TRUE; 10aafb: c6 05 68 d8 11 00 01 movb $0x1,0x11d868 _ISR_Enable( level ); 10ab02: 56 push %esi 10ab03: 9d popf } 10ab04: 8d 65 f4 lea -0xc(%ebp),%esp 10ab07: 5b pop %ebx 10ab08: 5e pop %esi 10ab09: 5f pop %edi 10ab0a: c9 leave 10ab0b: c3 ret =============================================================================== 0010ab0c <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10ab0c: 55 push %ebp 10ab0d: 89 e5 mov %esp,%ebp 10ab0f: 53 push %ebx 10ab10: 8b 4d 08 mov 0x8(%ebp),%ecx 10ab13: 8b 45 0c mov 0xc(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10ab16: 9c pushf 10ab17: fa cli 10ab18: 5b pop %ebx current_state = the_thread->current_state; 10ab19: 8b 51 10 mov 0x10(%ecx),%edx if ( current_state & state ) { 10ab1c: 85 d0 test %edx,%eax 10ab1e: 74 6f je 10ab8f <_Thread_Clear_state+0x83> * @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( 10ab20: f7 d0 not %eax 10ab22: 21 d0 and %edx,%eax current_state = 10ab24: 89 41 10 mov %eax,0x10(%ecx) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10ab27: 85 c0 test %eax,%eax 10ab29: 75 64 jne 10ab8f <_Thread_Clear_state+0x83> * 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 10ab2b: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx 10ab31: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax 10ab38: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10ab3b: 66 a1 4c d8 11 00 mov 0x11d84c,%ax 10ab41: 0b 81 94 00 00 00 or 0x94(%ecx),%eax 10ab47: 66 a3 4c d8 11 00 mov %ax,0x11d84c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10ab4d: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax 10ab53: 8d 50 04 lea 0x4(%eax),%edx 10ab56: 89 11 mov %edx,(%ecx) 10ab58: 8b 50 08 mov 0x8(%eax),%edx 10ab5b: 89 48 08 mov %ecx,0x8(%eax) 10ab5e: 89 0a mov %ecx,(%edx) 10ab60: 89 51 04 mov %edx,0x4(%ecx) _ISR_Flash( level ); 10ab63: 53 push %ebx 10ab64: 9d popf 10ab65: 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 ) { 10ab66: 8b 51 14 mov 0x14(%ecx),%edx 10ab69: a1 24 d8 11 00 mov 0x11d824,%eax 10ab6e: 3b 50 14 cmp 0x14(%eax),%edx 10ab71: 73 1c jae 10ab8f <_Thread_Clear_state+0x83> _Thread_Heir = the_thread; 10ab73: 89 0d 24 d8 11 00 mov %ecx,0x11d824 if ( _Thread_Executing->is_preemptible || 10ab79: a1 58 d8 11 00 mov 0x11d858,%eax 10ab7e: 80 78 76 00 cmpb $0x0,0x76(%eax) 10ab82: 75 04 jne 10ab88 <_Thread_Clear_state+0x7c> 10ab84: 85 d2 test %edx,%edx 10ab86: 75 07 jne 10ab8f <_Thread_Clear_state+0x83><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 10ab88: c6 05 68 d8 11 00 01 movb $0x1,0x11d868 } } } _ISR_Enable( level ); 10ab8f: 53 push %ebx 10ab90: 9d popf } 10ab91: 5b pop %ebx 10ab92: c9 leave 10ab93: c3 ret =============================================================================== 0010ac74 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10ac74: 55 push %ebp 10ac75: 89 e5 mov %esp,%ebp 10ac77: 83 ec 14 sub $0x14,%esp 10ac7a: 68 f4 d8 11 00 push $0x11d8f4 10ac7f: e8 04 f6 ff ff call 10a288 <_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(); 10ac84: a3 40 d9 11 00 mov %eax,0x11d940 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10ac89: a1 98 d7 11 00 mov 0x11d798,%eax 10ac8e: 40 inc %eax 10ac8f: a3 98 d7 11 00 mov %eax,0x11d798 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10ac94: a1 30 d8 11 00 mov 0x11d830,%eax 10ac99: 8b 50 18 mov 0x18(%eax),%edx 10ac9c: 83 c4 0c add $0xc,%esp 10ac9f: 68 40 73 11 00 push $0x117340 10aca4: 6a 00 push $0x0 10aca6: 6a 00 push $0x0 10aca8: 6a 00 push $0x0 10acaa: 6a 01 push $0x1 10acac: 0f b6 05 84 93 11 00 movzbl 0x119384,%eax 10acb3: 50 push %eax 10acb4: 6a 00 push $0x0 10acb6: a1 80 93 11 00 mov 0x119380,%eax 10acbb: 39 d0 cmp %edx,%eax 10acbd: 73 02 jae 10acc1 <_Thread_Create_idle+0x4d><== ALWAYS TAKEN 10acbf: 89 d0 mov %edx,%eax <== NOT EXECUTED 10acc1: 50 push %eax 10acc2: 6a 00 push $0x0 10acc4: ff 35 40 d9 11 00 pushl 0x11d940 10acca: 68 f4 d8 11 00 push $0x11d8f4 10accf: e8 50 02 00 00 call 10af24 <_Thread_Initialize> 10acd4: a1 98 d7 11 00 mov 0x11d798,%eax 10acd9: 48 dec %eax 10acda: a3 98 d7 11 00 mov %eax,0x11d798 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10acdf: 8b 15 40 d9 11 00 mov 0x11d940,%edx 10ace5: 89 15 58 d8 11 00 mov %edx,0x11d858 10aceb: 89 15 24 d8 11 00 mov %edx,0x11d824 _Thread_Executing = _Thread_Idle; _Thread_Start( 10acf1: 83 c4 24 add $0x24,%esp 10acf4: 6a 00 push $0x0 10acf6: 6a 00 push $0x0 10acf8: a1 30 d8 11 00 mov 0x11d830,%eax 10acfd: ff 70 14 pushl 0x14(%eax) 10ad00: 6a 00 push $0x0 10ad02: 52 push %edx 10ad03: e8 8c 0b 00 00 call 10b894 <_Thread_Start> 10ad08: 83 c4 20 add $0x20,%esp _Configuration_Table->idle_task, NULL, 0 ); } 10ad0b: c9 leave 10ad0c: c3 ret =============================================================================== 0010ad10 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored ) { 10ad10: 55 push %ebp 10ad11: 89 e5 mov %esp,%ebp 10ad13: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ad16: 8d 45 fc lea -0x4(%ebp),%eax 10ad19: 50 push %eax 10ad1a: ff 75 08 pushl 0x8(%ebp) 10ad1d: e8 8a 01 00 00 call 10aeac <_Thread_Get> switch ( location ) { 10ad22: 83 c4 10 add $0x10,%esp 10ad25: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 10ad29: 75 1b jne 10ad46 <_Thread_Delay_ended+0x36><== NEVER TAKEN void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10ad2b: 52 push %edx 10ad2c: 52 push %edx 10ad2d: 68 f8 ff 03 10 push $0x1003fff8 10ad32: 50 push %eax 10ad33: e8 d4 fd ff ff call 10ab0c <_Thread_Clear_state> 10ad38: a1 98 d7 11 00 mov 0x11d798,%eax 10ad3d: 48 dec %eax 10ad3e: a3 98 d7 11 00 mov %eax,0x11d798 10ad43: 83 c4 10 add $0x10,%esp case OBJECTS_LOCAL: _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; } } 10ad46: c9 leave 10ad47: c3 ret =============================================================================== 0010ad48 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10ad48: 55 push %ebp 10ad49: 89 e5 mov %esp,%ebp 10ad4b: 57 push %edi 10ad4c: 56 push %esi 10ad4d: 53 push %ebx 10ad4e: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10ad51: 8b 1d 58 d8 11 00 mov 0x11d858,%ebx _ISR_Disable( level ); 10ad57: 9c pushf 10ad58: fa cli 10ad59: 5a pop %edx #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec uptime, ran; _TOD_Get_uptime( &uptime ); _Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran); 10ad5a: 8d 7d e4 lea -0x1c(%ebp),%edi 10ad5d: e9 f1 00 00 00 jmp 10ae53 <_Thread_Dispatch+0x10b> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == TRUE ) { heir = _Thread_Heir; 10ad62: 8b 35 24 d8 11 00 mov 0x11d824,%esi _Thread_Dispatch_disable_level = 1; 10ad68: c7 05 98 d7 11 00 01 movl $0x1,0x11d798 10ad6f: 00 00 00 _Context_Switch_necessary = FALSE; 10ad72: c6 05 68 d8 11 00 00 movb $0x0,0x11d868 _Thread_Executing = heir; 10ad79: 89 35 58 d8 11 00 mov %esi,0x11d858 #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 ) 10ad7f: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10ad83: 75 08 jne 10ad8d <_Thread_Dispatch+0x45> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ad85: a1 64 d7 11 00 mov 0x11d764,%eax 10ad8a: 89 46 78 mov %eax,0x78(%esi) _ISR_Enable( level ); 10ad8d: 52 push %edx 10ad8e: 9d popf #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec uptime, ran; _TOD_Get_uptime( &uptime ); 10ad8f: 83 ec 0c sub $0xc,%esp 10ad92: 8d 45 ec lea -0x14(%ebp),%eax 10ad95: 50 push %eax 10ad96: e8 a1 31 00 00 call 10df3c <_TOD_Get_uptime> _Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran); 10ad9b: 83 c4 0c add $0xc,%esp 10ad9e: 57 push %edi 10ad9f: 8d 45 ec lea -0x14(%ebp),%eax 10ada2: 50 push %eax 10ada3: 68 60 d8 11 00 push $0x11d860 10ada8: e8 37 0c 00 00 call 10b9e4 <_Timespec_Subtract> _Timespec_Add_to( &executing->cpu_time_used, &ran ); 10adad: 58 pop %eax 10adae: 5a pop %edx 10adaf: 57 push %edi 10adb0: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10adb6: 50 push %eax 10adb7: e8 f8 0b 00 00 call 10b9b4 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10adbc: 8b 45 ec mov -0x14(%ebp),%eax 10adbf: 8b 55 f0 mov -0x10(%ebp),%edx 10adc2: a3 60 d8 11 00 mov %eax,0x11d860 10adc7: 89 15 64 d8 11 00 mov %edx,0x11d864 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10adcd: 8b 15 20 d8 11 00 mov 0x11d820,%edx 10add3: 83 c4 10 add $0x10,%esp 10add6: 85 d2 test %edx,%edx 10add8: 74 10 je 10adea <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10adda: 8b 02 mov (%edx),%eax 10addc: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10ade2: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax 10ade8: 89 02 mov %eax,(%edx) } _User_extensions_Thread_switch( executing, heir ); 10adea: 51 push %ecx 10adeb: 51 push %ecx 10adec: 56 push %esi 10aded: 53 push %ebx 10adee: e8 01 0e 00 00 call 10bbf4 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10adf3: 58 pop %eax 10adf4: 5a pop %edx 10adf5: 8d 86 d4 00 00 00 lea 0xd4(%esi),%eax 10adfb: 50 push %eax 10adfc: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10ae02: 50 push %eax 10ae03: e8 b8 10 00 00 call 10bec0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10ae08: 83 c4 10 add $0x10,%esp 10ae0b: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10ae12: 74 36 je 10ae4a <_Thread_Dispatch+0x102> Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10ae14: a1 1c d8 11 00 mov 0x11d81c,%eax 10ae19: 39 c3 cmp %eax,%ebx 10ae1b: 74 2d je 10ae4a <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10ae1d: 85 c0 test %eax,%eax 10ae1f: 74 11 je 10ae32 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10ae21: 83 ec 0c sub $0xc,%esp 10ae24: 05 ec 00 00 00 add $0xec,%eax 10ae29: 50 push %eax 10ae2a: e8 c5 10 00 00 call 10bef4 <_CPU_Context_save_fp> 10ae2f: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10ae32: 83 ec 0c sub $0xc,%esp 10ae35: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10ae3b: 50 push %eax 10ae3c: e8 bd 10 00 00 call 10befe <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10ae41: 89 1d 1c d8 11 00 mov %ebx,0x11d81c 10ae47: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10ae4a: 8b 1d 58 d8 11 00 mov 0x11d858,%ebx _ISR_Disable( level ); 10ae50: 9c pushf 10ae51: fa cli 10ae52: 5a pop %edx Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == TRUE ) { 10ae53: a0 68 d8 11 00 mov 0x11d868,%al 10ae58: 84 c0 test %al,%al 10ae5a: 0f 85 02 ff ff ff jne 10ad62 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10ae60: c7 05 98 d7 11 00 00 movl $0x0,0x11d798 10ae67: 00 00 00 _ISR_Enable( level ); 10ae6a: 52 push %edx 10ae6b: 9d popf if ( _Thread_Do_post_task_switch_extension || 10ae6c: 83 3d 3c d8 11 00 00 cmpl $0x0,0x11d83c 10ae73: 75 06 jne 10ae7b <_Thread_Dispatch+0x133> 10ae75: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10ae79: 74 09 je 10ae84 <_Thread_Dispatch+0x13c> executing->do_post_task_switch_extension ) { executing->do_post_task_switch_extension = false; 10ae7b: c6 43 75 00 movb $0x0,0x75(%ebx) _API_extensions_Run_postswitch(); 10ae7f: e8 4b eb ff ff call 1099cf <_API_extensions_Run_postswitch> } } 10ae84: 8d 65 f4 lea -0xc(%ebp),%esp 10ae87: 5b pop %ebx 10ae88: 5e pop %esi 10ae89: 5f pop %edi 10ae8a: c9 leave 10ae8b: c3 ret =============================================================================== 0010ef3c <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 10ef3c: 55 push %ebp 10ef3d: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 10ef3f: a1 58 d8 11 00 mov 0x11d858,%eax if ( !_States_Is_ready( executing->current_state ) || 10ef44: 83 78 10 00 cmpl $0x0,0x10(%eax) 10ef48: 75 0e jne 10ef58 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 10ef4a: 3b 05 24 d8 11 00 cmp 0x11d824,%eax 10ef50: 74 11 je 10ef63 <_Thread_Evaluate_mode+0x27> 10ef52: 80 78 76 00 cmpb $0x0,0x76(%eax) 10ef56: 74 0b je 10ef63 <_Thread_Evaluate_mode+0x27><== NEVER TAKEN ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 10ef58: c6 05 68 d8 11 00 01 movb $0x1,0x11d868 10ef5f: b0 01 mov $0x1,%al 10ef61: eb 02 jmp 10ef65 <_Thread_Evaluate_mode+0x29> return TRUE; 10ef63: 31 c0 xor %eax,%eax } return FALSE; } 10ef65: c9 leave 10ef66: c3 ret =============================================================================== 0010aeac <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10aeac: 55 push %ebp 10aead: 89 e5 mov %esp,%ebp 10aeaf: 53 push %ebx 10aeb0: 83 ec 04 sub $0x4,%esp 10aeb3: 8b 5d 08 mov 0x8(%ebp),%ebx 10aeb6: 8b 4d 0c mov 0xc(%ebp),%ecx 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 ) ) { 10aeb9: 85 db test %ebx,%ebx 10aebb: 75 18 jne 10aed5 <_Thread_Get+0x29> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10aebd: a1 98 d7 11 00 mov 0x11d798,%eax 10aec2: 40 inc %eax 10aec3: a3 98 d7 11 00 mov %eax,0x11d798 _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10aec8: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10aece: a1 58 d8 11 00 mov 0x11d858,%eax 10aed3: eb 40 jmp 10af15 <_Thread_Get+0x69> uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10aed5: 89 da mov %ebx,%edx 10aed7: c1 ea 18 shr $0x18,%edx 10aeda: 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. 10aedd: 8d 42 ff lea -0x1(%edx),%eax 10aee0: 83 f8 03 cmp $0x3,%eax 10aee3: 76 35 jbe 10af1a <_Thread_Get+0x6e> goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 10aee5: c7 01 01 00 00 00 movl $0x1,(%ecx) 10aeeb: 31 c0 xor %eax,%eax 10aeed: eb 26 jmp 10af15 <_Thread_Get+0x69> goto done; } api_information = _Objects_Information_table[ the_api ]; 10aeef: 8b 04 95 6c d7 11 00 mov 0x11d76c(,%edx,4),%eax if ( !api_information ) { 10aef6: 85 c0 test %eax,%eax 10aef8: 74 07 je 10af01 <_Thread_Get+0x55> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10aefa: 8b 40 04 mov 0x4(%eax),%eax if ( !information ) { 10aefd: 85 c0 test %eax,%eax 10aeff: 75 08 jne 10af09 <_Thread_Get+0x5d> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10af01: c7 01 01 00 00 00 movl $0x1,(%ecx) 10af07: eb 0c jmp 10af15 <_Thread_Get+0x69> goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10af09: 52 push %edx 10af0a: 51 push %ecx 10af0b: 53 push %ebx 10af0c: 50 push %eax 10af0d: e8 ba f7 ff ff call 10a6cc <_Objects_Get> 10af12: 83 c4 10 add $0x10,%esp done: return tp; } 10af15: 8b 5d fc mov -0x4(%ebp),%ebx 10af18: c9 leave 10af19: c3 ret *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10af1a: 89 d8 mov %ebx,%eax 10af1c: c1 e8 1b shr $0x1b,%eax 10af1f: 48 dec %eax 10af20: 74 cd je 10aeef <_Thread_Get+0x43> 10af22: eb c1 jmp 10aee5 <_Thread_Get+0x39> =============================================================================== 0010ef68 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 10ef68: 55 push %ebp 10ef69: 89 e5 mov %esp,%ebp 10ef6b: 53 push %ebx 10ef6c: 83 ec 04 sub $0x4,%esp #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 10ef6f: 8b 1d 58 d8 11 00 mov 0x11d858,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 10ef75: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 10ef7b: 85 c0 test %eax,%eax 10ef7d: 74 03 je 10ef82 <_Thread_Handler+0x1a> 10ef7f: fa cli 10ef80: eb 01 jmp 10ef83 <_Thread_Handler+0x1b> 10ef82: fb sti #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 10ef83: a0 90 d5 11 00 mov 0x11d590,%al 10ef88: 88 45 fb mov %al,-0x5(%ebp) doneConstructors = 1; 10ef8b: c6 05 90 d5 11 00 01 movb $0x1,0x11d590 #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 ) ) { 10ef92: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10ef99: 74 24 je 10efbf <_Thread_Handler+0x57> Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10ef9b: a1 1c d8 11 00 mov 0x11d81c,%eax 10efa0: 39 c3 cmp %eax,%ebx 10efa2: 74 1b je 10efbf <_Thread_Handler+0x57> if ( _Thread_Allocated_fp != NULL ) 10efa4: 85 c0 test %eax,%eax 10efa6: 74 11 je 10efb9 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10efa8: 83 ec 0c sub $0xc,%esp 10efab: 05 ec 00 00 00 add $0xec,%eax 10efb0: 50 push %eax 10efb1: e8 3e cf ff ff call 10bef4 <_CPU_Context_save_fp> 10efb6: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 10efb9: 89 1d 1c d8 11 00 mov %ebx,0x11d81c * 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 ); 10efbf: 83 ec 0c sub $0xc,%esp 10efc2: 53 push %ebx 10efc3: e8 e0 ca ff ff call 10baa8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 10efc8: e8 bf be ff ff call 10ae8c <_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) */ 10efcd: 83 c4 10 add $0x10,%esp 10efd0: 80 7d fb 00 cmpb $0x0,-0x5(%ebp) 10efd4: 75 05 jne 10efdb <_Thread_Handler+0x73> { _init (); 10efd6: e8 85 6e 00 00 call 115e60 <__start_set_sysctl_set> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 10efdb: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 10efe1: 83 f8 01 cmp $0x1,%eax 10efe4: 74 13 je 10eff9 <_Thread_Handler+0x91> 10efe6: 72 0c jb 10eff4 <_Thread_Handler+0x8c> <== ALWAYS TAKEN 10efe8: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10efeb: 74 11 je 10effe <_Thread_Handler+0x96> <== NOT EXECUTED 10efed: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 10eff0: 75 36 jne 10f028 <_Thread_Handler+0xc0> <== NOT EXECUTED 10eff2: eb 1a jmp 10f00e <_Thread_Handler+0xa6> <== NOT EXECUTED case THREAD_START_NUMERIC: executing->Wait.return_argument = 10eff4: 83 ec 0c sub $0xc,%esp 10eff7: eb 1d jmp 10f016 <_Thread_Handler+0xae> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 10eff9: 83 ec 0c sub $0xc,%esp 10effc: eb 08 jmp 10f006 <_Thread_Handler+0x9e> (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 10effe: 52 push %edx <== NOT EXECUTED 10efff: 52 push %edx <== NOT EXECUTED 10f000: ff b3 a8 00 00 00 pushl 0xa8(%ebx) <== NOT EXECUTED 10f006: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 10f00c: eb 0e jmp 10f01c <_Thread_Handler+0xb4> executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 10f00e: 50 push %eax <== NOT EXECUTED 10f00f: 50 push %eax <== NOT EXECUTED 10f010: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED 10f016: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 10f01c: ff 93 9c 00 00 00 call *0x9c(%ebx) 10f022: 89 43 28 mov %eax,0x28(%ebx) 10f025: 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 ); 10f028: 83 ec 0c sub $0xc,%esp 10f02b: 53 push %ebx 10f02c: e8 a8 ca ff ff call 10bad9 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 10f031: 83 c4 0c add $0xc,%esp 10f034: 6a 06 push $0x6 10f036: 6a 01 push $0x1 10f038: 6a 00 push $0x0 10f03a: e8 b5 b1 ff ff call 10a1f4 <_Internal_error_Occurred> =============================================================================== 0010af24 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10af24: 55 push %ebp 10af25: 89 e5 mov %esp,%ebp 10af27: 57 push %edi 10af28: 56 push %esi 10af29: 53 push %ebx 10af2a: 83 ec 0c sub $0xc,%esp 10af2d: 8b 5d 0c mov 0xc(%ebp),%ebx 10af30: 8b 55 10 mov 0x10(%ebp),%edx 10af33: 8b 75 14 mov 0x14(%ebp),%esi 10af36: 8a 45 18 mov 0x18(%ebp),%al 10af39: 88 45 f3 mov %al,-0xd(%ebp) 10af3c: 8a 45 20 mov 0x20(%ebp),%al 10af3f: 88 45 f2 mov %al,-0xe(%ebp) /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 10af42: 85 d2 test %edx,%edx 10af44: 75 2a jne 10af70 <_Thread_Initialize+0x4c><== NEVER TAKEN actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10af46: 51 push %ecx 10af47: 51 push %ecx 10af48: 56 push %esi 10af49: 53 push %ebx 10af4a: e8 69 08 00 00 call 10b7b8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10af4f: 83 c4 10 add $0x10,%esp 10af52: 85 c0 test %eax,%eax 10af54: 74 04 je 10af5a <_Thread_Initialize+0x36> 10af56: 39 f0 cmp %esi,%eax 10af58: 73 07 jae 10af61 <_Thread_Initialize+0x3d><== ALWAYS TAKEN 10af5a: 31 d2 xor %edx,%edx 10af5c: e9 8c 01 00 00 jmp 10b0ed <_Thread_Initialize+0x1c9> return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 10af61: 8b 93 d0 00 00 00 mov 0xd0(%ebx),%edx the_thread->Start.core_allocated_stack = TRUE; 10af67: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10af6e: eb 09 jmp 10af79 <_Thread_Initialize+0x55> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 10af70: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) <== NOT EXECUTED 10af77: 89 f0 mov %esi,%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 10af79: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx) * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. 10af7f: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) { _Thread_Stack_Free( the_thread ); return FALSE; 10af85: 31 f6 xor %esi,%esi /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10af87: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10af8b: 74 17 je 10afa4 <_Thread_Initialize+0x80> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10af8d: 83 ec 0c sub $0xc,%esp 10af90: 6a 6c push $0x6c 10af92: e8 92 0e 00 00 call 10be29 <_Workspace_Allocate> 10af97: 89 c6 mov %eax,%esi if ( !fp_area ) { 10af99: 83 c4 10 add $0x10,%esp 10af9c: 85 c0 test %eax,%eax 10af9e: 0f 84 3b 01 00 00 je 10b0df <_Thread_Initialize+0x1bb><== NEVER TAKEN fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 10afa4: 89 b3 ec 00 00 00 mov %esi,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10afaa: 89 b3 cc 00 00 00 mov %esi,0xcc(%ebx) * 10afb0: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) * @param[in] the_heap is the heap to operate upon 10afb7: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) * @param[in] starting_address is the starting address of the memory for 10afbe: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) * the heap 10afc5: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 10afcc: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10afd3: 00 00 00 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10afd6: a1 38 d8 11 00 mov 0x11d838,%eax (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 10afdb: 31 ff xor %edi,%edi /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10afdd: 85 c0 test %eax,%eax 10afdf: 74 1d je 10affe <_Thread_Initialize+0xda> extensions_area = _Workspace_Allocate( 10afe1: 83 ec 0c sub $0xc,%esp 10afe4: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10afeb: 50 push %eax 10afec: e8 38 0e 00 00 call 10be29 <_Workspace_Allocate> 10aff1: 89 c7 mov %eax,%edi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 10aff3: 83 c4 10 add $0x10,%esp 10aff6: 85 c0 test %eax,%eax 10aff8: 0f 84 d1 00 00 00 je 10b0cf <_Thread_Initialize+0x1ab><== NEVER TAKEN return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 10affe: 89 bb 00 01 00 00 mov %edi,0x100(%ebx) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10b004: 31 d2 xor %edx,%edx 10b006: 85 ff test %edi,%edi 10b008: 75 10 jne 10b01a <_Thread_Initialize+0xf6> 10b00a: eb 18 jmp 10b024 <_Thread_Initialize+0x100> uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) the_thread->extensions[i] = NULL; 10b00c: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10b012: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 10b019: 42 inc %edx 10b01a: a1 38 d8 11 00 mov 0x11d838,%eax 10b01f: 40 inc %eax 10b020: 39 c2 cmp %eax,%edx 10b022: 72 e8 jb 10b00c <_Thread_Initialize+0xe8> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10b024: 8a 45 f2 mov -0xe(%ebp),%al 10b027: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10b02d: 8b 45 24 mov 0x24(%ebp),%eax 10b030: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10b036: 8b 45 28 mov 0x28(%ebp),%eax 10b039: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10b03f: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10b043: 75 08 jne 10b04d <_Thread_Initialize+0x129><== 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; 10b045: a1 64 d7 11 00 mov 0x11d764,%eax <== NOT EXECUTED 10b04a: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 10b04d: 8b 45 2c mov 0x2c(%ebp),%eax 10b050: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10b056: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10b05d: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10b064: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->suspend_count = 0; 10b06b: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) the_thread->real_priority = priority; 10b072: 8b 45 1c mov 0x1c(%ebp),%eax 10b075: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10b078: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10b07e: 52 push %edx 10b07f: 52 push %edx 10b080: 50 push %eax 10b081: 53 push %ebx 10b082: e8 8d 05 00 00 call 10b614 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 10b087: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10b08e: 00 00 00 the_thread->cpu_time_used.tv_nsec = 0; 10b091: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10b098: 00 00 00 10b09b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b09f: 8b 45 08 mov 0x8(%ebp),%eax 10b0a2: 8b 40 1c mov 0x1c(%eax),%eax 10b0a5: 89 1c 90 mov %ebx,(%eax,%edx,4) 10b0a8: 8b 45 30 mov 0x30(%ebp),%eax 10b0ab: 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 ); 10b0ae: 89 1c 24 mov %ebx,(%esp) 10b0b1: e8 92 0a 00 00 call 10bb48 <_User_extensions_Thread_create> if ( !extension_status ) { 10b0b6: 83 c4 10 add $0x10,%esp 10b0b9: b2 01 mov $0x1,%dl 10b0bb: 84 c0 test %al,%al 10b0bd: 75 2e jne 10b0ed <_Thread_Initialize+0x1c9> if ( extensions_area ) 10b0bf: 85 ff test %edi,%edi 10b0c1: 74 0c je 10b0cf <_Thread_Initialize+0x1ab><== ALWAYS TAKEN (void) _Workspace_Free( extensions_area ); 10b0c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b0c6: 57 push %edi <== NOT EXECUTED 10b0c7: e8 48 0d 00 00 call 10be14 <_Workspace_Free> <== NOT EXECUTED 10b0cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10b0cf: 85 f6 test %esi,%esi 10b0d1: 74 0c je 10b0df <_Thread_Initialize+0x1bb><== ALWAYS TAKEN (void) _Workspace_Free( fp_area ); 10b0d3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b0d6: 56 push %esi <== NOT EXECUTED 10b0d7: e8 38 0d 00 00 call 10be14 <_Workspace_Free> <== NOT EXECUTED 10b0dc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 10b0df: 83 ec 0c sub $0xc,%esp 10b0e2: 53 push %ebx 10b0e3: e8 20 07 00 00 call 10b808 <_Thread_Stack_Free> 10b0e8: 31 d2 xor %edx,%edx 10b0ea: 83 c4 10 add $0x10,%esp return FALSE; } return TRUE; } 10b0ed: 88 d0 mov %dl,%al 10b0ef: 8d 65 f4 lea -0xc(%ebp),%esp 10b0f2: 5b pop %ebx 10b0f3: 5e pop %esi 10b0f4: 5f pop %edi 10b0f5: c9 leave 10b0f6: c3 ret =============================================================================== 0010ef70 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10ef70: 55 push %ebp 10ef71: 89 e5 mov %esp,%ebp 10ef73: 53 push %ebx 10ef74: 83 ec 10 sub $0x10,%esp 10ef77: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 10ef7a: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->suspend_count = 0; 10ef81: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 10ef88: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 10ef8e: 88 43 76 mov %al,0x76(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 10ef91: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 10ef97: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 10ef9a: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 10efa0: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10efa6: 8b 45 0c mov 0xc(%ebp),%eax 10efa9: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10efaf: 8b 45 10 mov 0x10(%ebp),%eax 10efb2: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10efb8: 53 push %ebx 10efb9: e8 9e ce ff ff call 10be5c <_Thread_queue_Extract_with_proxy> 10efbe: 83 c4 10 add $0x10,%esp 10efc1: 84 c0 test %al,%al 10efc3: 75 15 jne 10efda <_Thread_Reset+0x6a> <== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10efc5: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10efc9: 75 0f jne 10efda <_Thread_Reset+0x6a> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 10efcb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10efce: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED 10efd1: 50 push %eax <== NOT EXECUTED 10efd2: e8 c5 d7 ff ff call 10c79c <_Watchdog_Remove> <== NOT EXECUTED 10efd7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 10efda: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 10efe0: 39 43 14 cmp %eax,0x14(%ebx) 10efe3: 74 12 je 10eff7 <_Thread_Reset+0x87> the_thread->real_priority = the_thread->Start.initial_priority; 10efe5: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 10efe8: 89 45 0c mov %eax,0xc(%ebp) 10efeb: 89 5d 08 mov %ebx,0x8(%ebp) } } 10efee: 8b 5d fc mov -0x4(%ebp),%ebx 10eff1: 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 ); 10eff2: e9 41 d0 ff ff jmp 10c038 <_Thread_Set_priority> } } 10eff7: 8b 5d fc mov -0x4(%ebp),%ebx 10effa: c9 leave 10effb: c3 ret =============================================================================== 0010e498 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10e498: 55 push %ebp 10e499: 89 e5 mov %esp,%ebp 10e49b: 56 push %esi 10e49c: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e49d: 8b 0d 58 d8 11 00 mov 0x11d858,%ecx ready = executing->ready; 10e4a3: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx _ISR_Disable( level ); 10e4a9: 9c pushf 10e4aa: fa cli 10e4ab: 5e pop %esi if ( _Chain_Has_only_one_node( ready ) ) { 10e4ac: 8b 03 mov (%ebx),%eax 10e4ae: 3b 43 08 cmp 0x8(%ebx),%eax 10e4b1: 75 04 jne 10e4b7 <_Thread_Reset_timeslice+0x1f> _ISR_Enable( level ); 10e4b3: 56 push %esi 10e4b4: 9d popf 10e4b5: eb 35 jmp 10e4ec <_Thread_Reset_timeslice+0x54> 10e4b7: 8b 11 mov (%ecx),%edx 10e4b9: 8b 41 04 mov 0x4(%ecx),%eax 10e4bc: 89 42 04 mov %eax,0x4(%edx) 10e4bf: 89 10 mov %edx,(%eax) 10e4c1: 8d 43 04 lea 0x4(%ebx),%eax 10e4c4: 89 01 mov %eax,(%ecx) 10e4c6: 8b 43 08 mov 0x8(%ebx),%eax 10e4c9: 89 4b 08 mov %ecx,0x8(%ebx) 10e4cc: 89 08 mov %ecx,(%eax) 10e4ce: 89 41 04 mov %eax,0x4(%ecx) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e4d1: 56 push %esi 10e4d2: 9d popf 10e4d3: fa cli if ( _Thread_Is_heir( executing ) ) 10e4d4: 3b 0d 24 d8 11 00 cmp 0x11d824,%ecx 10e4da: 75 07 jne 10e4e3 <_Thread_Reset_timeslice+0x4b><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10e4dc: 8b 03 mov (%ebx),%eax 10e4de: a3 24 d8 11 00 mov %eax,0x11d824 _Context_Switch_necessary = TRUE; 10e4e3: c6 05 68 d8 11 00 01 movb $0x1,0x11d868 _ISR_Enable( level ); 10e4ea: 56 push %esi 10e4eb: 9d popf } 10e4ec: 5b pop %ebx 10e4ed: 5e pop %esi 10e4ee: c9 leave 10e4ef: c3 ret =============================================================================== 0010bfb0 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10bfb0: 55 push %ebp 10bfb1: 89 e5 mov %esp,%ebp 10bfb3: 53 push %ebx 10bfb4: 83 ec 04 sub $0x4,%esp 10bfb7: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10bfba: 31 c0 xor %eax,%eax 10bfbc: f6 43 10 01 testb $0x1,0x10(%ebx) 10bfc0: 75 70 jne 10c032 <_Thread_Restart+0x82> _Thread_Set_transient( the_thread ); 10bfc2: 83 ec 0c sub $0xc,%esp 10bfc5: 53 push %ebx 10bfc6: e8 a1 01 00 00 call 10c16c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10bfcb: 83 c4 0c add $0xc,%esp 10bfce: ff 75 10 pushl 0x10(%ebp) 10bfd1: ff 75 0c pushl 0xc(%ebp) 10bfd4: 53 push %ebx 10bfd5: e8 96 2f 00 00 call 10ef70 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10bfda: 89 1c 24 mov %ebx,(%esp) 10bfdd: e8 8a 2c 00 00 call 10ec6c <_Thread_Load_environment> _Thread_Ready( the_thread ); 10bfe2: 89 1c 24 mov %ebx,(%esp) 10bfe5: e8 e6 2e 00 00 call 10eed0 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10bfea: 89 1c 24 mov %ebx,(%esp) 10bfed: e8 ee 05 00 00 call 10c5e0 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10bff2: 83 c4 10 add $0x10,%esp 10bff5: b0 01 mov $0x1,%al 10bff7: 3b 1d c4 0c 12 00 cmp 0x120cc4,%ebx 10bffd: 75 33 jne 10c032 <_Thread_Restart+0x82> * 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 10bfff: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10c006: 74 12 je 10c01a <_Thread_Restart+0x6a> * @return NULL if unsuccessful and a pointer to the block if successful 10c008: 83 ec 0c sub $0xc,%esp 10c00b: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10c011: 50 push %eax 10c012: e8 47 09 00 00 call 10c95e <_CPU_Context_restore_fp> 10c017: 83 c4 10 add $0x10,%esp */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, 10c01a: 83 ec 0c sub $0xc,%esp 10c01d: a1 c4 0c 12 00 mov 0x120cc4,%eax 10c022: 05 d4 00 00 00 add $0xd4,%eax 10c027: 50 push %eax 10c028: e8 20 09 00 00 call 10c94d <_CPU_Context_restore> 10c02d: b0 01 mov $0x1,%al <== NOT EXECUTED 10c02f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return TRUE; } return FALSE; } 10c032: 8b 5d fc mov -0x4(%ebp),%ebx 10c035: c9 leave 10c036: c3 ret =============================================================================== 0010c9c0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10c9c0: 55 push %ebp 10c9c1: 89 e5 mov %esp,%ebp 10c9c3: 53 push %ebx 10c9c4: 8b 4d 08 mov 0x8(%ebp),%ecx 10c9c7: 8a 45 0c mov 0xc(%ebp),%al ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10c9ca: 9c pushf 10c9cb: fa cli 10c9cc: 5b pop %ebx if ( force == TRUE ) 10c9cd: 84 c0 test %al,%al 10c9cf: 74 09 je 10c9da <_Thread_Resume+0x1a> <== NEVER TAKEN the_thread->suspend_count = 0; 10c9d1: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) 10c9d8: eb 03 jmp 10c9dd <_Thread_Resume+0x1d> else the_thread->suspend_count--; 10c9da: ff 49 70 decl 0x70(%ecx) <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 10c9dd: 83 79 70 00 cmpl $0x0,0x70(%ecx) 10c9e1: 74 04 je 10c9e7 <_Thread_Resume+0x27> <== ALWAYS TAKEN _ISR_Enable( level ); 10c9e3: 53 push %ebx <== NOT EXECUTED 10c9e4: 9d popf <== NOT EXECUTED 10c9e5: eb 77 jmp 10ca5e <_Thread_Resume+0x9e> <== NOT EXECUTED return; } current_state = the_thread->current_state; 10c9e7: 8b 41 10 mov 0x10(%ecx),%eax if ( current_state & STATES_SUSPENDED ) { 10c9ea: a8 02 test $0x2,%al 10c9ec: 74 6e je 10ca5c <_Thread_Resume+0x9c> <== NEVER TAKEN * @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( 10c9ee: 83 e0 fd and $0xfffffffd,%eax current_state = 10c9f1: 89 41 10 mov %eax,0x10(%ecx) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10c9f4: 85 c0 test %eax,%eax 10c9f6: 75 64 jne 10ca5c <_Thread_Resume+0x9c> <== NEVER TAKEN * 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 10c9f8: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx 10c9fe: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax 10ca05: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10ca08: 66 a1 48 93 12 00 mov 0x129348,%ax 10ca0e: 0b 81 94 00 00 00 or 0x94(%ecx),%eax 10ca14: 66 a3 48 93 12 00 mov %ax,0x129348 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10ca1a: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax 10ca20: 8d 50 04 lea 0x4(%eax),%edx 10ca23: 89 11 mov %edx,(%ecx) 10ca25: 8b 50 08 mov 0x8(%eax),%edx 10ca28: 89 48 08 mov %ecx,0x8(%eax) 10ca2b: 89 0a mov %ecx,(%edx) 10ca2d: 89 51 04 mov %edx,0x4(%ecx) _ISR_Flash( level ); 10ca30: 53 push %ebx 10ca31: 9d popf 10ca32: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10ca33: 8b 51 14 mov 0x14(%ecx),%edx 10ca36: a1 20 93 12 00 mov 0x129320,%eax 10ca3b: 3b 50 14 cmp 0x14(%eax),%edx 10ca3e: 73 1c jae 10ca5c <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 10ca40: 89 0d 20 93 12 00 mov %ecx,0x129320 if ( _Thread_Executing->is_preemptible || 10ca46: a1 54 93 12 00 mov 0x129354,%eax 10ca4b: 80 78 76 00 cmpb $0x0,0x76(%eax) 10ca4f: 75 04 jne 10ca55 <_Thread_Resume+0x95> 10ca51: 85 d2 test %edx,%edx 10ca53: 75 07 jne 10ca5c <_Thread_Resume+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 10ca55: c6 05 64 93 12 00 01 movb $0x1,0x129364 } } } _ISR_Enable( level ); 10ca5c: 53 push %ebx 10ca5d: 9d popf } 10ca5e: 5b pop %ebx 10ca5f: c9 leave 10ca60: c3 ret =============================================================================== 0010b7b8 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10b7b8: 55 push %ebp 10b7b9: 89 e5 mov %esp,%ebp 10b7bb: 53 push %ebx 10b7bc: 83 ec 04 sub $0x4,%esp 10b7bf: a1 80 93 11 00 mov 0x119380,%eax 10b7c4: 8b 5d 0c mov 0xc(%ebp),%ebx 10b7c7: 39 c3 cmp %eax,%ebx 10b7c9: 73 02 jae 10b7cd <_Thread_Stack_Allocate+0x15> 10b7cb: 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 ) { 10b7cd: a1 30 d8 11 00 mov 0x11d830,%eax 10b7d2: 8b 40 20 mov 0x20(%eax),%eax 10b7d5: 85 c0 test %eax,%eax 10b7d7: 74 08 je 10b7e1 <_Thread_Stack_Allocate+0x29><== ALWAYS TAKEN stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 10b7d9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b7dc: 53 push %ebx <== NOT EXECUTED 10b7dd: ff d0 call *%eax <== NOT EXECUTED 10b7df: eb 09 jmp 10b7ea <_Thread_Stack_Allocate+0x32><== NOT EXECUTED * 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 ); 10b7e1: 83 ec 0c sub $0xc,%esp 10b7e4: 53 push %ebx 10b7e5: e8 3f 06 00 00 call 10be29 <_Workspace_Allocate> 10b7ea: 89 c1 mov %eax,%ecx 10b7ec: 83 c4 10 add $0x10,%esp } if ( !stack_addr ) 10b7ef: 31 c0 xor %eax,%eax 10b7f1: 85 c9 test %ecx,%ecx 10b7f3: 0f 95 c0 setne %al 10b7f6: f7 d8 neg %eax 10b7f8: 21 d8 and %ebx,%eax the_stack_size = 0; the_thread->Start.stack = stack_addr; 10b7fa: 8b 55 08 mov 0x8(%ebp),%edx 10b7fd: 89 8a d0 00 00 00 mov %ecx,0xd0(%edx) return the_stack_size; } 10b803: 8b 5d fc mov -0x4(%ebp),%ebx 10b806: c9 leave 10b807: c3 ret =============================================================================== 0010b808 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10b808: 55 push %ebp 10b809: 89 e5 mov %esp,%ebp 10b80b: 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 ) 10b80e: 80 ba c0 00 00 00 00 cmpb $0x0,0xc0(%edx) 10b815: 74 21 je 10b838 <_Thread_Stack_Free+0x30><== 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 ) 10b817: a1 30 d8 11 00 mov 0x11d830,%eax 10b81c: 8b 48 24 mov 0x24(%eax),%ecx 10b81f: 85 c9 test %ecx,%ecx 10b821: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax 10b827: 74 06 je 10b82f <_Thread_Stack_Free+0x27><== ALWAYS TAKEN (*_Configuration_Table->stack_free_hook)( 10b829: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10b82c: 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)( 10b82d: ff e1 jmp *%ecx <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10b82f: 89 45 08 mov %eax,0x8(%ebp) } 10b832: 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 ); 10b833: e9 dc 05 00 00 jmp 10be14 <_Workspace_Free> } 10b838: c9 leave <== NOT EXECUTED 10b839: c3 ret <== NOT EXECUTED =============================================================================== 0010b8f0 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10b8f0: 55 push %ebp 10b8f1: 89 e5 mov %esp,%ebp 10b8f3: 53 push %ebx 10b8f4: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10b8f7: 8b 1d 58 d8 11 00 mov 0x11d858,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10b8fd: 80 7b 76 00 cmpb $0x0,0x76(%ebx) 10b901: 74 4c je 10b94f <_Thread_Tickle_timeslice+0x5f> return; if ( !_States_Is_ready( executing->current_state ) ) 10b903: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10b907: 75 46 jne 10b94f <_Thread_Tickle_timeslice+0x5f><== NEVER TAKEN /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10b909: 8b 43 7c mov 0x7c(%ebx),%eax 10b90c: 83 f8 01 cmp $0x1,%eax 10b90f: 72 3e jb 10b94f <_Thread_Tickle_timeslice+0x5f> 10b911: 83 f8 02 cmp $0x2,%eax 10b914: 76 07 jbe 10b91d <_Thread_Tickle_timeslice+0x2d> 10b916: 83 f8 03 cmp $0x3,%eax 10b919: 75 34 jne 10b94f <_Thread_Tickle_timeslice+0x5f><== NEVER TAKEN 10b91b: eb 1a jmp 10b937 <_Thread_Tickle_timeslice+0x47> 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 ) { 10b91d: 8b 43 78 mov 0x78(%ebx),%eax 10b920: 48 dec %eax 10b921: 89 43 78 mov %eax,0x78(%ebx) 10b924: 85 c0 test %eax,%eax 10b926: 7f 27 jg 10b94f <_Thread_Tickle_timeslice+0x5f> _Thread_Reset_timeslice(); 10b928: e8 6b 2b 00 00 call 10e498 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10b92d: a1 64 d7 11 00 mov 0x11d764,%eax 10b932: 89 43 78 mov %eax,0x78(%ebx) 10b935: eb 18 jmp 10b94f <_Thread_Tickle_timeslice+0x5f> } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10b937: 8b 43 78 mov 0x78(%ebx),%eax 10b93a: 48 dec %eax 10b93b: 89 43 78 mov %eax,0x78(%ebx) 10b93e: 85 c0 test %eax,%eax 10b940: 75 0d jne 10b94f <_Thread_Tickle_timeslice+0x5f> (*executing->budget_callout)( executing ); 10b942: 83 ec 0c sub $0xc,%esp 10b945: 53 push %ebx 10b946: ff 93 80 00 00 00 call *0x80(%ebx) 10b94c: 83 c4 10 add $0x10,%esp break; } } 10b94f: 8b 5d fc mov -0x4(%ebp),%ebx 10b952: c9 leave 10b953: c3 ret =============================================================================== 0010b954 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10b954: 55 push %ebp 10b955: 89 e5 mov %esp,%ebp 10b957: 56 push %esi 10b958: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10b959: 8b 0d 58 d8 11 00 mov 0x11d858,%ecx ready = executing->ready; 10b95f: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx _ISR_Disable( level ); 10b965: 9c pushf 10b966: fa cli 10b967: 5e pop %esi if ( !_Chain_Has_only_one_node( ready ) ) { 10b968: 8b 03 mov (%ebx),%eax 10b96a: 3b 43 08 cmp 0x8(%ebx),%eax 10b96d: 74 2e je 10b99d <_Thread_Yield_processor+0x49> 10b96f: 8b 11 mov (%ecx),%edx 10b971: 8b 41 04 mov 0x4(%ecx),%eax 10b974: 89 42 04 mov %eax,0x4(%edx) 10b977: 89 10 mov %edx,(%eax) 10b979: 8d 43 04 lea 0x4(%ebx),%eax 10b97c: 89 01 mov %eax,(%ecx) 10b97e: 8b 43 08 mov 0x8(%ebx),%eax 10b981: 89 4b 08 mov %ecx,0x8(%ebx) 10b984: 89 08 mov %ecx,(%eax) 10b986: 89 41 04 mov %eax,0x4(%ecx) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10b989: 56 push %esi 10b98a: 9d popf 10b98b: fa cli if ( _Thread_Is_heir( executing ) ) 10b98c: 3b 0d 24 d8 11 00 cmp 0x11d824,%ecx 10b992: 75 11 jne 10b9a5 <_Thread_Yield_processor+0x51><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10b994: 8b 03 mov (%ebx),%eax 10b996: a3 24 d8 11 00 mov %eax,0x11d824 10b99b: eb 08 jmp 10b9a5 <_Thread_Yield_processor+0x51> _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) 10b99d: 3b 0d 24 d8 11 00 cmp 0x11d824,%ecx 10b9a3: 74 07 je 10b9ac <_Thread_Yield_processor+0x58><== ALWAYS TAKEN _Context_Switch_necessary = TRUE; 10b9a5: c6 05 68 d8 11 00 01 movb $0x1,0x11d868 _ISR_Enable( level ); 10b9ac: 56 push %esi 10b9ad: 9d popf } 10b9ae: 5b pop %ebx 10b9af: 5e pop %esi 10b9b0: c9 leave 10b9b1: c3 ret =============================================================================== 0010b368 <_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 ) { 10b368: 55 push %ebp 10b369: 89 e5 mov %esp,%ebp 10b36b: 57 push %edi 10b36c: 56 push %esi 10b36d: 53 push %ebx 10b36e: 83 ec 18 sub $0x18,%esp 10b371: 8b 4d 0c mov 0xc(%ebp),%ecx 10b374: 8d 41 3c lea 0x3c(%ecx),%eax 10b377: 89 41 38 mov %eax,0x38(%ecx) 10b37a: c7 41 3c 00 00 00 00 movl $0x0,0x3c(%ecx) 10b381: 8d 41 38 lea 0x38(%ecx),%eax 10b384: 89 41 40 mov %eax,0x40(%ecx) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10b387: 8b 79 14 mov 0x14(%ecx),%edi 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. 10b38a: 89 f8 mov %edi,%eax 10b38c: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10b38f: 6b c0 0c imul $0xc,%eax,%eax 10b392: 8b 5d 08 mov 0x8(%ebp),%ebx 10b395: 01 c3 add %eax,%ebx block_state = the_thread_queue->state; 10b397: 8b 55 08 mov 0x8(%ebp),%edx 10b39a: 8b 52 38 mov 0x38(%edx),%edx 10b39d: 89 55 e8 mov %edx,-0x18(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) 10b3a0: f7 c7 20 00 00 00 test $0x20,%edi 10b3a6: 75 77 jne 10b41f <_Thread_queue_Enqueue_priority+0xb7> * @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 10b3a8: 83 c3 04 add $0x4,%ebx 10b3ab: 89 5d ec mov %ebx,-0x14(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 10b3ae: 89 45 dc mov %eax,-0x24(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10b3b1: 9c pushf 10b3b2: fa cli 10b3b3: 5e pop %esi search_thread = (Thread_Control *) header->first; 10b3b4: 8b 45 dc mov -0x24(%ebp),%eax 10b3b7: 8b 5d 08 mov 0x8(%ebp),%ebx 10b3ba: 8b 14 18 mov (%eax,%ebx,1),%edx 10b3bd: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 10b3c4: eb 1b jmp 10b3e1 <_Thread_queue_Enqueue_priority+0x79> while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10b3c6: 8b 5a 14 mov 0x14(%edx),%ebx 10b3c9: 89 5d e0 mov %ebx,-0x20(%ebp) if ( priority <= search_priority ) 10b3cc: 39 df cmp %ebx,%edi 10b3ce: 76 16 jbe 10b3e6 <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10b3d0: 56 push %esi 10b3d1: 9d popf 10b3d2: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10b3d3: 8b 45 e8 mov -0x18(%ebp),%eax 10b3d6: 85 42 10 test %eax,0x10(%edx) 10b3d9: 75 04 jne 10b3df <_Thread_queue_Enqueue_priority+0x77><== ALWAYS TAKEN _ISR_Enable( level ); 10b3db: 56 push %esi <== NOT EXECUTED 10b3dc: 9d popf <== NOT EXECUTED 10b3dd: eb d2 jmp 10b3b1 <_Thread_queue_Enqueue_priority+0x49><== NOT EXECUTED goto restart_forward_search; } search_thread = 10b3df: 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 ) ) { 10b3e1: 3b 55 ec cmp -0x14(%ebp),%edx 10b3e4: 75 e0 jne 10b3c6 <_Thread_queue_Enqueue_priority+0x5e> 10b3e6: 89 55 f0 mov %edx,-0x10(%ebp) 10b3e9: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10b3eb: 8b 45 08 mov 0x8(%ebp),%eax 10b3ee: 83 78 30 01 cmpl $0x1,0x30(%eax) 10b3f2: 0f 85 b4 00 00 00 jne 10b4ac <_Thread_queue_Enqueue_priority+0x144><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b3f8: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( priority == search_priority ) 10b3ff: 3b 7d e0 cmp -0x20(%ebp),%edi 10b402: 0f 84 87 00 00 00 je 10b48f <_Thread_queue_Enqueue_priority+0x127> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10b408: 8b 42 04 mov 0x4(%edx),%eax the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10b40b: 89 11 mov %edx,(%ecx) the_node->previous = previous_node; 10b40d: 89 41 04 mov %eax,0x4(%ecx) previous_node->next = the_node; 10b410: 89 08 mov %ecx,(%eax) search_node->previous = the_node; 10b412: 89 4a 04 mov %ecx,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10b415: 8b 55 08 mov 0x8(%ebp),%edx 10b418: 89 51 44 mov %edx,0x44(%ecx) _ISR_Enable( level ); 10b41b: 56 push %esi 10b41c: 9d popf 10b41d: eb 69 jmp 10b488 <_Thread_queue_Enqueue_priority+0x120> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 10b41f: 8d 43 08 lea 0x8(%ebx),%eax 10b422: 89 45 e4 mov %eax,-0x1c(%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; 10b425: 0f b6 05 84 93 11 00 movzbl 0x119384,%eax 10b42c: 40 inc %eax 10b42d: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 10b430: 9c pushf 10b431: fa cli 10b432: 5e pop %esi search_thread = (Thread_Control *) header->last; 10b433: 8b 45 e4 mov -0x1c(%ebp),%eax 10b436: 8b 10 mov (%eax),%edx 10b438: eb 1c jmp 10b456 <_Thread_queue_Enqueue_priority+0xee> while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10b43a: 8b 42 14 mov 0x14(%edx),%eax 10b43d: 89 45 e0 mov %eax,-0x20(%ebp) if ( priority >= search_priority ) 10b440: 39 c7 cmp %eax,%edi 10b442: 73 16 jae 10b45a <_Thread_queue_Enqueue_priority+0xf2> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10b444: 56 push %esi 10b445: 9d popf 10b446: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10b447: 8b 45 e8 mov -0x18(%ebp),%eax 10b44a: 85 42 10 test %eax,0x10(%edx) 10b44d: 75 04 jne 10b453 <_Thread_queue_Enqueue_priority+0xeb><== ALWAYS TAKEN _ISR_Enable( level ); 10b44f: 56 push %esi <== NOT EXECUTED 10b450: 9d popf <== NOT EXECUTED 10b451: eb d2 jmp 10b425 <_Thread_queue_Enqueue_priority+0xbd><== NOT EXECUTED goto restart_reverse_search; } search_thread = (Thread_Control *) 10b453: 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 ) ) { 10b456: 39 da cmp %ebx,%edx 10b458: 75 e0 jne 10b43a <_Thread_queue_Enqueue_priority+0xd2> 10b45a: 89 55 f0 mov %edx,-0x10(%ebp) 10b45d: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10b45f: 8b 45 08 mov 0x8(%ebp),%eax 10b462: 83 78 30 01 cmpl $0x1,0x30(%eax) 10b466: 75 44 jne 10b4ac <_Thread_queue_Enqueue_priority+0x144><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b468: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( priority == search_priority ) 10b46f: 3b 7d e0 cmp -0x20(%ebp),%edi 10b472: 74 1b je 10b48f <_Thread_queue_Enqueue_priority+0x127> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10b474: 8b 02 mov (%edx),%eax the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10b476: 89 01 mov %eax,(%ecx) the_node->previous = search_node; 10b478: 89 51 04 mov %edx,0x4(%ecx) search_node->next = the_node; 10b47b: 89 0a mov %ecx,(%edx) next_node->previous = the_node; 10b47d: 89 48 04 mov %ecx,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10b480: 8b 55 08 mov 0x8(%ebp),%edx 10b483: 89 51 44 mov %edx,0x44(%ecx) _ISR_Enable( level ); 10b486: 56 push %esi 10b487: 9d popf 10b488: b8 01 00 00 00 mov $0x1,%eax 10b48d: eb 28 jmp 10b4b7 <_Thread_queue_Enqueue_priority+0x14f> 10b48f: 8b 45 f0 mov -0x10(%ebp),%eax 10b492: 83 c0 3c add $0x3c,%eax 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; 10b495: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10b498: 89 01 mov %eax,(%ecx) the_node->previous = previous_node; 10b49a: 89 51 04 mov %edx,0x4(%ecx) previous_node->next = the_node; 10b49d: 89 0a mov %ecx,(%edx) search_node->previous = the_node; 10b49f: 89 48 04 mov %ecx,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10b4a2: 8b 45 08 mov 0x8(%ebp),%eax 10b4a5: 89 41 44 mov %eax,0x44(%ecx) _ISR_Enable( level ); 10b4a8: 53 push %ebx 10b4a9: 9d popf 10b4aa: eb dc jmp 10b488 <_Thread_queue_Enqueue_priority+0x120> * 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; 10b4ac: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10b4af: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return the_thread_queue->sync_state; 10b4b1: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10b4b4: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED } 10b4b7: 83 c4 18 add $0x18,%esp 10b4ba: 5b pop %ebx 10b4bb: 5e pop %esi 10b4bc: 5f pop %edi 10b4bd: c9 leave 10b4be: c3 ret =============================================================================== 0010f040 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10f040: 55 push %ebp 10f041: 89 e5 mov %esp,%ebp 10f043: 53 push %ebx 10f044: 83 ec 04 sub $0x4,%esp 10f047: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10f04a: 9c pushf 10f04b: fa cli 10f04c: 59 pop %ecx if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10f04d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10f054: 75 07 jne 10f05d <_Thread_queue_Extract_fifo+0x1d><== ALWAYS TAKEN _ISR_Enable( level ); 10f056: 51 push %ecx <== NOT EXECUTED 10f057: 9d popf <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10f058: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f05b: c9 leave <== NOT EXECUTED 10f05c: c3 ret <== NOT EXECUTED 10f05d: 8b 13 mov (%ebx),%edx 10f05f: 8b 43 04 mov 0x4(%ebx),%eax 10f062: 89 42 04 mov %eax,0x4(%edx) 10f065: 89 10 mov %edx,(%eax) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 10f067: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10f06e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10f072: 74 04 je 10f078 <_Thread_queue_Extract_fifo+0x38> _ISR_Enable( level ); 10f074: 51 push %ecx 10f075: 9d popf 10f076: eb 18 jmp 10f090 <_Thread_queue_Extract_fifo+0x50> * 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 */ 10f078: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10f07f: 51 push %ecx 10f080: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10f081: 83 ec 0c sub $0xc,%esp 10f084: 8d 43 48 lea 0x48(%ebx),%eax 10f087: 50 push %eax 10f088: e8 b3 cc ff ff call 10bd40 <_Watchdog_Remove> 10f08d: 83 c4 10 add $0x10,%esp void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10f090: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10f097: 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 } 10f09a: 8b 5d fc mov -0x4(%ebp),%ebx 10f09d: c9 leave 10f09e: e9 69 ba ff ff jmp 10ab0c <_Thread_Clear_state> =============================================================================== 0010e2f0 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 10e2f0: 55 push %ebp 10e2f1: 89 e5 mov %esp,%ebp 10e2f3: 57 push %edi 10e2f4: 56 push %esi 10e2f5: 53 push %ebx 10e2f6: 83 ec 0c sub $0xc,%esp 10e2f9: 8b 5d 0c mov 0xc(%ebp),%ebx 10e2fc: 8a 45 10 mov 0x10(%ebp),%al 10e2ff: 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 ); 10e302: 9c pushf 10e303: fa cli 10e304: 8f 45 ec popl -0x14(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e307: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10e30e: 75 09 jne 10e319 <_Thread_queue_Extract_priority_helper+0x29><== ALWAYS TAKEN _ISR_Enable( level ); 10e310: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED 10e313: 9d popf <== NOT EXECUTED 10e314: e9 8f 00 00 00 jmp 10e3a8 <_Thread_queue_Extract_priority_helper+0xb8><== NOT EXECUTED /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 10e319: 8b 33 mov (%ebx),%esi previous_node = the_node->previous; 10e31b: 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( 10e31e: 8b 53 38 mov 0x38(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10e321: 8d 43 3c lea 0x3c(%ebx),%eax 10e324: 39 c2 cmp %eax,%edx 10e326: 74 33 je 10e35b <_Thread_queue_Extract_priority_helper+0x6b> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 10e328: 8b 43 40 mov 0x40(%ebx),%eax 10e32b: 89 45 f0 mov %eax,-0x10(%ebp) new_second_node = new_first_node->next; 10e32e: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10e330: 89 11 mov %edx,(%ecx) next_node->previous = new_first_node; 10e332: 89 56 04 mov %edx,0x4(%esi) new_first_node->next = next_node; 10e335: 89 32 mov %esi,(%edx) new_first_node->previous = previous_node; 10e337: 89 4a 04 mov %ecx,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10e33a: 8b 43 38 mov 0x38(%ebx),%eax 10e33d: 3b 43 40 cmp 0x40(%ebx),%eax 10e340: 74 1e je 10e360 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 10e342: 8d 42 38 lea 0x38(%edx),%eax 10e345: 89 47 04 mov %eax,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e348: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10e34b: 8b 45 f0 mov -0x10(%ebp),%eax 10e34e: 89 42 40 mov %eax,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e351: 8d 42 3c lea 0x3c(%edx),%eax 10e354: 8b 55 f0 mov -0x10(%ebp),%edx 10e357: 89 02 mov %eax,(%edx) 10e359: eb 05 jmp 10e360 <_Thread_queue_Extract_priority_helper+0x70> } } else { previous_node->next = next_node; 10e35b: 89 31 mov %esi,(%ecx) next_node->previous = previous_node; 10e35d: 89 4e 04 mov %ecx,0x4(%esi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 10e360: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 10e364: 74 06 je 10e36c <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); 10e366: ff 75 ec pushl -0x14(%ebp) 10e369: 9d popf 10e36a: eb 3c jmp 10e3a8 <_Thread_queue_Extract_priority_helper+0xb8> return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e36c: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e370: 74 06 je 10e378 <_Thread_queue_Extract_priority_helper+0x88> _ISR_Enable( level ); 10e372: ff 75 ec pushl -0x14(%ebp) 10e375: 9d popf 10e376: eb 1a jmp 10e392 <_Thread_queue_Extract_priority_helper+0xa2> * 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 */ 10e378: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e37f: ff 75 ec pushl -0x14(%ebp) 10e382: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e383: 83 ec 0c sub $0xc,%esp 10e386: 8d 43 48 lea 0x48(%ebx),%eax 10e389: 50 push %eax 10e38a: e8 b1 d9 ff ff call 10bd40 <_Watchdog_Remove> 10e38f: 83 c4 10 add $0x10,%esp void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10e392: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10e399: 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 } 10e39c: 8d 65 f4 lea -0xc(%ebp),%esp 10e39f: 5b pop %ebx 10e3a0: 5e pop %esi 10e3a1: 5f pop %edi 10e3a2: c9 leave 10e3a3: e9 64 c7 ff ff jmp 10ab0c <_Thread_Clear_state> 10e3a8: 8d 65 f4 lea -0xc(%ebp),%esp 10e3ab: 5b pop %ebx 10e3ac: 5e pop %esi 10e3ad: 5f pop %edi 10e3ae: c9 leave 10e3af: c3 ret =============================================================================== 0010e3b0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 10e3b0: 55 push %ebp 10e3b1: 89 e5 mov %esp,%ebp 10e3b3: 83 ec 08 sub $0x8,%esp 10e3b6: 8b 4d 08 mov 0x8(%ebp),%ecx Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 10e3b9: 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 && 10e3bc: 8b 42 30 mov 0x30(%edx),%eax 10e3bf: 85 c0 test %eax,%eax 10e3c1: 74 1c je 10e3df <_Thread_queue_Process_timeout+0x2f> 10e3c3: 3b 0d 58 d8 11 00 cmp 0x11d858,%ecx 10e3c9: 75 14 jne 10e3df <_Thread_queue_Process_timeout+0x2f><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 10e3cb: 83 f8 03 cmp $0x3,%eax 10e3ce: 74 23 je 10e3f3 <_Thread_queue_Process_timeout+0x43><== NEVER TAKEN the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10e3d0: 8b 42 3c mov 0x3c(%edx),%eax 10e3d3: 89 41 34 mov %eax,0x34(%ecx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10e3d6: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) 10e3dd: eb 14 jmp 10e3f3 <_Thread_queue_Process_timeout+0x43> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10e3df: 8b 42 3c mov 0x3c(%edx),%eax 10e3e2: 89 41 34 mov %eax,0x34(%ecx) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10e3e5: 50 push %eax 10e3e6: 50 push %eax 10e3e7: 51 push %ecx 10e3e8: ff 71 44 pushl 0x44(%ecx) 10e3eb: e8 d0 fe ff ff call 10e2c0 <_Thread_queue_Extract> 10e3f0: 83 c4 10 add $0x10,%esp } } 10e3f3: c9 leave 10e3f4: c3 ret =============================================================================== 0010b58c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10b58c: 55 push %ebp 10b58d: 89 e5 mov %esp,%ebp 10b58f: 57 push %edi 10b590: 56 push %esi 10b591: 53 push %ebx 10b592: 83 ec 1c sub $0x1c,%esp 10b595: 8b 5d 08 mov 0x8(%ebp),%ebx 10b598: 8b 75 0c mov 0xc(%ebp),%esi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10b59b: 85 db test %ebx,%ebx 10b59d: 74 36 je 10b5d5 <_Thread_queue_Requeue+0x49><== 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 ) { 10b59f: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10b5a3: 75 30 jne 10b5d5 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10b5a5: 9c pushf 10b5a6: fa cli 10b5a7: 5f pop %edi if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10b5a8: f7 46 10 e0 be 03 00 testl $0x3bee0,0x10(%esi) 10b5af: 74 22 je 10b5d3 <_Thread_queue_Requeue+0x47><== NEVER TAKEN { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10b5b1: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 10b5b8: 50 push %eax 10b5b9: 6a 01 push $0x1 10b5bb: 56 push %esi 10b5bc: 53 push %ebx 10b5bd: e8 2e 2d 00 00 call 10e2f0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10b5c2: 83 c4 0c add $0xc,%esp 10b5c5: 8d 45 f0 lea -0x10(%ebp),%eax 10b5c8: 50 push %eax 10b5c9: 56 push %esi 10b5ca: 53 push %ebx 10b5cb: e8 98 fd ff ff call 10b368 <_Thread_queue_Enqueue_priority> 10b5d0: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10b5d3: 57 push %edi 10b5d4: 9d popf } } 10b5d5: 8d 65 f4 lea -0xc(%ebp),%esp 10b5d8: 5b pop %ebx 10b5d9: 5e pop %esi 10b5da: 5f pop %edi 10b5db: c9 leave 10b5dc: c3 ret =============================================================================== 0010b5e0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored ) { 10b5e0: 55 push %ebp 10b5e1: 89 e5 mov %esp,%ebp 10b5e3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10b5e6: 8d 45 fc lea -0x4(%ebp),%eax 10b5e9: 50 push %eax 10b5ea: ff 75 08 pushl 0x8(%ebp) 10b5ed: e8 ba f8 ff ff call 10aeac <_Thread_Get> switch ( location ) { 10b5f2: 83 c4 10 add $0x10,%esp 10b5f5: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 10b5f9: 75 17 jne 10b612 <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10b5fb: 83 ec 0c sub $0xc,%esp 10b5fe: 50 push %eax 10b5ff: e8 ac 2d 00 00 call 10e3b0 <_Thread_queue_Process_timeout> 10b604: a1 98 d7 11 00 mov 0x11d798,%eax 10b609: 48 dec %eax 10b60a: a3 98 d7 11 00 mov %eax,0x11d798 10b60f: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10b612: c9 leave 10b613: c3 ret =============================================================================== 00113240 <_Timer_Server_body>: * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 113240: 55 push %ebp 113241: 89 e5 mov %esp,%ebp 113243: 57 push %edi 113244: 56 push %esi 113245: 53 push %ebx 113246: 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 113249: 8d 75 e8 lea -0x18(%ebp),%esi 11324c: 8d 45 ec lea -0x14(%ebp),%eax 11324f: 89 45 e0 mov %eax,-0x20(%ebp) 113252: 89 45 e8 mov %eax,-0x18(%ebp) 113255: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 11325c: 89 75 f0 mov %esi,-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; 11325f: a1 88 42 13 00 mov 0x134288,%eax 113264: a3 bc 40 13 00 mov %eax,0x1340bc _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 113269: a1 c8 41 13 00 mov 0x1341c8,%eax 11326e: a3 b8 40 13 00 mov %eax,0x1340b8 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 113273: a1 38 41 13 00 mov 0x134138,%eax 113278: 40 inc %eax 113279: a3 38 41 13 00 mov %eax,0x134138 /* * 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(); 11327e: e8 6d ff ff ff call 1131f0 <_Timer_Server_process_insertions> _Thread_Enable_dispatch(); 113283: e8 30 25 00 00 call 1157b8 <_Thread_Enable_dispatch> ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 113288: 89 f7 mov %esi,%edi 11328a: a1 38 41 13 00 mov 0x134138,%eax 11328f: 40 inc %eax 113290: a3 38 41 13 00 mov %eax,0x134138 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 113295: 51 push %ecx 113296: 51 push %ecx 113297: 6a 08 push $0x8 113299: ff 35 bc 4a 13 00 pushl 0x134abc 11329f: e8 30 2e 00 00 call 1160d4 <_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( 1132a4: 8b 15 ac 40 13 00 mov 0x1340ac,%edx _Timer_Server_reset_ticks_timer(); 1132aa: 83 c4 10 add $0x10,%esp 1132ad: 81 fa b0 40 13 00 cmp $0x1340b0,%edx 1132b3: 74 1e je 1132d3 <_Timer_Server_body+0x93> 1132b5: a1 bc 4a 13 00 mov 0x134abc,%eax Heap_Control *the_heap, 1132ba: 8b 52 10 mov 0x10(%edx),%edx 1132bd: 89 50 54 mov %edx,0x54(%eax) void *starting_address, size_t *size 1132c0: 52 push %edx 1132c1: 52 push %edx 1132c2: 83 c0 48 add $0x48,%eax 1132c5: 50 push %eax 1132c6: 68 18 42 13 00 push $0x134218 1132cb: e8 04 36 00 00 call 1168d4 <_Watchdog_Insert> 1132d0: 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( 1132d3: a1 c0 40 13 00 mov 0x1340c0,%eax _Timer_Server_reset_seconds_timer(); 1132d8: 3d c4 40 13 00 cmp $0x1340c4,%eax 1132dd: 74 1c je 1132fb <_Timer_Server_body+0xbb> * @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, 1132df: 8b 40 10 mov 0x10(%eax),%eax 1132e2: a3 e4 40 13 00 mov %eax,0x1340e4 size_t size ); 1132e7: 50 push %eax 1132e8: 50 push %eax 1132e9: 68 d8 40 13 00 push $0x1340d8 1132ee: 68 0c 42 13 00 push $0x13420c 1132f3: e8 dc 35 00 00 call 1168d4 <_Watchdog_Insert> 1132f8: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 1132fb: e8 b8 24 00 00 call 1157b8 <_Thread_Enable_dispatch> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 113300: a1 38 41 13 00 mov 0x134138,%eax 113305: 40 inc %eax 113306: a3 38 41 13 00 mov %eax,0x134138 /* * 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(); 11330b: 83 ec 0c sub $0xc,%esp 11330e: a1 bc 4a 13 00 mov 0x134abc,%eax 113313: 83 c0 48 add $0x48,%eax 113316: 50 push %eax 113317: e8 d0 36 00 00 call 1169ec <_Watchdog_Remove> _Timer_Server_stop_seconds_timer(); 11331c: c7 04 24 d8 40 13 00 movl $0x1340d8,(%esp) 113323: e8 c4 36 00 00 call 1169ec <_Watchdog_Remove> ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 113328: 8b 15 88 42 13 00 mov 0x134288,%edx if ( snapshot >= _Timer_Server_ticks_last_time ) 11332e: a1 bc 40 13 00 mov 0x1340bc,%eax 113333: 83 c4 10 add $0x10,%esp 113336: 39 c2 cmp %eax,%edx 113338: 72 08 jb 113342 <_Timer_Server_body+0x102><== NEVER TAKEN ticks = snapshot - _Timer_Server_ticks_last_time; 11333a: 89 d1 mov %edx,%ecx 11333c: 29 c1 sub %eax,%ecx 11333e: 89 c8 mov %ecx,%eax 113340: eb 04 jmp 113346 <_Timer_Server_body+0x106> else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 113342: f7 d0 not %eax <== NOT EXECUTED 113344: 01 d0 add %edx,%eax <== NOT EXECUTED _Timer_Server_ticks_last_time = snapshot; 113346: 89 15 bc 40 13 00 mov %edx,0x1340bc _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 11334c: 53 push %ebx 11334d: 57 push %edi 11334e: 50 push %eax 11334f: 68 ac 40 13 00 push $0x1340ac 113354: e8 eb 34 00 00 call 116844 <_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; 113359: 8b 1d c8 41 13 00 mov 0x1341c8,%ebx if ( snapshot > _Timer_Server_seconds_last_time ) { 11335f: a1 b8 40 13 00 mov 0x1340b8,%eax 113364: 83 c4 10 add $0x10,%esp 113367: 39 c3 cmp %eax,%ebx 113369: 76 13 jbe 11337e <_Timer_Server_body+0x13e> /* * 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 ); 11336b: 51 push %ecx 11336c: 57 push %edi 11336d: 89 da mov %ebx,%edx 11336f: 29 c2 sub %eax,%edx 113371: 52 push %edx 113372: 68 c0 40 13 00 push $0x1340c0 113377: e8 c8 34 00 00 call 116844 <_Watchdog_Adjust_to_chain> 11337c: eb 12 jmp 113390 <_Timer_Server_body+0x150> } else if ( snapshot < _Timer_Server_seconds_last_time ) { 11337e: 73 13 jae 113393 <_Timer_Server_body+0x153> /* * 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 ); 113380: 52 push %edx 113381: 29 d8 sub %ebx,%eax 113383: 50 push %eax 113384: 6a 01 push $0x1 113386: 68 c0 40 13 00 push $0x1340c0 11338b: e8 48 34 00 00 call 1167d8 <_Watchdog_Adjust> 113390: 83 c4 10 add $0x10,%esp } _Timer_Server_seconds_last_time = snapshot; 113393: 89 1d b8 40 13 00 mov %ebx,0x1340b8 _Timer_Server_process_seconds_chain( &to_fire ); /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 113399: e8 52 fe ff ff call 1131f0 <_Timer_Server_process_insertions> /* * Enable dispatching to process the set that are ready "to fire." */ _Thread_Enable_dispatch(); 11339e: e8 15 24 00 00 call 1157b8 <_Thread_Enable_dispatch> */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 1133a3: 9c pushf 1133a4: fa cli 1133a5: 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( 1133a6: 8b 55 e8 mov -0x18(%ebp),%edx 1133a9: 3b 55 e0 cmp -0x20(%ebp),%edx 1133ac: 74 0c je 1133ba <_Timer_Server_body+0x17a> 1133ae: 8b 02 mov (%edx),%eax 1133b0: 89 45 e8 mov %eax,-0x18(%ebp) 1133b3: 89 70 04 mov %esi,0x4(%eax) watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire ); if ( watch == NULL ) { 1133b6: 85 d2 test %edx,%edx 1133b8: 75 07 jne 1133c1 <_Timer_Server_body+0x181><== ALWAYS TAKEN _ISR_Enable( level ); 1133ba: 51 push %ecx 1133bb: 9d popf 1133bc: e9 c9 fe ff ff jmp 11328a <_Timer_Server_body+0x4a> break; } watch->state = WATCHDOG_INACTIVE; 1133c1: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) _ISR_Enable( level ); 1133c8: 51 push %ecx 1133c9: 9d popf (*watch->routine)( watch->id, watch->user_data ); 1133ca: 53 push %ebx 1133cb: 53 push %ebx 1133cc: ff 72 24 pushl 0x24(%edx) 1133cf: ff 72 20 pushl 0x20(%edx) 1133d2: ff 52 1c call *0x1c(%edx) 1133d5: 83 c4 10 add $0x10,%esp 1133d8: eb c9 jmp 1133a3 <_Timer_Server_body+0x163> =============================================================================== 001131f0 <_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) { 1131f0: 55 push %ebp 1131f1: 89 e5 mov %esp,%ebp 1131f3: 83 ec 08 sub $0x8,%esp Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 1131f6: 83 ec 0c sub $0xc,%esp 1131f9: 68 cc 40 13 00 push $0x1340cc 1131fe: e8 a5 08 00 00 call 113aa8 <_Chain_Get> if ( the_timer == NULL ) 113203: 83 c4 10 add $0x10,%esp 113206: 85 c0 test %eax,%eax 113208: 74 34 je 11323e <_Timer_Server_process_insertions+0x4e> break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11320a: 8b 50 38 mov 0x38(%eax),%edx 11320d: 83 fa 01 cmp $0x1,%edx 113210: 75 0d jne 11321f <_Timer_Server_process_insertions+0x2f> _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 113212: 51 push %ecx 113213: 51 push %ecx 113214: 83 c0 10 add $0x10,%eax 113217: 50 push %eax 113218: 68 ac 40 13 00 push $0x1340ac 11321d: eb 10 jmp 11322f <_Timer_Server_process_insertions+0x3f> } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 11321f: 83 fa 03 cmp $0x3,%edx 113222: 75 13 jne 113237 <_Timer_Server_process_insertions+0x47><== NEVER TAKEN _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 113224: 52 push %edx 113225: 52 push %edx 113226: 83 c0 10 add $0x10,%eax 113229: 50 push %eax 11322a: 68 c0 40 13 00 push $0x1340c0 11322f: e8 a0 36 00 00 call 1168d4 <_Watchdog_Insert> 113234: 83 c4 10 add $0x10,%esp } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 113237: e8 b4 ff ff ff call 1131f0 <_Timer_Server_process_insertions> 11323c: eb b8 jmp 1131f6 <_Timer_Server_process_insertions+0x6> } } 11323e: c9 leave 11323f: c3 ret =============================================================================== 0010cf04 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10cf04: 55 push %ebp 10cf05: 89 e5 mov %esp,%ebp 10cf07: 57 push %edi 10cf08: 56 push %esi 10cf09: 53 push %ebx 10cf0a: 83 ec 1c sub $0x1c,%esp 10cf0d: 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; 10cf10: 8b 18 mov (%eax),%ebx left += lhs->tv_nsec; 10cf12: 8b 40 04 mov 0x4(%eax),%eax 10cf15: 89 45 e4 mov %eax,-0x1c(%ebp) right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10cf18: b8 00 ca 9a 3b mov $0x3b9aca00,%eax 10cf1d: 8b 4d 0c mov 0xc(%ebp),%ecx 10cf20: f7 29 imull (%ecx) 10cf22: 89 c6 mov %eax,%esi 10cf24: 89 d7 mov %edx,%edi right += rhs->tv_nsec; 10cf26: 8b 41 04 mov 0x4(%ecx),%eax 10cf29: 99 cltd 10cf2a: 01 c6 add %eax,%esi 10cf2c: 11 d7 adc %edx,%edi if ( right == 0 ) { 10cf2e: 89 f8 mov %edi,%eax 10cf30: 09 f0 or %esi,%eax 10cf32: 75 14 jne 10cf48 <_Timespec_Divide+0x44> <== ALWAYS TAKEN *ival_percentage = 0; 10cf34: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10cf37: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED *fval_percentage = 0; 10cf3d: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 10cf40: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED 10cf46: eb 70 jmp 10cfb8 <_Timespec_Divide+0xb4> <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10cf48: b8 00 ca 9a 3b mov $0x3b9aca00,%eax 10cf4d: f7 eb imul %ebx 10cf4f: 89 45 e8 mov %eax,-0x18(%ebp) 10cf52: 89 55 ec mov %edx,-0x14(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10cf55: 8b 45 e4 mov -0x1c(%ebp),%eax 10cf58: 99 cltd 10cf59: 01 45 e8 add %eax,-0x18(%ebp) 10cf5c: 11 55 ec adc %edx,-0x14(%ebp) 10cf5f: 69 5d ec a0 86 01 00 imul $0x186a0,-0x14(%ebp),%ebx 10cf66: b9 a0 86 01 00 mov $0x186a0,%ecx 10cf6b: 8b 45 e8 mov -0x18(%ebp),%eax 10cf6e: f7 e1 mul %ecx 10cf70: 89 45 d8 mov %eax,-0x28(%ebp) 10cf73: 01 da add %ebx,%edx 10cf75: 89 55 dc mov %edx,-0x24(%ebp) 10cf78: 57 push %edi 10cf79: 56 push %esi 10cf7a: ff 75 dc pushl -0x24(%ebp) 10cf7d: ff 75 d8 pushl -0x28(%ebp) 10cf80: e8 33 ae 00 00 call 117db8 <__udivdi3> 10cf85: 83 c4 10 add $0x10,%esp 10cf88: 89 c3 mov %eax,%ebx 10cf8a: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10cf8c: 6a 00 push $0x0 10cf8e: 68 e8 03 00 00 push $0x3e8 10cf93: 52 push %edx 10cf94: 50 push %eax 10cf95: e8 1e ae 00 00 call 117db8 <__udivdi3> 10cf9a: 83 c4 10 add $0x10,%esp 10cf9d: 8b 4d 10 mov 0x10(%ebp),%ecx 10cfa0: 89 01 mov %eax,(%ecx) *fval_percentage = answer % 1000; 10cfa2: 6a 00 push $0x0 10cfa4: 68 e8 03 00 00 push $0x3e8 10cfa9: 56 push %esi 10cfaa: 53 push %ebx 10cfab: e8 14 af 00 00 call 117ec4 <__umoddi3> 10cfb0: 83 c4 10 add $0x10,%esp 10cfb3: 8b 4d 14 mov 0x14(%ebp),%ecx 10cfb6: 89 01 mov %eax,(%ecx) } 10cfb8: 8d 65 f4 lea -0xc(%ebp),%esp 10cfbb: 5b pop %ebx 10cfbc: 5e pop %esi 10cfbd: 5f pop %edi 10cfbe: c9 leave 10cfbf: c3 ret =============================================================================== 0010d510 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10d510: 55 push %ebp 10d511: 89 e5 mov %esp,%ebp 10d513: 53 push %ebx 10d514: 83 ec 10 sub $0x10,%esp 10d517: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10d51a: 53 push %ebx 10d51b: e8 6c 23 00 00 call 10f88c <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10d520: 83 c4 10 add $0x10,%esp 10d523: 83 7b 24 00 cmpl $0x0,0x24(%ebx) 10d527: 74 0f je 10d538 <_User_extensions_Remove_set+0x28><== ALWAYS TAKEN _Chain_Extract( &the_extension->Switch.Node ); 10d529: 8d 43 08 lea 0x8(%ebx),%eax <== NOT EXECUTED 10d52c: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10d52f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d532: 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 ); 10d533: e9 54 23 00 00 jmp 10f88c <_Chain_Extract> <== NOT EXECUTED } 10d538: 8b 5d fc mov -0x4(%ebp),%ebx 10d53b: c9 leave 10d53c: c3 ret =============================================================================== 0010d260 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 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 4d 0c mov 0xc(%ebp),%ecx 10d26f: 8b 75 10 mov 0x10(%ebp),%esi ISR_Level level; _ISR_Disable( level ); 10d272: 9c pushf 10d273: fa cli 10d274: 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( 10d275: 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 10d277: 8d 5f 04 lea 0x4(%edi),%ebx 10d27a: 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 ) ) { 10d27d: 39 d8 cmp %ebx,%eax 10d27f: 74 41 je 10d2c2 <_Watchdog_Adjust+0x62> switch ( direction ) { 10d281: 85 c9 test %ecx,%ecx 10d283: 74 39 je 10d2be <_Watchdog_Adjust+0x5e> 10d285: 49 dec %ecx 10d286: 75 3a jne 10d2c2 <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10d288: 01 70 10 add %esi,0x10(%eax) 10d28b: eb 35 jmp 10d2c2 <_Watchdog_Adjust+0x62> 10d28d: 8b 07 mov (%edi),%eax break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10d28f: 8b 58 10 mov 0x10(%eax),%ebx 10d292: 39 de cmp %ebx,%esi 10d294: 73 07 jae 10d29d <_Watchdog_Adjust+0x3d> _Watchdog_First( header )->delta_interval -= units; 10d296: 29 f3 sub %esi,%ebx 10d298: 89 58 10 mov %ebx,0x10(%eax) 10d29b: eb 25 jmp 10d2c2 <_Watchdog_Adjust+0x62> break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10d29d: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax) _ISR_Enable( level ); 10d2a4: 52 push %edx 10d2a5: 9d popf _Watchdog_Tickle( header ); 10d2a6: 83 ec 0c sub $0xc,%esp 10d2a9: 57 push %edi 10d2aa: e8 9d 01 00 00 call 10d44c <_Watchdog_Tickle> _ISR_Disable( level ); 10d2af: 9c pushf 10d2b0: fa cli 10d2b1: 5a pop %edx if ( _Chain_Is_empty( header ) ) 10d2b2: 83 c4 10 add $0x10,%esp 10d2b5: 8b 45 f0 mov -0x10(%ebp),%eax 10d2b8: 39 07 cmp %eax,(%edi) 10d2ba: 74 06 je 10d2c2 <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10d2bc: 29 de sub %ebx,%esi switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10d2be: 85 f6 test %esi,%esi 10d2c0: 75 cb jne 10d28d <_Watchdog_Adjust+0x2d> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10d2c2: 52 push %edx 10d2c3: 9d popf } 10d2c4: 8d 65 f4 lea -0xc(%ebp),%esp 10d2c7: 5b pop %ebx 10d2c8: 5e pop %esi 10d2c9: 5f pop %edi 10d2ca: c9 leave 10d2cb: c3 ret =============================================================================== 00116844 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 116844: 55 push %ebp 116845: 89 e5 mov %esp,%ebp 116847: 57 push %edi 116848: 56 push %esi 116849: 53 push %ebx 11684a: 83 ec 0c sub $0xc,%esp 11684d: 8b 75 08 mov 0x8(%ebp),%esi 116850: 8b 45 0c mov 0xc(%ebp),%eax Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 116853: 85 c0 test %eax,%eax 116855: 74 74 je 1168cb <_Watchdog_Adjust_to_chain+0x87> return; } _ISR_Disable( level ); 116857: 9c pushf 116858: fa cli 116859: 8f 45 ec popl -0x14(%ebp) * @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 11685c: 8d 7e 04 lea 0x4(%esi),%edi if ( !_Chain_Is_empty( header ) ) { 11685f: 39 3e cmp %edi,(%esi) 116861: 74 64 je 1168c7 <_Watchdog_Adjust_to_chain+0x83> 116863: 8b 55 10 mov 0x10(%ebp),%edx 116866: 83 c2 04 add $0x4,%edx 116869: 89 55 f0 mov %edx,-0x10(%ebp) 11686c: 89 c3 mov %eax,%ebx 11686e: 8b 06 mov (%esi),%eax while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 116870: 8b 48 10 mov 0x10(%eax),%ecx 116873: 39 cb cmp %ecx,%ebx 116875: 73 07 jae 11687e <_Watchdog_Adjust_to_chain+0x3a> _Watchdog_First( header )->delta_interval -= units; 116877: 29 d9 sub %ebx,%ecx 116879: 89 48 10 mov %ecx,0x10(%eax) 11687c: eb 49 jmp 1168c7 <_Watchdog_Adjust_to_chain+0x83> break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 11687e: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) * 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( 116885: 8b 16 mov (%esi),%edx 116887: 39 fa cmp %edi,%edx 116889: 75 04 jne 11688f <_Watchdog_Adjust_to_chain+0x4b><== ALWAYS TAKEN 11688b: 31 d2 xor %edx,%edx <== NOT EXECUTED 11688d: eb 07 jmp 116896 <_Watchdog_Adjust_to_chain+0x52><== NOT EXECUTED 11688f: 8b 02 mov (%edx),%eax 116891: 89 06 mov %eax,(%esi) 116893: 89 70 04 mov %esi,0x4(%eax) 116896: 8b 45 f0 mov -0x10(%ebp),%eax 116899: 89 02 mov %eax,(%edx) 11689b: 8b 45 10 mov 0x10(%ebp),%eax 11689e: 8b 40 08 mov 0x8(%eax),%eax 1168a1: 89 45 e8 mov %eax,-0x18(%ebp) 1168a4: 8b 45 10 mov 0x10(%ebp),%eax 1168a7: 89 50 08 mov %edx,0x8(%eax) 1168aa: 8b 45 e8 mov -0x18(%ebp),%eax 1168ad: 89 10 mov %edx,(%eax) 1168af: 89 42 04 mov %eax,0x4(%edx) do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 1168b2: ff 75 ec pushl -0x14(%ebp) 1168b5: 9d popf 1168b6: 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( 1168b7: 8b 06 mov (%esi),%eax } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 1168b9: 39 f8 cmp %edi,%eax 1168bb: 74 0a je 1168c7 <_Watchdog_Adjust_to_chain+0x83> 1168bd: 83 78 10 00 cmpl $0x0,0x10(%eax) 1168c1: 74 c2 je 116885 <_Watchdog_Adjust_to_chain+0x41> return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 1168c3: 29 cb sub %ecx,%ebx 1168c5: 75 a7 jne 11686e <_Watchdog_Adjust_to_chain+0x2a><== NEVER TAKEN break; } } } _ISR_Enable( level ); 1168c7: ff 75 ec pushl -0x14(%ebp) 1168ca: 9d popf } 1168cb: 83 c4 0c add $0xc,%esp 1168ce: 5b pop %ebx 1168cf: 5e pop %esi 1168d0: 5f pop %edi 1168d1: c9 leave 1168d2: c3 ret =============================================================================== 0010bc28 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10bc28: 55 push %ebp 10bc29: 89 e5 mov %esp,%ebp 10bc2b: 57 push %edi 10bc2c: 56 push %esi 10bc2d: 53 push %ebx 10bc2e: 83 ec 04 sub $0x4,%esp 10bc31: 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; 10bc34: 8b 3d 34 d8 11 00 mov 0x11d834,%edi _ISR_Disable( level ); 10bc3a: 9c pushf 10bc3b: fa cli 10bc3c: 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 ) { 10bc3f: 83 7e 08 00 cmpl $0x0,0x8(%esi) 10bc43: 74 09 je 10bc4e <_Watchdog_Insert+0x26> <== ALWAYS TAKEN _ISR_Enable( level ); 10bc45: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10bc48: 9d popf <== NOT EXECUTED 10bc49: e9 89 00 00 00 jmp 10bcd7 <_Watchdog_Insert+0xaf> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10bc4e: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi) _Watchdog_Sync_count++; 10bc55: a1 e4 d8 11 00 mov 0x11d8e4,%eax 10bc5a: 40 inc %eax 10bc5b: a3 e4 d8 11 00 mov %eax,0x11d8e4 restart: delta_interval = the_watchdog->initial; 10bc60: 8b 4e 0c mov 0xc(%esi),%ecx * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10bc63: 8b 45 08 mov 0x8(%ebp),%eax 10bc66: 8b 18 mov (%eax),%ebx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10bc68: 85 c9 test %ecx,%ecx 10bc6a: 74 35 je 10bca1 <_Watchdog_Insert+0x79> 10bc6c: 83 3b 00 cmpl $0x0,(%ebx) 10bc6f: 74 30 je 10bca1 <_Watchdog_Insert+0x79> break; if ( delta_interval < after->delta_interval ) { 10bc71: 8b 53 10 mov 0x10(%ebx),%edx 10bc74: 39 d1 cmp %edx,%ecx 10bc76: 73 07 jae 10bc7f <_Watchdog_Insert+0x57> after->delta_interval -= delta_interval; 10bc78: 29 ca sub %ecx,%edx 10bc7a: 89 53 10 mov %edx,0x10(%ebx) 10bc7d: eb 22 jmp 10bca1 <_Watchdog_Insert+0x79> * 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 ); 10bc7f: ff 75 f0 pushl -0x10(%ebp) 10bc82: 9d popf 10bc83: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10bc84: 83 7e 08 01 cmpl $0x1,0x8(%esi) 10bc88: 75 38 jne 10bcc2 <_Watchdog_Insert+0x9a> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10bc8a: a1 54 d8 11 00 mov 0x11d854,%eax 10bc8f: 39 f8 cmp %edi,%eax 10bc91: 76 08 jbe 10bc9b <_Watchdog_Insert+0x73> _Watchdog_Sync_level = insert_isr_nest_level; 10bc93: 89 3d 54 d8 11 00 mov %edi,0x11d854 10bc99: eb c5 jmp 10bc60 <_Watchdog_Insert+0x38> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10bc9b: 29 d1 sub %edx,%ecx ); #ifdef __cplusplus } #endif 10bc9d: 8b 1b mov (%ebx),%ebx 10bc9f: eb c7 jmp 10bc68 <_Watchdog_Insert+0x40> * @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( 10bca1: c7 46 08 02 00 00 00 movl $0x2,0x8(%esi) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10bca8: 89 4e 10 mov %ecx,0x10(%esi) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10bcab: 8b 43 04 mov 0x4(%ebx),%eax 10bcae: 89 46 04 mov %eax,0x4(%esi) 10bcb1: 8b 10 mov (%eax),%edx 10bcb3: 89 30 mov %esi,(%eax) 10bcb5: 89 16 mov %edx,(%esi) 10bcb7: 89 72 04 mov %esi,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10bcba: a1 e8 d8 11 00 mov 0x11d8e8,%eax 10bcbf: 89 46 14 mov %eax,0x14(%esi) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10bcc2: 89 3d 54 d8 11 00 mov %edi,0x11d854 _Watchdog_Sync_count--; 10bcc8: a1 e4 d8 11 00 mov 0x11d8e4,%eax 10bccd: 48 dec %eax 10bcce: a3 e4 d8 11 00 mov %eax,0x11d8e4 _ISR_Enable( level ); 10bcd3: ff 75 f0 pushl -0x10(%ebp) 10bcd6: 9d popf } 10bcd7: 58 pop %eax 10bcd8: 5b pop %ebx 10bcd9: 5e pop %esi 10bcda: 5f pop %edi 10bcdb: c9 leave 10bcdc: c3 ret =============================================================================== 0010bd40 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10bd40: 55 push %ebp 10bd41: 89 e5 mov %esp,%ebp 10bd43: 56 push %esi 10bd44: 53 push %ebx 10bd45: 8b 4d 08 mov 0x8(%ebp),%ecx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10bd48: 9c pushf 10bd49: fa cli 10bd4a: 5e pop %esi previous_state = the_watchdog->state; 10bd4b: 8b 59 08 mov 0x8(%ecx),%ebx switch ( previous_state ) { 10bd4e: 83 fb 01 cmp $0x1,%ebx 10bd51: 74 09 je 10bd5c <_Watchdog_Remove+0x1c> <== NEVER TAKEN 10bd53: 72 41 jb 10bd96 <_Watchdog_Remove+0x56> 10bd55: 83 fb 03 cmp $0x3,%ebx 10bd58: 77 3c ja 10bd96 <_Watchdog_Remove+0x56> <== NEVER TAKEN 10bd5a: eb 09 jmp 10bd65 <_Watchdog_Remove+0x25> /* * 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; 10bd5c: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) <== NOT EXECUTED 10bd63: eb 31 jmp 10bd96 <_Watchdog_Remove+0x56> <== NOT EXECUTED break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10bd65: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) ); #ifdef __cplusplus } #endif 10bd6c: 8b 11 mov (%ecx),%edx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10bd6e: 83 3a 00 cmpl $0x0,(%edx) 10bd71: 74 06 je 10bd79 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10bd73: 8b 41 10 mov 0x10(%ecx),%eax 10bd76: 01 42 10 add %eax,0x10(%edx) if ( _Watchdog_Sync_count ) 10bd79: a1 e4 d8 11 00 mov 0x11d8e4,%eax 10bd7e: 85 c0 test %eax,%eax 10bd80: 74 0a je 10bd8c <_Watchdog_Remove+0x4c> <== ALWAYS TAKEN _Watchdog_Sync_level = _ISR_Nest_level; 10bd82: a1 34 d8 11 00 mov 0x11d834,%eax <== NOT EXECUTED 10bd87: a3 54 d8 11 00 mov %eax,0x11d854 <== NOT EXECUTED 10bd8c: 8b 11 mov (%ecx),%edx 10bd8e: 8b 41 04 mov 0x4(%ecx),%eax 10bd91: 89 42 04 mov %eax,0x4(%edx) 10bd94: 89 10 mov %edx,(%eax) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10bd96: a1 e8 d8 11 00 mov 0x11d8e8,%eax 10bd9b: 89 41 18 mov %eax,0x18(%ecx) _ISR_Enable( level ); 10bd9e: 56 push %esi 10bd9f: 9d popf return( previous_state ); } 10bda0: 89 d8 mov %ebx,%eax 10bda2: 5b pop %ebx 10bda3: 5e pop %esi 10bda4: c9 leave 10bda5: c3 ret =============================================================================== 0010bda8 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10bda8: 55 push %ebp 10bda9: 89 e5 mov %esp,%ebp 10bdab: 57 push %edi 10bdac: 56 push %esi 10bdad: 53 push %ebx 10bdae: 83 ec 0c sub $0xc,%esp 10bdb1: 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 ); 10bdb4: 9c pushf 10bdb5: fa cli 10bdb6: 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( 10bdb7: 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 10bdb9: 8d 47 04 lea 0x4(%edi),%eax 10bdbc: 89 45 f0 mov %eax,-0x10(%ebp) if ( _Chain_Is_empty( header ) ) 10bdbf: 39 c2 cmp %eax,%edx 10bdc1: 74 44 je 10be07 <_Watchdog_Tickle+0x5f> 10bdc3: 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) { 10bdc5: 8b 42 10 mov 0x10(%edx),%eax 10bdc8: 85 c0 test %eax,%eax 10bdca: 74 08 je 10bdd4 <_Watchdog_Tickle+0x2c> <== NEVER TAKEN the_watchdog->delta_interval--; 10bdcc: 48 dec %eax 10bdcd: 89 42 10 mov %eax,0x10(%edx) if ( the_watchdog->delta_interval != 0 ) 10bdd0: 85 c0 test %eax,%eax 10bdd2: 75 33 jne 10be07 <_Watchdog_Tickle+0x5f> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10bdd4: 83 ec 0c sub $0xc,%esp 10bdd7: 53 push %ebx 10bdd8: e8 63 ff ff ff call 10bd40 <_Watchdog_Remove> _ISR_Enable( level ); 10bddd: 56 push %esi 10bdde: 9d popf switch( watchdog_state ) { 10bddf: 83 c4 10 add $0x10,%esp 10bde2: 83 f8 02 cmp $0x2,%eax 10bde5: 75 0e jne 10bdf5 <_Watchdog_Tickle+0x4d> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10bde7: 50 push %eax 10bde8: 50 push %eax 10bde9: ff 73 24 pushl 0x24(%ebx) 10bdec: ff 73 20 pushl 0x20(%ebx) 10bdef: ff 53 1c call *0x1c(%ebx) 10bdf2: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10bdf5: 9c pushf 10bdf6: fa cli 10bdf7: 5e pop %esi 10bdf8: 8b 07 mov (%edi),%eax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10bdfa: 3b 45 f0 cmp -0x10(%ebp),%eax 10bdfd: 74 08 je 10be07 <_Watchdog_Tickle+0x5f> 10bdff: 89 c3 mov %eax,%ebx 10be01: 83 78 10 00 cmpl $0x0,0x10(%eax) 10be05: eb cb jmp 10bdd2 <_Watchdog_Tickle+0x2a> leave: _ISR_Enable(level); 10be07: 56 push %esi 10be08: 9d popf } 10be09: 8d 65 f4 lea -0xc(%ebp),%esp 10be0c: 5b pop %ebx 10be0d: 5e pop %esi 10be0e: 5f pop %edi 10be0f: c9 leave 10be10: c3 ret =============================================================================== 0010be66 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 10be66: 55 push %ebp 10be67: 89 e5 mov %esp,%ebp 10be69: 57 push %edi 10be6a: 83 ec 14 sub $0x14,%esp 10be6d: 8b 55 08 mov 0x8(%ebp),%edx uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 10be70: 85 d2 test %edx,%edx 10be72: 74 05 je 10be79 <_Workspace_Handler_initialization+0x13> 10be74: f6 c2 03 test $0x3,%dl 10be77: 74 05 je 10be7e <_Workspace_Handler_initialization+0x18><== ALWAYS TAKEN _Internal_error_Occurred( 10be79: 51 push %ecx 10be7a: 6a 02 push $0x2 10be7c: eb 2e jmp 10beac <_Workspace_Handler_initialization+0x46> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 10be7e: a1 30 d8 11 00 mov 0x11d830,%eax 10be83: 80 78 28 00 cmpb $0x0,0x28(%eax) 10be87: 74 09 je 10be92 <_Workspace_Handler_initialization+0x2c><== ALWAYS TAKEN memset( starting_address, 0, size ); 10be89: 31 c0 xor %eax,%eax 10be8b: 89 d7 mov %edx,%edi <== NOT EXECUTED 10be8d: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10be90: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED memory_available = _Heap_Initialize( 10be92: 6a 04 push $0x4 10be94: ff 75 0c pushl 0xc(%ebp) 10be97: 52 push %edx 10be98: 68 bc d7 11 00 push $0x11d7bc 10be9d: e8 8a e1 ff ff call 10a02c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10bea2: 83 c4 10 add $0x10,%esp 10bea5: 85 c0 test %eax,%eax 10bea7: 75 0c jne 10beb5 <_Workspace_Handler_initialization+0x4f><== ALWAYS TAKEN _Internal_error_Occurred( 10bea9: 52 push %edx <== NOT EXECUTED 10beaa: 6a 03 push $0x3 <== NOT EXECUTED 10beac: 6a 01 push $0x1 10beae: 6a 00 push $0x0 10beb0: e8 3f e3 ff ff call 10a1f4 <_Internal_error_Occurred> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10beb5: 8b 7d fc mov -0x4(%ebp),%edi 10beb8: c9 leave 10beb9: c3 ret =============================================================================== 00108dc4 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 108dc4: 55 push %ebp 108dc5: 89 e5 mov %esp,%ebp 108dc7: 57 push %edi 108dc8: 56 push %esi 108dc9: 53 push %ebx 108dca: 83 ec 1c sub $0x1c,%esp 108dcd: 8b 5d 08 mov 0x8(%ebp),%ebx 108dd0: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 108dd3: 85 db test %ebx,%ebx 108dd5: 74 09 je 108de0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 108dd7: 81 7b 04 3f 42 0f 00 cmpl $0xf423f,0x4(%ebx) 108dde: 76 13 jbe 108df3 rtems_set_errno_and_return_minus_one( EINVAL ); 108de0: e8 47 6a 00 00 call 10f82c <__errno> 108de5: c7 00 16 00 00 00 movl $0x16,(%eax) 108deb: 83 c8 ff or $0xffffffff,%eax 108dee: e9 9e 00 00 00 jmp 108e91 if ( olddelta ) { 108df3: 85 f6 test %esi,%esi 108df5: 74 0d je 108e04 olddelta->tv_sec = 0; 108df7: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 108dfd: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 108e04: 69 03 40 42 0f 00 imul $0xf4240,(%ebx),%eax adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < _TOD_Microseconds_per_tick ) 108e0a: 03 43 04 add 0x4(%ebx),%eax 108e0d: 3b 05 74 e7 11 00 cmp 0x11e774,%eax 108e13: 72 7a jb 108e8f /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 108e15: a1 d8 e5 11 00 mov 0x11e5d8,%eax 108e1a: 40 inc %eax 108e1b: a3 d8 e5 11 00 mov %eax,0x11e5d8 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 108e20: 83 ec 0c sub $0xc,%esp 108e23: 8d 45 ec lea -0x14(%ebp),%eax 108e26: 50 push %eax 108e27: e8 30 17 00 00 call 10a55c <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 108e2c: 69 7b 04 e8 03 00 00 imul $0x3e8,0x4(%ebx),%edi 108e33: 03 7d f0 add -0x10(%ebp),%edi int adjtime( struct timeval *delta, struct timeval *olddelta ) { 108e36: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 108e3b: 89 f8 mov %edi,%eax 108e3d: 31 d2 xor %edx,%edx 108e3f: f7 f1 div %ecx 108e41: 89 45 dc mov %eax,-0x24(%ebp) 108e44: 89 c1 mov %eax,%ecx 108e46: 03 0b add (%ebx),%ecx 108e48: 03 4d ec add -0x14(%ebp),%ecx 108e4b: 69 c0 00 36 65 c4 imul $0xc4653600,%eax,%eax 108e51: 01 f8 add %edi,%eax 108e53: 83 c4 10 add $0x10,%esp 108e56: eb 05 jmp 108e5d 108e58: 05 00 ca 9a 3b add $0x3b9aca00,%eax 108e5d: 89 ca mov %ecx,%edx 108e5f: 49 dec %ecx 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) ) { 108e60: 3d 00 36 65 c4 cmp $0xc4653600,%eax 108e65: 76 f1 jbe 108e58 108e67: 89 55 ec mov %edx,-0x14(%ebp) 108e6a: 89 45 f0 mov %eax,-0x10(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 108e6d: 83 ec 0c sub $0xc,%esp 108e70: 8d 45 ec lea -0x14(%ebp),%eax 108e73: 50 push %eax 108e74: e8 73 17 00 00 call 10a5ec <_TOD_Set> _Thread_Enable_dispatch(); 108e79: e8 8a 26 00 00 call 10b508 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 108e7e: 83 c4 10 add $0x10,%esp 108e81: 85 f6 test %esi,%esi 108e83: 74 0a je 108e8f <== NEVER TAKEN *olddelta = *delta; 108e85: 8b 13 mov (%ebx),%edx 108e87: 8b 43 04 mov 0x4(%ebx),%eax 108e8a: 89 46 04 mov %eax,0x4(%esi) 108e8d: 89 16 mov %edx,(%esi) 108e8f: 31 c0 xor %eax,%eax return 0; } 108e91: 8d 65 f4 lea -0xc(%ebp),%esp 108e94: 5b pop %ebx 108e95: 5e pop %esi 108e96: 5f pop %edi 108e97: c9 leave 108e98: c3 ret =============================================================================== 0010a708 : } unsigned int alarm( unsigned int seconds ) { 10a708: 55 push %ebp 10a709: 89 e5 mov %esp,%ebp 10a70b: 53 push %ebx 10a70c: 83 ec 14 sub $0x14,%esp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10a70f: 83 3d 04 29 12 00 00 cmpl $0x0,0x122904 10a716: 75 2c jne 10a744 * 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. * 10a718: c7 05 f0 28 12 00 00 movl $0x0,0x1228f0 10a71f: 00 00 00 * @param[in] the_heap is the heap to operate upon 10a722: c7 05 04 29 12 00 a7 movl $0x10a7a7,0x122904 10a729: a7 10 00 * @param[in] starting_address is the starting address of the memory for 10a72c: c7 05 08 29 12 00 00 movl $0x0,0x122908 10a733: 00 00 00 * the heap 10a736: c7 05 0c 29 12 00 00 movl $0x0,0x12290c 10a73d: 00 00 00 10a740: 31 db xor %ebx,%ebx 10a742: eb 43 jmp 10a787 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 10a744: 83 ec 0c sub $0xc,%esp 10a747: 68 e8 28 12 00 push $0x1228e8 10a74c: e8 e3 41 00 00 call 10e934 <_Watchdog_Remove> 10a751: 83 c4 10 add $0x10,%esp 10a754: 83 e8 02 sub $0x2,%eax 10a757: 31 db xor %ebx,%ebx 10a759: 83 f8 01 cmp $0x1,%eax 10a75c: 77 29 ja 10a787 <== 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 - 10a75e: 8b 0d 00 29 12 00 mov 0x122900,%ecx 10a764: 2b 0d fc 28 12 00 sub 0x1228fc,%ecx 10a76a: b8 40 42 0f 00 mov $0xf4240,%eax 10a76f: 31 d2 xor %edx,%edx 10a771: f7 35 64 2b 12 00 divl 0x122b64 10a777: 89 c3 mov %eax,%ebx 10a779: 89 c8 mov %ecx,%eax 10a77b: 31 d2 xor %edx,%edx 10a77d: f7 f3 div %ebx 10a77f: 8b 1d f4 28 12 00 mov 0x1228f4,%ebx 10a785: 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, 10a787: 8b 45 08 mov 0x8(%ebp),%eax 10a78a: a3 f4 28 12 00 mov %eax,0x1228f4 size_t size ); 10a78f: 50 push %eax 10a790: 50 push %eax 10a791: 68 e8 28 12 00 push $0x1228e8 10a796: 68 9c 2a 12 00 push $0x122a9c 10a79b: e8 7c 40 00 00 call 10e81c <_Watchdog_Insert> } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 10a7a0: 89 d8 mov %ebx,%eax 10a7a2: 8b 5d fc mov -0x4(%ebp),%ebx 10a7a5: c9 leave 10a7a6: c3 ret =============================================================================== 0010985c : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10985c: 55 push %ebp 10985d: 89 e5 mov %esp,%ebp 10985f: 83 ec 08 sub $0x8,%esp 109862: 8b 45 08 mov 0x8(%ebp),%eax 109865: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 109868: 85 d2 test %edx,%edx 10986a: 74 3c je 1098a8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) 10986c: 83 f8 01 cmp $0x1,%eax 10986f: 75 0b jne 10987c _TOD_Get(tp); 109871: 83 ec 0c sub $0xc,%esp 109874: 52 push %edx 109875: e8 06 20 00 00 call 10b880 <_TOD_Get> 10987a: eb 13 jmp 10988f #ifdef CLOCK_MONOTONIC else if ( clock_id == CLOCK_MONOTONIC ) 10987c: 83 f8 04 cmp $0x4,%eax 10987f: 74 05 je 109886 <== NEVER TAKEN _TOD_Get_uptime(tp); #endif #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 109881: 83 f8 02 cmp $0x2,%eax 109884: 75 10 jne 109896 _TOD_Get_uptime(tp); 109886: 83 ec 0c sub $0xc,%esp 109889: 52 push %edx 10988a: e8 45 20 00 00 call 10b8d4 <_TOD_Get_uptime> 10988f: 31 c0 xor %eax,%eax 109891: 83 c4 10 add $0x10,%esp 109894: eb 20 jmp 1098b6 #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 109896: 83 f8 03 cmp $0x3,%eax 109899: 75 0d jne 1098a8 rtems_set_errno_and_return_minus_one( ENOSYS ); 10989b: e8 60 6f 00 00 call 110800 <__errno> 1098a0: c7 00 58 00 00 00 movl $0x58,(%eax) 1098a6: eb 0b jmp 1098b3 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 1098a8: e8 53 6f 00 00 call 110800 <__errno> 1098ad: c7 00 16 00 00 00 movl $0x16,(%eax) 1098b3: 83 c8 ff or $0xffffffff,%eax return 0; } 1098b6: c9 leave 1098b7: c3 ret =============================================================================== 001098b8 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 1098b8: 55 push %ebp 1098b9: 89 e5 mov %esp,%ebp 1098bb: 83 ec 08 sub $0x8,%esp 1098be: 8b 45 08 mov 0x8(%ebp),%eax 1098c1: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 1098c4: 85 d2 test %edx,%edx 1098c6: 74 44 je 10990c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 1098c8: 83 f8 01 cmp $0x1,%eax 1098cb: 75 28 jne 1098f5 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 1098cd: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 1098d3: 76 37 jbe 10990c /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 1098d5: a1 f0 10 12 00 mov 0x1210f0,%eax 1098da: 40 inc %eax 1098db: a3 f0 10 12 00 mov %eax,0x1210f0 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 1098e0: 83 ec 0c sub $0xc,%esp 1098e3: 52 push %edx 1098e4: e8 7b 20 00 00 call 10b964 <_TOD_Set> _Thread_Enable_dispatch(); 1098e9: e8 92 2f 00 00 call 10c880 <_Thread_Enable_dispatch> 1098ee: 31 c0 xor %eax,%eax 1098f0: 83 c4 10 add $0x10,%esp 1098f3: eb 25 jmp 10991a } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 1098f5: 83 f8 02 cmp $0x2,%eax 1098f8: 74 05 je 1098ff rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 1098fa: 83 f8 03 cmp $0x3,%eax 1098fd: 75 0d jne 10990c rtems_set_errno_and_return_minus_one( ENOSYS ); 1098ff: e8 fc 6e 00 00 call 110800 <__errno> 109904: c7 00 58 00 00 00 movl $0x58,(%eax) 10990a: eb 0b jmp 109917 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10990c: e8 ef 6e 00 00 call 110800 <__errno> 109911: c7 00 16 00 00 00 movl $0x16,(%eax) 109917: 83 c8 ff or $0xffffffff,%eax return 0; } 10991a: c9 leave 10991b: c3 ret =============================================================================== 0011841c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 11841c: 55 push %ebp 11841d: 89 e5 mov %esp,%ebp 11841f: 57 push %edi 118420: 56 push %esi 118421: 53 push %ebx 118422: 83 ec 2c sub $0x2c,%esp 118425: 8b 75 10 mov 0x10(%ebp),%esi /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 118428: e8 7f fc ff ff call 1180ac 11842d: 39 45 08 cmp %eax,0x8(%ebp) 118430: 74 0d je 11843f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); 118432: e8 e5 81 ff ff call 11061c <__errno> <== NOT EXECUTED 118437: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 11843d: eb 11 jmp 118450 <== NOT EXECUTED /* * Validate the signal passed. */ if ( !sig ) 11843f: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 118443: 75 13 jne 118458 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 118445: e8 d2 81 ff ff call 11061c <__errno> <== NOT EXECUTED 11844a: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 118450: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 118453: e9 05 02 00 00 jmp 11865d <== NOT EXECUTED if ( !is_valid_signo(sig) ) 118458: 8b 4d 0c mov 0xc(%ebp),%ecx 11845b: 49 dec %ecx 11845c: 83 f9 1f cmp $0x1f,%ecx 11845f: 77 e4 ja 118445 <== NEVER TAKEN /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 118461: 6b 45 0c 0c imul $0xc,0xc(%ebp),%eax 118465: 31 d2 xor %edx,%edx 118467: 83 b8 88 98 12 00 01 cmpl $0x1,0x129888(%eax) 11846e: 0f 84 e9 01 00 00 je 11865d * 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 ) ) 118474: 83 7d 0c 08 cmpl $0x8,0xc(%ebp) 118478: 74 0c je 118486 11847a: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 11847e: 74 06 je 118486 118480: 83 7d 0c 0b cmpl $0xb,0xc(%ebp) 118484: 75 1a jne 1184a0 return pthread_kill( pthread_self(), sig ); 118486: e8 99 03 00 00 call 118824 11848b: 53 push %ebx 11848c: 53 push %ebx 11848d: ff 75 0c pushl 0xc(%ebp) 118490: 50 push %eax 118491: e8 e6 02 00 00 call 11877c 118496: 89 c2 mov %eax,%edx 118498: 83 c4 10 add $0x10,%esp 11849b: e9 bd 01 00 00 jmp 11865d mask = signo_to_mask( sig ); 1184a0: bb 01 00 00 00 mov $0x1,%ebx 1184a5: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 1184a7: 8b 45 0c mov 0xc(%ebp),%eax 1184aa: 89 45 e8 mov %eax,-0x18(%ebp) siginfo->si_code = SI_USER; 1184ad: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp) if ( !value ) { 1184b4: 85 f6 test %esi,%esi 1184b6: 75 09 jne 1184c1 siginfo->si_value.sival_int = 0; 1184b8: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 1184bf: eb 05 jmp 1184c6 } else { siginfo->si_value = *value; 1184c1: 8b 06 mov (%esi),%eax 1184c3: 89 45 f0 mov %eax,-0x10(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1184c6: a1 94 92 12 00 mov 0x129294,%eax 1184cb: 40 inc %eax 1184cc: a3 94 92 12 00 mov %eax,0x129294 /* * 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; 1184d1: 8b 35 54 93 12 00 mov 0x129354,%esi api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 1184d7: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax 1184dd: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 1184e3: f7 d0 not %eax 1184e5: 85 c3 test %eax,%ebx 1184e7: 0f 85 f4 00 00 00 jne 1185e1 goto process_it; 1184ed: b9 0c 9a 12 00 mov $0x129a0c,%ecx index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 1184f2: 8b 11 mov (%ecx),%edx _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); } 1184f4: 8d 79 04 lea 0x4(%ecx),%edi 1184f7: eb 23 jmp 11851c !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 1184f9: 89 d6 mov %edx,%esi api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1184fb: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 118501: 85 5a 30 test %ebx,0x30(%edx) 118504: 0f 85 d7 00 00 00 jne 1185e1 <== ALWAYS TAKEN 11850a: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax <== NOT EXECUTED 118510: f7 d0 not %eax <== NOT EXECUTED 118512: 85 c3 test %eax,%ebx <== NOT EXECUTED 118514: 0f 85 c7 00 00 00 jne 1185e1 <== 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 ) { 11851a: 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 ) ; 11851c: 39 fa cmp %edi,%edx 11851e: 75 d9 jne 1184f9 118520: 83 c1 0c add $0xc,%ecx */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 118523: 81 f9 3c 9a 12 00 cmp $0x129a3c,%ecx 118529: 75 c7 jne 1184f2 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 11852b: 0f b6 05 e4 d0 11 00 movzbl 0x11d0e4,%eax 118532: 40 inc %eax 118533: 89 45 e0 mov %eax,-0x20(%ebp) 118536: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) 11853d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 118544: 8b 55 d0 mov -0x30(%ebp),%edx 118547: 8b 04 95 68 92 12 00 mov 0x129268(,%edx,4),%eax 11854e: 85 c0 test %eax,%eax 118550: 74 79 je 1185cb continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 118552: 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 ) 118555: 85 c0 test %eax,%eax 118557: 74 72 je 1185cb <== NEVER TAKEN continue; maximum = the_info->maximum; 118559: 0f b7 50 10 movzwl 0x10(%eax),%edx 11855d: 89 55 d4 mov %edx,-0x2c(%ebp) object_table = the_info->local_table; 118560: 8b 40 1c mov 0x1c(%eax),%eax 118563: 89 45 d8 mov %eax,-0x28(%ebp) 118566: bf 01 00 00 00 mov $0x1,%edi 11856b: eb 59 jmp 1185c6 for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 11856d: 8b 45 d8 mov -0x28(%ebp),%eax 118570: 8b 14 b8 mov (%eax,%edi,4),%edx if ( !the_thread ) 118573: 85 d2 test %edx,%edx 118575: 74 43 je 1185ba /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 118577: 8b 72 14 mov 0x14(%edx),%esi 11857a: 3b 75 e0 cmp -0x20(%ebp),%esi 11857d: 77 3b ja 1185ba <== NEVER TAKEN /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11857f: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 118585: 85 c0 test %eax,%eax 118587: 74 31 je 1185ba <== NEVER TAKEN 118589: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 11858f: f7 d0 not %eax 118591: 85 c3 test %eax,%ebx 118593: 74 25 je 1185ba * 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 ) { 118595: 3b 75 e0 cmp -0x20(%ebp),%esi 118598: 72 25 jb 1185bf <== 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 ) ) 11859a: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 11859d: 8b 48 10 mov 0x10(%eax),%ecx <== NOT EXECUTED 1185a0: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1185a2: 74 16 je 1185ba <== 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 ) ) { 1185a4: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED 1185a7: 85 c0 test %eax,%eax <== NOT EXECUTED 1185a9: 74 14 je 1185bf <== NOT EXECUTED * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 1185ab: 81 e1 00 00 00 10 and $0x10000000,%ecx <== NOT EXECUTED 1185b1: 75 07 jne 1185ba <== 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 ) { 1185b3: a9 00 00 00 10 test $0x10000000,%eax <== NOT EXECUTED 1185b8: 75 05 jne 1185bf <== NOT EXECUTED 1185ba: 8b 75 e0 mov -0x20(%ebp),%esi 1185bd: eb 03 jmp 1185c2 1185bf: 89 55 dc mov %edx,-0x24(%ebp) continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1185c2: 47 inc %edi 1185c3: 89 75 e0 mov %esi,-0x20(%ebp) 1185c6: 3b 7d d4 cmp -0x2c(%ebp),%edi 1185c9: 76 a2 jbe 11856d interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 1185cb: ff 45 d0 incl -0x30(%ebp) interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 1185ce: 83 7d d0 05 cmpl $0x5,-0x30(%ebp) 1185d2: 0f 85 6c ff ff ff jne 118544 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 1185d8: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 1185dc: 74 1c je 1185fa 1185de: 8b 75 dc mov -0x24(%ebp),%esi * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 1185e1: c6 46 75 01 movb $0x1,0x75(%esi) /* * 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 ) ) { 1185e5: 51 push %ecx 1185e6: 8d 45 e8 lea -0x18(%ebp),%eax 1185e9: 50 push %eax 1185ea: ff 75 0c pushl 0xc(%ebp) 1185ed: 56 push %esi 1185ee: e8 99 00 00 00 call 11868c <_POSIX_signals_Unblock_thread> 1185f3: 83 c4 10 add $0x10,%esp 1185f6: 84 c0 test %al,%al 1185f8: 75 5c jne 118656 /* * 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 ); 1185fa: 83 ec 0c sub $0xc,%esp 1185fd: 53 push %ebx 1185fe: e8 65 00 00 00 call 118668 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 118603: 6b 5d 0c 0c imul $0xc,0xc(%ebp),%ebx 118607: 83 c4 10 add $0x10,%esp 11860a: 83 bb 80 98 12 00 02 cmpl $0x2,0x129880(%ebx) 118611: 75 43 jne 118656 psiginfo = (POSIX_signals_Siginfo_node *) 118613: 83 ec 0c sub $0xc,%esp 118616: 68 00 9a 12 00 push $0x129a00 11861b: e8 90 26 ff ff call 10acb0 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 118620: 83 c4 10 add $0x10,%esp 118623: 85 c0 test %eax,%eax 118625: 75 10 jne 118637 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EAGAIN ); 118627: e8 f0 7f ff ff call 11061c <__errno> <== NOT EXECUTED 11862c: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 118632: e9 19 fe ff ff jmp 118450 <== NOT EXECUTED } psiginfo->Info = *siginfo; 118637: 8d 78 08 lea 0x8(%eax),%edi 11863a: 8d 75 e8 lea -0x18(%ebp),%esi 11863d: b9 03 00 00 00 mov $0x3,%ecx 118642: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 118644: 52 push %edx 118645: 52 push %edx 118646: 50 push %eax 118647: 8d 83 50 9a 12 00 lea 0x129a50(%ebx),%eax 11864d: 50 push %eax 11864e: e8 39 26 ff ff call 10ac8c <_Chain_Append> 118653: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 118656: e8 b1 3b ff ff call 10c20c <_Thread_Enable_dispatch> 11865b: 31 d2 xor %edx,%edx return 0; } 11865d: 89 d0 mov %edx,%eax 11865f: 8d 65 f4 lea -0xc(%ebp),%esp 118662: 5b pop %ebx 118663: 5e pop %esi 118664: 5f pop %edi 118665: c9 leave 118666: c3 ret =============================================================================== 0010cb00 : */ int mq_unlink( const char *name ) { 10cb00: 55 push %ebp 10cb01: 89 e5 mov %esp,%ebp 10cb03: 53 push %ebx 10cb04: 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 10cb07: a1 58 63 12 00 mov 0x126358,%eax 10cb0c: 40 inc %eax 10cb0d: a3 58 63 12 00 mov %eax,0x126358 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 ); 10cb12: 8d 45 f8 lea -0x8(%ebp),%eax 10cb15: 50 push %eax 10cb16: ff 75 08 pushl 0x8(%ebp) 10cb19: e8 32 5a 00 00 call 112550 <_POSIX_Message_queue_Name_to_id> 10cb1e: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10cb20: 83 c4 10 add $0x10,%esp 10cb23: 85 c0 test %eax,%eax 10cb25: 74 11 je 10cb38 _Thread_Enable_dispatch(); 10cb27: e8 08 32 00 00 call 10fd34 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10cb2c: e8 db 78 00 00 call 11440c <__errno> 10cb31: 89 18 mov %ebx,(%eax) 10cb33: 83 c8 ff or $0xffffffff,%eax 10cb36: eb 3c jmp 10cb74 } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 10cb38: 8b 45 f8 mov -0x8(%ebp),%eax bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 10cb3b: 31 db xor %ebx,%ebx 10cb3d: 66 3b 05 d8 66 12 00 cmp 0x1266d8,%ax 10cb44: 77 0b ja 10cb51 <== NEVER TAKEN * This heap routine returns information about the free blocks * in the specified heap. 10cb46: 0f b7 d0 movzwl %ax,%edx 10cb49: a1 e4 66 12 00 mov 0x1266e4,%eax 10cb4e: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = FALSE; 10cb51: 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. * 10cb55: 50 push %eax 10cb56: 50 push %eax 10cb57: 53 push %ebx 10cb58: 68 c8 66 12 00 push $0x1266c8 10cb5d: e8 da 2a 00 00 call 10f63c <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 10cb62: 89 1c 24 mov %ebx,(%esp) 10cb65: e8 92 f9 ff ff call 10c4fc <_POSIX_Message_queue_Delete> _Thread_Enable_dispatch(); 10cb6a: e8 c5 31 00 00 call 10fd34 <_Thread_Enable_dispatch> 10cb6f: 31 c0 xor %eax,%eax 10cb71: 83 c4 10 add $0x10,%esp return 0; } 10cb74: 8b 5d fc mov -0x4(%ebp),%ebx 10cb77: c9 leave 10cb78: c3 ret =============================================================================== 0010d834 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 10d834: 55 push %ebp 10d835: 89 e5 mov %esp,%ebp 10d837: 56 push %esi 10d838: 53 push %ebx 10d839: 8b 5d 08 mov 0x8(%ebp),%ebx 10d83c: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 10d83f: 83 ec 0c sub $0xc,%esp 10d842: 53 push %ebx 10d843: e8 a8 11 00 00 call 10e9f0 <_Timespec_Is_valid> 10d848: 83 c4 10 add $0x10,%esp 10d84b: 84 c0 test %al,%al 10d84d: 74 0b je 10d85a * 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 ) 10d84f: 83 3b 00 cmpl $0x0,(%ebx) 10d852: 78 06 js 10d85a <== NEVER TAKEN 10d854: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10d858: 79 10 jns 10d86a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10d85a: e8 0d 1e 00 00 call 10f66c <__errno> 10d85f: c7 00 16 00 00 00 movl $0x16,(%eax) 10d865: e9 c3 00 00 00 jmp 10d92d ticks = _Timespec_To_ticks( rqtp ); 10d86a: 83 ec 0c sub $0xc,%esp 10d86d: 53 push %ebx 10d86e: e8 a1 11 00 00 call 10ea14 <_Timespec_To_ticks> 10d873: 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 ) { 10d875: 83 c4 10 add $0x10,%esp 10d878: 85 c0 test %eax,%eax 10d87a: 75 2f jne 10d8ab /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10d87c: a1 98 de 11 00 mov 0x11de98,%eax 10d881: 40 inc %eax 10d882: a3 98 de 11 00 mov %eax,0x11de98 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 10d887: e8 7c e4 ff ff call 10bd08 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 10d88c: e8 af d9 ff ff call 10b240 <_Thread_Enable_dispatch> if ( rmtp ) { 10d891: 85 f6 test %esi,%esi 10d893: 0f 84 99 00 00 00 je 10d932 <== NEVER TAKEN rmtp->tv_sec = 0; 10d899: c7 06 00 00 00 00 movl $0x0,(%esi) rmtp->tv_nsec = 0; 10d89f: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10d8a6: e9 87 00 00 00 jmp 10d932 10d8ab: a1 98 de 11 00 mov 0x11de98,%eax 10d8b0: 40 inc %eax 10d8b1: a3 98 de 11 00 mov %eax,0x11de98 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 10d8b6: 50 push %eax 10d8b7: 50 push %eax 10d8b8: 68 08 00 00 10 push $0x10000008 10d8bd: ff 35 58 df 11 00 pushl 0x11df58 10d8c3: e8 68 e1 ff ff call 10ba30 <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 10d8c8: a1 58 df 11 00 mov 0x11df58,%eax 10d8cd: 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. * 10d8d0: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) * @param[in] the_heap is the heap to operate upon 10d8d7: c7 40 64 c4 b0 10 00 movl $0x10b0c4,0x64(%eax) * @param[in] starting_address is the starting address of the memory for 10d8de: 89 50 68 mov %edx,0x68(%eax) * the heap 10d8e1: 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, 10d8e8: 89 58 54 mov %ebx,0x54(%eax) void *starting_address, size_t *size 10d8eb: 5a pop %edx 10d8ec: 59 pop %ecx 10d8ed: 83 c0 48 add $0x48,%eax 10d8f0: 50 push %eax 10d8f1: 68 78 df 11 00 push $0x11df78 10d8f6: e8 4d e7 ff ff call 10c048 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 10d8fb: e8 40 d9 ff ff call 10b240 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 10d900: 83 c4 10 add $0x10,%esp 10d903: 85 f6 test %esi,%esi 10d905: 74 2b je 10d932 <== NEVER TAKEN ticks -= 10d907: a1 58 df 11 00 mov 0x11df58,%eax 10d90c: 03 58 5c add 0x5c(%eax),%ebx 10d90f: 2b 58 60 sub 0x60(%eax),%ebx _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 10d912: 50 push %eax 10d913: 50 push %eax 10d914: 56 push %esi 10d915: 53 push %ebx 10d916: e8 a9 10 00 00 call 10e9c4 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 10d91b: 83 c4 10 add $0x10,%esp 10d91e: 85 db test %ebx,%ebx 10d920: 74 10 je 10d932 rtems_set_errno_and_return_minus_one( EINTR ); 10d922: e8 45 1d 00 00 call 10f66c <__errno> 10d927: c7 00 04 00 00 00 movl $0x4,(%eax) 10d92d: 83 c8 ff or $0xffffffff,%eax 10d930: eb 02 jmp 10d934 10d932: 31 c0 xor %eax,%eax } return 0; } 10d934: 8d 65 f8 lea -0x8(%ebp),%esp 10d937: 5b pop %ebx 10d938: 5e pop %esi 10d939: c9 leave 10d93a: c3 ret =============================================================================== 001091cc : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 1091cc: 55 push %ebp 1091cd: 89 e5 mov %esp,%ebp 1091cf: 57 push %edi 1091d0: 56 push %esi 1091d1: 53 push %ebx 1091d2: 83 ec 1c sub $0x1c,%esp 1091d5: 8b 7d 08 mov 0x8(%ebp),%edi 1091d8: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 1091db: 85 ff test %edi,%edi 1091dd: 0f 84 94 00 00 00 je 109277 return EINVAL; if ( count == 0 ) 1091e3: 85 f6 test %esi,%esi 1091e5: 0f 84 8c 00 00 00 je 109277 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 1091eb: 8b 45 0c mov 0xc(%ebp),%eax 1091ee: 85 c0 test %eax,%eax 1091f0: 75 11 jne 109203 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 1091f2: 83 ec 0c sub $0xc,%esp 1091f5: 8d 5d e4 lea -0x1c(%ebp),%ebx 1091f8: 53 push %ebx 1091f9: e8 1a ff ff ff call 109118 1091fe: 89 d8 mov %ebx,%eax 109200: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 109203: 83 38 00 cmpl $0x0,(%eax) 109206: 74 6f je 109277 return EINVAL; switch ( the_attr->process_shared ) { 109208: 83 78 04 00 cmpl $0x0,0x4(%eax) 10920c: 75 69 jne 109277 <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10920e: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) the_attributes.maximum_count = count; 109215: 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 109218: a1 90 ec 11 00 mov 0x11ec90,%eax 10921d: 40 inc %eax 10921e: a3 90 ec 11 00 mov %eax,0x11ec90 */ /**@{*/ #ifdef __cplusplus extern "C" { #endif 109223: 83 ec 0c sub $0xc,%esp 109226: 68 80 f0 11 00 push $0x11f080 10922b: e8 d4 1f 00 00 call 10b204 <_Objects_Allocate> 109230: 89 c3 mov %eax,%ebx */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 109232: 83 c4 10 add $0x10,%esp 109235: 85 c0 test %eax,%eax 109237: 75 0c jne 109245 _Thread_Enable_dispatch(); 109239: e8 ca 2b 00 00 call 10be08 <_Thread_Enable_dispatch> 10923e: b8 0b 00 00 00 mov $0xb,%eax 109243: eb 37 jmp 10927c return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 109245: 50 push %eax 109246: 50 push %eax 109247: 8d 45 ec lea -0x14(%ebp),%eax 10924a: 50 push %eax 10924b: 8d 43 10 lea 0x10(%ebx),%eax 10924e: 50 push %eax 10924f: e8 ac 17 00 00 call 10aa00 <_CORE_barrier_Initialize> 109254: 8b 4b 08 mov 0x8(%ebx),%ecx 109257: 0f b7 d1 movzwl %cx,%edx 10925a: a1 9c f0 11 00 mov 0x11f09c,%eax 10925f: 89 1c 90 mov %ebx,(%eax,%edx,4) 109262: 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; 109269: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 10926b: e8 98 2b 00 00 call 10be08 <_Thread_Enable_dispatch> 109270: 31 c0 xor %eax,%eax 109272: 83 c4 10 add $0x10,%esp 109275: eb 05 jmp 10927c return 0; 109277: b8 16 00 00 00 mov $0x16,%eax } 10927c: 8d 65 f4 lea -0xc(%ebp),%esp 10927f: 5b pop %ebx 109280: 5e pop %esi 109281: 5f pop %edi 109282: c9 leave 109283: c3 ret =============================================================================== 00108a54 : */ int pthread_cancel( pthread_t thread ) { 108a54: 55 push %ebp 108a55: 89 e5 mov %esp,%ebp 108a57: 56 push %esi 108a58: 53 push %ebx 108a59: 83 ec 10 sub $0x10,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 108a5c: a1 84 f5 11 00 mov 0x11f584,%eax 108a61: ba 47 00 00 00 mov $0x47,%edx 108a66: 85 c0 test %eax,%eax 108a68: 75 5d jne 108ac7 <== NEVER TAKEN return EPROTO; the_thread = _Thread_Get( thread, &location ); 108a6a: 52 push %edx 108a6b: 52 push %edx 108a6c: 8d 45 f4 lea -0xc(%ebp),%eax 108a6f: 50 push %eax 108a70: ff 75 08 pushl 0x8(%ebp) 108a73: e8 74 2d 00 00 call 10b7ec <_Thread_Get> 108a78: 89 c6 mov %eax,%esi switch ( location ) { 108a7a: 83 c4 10 add $0x10,%esp 108a7d: ba 16 00 00 00 mov $0x16,%edx 108a82: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 108a86: 75 3f jne 108ac7 <== NEVER TAKEN case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 108a88: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax thread_support->cancelation_requested = 1; 108a8e: c7 80 d4 00 00 00 01 movl $0x1,0xd4(%eax) 108a95: 00 00 00 if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 108a98: 31 db xor %ebx,%ebx 108a9a: 83 b8 cc 00 00 00 00 cmpl $0x0,0xcc(%eax) 108aa1: 75 0a jne 108aad <== NEVER TAKEN 108aa3: 83 b8 d0 00 00 00 01 cmpl $0x1,0xd0(%eax) 108aaa: 0f 94 c3 sete %bl thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS) cancel = true; _Thread_Enable_dispatch(); 108aad: e8 1a 2d 00 00 call 10b7cc <_Thread_Enable_dispatch> if ( cancel ) 108ab2: 31 d2 xor %edx,%edx 108ab4: 84 db test %bl,%bl 108ab6: 74 0f je 108ac7 _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 108ab8: 50 push %eax 108ab9: 50 push %eax 108aba: 6a ff push $0xffffffff 108abc: 56 push %esi 108abd: e8 a2 02 00 00 call 108d64 <_POSIX_Thread_Exit> 108ac2: 31 d2 xor %edx,%edx 108ac4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 108ac7: 89 d0 mov %edx,%eax 108ac9: 8d 65 f8 lea -0x8(%ebp),%esp 108acc: 5b pop %ebx 108acd: 5e pop %esi 108ace: c9 leave 108acf: c3 ret =============================================================================== 00108ed4 : */ void pthread_cleanup_pop( int execute ) { 108ed4: 55 push %ebp 108ed5: 89 e5 mov %esp,%ebp 108ed7: 57 push %edi 108ed8: 56 push %esi 108ed9: 53 push %ebx 108eda: 83 ec 1c sub $0x1c,%esp 108edd: 8b 45 08 mov 0x8(%ebp),%eax 108ee0: 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 ]; 108ee3: a1 40 0d 12 00 mov 0x120d40,%eax 108ee8: 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 108eee: a1 80 0c 12 00 mov 0x120c80,%eax 108ef3: 40 inc %eax 108ef4: a3 80 0c 12 00 mov %eax,0x120c80 * 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 ); 108ef9: 9c pushf 108efa: fa cli 108efb: 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 108efc: 8d 82 dc 00 00 00 lea 0xdc(%edx),%eax if ( _Chain_Is_empty( handler_stack ) ) { 108f02: 39 82 d8 00 00 00 cmp %eax,0xd8(%edx) 108f08: 75 09 jne 108f13 _Thread_Enable_dispatch(); 108f0a: e8 29 30 00 00 call 10bf38 <_Thread_Enable_dispatch> _ISR_Enable( level ); 108f0f: 57 push %edi 108f10: 9d popf 108f11: eb 4c jmp 108f5f return; } handler = (POSIX_Cancel_Handler_control *) 108f13: 8b 40 04 mov 0x4(%eax),%eax 108f16: 89 45 d8 mov %eax,-0x28(%ebp) 108f19: 8b 10 mov (%eax),%edx 108f1b: 8b 40 04 mov 0x4(%eax),%eax 108f1e: 89 42 04 mov %eax,0x4(%edx) 108f21: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 108f23: 57 push %edi 108f24: 9d popf tmp_handler = *handler; 108f25: 8d 7d e4 lea -0x1c(%ebp),%edi 108f28: b9 04 00 00 00 mov $0x4,%ecx 108f2d: 8b 75 d8 mov -0x28(%ebp),%esi 108f30: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 108f32: 8b 5d ec mov -0x14(%ebp),%ebx 108f35: 8b 7d f0 mov -0x10(%ebp),%edi _Workspace_Free( handler ); 108f38: 83 ec 0c sub $0xc,%esp 108f3b: ff 75 d8 pushl -0x28(%ebp) 108f3e: e8 0d 40 00 00 call 10cf50 <_Workspace_Free> _Thread_Enable_dispatch(); 108f43: e8 f0 2f 00 00 call 10bf38 <_Thread_Enable_dispatch> if ( execute ) 108f48: 83 c4 10 add $0x10,%esp 108f4b: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 108f4f: 74 0e je 108f5f <== NEVER TAKEN (*tmp_handler.routine)( tmp_handler.arg ); 108f51: 89 7d 08 mov %edi,0x8(%ebp) 108f54: 89 d9 mov %ebx,%ecx } 108f56: 8d 65 f4 lea -0xc(%ebp),%esp 108f59: 5b pop %ebx 108f5a: 5e pop %esi 108f5b: 5f pop %edi 108f5c: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 108f5d: ff e1 jmp *%ecx } 108f5f: 8d 65 f4 lea -0xc(%ebp),%esp 108f62: 5b pop %ebx 108f63: 5e pop %esi 108f64: 5f pop %edi 108f65: c9 leave 108f66: c3 ret =============================================================================== 00108f68 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 108f68: 55 push %ebp 108f69: 89 e5 mov %esp,%ebp 108f6b: 56 push %esi 108f6c: 53 push %ebx 108f6d: 8b 5d 08 mov 0x8(%ebp),%ebx 108f70: 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 ) 108f73: 85 db test %ebx,%ebx 108f75: 74 4b je 108fc2 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 108f77: a1 80 0c 12 00 mov 0x120c80,%eax 108f7c: 40 inc %eax 108f7d: a3 80 0c 12 00 mov %eax,0x120c80 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 108f82: 83 ec 0c sub $0xc,%esp 108f85: 6a 10 push $0x10 108f87: e8 d9 3f 00 00 call 10cf65 <_Workspace_Allocate> 108f8c: 89 c2 mov %eax,%edx if ( handler ) { 108f8e: 83 c4 10 add $0x10,%esp 108f91: 85 c0 test %eax,%eax 108f93: 74 22 je 108fb7 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 108f95: a1 40 0d 12 00 mov 0x120d40,%eax 108f9a: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 108fa0: 05 d8 00 00 00 add $0xd8,%eax handler->routine = routine; 108fa5: 89 5a 08 mov %ebx,0x8(%edx) handler->arg = arg; 108fa8: 89 72 0c mov %esi,0xc(%edx) _Chain_Append( handler_stack, &handler->Node ); 108fab: 51 push %ecx 108fac: 51 push %ecx 108fad: 52 push %edx 108fae: 50 push %eax 108faf: e8 e4 1b 00 00 call 10ab98 <_Chain_Append> 108fb4: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 108fb7: 8d 65 f8 lea -0x8(%ebp),%esp 108fba: 5b pop %ebx 108fbb: 5e pop %esi 108fbc: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 108fbd: e9 76 2f 00 00 jmp 10bf38 <_Thread_Enable_dispatch> } 108fc2: 8d 65 f8 lea -0x8(%ebp),%esp 108fc5: 5b pop %ebx 108fc6: 5e pop %esi 108fc7: c9 leave 108fc8: c3 ret =============================================================================== 00109a98 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 109a98: 55 push %ebp 109a99: 89 e5 mov %esp,%ebp 109a9b: 56 push %esi 109a9c: 53 push %ebx 109a9d: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 109aa0: be c8 a8 11 00 mov $0x11a8c8,%esi 109aa5: 85 c0 test %eax,%eax 109aa7: 74 02 je 109aab 109aa9: 89 c6 mov %eax,%esi /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 109aab: 83 7e 04 01 cmpl $0x1,0x4(%esi) 109aaf: 74 77 je 109b28 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 109ab1: 83 3e 00 cmpl $0x0,(%esi) 109ab4: 74 72 je 109b28 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109ab6: a1 60 10 12 00 mov 0x121060,%eax 109abb: 40 inc %eax 109abc: a3 60 10 12 00 mov %eax,0x121060 /**@{*/ #ifdef __cplusplus extern "C" { #endif 109ac1: 83 ec 0c sub $0xc,%esp 109ac4: 68 d4 14 12 00 push $0x1214d4 109ac9: e8 b6 24 00 00 call 10bf84 <_Objects_Allocate> 109ace: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 109ad0: 83 c4 10 add $0x10,%esp 109ad3: 85 c0 test %eax,%eax 109ad5: 75 0c jne 109ae3 _Thread_Enable_dispatch(); 109ad7: e8 ac 30 00 00 call 10cb88 <_Thread_Enable_dispatch> 109adc: b8 0c 00 00 00 mov $0xc,%eax 109ae1: eb 4a jmp 109b2d return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 109ae3: 8b 46 04 mov 0x4(%esi),%eax 109ae6: 89 43 10 mov %eax,0x10(%ebx) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 109ae9: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 109af0: 6a 74 push $0x74 109af2: 68 00 08 00 00 push $0x800 109af7: 6a 00 push $0x0 109af9: 8d 43 18 lea 0x18(%ebx),%eax 109afc: 50 push %eax 109afd: e8 56 37 00 00 call 10d258 <_Thread_queue_Initialize> 109b02: 8b 4b 08 mov 0x8(%ebx),%ecx 109b05: 0f b7 d1 movzwl %cx,%edx 109b08: a1 f0 14 12 00 mov 0x1214f0,%eax 109b0d: 89 1c 90 mov %ebx,(%eax,%edx,4) 109b10: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 109b17: 8b 45 08 mov 0x8(%ebp),%eax 109b1a: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 109b1c: e8 67 30 00 00 call 10cb88 <_Thread_Enable_dispatch> 109b21: 31 c0 xor %eax,%eax 109b23: 83 c4 10 add $0x10,%esp 109b26: eb 05 jmp 109b2d return 0; 109b28: b8 16 00 00 00 mov $0x16,%eax } 109b2d: 8d 65 f8 lea -0x8(%ebp),%esp 109b30: 5b pop %ebx 109b31: 5e pop %esi 109b32: c9 leave 109b33: c3 ret =============================================================================== 00109950 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 109950: 55 push %ebp 109951: 89 e5 mov %esp,%ebp 109953: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == FALSE ) 109956: 85 c0 test %eax,%eax 109958: 74 0f je 109969 10995a: 83 38 00 cmpl $0x0,(%eax) 10995d: 74 0a je 109969 <== NEVER TAKEN return EINVAL; attr->is_initialized = FALSE; 10995f: c7 00 00 00 00 00 movl $0x0,(%eax) 109965: 31 c0 xor %eax,%eax 109967: eb 05 jmp 10996e return 0; 109969: b8 16 00 00 00 mov $0x16,%eax } 10996e: c9 leave 10996f: c3 ret =============================================================================== 00109a24 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 109a24: 55 push %ebp 109a25: 89 e5 mov %esp,%ebp 109a27: 57 push %edi 109a28: 56 push %esi 109a29: 53 push %ebx 109a2a: 83 ec 2c sub $0x2c,%esp 109a2d: 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 ) 109a30: b8 0e 00 00 00 mov $0xe,%eax 109a35: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 109a39: 0f 84 6e 02 00 00 je 109cad return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 109a3f: c7 45 c8 4c a9 11 00 movl $0x11a94c,-0x38(%ebp) 109a46: 85 f6 test %esi,%esi 109a48: 74 03 je 109a4d 109a4a: 89 75 c8 mov %esi,-0x38(%ebp) if ( !the_attr->is_initialized ) 109a4d: 8b 45 c8 mov -0x38(%ebp),%eax 109a50: 83 38 00 cmpl $0x0,(%eax) 109a53: 0f 84 4f 02 00 00 je 109ca8 * 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) ) 109a59: 83 78 04 00 cmpl $0x0,0x4(%eax) 109a5d: 74 0f je 109a6e 109a5f: 8b 40 08 mov 0x8(%eax),%eax 109a62: 3b 05 00 cd 11 00 cmp 0x11cd00,%eax 109a68: 0f 82 3a 02 00 00 jb 109ca8 <== 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 ) { 109a6e: 8b 55 c8 mov -0x38(%ebp),%edx 109a71: 8b 42 10 mov 0x10(%edx),%eax 109a74: 83 f8 01 cmp $0x1,%eax 109a77: 74 0b je 109a84 109a79: 83 f8 02 cmp $0x2,%eax 109a7c: 0f 85 26 02 00 00 jne 109ca8 109a82: eb 1c jmp 109aa0 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109a84: a1 b0 11 12 00 mov 0x1211b0,%eax 109a89: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax schedpolicy = api->schedpolicy; 109a8f: 8b 50 7c mov 0x7c(%eax),%edx 109a92: 89 55 d0 mov %edx,-0x30(%ebp) schedparam = api->schedparam; 109a95: 8d 7d dc lea -0x24(%ebp),%edi 109a98: 8d b0 80 00 00 00 lea 0x80(%eax),%esi 109a9e: eb 12 jmp 109ab2 break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 109aa0: 8b 45 c8 mov -0x38(%ebp),%eax 109aa3: 8b 40 14 mov 0x14(%eax),%eax 109aa6: 89 45 d0 mov %eax,-0x30(%ebp) schedparam = the_attr->schedparam; 109aa9: 8d 7d dc lea -0x24(%ebp),%edi 109aac: 8b 75 c8 mov -0x38(%ebp),%esi 109aaf: 83 c6 18 add $0x18,%esi 109ab2: b9 06 00 00 00 mov $0x6,%ecx 109ab7: 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 ) 109ab9: b8 86 00 00 00 mov $0x86,%eax 109abe: 8b 55 c8 mov -0x38(%ebp),%edx 109ac1: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 109ac5: 0f 85 e2 01 00 00 jne 109cad /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 109acb: 8b 7d dc mov -0x24(%ebp),%edi 109ace: 8d 47 ff lea -0x1(%edi),%eax 109ad1: 3d fd 00 00 00 cmp $0xfd,%eax 109ad6: 0f 87 cc 01 00 00 ja 109ca8 <== NEVER TAKEN */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 109adc: 83 7d d0 01 cmpl $0x1,-0x30(%ebp) 109ae0: 74 24 je 109b06 109ae2: 7f 10 jg 109af4 109ae4: be 01 00 00 00 mov $0x1,%esi 109ae9: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 109aed: 74 19 je 109b08 109aef: e9 b4 01 00 00 jmp 109ca8 109af4: 83 7d d0 02 cmpl $0x2,-0x30(%ebp) 109af8: 74 12 je 109b0c <== NEVER TAKEN 109afa: 83 7d d0 03 cmpl $0x3,-0x30(%ebp) 109afe: 0f 85 a4 01 00 00 jne 109ca8 <== NEVER TAKEN 109b04: eb 0d jmp 109b13 109b06: 31 f6 xor %esi,%esi 109b08: 31 db xor %ebx,%ebx 109b0a: eb 44 jmp 109b50 109b0c: be 02 00 00 00 mov $0x2,%esi <== NOT EXECUTED 109b11: eb f5 jmp 109b08 <== NOT EXECUTED 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 ) < 109b13: 83 ec 0c sub $0xc,%esp 109b16: 8d 45 e4 lea -0x1c(%ebp),%eax 109b19: 50 push %eax 109b1a: e8 6d 39 00 00 call 10d48c <_Timespec_To_ticks> 109b1f: 89 c3 mov %eax,%ebx 109b21: 8d 45 ec lea -0x14(%ebp),%eax 109b24: 89 04 24 mov %eax,(%esp) 109b27: e8 60 39 00 00 call 10d48c <_Timespec_To_ticks> 109b2c: 83 c4 10 add $0x10,%esp 109b2f: 39 c3 cmp %eax,%ebx 109b31: 0f 82 71 01 00 00 jb 109ca8 <== NEVER TAKEN _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 109b37: 8b 45 e0 mov -0x20(%ebp),%eax 109b3a: 48 dec %eax 109b3b: 3d fd 00 00 00 cmp $0xfd,%eax 109b40: 0f 87 62 01 00 00 ja 109ca8 <== NEVER TAKEN 109b46: be 03 00 00 00 mov $0x3,%esi 109b4b: bb e8 9f 10 00 mov $0x109fe8,%ebx #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 109b50: 83 ec 0c sub $0xc,%esp 109b53: ff 35 a8 11 12 00 pushl 0x1211a8 109b59: e8 5e 18 00 00 call 10b3bc <_API_Mutex_Lock> * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 109b5e: c7 04 24 60 13 12 00 movl $0x121360,(%esp) 109b65: e8 12 21 00 00 call 10bc7c <_Objects_Allocate> 109b6a: 89 45 cc mov %eax,-0x34(%ebp) * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 109b6d: 83 c4 10 add $0x10,%esp 109b70: 85 c0 test %eax,%eax 109b72: 75 05 jne 109b79 _RTEMS_Unlock_allocator(); 109b74: 83 ec 0c sub $0xc,%esp 109b77: eb 51 jmp 109bca /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 109b79: 8b 45 c8 mov -0x38(%ebp),%eax 109b7c: 8b 50 08 mov 0x8(%eax),%edx 109b7f: 50 push %eax 109b80: 6a 00 push $0x0 109b82: 6a 00 push $0x0 109b84: 53 push %ebx 109b85: 56 push %esi 109b86: 6a 01 push $0x1 109b88: b8 ff 00 00 00 mov $0xff,%eax 109b8d: 29 f8 sub %edi,%eax 109b8f: 50 push %eax 109b90: 6a 01 push $0x1 109b92: a1 00 cd 11 00 mov 0x11cd00,%eax 109b97: d1 e0 shl %eax 109b99: 39 d0 cmp %edx,%eax 109b9b: 73 02 jae 109b9f 109b9d: 89 d0 mov %edx,%eax 109b9f: 50 push %eax 109ba0: 8b 55 c8 mov -0x38(%ebp),%edx 109ba3: ff 72 04 pushl 0x4(%edx) 109ba6: ff 75 cc pushl -0x34(%ebp) 109ba9: 68 60 13 12 00 push $0x121360 109bae: e8 91 2d 00 00 call 10c944 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 109bb3: 83 c4 30 add $0x30,%esp 109bb6: 84 c0 test %al,%al 109bb8: 75 25 jne 109bdf * 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 109bba: 50 push %eax 109bbb: 50 push %eax 109bbc: ff 75 cc pushl -0x34(%ebp) 109bbf: 68 60 13 12 00 push $0x121360 109bc4: e8 c3 23 00 00 call 10bf8c <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 109bc9: 58 pop %eax 109bca: ff 35 a8 11 12 00 pushl 0x1211a8 109bd0: e8 2f 18 00 00 call 10b404 <_API_Mutex_Unlock> 109bd5: b8 0b 00 00 00 mov $0xb,%eax 109bda: e9 c4 00 00 00 jmp 109ca3 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 109bdf: 8b 45 cc mov -0x34(%ebp),%eax 109be2: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx api->Attributes = *the_attr; 109be8: b9 0e 00 00 00 mov $0xe,%ecx 109bed: 89 df mov %ebx,%edi 109bef: 8b 75 c8 mov -0x38(%ebp),%esi 109bf2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 109bf4: 8b 55 c8 mov -0x38(%ebp),%edx 109bf7: 8b 42 34 mov 0x34(%edx),%eax 109bfa: 89 43 38 mov %eax,0x38(%ebx) api->schedpolicy = schedpolicy; 109bfd: 8b 45 d0 mov -0x30(%ebp),%eax 109c00: 89 43 7c mov %eax,0x7c(%ebx) api->schedparam = schedparam; 109c03: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 109c09: 8d 75 dc lea -0x24(%ebp),%esi 109c0c: b1 06 mov $0x6,%cl 109c0e: 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; 109c10: 8b 55 cc mov -0x34(%ebp),%edx 109c13: c6 42 75 01 movb $0x1,0x75(%edx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 109c17: 83 ec 0c sub $0xc,%esp 109c1a: 6a 00 push $0x0 109c1c: ff 75 14 pushl 0x14(%ebp) 109c1f: ff 75 10 pushl 0x10(%ebp) 109c22: 6a 01 push $0x1 109c24: 52 push %edx 109c25: e8 8a 36 00 00 call 10d2b4 <_Thread_Start> 109c2a: 89 c6 mov %eax,%esi start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 109c2c: 83 c4 20 add $0x20,%esp 109c2f: 83 7d d0 03 cmpl $0x3,-0x30(%ebp) 109c33: 75 2b jne 109c60 _Watchdog_Insert_ticks( 109c35: 83 ec 0c sub $0xc,%esp 109c38: 8d 83 88 00 00 00 lea 0x88(%ebx),%eax 109c3e: 50 push %eax 109c3f: e8 48 38 00 00 call 10d48c <_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, 109c44: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) void *starting_address, size_t *size 109c4a: 59 pop %ecx 109c4b: 5f pop %edi 109c4c: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax 109c52: 50 push %eax 109c53: 68 d0 11 12 00 push $0x1211d0 109c58: e8 37 3b 00 00 call 10d794 <_Watchdog_Insert> 109c5d: 83 c4 10 add $0x10,%esp * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 109c60: 89 f0 mov %esi,%eax 109c62: 84 c0 test %al,%al 109c64: 75 22 jne 109c88 <== ALWAYS TAKEN * 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 109c66: 52 push %edx <== NOT EXECUTED 109c67: 52 push %edx <== NOT EXECUTED 109c68: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 109c6b: 68 60 13 12 00 push $0x121360 <== NOT EXECUTED 109c70: e8 17 23 00 00 call 10bf8c <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 109c75: 58 pop %eax <== NOT EXECUTED 109c76: ff 35 a8 11 12 00 pushl 0x1211a8 <== NOT EXECUTED 109c7c: e8 83 17 00 00 call 10b404 <_API_Mutex_Unlock> <== NOT EXECUTED 109c81: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED 109c86: eb 1b jmp 109ca3 <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 109c88: 8b 45 cc mov -0x34(%ebp),%eax 109c8b: 8b 50 08 mov 0x8(%eax),%edx 109c8e: 8b 45 08 mov 0x8(%ebp),%eax 109c91: 89 10 mov %edx,(%eax) _RTEMS_Unlock_allocator(); 109c93: 83 ec 0c sub $0xc,%esp 109c96: ff 35 a8 11 12 00 pushl 0x1211a8 109c9c: e8 63 17 00 00 call 10b404 <_API_Mutex_Unlock> 109ca1: 31 c0 xor %eax,%eax 109ca3: 83 c4 10 add $0x10,%esp 109ca6: eb 05 jmp 109cad return 0; 109ca8: b8 16 00 00 00 mov $0x16,%eax } 109cad: 8d 65 f4 lea -0xc(%ebp),%esp 109cb0: 5b pop %ebx 109cb1: 5e pop %esi 109cb2: 5f pop %edi 109cb3: c9 leave 109cb4: c3 ret =============================================================================== 0010ecb8 : } void pthread_exit( void *value_ptr ) { 10ecb8: 55 push %ebp 10ecb9: 89 e5 mov %esp,%ebp 10ecbb: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 10ecbe: ff 75 08 pushl 0x8(%ebp) 10ecc1: ff 35 58 d8 11 00 pushl 0x11d858 10ecc7: e8 88 ff ff ff call 10ec54 <_POSIX_Thread_Exit> 10eccc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10eccf: c9 leave <== NOT EXECUTED 10ecd0: c3 ret <== NOT EXECUTED =============================================================================== 0010aecc : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10aecc: 55 push %ebp 10aecd: 89 e5 mov %esp,%ebp 10aecf: 57 push %edi 10aed0: 56 push %esi 10aed1: 53 push %ebx 10aed2: 83 ec 1c sub $0x1c,%esp 10aed5: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10aed8: 85 f6 test %esi,%esi 10aeda: 74 06 je 10aee2 10aedc: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10aee0: 75 07 jne 10aee9 10aee2: b8 16 00 00 00 mov $0x16,%eax 10aee7: eb 4d jmp 10af36 return EINVAL; the_thread = _Thread_Get( thread, &location ); 10aee9: 50 push %eax 10aeea: 50 push %eax 10aeeb: 8d 45 f0 lea -0x10(%ebp),%eax 10aeee: 50 push %eax 10aeef: ff 75 08 pushl 0x8(%ebp) 10aef2: e8 4d 2a 00 00 call 10d944 <_Thread_Get> 10aef7: 89 c3 mov %eax,%ebx switch ( location ) { 10aef9: 83 c4 10 add $0x10,%esp 10aefc: b8 03 00 00 00 mov $0x3,%eax 10af01: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10af05: 75 2f jne 10af36 <== NEVER TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10af07: 8b 93 f8 00 00 00 mov 0xf8(%ebx),%edx if ( policy ) *policy = api->schedpolicy; 10af0d: 8b 42 7c mov 0x7c(%edx),%eax 10af10: 89 06 mov %eax,(%esi) if ( param ) { *param = api->schedparam; 10af12: 8d b2 80 00 00 00 lea 0x80(%edx),%esi 10af18: b9 06 00 00 00 mov $0x6,%ecx 10af1d: 8b 7d 10 mov 0x10(%ebp),%edi 10af20: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10af22: b8 ff 00 00 00 mov $0xff,%eax 10af27: 2b 43 14 sub 0x14(%ebx),%eax 10af2a: 8b 55 10 mov 0x10(%ebp),%edx 10af2d: 89 02 mov %eax,(%edx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10af2f: e8 f0 29 00 00 call 10d924 <_Thread_Enable_dispatch> 10af34: 31 c0 xor %eax,%eax break; } return ESRCH; } 10af36: 8d 65 f4 lea -0xc(%ebp),%esp 10af39: 5b pop %ebx 10af3a: 5e pop %esi 10af3b: 5f pop %edi 10af3c: c9 leave 10af3d: c3 ret =============================================================================== 00108ec8 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 108ec8: 55 push %ebp 108ec9: 89 e5 mov %esp,%ebp 108ecb: 57 push %edi 108ecc: 56 push %esi 108ecd: 53 push %ebx 108ece: 83 ec 18 sub $0x18,%esp 108ed1: a1 a8 00 12 00 mov 0x1200a8,%eax 108ed6: 40 inc %eax 108ed7: a3 a8 00 12 00 mov %eax,0x1200a8 * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 108edc: 68 dc 04 12 00 push $0x1204dc 108ee1: e8 7e 21 00 00 call 10b064 <_Objects_Allocate> 108ee6: 89 45 f0 mov %eax,-0x10(%ebp) _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 108ee9: 83 c4 10 add $0x10,%esp 108eec: 85 c0 test %eax,%eax 108eee: 75 0f jne 108eff _Thread_Enable_dispatch(); 108ef0: e8 73 2d 00 00 call 10bc68 <_Thread_Enable_dispatch> 108ef5: b8 0b 00 00 00 mov $0xb,%eax 108efa: e9 c4 00 00 00 jmp 108fc3 return EAGAIN; } the_key->destructor = destructor; 108eff: 8b 45 0c mov 0xc(%ebp),%eax 108f02: 8b 55 f0 mov -0x10(%ebp),%edx 108f05: 89 42 14 mov %eax,0x14(%edx) 108f08: 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 ] ) { 108f0d: 8b 04 9d 7c 00 12 00 mov 0x12007c(,%ebx,4),%eax 108f14: 85 c0 test %eax,%eax 108f16: 74 6e je 108f86 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 108f18: 8b 40 04 mov 0x4(%eax),%eax 108f1b: 0f b7 40 10 movzwl 0x10(%eax),%eax 108f1f: 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 ); 108f26: 83 ec 0c sub $0xc,%esp 108f29: 56 push %esi 108f2a: e8 d2 3d 00 00 call 10cd01 <_Workspace_Allocate> 108f2f: 89 c7 mov %eax,%edi if ( !table ) { 108f31: 83 c4 10 add $0x10,%esp 108f34: 85 c0 test %eax,%eax 108f36: 75 3f jne 108f77 for ( --the_api; 108f38: 8d 73 ff lea -0x1(%ebx),%esi 108f3b: 8b 45 f0 mov -0x10(%ebp),%eax 108f3e: 8d 5c 98 14 lea 0x14(%eax,%ebx,4),%ebx 108f42: eb 11 jmp 108f55 the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 108f44: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108f47: ff 33 pushl (%ebx) <== NOT EXECUTED 108f49: e8 9e 3d 00 00 call 10ccec <_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-- ) 108f4e: 4e dec %esi <== NOT EXECUTED 108f4f: 83 eb 04 sub $0x4,%ebx <== NOT EXECUTED 108f52: 83 c4 10 add $0x10,%esp <== 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; 108f55: 85 f6 test %esi,%esi 108f57: 75 eb jne 108f44 <== NEVER TAKEN * 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 108f59: 50 push %eax 108f5a: 50 push %eax 108f5b: ff 75 f0 pushl -0x10(%ebp) 108f5e: 68 dc 04 12 00 push $0x1204dc 108f63: e8 0c 24 00 00 call 10b374 <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 108f68: e8 fb 2c 00 00 call 10bc68 <_Thread_Enable_dispatch> 108f6d: b8 0c 00 00 00 mov $0xc,%eax 108f72: 83 c4 10 add $0x10,%esp 108f75: eb 4c jmp 108fc3 return ENOMEM; } the_key->Values[ the_api ] = table; 108f77: 8b 55 f0 mov -0x10(%ebp),%edx 108f7a: 89 44 9a 18 mov %eax,0x18(%edx,%ebx,4) memset( table, '\0', bytes_to_allocate ); 108f7e: 89 f1 mov %esi,%ecx 108f80: 31 c0 xor %eax,%eax 108f82: f3 aa rep stos %al,%es:(%edi) 108f84: eb 0b jmp 108f91 } else { the_key->Values[ the_api ] = NULL; 108f86: 8b 55 f0 mov -0x10(%ebp),%edx 108f89: c7 44 9a 18 00 00 00 movl $0x0,0x18(%edx,%ebx,4) 108f90: 00 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 108f91: 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; 108f92: 83 fb 05 cmp $0x5,%ebx 108f95: 0f 85 72 ff ff ff jne 108f0d } } the_key->is_active = TRUE; 108f9b: 8b 5d f0 mov -0x10(%ebp),%ebx 108f9e: c6 43 10 01 movb $0x1,0x10(%ebx) 108fa2: 8b 4b 08 mov 0x8(%ebx),%ecx 108fa5: 0f b7 d1 movzwl %cx,%edx 108fa8: a1 f8 04 12 00 mov 0x1204f8,%eax 108fad: 89 1c 90 mov %ebx,(%eax,%edx,4) 108fb0: 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; 108fb7: 8b 45 08 mov 0x8(%ebp),%eax 108fba: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 108fbc: e8 a7 2c 00 00 call 10bc68 <_Thread_Enable_dispatch> 108fc1: 31 c0 xor %eax,%eax return 0; } 108fc3: 8d 65 f4 lea -0xc(%ebp),%esp 108fc6: 5b pop %ebx 108fc7: 5e pop %esi 108fc8: 5f pop %edi 108fc9: c9 leave 108fca: c3 ret =============================================================================== 00108fcc : */ int pthread_key_delete( pthread_key_t key ) { 108fcc: 55 push %ebp 108fcd: 89 e5 mov %esp,%ebp 108fcf: 53 push %ebx 108fd0: 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 ) 108fd3: 8d 45 f8 lea -0x8(%ebp),%eax 108fd6: 50 push %eax 108fd7: ff 75 08 pushl 0x8(%ebp) 108fda: 68 dc 04 12 00 push $0x1204dc 108fdf: e8 c4 24 00 00 call 10b4a8 <_Objects_Get> 108fe4: 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 ) { 108fe6: 83 c4 10 add $0x10,%esp 108fe9: b8 16 00 00 00 mov $0x16,%eax 108fee: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 108ff2: 75 77 jne 10906b <== NEVER TAKEN case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 108ff4: 52 push %edx 108ff5: 52 push %edx 108ff6: 53 push %ebx 108ff7: 68 dc 04 12 00 push $0x1204dc 108ffc: e8 d7 20 00 00 call 10b0d8 <_Objects_Close> the_key->is_active = FALSE; 109001: 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 ] ) 109005: 8b 43 1c mov 0x1c(%ebx),%eax 109008: 83 c4 10 add $0x10,%esp 10900b: 85 c0 test %eax,%eax 10900d: 74 0c je 10901b <== NEVER TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 10900f: 83 ec 0c sub $0xc,%esp 109012: 50 push %eax 109013: e8 d4 3c 00 00 call 10ccec <_Workspace_Free> 109018: 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 ] ) 10901b: 8b 43 20 mov 0x20(%ebx),%eax 10901e: 85 c0 test %eax,%eax 109020: 74 0c je 10902e <== NEVER TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 109022: 83 ec 0c sub $0xc,%esp 109025: 50 push %eax 109026: e8 c1 3c 00 00 call 10ccec <_Workspace_Free> 10902b: 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 ] ) 10902e: 8b 43 24 mov 0x24(%ebx),%eax 109031: 85 c0 test %eax,%eax 109033: 74 0c je 109041 <== NEVER TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 109035: 83 ec 0c sub $0xc,%esp 109038: 50 push %eax 109039: e8 ae 3c 00 00 call 10ccec <_Workspace_Free> 10903e: 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 ] ) 109041: 8b 43 28 mov 0x28(%ebx),%eax 109044: 85 c0 test %eax,%eax 109046: 74 0c je 109054 <== ALWAYS TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 109048: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10904b: 50 push %eax <== NOT EXECUTED 10904c: e8 9b 3c 00 00 call 10ccec <_Workspace_Free> <== NOT EXECUTED 109051: 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 109054: 50 push %eax 109055: 50 push %eax 109056: 53 push %ebx 109057: 68 dc 04 12 00 push $0x1204dc 10905c: e8 13 23 00 00 call 10b374 <_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(); 109061: e8 02 2c 00 00 call 10bc68 <_Thread_Enable_dispatch> 109066: 31 c0 xor %eax,%eax 109068: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10906b: 8b 5d fc mov -0x4(%ebp),%ebx 10906e: c9 leave 10906f: c3 ret =============================================================================== 0011877c : int pthread_kill( pthread_t thread, int sig ) { 11877c: 55 push %ebp 11877d: 89 e5 mov %esp,%ebp 11877f: 57 push %edi 118780: 56 push %esi 118781: 53 push %ebx 118782: 83 ec 1c sub $0x1c,%esp 118785: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 118788: 85 f6 test %esi,%esi 11878a: 74 08 je 118794 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 11878c: 8d 7e ff lea -0x1(%esi),%edi 11878f: 83 ff 1f cmp $0x1f,%edi 118792: 76 0d jbe 1187a1 rtems_set_errno_and_return_minus_one( EINVAL ); 118794: e8 83 7e ff ff call 11061c <__errno> 118799: c7 00 16 00 00 00 movl $0x16,(%eax) 11879f: eb 77 jmp 118818 the_thread = _Thread_Get( thread, &location ); 1187a1: 52 push %edx 1187a2: 52 push %edx 1187a3: 8d 45 f0 lea -0x10(%ebp),%eax 1187a6: 50 push %eax 1187a7: ff 75 08 pushl 0x8(%ebp) 1187aa: e8 a9 3a ff ff call 10c258 <_Thread_Get> 1187af: 89 c3 mov %eax,%ebx switch ( location ) { 1187b1: 83 c4 10 add $0x10,%esp 1187b4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 1187b8: 75 53 jne 11880d <== NEVER TAKEN case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1187ba: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1187c0: 6b c6 0c imul $0xc,%esi,%eax 1187c3: 83 b8 88 98 12 00 01 cmpl $0x1,0x129888(%eax) 1187ca: 74 38 je 118804 <== NEVER TAKEN return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 1187cc: b8 01 00 00 00 mov $0x1,%eax 1187d1: 89 f9 mov %edi,%ecx 1187d3: d3 e0 shl %cl,%eax 1187d5: 09 82 c8 00 00 00 or %eax,0xc8(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 1187db: 50 push %eax 1187dc: 6a 00 push $0x0 1187de: 56 push %esi 1187df: 53 push %ebx 1187e0: e8 a7 fe ff ff call 11868c <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 1187e5: c6 43 75 01 movb $0x1,0x75(%ebx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1187e9: a1 30 93 12 00 mov 0x129330,%eax 1187ee: 83 c4 10 add $0x10,%esp 1187f1: 85 c0 test %eax,%eax 1187f3: 74 0f je 118804 1187f5: 3b 1d 54 93 12 00 cmp 0x129354,%ebx 1187fb: 75 07 jne 118804 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = TRUE; 1187fd: c6 05 e8 93 12 00 01 movb $0x1,0x1293e8 <== NOT EXECUTED } _Thread_Enable_dispatch(); 118804: e8 03 3a ff ff call 10c20c <_Thread_Enable_dispatch> 118809: 31 c0 xor %eax,%eax 11880b: eb 0e jmp 11881b #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 11880d: e8 0a 7e ff ff call 11061c <__errno> <== NOT EXECUTED 118812: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 118818: 83 c8 ff or $0xffffffff,%eax } 11881b: 8d 65 f4 lea -0xc(%ebp),%esp 11881e: 5b pop %ebx 11881f: 5e pop %esi 118820: 5f pop %edi 118821: c9 leave 118822: c3 ret =============================================================================== 0010a898 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10a898: 55 push %ebp 10a899: 89 e5 mov %esp,%ebp 10a89b: 57 push %edi 10a89c: 56 push %esi 10a89d: 53 push %ebx 10a89e: 83 ec 0c sub $0xc,%esp 10a8a1: 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; 10a8a4: be 60 c3 11 00 mov $0x11c360,%esi 10a8a9: 85 c0 test %eax,%eax 10a8ab: 74 02 je 10a8af 10a8ad: 89 c6 mov %eax,%esi else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10a8af: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10a8b3: 0f 84 df 00 00 00 je 10a998 break; } } #endif if ( !the_attr->is_initialized ) 10a8b9: 83 3e 00 cmpl $0x0,(%esi) 10a8bc: 0f 84 d6 00 00 00 je 10a998 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 10a8c2: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10a8c6: 74 16 je 10a8de <== ALWAYS TAKEN 10a8c8: 68 74 c3 11 00 push $0x11c374 <== NOT EXECUTED 10a8cd: 68 f4 c3 11 00 push $0x11c3f4 <== NOT EXECUTED 10a8d2: 6a 68 push $0x68 <== NOT EXECUTED 10a8d4: 68 a8 c3 11 00 push $0x11c3a8 <== NOT EXECUTED 10a8d9: e8 6a d5 ff ff call 107e48 <__assert_func> <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10a8de: 8b 46 0c mov 0xc(%esi),%eax 10a8e1: 83 f8 01 cmp $0x1,%eax 10a8e4: 74 10 je 10a8f6 10a8e6: 83 f8 02 cmp $0x2,%eax 10a8e9: 74 12 je 10a8fd 10a8eb: 31 ff xor %edi,%edi 10a8ed: 85 c0 test %eax,%eax 10a8ef: 74 11 je 10a902 10a8f1: e9 a2 00 00 00 jmp 10a998 10a8f6: bf 02 00 00 00 mov $0x2,%edi 10a8fb: eb 05 jmp 10a902 10a8fd: bf 03 00 00 00 mov $0x3,%edi break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 10a902: 8b 46 08 mov 0x8(%esi),%eax 10a905: 48 dec %eax 10a906: 3d fd 00 00 00 cmp $0xfd,%eax 10a90b: 0f 87 87 00 00 00 ja 10a998 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a911: a1 68 2b 12 00 mov 0x122b68,%eax 10a916: 40 inc %eax 10a917: a3 68 2b 12 00 mov %eax,0x122b68 * It is a simple wrapper for the help with the addition of the * allocation mutex being used for protection. */ /**@{*/ #ifdef __cplusplus 10a91c: 83 ec 0c sub $0xc,%esp 10a91f: 68 18 2f 12 00 push $0x122f18 10a924: e8 f7 23 00 00 call 10cd20 <_Objects_Allocate> 10a929: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10a92b: 83 c4 10 add $0x10,%esp 10a92e: 85 c0 test %eax,%eax 10a930: 75 0c jne 10a93e _Thread_Enable_dispatch(); 10a932: e8 ed 2f 00 00 call 10d924 <_Thread_Enable_dispatch> 10a937: b8 0b 00 00 00 mov $0xb,%eax 10a93c: eb 5f jmp 10a99d return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10a93e: 8b 46 04 mov 0x4(%esi),%eax 10a941: 89 43 10 mov %eax,0x10(%ebx) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10a944: 31 c0 xor %eax,%eax 10a946: 83 7e 10 00 cmpl $0x0,0x10(%esi) 10a94a: 0f 94 c0 sete %al 10a94d: 89 43 54 mov %eax,0x54(%ebx) else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 10a950: c6 43 58 01 movb $0x1,0x58(%ebx) the_mutex_attr->priority_ceiling = 10a954: b8 ff 00 00 00 mov $0xff,%eax 10a959: 2b 46 08 sub 0x8(%esi),%eax 10a95c: 89 43 60 mov %eax,0x60(%ebx) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10a95f: 89 7b 5c mov %edi,0x5c(%ebx) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10a962: 50 push %eax 10a963: 6a 01 push $0x1 10a965: 8d 43 54 lea 0x54(%ebx),%eax 10a968: 50 push %eax 10a969: 8d 43 14 lea 0x14(%ebx),%eax 10a96c: 50 push %eax 10a96d: e8 12 1d 00 00 call 10c684 <_CORE_mutex_Initialize> 10a972: 8b 4b 08 mov 0x8(%ebx),%ecx 10a975: 0f b7 d1 movzwl %cx,%edx 10a978: a1 34 2f 12 00 mov 0x122f34,%eax 10a97d: 89 1c 90 mov %ebx,(%eax,%edx,4) 10a980: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 10a987: 8b 45 08 mov 0x8(%ebp),%eax 10a98a: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 10a98c: e8 93 2f 00 00 call 10d924 <_Thread_Enable_dispatch> 10a991: 31 c0 xor %eax,%eax 10a993: 83 c4 10 add $0x10,%esp 10a996: eb 05 jmp 10a99d return 0; 10a998: b8 16 00 00 00 mov $0x16,%eax } 10a99d: 8d 65 f4 lea -0xc(%ebp),%esp 10a9a0: 5b pop %ebx 10a9a1: 5e pop %esi 10a9a2: 5f pop %edi 10a9a3: c9 leave 10a9a4: c3 ret =============================================================================== 0010aa18 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10aa18: 55 push %ebp 10aa19: 89 e5 mov %esp,%ebp 10aa1b: 57 push %edi 10aa1c: 56 push %esi 10aa1d: 53 push %ebx 10aa1e: 83 ec 1c sub $0x1c,%esp 10aa21: 8b 75 08 mov 0x8(%ebp),%esi 10aa24: 8b 7d 10 mov 0x10(%ebp),%edi register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 10aa27: 85 ff test %edi,%edi 10aa29: 74 5f je 10aa8a return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10aa2b: 8b 45 0c mov 0xc(%ebp),%eax 10aa2e: 48 dec %eax 10aa2f: 3d fd 00 00 00 cmp $0xfd,%eax 10aa34: 77 54 ja 10aa8a /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 10aa36: 83 ec 0c sub $0xc,%esp 10aa39: 56 push %esi 10aa3a: e8 69 ff ff ff call 10a9a8 10aa3f: 89 c3 mov %eax,%ebx if ( status ) 10aa41: 83 c4 10 add $0x10,%esp 10aa44: 85 c0 test %eax,%eax 10aa46: 75 47 jne 10aa8f return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10aa48: 52 push %edx 10aa49: 52 push %edx 10aa4a: 8d 45 f0 lea -0x10(%ebp),%eax 10aa4d: 50 push %eax 10aa4e: 56 push %esi 10aa4f: e8 b9 fd ff ff call 10a80d <_POSIX_Mutex_Get> 10aa54: 89 c1 mov %eax,%ecx switch ( location ) { 10aa56: 83 c4 10 add $0x10,%esp 10aa59: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10aa5d: 75 2b jne 10aa8a <== NEVER TAKEN case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 10aa5f: b8 ff 00 00 00 mov $0xff,%eax 10aa64: 89 c2 mov %eax,%edx 10aa66: 2b 51 60 sub 0x60(%ecx),%edx 10aa69: 89 17 mov %edx,(%edi) the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 10aa6b: 2b 45 0c sub 0xc(%ebp),%eax 10aa6e: 89 41 60 mov %eax,0x60(%ecx) _CORE_mutex_Surrender( 10aa71: 50 push %eax 10aa72: 6a 00 push $0x0 10aa74: ff 71 08 pushl 0x8(%ecx) 10aa77: 8d 41 14 lea 0x14(%ecx),%eax 10aa7a: 50 push %eax 10aa7b: e8 80 1d 00 00 call 10c800 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10aa80: e8 9f 2e 00 00 call 10d924 <_Thread_Enable_dispatch> 10aa85: 83 c4 10 add $0x10,%esp 10aa88: eb 05 jmp 10aa8f return 0; 10aa8a: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10aa8f: 89 d8 mov %ebx,%eax 10aa91: 8d 65 f4 lea -0xc(%ebp),%esp 10aa94: 5b pop %ebx 10aa95: 5e pop %esi 10aa96: 5f pop %edi 10aa97: c9 leave 10aa98: c3 ret =============================================================================== 0010aa9c : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10aa9c: 55 push %ebp 10aa9d: 89 e5 mov %esp,%ebp 10aa9f: 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 ); 10aaa2: 8d 45 fc lea -0x4(%ebp),%eax 10aaa5: 50 push %eax 10aaa6: ff 75 0c pushl 0xc(%ebp) 10aaa9: e8 96 00 00 00 call 10ab44 <_POSIX_Absolute_timeout_to_ticks> switch ( status ) { 10aaae: 83 c4 10 add $0x10,%esp 10aab1: 31 d2 xor %edx,%edx 10aab3: 83 f8 02 cmp $0x2,%eax 10aab6: 76 07 jbe 10aabf <== NEVER TAKEN 10aab8: 83 f8 03 cmp $0x3,%eax 10aabb: 75 02 jne 10aabf <== NEVER TAKEN 10aabd: b2 01 mov $0x1,%dl case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 10aabf: 50 push %eax 10aac0: ff 75 fc pushl -0x4(%ebp) 10aac3: 0f b6 c2 movzbl %dl,%eax 10aac6: 50 push %eax 10aac7: ff 75 08 pushl 0x8(%ebp) 10aaca: e8 ed fe ff ff call 10a9bc <_POSIX_Mutex_Lock_support> break; } } return lock_status; } 10aacf: c9 leave 10aad0: c3 ret =============================================================================== 0010a72c : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10a72c: 55 push %ebp 10a72d: 89 e5 mov %esp,%ebp 10a72f: 8b 45 08 mov 0x8(%ebp),%eax 10a732: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10a735: 85 c0 test %eax,%eax 10a737: 74 11 je 10a74a 10a739: 83 38 00 cmpl $0x0,(%eax) 10a73c: 74 0c je 10a74a return EINVAL; switch ( pshared ) { 10a73e: 83 fa 01 cmp $0x1,%edx 10a741: 77 07 ja 10a74a <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10a743: 89 50 04 mov %edx,0x4(%eax) 10a746: 31 c0 xor %eax,%eax 10a748: eb 05 jmp 10a74f return 0; 10a74a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a74f: c9 leave 10a750: c3 ret =============================================================================== 0010a0b0 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10a0b0: 55 push %ebp 10a0b1: 89 e5 mov %esp,%ebp 10a0b3: 56 push %esi 10a0b4: 53 push %ebx 10a0b5: 83 ec 10 sub $0x10,%esp 10a0b8: 8b 5d 08 mov 0x8(%ebp),%ebx 10a0bb: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10a0be: 85 db test %ebx,%ebx 10a0c0: 74 04 je 10a0c6 10a0c2: 85 f6 test %esi,%esi 10a0c4: 75 07 jne 10a0cd 10a0c6: b8 16 00 00 00 mov $0x16,%eax 10a0cb: eb 4b jmp 10a118 return EINVAL; if ( !once_control->init_executed ) { 10a0cd: 31 c0 xor %eax,%eax 10a0cf: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a0d3: 75 43 jne 10a118 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10a0d5: 52 push %edx 10a0d6: 8d 45 f4 lea -0xc(%ebp),%eax 10a0d9: 50 push %eax 10a0da: 68 00 01 00 00 push $0x100 10a0df: 68 00 01 00 00 push $0x100 10a0e4: e8 8f 0c 00 00 call 10ad78 if ( !once_control->init_executed ) { 10a0e9: 83 c4 10 add $0x10,%esp 10a0ec: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a0f0: 75 0f jne 10a101 <== NEVER TAKEN once_control->is_initialized = TRUE; 10a0f2: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = TRUE; 10a0f8: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10a0ff: ff d6 call *%esi } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10a101: 50 push %eax 10a102: 8d 45 f4 lea -0xc(%ebp),%eax 10a105: 50 push %eax 10a106: 68 00 01 00 00 push $0x100 10a10b: ff 75 f4 pushl -0xc(%ebp) 10a10e: e8 65 0c 00 00 call 10ad78 10a113: 31 c0 xor %eax,%eax 10a115: 83 c4 10 add $0x10,%esp } return 0; } 10a118: 8d 65 f8 lea -0x8(%ebp),%esp 10a11b: 5b pop %ebx 10a11c: 5e pop %esi 10a11d: c9 leave 10a11e: c3 ret =============================================================================== 001097cc : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 1097cc: 55 push %ebp 1097cd: 89 e5 mov %esp,%ebp 1097cf: 56 push %esi 1097d0: 53 push %ebx 1097d1: 83 ec 10 sub $0x10,%esp 1097d4: 8b 75 08 mov 0x8(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 1097d7: 85 f6 test %esi,%esi 1097d9: 0f 84 82 00 00 00 je 109861 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 1097df: 8b 45 0c mov 0xc(%ebp),%eax 1097e2: 85 c0 test %eax,%eax 1097e4: 75 11 jne 1097f7 <== ALWAYS TAKEN the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 1097e6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1097e9: 8d 5d ec lea -0x14(%ebp),%ebx <== NOT EXECUTED 1097ec: 53 push %ebx <== NOT EXECUTED 1097ed: e8 9a 09 00 00 call 10a18c <== NOT EXECUTED 1097f2: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1097f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 1097f7: 83 38 00 cmpl $0x0,(%eax) 1097fa: 74 65 je 109861 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 1097fc: 83 78 04 00 cmpl $0x0,0x4(%eax) 109800: 75 5f jne 109861 <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109802: a1 d0 fb 11 00 mov 0x11fbd0,%eax 109807: 40 inc %eax 109808: a3 d0 fb 11 00 mov %eax,0x11fbd0 */ /**@{*/ #ifdef __cplusplus extern "C" { #endif 10980d: 83 ec 0c sub $0xc,%esp 109810: 68 00 fe 11 00 push $0x11fe00 109815: e8 2e 25 00 00 call 10bd48 <_Objects_Allocate> 10981a: 89 c3 mov %eax,%ebx */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10981c: 83 c4 10 add $0x10,%esp 10981f: 85 c0 test %eax,%eax 109821: 75 0c jne 10982f _Thread_Enable_dispatch(); 109823: e8 24 31 00 00 call 10c94c <_Thread_Enable_dispatch> 109828: b8 0b 00 00 00 mov $0xb,%eax 10982d: eb 37 jmp 109866 return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10982f: 50 push %eax 109830: 50 push %eax 109831: 8d 45 f4 lea -0xc(%ebp),%eax 109834: 50 push %eax 109835: 8d 43 10 lea 0x10(%ebx),%eax 109838: 50 push %eax 109839: e8 ae 1e 00 00 call 10b6ec <_CORE_RWLock_Initialize> 10983e: 8b 4b 08 mov 0x8(%ebx),%ecx 109841: 0f b7 d1 movzwl %cx,%edx 109844: a1 1c fe 11 00 mov 0x11fe1c,%eax 109849: 89 1c 90 mov %ebx,(%eax,%edx,4) 10984c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 109853: 89 0e mov %ecx,(%esi) _Thread_Enable_dispatch(); 109855: e8 f2 30 00 00 call 10c94c <_Thread_Enable_dispatch> 10985a: 31 c0 xor %eax,%eax 10985c: 83 c4 10 add $0x10,%esp 10985f: eb 05 jmp 109866 return 0; 109861: b8 16 00 00 00 mov $0x16,%eax } 109866: 8d 65 f8 lea -0x8(%ebp),%esp 109869: 5b pop %ebx 10986a: 5e pop %esi 10986b: c9 leave 10986c: c3 ret =============================================================================== 001098d4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 1098d4: 55 push %ebp 1098d5: 89 e5 mov %esp,%ebp 1098d7: 57 push %edi 1098d8: 56 push %esi 1098d9: 53 push %ebx 1098da: 83 ec 1c sub $0x1c,%esp 1098dd: 8b 7d 08 mov 0x8(%ebp),%edi Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 1098e0: 85 ff test %edi,%edi 1098e2: 0f 84 8e 00 00 00 je 109976 * 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 ); 1098e8: 52 push %edx 1098e9: 52 push %edx 1098ea: 8d 45 ec lea -0x14(%ebp),%eax 1098ed: 50 push %eax 1098ee: ff 75 0c pushl 0xc(%ebp) 1098f1: e8 22 5a 00 00 call 10f318 <_POSIX_Absolute_timeout_to_ticks> 1098f6: 89 c6 mov %eax,%esi switch (status) { 1098f8: 83 c4 10 add $0x10,%esp 1098fb: 31 db xor %ebx,%ebx 1098fd: 83 f8 02 cmp $0x2,%eax 109900: 76 07 jbe 109909 109902: 83 f8 03 cmp $0x3,%eax 109905: 75 02 jne 109909 <== NEVER TAKEN 109907: b3 01 mov $0x1,%bl 109909: 50 push %eax 10990a: 8d 45 f0 lea -0x10(%ebp),%eax 10990d: 50 push %eax 10990e: ff 37 pushl (%edi) 109910: 68 00 fe 11 00 push $0x11fe00 109915: e8 72 28 00 00 call 10c18c <_Objects_Get> 10991a: 89 c2 mov %eax,%edx do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10991c: 83 c4 10 add $0x10,%esp 10991f: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 109923: 75 51 jne 109976 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 109925: 83 ec 0c sub $0xc,%esp 109928: 6a 00 push $0x0 10992a: ff 75 ec pushl -0x14(%ebp) 10992d: 0f b6 c3 movzbl %bl,%eax 109930: 50 push %eax 109931: ff 37 pushl (%edi) 109933: 8d 42 10 lea 0x10(%edx),%eax 109936: 50 push %eax 109937: e8 e4 1d 00 00 call 10b720 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10993c: 83 c4 20 add $0x20,%esp 10993f: e8 08 30 00 00 call 10c94c <_Thread_Enable_dispatch> if ( !do_wait && 109944: 84 db test %bl,%bl 109946: 75 19 jne 109961 <== ALWAYS TAKEN 109948: a1 90 fc 11 00 mov 0x11fc90,%eax <== NOT EXECUTED 10994d: 83 78 34 02 cmpl $0x2,0x34(%eax) <== NOT EXECUTED 109951: 75 0e jne 109961 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 109953: 85 f6 test %esi,%esi <== NOT EXECUTED 109955: 74 1f je 109976 <== NOT EXECUTED 109957: b8 74 00 00 00 mov $0x74,%eax <== NOT EXECUTED 10995c: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 10995f: 76 1a jbe 10997b <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 109961: 83 ec 0c sub $0xc,%esp 109964: a1 90 fc 11 00 mov 0x11fc90,%eax 109969: ff 70 34 pushl 0x34(%eax) 10996c: e8 c3 00 00 00 call 109a34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 109971: 83 c4 10 add $0x10,%esp 109974: eb 05 jmp 10997b 109976: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10997b: 8d 65 f4 lea -0xc(%ebp),%esp 10997e: 5b pop %ebx 10997f: 5e pop %esi 109980: 5f pop %edi 109981: c9 leave 109982: c3 ret =============================================================================== 00109984 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 109984: 55 push %ebp 109985: 89 e5 mov %esp,%ebp 109987: 57 push %edi 109988: 56 push %esi 109989: 53 push %ebx 10998a: 83 ec 1c sub $0x1c,%esp 10998d: 8b 7d 08 mov 0x8(%ebp),%edi Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 109990: 85 ff test %edi,%edi 109992: 0f 84 8e 00 00 00 je 109a26 * 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 ); 109998: 52 push %edx 109999: 52 push %edx 10999a: 8d 45 ec lea -0x14(%ebp),%eax 10999d: 50 push %eax 10999e: ff 75 0c pushl 0xc(%ebp) 1099a1: e8 72 59 00 00 call 10f318 <_POSIX_Absolute_timeout_to_ticks> 1099a6: 89 c6 mov %eax,%esi switch (status) { 1099a8: 83 c4 10 add $0x10,%esp 1099ab: 31 db xor %ebx,%ebx 1099ad: 83 f8 02 cmp $0x2,%eax 1099b0: 76 07 jbe 1099b9 1099b2: 83 f8 03 cmp $0x3,%eax 1099b5: 75 02 jne 1099b9 <== NEVER TAKEN 1099b7: b3 01 mov $0x1,%bl 1099b9: 50 push %eax 1099ba: 8d 45 f0 lea -0x10(%ebp),%eax 1099bd: 50 push %eax 1099be: ff 37 pushl (%edi) 1099c0: 68 00 fe 11 00 push $0x11fe00 1099c5: e8 c2 27 00 00 call 10c18c <_Objects_Get> 1099ca: 89 c2 mov %eax,%edx do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 1099cc: 83 c4 10 add $0x10,%esp 1099cf: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 1099d3: 75 51 jne 109a26 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 1099d5: 83 ec 0c sub $0xc,%esp 1099d8: 6a 00 push $0x0 1099da: ff 75 ec pushl -0x14(%ebp) 1099dd: 0f b6 c3 movzbl %bl,%eax 1099e0: 50 push %eax 1099e1: ff 37 pushl (%edi) 1099e3: 8d 42 10 lea 0x10(%edx),%eax 1099e6: 50 push %eax 1099e7: e8 e8 1d 00 00 call 10b7d4 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 1099ec: 83 c4 20 add $0x20,%esp 1099ef: e8 58 2f 00 00 call 10c94c <_Thread_Enable_dispatch> if ( !do_wait && 1099f4: 84 db test %bl,%bl 1099f6: 75 19 jne 109a11 <== ALWAYS TAKEN 1099f8: a1 90 fc 11 00 mov 0x11fc90,%eax <== NOT EXECUTED 1099fd: 83 78 34 02 cmpl $0x2,0x34(%eax) <== NOT EXECUTED 109a01: 75 0e jne 109a11 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 109a03: 85 f6 test %esi,%esi <== NOT EXECUTED 109a05: 74 1f je 109a26 <== NOT EXECUTED 109a07: b8 74 00 00 00 mov $0x74,%eax <== NOT EXECUTED 109a0c: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 109a0f: 76 1a jbe 109a2b <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 109a11: 83 ec 0c sub $0xc,%esp 109a14: a1 90 fc 11 00 mov 0x11fc90,%eax 109a19: ff 70 34 pushl 0x34(%eax) 109a1c: e8 13 00 00 00 call 109a34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 109a21: 83 c4 10 add $0x10,%esp 109a24: eb 05 jmp 109a2b 109a26: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 109a2b: 8d 65 f4 lea -0xc(%ebp),%esp 109a2e: 5b pop %ebx 109a2f: 5e pop %esi 109a30: 5f pop %edi 109a31: c9 leave 109a32: c3 ret =============================================================================== 0010a1ac : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10a1ac: 55 push %ebp 10a1ad: 89 e5 mov %esp,%ebp 10a1af: 8b 45 08 mov 0x8(%ebp),%eax 10a1b2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10a1b5: 85 c0 test %eax,%eax 10a1b7: 74 11 je 10a1ca return EINVAL; if ( !attr->is_initialized ) 10a1b9: 83 38 00 cmpl $0x0,(%eax) 10a1bc: 74 0c je 10a1ca return EINVAL; switch ( pshared ) { 10a1be: 83 fa 01 cmp $0x1,%edx 10a1c1: 77 07 ja 10a1ca <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10a1c3: 89 50 04 mov %edx,0x4(%eax) 10a1c6: 31 c0 xor %eax,%eax 10a1c8: eb 05 jmp 10a1cf return 0; 10a1ca: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a1cf: c9 leave 10a1d0: c3 ret =============================================================================== 00109164 : int pthread_setcancelstate( int state, int *oldstate ) { 109164: 55 push %ebp 109165: 89 e5 mov %esp,%ebp 109167: 53 push %ebx 109168: 83 ec 04 sub $0x4,%esp 10916b: 8b 4d 08 mov 0x8(%ebp),%ecx 10916e: 8b 5d 0c mov 0xc(%ebp),%ebx * 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() ) 109171: a1 84 f5 11 00 mov 0x11f584,%eax 109176: ba 47 00 00 00 mov $0x47,%edx 10917b: 85 c0 test %eax,%eax 10917d: 75 6e jne 1091ed <== NEVER TAKEN return EPROTO; if ( !oldstate ) 10917f: 85 db test %ebx,%ebx 109181: 74 65 je 1091e8 <== NEVER TAKEN return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 109183: 83 f9 01 cmp $0x1,%ecx 109186: 77 60 ja 1091e8 <== NEVER TAKEN return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109188: a1 a8 f5 11 00 mov 0x11f5a8,%eax 10918d: 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 109193: a1 e8 f4 11 00 mov 0x11f4e8,%eax 109198: 40 inc %eax 109199: a3 e8 f4 11 00 mov %eax,0x11f4e8 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10919e: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 1091a4: 89 03 mov %eax,(%ebx) thread_support->cancelability_state = state; 1091a6: 89 8a cc 00 00 00 mov %ecx,0xcc(%edx) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 1091ac: 85 c9 test %ecx,%ecx 1091ae: 75 15 jne 1091c5 <== NEVER TAKEN 1091b0: 83 ba d0 00 00 00 01 cmpl $0x1,0xd0(%edx) 1091b7: 75 0c jne 1091c5 <== ALWAYS TAKEN 1091b9: 83 ba d4 00 00 00 00 cmpl $0x0,0xd4(%edx) <== NOT EXECUTED 1091c0: 0f 95 c3 setne %bl <== NOT EXECUTED 1091c3: eb 02 jmp 1091c7 <== NOT EXECUTED 1091c5: 31 db xor %ebx,%ebx thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 1091c7: e8 00 26 00 00 call 10b7cc <_Thread_Enable_dispatch> if ( cancel ) 1091cc: 31 d2 xor %edx,%edx 1091ce: 84 db test %bl,%bl 1091d0: 74 1b je 1091ed <== ALWAYS TAKEN _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 1091d2: 50 push %eax <== NOT EXECUTED 1091d3: 50 push %eax <== NOT EXECUTED 1091d4: 6a ff push $0xffffffff <== NOT EXECUTED 1091d6: ff 35 a8 f5 11 00 pushl 0x11f5a8 <== NOT EXECUTED 1091dc: e8 83 fb ff ff call 108d64 <_POSIX_Thread_Exit> <== NOT EXECUTED 1091e1: 31 d2 xor %edx,%edx <== NOT EXECUTED 1091e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1091e6: eb 05 jmp 1091ed <== NOT EXECUTED 1091e8: ba 16 00 00 00 mov $0x16,%edx <== NOT EXECUTED return 0; } 1091ed: 89 d0 mov %edx,%eax 1091ef: 8b 5d fc mov -0x4(%ebp),%ebx 1091f2: c9 leave 1091f3: c3 ret =============================================================================== 001091f4 : int pthread_setcanceltype( int type, int *oldtype ) { 1091f4: 55 push %ebp 1091f5: 89 e5 mov %esp,%ebp 1091f7: 53 push %ebx 1091f8: 83 ec 04 sub $0x4,%esp 1091fb: 8b 4d 08 mov 0x8(%ebp),%ecx 1091fe: 8b 5d 0c mov 0xc(%ebp),%ebx * 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() ) 109201: a1 84 f5 11 00 mov 0x11f584,%eax 109206: ba 47 00 00 00 mov $0x47,%edx 10920b: 85 c0 test %eax,%eax 10920d: 75 6d jne 10927c <== NEVER TAKEN return EPROTO; if ( !oldtype ) 10920f: 85 db test %ebx,%ebx 109211: 74 64 je 109277 <== NEVER TAKEN return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 109213: 83 f9 01 cmp $0x1,%ecx 109216: 77 5f ja 109277 <== NEVER TAKEN return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109218: a1 a8 f5 11 00 mov 0x11f5a8,%eax 10921d: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 109223: a1 e8 f4 11 00 mov 0x11f4e8,%eax 109228: 40 inc %eax 109229: a3 e8 f4 11 00 mov %eax,0x11f4e8 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10922e: 8b 82 d0 00 00 00 mov 0xd0(%edx),%eax 109234: 89 03 mov %eax,(%ebx) thread_support->cancelability_type = type; 109236: 89 8a d0 00 00 00 mov %ecx,0xd0(%edx) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10923c: 83 ba cc 00 00 00 00 cmpl $0x0,0xcc(%edx) 109243: 75 0f jne 109254 <== NEVER TAKEN 109245: 49 dec %ecx 109246: 75 0c jne 109254 109248: 83 ba d4 00 00 00 00 cmpl $0x0,0xd4(%edx) 10924f: 0f 95 c3 setne %bl 109252: eb 02 jmp 109256 109254: 31 db xor %ebx,%ebx thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 109256: e8 71 25 00 00 call 10b7cc <_Thread_Enable_dispatch> if ( cancel ) 10925b: 31 d2 xor %edx,%edx 10925d: 84 db test %bl,%bl 10925f: 74 1b je 10927c <== ALWAYS TAKEN _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 109261: 50 push %eax <== NOT EXECUTED 109262: 50 push %eax <== NOT EXECUTED 109263: 6a ff push $0xffffffff <== NOT EXECUTED 109265: ff 35 a8 f5 11 00 pushl 0x11f5a8 <== NOT EXECUTED 10926b: e8 f4 fa ff ff call 108d64 <_POSIX_Thread_Exit> <== NOT EXECUTED 109270: 31 d2 xor %edx,%edx <== NOT EXECUTED 109272: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109275: eb 05 jmp 10927c <== NOT EXECUTED 109277: ba 16 00 00 00 mov $0x16,%edx <== NOT EXECUTED return 0; } 10927c: 89 d0 mov %edx,%eax 10927e: 8b 5d fc mov -0x4(%ebp),%ebx 109281: c9 leave 109282: c3 ret =============================================================================== 0010b2b4 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 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 2c sub $0x2c,%esp /* * Check all the parameters */ if ( !param ) 10b2bd: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10b2c1: 0f 84 7e 01 00 00 je 10b445 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 10b2c7: 8b 55 10 mov 0x10(%ebp),%edx 10b2ca: 8b 02 mov (%edx),%eax 10b2cc: 48 dec %eax 10b2cd: 3d fd 00 00 00 cmp $0xfd,%eax 10b2d2: 0f 87 6d 01 00 00 ja 10b445 <== NEVER TAKEN return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 10b2d8: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b2dc: 74 1f je 10b2fd 10b2de: 7f 0b jg 10b2eb 10b2e0: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10b2e4: 74 20 je 10b306 10b2e6: e9 5a 01 00 00 jmp 10b445 10b2eb: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10b2ef: 74 25 je 10b316 10b2f1: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10b2f5: 0f 85 4a 01 00 00 jne 10b445 <== NEVER TAKEN 10b2fb: eb 22 jmp 10b31f 10b2fd: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) 10b304: eb 07 jmp 10b30d 10b306: c7 45 dc 01 00 00 00 movl $0x1,-0x24(%ebp) 10b30d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10b314: eb 53 jmp 10b369 10b316: c7 45 dc 02 00 00 00 movl $0x2,-0x24(%ebp) 10b31d: eb ee jmp 10b30d 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 ) < 10b31f: 83 ec 0c sub $0xc,%esp 10b322: 8b 45 10 mov 0x10(%ebp),%eax 10b325: 83 c0 08 add $0x8,%eax 10b328: 50 push %eax 10b329: e8 d2 31 00 00 call 10e500 <_Timespec_To_ticks> 10b32e: 89 c3 mov %eax,%ebx 10b330: 8b 45 10 mov 0x10(%ebp),%eax 10b333: 83 c0 10 add $0x10,%eax 10b336: 89 04 24 mov %eax,(%esp) 10b339: e8 c2 31 00 00 call 10e500 <_Timespec_To_ticks> 10b33e: 83 c4 10 add $0x10,%esp 10b341: 39 c3 cmp %eax,%ebx 10b343: 0f 82 fc 00 00 00 jb 10b445 <== NEVER TAKEN _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 10b349: 8b 75 10 mov 0x10(%ebp),%esi 10b34c: 8b 46 04 mov 0x4(%esi),%eax 10b34f: 48 dec %eax 10b350: 3d fd 00 00 00 cmp $0xfd,%eax 10b355: 0f 87 ea 00 00 00 ja 10b445 10b35b: c7 45 dc 03 00 00 00 movl $0x3,-0x24(%ebp) 10b362: c7 45 e0 dc b1 10 00 movl $0x10b1dc,-0x20(%ebp) static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) 10b369: 53 push %ebx 10b36a: 8d 45 f0 lea -0x10(%ebp),%eax 10b36d: 50 push %eax 10b36e: ff 75 08 pushl 0x8(%ebp) 10b371: 68 d8 2d 12 00 push $0x122dd8 10b376: e8 e9 1d 00 00 call 10d164 <_Objects_Get> 10b37b: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b37e: 83 c4 10 add $0x10,%esp 10b381: b8 03 00 00 00 mov $0x3,%eax 10b386: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10b38a: 0f 85 ba 00 00 00 jne 10b44a case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b390: 8b 45 d4 mov -0x2c(%ebp),%eax 10b393: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx if ( api->schedpolicy == SCHED_SPORADIC ) 10b399: 83 7b 7c 03 cmpl $0x3,0x7c(%ebx) 10b39d: 75 12 jne 10b3b1 (void) _Watchdog_Remove( &api->Sporadic_timer ); 10b39f: 83 ec 0c sub $0xc,%esp 10b3a2: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax 10b3a8: 50 push %eax 10b3a9: e8 72 35 00 00 call 10e920 <_Watchdog_Remove> 10b3ae: 83 c4 10 add $0x10,%esp api->schedpolicy = policy; 10b3b1: 8b 55 0c mov 0xc(%ebp),%edx 10b3b4: 89 53 7c mov %edx,0x7c(%ebx) api->schedparam = *param; 10b3b7: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 10b3bd: b9 06 00 00 00 mov $0x6,%ecx 10b3c2: 8b 75 10 mov 0x10(%ebp),%esi 10b3c5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10b3c7: 8b 55 dc mov -0x24(%ebp),%edx 10b3ca: 8b 45 d4 mov -0x2c(%ebp),%eax 10b3cd: 89 50 7c mov %edx,0x7c(%eax) the_thread->budget_callout = budget_callout; 10b3d0: 8b 75 e0 mov -0x20(%ebp),%esi 10b3d3: 89 b0 80 00 00 00 mov %esi,0x80(%eax) switch ( api->schedpolicy ) { 10b3d9: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10b3dd: 78 5d js 10b43c <== NEVER TAKEN 10b3df: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10b3e3: 7e 08 jle 10b3ed 10b3e5: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10b3e9: 75 51 jne 10b43c <== NEVER TAKEN 10b3eb: eb 25 jmp 10b412 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10b3ed: a1 34 2b 12 00 mov 0x122b34,%eax 10b3f2: 8b 55 d4 mov -0x2c(%ebp),%edx 10b3f5: 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 10b3f8: b8 ff 00 00 00 mov $0xff,%eax 10b3fd: 2b 83 80 00 00 00 sub 0x80(%ebx),%eax the_thread->real_priority = 10b403: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10b406: 51 push %ecx 10b407: 6a 01 push $0x1 10b409: 50 push %eax 10b40a: 52 push %edx 10b40b: e8 74 20 00 00 call 10d484 <_Thread_Change_priority> 10b410: eb 27 jmp 10b439 TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10b412: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10b418: 89 83 98 00 00 00 mov %eax,0x98(%ebx) _Watchdog_Remove( &api->Sporadic_timer ); 10b41e: 83 ec 0c sub $0xc,%esp 10b421: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax 10b427: 50 push %eax 10b428: e8 f3 34 00 00 call 10e920 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10b42d: 58 pop %eax 10b42e: 5a pop %edx 10b42f: ff 75 d4 pushl -0x2c(%ebp) 10b432: 6a 00 push $0x0 10b434: e8 e1 fd ff ff call 10b21a <_POSIX_Threads_Sporadic_budget_TSR> 10b439: 83 c4 10 add $0x10,%esp break; } _Thread_Enable_dispatch(); 10b43c: e8 e3 24 00 00 call 10d924 <_Thread_Enable_dispatch> 10b441: 31 c0 xor %eax,%eax 10b443: eb 05 jmp 10b44a return 0; 10b445: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b44a: 8d 65 f4 lea -0xc(%ebp),%esp 10b44d: 5b pop %ebx 10b44e: 5e pop %esi 10b44f: 5f pop %edi 10b450: c9 leave 10b451: c3 ret =============================================================================== 0010e898 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 10e898: 55 push %ebp 10e899: 89 e5 mov %esp,%ebp 10e89b: 57 push %edi 10e89c: 56 push %esi 10e89d: 53 push %ebx 10e89e: 83 ec 0c sub $0xc,%esp 10e8a1: 8b 75 08 mov 0x8(%ebp),%esi 10e8a4: 8b 5d 0c mov 0xc(%ebp),%ebx 10e8a7: 8b 55 10 mov 0x10(%ebp),%edx POSIX_API_Control *api; if ( !set && !oset ) 10e8aa: 85 db test %ebx,%ebx 10e8ac: 0f 94 45 f3 sete -0xd(%ebp) 10e8b0: 75 04 jne 10e8b6 10e8b2: 85 d2 test %edx,%edx 10e8b4: 74 4e je 10e904 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10e8b6: 8b 3d b8 01 12 00 mov 0x1201b8,%edi 10e8bc: 8b 8f f8 00 00 00 mov 0xf8(%edi),%ecx if ( oset ) 10e8c2: 85 d2 test %edx,%edx 10e8c4: 74 08 je 10e8ce *oset = api->signals_blocked; 10e8c6: 8b 81 c4 00 00 00 mov 0xc4(%ecx),%eax 10e8cc: 89 02 mov %eax,(%edx) if ( !set ) 10e8ce: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10e8d2: 75 61 jne 10e935 <== NEVER TAKEN return 0; switch ( how ) { 10e8d4: 83 fe 01 cmp $0x1,%esi 10e8d7: 74 0b je 10e8e4 10e8d9: 83 fe 02 cmp $0x2,%esi 10e8dc: 74 10 je 10e8ee 10e8de: 85 f6 test %esi,%esi 10e8e0: 74 18 je 10e8fa 10e8e2: eb 20 jmp 10e904 case SIG_BLOCK: api->signals_blocked |= *set; 10e8e4: 8b 03 mov (%ebx),%eax 10e8e6: 09 81 c4 00 00 00 or %eax,0xc4(%ecx) 10e8ec: eb 26 jmp 10e914 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 10e8ee: 8b 03 mov (%ebx),%eax 10e8f0: f7 d0 not %eax 10e8f2: 21 81 c4 00 00 00 and %eax,0xc4(%ecx) 10e8f8: eb 1a jmp 10e914 break; case SIG_SETMASK: api->signals_blocked = *set; 10e8fa: 8b 03 mov (%ebx),%eax 10e8fc: 89 81 c4 00 00 00 mov %eax,0xc4(%ecx) 10e902: eb 10 jmp 10e914 break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10e904: e8 07 16 00 00 call 10ff10 <__errno> 10e909: c7 00 16 00 00 00 movl $0x16,(%eax) 10e90f: 83 c8 ff or $0xffffffff,%eax 10e912: eb 23 jmp 10e937 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 10e914: 8b 15 68 08 12 00 mov 0x120868,%edx 10e91a: 0b 91 c8 00 00 00 or 0xc8(%ecx),%edx 10e920: 8b 81 c4 00 00 00 mov 0xc4(%ecx),%eax 10e926: f7 d0 not %eax 10e928: 85 c2 test %eax,%edx 10e92a: 74 09 je 10e935 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 10e92c: c6 47 75 01 movb $0x1,0x75(%edi) _Thread_Dispatch(); 10e930: e8 6b d2 ff ff call 10bba0 <_Thread_Dispatch> 10e935: 31 c0 xor %eax,%eax } return 0; } 10e937: 83 c4 0c add $0xc,%esp 10e93a: 5b pop %ebx 10e93b: 5e pop %esi 10e93c: 5f pop %edi 10e93d: c9 leave 10e93e: c3 ret =============================================================================== 001092ac : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 1092ac: 55 push %ebp 1092ad: 89 e5 mov %esp,%ebp 1092af: 53 push %ebx 1092b0: 83 ec 04 sub $0x4,%esp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 1092b3: a1 84 f5 11 00 mov 0x11f584,%eax 1092b8: 85 c0 test %eax,%eax 1092ba: 75 46 jne 109302 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 1092bc: a1 a8 f5 11 00 mov 0x11f5a8,%eax 1092c1: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 1092c7: a1 e8 f4 11 00 mov 0x11f4e8,%eax 1092cc: 40 inc %eax 1092cd: a3 e8 f4 11 00 mov %eax,0x11f4e8 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 1092d2: 31 db xor %ebx,%ebx 1092d4: 83 ba cc 00 00 00 00 cmpl $0x0,0xcc(%edx) 1092db: 75 0a jne 1092e7 <== NEVER TAKEN 1092dd: 83 ba d4 00 00 00 00 cmpl $0x0,0xd4(%edx) 1092e4: 0f 95 c3 setne %bl thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 1092e7: e8 e0 24 00 00 call 10b7cc <_Thread_Enable_dispatch> if ( cancel ) 1092ec: 84 db test %bl,%bl 1092ee: 74 12 je 109302 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 1092f0: 50 push %eax 1092f1: 50 push %eax 1092f2: 6a ff push $0xffffffff 1092f4: ff 35 a8 f5 11 00 pushl 0x11f5a8 1092fa: e8 65 fa ff ff call 108d64 <_POSIX_Thread_Exit> 1092ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109302: 8b 5d fc mov -0x4(%ebp),%ebx 109305: c9 leave 109306: c3 ret =============================================================================== 00109568 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 109568: 55 push %ebp 109569: 89 e5 mov %esp,%ebp 10956b: 57 push %edi 10956c: 56 push %esi 10956d: 53 push %ebx 10956e: 83 ec 1c sub $0x1c,%esp 109571: 8b 75 0c mov 0xc(%ebp),%esi 109574: 8b 55 10 mov 0x10(%ebp),%edx 109577: 8b 7d 14 mov 0x14(%ebp),%edi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 10957a: b8 03 00 00 00 mov $0x3,%eax 10957f: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 109583: 0f 84 90 00 00 00 je 109619 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 109589: b8 09 00 00 00 mov $0x9,%eax 10958e: 85 ff test %edi,%edi 109590: 0f 84 83 00 00 00 je 109619 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 109596: f7 c6 10 00 00 00 test $0x10,%esi 10959c: 74 12 je 1095b0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 10959e: b8 0a 00 00 00 mov $0xa,%eax 1095a3: 85 d2 test %edx,%edx 1095a5: 74 72 je 109619 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1095a7: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 1095ae: eb 07 jmp 1095b7 if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 1095b0: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp) the_attributes.maximum_count = maximum_waiters; 1095b7: 89 55 f0 mov %edx,-0x10(%ebp) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 1095ba: a1 cc 12 12 00 mov 0x1212cc,%eax 1095bf: 40 inc %eax 1095c0: a3 cc 12 12 00 mov %eax,0x1212cc #ifdef __cplusplus extern "C" { #endif /** 1095c5: 83 ec 0c sub $0xc,%esp 1095c8: 68 d4 11 12 00 push $0x1211d4 1095cd: e8 62 1b 00 00 call 10b134 <_Objects_Allocate> 1095d2: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 1095d4: 83 c4 10 add $0x10,%esp 1095d7: 85 c0 test %eax,%eax 1095d9: 75 0c jne 1095e7 _Thread_Enable_dispatch(); 1095db: e8 58 27 00 00 call 10bd38 <_Thread_Enable_dispatch> 1095e0: b8 05 00 00 00 mov $0x5,%eax 1095e5: eb 32 jmp 109619 return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 1095e7: 89 70 10 mov %esi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 1095ea: 50 push %eax 1095eb: 50 push %eax 1095ec: 8d 45 ec lea -0x14(%ebp),%eax 1095ef: 50 push %eax 1095f0: 8d 43 14 lea 0x14(%ebx),%eax 1095f3: 50 push %eax 1095f4: e8 07 13 00 00 call 10a900 <_CORE_barrier_Initialize> 1095f9: 8b 4b 08 mov 0x8(%ebx),%ecx 1095fc: 0f b7 d1 movzwl %cx,%edx 1095ff: a1 f0 11 12 00 mov 0x1211f0,%eax 109604: 89 1c 90 mov %ebx,(%eax,%edx,4) 109607: 8b 45 08 mov 0x8(%ebp),%eax 10960a: 89 43 0c mov %eax,0xc(%ebx) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 10960d: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 10960f: e8 24 27 00 00 call 10bd38 <_Thread_Enable_dispatch> 109614: 31 c0 xor %eax,%eax 109616: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 109619: 8d 65 f4 lea -0xc(%ebp),%esp 10961c: 5b pop %ebx 10961d: 5e pop %esi 10961e: 5f pop %edi 10961f: c9 leave 109620: c3 ret =============================================================================== 001096a8 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 1096a8: 55 push %ebp 1096a9: 89 e5 mov %esp,%ebp 1096ab: 56 push %esi 1096ac: 53 push %ebx 1096ad: 83 ec 10 sub $0x10,%esp 1096b0: 8b 5d 08 mov 0x8(%ebp),%ebx 1096b3: 8b 75 0c mov 0xc(%ebp),%esi Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 1096b6: b8 09 00 00 00 mov $0x9,%eax 1096bb: 85 f6 test %esi,%esi 1096bd: 74 39 je 1096f8 <== 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 1096bf: 52 push %edx 1096c0: 8d 45 f4 lea -0xc(%ebp),%eax 1096c3: 50 push %eax 1096c4: 53 push %ebx 1096c5: 68 d4 11 12 00 push $0x1211d4 1096ca: e8 a9 1e 00 00 call 10b578 <_Objects_Get> 1096cf: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1096d1: 83 c4 10 add $0x10,%esp 1096d4: b8 04 00 00 00 mov $0x4,%eax 1096d9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1096dd: 75 19 jne 1096f8 case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 1096df: 50 push %eax 1096e0: 6a 00 push $0x0 1096e2: 53 push %ebx 1096e3: 8d 42 14 lea 0x14(%edx),%eax 1096e6: 50 push %eax 1096e7: e8 48 12 00 00 call 10a934 <_CORE_barrier_Release> 1096ec: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 1096ee: e8 45 26 00 00 call 10bd38 <_Thread_Enable_dispatch> 1096f3: 31 c0 xor %eax,%eax 1096f5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1096f8: 8d 65 f8 lea -0x8(%ebp),%esp 1096fb: 5b pop %ebx 1096fc: 5e pop %esi 1096fd: c9 leave 1096fe: c3 ret =============================================================================== 00108984 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 108984: 55 push %ebp 108985: 89 e5 mov %esp,%ebp 108987: 53 push %ebx 108988: 83 ec 04 sub $0x4,%esp 10898b: 8b 55 08 mov 0x8(%ebp),%edx 10898e: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 108991: b8 09 00 00 00 mov $0x9,%eax 108996: 85 db test %ebx,%ebx 108998: 74 44 je 1089de <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; switch ( option ) { 10899a: b8 0a 00 00 00 mov $0xa,%eax 10899f: 83 fa 04 cmp $0x4,%edx 1089a2: 77 3a ja 1089de 1089a4: ff 24 95 58 72 11 00 jmp *0x117258(,%edx,4) case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 1089ab: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 1089ae: 58 pop %eax 1089af: 5b pop %ebx 1089b0: 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 ); 1089b1: e9 76 00 00 00 jmp 108a2c case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 1089b6: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 1089b9: 5b pop %ebx 1089ba: 5b pop %ebx 1089bb: 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); 1089bc: e9 23 00 00 00 jmp 1089e4 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 1089c1: e8 5a 00 00 00 call 108a20 1089c6: eb 05 jmp 1089cd return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 1089c8: e8 3f 00 00 00 call 108a0c 1089cd: 89 03 mov %eax,(%ebx) 1089cf: 31 c0 xor %eax,%eax 1089d1: eb 0b jmp 1089de return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 1089d3: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 1089d6: 59 pop %ecx 1089d7: 5b pop %ebx 1089d8: 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 ); 1089d9: e9 ea 00 00 00 jmp 108ac8 break; } return RTEMS_INVALID_NUMBER; } 1089de: 5a pop %edx 1089df: 5b pop %ebx 1089e0: c9 leave 1089e1: c3 ret =============================================================================== 001089e4 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 1089e4: 55 push %ebp 1089e5: 89 e5 mov %esp,%ebp 1089e7: 8b 55 08 mov 0x8(%ebp),%edx if ( !the_interval ) 1089ea: b8 09 00 00 00 mov $0x9,%eax 1089ef: 85 d2 test %edx,%edx 1089f1: 74 17 je 108a0a <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 1089f3: b8 0b 00 00 00 mov $0xb,%eax 1089f8: 80 3d ac d7 11 00 00 cmpb $0x0,0x11d7ac 1089ff: 74 09 je 108a0a return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch; 108a01: a1 28 d8 11 00 mov 0x11d828,%eax 108a06: 89 02 mov %eax,(%edx) 108a08: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 108a0a: c9 leave 108a0b: c3 ret =============================================================================== 00108a2c : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 108a2c: 55 push %ebp 108a2d: 89 e5 mov %esp,%ebp 108a2f: 56 push %esi 108a30: 53 push %ebx 108a31: 83 ec 50 sub $0x50,%esp 108a34: 8b 75 08 mov 0x8(%ebp),%esi rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 108a37: b8 09 00 00 00 mov $0x9,%eax 108a3c: 85 f6 test %esi,%esi 108a3e: 74 7f je 108abf <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 108a40: b8 0b 00 00 00 mov $0xb,%eax 108a45: 80 3d ac d7 11 00 00 cmpb $0x0,0x11d7ac 108a4c: 74 71 je 108abf ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** 108a4e: 9c pushf 108a4f: fa cli 108a50: 5b pop %ebx * This routine grows @a the_heap memory area using the size bytes which 108a51: 83 ec 0c sub $0xc,%esp 108a54: 8d 45 e8 lea -0x18(%ebp),%eax 108a57: 50 push %eax 108a58: e8 df 14 00 00 call 109f3c <_TOD_Get> * begin at @a starting_address. 108a5d: 53 push %ebx 108a5e: 9d popf * * @param[in] the_heap is the heap to operate upon 108a5f: 8b 45 e8 mov -0x18(%ebp),%eax 108a62: 89 45 f0 mov %eax,-0x10(%ebp) * @param[in] starting_address is the starting address of the memory 108a65: 8b 45 ec mov -0x14(%ebp),%eax 108a68: b9 e8 03 00 00 mov $0x3e8,%ecx 108a6d: 31 d2 xor %edx,%edx 108a6f: f7 f1 div %ecx 108a71: 89 45 f4 mov %eax,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 108a74: 58 pop %eax 108a75: 5a pop %edx 108a76: 8d 45 c4 lea -0x3c(%ebp),%eax 108a79: 50 push %eax 108a7a: 8d 45 f0 lea -0x10(%ebp),%eax 108a7d: 50 push %eax 108a7e: e8 ed 6d 00 00 call 10f870 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 108a83: 8b 45 d8 mov -0x28(%ebp),%eax 108a86: 05 6c 07 00 00 add $0x76c,%eax 108a8b: 89 06 mov %eax,(%esi) tmbuf->month = time.tm_mon + 1; 108a8d: 8b 45 d4 mov -0x2c(%ebp),%eax 108a90: 40 inc %eax 108a91: 89 46 04 mov %eax,0x4(%esi) tmbuf->day = time.tm_mday; 108a94: 8b 45 d0 mov -0x30(%ebp),%eax 108a97: 89 46 08 mov %eax,0x8(%esi) tmbuf->hour = time.tm_hour; 108a9a: 8b 45 cc mov -0x34(%ebp),%eax 108a9d: 89 46 0c mov %eax,0xc(%esi) tmbuf->minute = time.tm_min; 108aa0: 8b 45 c8 mov -0x38(%ebp),%eax 108aa3: 89 46 10 mov %eax,0x10(%esi) tmbuf->second = time.tm_sec; 108aa6: 8b 45 c4 mov -0x3c(%ebp),%eax 108aa9: 89 46 14 mov %eax,0x14(%esi) tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 108aac: 8b 45 f4 mov -0xc(%ebp),%eax 108aaf: 31 d2 xor %edx,%edx 108ab1: f7 35 34 d9 11 00 divl 0x11d934 108ab7: 89 46 18 mov %eax,0x18(%esi) 108aba: 31 c0 xor %eax,%eax 108abc: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 108abf: 8d 65 f8 lea -0x8(%ebp),%esp 108ac2: 5b pop %ebx 108ac3: 5e pop %esi 108ac4: c9 leave 108ac5: c3 ret =============================================================================== 00108ac8 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 108ac8: 55 push %ebp 108ac9: 89 e5 mov %esp,%ebp 108acb: 56 push %esi 108acc: 53 push %ebx 108acd: 83 ec 20 sub $0x20,%esp 108ad0: 8b 75 08 mov 0x8(%ebp),%esi if ( !time ) 108ad3: b8 09 00 00 00 mov $0x9,%eax 108ad8: 85 f6 test %esi,%esi 108ada: 74 38 je 108b14 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 108adc: b8 0b 00 00 00 mov $0xb,%eax 108ae1: 80 3d ac d7 11 00 00 cmpb $0x0,0x11d7ac 108ae8: 74 2a je 108b14 ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** 108aea: 9c pushf 108aeb: fa cli 108aec: 5b pop %ebx * This routine grows @a the_heap memory area using the size bytes which 108aed: 83 ec 0c sub $0xc,%esp 108af0: 8d 45 f0 lea -0x10(%ebp),%eax 108af3: 50 push %eax 108af4: e8 43 14 00 00 call 109f3c <_TOD_Get> * begin at @a starting_address. 108af9: 53 push %ebx 108afa: 9d popf * * @param[in] the_heap is the heap to operate upon 108afb: 8b 45 f0 mov -0x10(%ebp),%eax 108afe: 89 06 mov %eax,(%esi) * @param[in] starting_address is the starting address of the memory 108b00: 8b 45 f4 mov -0xc(%ebp),%eax 108b03: b9 e8 03 00 00 mov $0x3e8,%ecx 108b08: 31 d2 xor %edx,%edx 108b0a: f7 f1 div %ecx 108b0c: 89 46 04 mov %eax,0x4(%esi) 108b0f: 31 c0 xor %eax,%eax 108b11: 83 c4 10 add $0x10,%esp return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 108b14: 8d 65 f8 lea -0x8(%ebp),%esp 108b17: 5b pop %ebx 108b18: 5e pop %esi 108b19: c9 leave 108b1a: c3 ret =============================================================================== 00108cf4 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 108cf4: 55 push %ebp 108cf5: 89 e5 mov %esp,%ebp 108cf7: 83 ec 08 sub $0x8,%esp 108cfa: 8b 55 08 mov 0x8(%ebp),%edx if ( !uptime ) 108cfd: b8 09 00 00 00 mov $0x9,%eax 108d02: 85 d2 test %edx,%edx 108d04: 74 0e je 108d14 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime( uptime ); 108d06: 83 ec 0c sub $0xc,%esp 108d09: 52 push %edx 108d0a: e8 85 15 00 00 call 10a294 <_TOD_Get_uptime> 108d0f: 31 c0 xor %eax,%eax 108d11: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 108d14: c9 leave 108d15: c3 ret =============================================================================== 00109950 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 109950: 55 push %ebp 109951: 89 e5 mov %esp,%ebp 109953: 53 push %ebx 109954: 83 ec 14 sub $0x14,%esp 109957: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10995a: ba 09 00 00 00 mov $0x9,%edx 10995f: 85 db test %ebx,%ebx 109961: 74 54 je 1099b7 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 109963: 83 ec 0c sub $0xc,%esp 109966: 53 push %ebx 109967: e8 f8 00 00 00 call 109a64 <_TOD_Validate> 10996c: 83 c4 10 add $0x10,%esp 10996f: ba 14 00 00 00 mov $0x14,%edx 109974: 84 c0 test %al,%al 109976: 74 3f je 1099b7 newtime.tv_sec = _TOD_To_seconds( time_buffer ); 109978: 83 ec 0c sub $0xc,%esp 10997b: 53 push %ebx 10997c: e8 7b 00 00 00 call 1099fc <_TOD_To_seconds> 109981: 89 45 f4 mov %eax,-0xc(%ebp) newtime.tv_nsec = time_buffer->ticks * 109984: 8b 43 18 mov 0x18(%ebx),%eax 109987: 0f af 05 30 94 12 00 imul 0x129430,%eax 10998e: 69 c0 e8 03 00 00 imul $0x3e8,%eax,%eax 109994: 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 109997: a1 94 92 12 00 mov 0x129294,%eax 10999c: 40 inc %eax 10999d: a3 94 92 12 00 mov %eax,0x129294 (_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 1099a2: 8d 45 f4 lea -0xc(%ebp),%eax 1099a5: 89 04 24 mov %eax,(%esp) 1099a8: e8 13 18 00 00 call 10b1c0 <_TOD_Set> _Thread_Enable_dispatch(); 1099ad: e8 5a 28 00 00 call 10c20c <_Thread_Enable_dispatch> 1099b2: 31 d2 xor %edx,%edx 1099b4: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 1099b7: 89 d0 mov %edx,%eax 1099b9: 8b 5d fc mov -0x4(%ebp),%ebx 1099bc: c9 leave 1099bd: c3 ret =============================================================================== 00108b1c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 108b1c: 55 push %ebp 108b1d: 89 e5 mov %esp,%ebp 108b1f: 8b 55 08 mov 0x8(%ebp),%edx if ( !routine ) 108b22: b8 09 00 00 00 mov $0x9,%eax 108b27: 85 d2 test %edx,%edx 108b29: 74 08 je 108b33 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 108b2b: 89 15 3c d9 11 00 mov %edx,0x11d93c 108b31: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 108b33: c9 leave 108b34: c3 ret =============================================================================== 00108b74 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 108b74: 55 push %ebp 108b75: 89 e5 mov %esp,%ebp 108b77: 83 ec 08 sub $0x8,%esp 108b7a: 8b 4d 08 mov 0x8(%ebp),%ecx 108b7d: 8b 55 14 mov 0x14(%ebp),%edx RTEMS_API_Control *api; if ( !event_out ) 108b80: b8 09 00 00 00 mov $0x9,%eax 108b85: 85 d2 test %edx,%edx 108b87: 74 3f je 108bc8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 108b89: a1 58 d8 11 00 mov 0x11d858,%eax 108b8e: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax if ( _Event_sets_Is_empty( event_in ) ) { 108b94: 85 c9 test %ecx,%ecx 108b96: 75 08 jne 108ba0 *event_out = api->pending_events; 108b98: 8b 00 mov (%eax),%eax 108b9a: 89 02 mov %eax,(%edx) 108b9c: 31 c0 xor %eax,%eax 108b9e: eb 28 jmp 108bc8 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 108ba0: a1 98 d7 11 00 mov 0x11d798,%eax 108ba5: 40 inc %eax 108ba6: a3 98 d7 11 00 mov %eax,0x11d798 return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 108bab: 52 push %edx 108bac: ff 75 10 pushl 0x10(%ebp) 108baf: ff 75 0c pushl 0xc(%ebp) 108bb2: 51 push %ecx 108bb3: e8 14 00 00 00 call 108bcc <_Event_Seize> _Thread_Enable_dispatch(); 108bb8: e8 cf 22 00 00 call 10ae8c <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 108bbd: a1 58 d8 11 00 mov 0x11d858,%eax 108bc2: 8b 40 34 mov 0x34(%eax),%eax 108bc5: 83 c4 10 add $0x10,%esp } 108bc8: c9 leave 108bc9: c3 ret =============================================================================== 001094d0 : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 1094d0: 55 push %ebp <== NOT EXECUTED 1094d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1094d3: 53 push %ebx <== NOT EXECUTED 1094d4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1094d7: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1094da: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED 1094dd: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED if ( !_ISR_Is_vector_number_valid( vector ) ) 1094e0: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 1094e5: 81 fb ff 00 00 00 cmp $0xff,%ebx <== NOT EXECUTED 1094eb: 77 1d ja 10950a <== NOT EXECUTED return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 1094ed: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1094ef: 74 14 je 109505 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 1094f1: 85 d2 test %edx,%edx <== NOT EXECUTED 1094f3: 74 10 je 109505 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 1094f5: 50 push %eax <== NOT EXECUTED 1094f6: 52 push %edx <== NOT EXECUTED 1094f7: 51 push %ecx <== NOT EXECUTED 1094f8: 53 push %ebx <== NOT EXECUTED 1094f9: e8 44 cc ff ff call 106142 <_CPU_ISR_install_vector><== NOT EXECUTED 1094fe: 31 c0 xor %eax,%eax <== NOT EXECUTED 109500: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109503: eb 05 jmp 10950a <== NOT EXECUTED vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 109505: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED } 10950a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10950d: c9 leave <== NOT EXECUTED 10950e: c3 ret <== NOT EXECUTED =============================================================================== 0010a4fc : 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 ) { 10a4fc: 55 push %ebp 10a4fd: 89 e5 mov %esp,%ebp 10a4ff: 57 push %edi 10a500: 56 push %esi 10a501: 53 push %ebx 10a502: 83 ec 08 sub $0x8,%esp 10a505: 8b 5d 08 mov 0x8(%ebp),%ebx 10a508: 8b 75 0c mov 0xc(%ebp),%esi 10a50b: 8b 45 10 mov 0x10(%ebp),%eax 10a50e: 89 45 f0 mov %eax,-0x10(%ebp) /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 10a511: 85 f6 test %esi,%esi 10a513: 0f 84 9a 00 00 00 je 10a5b3 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 10a519: 85 c0 test %eax,%eax 10a51b: 0f 84 92 00 00 00 je 10a5b3 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 10a521: 83 3e 00 cmpl $0x0,(%esi) 10a524: 75 0a jne 10a530 10a526: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10a52a: 0f 84 83 00 00 00 je 10a5b3 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; *registered_major = 0; 10a530: 8b 45 f0 mov -0x10(%ebp),%eax 10a533: c7 00 00 00 00 00 movl $0x0,(%eax) /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 10a539: 8b 15 10 15 12 00 mov 0x121510,%edx 10a53f: b8 0a 00 00 00 mov $0xa,%eax 10a544: 39 d3 cmp %edx,%ebx 10a546: 73 77 jae 10a5bf /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 10a548: 85 db test %ebx,%ebx 10a54a: 75 2b jne 10a577 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 10a54c: 8d 5a ff lea -0x1(%edx),%ebx 10a54f: 6b c2 18 imul $0x18,%edx,%eax 10a552: 83 e8 18 sub $0x18,%eax 10a555: 03 05 14 15 12 00 add 0x121514,%eax 10a55b: eb 0f jmp 10a56c if ( !_IO_Driver_address_table[major].initialization_entry && 10a55d: 83 38 00 cmpl $0x0,(%eax) 10a560: 75 06 jne 10a568 10a562: 83 78 04 00 cmpl $0x0,0x4(%eax) 10a566: 74 0f je 10a577 <== ALWAYS TAKEN * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 10a568: 4b dec %ebx 10a569: 83 e8 18 sub $0x18,%eax 10a56c: 85 db test %ebx,%ebx 10a56e: 75 ed jne 10a55d 10a570: b8 05 00 00 00 mov $0x5,%eax 10a575: eb 48 jmp 10a5bf if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 10a577: 6b fb 18 imul $0x18,%ebx,%edi 10a57a: 03 3d 14 15 12 00 add 0x121514,%edi 10a580: 83 3f 00 cmpl $0x0,(%edi) 10a583: 75 35 jne 10a5ba 10a585: 83 7f 04 00 cmpl $0x0,0x4(%edi) 10a589: 75 2f jne 10a5ba <== NEVER TAKEN _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 10a58b: b9 06 00 00 00 mov $0x6,%ecx 10a590: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *registered_major = major; 10a592: 8b 45 f0 mov -0x10(%ebp),%eax 10a595: 89 18 mov %ebx,(%eax) return rtems_io_initialize( major, 0, NULL ); 10a597: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10a59e: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10a5a5: 89 5d 08 mov %ebx,0x8(%ebp) } 10a5a8: 5b pop %ebx 10a5a9: 5e pop %esi 10a5aa: 5b pop %ebx 10a5ab: 5e pop %esi 10a5ac: 5f pop %edi 10a5ad: c9 leave _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 10a5ae: e9 ed fd ff ff jmp 10a3a0 10a5b3: b8 09 00 00 00 mov $0x9,%eax 10a5b8: eb 05 jmp 10a5bf 10a5ba: b8 0c 00 00 00 mov $0xc,%eax } 10a5bf: 5a pop %edx 10a5c0: 59 pop %ecx 10a5c1: 5b pop %ebx 10a5c2: 5e pop %esi 10a5c3: 5f pop %edi 10a5c4: c9 leave 10a5c5: c3 ret =============================================================================== 0010a5c8 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10a5c8: 55 push %ebp 10a5c9: 89 e5 mov %esp,%ebp 10a5cb: 57 push %edi 10a5cc: 83 ec 04 sub $0x4,%esp 10a5cf: 8b 55 08 mov 0x8(%ebp),%edx if ( major < _IO_Number_of_drivers ) { 10a5d2: b8 0d 00 00 00 mov $0xd,%eax 10a5d7: 3b 15 10 15 12 00 cmp 0x121510,%edx 10a5dd: 73 12 jae 10a5f1 <== NEVER TAKEN memset( 10a5df: 6b fa 18 imul $0x18,%edx,%edi 10a5e2: 03 3d 14 15 12 00 add 0x121514,%edi 10a5e8: b9 06 00 00 00 mov $0x6,%ecx 10a5ed: 31 c0 xor %eax,%eax 10a5ef: f3 ab rep stos %eax,%es:(%edi) sizeof( rtems_driver_address_table ) ); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10a5f1: 5a pop %edx 10a5f2: 5f pop %edi 10a5f3: c9 leave 10a5f4: c3 ret =============================================================================== 0010b4d8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10b4d8: 55 push %ebp 10b4d9: 89 e5 mov %esp,%ebp 10b4db: 57 push %edi 10b4dc: 56 push %esi 10b4dd: 53 push %ebx 10b4de: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10b4e1: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10b4e5: 74 41 je 10b528 <== NEVER TAKEN return; 10b4e7: 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 ] ) 10b4ec: 8b 04 bd 68 92 12 00 mov 0x129268(,%edi,4),%eax 10b4f3: 85 c0 test %eax,%eax 10b4f5: 74 2b je 10b522 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10b4f7: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10b4fa: bb 01 00 00 00 mov $0x1,%ebx 10b4ff: 85 f6 test %esi,%esi 10b501: 75 17 jne 10b51a <== ALWAYS TAKEN 10b503: eb 1d jmp 10b522 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10b505: 8b 46 1c mov 0x1c(%esi),%eax 10b508: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10b50b: 85 c0 test %eax,%eax 10b50d: 74 0a je 10b519 <== NEVER TAKEN continue; (*routine)(the_thread); 10b50f: 83 ec 0c sub $0xc,%esp 10b512: 50 push %eax 10b513: ff 55 08 call *0x8(%ebp) 10b516: 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++ ) { 10b519: 43 inc %ebx 10b51a: 0f b7 46 10 movzwl 0x10(%esi),%eax 10b51e: 39 c3 cmp %eax,%ebx 10b520: 76 e3 jbe 10b505 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10b522: 47 inc %edi if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 10b523: 83 ff 05 cmp $0x5,%edi 10b526: 75 c4 jne 10b4ec (*routine)(the_thread); } } } } 10b528: 8d 65 f4 lea -0xc(%ebp),%esp 10b52b: 5b pop %ebx 10b52c: 5e pop %esi 10b52d: 5f pop %edi 10b52e: c9 leave 10b52f: c3 ret =============================================================================== 00110d44 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, Objects_Id *id ) { 110d44: 55 push %ebp 110d45: 89 e5 mov %esp,%ebp 110d47: 57 push %edi 110d48: 56 push %esi 110d49: 53 push %ebx 110d4a: 83 ec 1c sub $0x1c,%esp 110d4d: 8b 7d 10 mov 0x10(%ebp),%edi 110d50: 8b 75 14 mov 0x14(%ebp),%esi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 110d53: b8 03 00 00 00 mov $0x3,%eax 110d58: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 110d5c: 0f 84 b2 00 00 00 je 110e14 return RTEMS_INVALID_NAME; if ( !id ) 110d62: b8 09 00 00 00 mov $0x9,%eax 110d67: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 110d6b: 0f 84 a3 00 00 00 je 110e14 <== NEVER TAKEN if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 110d71: b8 0a 00 00 00 mov $0xa,%eax 110d76: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 110d7a: 0f 84 94 00 00 00 je 110e14 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 110d80: b8 08 00 00 00 mov $0x8,%eax 110d85: 85 ff test %edi,%edi 110d87: 0f 84 87 00 00 00 je 110e14 <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 110d8d: a1 38 41 13 00 mov 0x134138,%eax 110d92: 40 inc %eax 110d93: a3 38 41 13 00 mov %eax,0x134138 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 110d98: e8 4f 79 00 00 call 1186ec <_Message_queue_Allocate> 110d9d: 89 c3 mov %eax,%ebx if ( !the_message_queue ) { 110d9f: 85 c0 test %eax,%eax 110da1: 75 0c jne 110daf _Thread_Enable_dispatch(); 110da3: e8 10 4a 00 00 call 1157b8 <_Thread_Enable_dispatch> 110da8: b8 05 00 00 00 mov $0x5,%eax 110dad: eb 65 jmp 110e14 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 110daf: 89 70 10 mov %esi,0x10(%eax) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 110db2: 31 c0 xor %eax,%eax 110db4: f7 c6 04 00 00 00 test $0x4,%esi 110dba: 0f 95 c0 setne %al 110dbd: 89 45 f0 mov %eax,-0x10(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 110dc0: 57 push %edi 110dc1: ff 75 0c pushl 0xc(%ebp) 110dc4: 8d 45 f0 lea -0x10(%ebp),%eax 110dc7: 50 push %eax 110dc8: 8d 43 14 lea 0x14(%ebx),%eax 110dcb: 50 push %eax 110dcc: e8 3b 2e 00 00 call 113c0c <_CORE_message_queue_Initialize> 110dd1: 83 c4 10 add $0x10,%esp 110dd4: 84 c0 test %al,%al 110dd6: 75 1c jne 110df4 * @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, 110dd8: 50 push %eax 110dd9: 50 push %eax 110dda: 53 push %ebx 110ddb: 68 38 4a 13 00 push $0x134a38 110de0: e8 a3 40 00 00 call 114e88 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 110de5: e8 ce 49 00 00 call 1157b8 <_Thread_Enable_dispatch> 110dea: b8 0d 00 00 00 mov $0xd,%eax 110def: 83 c4 10 add $0x10,%esp 110df2: eb 20 jmp 110e14 110df4: 8b 4b 08 mov 0x8(%ebx),%ecx 110df7: 0f b7 d1 movzwl %cx,%edx 110dfa: a1 54 4a 13 00 mov 0x134a54,%eax 110dff: 89 1c 90 mov %ebx,(%eax,%edx,4) 110e02: 8b 45 08 mov 0x8(%ebp),%eax 110e05: 89 43 0c mov %eax,0xc(%ebx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 110e08: 8b 45 18 mov 0x18(%ebp),%eax 110e0b: 89 08 mov %ecx,(%eax) name, 0 ); #endif _Thread_Enable_dispatch(); 110e0d: e8 a6 49 00 00 call 1157b8 <_Thread_Enable_dispatch> 110e12: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110e14: 8d 65 f4 lea -0xc(%ebp),%esp 110e17: 5b pop %ebx 110e18: 5e pop %esi 110e19: 5f pop %edi 110e1a: c9 leave 110e1b: c3 ret =============================================================================== 00110e80 : rtems_status_code rtems_message_queue_flush( Objects_Id id, uint32_t *count ) { 110e80: 55 push %ebp 110e81: 89 e5 mov %esp,%ebp 110e83: 53 push %ebx 110e84: 83 ec 14 sub $0x14,%esp 110e87: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 110e8a: b8 09 00 00 00 mov $0x9,%eax 110e8f: 85 db test %ebx,%ebx 110e91: 74 3a je 110ecd <== 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, 110e93: 50 push %eax 110e94: 8d 45 f8 lea -0x8(%ebp),%eax 110e97: 50 push %eax 110e98: ff 75 08 pushl 0x8(%ebp) 110e9b: 68 38 4a 13 00 push $0x134a38 110ea0: e8 53 41 00 00 call 114ff8 <_Objects_Get> 110ea5: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 110ea7: 83 c4 10 add $0x10,%esp 110eaa: b8 04 00 00 00 mov $0x4,%eax 110eaf: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 110eb3: 75 18 jne 110ecd case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 110eb5: 83 ec 0c sub $0xc,%esp 110eb8: 8d 42 14 lea 0x14(%edx),%eax 110ebb: 50 push %eax 110ebc: e8 e7 2c 00 00 call 113ba8 <_CORE_message_queue_Flush> 110ec1: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 110ec3: e8 f0 48 00 00 call 1157b8 <_Thread_Enable_dispatch> 110ec8: 31 c0 xor %eax,%eax 110eca: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110ecd: 8b 5d fc mov -0x4(%ebp),%ebx 110ed0: c9 leave 110ed1: c3 ret =============================================================================== 00110ed4 : rtems_status_code rtems_message_queue_get_number_pending( Objects_Id id, uint32_t *count ) { 110ed4: 55 push %ebp 110ed5: 89 e5 mov %esp,%ebp 110ed7: 53 push %ebx 110ed8: 83 ec 14 sub $0x14,%esp 110edb: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 110ede: b8 09 00 00 00 mov $0x9,%eax 110ee3: 85 db test %ebx,%ebx 110ee5: 74 2e je 110f15 <== NEVER TAKEN 110ee7: 50 push %eax 110ee8: 8d 45 f8 lea -0x8(%ebp),%eax 110eeb: 50 push %eax 110eec: ff 75 08 pushl 0x8(%ebp) 110eef: 68 38 4a 13 00 push $0x134a38 110ef4: e8 ff 40 00 00 call 114ff8 <_Objects_Get> 110ef9: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 110efb: 83 c4 10 add $0x10,%esp 110efe: b8 04 00 00 00 mov $0x4,%eax 110f03: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 110f07: 75 0c jne 110f15 case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 110f09: 8b 42 5c mov 0x5c(%edx),%eax 110f0c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 110f0e: e8 a5 48 00 00 call 1157b8 <_Thread_Enable_dispatch> 110f13: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110f15: 8b 5d fc mov -0x4(%ebp),%ebx 110f18: c9 leave 110f19: c3 ret =============================================================================== 00108ec0 : rtems_status_code rtems_message_queue_send( Objects_Id id, const void *buffer, size_t size ) { 108ec0: 55 push %ebp 108ec1: 89 e5 mov %esp,%ebp 108ec3: 56 push %esi 108ec4: 53 push %ebx 108ec5: 83 ec 10 sub $0x10,%esp 108ec8: 8b 5d 08 mov 0x8(%ebp),%ebx 108ecb: 8b 75 0c mov 0xc(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 108ece: b8 09 00 00 00 mov $0x9,%eax 108ed3: 85 f6 test %esi,%esi 108ed5: 74 4f je 108f26 <== 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, 108ed7: 50 push %eax 108ed8: 8d 45 f4 lea -0xc(%ebp),%eax 108edb: 50 push %eax 108edc: 53 push %ebx 108edd: 68 90 e0 11 00 push $0x11e090 108ee2: e8 e5 17 00 00 call 10a6cc <_Objects_Get> 108ee7: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 108ee9: 83 c4 10 add $0x10,%esp 108eec: b8 04 00 00 00 mov $0x4,%eax 108ef1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 108ef5: 75 2f jne 108f26 <== NEVER TAKEN * @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 108ef7: 6a 00 push $0x0 108ef9: 6a 00 push $0x0 108efb: 68 ff ff ff 7f push $0x7fffffff 108f00: 6a 00 push $0x0 108f02: 53 push %ebx 108f03: ff 75 10 pushl 0x10(%ebp) 108f06: 56 push %esi 108f07: 8d 42 14 lea 0x14(%edx),%eax 108f0a: 50 push %eax 108f0b: e8 28 0c 00 00 call 109b38 <_CORE_message_queue_Submit> 108f10: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, FALSE, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 108f12: 83 c4 20 add $0x20,%esp 108f15: e8 72 1f 00 00 call 10ae8c <_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); 108f1a: 83 ec 0c sub $0xc,%esp 108f1d: 53 push %ebx 108f1e: e8 0d 00 00 00 call 108f30 <_Message_queue_Translate_core_message_queue_return_code> 108f23: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 108f26: 8d 65 f8 lea -0x8(%ebp),%esp 108f29: 5b pop %ebx 108f2a: 5e pop %esi 108f2b: c9 leave 108f2c: c3 ret =============================================================================== 00111040 : rtems_status_code rtems_message_queue_urgent( Objects_Id id, const void *buffer, size_t size ) { 111040: 55 push %ebp 111041: 89 e5 mov %esp,%ebp 111043: 56 push %esi 111044: 53 push %ebx 111045: 83 ec 10 sub $0x10,%esp 111048: 8b 5d 08 mov 0x8(%ebp),%ebx 11104b: 8b 75 0c mov 0xc(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11104e: b8 09 00 00 00 mov $0x9,%eax 111053: 85 f6 test %esi,%esi 111055: 74 4f je 1110a6 <== 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, 111057: 50 push %eax 111058: 8d 45 f4 lea -0xc(%ebp),%eax 11105b: 50 push %eax 11105c: 53 push %ebx 11105d: 68 38 4a 13 00 push $0x134a38 111062: e8 91 3f 00 00 call 114ff8 <_Objects_Get> 111067: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 111069: 83 c4 10 add $0x10,%esp 11106c: b8 04 00 00 00 mov $0x4,%eax 111071: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 111075: 75 2f jne 1110a6 size_t size 111077: 6a 00 push $0x0 111079: 6a 00 push $0x0 11107b: 68 00 00 00 80 push $0x80000000 111080: 6a 00 push $0x0 111082: 53 push %ebx 111083: ff 75 10 pushl 0x10(%ebp) 111086: 56 push %esi 111087: 8d 42 14 lea 0x14(%edx),%eax 11108a: 50 push %eax 11108b: e8 6c 2d 00 00 call 113dfc <_CORE_message_queue_Submit> 111090: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, FALSE, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 111092: 83 c4 20 add $0x20,%esp 111095: e8 1e 47 00 00 call 1157b8 <_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); 11109a: 83 ec 0c sub $0xc,%esp 11109d: 53 push %ebx 11109e: e8 8d ff ff ff call 111030 <_Message_queue_Translate_core_message_queue_return_code> 1110a3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1110a6: 8d 65 f8 lea -0x8(%ebp),%esp 1110a9: 5b pop %ebx 1110aa: 5e pop %esi 1110ab: c9 leave 1110ac: c3 ret =============================================================================== 00109448 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 109448: 55 push %ebp 109449: 89 e5 mov %esp,%ebp 10944b: 57 push %edi 10944c: 56 push %esi 10944d: 53 push %ebx 10944e: 83 ec 1c sub $0x1c,%esp 109451: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 109454: b8 09 00 00 00 mov $0x9,%eax 109459: 85 ff test %edi,%edi 10945b: 74 50 je 1094ad <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10945d: 8b 5d 08 mov 0x8(%ebp),%ebx 109460: 85 db test %ebx,%ebx 109462: 75 08 jne 10946c 109464: a1 4c 0d 12 00 mov 0x120d4c,%eax 109469: 8b 58 08 mov 0x8(%eax),%ebx information = _Objects_Get_information_id( tmpId ); 10946c: 83 ec 0c sub $0xc,%esp 10946f: 53 push %ebx 109470: e8 b3 16 00 00 call 10ab28 <_Objects_Get_information_id> 109475: 89 c6 mov %eax,%esi if ( !information ) 109477: 83 c4 10 add $0x10,%esp 10947a: 85 c0 test %eax,%eax 10947c: 74 2a je 1094a8 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10947e: 51 push %ecx 10947f: 8d 45 f0 lea -0x10(%ebp),%eax 109482: 50 push %eax 109483: 53 push %ebx 109484: 56 push %esi 109485: e8 36 18 00 00 call 10acc0 <_Objects_Get> switch ( location ) { 10948a: 83 c4 10 add $0x10,%esp 10948d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 109491: 75 15 jne 1094a8 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 109493: 52 push %edx 109494: 57 push %edi 109495: 50 push %eax 109496: 56 push %esi 109497: e8 e0 19 00 00 call 10ae7c <_Objects_Set_name> _Thread_Enable_dispatch(); 10949c: e8 bf 20 00 00 call 10b560 <_Thread_Enable_dispatch> 1094a1: 31 c0 xor %eax,%eax 1094a3: 83 c4 10 add $0x10,%esp 1094a6: eb 05 jmp 1094ad return RTEMS_SUCCESSFUL; 1094a8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1094ad: 8d 65 f4 lea -0xc(%ebp),%esp 1094b0: 5b pop %ebx 1094b1: 5e pop %esi 1094b2: 5f pop %edi 1094b3: c9 leave 1094b4: c3 ret =============================================================================== 001110b0 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, Objects_Id *id ) { 1110b0: 55 push %ebp 1110b1: 89 e5 mov %esp,%ebp 1110b3: 57 push %edi 1110b4: 56 push %esi 1110b5: 53 push %ebx 1110b6: 83 ec 0c sub $0xc,%esp 1110b9: 8b 7d 10 mov 0x10(%ebp),%edi 1110bc: 8b 75 14 mov 0x14(%ebp),%esi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1110bf: b8 03 00 00 00 mov $0x3,%eax 1110c4: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1110c8: 0f 84 c9 00 00 00 je 111197 return RTEMS_INVALID_NAME; if ( !starting_address ) 1110ce: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 1110d2: 0f 84 b3 00 00 00 je 11118b <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !id ) 1110d8: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 1110dc: 0f 84 a9 00 00 00 je 11118b <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1110e2: 85 ff test %edi,%edi 1110e4: 0f 84 a8 00 00 00 je 111192 1110ea: 85 f6 test %esi,%esi 1110ec: 0f 84 a0 00 00 00 je 111192 1110f2: 39 f7 cmp %esi,%edi 1110f4: 0f 82 98 00 00 00 jb 111192 1110fa: f7 c6 03 00 00 00 test $0x3,%esi 111100: 0f 85 8c 00 00 00 jne 111192 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 111106: f6 45 0c 03 testb $0x3,0xc(%ebp) 11110a: 75 7f jne 11118b /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 11110c: a1 38 41 13 00 mov 0x134138,%eax 111111: 40 inc %eax 111112: a3 38 41 13 00 mov %eax,0x134138 * 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 111117: 83 ec 0c sub $0xc,%esp 11111a: 68 6c 3f 13 00 push $0x133f6c 11111f: e8 54 3a 00 00 call 114b78 <_Objects_Allocate> 111124: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 111126: 83 c4 10 add $0x10,%esp 111129: 85 c0 test %eax,%eax 11112b: 75 0c jne 111139 _Thread_Enable_dispatch(); 11112d: e8 86 46 00 00 call 1157b8 <_Thread_Enable_dispatch> 111132: b8 05 00 00 00 mov $0x5,%eax 111137: eb 5e jmp 111197 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 111139: 8b 45 0c mov 0xc(%ebp),%eax 11113c: 89 43 10 mov %eax,0x10(%ebx) the_partition->length = length; 11113f: 89 7b 14 mov %edi,0x14(%ebx) the_partition->buffer_size = buffer_size; 111142: 89 73 18 mov %esi,0x18(%ebx) the_partition->attribute_set = attribute_set; 111145: 8b 45 18 mov 0x18(%ebp),%eax 111148: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 11114b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 111152: 56 push %esi 111153: 89 f8 mov %edi,%eax 111155: 31 d2 xor %edx,%edx 111157: f7 f6 div %esi 111159: 50 push %eax 11115a: ff 75 0c pushl 0xc(%ebp) 11115d: 8d 43 24 lea 0x24(%ebx),%eax 111160: 50 push %eax 111161: e8 6a 29 00 00 call 113ad0 <_Chain_Initialize> 111166: 8b 4b 08 mov 0x8(%ebx),%ecx 111169: 0f b7 d1 movzwl %cx,%edx 11116c: a1 88 3f 13 00 mov 0x133f88,%eax 111171: 89 1c 90 mov %ebx,(%eax,%edx,4) 111174: 8b 45 08 mov 0x8(%ebp),%eax 111177: 89 43 0c mov %eax,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 11117a: 8b 45 1c mov 0x1c(%ebp),%eax 11117d: 89 08 mov %ecx,(%eax) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 11117f: e8 34 46 00 00 call 1157b8 <_Thread_Enable_dispatch> 111184: 31 c0 xor %eax,%eax 111186: 83 c4 10 add $0x10,%esp 111189: eb 0c jmp 111197 return RTEMS_SUCCESSFUL; 11118b: b8 09 00 00 00 mov $0x9,%eax 111190: eb 05 jmp 111197 111192: b8 08 00 00 00 mov $0x8,%eax } 111197: 8d 65 f4 lea -0xc(%ebp),%esp 11119a: 5b pop %ebx 11119b: 5e pop %esi 11119c: 5f pop %edi 11119d: c9 leave 11119e: c3 ret =============================================================================== 00111204 : rtems_status_code rtems_partition_get_buffer( Objects_Id id, void **buffer ) { 111204: 55 push %ebp 111205: 89 e5 mov %esp,%ebp 111207: 57 push %edi 111208: 56 push %esi 111209: 53 push %ebx 11120a: 83 ec 1c sub $0x1c,%esp 11120d: 8b 7d 0c mov 0xc(%ebp),%edi register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 111210: b8 09 00 00 00 mov $0x9,%eax 111215: 85 ff test %edi,%edi 111217: 74 4f je 111268 <== 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. 111219: 50 push %eax 11121a: 8d 45 f0 lea -0x10(%ebp),%eax 11121d: 50 push %eax 11121e: ff 75 08 pushl 0x8(%ebp) 111221: 68 6c 3f 13 00 push $0x133f6c 111226: e8 cd 3d 00 00 call 114ff8 <_Objects_Get> 11122b: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11122d: 83 c4 10 add $0x10,%esp 111230: b8 04 00 00 00 mov $0x4,%eax 111235: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 111239: 75 2d jne 111268 #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 11123b: 83 ec 0c sub $0xc,%esp 11123e: 8d 43 24 lea 0x24(%ebx),%eax 111241: 50 push %eax 111242: e8 61 28 00 00 call 113aa8 <_Chain_Get> 111247: 89 c6 mov %eax,%esi case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 111249: 83 c4 10 add $0x10,%esp 11124c: 85 c0 test %eax,%eax 11124e: 74 0e je 11125e the_partition->number_of_used_blocks += 1; 111250: ff 43 20 incl 0x20(%ebx) _Thread_Enable_dispatch(); 111253: e8 60 45 00 00 call 1157b8 <_Thread_Enable_dispatch> *buffer = the_buffer; 111258: 89 37 mov %esi,(%edi) 11125a: 31 c0 xor %eax,%eax 11125c: eb 0a jmp 111268 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11125e: e8 55 45 00 00 call 1157b8 <_Thread_Enable_dispatch> 111263: b8 0d 00 00 00 mov $0xd,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111268: 8d 65 f4 lea -0xc(%ebp),%esp 11126b: 5b pop %ebx 11126c: 5e pop %esi 11126d: 5f pop %edi 11126e: c9 leave 11126f: c3 ret =============================================================================== 001107e4 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 1107e4: 55 push %ebp 1107e5: 89 e5 mov %esp,%ebp 1107e7: 57 push %edi 1107e8: 56 push %esi 1107e9: 53 push %ebx 1107ea: 83 ec 0c sub $0xc,%esp 1107ed: 8b 75 0c mov 0xc(%ebp),%esi 1107f0: 8b 7d 10 mov 0x10(%ebp),%edi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 1107f3: b8 03 00 00 00 mov $0x3,%eax 1107f8: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1107fc: 74 6f je 11086d return RTEMS_INVALID_NAME; if ( !id ) 1107fe: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 110802: 74 64 je 110868 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 110804: 89 f8 mov %edi,%eax 110806: 09 f0 or %esi,%eax 110808: a8 03 test $0x3,%al 11080a: 75 5c jne 110868 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 11080c: a1 38 41 13 00 mov 0x134138,%eax 110811: 40 inc %eax 110812: a3 38 41 13 00 mov %eax,0x134138 #ifdef __cplusplus extern "C" { #endif /** * This routine initializes @a the_heap record to manage the 110817: 83 ec 0c sub $0xc,%esp 11081a: 68 2c 3f 13 00 push $0x133f2c 11081f: e8 54 43 00 00 call 114b78 <_Objects_Allocate> 110824: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 110826: 83 c4 10 add $0x10,%esp 110829: 85 c0 test %eax,%eax 11082b: 75 0c jne 110839 _Thread_Enable_dispatch(); 11082d: e8 86 4f 00 00 call 1157b8 <_Thread_Enable_dispatch> 110832: b8 05 00 00 00 mov $0x5,%eax 110837: eb 34 jmp 11086d return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 110839: 89 70 10 mov %esi,0x10(%eax) the_port->external_base = external_start; 11083c: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 11083f: 8b 45 14 mov 0x14(%ebp),%eax 110842: 48 dec %eax 110843: 89 43 18 mov %eax,0x18(%ebx) 110846: 8b 4b 08 mov 0x8(%ebx),%ecx 110849: 0f b7 d1 movzwl %cx,%edx 11084c: a1 48 3f 13 00 mov 0x133f48,%eax 110851: 89 1c 90 mov %ebx,(%eax,%edx,4) 110854: 8b 45 08 mov 0x8(%ebp),%eax 110857: 89 43 0c mov %eax,0xc(%ebx) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 11085a: 8b 45 18 mov 0x18(%ebp),%eax 11085d: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 11085f: e8 54 4f 00 00 call 1157b8 <_Thread_Enable_dispatch> 110864: 31 c0 xor %eax,%eax 110866: eb 05 jmp 11086d return RTEMS_SUCCESSFUL; 110868: b8 09 00 00 00 mov $0x9,%eax } 11086d: 8d 65 f4 lea -0xc(%ebp),%esp 110870: 5b pop %ebx 110871: 5e pop %esi 110872: 5f pop %edi 110873: c9 leave 110874: c3 ret =============================================================================== 001108cc : rtems_status_code rtems_port_external_to_internal( Objects_Id id, void *external, void **internal ) { 1108cc: 55 push %ebp 1108cd: 89 e5 mov %esp,%ebp 1108cf: 56 push %esi 1108d0: 53 push %ebx 1108d1: 83 ec 10 sub $0x10,%esp 1108d4: 8b 75 0c mov 0xc(%ebp),%esi 1108d7: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 1108da: b8 09 00 00 00 mov $0x9,%eax 1108df: 85 db test %ebx,%ebx 1108e1: 74 3c je 11091f <== 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 1108e3: 50 push %eax 1108e4: 8d 45 f4 lea -0xc(%ebp),%eax 1108e7: 50 push %eax 1108e8: ff 75 08 pushl 0x8(%ebp) 1108eb: 68 2c 3f 13 00 push $0x133f2c 1108f0: e8 03 47 00 00 call 114ff8 <_Objects_Get> 1108f5: 89 c1 mov %eax,%ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1108f7: 83 c4 10 add $0x10,%esp 1108fa: b8 04 00 00 00 mov $0x4,%eax 1108ff: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 110903: 75 1a jne 11091f * 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 */ 110905: 89 f2 mov %esi,%edx 110907: 2b 51 14 sub 0x14(%ecx),%edx case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 11090a: 3b 51 18 cmp 0x18(%ecx),%edx 11090d: 76 04 jbe 110913 *internal = external; 11090f: 89 33 mov %esi,(%ebx) 110911: eb 05 jmp 110918 else *internal = _Addresses_Add_offset( the_port->internal_base, 110913: 03 51 10 add 0x10(%ecx),%edx 110916: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 110918: e8 9b 4e 00 00 call 1157b8 <_Thread_Enable_dispatch> 11091d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11091f: 8d 65 f8 lea -0x8(%ebp),%esp 110922: 5b pop %ebx 110923: 5e pop %esi 110924: c9 leave 110925: c3 ret =============================================================================== 0011094c : rtems_status_code rtems_port_internal_to_external( Objects_Id id, void *internal, void **external ) { 11094c: 55 push %ebp 11094d: 89 e5 mov %esp,%ebp 11094f: 56 push %esi 110950: 53 push %ebx 110951: 83 ec 10 sub $0x10,%esp 110954: 8b 75 0c mov 0xc(%ebp),%esi 110957: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 11095a: b8 09 00 00 00 mov $0x9,%eax 11095f: 85 db test %ebx,%ebx 110961: 74 3c je 11099f <== 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 110963: 50 push %eax 110964: 8d 45 f4 lea -0xc(%ebp),%eax 110967: 50 push %eax 110968: ff 75 08 pushl 0x8(%ebp) 11096b: 68 2c 3f 13 00 push $0x133f2c 110970: e8 83 46 00 00 call 114ff8 <_Objects_Get> 110975: 89 c1 mov %eax,%ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 110977: 83 c4 10 add $0x10,%esp 11097a: b8 04 00 00 00 mov $0x4,%eax 11097f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 110983: 75 1a jne 11099f * 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 */ 110985: 89 f2 mov %esi,%edx 110987: 2b 51 10 sub 0x10(%ecx),%edx case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 11098a: 3b 51 18 cmp 0x18(%ecx),%edx 11098d: 76 04 jbe 110993 *external = internal; 11098f: 89 33 mov %esi,(%ebx) 110991: eb 05 jmp 110998 else *external = _Addresses_Add_offset( the_port->external_base, 110993: 03 51 14 add 0x14(%ecx),%edx 110996: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 110998: e8 1b 4e 00 00 call 1157b8 <_Thread_Enable_dispatch> 11099d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11099f: 8d 65 f8 lea -0x8(%ebp),%esp 1109a2: 5b pop %ebx 1109a3: 5e pop %esi 1109a4: c9 leave 1109a5: c3 ret =============================================================================== 00109ce4 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, Objects_Id *id ) { 109ce4: 55 push %ebp 109ce5: 89 e5 mov %esp,%ebp 109ce7: 57 push %edi 109ce8: 56 push %esi 109ce9: 53 push %ebx 109cea: 83 ec 0c sub $0xc,%esp 109ced: 8b 75 08 mov 0x8(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 109cf0: b8 03 00 00 00 mov $0x3,%eax 109cf5: 85 f6 test %esi,%esi 109cf7: 0f 84 ac 00 00 00 je 109da9 return RTEMS_INVALID_NAME; if ( !id ) 109cfd: b8 09 00 00 00 mov $0x9,%eax 109d02: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 109d06: 0f 84 9d 00 00 00 je 109da9 <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109d0c: a1 3c 1c 12 00 mov 0x121c3c,%eax 109d11: 40 inc %eax 109d12: a3 3c 1c 12 00 mov %eax,0x121c3c #ifdef __cplusplus extern "C" { #endif /** 109d17: 83 ec 0c sub $0xc,%esp 109d1a: 68 44 1b 12 00 push $0x121b44 109d1f: e8 84 1b 00 00 call 10b8a8 <_Objects_Allocate> 109d24: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 109d26: 83 c4 10 add $0x10,%esp 109d29: 85 c0 test %eax,%eax 109d2b: 75 0c jne 109d39 _Thread_Enable_dispatch(); 109d2d: e8 52 28 00 00 call 10c584 <_Thread_Enable_dispatch> 109d32: b8 05 00 00 00 mov $0x5,%eax 109d37: eb 70 jmp 109da9 return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 109d39: a1 fc 1c 12 00 mov 0x121cfc,%eax 109d3e: 89 43 50 mov %eax,0x50(%ebx) the_period->state = RATE_MONOTONIC_INACTIVE; 109d41: 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. * 109d48: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 109d4f: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 109d56: c7 43 30 00 00 00 00 movl $0x0,0x30(%ebx) * the heap 109d5d: 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 ); 109d64: 8d 7b 54 lea 0x54(%ebx),%edi 109d67: b9 0e 00 00 00 mov $0xe,%ecx 109d6c: 31 c0 xor %eax,%eax 109d6e: f3 ab rep stos %eax,%es:(%edi) 109d70: c7 43 5c ff ff ff 7f movl $0x7fffffff,0x5c(%ebx) 109d77: c7 43 60 ff ff ff 7f movl $0x7fffffff,0x60(%ebx) 109d7e: c7 43 74 ff ff ff 7f movl $0x7fffffff,0x74(%ebx) 109d85: c7 43 78 ff ff ff 7f movl $0x7fffffff,0x78(%ebx) 109d8c: 8b 4b 08 mov 0x8(%ebx),%ecx 109d8f: 0f b7 d1 movzwl %cx,%edx 109d92: a1 60 1b 12 00 mov 0x121b60,%eax 109d97: 89 1c 90 mov %ebx,(%eax,%edx,4) 109d9a: 89 73 0c mov %esi,0xc(%ebx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 109d9d: 8b 45 0c mov 0xc(%ebp),%eax 109da0: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 109da2: e8 dd 27 00 00 call 10c584 <_Thread_Enable_dispatch> 109da7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 109da9: 8d 65 f4 lea -0xc(%ebp),%esp 109dac: 5b pop %ebx 109dad: 5e pop %esi 109dae: 5f pop %edi 109daf: c9 leave 109db0: c3 ret =============================================================================== 0010f338 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 10f338: 55 push %ebp 10f339: 89 e5 mov %esp,%ebp 10f33b: 57 push %edi 10f33c: 56 push %esi 10f33d: 83 ec 20 sub $0x20,%esp 10f340: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 10f343: b8 09 00 00 00 mov $0x9,%eax 10f348: 85 ff test %edi,%edi 10f34a: 74 33 je 10f37f <== 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 10f34c: 50 push %eax 10f34d: 8d 45 f4 lea -0xc(%ebp),%eax 10f350: 50 push %eax 10f351: ff 75 08 pushl 0x8(%ebp) 10f354: 68 44 1b 12 00 push $0x121b44 10f359: e8 66 ca ff ff call 10bdc4 <_Objects_Get> 10f35e: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10f360: 83 c4 10 add $0x10,%esp 10f363: b8 04 00 00 00 mov $0x4,%eax 10f368: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10f36c: 75 11 jne 10f37f case OBJECTS_LOCAL: *statistics = the_period->Statistics; 10f36e: 8d 72 54 lea 0x54(%edx),%esi 10f371: b9 0e 00 00 00 mov $0xe,%ecx 10f376: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10f378: e8 07 d2 ff ff call 10c584 <_Thread_Enable_dispatch> 10f37d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f37f: 8d 65 f8 lea -0x8(%ebp),%esp 10f382: 5e pop %esi 10f383: 5f pop %edi 10f384: c9 leave 10f385: c3 ret =============================================================================== 0010f388 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 10f388: 55 push %ebp 10f389: 89 e5 mov %esp,%ebp 10f38b: 57 push %edi 10f38c: 56 push %esi 10f38d: 53 push %ebx 10f38e: 83 ec 1c sub $0x1c,%esp 10f391: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 10f394: b8 09 00 00 00 mov $0x9,%eax 10f399: 85 f6 test %esi,%esi 10f39b: 0f 84 91 00 00 00 je 10f432 <== NEVER TAKEN 10f3a1: 50 push %eax 10f3a2: 8d 45 f0 lea -0x10(%ebp),%eax 10f3a5: 50 push %eax 10f3a6: ff 75 08 pushl 0x8(%ebp) 10f3a9: 68 44 1b 12 00 push $0x121b44 10f3ae: e8 11 ca ff ff call 10bdc4 <_Objects_Get> 10f3b3: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10f3b5: 83 c4 10 add $0x10,%esp 10f3b8: b8 04 00 00 00 mov $0x4,%eax 10f3bd: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10f3c1: 75 6f jne 10f432 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 10f3c3: 8b 47 50 mov 0x50(%edi),%eax 10f3c6: 31 d2 xor %edx,%edx 10f3c8: 85 c0 test %eax,%eax 10f3ca: 74 03 je 10f3cf <== NEVER TAKEN 10f3cc: 8b 50 08 mov 0x8(%eax),%edx 10f3cf: 89 16 mov %edx,(%esi) status->state = the_period->state; 10f3d1: 8b 47 38 mov 0x38(%edi),%eax 10f3d4: 89 46 04 mov %eax,0x4(%esi) if ( status->state == RATE_MONOTONIC_INACTIVE ) { 10f3d7: 85 c0 test %eax,%eax 10f3d9: 75 1e jne 10f3f9 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 10f3db: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) status->since_last_period.tv_nsec = 0; 10f3e2: 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; 10f3e9: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) status->executed_since_last_period.tv_nsec = 0; 10f3f0: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) 10f3f7: eb 32 jmp 10f42b * 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 ); 10f3f9: 83 ec 0c sub $0xc,%esp 10f3fc: 8d 5d e8 lea -0x18(%ebp),%ebx 10f3ff: 53 push %ebx 10f400: e8 57 c1 ff ff call 10b55c <_TOD_Get_uptime> #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 10f405: 83 c4 0c add $0xc,%esp 10f408: 8d 46 08 lea 0x8(%esi),%eax 10f40b: 50 push %eax 10f40c: 53 push %ebx 10f40d: 8d 47 44 lea 0x44(%edi),%eax 10f410: 50 push %eax 10f411: e8 86 de ff ff call 10d29c <_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( 10f416: 83 c4 0c add $0xc,%esp 10f419: 8d 46 10 lea 0x10(%esi),%eax 10f41c: 50 push %eax 10f41d: 53 push %ebx 10f41e: 68 04 1d 12 00 push $0x121d04 10f423: e8 74 de ff ff call 10d29c <_Timespec_Subtract> 10f428: 83 c4 10 add $0x10,%esp the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 10f42b: e8 54 d1 ff ff call 10c584 <_Thread_Enable_dispatch> 10f430: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f432: 8d 65 f4 lea -0xc(%ebp),%esp 10f435: 5b pop %ebx 10f436: 5e pop %esi 10f437: 5f pop %edi 10f438: c9 leave 10f439: c3 ret =============================================================================== 00109f7e : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 109f7e: 55 push %ebp 109f7f: 89 e5 mov %esp,%ebp 109f81: 57 push %edi 109f82: 56 push %esi 109f83: 53 push %ebx 109f84: 83 ec 20 sub $0x20,%esp 109f87: 8b 7d 0c mov 0xc(%ebp),%edi /** * 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 109f8a: 8d 45 f0 lea -0x10(%ebp),%eax 109f8d: 50 push %eax 109f8e: ff 75 08 pushl 0x8(%ebp) 109f91: 68 44 1b 12 00 push $0x121b44 109f96: e8 29 1e 00 00 call 10bdc4 <_Objects_Get> 109f9b: 89 c3 mov %eax,%ebx rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 109f9d: 83 c4 10 add $0x10,%esp 109fa0: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 109fa4: 0f 85 44 01 00 00 jne 10a0ee case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 109faa: 8b 40 50 mov 0x50(%eax),%eax 109fad: 3b 05 fc 1c 12 00 cmp 0x121cfc,%eax 109fb3: 74 0f je 109fc4 _Thread_Enable_dispatch(); 109fb5: e8 ca 25 00 00 call 10c584 <_Thread_Enable_dispatch> 109fba: bb 17 00 00 00 mov $0x17,%ebx 109fbf: e9 2f 01 00 00 jmp 10a0f3 return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 109fc4: 85 ff test %edi,%edi 109fc6: 75 21 jne 109fe9 switch ( the_period->state ) { 109fc8: 8b 43 38 mov 0x38(%ebx),%eax 109fcb: bb 0b 00 00 00 mov $0xb,%ebx 109fd0: 85 c0 test %eax,%eax 109fd2: 74 0b je 109fdf 109fd4: 83 e8 03 sub $0x3,%eax 109fd7: 83 f8 02 cmp $0x2,%eax 109fda: 19 db sbb %ebx,%ebx 109fdc: 83 e3 06 and $0x6,%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 109fdf: e8 a0 25 00 00 call 10c584 <_Thread_Enable_dispatch> 109fe4: e9 0a 01 00 00 jmp 10a0f3 return( return_value ); } _ISR_Disable( level ); 109fe9: 9c pushf 109fea: fa cli 109feb: 5e pop %esi switch ( the_period->state ) { 109fec: 8b 43 38 mov 0x38(%ebx),%eax 109fef: 83 f8 02 cmp $0x2,%eax 109ff2: 74 60 je 10a054 109ff4: 83 f8 04 cmp $0x4,%eax 109ff7: 0f 84 ba 00 00 00 je 10a0b7 109ffd: 85 c0 test %eax,%eax 109fff: 0f 85 e9 00 00 00 jne 10a0ee <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10a005: 56 push %esi 10a006: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10a007: 83 ec 0c sub $0xc,%esp 10a00a: 53 push %ebx 10a00b: e8 c8 fd ff ff call 109dd8 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10a010: 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. * 10a017: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 10a01e: c7 43 2c 14 a3 10 00 movl $0x10a314,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 10a025: 8b 45 08 mov 0x8(%ebp),%eax 10a028: 89 43 30 mov %eax,0x30(%ebx) * the heap 10a02b: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10a032: 89 7b 4c mov %edi,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, 10a035: 89 7b 1c mov %edi,0x1c(%ebx) void *starting_address, size_t *size 10a038: 58 pop %eax 10a039: 5a pop %edx 10a03a: 8d 43 10 lea 0x10(%ebx),%eax 10a03d: 50 push %eax 10a03e: 68 1c 1d 12 00 push $0x121d1c 10a043: e8 98 34 00 00 call 10d4e0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10a048: e8 37 25 00 00 call 10c584 <_Thread_Enable_dispatch> 10a04d: 31 db xor %ebx,%ebx 10a04f: e9 95 00 00 00 jmp 10a0e9 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10a054: 83 ec 0c sub $0xc,%esp 10a057: 53 push %ebx 10a058: e8 e3 fd ff ff call 109e40 <_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; 10a05d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) the_period->next_length = length; 10a064: 89 7b 4c mov %edi,0x4c(%ebx) _ISR_Enable( level ); 10a067: 56 push %esi 10a068: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10a069: 8b 15 fc 1c 12 00 mov 0x121cfc,%edx 10a06f: 8b 43 08 mov 0x8(%ebx),%eax 10a072: 89 42 20 mov %eax,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10a075: 5e pop %esi 10a076: 5f pop %edi 10a077: 68 00 40 00 00 push $0x4000 10a07c: 52 push %edx 10a07d: e8 1e 2d 00 00 call 10cda0 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10a082: 9c pushf 10a083: fa cli 10a084: 58 pop %eax local_state = the_period->state; 10a085: 8b 53 38 mov 0x38(%ebx),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10a088: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) _ISR_Enable( level ); 10a08f: 50 push %eax 10a090: 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 ) 10a091: 83 c4 10 add $0x10,%esp 10a094: 83 fa 03 cmp $0x3,%edx 10a097: 75 15 jne 10a0ae <== ALWAYS TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10a099: 51 push %ecx <== NOT EXECUTED 10a09a: 51 push %ecx <== NOT EXECUTED 10a09b: 68 00 40 00 00 push $0x4000 <== NOT EXECUTED 10a0a0: ff 35 fc 1c 12 00 pushl 0x121cfc <== NOT EXECUTED 10a0a6: e8 59 21 00 00 call 10c204 <_Thread_Clear_state> <== NOT EXECUTED 10a0ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED _Thread_Enable_dispatch(); 10a0ae: e8 d1 24 00 00 call 10c584 <_Thread_Enable_dispatch> 10a0b3: 31 db xor %ebx,%ebx 10a0b5: eb 3c jmp 10a0f3 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10a0b7: 83 ec 0c sub $0xc,%esp 10a0ba: 53 push %ebx 10a0bb: e8 80 fd ff ff call 109e40 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10a0c0: 56 push %esi 10a0c1: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10a0c2: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) the_period->next_length = length; 10a0c9: 89 7b 4c mov %edi,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, 10a0cc: 89 7b 1c mov %edi,0x1c(%ebx) void *starting_address, size_t *size 10a0cf: 58 pop %eax 10a0d0: 5a pop %edx 10a0d1: 8d 43 10 lea 0x10(%ebx),%eax 10a0d4: 50 push %eax 10a0d5: 68 1c 1d 12 00 push $0x121d1c 10a0da: e8 01 34 00 00 call 10d4e0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10a0df: e8 a0 24 00 00 call 10c584 <_Thread_Enable_dispatch> 10a0e4: bb 06 00 00 00 mov $0x6,%ebx 10a0e9: 83 c4 10 add $0x10,%esp 10a0ec: eb 05 jmp 10a0f3 return RTEMS_TIMEOUT; 10a0ee: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a0f3: 89 d8 mov %ebx,%eax 10a0f5: 8d 65 f4 lea -0xc(%ebp),%esp 10a0f8: 5b pop %ebx 10a0f9: 5e pop %esi 10a0fa: 5f pop %edi 10a0fb: c9 leave 10a0fc: c3 ret =============================================================================== 0010a100 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10a100: 55 push %ebp 10a101: 89 e5 mov %esp,%ebp 10a103: 57 push %edi 10a104: 56 push %esi 10a105: 53 push %ebx 10a106: 83 ec 6c sub $0x6c,%esp 10a109: 8b 75 0c mov 0xc(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10a10c: 85 f6 test %esi,%esi 10a10e: 0f 84 44 01 00 00 je 10a258 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10a114: 51 push %ecx 10a115: 51 push %ecx 10a116: 68 e4 a9 11 00 push $0x11a9e4 10a11b: ff 75 08 pushl 0x8(%ebp) 10a11e: ff d6 call *%esi #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 10a120: 58 pop %eax 10a121: 5a pop %edx 10a122: 68 02 aa 11 00 push $0x11aa02 10a127: ff 75 08 pushl 0x8(%ebp) 10a12a: ff d6 call *%esi #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 10a12c: 5f pop %edi 10a12d: 58 pop %eax 10a12e: 68 24 aa 11 00 push $0x11aa24 10a133: ff 75 08 pushl 0x8(%ebp) 10a136: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10a138: 59 pop %ecx 10a139: 5b pop %ebx 10a13a: 68 47 aa 11 00 push $0x11aa47 10a13f: ff 75 08 pushl 0x8(%ebp) 10a142: ff d6 call *%esi #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 10a144: 58 pop %eax 10a145: 5a pop %edx 10a146: 68 92 aa 11 00 push $0x11aa92 10a14b: ff 75 08 pushl 0x8(%ebp) 10a14e: ff d6 call *%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 ; 10a150: 8b 3d 4c 1b 12 00 mov 0x121b4c,%edi 10a156: 83 c4 10 add $0x10,%esp 10a159: e9 ee 00 00 00 jmp 10a24c id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10a15e: 50 push %eax 10a15f: 50 push %eax 10a160: 8d 45 94 lea -0x6c(%ebp),%eax 10a163: 50 push %eax 10a164: 57 push %edi 10a165: e8 ce 51 00 00 call 10f338 if ( status != RTEMS_SUCCESSFUL ) 10a16a: 83 c4 10 add $0x10,%esp 10a16d: 85 c0 test %eax,%eax 10a16f: 0f 85 d6 00 00 00 jne 10a24b continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10a175: 50 push %eax 10a176: 50 push %eax 10a177: 8d 55 cc lea -0x34(%ebp),%edx 10a17a: 52 push %edx 10a17b: 57 push %edi 10a17c: e8 07 52 00 00 call 10f388 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 10a181: c6 45 ef 00 movb $0x0,-0x11(%ebp) if ( the_status.owner ) { 10a185: 8b 55 cc mov -0x34(%ebp),%edx 10a188: 83 c4 10 add $0x10,%esp 10a18b: 85 d2 test %edx,%edx 10a18d: 74 10 je 10a19f <== NEVER TAKEN rtems_object_get_name( the_status.owner, sizeof(name), name ); 10a18f: 50 push %eax 10a190: 8d 45 ef lea -0x11(%ebp),%eax 10a193: 50 push %eax 10a194: 6a 05 push $0x5 10a196: 52 push %edx 10a197: e8 04 02 00 00 call 10a3a0 10a19c: 83 c4 10 add $0x10,%esp /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10a19f: 53 push %ebx 10a1a0: 53 push %ebx 10a1a1: ff 75 98 pushl -0x68(%ebp) 10a1a4: ff 75 94 pushl -0x6c(%ebp) 10a1a7: 8d 45 ef lea -0x11(%ebp),%eax 10a1aa: 50 push %eax 10a1ab: 57 push %edi 10a1ac: 68 de aa 11 00 push $0x11aade 10a1b1: ff 75 08 pushl 0x8(%ebp) 10a1b4: ff d6 call *%esi /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10a1b6: 8b 45 94 mov -0x6c(%ebp),%eax 10a1b9: 83 c4 20 add $0x20,%esp 10a1bc: 85 c0 test %eax,%eax 10a1be: 75 11 jne 10a1d1 (*print)( context, "\n" ); 10a1c0: 51 push %ecx 10a1c1: 51 push %ecx 10a1c2: 68 91 ad 11 00 push $0x11ad91 10a1c7: ff 75 08 pushl 0x8(%ebp) 10a1ca: ff d6 call *%esi 10a1cc: 83 c4 10 add $0x10,%esp 10a1cf: eb 7a jmp 10a24b */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 10a1d1: 52 push %edx 10a1d2: 8d 55 e4 lea -0x1c(%ebp),%edx 10a1d5: 52 push %edx 10a1d6: 50 push %eax 10a1d7: 8d 45 ac lea -0x54(%ebp),%eax 10a1da: 50 push %eax 10a1db: e8 f8 2f 00 00 call 10d1d8 <_Timespec_Divide_by_integer> &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 10a1e0: 8b 45 e8 mov -0x18(%ebp),%eax 10a1e3: bb e8 03 00 00 mov $0x3e8,%ebx 10a1e8: 99 cltd 10a1e9: f7 fb idiv %ebx 10a1eb: 50 push %eax 10a1ec: ff 75 e4 pushl -0x1c(%ebp) 10a1ef: 8b 45 a8 mov -0x58(%ebp),%eax 10a1f2: 99 cltd 10a1f3: f7 fb idiv %ebx 10a1f5: 50 push %eax 10a1f6: ff 75 a4 pushl -0x5c(%ebp) 10a1f9: 8b 45 a0 mov -0x60(%ebp),%eax 10a1fc: 99 cltd 10a1fd: f7 fb idiv %ebx 10a1ff: 50 push %eax 10a200: ff 75 9c pushl -0x64(%ebp) 10a203: 68 f5 aa 11 00 push $0x11aaf5 10a208: ff 75 08 pushl 0x8(%ebp) 10a20b: ff d6 call *%esi * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 10a20d: 83 c4 2c add $0x2c,%esp 10a210: 8d 45 e4 lea -0x1c(%ebp),%eax 10a213: 50 push %eax 10a214: ff 75 94 pushl -0x6c(%ebp) 10a217: 8d 45 c4 lea -0x3c(%ebp),%eax 10a21a: 50 push %eax 10a21b: e8 b8 2f 00 00 call 10d1d8 <_Timespec_Divide_by_integer> &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 10a220: 8b 45 e8 mov -0x18(%ebp),%eax 10a223: 99 cltd 10a224: f7 fb idiv %ebx 10a226: 50 push %eax 10a227: ff 75 e4 pushl -0x1c(%ebp) 10a22a: 8b 45 c0 mov -0x40(%ebp),%eax 10a22d: 99 cltd 10a22e: f7 fb idiv %ebx 10a230: 50 push %eax 10a231: ff 75 bc pushl -0x44(%ebp) 10a234: 8b 45 b8 mov -0x48(%ebp),%eax 10a237: 99 cltd 10a238: f7 fb idiv %ebx 10a23a: 50 push %eax 10a23b: ff 75 b4 pushl -0x4c(%ebp) 10a23e: 68 14 ab 11 00 push $0x11ab14 10a243: ff 75 08 pushl 0x8(%ebp) 10a246: ff d6 call *%esi 10a248: 83 c4 30 add $0x30,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10a24b: 47 inc %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 ; id <= _Rate_monotonic_Information.maximum_id ; 10a24c: 3b 3d 50 1b 12 00 cmp 0x121b50,%edi 10a252: 0f 86 06 ff ff ff jbe 10a15e the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10a258: 8d 65 f4 lea -0xc(%ebp),%esp 10a25b: 5b pop %ebx 10a25c: 5e pop %esi 10a25d: 5f pop %edi 10a25e: c9 leave 10a25f: c3 ret =============================================================================== 00111ac0 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 111ac0: 55 push %ebp 111ac1: 89 e5 mov %esp,%ebp 111ac3: 57 push %edi 111ac4: 56 push %esi 111ac5: 53 push %ebx 111ac6: 83 ec 1c sub $0x1c,%esp 111ac9: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 111acc: bb 09 00 00 00 mov $0x9,%ebx 111ad1: 85 ff test %edi,%edi 111ad3: 0f 84 82 00 00 00 je 111b5b <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 111ad9: 83 ec 0c sub $0xc,%esp 111adc: ff 35 f0 41 13 00 pushl 0x1341f0 111ae2: e8 29 1f 00 00 call 113a10 <_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 111ae7: 83 c4 0c add $0xc,%esp 111aea: 8d 45 ec lea -0x14(%ebp),%eax 111aed: 50 push %eax 111aee: ff 75 08 pushl 0x8(%ebp) 111af1: 68 ec 3f 13 00 push $0x133fec 111af6: e8 c1 34 00 00 call 114fbc <_Objects_Get_no_protection> 111afb: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 111afd: 83 c4 10 add $0x10,%esp 111b00: 8b 45 ec mov -0x14(%ebp),%eax 111b03: 85 c0 test %eax,%eax 111b05: 74 08 je 111b0f 111b07: bb 04 00 00 00 mov $0x4,%ebx 111b0c: 48 dec %eax 111b0d: eb 25 jmp 111b34 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 111b0f: 8d 45 f0 lea -0x10(%ebp),%eax 111b12: 50 push %eax 111b13: ff 75 10 pushl 0x10(%ebp) 111b16: 57 push %edi 111b17: 8d 46 68 lea 0x68(%esi),%eax 111b1a: 50 push %eax 111b1b: e8 ec 28 00 00 call 11440c <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 111b20: 83 c4 10 add $0x10,%esp 111b23: bb 09 00 00 00 mov $0x9,%ebx 111b28: 83 f8 01 cmp $0x1,%eax 111b2b: 74 1d je 111b4a 111b2d: 72 09 jb 111b38 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 111b2f: b3 18 mov $0x18,%bl starting_address, length, &amount_extended ); switch ( heap_status ) { 111b31: 83 f8 02 cmp $0x2,%eax 111b34: 75 0f jne 111b45 <== NEVER TAKEN 111b36: eb 12 jmp 111b4a case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 111b38: 8b 45 f0 mov -0x10(%ebp),%eax 111b3b: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 111b3e: 01 46 5c add %eax,0x5c(%esi) 111b41: 31 db xor %ebx,%ebx 111b43: eb 05 jmp 111b4a return_status = RTEMS_SUCCESSFUL; break; 111b45: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 111b4a: 83 ec 0c sub $0xc,%esp 111b4d: ff 35 f0 41 13 00 pushl 0x1341f0 111b53: e8 00 1f 00 00 call 113a58 <_API_Mutex_Unlock> 111b58: 83 c4 10 add $0x10,%esp return return_status; } 111b5b: 89 d8 mov %ebx,%eax 111b5d: 8d 65 f4 lea -0xc(%ebp),%esp 111b60: 5b pop %ebx 111b61: 5e pop %esi 111b62: 5f pop %edi 111b63: c9 leave 111b64: c3 ret =============================================================================== 00111c80 : uint32_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 111c80: 55 push %ebp 111c81: 89 e5 mov %esp,%ebp 111c83: 57 push %edi 111c84: 56 push %esi 111c85: 53 push %ebx 111c86: 83 ec 1c sub $0x1c,%esp Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; void *the_segment; if ( !segment ) 111c89: bb 09 00 00 00 mov $0x9,%ebx 111c8e: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 111c92: 0f 84 fd 00 00 00 je 111d95 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; *segment = NULL; 111c98: 8b 45 18 mov 0x18(%ebp),%eax 111c9b: c7 00 00 00 00 00 movl $0x0,(%eax) if ( size == 0 ) 111ca1: bb 08 00 00 00 mov $0x8,%ebx 111ca6: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 111caa: 0f 84 e5 00 00 00 je 111d95 <== NEVER TAKEN return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 111cb0: 83 ec 0c sub $0xc,%esp 111cb3: ff 35 f0 41 13 00 pushl 0x1341f0 111cb9: e8 52 1d 00 00 call 113a10 <_API_Mutex_Lock> executing = _Thread_Executing; 111cbe: 8b 3d f8 41 13 00 mov 0x1341f8,%edi 111cc4: 83 c4 0c add $0xc,%esp 111cc7: 8d 45 f0 lea -0x10(%ebp),%eax 111cca: 50 push %eax 111ccb: ff 75 08 pushl 0x8(%ebp) 111cce: 68 ec 3f 13 00 push $0x133fec 111cd3: e8 e4 32 00 00 call 114fbc <_Objects_Get_no_protection> 111cd8: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 111cda: 83 c4 10 add $0x10,%esp 111cdd: 8b 45 f0 mov -0x10(%ebp),%eax 111ce0: 85 c0 test %eax,%eax 111ce2: 74 14 je 111cf8 111ce4: 31 db xor %ebx,%ebx 111ce6: 83 f8 01 cmp $0x1,%eax 111ce9: 0f 95 c3 setne %bl 111cec: 4b dec %ebx 111ced: 83 e3 eb and $0xffffffeb,%ebx 111cf0: 83 c3 19 add $0x19,%ebx 111cf3: e9 8c 00 00 00 jmp 111d84 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 111cf8: bb 08 00 00 00 mov $0x8,%ebx 111cfd: 8b 55 0c mov 0xc(%ebp),%edx 111d00: 3b 56 5c cmp 0x5c(%esi),%edx 111d03: 77 7f ja 111d84 /** * 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. * 111d05: 50 push %eax 111d06: 50 push %eax 111d07: ff 75 0c pushl 0xc(%ebp) 111d0a: 8d 46 68 lea 0x68(%esi),%eax 111d0d: 50 push %eax 111d0e: e8 8d 26 00 00 call 1143a0 <_Heap_Allocate> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 111d13: 83 c4 10 add $0x10,%esp 111d16: 85 c0 test %eax,%eax 111d18: 74 0c je 111d26 the_region->number_of_used_blocks += 1; 111d1a: ff 46 64 incl 0x64(%esi) *segment = the_segment; 111d1d: 8b 55 18 mov 0x18(%ebp),%edx 111d20: 89 02 mov %eax,(%edx) 111d22: 31 db xor %ebx,%ebx 111d24: eb 5e jmp 111d84 return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 111d26: bb 0d 00 00 00 mov $0xd,%ebx 111d2b: f6 45 10 01 testb $0x1,0x10(%ebp) 111d2f: 75 53 jne 111d84 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 111d31: a1 38 41 13 00 mov 0x134138,%eax 111d36: 40 inc %eax 111d37: a3 38 41 13 00 mov %eax,0x134138 * 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(); 111d3c: 83 ec 0c sub $0xc,%esp 111d3f: ff 35 f0 41 13 00 pushl 0x1341f0 111d45: e8 0e 1d 00 00 call 113a58 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 111d4a: 8d 46 10 lea 0x10(%esi),%eax 111d4d: 89 47 44 mov %eax,0x44(%edi) executing->Wait.id = id; 111d50: 8b 55 08 mov 0x8(%ebp),%edx 111d53: 89 57 20 mov %edx,0x20(%edi) executing->Wait.count = size; 111d56: 8b 55 0c mov 0xc(%ebp),%edx 111d59: 89 57 24 mov %edx,0x24(%edi) executing->Wait.return_argument = segment; 111d5c: 8b 55 18 mov 0x18(%ebp),%edx 111d5f: 89 57 28 mov %edx,0x28(%edi) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 111d62: c7 46 40 01 00 00 00 movl $0x1,0x40(%esi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 111d69: 83 c4 0c add $0xc,%esp 111d6c: 68 0c 5f 11 00 push $0x115f0c 111d71: ff 75 14 pushl 0x14(%ebp) 111d74: 50 push %eax 111d75: e8 8e 3e 00 00 call 115c08 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 111d7a: e8 39 3a 00 00 call 1157b8 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 111d7f: 8b 5f 34 mov 0x34(%edi),%ebx 111d82: eb 0e jmp 111d92 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 111d84: 83 ec 0c sub $0xc,%esp 111d87: ff 35 f0 41 13 00 pushl 0x1341f0 111d8d: e8 c6 1c 00 00 call 113a58 <_API_Mutex_Unlock> 111d92: 83 c4 10 add $0x10,%esp return return_status; } 111d95: 89 d8 mov %ebx,%eax 111d97: 8d 65 f4 lea -0xc(%ebp),%esp 111d9a: 5b pop %ebx 111d9b: 5e pop %esi 111d9c: 5f pop %edi 111d9d: c9 leave 111d9e: c3 ret =============================================================================== 00111e50 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 111e50: 55 push %ebp 111e51: 89 e5 mov %esp,%ebp 111e53: 57 push %edi 111e54: 56 push %esi 111e55: 53 push %ebx 111e56: 83 ec 1c sub $0x1c,%esp 111e59: 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 ) 111e5c: 85 ff test %edi,%edi 111e5e: 0f 84 aa 00 00 00 je 111f0e return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 111e64: 83 ec 0c sub $0xc,%esp 111e67: ff 35 f0 41 13 00 pushl 0x1341f0 111e6d: e8 9e 1b 00 00 call 113a10 <_API_Mutex_Lock> 111e72: 83 c4 0c add $0xc,%esp 111e75: 8d 45 ec lea -0x14(%ebp),%eax 111e78: 50 push %eax 111e79: ff 75 08 pushl 0x8(%ebp) 111e7c: 68 ec 3f 13 00 push $0x133fec 111e81: e8 36 31 00 00 call 114fbc <_Objects_Get_no_protection> 111e86: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 111e88: 83 c4 10 add $0x10,%esp 111e8b: 8b 45 ec mov -0x14(%ebp),%eax 111e8e: 85 c0 test %eax,%eax 111e90: 74 1f je 111eb1 111e92: 31 db xor %ebx,%ebx 111e94: 83 f8 01 cmp $0x1,%eax 111e97: 0f 95 c3 setne %bl 111e9a: 4b dec %ebx 111e9b: 83 e3 eb and $0xffffffeb,%ebx 111e9e: 83 c3 19 add $0x19,%ebx case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 111ea1: 83 ec 0c sub $0xc,%esp 111ea4: ff 35 f0 41 13 00 pushl 0x1341f0 111eaa: e8 a9 1b 00 00 call 113a58 <_API_Mutex_Unlock> 111eaf: eb 39 jmp 111eea case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 111eb1: 83 ec 0c sub $0xc,%esp 111eb4: 8d 45 f0 lea -0x10(%ebp),%eax 111eb7: 50 push %eax 111eb8: 8d 45 e8 lea -0x18(%ebp),%eax 111ebb: 50 push %eax 111ebc: ff 75 10 pushl 0x10(%ebp) 111ebf: ff 75 0c pushl 0xc(%ebp) 111ec2: 8d 43 68 lea 0x68(%ebx),%eax 111ec5: 50 push %eax 111ec6: e8 b9 29 00 00 call 114884 <_Heap_Resize_block> 111ecb: 89 c6 mov %eax,%esi segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 111ecd: 8b 45 e8 mov -0x18(%ebp),%eax 111ed0: 89 07 mov %eax,(%edi) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 111ed2: 83 c4 20 add $0x20,%esp 111ed5: 85 f6 test %esi,%esi 111ed7: 75 16 jne 111eef <== ALWAYS TAKEN 111ed9: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) <== NOT EXECUTED 111edd: 74 10 je 111eef <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 111edf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111ee2: 53 push %ebx <== NOT EXECUTED 111ee3: e8 8c 68 00 00 call 118774 <_Region_Process_queue> <== NOT EXECUTED 111ee8: 31 db xor %ebx,%ebx <== NOT EXECUTED 111eea: 83 c4 10 add $0x10,%esp 111eed: eb 24 jmp 111f13 else _RTEMS_Unlock_allocator(); 111eef: 83 ec 0c sub $0xc,%esp 111ef2: ff 35 f0 41 13 00 pushl 0x1341f0 111ef8: e8 5b 1b 00 00 call 113a58 <_API_Mutex_Unlock> return 111efd: 83 c4 10 add $0x10,%esp 111f00: 31 db xor %ebx,%ebx 111f02: 85 f6 test %esi,%esi 111f04: 74 0d je 111f13 <== NEVER TAKEN 111f06: bb 0d 00 00 00 mov $0xd,%ebx 111f0b: 4e dec %esi 111f0c: 74 05 je 111f13 <== NEVER TAKEN return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 111f0e: bb 09 00 00 00 mov $0x9,%ebx } 111f13: 89 d8 mov %ebx,%eax 111f15: 8d 65 f4 lea -0xc(%ebp),%esp 111f18: 5b pop %ebx 111f19: 5e pop %esi 111f1a: 5f pop %edi 111f1b: c9 leave 111f1c: c3 ret =============================================================================== 00108f40 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 108f40: 55 push %ebp 108f41: 89 e5 mov %esp,%ebp 108f43: 57 push %edi 108f44: 56 push %esi 108f45: 53 push %ebx 108f46: 83 ec 2c sub $0x2c,%esp 108f49: 8b 5d 10 mov 0x10(%ebp),%ebx register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 108f4c: b8 03 00 00 00 mov $0x3,%eax 108f51: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 108f55: 0f 84 7f 01 00 00 je 1090da <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 108f5b: b8 09 00 00 00 mov $0x9,%eax 108f60: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 108f64: 0f 84 70 01 00 00 je 1090da <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 108f6a: 89 da mov %ebx,%edx 108f6c: 81 e2 c0 00 00 00 and $0xc0,%edx 108f72: 74 28 je 108f9c * @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, 108f74: 89 d8 mov %ebx,%eax 108f76: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 108f79: 83 f8 10 cmp $0x10,%eax 108f7c: 74 09 je 108f87 108f7e: 83 f8 20 cmp $0x20,%eax 108f81: 0f 85 4e 01 00 00 jne 1090d5 <== NEVER TAKEN 108f87: f6 c3 04 test $0x4,%bl 108f8a: 0f 84 45 01 00 00 je 1090d5 <== NEVER TAKEN _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 108f90: 81 fa c0 00 00 00 cmp $0xc0,%edx 108f96: 0f 84 39 01 00 00 je 1090d5 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 108f9c: 89 df mov %ebx,%edi 108f9e: 83 e7 30 and $0x30,%edi 108fa1: 74 0f je 108fb2 108fa3: b8 0a 00 00 00 mov $0xa,%eax 108fa8: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 108fac: 0f 87 28 01 00 00 ja 1090da /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 108fb2: a1 98 d7 11 00 mov 0x11d798,%eax 108fb7: 40 inc %eax 108fb8: a3 98 d7 11 00 mov %eax,0x11d798 #ifdef __cplusplus extern "C" { #endif /** 108fbd: 83 ec 0c sub $0xc,%esp 108fc0: 68 e0 d6 11 00 push $0x11d6e0 108fc5: e8 be 12 00 00 call 10a288 <_Objects_Allocate> 108fca: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 108fcc: 83 c4 10 add $0x10,%esp 108fcf: 85 c0 test %eax,%eax 108fd1: 75 0f jne 108fe2 _Thread_Enable_dispatch(); 108fd3: e8 b4 1e 00 00 call 10ae8c <_Thread_Enable_dispatch> 108fd8: b8 05 00 00 00 mov $0x5,%eax 108fdd: e9 f8 00 00 00 jmp 1090da _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 108fe2: 89 58 10 mov %ebx,0x10(%eax) * 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 ) ) { 108fe5: 85 ff test %edi,%edi 108fe7: 0f 84 92 00 00 00 je 10907f CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 108fed: f6 c3 40 test $0x40,%bl 108ff0: 74 09 je 108ffb the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 108ff2: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 108ff9: eb 18 jmp 109013 else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 108ffb: 84 db test %bl,%bl 108ffd: 79 09 jns 109008 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 108fff: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) 109006: eb 0b jmp 109013 else if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 109008: 31 c0 xor %eax,%eax 10900a: f6 c3 04 test $0x4,%bl 10900d: 0f 95 c0 setne %al 109010: 89 45 e4 mov %eax,-0x1c(%ebp) else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 109013: 83 ff 10 cmp $0x10,%edi 109016: 75 1a jne 109032 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109018: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) switch ( the_mutex_attributes.discipline ) { 10901f: 8b 45 e4 mov -0x1c(%ebp),%eax 109022: 83 f8 01 cmp $0x1,%eax 109025: 76 12 jbe 109039 109027: 83 f8 03 cmp $0x3,%eax 10902a: 77 11 ja 10903d <== 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; 10902c: c6 45 e0 01 movb $0x1,-0x20(%ebp) 109030: eb 0b jmp 10903d break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 109032: c7 45 dc 02 00 00 00 movl $0x2,-0x24(%ebp) the_mutex_attributes.only_owner_release = FALSE; 109039: c6 45 e0 00 movb $0x0,-0x20(%ebp) } the_mutex_attributes.priority_ceiling = priority_ceiling; 10903d: 8b 45 14 mov 0x14(%ebp),%eax 109040: 89 45 e8 mov %eax,-0x18(%ebp) mutex_status = _CORE_mutex_Initialize( 109043: 51 push %ecx 109044: 31 c0 xor %eax,%eax 109046: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10904a: 0f 94 c0 sete %al 10904d: 50 push %eax 10904e: 8d 45 dc lea -0x24(%ebp),%eax 109051: 50 push %eax 109052: 8d 46 14 lea 0x14(%esi),%eax 109055: 50 push %eax 109056: e8 ed 0b 00 00 call 109c48 <_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 ) { 10905b: 83 c4 10 add $0x10,%esp 10905e: 83 f8 06 cmp $0x6,%eax 109061: 75 50 jne 1090b3 <== 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 109063: 52 push %edx <== NOT EXECUTED 109064: 52 push %edx <== NOT EXECUTED 109065: 56 push %esi <== NOT EXECUTED 109066: 68 e0 d6 11 00 push $0x11d6e0 <== NOT EXECUTED 10906b: e8 28 15 00 00 call 10a598 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 109070: e8 17 1e 00 00 call 10ae8c <_Thread_Enable_dispatch><== NOT EXECUTED 109075: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED 10907a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10907d: eb 5b jmp 1090da <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10907f: 31 c0 xor %eax,%eax 109081: f6 c3 04 test $0x4,%bl 109084: 0f 95 c0 setne %al 109087: 89 45 f0 mov %eax,-0x10(%ebp) /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 10908a: 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; 109091: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 109098: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) _CORE_semaphore_Initialize( 10909f: 50 push %eax 1090a0: ff 75 0c pushl 0xc(%ebp) 1090a3: 8d 45 ec lea -0x14(%ebp),%eax 1090a6: 50 push %eax 1090a7: 8d 46 14 lea 0x14(%esi),%eax 1090aa: 50 push %eax 1090ab: e8 14 0e 00 00 call 109ec4 <_CORE_semaphore_Initialize> 1090b0: 83 c4 10 add $0x10,%esp 1090b3: 8b 4e 08 mov 0x8(%esi),%ecx 1090b6: 0f b7 d1 movzwl %cx,%edx 1090b9: a1 fc d6 11 00 mov 0x11d6fc,%eax 1090be: 89 34 90 mov %esi,(%eax,%edx,4) 1090c1: 8b 45 08 mov 0x8(%ebp),%eax 1090c4: 89 46 0c mov %eax,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 1090c7: 8b 45 18 mov 0x18(%ebp),%eax 1090ca: 89 08 mov %ecx,(%eax) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1090cc: e8 bb 1d 00 00 call 10ae8c <_Thread_Enable_dispatch> 1090d1: 31 c0 xor %eax,%eax 1090d3: eb 05 jmp 1090da return RTEMS_SUCCESSFUL; 1090d5: b8 0b 00 00 00 mov $0xb,%eax } 1090da: 8d 65 f4 lea -0xc(%ebp),%esp 1090dd: 5b pop %ebx 1090de: 5e pop %esi 1090df: 5f pop %edi 1090e0: c9 leave 1090e1: c3 ret =============================================================================== 001121dc : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 1121dc: 55 push %ebp 1121dd: 89 e5 mov %esp,%ebp 1121df: 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 1121e2: 8d 45 fc lea -0x4(%ebp),%eax 1121e5: 50 push %eax 1121e6: ff 75 08 pushl 0x8(%ebp) 1121e9: 68 2c 40 13 00 push $0x13402c 1121ee: e8 05 2e 00 00 call 114ff8 <_Objects_Get> 1121f3: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 1121f5: 83 c4 10 add $0x10,%esp 1121f8: b8 04 00 00 00 mov $0x4,%eax 1121fd: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 112201: 75 2b jne 11222e case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 112203: f6 42 10 30 testb $0x30,0x10(%edx) 112207: 8d 42 14 lea 0x14(%edx),%eax 11220a: 74 0d je 112219 <== NEVER TAKEN _CORE_mutex_Flush( 11220c: 51 push %ecx 11220d: 6a 01 push $0x1 11220f: 6a 00 push $0x0 112211: 50 push %eax 112212: e8 e9 1c 00 00 call 113f00 <_CORE_mutex_Flush> 112217: eb 0b jmp 112224 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 112219: 52 push %edx <== NOT EXECUTED 11221a: 6a 01 push $0x1 <== NOT EXECUTED 11221c: 6a 00 push $0x0 <== NOT EXECUTED 11221e: 50 push %eax <== NOT EXECUTED 11221f: e8 58 1f 00 00 call 11417c <_CORE_semaphore_Flush> <== NOT EXECUTED 112224: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 112227: e8 8c 35 00 00 call 1157b8 <_Thread_Enable_dispatch> 11222c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11222e: c9 leave 11222f: c3 ret =============================================================================== 0011582c : */ void rtems_shutdown_executive( uint32_t result ) { 11582c: 55 push %ebp 11582d: 89 e5 mov %esp,%ebp 11582f: 83 ec 28 sub $0x28,%esp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 115832: 83 3d 38 d9 11 00 04 cmpl $0x4,0x11d938 115839: 74 1d je 115858 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 11583b: c7 05 38 d9 11 00 04 movl $0x4,0x11d938 115842: 00 00 00 #endif } /** * This routine sets the current system state to that specified by * the called. 115845: 50 push %eax 115846: 50 push %eax 115847: 68 80 d7 11 00 push $0x11d780 11584c: 8d 45 e8 lea -0x18(%ebp),%eax 11584f: 50 push %eax 115850: e8 6b 66 ff ff call 10bec0 <_CPU_Context_switch> 115855: 83 c4 10 add $0x10,%esp <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 115858: c9 leave <== NOT EXECUTED 115859: c3 ret <== NOT EXECUTED =============================================================================== 00109ef0 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 109ef0: 55 push %ebp 109ef1: 89 e5 mov %esp,%ebp 109ef3: 83 ec 08 sub $0x8,%esp 109ef6: 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 ]; 109ef9: a1 c4 12 12 00 mov 0x1212c4,%eax 109efe: 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 109f04: a1 04 12 12 00 mov 0x121204,%eax 109f09: 40 inc %eax 109f0a: a3 04 12 12 00 mov %eax,0x121204 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 109f0f: 85 c9 test %ecx,%ecx 109f11: 74 0b je 109f1e <== NEVER TAKEN asr->mode_set = mode_set; 109f13: 8b 45 0c mov 0xc(%ebp),%eax 109f16: 89 42 10 mov %eax,0x10(%edx) asr->handler = asr_handler; 109f19: 89 4a 0c mov %ecx,0xc(%edx) 109f1c: eb 27 jmp 109f45 #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 109f1e: 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 109f22: 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. 109f29: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) <== NOT EXECUTED * 109f30: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) <== NOT EXECUTED * @param[in] the_heap is the heap to operate upon 109f37: 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 109f3e: c7 42 1c 00 00 00 00 movl $0x0,0x1c(%edx) <== NOT EXECUTED } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 109f45: e8 8e 1e 00 00 call 10bdd8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 109f4a: 31 c0 xor %eax,%eax 109f4c: c9 leave 109f4d: c3 ret =============================================================================== 001123cc : rtems_status_code rtems_signal_send( Objects_Id id, rtems_signal_set signal_set ) { 1123cc: 55 push %ebp 1123cd: 89 e5 mov %esp,%ebp 1123cf: 53 push %ebx 1123d0: 83 ec 14 sub $0x14,%esp 1123d3: 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 ) 1123d6: b8 0a 00 00 00 mov $0xa,%eax 1123db: 85 db test %ebx,%ebx 1123dd: 74 71 je 112450 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1123df: 50 push %eax 1123e0: 50 push %eax 1123e1: 8d 45 f8 lea -0x8(%ebp),%eax 1123e4: 50 push %eax 1123e5: ff 75 08 pushl 0x8(%ebp) 1123e8: e8 eb 33 00 00 call 1157d8 <_Thread_Get> 1123ed: 89 c1 mov %eax,%ecx switch ( location ) { 1123ef: 83 c4 10 add $0x10,%esp 1123f2: b8 04 00 00 00 mov $0x4,%eax 1123f7: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 1123fb: 75 53 jne 112450 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1123fd: 8b 91 f4 00 00 00 mov 0xf4(%ecx),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 112403: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 112407: 74 3d je 112446 if ( asr->is_enabled ) { 112409: 80 7a 08 00 cmpb $0x0,0x8(%edx) 11240d: 74 26 je 112435 <== 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 11240f: 9c pushf 112410: fa cli 112411: 58 pop %eax ); 112412: 09 5a 14 or %ebx,0x14(%edx) 112415: 50 push %eax 112416: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 112417: c6 41 75 01 movb $0x1,0x75(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11241b: a1 d4 41 13 00 mov 0x1341d4,%eax 112420: 85 c0 test %eax,%eax 112422: 74 19 je 11243d 112424: 3b 0d f8 41 13 00 cmp 0x1341f8,%ecx 11242a: 75 11 jne 11243d <== NEVER TAKEN _ISR_Signals_to_thread_executing = TRUE; 11242c: c6 05 8c 42 13 00 01 movb $0x1,0x13428c 112433: eb 08 jmp 11243d * @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 112435: 9c pushf <== NOT EXECUTED 112436: fa cli <== NOT EXECUTED 112437: 58 pop %eax <== NOT EXECUTED ); 112438: 09 5a 18 or %ebx,0x18(%edx) <== NOT EXECUTED 11243b: 50 push %eax <== NOT EXECUTED 11243c: 9d popf <== NOT EXECUTED } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 11243d: e8 76 33 00 00 call 1157b8 <_Thread_Enable_dispatch> 112442: 31 c0 xor %eax,%eax 112444: eb 0a jmp 112450 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 112446: e8 6d 33 00 00 call 1157b8 <_Thread_Enable_dispatch> 11244b: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112450: 8b 5d fc mov -0x4(%ebp),%ebx 112453: c9 leave 112454: c3 ret =============================================================================== 001092ec : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, Objects_Id *id ) { 1092ec: 55 push %ebp 1092ed: 89 e5 mov %esp,%ebp 1092ef: 57 push %edi 1092f0: 56 push %esi 1092f1: 53 push %ebx 1092f2: 83 ec 0c sub $0xc,%esp 1092f5: 8b 5d 14 mov 0x14(%ebp),%ebx 1092f8: 8b 7d 18 mov 0x18(%ebp),%edi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 1092fb: b8 09 00 00 00 mov $0x9,%eax 109300: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 109304: 0f 84 08 01 00 00 je 109412 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10930a: b8 03 00 00 00 mov $0x3,%eax 10930f: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 109313: 0f 84 f9 00 00 00 je 109412 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 109319: 66 85 ff test %di,%di 10931c: 78 24 js 109342 bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ); 10931e: 31 d2 xor %edx,%edx 109320: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 109324: 74 0f je 109335 109326: 0f b6 05 84 93 11 00 movzbl 0x119384,%eax 10932d: 31 d2 xor %edx,%edx 10932f: 39 45 0c cmp %eax,0xc(%ebp) 109332: 0f 96 c2 setbe %dl if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) 109335: b8 13 00 00 00 mov $0x13,%eax 10933a: 85 d2 test %edx,%edx 10933c: 0f 84 d0 00 00 00 je 109412 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 109342: 83 ec 0c sub $0xc,%esp 109345: ff 35 50 d8 11 00 pushl 0x11d850 10934b: e8 28 07 00 00 call 109a78 <_API_Mutex_Lock> #ifdef __cplusplus extern "C" { #endif /** 109350: c7 04 24 20 d7 11 00 movl $0x11d720,(%esp) 109357: e8 2c 0f 00 00 call 10a288 <_Objects_Allocate> 10935c: 89 c6 mov %eax,%esi * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10935e: 83 c4 10 add $0x10,%esp 109361: 85 c0 test %eax,%eax 109363: 75 18 jne 10937d _RTEMS_Unlock_allocator(); 109365: 83 ec 0c sub $0xc,%esp 109368: ff 35 50 d8 11 00 pushl 0x11d850 10936e: e8 4d 07 00 00 call 109ac0 <_API_Mutex_Unlock> 109373: b8 05 00 00 00 mov $0x5,%eax 109378: e9 92 00 00 00 jmp 10940f /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10937d: 50 push %eax 10937e: ff 75 08 pushl 0x8(%ebp) 109381: 89 d8 mov %ebx,%eax 109383: 83 e0 01 and $0x1,%eax 109386: 50 push %eax 109387: 6a 00 push $0x0 109389: 89 d8 mov %ebx,%eax 10938b: c1 e8 09 shr $0x9,%eax 10938e: 83 e0 01 and $0x1,%eax 109391: 50 push %eax 109392: 89 d8 mov %ebx,%eax 109394: c1 e8 08 shr $0x8,%eax 109397: 83 f0 01 xor $0x1,%eax 10939a: 83 e0 01 and $0x1,%eax 10939d: 50 push %eax 10939e: ff 75 0c pushl 0xc(%ebp) 1093a1: 83 e7 01 and $0x1,%edi 1093a4: 57 push %edi 1093a5: ff 75 10 pushl 0x10(%ebp) 1093a8: 6a 00 push $0x0 1093aa: 56 push %esi 1093ab: 68 20 d7 11 00 push $0x11d720 1093b0: e8 6f 1b 00 00 call 10af24 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 1093b5: 83 c4 30 add $0x30,%esp 1093b8: 84 c0 test %al,%al 1093ba: 75 27 jne 1093e3 * @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 1093bc: 83 ec 0c sub $0xc,%esp 1093bf: ff 76 08 pushl 0x8(%esi) 1093c2: e8 45 12 00 00 call 10a60c <_Objects_Get_information_id> 1093c7: 5a pop %edx 1093c8: 59 pop %ecx 1093c9: 56 push %esi 1093ca: 50 push %eax 1093cb: e8 c8 11 00 00 call 10a598 <_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(); 1093d0: 58 pop %eax 1093d1: ff 35 50 d8 11 00 pushl 0x11d850 1093d7: e8 e4 06 00 00 call 109ac0 <_API_Mutex_Unlock> 1093dc: b8 0d 00 00 00 mov $0xd,%eax 1093e1: eb 2c jmp 10940f } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 1093e3: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax 1093e9: c1 eb 0a shr $0xa,%ebx 1093ec: 83 f3 01 xor $0x1,%ebx 1093ef: 88 da mov %bl,%dl 1093f1: 83 e2 01 and $0x1,%edx 1093f4: 88 50 08 mov %dl,0x8(%eax) *id = the_thread->Object.id; 1093f7: 8b 46 08 mov 0x8(%esi),%eax 1093fa: 8b 55 1c mov 0x1c(%ebp),%edx 1093fd: 89 02 mov %eax,(%edx) ); } #endif _RTEMS_Unlock_allocator(); 1093ff: 83 ec 0c sub $0xc,%esp 109402: ff 35 50 d8 11 00 pushl 0x11d850 109408: e8 b3 06 00 00 call 109ac0 <_API_Mutex_Unlock> 10940d: 31 c0 xor %eax,%eax 10940f: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 109412: 8d 65 f4 lea -0xc(%ebp),%esp 109415: 5b pop %ebx 109416: 5e pop %esi 109417: 5f pop %edi 109418: c9 leave 109419: c3 ret =============================================================================== 0010aa24 : rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 10aa24: 55 push %ebp 10aa25: 89 e5 mov %esp,%ebp 10aa27: 56 push %esi 10aa28: 53 push %ebx 10aa29: 83 ec 10 sub $0x10,%esp 10aa2c: 8b 4d 08 mov 0x8(%ebp),%ecx 10aa2f: 8b 5d 0c mov 0xc(%ebp),%ebx 10aa32: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10aa35: a1 a4 28 12 00 mov 0x1228a4,%eax 10aa3a: 8b 40 40 mov 0x40(%eax),%eax 10aa3d: ba 16 00 00 00 mov $0x16,%edx 10aa42: 80 78 04 00 cmpb $0x0,0x4(%eax) 10aa46: 74 61 je 10aaa9 <== NEVER TAKEN return RTEMS_NOT_CONFIGURED; if ( !note ) 10aa48: ba 09 00 00 00 mov $0x9,%edx 10aa4d: 85 f6 test %esi,%esi 10aa4f: 74 58 je 10aaa9 <== 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 ) 10aa51: ba 0a 00 00 00 mov $0xa,%edx 10aa56: 83 fb 0f cmp $0xf,%ebx 10aa59: 77 4e ja 10aaa9 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10aa5b: 85 c9 test %ecx,%ecx 10aa5d: 74 0a je 10aa69 10aa5f: a1 cc 28 12 00 mov 0x1228cc,%eax 10aa64: 3b 48 08 cmp 0x8(%eax),%ecx 10aa67: 75 13 jne 10aa7c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10aa69: a1 cc 28 12 00 mov 0x1228cc,%eax 10aa6e: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10aa74: 8b 44 98 20 mov 0x20(%eax,%ebx,4),%eax 10aa78: 89 06 mov %eax,(%esi) 10aa7a: eb 2b jmp 10aaa7 return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10aa7c: 50 push %eax 10aa7d: 50 push %eax 10aa7e: 8d 45 f4 lea -0xc(%ebp),%eax 10aa81: 50 push %eax 10aa82: 51 push %ecx 10aa83: e8 d8 1c 00 00 call 10c760 <_Thread_Get> switch ( location ) { 10aa88: 83 c4 10 add $0x10,%esp 10aa8b: ba 04 00 00 00 mov $0x4,%edx 10aa90: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aa94: 75 13 jne 10aaa9 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10aa96: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax <== NOT EXECUTED 10aa9c: 8b 44 98 20 mov 0x20(%eax,%ebx,4),%eax <== NOT EXECUTED 10aaa0: 89 06 mov %eax,(%esi) <== NOT EXECUTED _Thread_Enable_dispatch(); 10aaa2: e8 99 1c 00 00 call 10c740 <_Thread_Enable_dispatch><== NOT EXECUTED 10aaa7: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10aaa9: 89 d0 mov %edx,%eax 10aaab: 8d 65 f8 lea -0x8(%ebp),%esp 10aaae: 5b pop %ebx 10aaaf: 5e pop %esi 10aab0: c9 leave 10aab1: c3 ret =============================================================================== 001094a0 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, Objects_Id *id ) { 1094a0: 55 push %ebp 1094a1: 89 e5 mov %esp,%ebp 1094a3: 83 ec 08 sub $0x8,%esp 1094a6: 8b 4d 08 mov 0x8(%ebp),%ecx 1094a9: 8b 55 10 mov 0x10(%ebp),%edx Objects_Name_or_id_lookup_errors status; if ( !id ) 1094ac: b8 09 00 00 00 mov $0x9,%eax 1094b1: 85 d2 test %edx,%edx 1094b3: 74 2b je 1094e0 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 1094b5: 85 c9 test %ecx,%ecx 1094b7: 75 0e jne 1094c7 *id = _Thread_Executing->Object.id; 1094b9: a1 58 d8 11 00 mov 0x11d858,%eax 1094be: 8b 40 08 mov 0x8(%eax),%eax 1094c1: 89 02 mov %eax,(%edx) 1094c3: 31 c0 xor %eax,%eax 1094c5: eb 19 jmp 1094e0 return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 1094c7: 52 push %edx 1094c8: ff 75 0c pushl 0xc(%ebp) 1094cb: 51 push %ecx 1094cc: 68 20 d7 11 00 push $0x11d720 1094d1: e8 3e 13 00 00 call 10a814 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 1094d6: 8b 04 85 1c 73 11 00 mov 0x11731c(,%eax,4),%eax 1094dd: 83 c4 10 add $0x10,%esp } 1094e0: c9 leave 1094e1: c3 ret =============================================================================== 001099ec : */ rtems_status_code rtems_task_is_suspended( Objects_Id id ) { 1099ec: 55 push %ebp 1099ed: 89 e5 mov %esp,%ebp 1099ef: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 1099f2: 8d 45 fc lea -0x4(%ebp),%eax 1099f5: 50 push %eax 1099f6: ff 75 08 pushl 0x8(%ebp) 1099f9: e8 46 1a 00 00 call 10b444 <_Thread_Get> 1099fe: 89 c2 mov %eax,%edx switch ( location ) { 109a00: 83 c4 10 add $0x10,%esp 109a03: b8 04 00 00 00 mov $0x4,%eax 109a08: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 109a0c: 75 19 jne 109a27 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 109a0e: f6 42 10 02 testb $0x2,0x10(%edx) 109a12: 75 09 jne 109a1d _Thread_Enable_dispatch(); 109a14: e8 0b 1a 00 00 call 10b424 <_Thread_Enable_dispatch> 109a19: 31 c0 xor %eax,%eax 109a1b: eb 0a jmp 109a27 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 109a1d: e8 02 1a 00 00 call 10b424 <_Thread_Enable_dispatch> 109a22: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109a27: c9 leave 109a28: c3 ret =============================================================================== 0010ecd4 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 10ecd4: 55 push %ebp 10ecd5: 89 e5 mov %esp,%ebp 10ecd7: 57 push %edi 10ecd8: 56 push %esi 10ecd9: 53 push %ebx 10ecda: 83 ec 0c sub $0xc,%esp 10ecdd: 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 ) 10ece0: b8 09 00 00 00 mov $0x9,%eax 10ece5: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10ece9: 0f 84 04 01 00 00 je 10edf3 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 10ecef: a1 58 d8 11 00 mov 0x11d858,%eax 10ecf4: 89 45 ec mov %eax,-0x14(%ebp) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10ecf7: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx 10ecfd: 89 55 f0 mov %edx,-0x10(%ebp) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 10ed00: 80 78 76 01 cmpb $0x1,0x76(%eax) 10ed04: 19 f6 sbb %esi,%esi 10ed06: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 10ed0c: 83 78 7c 00 cmpl $0x0,0x7c(%eax) 10ed10: 74 06 je 10ed18 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 10ed12: 81 ce 00 02 00 00 or $0x200,%esi old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 10ed18: 8b 5d f0 mov -0x10(%ebp),%ebx 10ed1b: 80 7b 08 01 cmpb $0x1,0x8(%ebx) 10ed1f: 19 db sbb %ebx,%ebx 10ed21: 81 e3 00 04 00 00 and $0x400,%ebx old_mode |= _ISR_Get_level(); 10ed27: e8 6f d3 ff ff call 10c09b <_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; 10ed2c: 09 c3 or %eax,%ebx old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 10ed2e: 09 f3 or %esi,%ebx 10ed30: 8b 45 10 mov 0x10(%ebp),%eax 10ed33: 89 18 mov %ebx,(%eax) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 10ed35: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 10ed3c: 74 11 je 10ed4f executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE; 10ed3e: 89 f8 mov %edi,%eax 10ed40: c1 e8 08 shr $0x8,%eax 10ed43: 83 f0 01 xor $0x1,%eax 10ed46: 83 e0 01 and $0x1,%eax 10ed49: 8b 55 ec mov -0x14(%ebp),%edx 10ed4c: 88 42 76 mov %al,0x76(%edx) if ( mask & RTEMS_TIMESLICE_MASK ) { 10ed4f: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 10ed56: 74 26 je 10ed7e if ( _Modes_Is_timeslice(mode_set) ) { 10ed58: f7 c7 00 02 00 00 test $0x200,%edi 10ed5e: 74 14 je 10ed74 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10ed60: 8b 5d ec mov -0x14(%ebp),%ebx 10ed63: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ed6a: a1 64 d7 11 00 mov 0x11d764,%eax 10ed6f: 89 43 78 mov %eax,0x78(%ebx) 10ed72: eb 0a jmp 10ed7e } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10ed74: 8b 45 ec mov -0x14(%ebp),%eax 10ed77: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 10ed7e: f6 45 0c 01 testb $0x1,0xc(%ebp) 10ed82: 74 0c je 10ed90 * 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 10ed84: f7 c7 01 00 00 00 test $0x1,%edi 10ed8a: 74 03 je 10ed8f 10ed8c: fa cli 10ed8d: eb 01 jmp 10ed90 10ed8f: fb sti */ is_asr_enabled = FALSE; needs_asr_dispatching = FALSE; if ( mask & RTEMS_ASR_MASK ) { 10ed90: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 10ed97: 74 3b je 10edd4 10ed99: c1 ef 0a shr $0xa,%edi 10ed9c: 83 f7 01 xor $0x1,%edi 10ed9f: 89 f8 mov %edi,%eax 10eda1: 83 e0 01 and $0x1,%eax is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 10eda4: 8b 55 f0 mov -0x10(%ebp),%edx 10eda7: 3a 42 08 cmp 0x8(%edx),%al 10edaa: 74 28 je 10edd4 asr->is_enabled = is_asr_enabled; 10edac: 88 42 08 mov %al,0x8(%edx) uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10edaf: 9c pushf 10edb0: fa cli 10edb1: 59 pop %ecx /** 10edb2: 8b 5d f0 mov -0x10(%ebp),%ebx 10edb5: 8b 53 18 mov 0x18(%ebx),%edx * This routine grows @a the_heap memory area using the size bytes which 10edb8: 8b 43 14 mov 0x14(%ebx),%eax 10edbb: 89 43 18 mov %eax,0x18(%ebx) * begin at @a starting_address. 10edbe: 89 53 14 mov %edx,0x14(%ebx) * 10edc1: 51 push %ecx 10edc2: 9d popf _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 10edc3: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10edc7: 74 0b je 10edd4 <== ALWAYS TAKEN needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 10edc9: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED 10edcc: c6 40 75 01 movb $0x1,0x75(%eax) <== NOT EXECUTED 10edd0: b3 01 mov $0x1,%bl <== NOT EXECUTED 10edd2: eb 02 jmp 10edd6 <== NOT EXECUTED 10edd4: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up(_System_state_Current) ) 10edd6: 83 3d 38 d9 11 00 03 cmpl $0x3,0x11d938 10eddd: 75 12 jne 10edf1 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 10eddf: e8 58 01 00 00 call 10ef3c <_Thread_Evaluate_mode> 10ede4: 84 c0 test %al,%al 10ede6: 75 04 jne 10edec 10ede8: 84 db test %bl,%bl 10edea: 74 05 je 10edf1 <== ALWAYS TAKEN _Thread_Dispatch(); 10edec: e8 57 bf ff ff call 10ad48 <_Thread_Dispatch> 10edf1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10edf3: 83 c4 0c add $0xc,%esp 10edf6: 5b pop %ebx 10edf7: 5e pop %esi 10edf8: 5f pop %edi 10edf9: c9 leave 10edfa: c3 ret =============================================================================== 0010ab88 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 10ab88: 55 push %ebp 10ab89: 89 e5 mov %esp,%ebp 10ab8b: 56 push %esi 10ab8c: 53 push %ebx 10ab8d: 83 ec 10 sub $0x10,%esp 10ab90: 8b 4d 08 mov 0x8(%ebp),%ecx 10ab93: 8b 5d 0c mov 0xc(%ebp),%ebx 10ab96: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10ab99: a1 a4 28 12 00 mov 0x1228a4,%eax 10ab9e: 8b 40 40 mov 0x40(%eax),%eax 10aba1: ba 16 00 00 00 mov $0x16,%edx 10aba6: 80 78 04 00 cmpb $0x0,0x4(%eax) 10abaa: 74 54 je 10ac00 <== 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 ) 10abac: ba 0a 00 00 00 mov $0xa,%edx 10abb1: 83 fb 0f cmp $0xf,%ebx 10abb4: 77 4a ja 10ac00 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10abb6: 85 c9 test %ecx,%ecx 10abb8: 74 0a je 10abc4 10abba: a1 cc 28 12 00 mov 0x1228cc,%eax 10abbf: 3b 48 08 cmp 0x8(%eax),%ecx 10abc2: 75 11 jne 10abd5 <== ALWAYS TAKEN _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10abc4: a1 cc 28 12 00 mov 0x1228cc,%eax 10abc9: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10abcf: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10abd3: eb 29 jmp 10abfe return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10abd5: 50 push %eax 10abd6: 50 push %eax 10abd7: 8d 45 f4 lea -0xc(%ebp),%eax 10abda: 50 push %eax 10abdb: 51 push %ecx 10abdc: e8 7f 1b 00 00 call 10c760 <_Thread_Get> switch ( location ) { 10abe1: 83 c4 10 add $0x10,%esp 10abe4: ba 04 00 00 00 mov $0x4,%edx 10abe9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10abed: 75 11 jne 10ac00 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10abef: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10abf5: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10abf9: e8 42 1b 00 00 call 10c740 <_Thread_Enable_dispatch> 10abfe: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ac00: 89 d0 mov %edx,%eax 10ac02: 8d 65 f8 lea -0x8(%ebp),%esp 10ac05: 5b pop %ebx 10ac06: 5e pop %esi 10ac07: c9 leave 10ac08: c3 ret =============================================================================== 0010a3a8 : rtems_status_code rtems_task_set_priority( Objects_Id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10a3a8: 55 push %ebp 10a3a9: 89 e5 mov %esp,%ebp 10a3ab: 56 push %esi 10a3ac: 53 push %ebx 10a3ad: 83 ec 10 sub $0x10,%esp 10a3b0: 8b 5d 0c mov 0xc(%ebp),%ebx 10a3b3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10a3b6: 85 db test %ebx,%ebx 10a3b8: 74 10 je 10a3ca 10a3ba: 0f b6 05 24 d0 11 00 movzbl 0x11d024,%eax 10a3c1: ba 13 00 00 00 mov $0x13,%edx 10a3c6: 39 c3 cmp %eax,%ebx 10a3c8: 77 52 ja 10a41c !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10a3ca: ba 09 00 00 00 mov $0x9,%edx 10a3cf: 85 f6 test %esi,%esi 10a3d1: 74 49 je 10a41c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10a3d3: 52 push %edx 10a3d4: 52 push %edx 10a3d5: 8d 45 f4 lea -0xc(%ebp),%eax 10a3d8: 50 push %eax 10a3d9: ff 75 08 pushl 0x8(%ebp) 10a3dc: e8 93 1a 00 00 call 10be74 <_Thread_Get> 10a3e1: 89 c1 mov %eax,%ecx switch ( location ) { 10a3e3: 83 c4 10 add $0x10,%esp 10a3e6: ba 04 00 00 00 mov $0x4,%edx 10a3eb: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a3ef: 75 2b jne 10a41c case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10a3f1: 8b 40 14 mov 0x14(%eax),%eax 10a3f4: 89 06 mov %eax,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10a3f6: 85 db test %ebx,%ebx 10a3f8: 74 1b je 10a415 the_thread->real_priority = new_priority; 10a3fa: 89 59 18 mov %ebx,0x18(%ecx) if ( the_thread->resource_count == 0 || 10a3fd: 83 79 1c 00 cmpl $0x0,0x1c(%ecx) 10a401: 74 05 je 10a408 10a403: 39 59 14 cmp %ebx,0x14(%ecx) 10a406: 76 0d jbe 10a415 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, FALSE ); 10a408: 50 push %eax 10a409: 6a 00 push $0x0 10a40b: 53 push %ebx 10a40c: 51 push %ecx 10a40d: e8 a2 15 00 00 call 10b9b4 <_Thread_Change_priority> 10a412: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10a415: e8 3a 1a 00 00 call 10be54 <_Thread_Enable_dispatch> 10a41a: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a41c: 89 d0 mov %edx,%eax 10a41e: 8d 65 f8 lea -0x8(%ebp),%esp 10a421: 5b pop %ebx 10a422: 5e pop %esi 10a423: c9 leave 10a424: c3 ret =============================================================================== 0010a268 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10a268: 55 push %ebp 10a269: 89 e5 mov %esp,%ebp 10a26b: 57 push %edi 10a26c: 56 push %esi 10a26d: 53 push %ebx 10a26e: 83 ec 1c sub $0x1c,%esp 10a271: 8b 75 0c mov 0xc(%ebp),%esi 10a274: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10a277: b8 09 00 00 00 mov $0x9,%eax 10a27c: 85 f6 test %esi,%esi 10a27e: 74 75 je 10a2f5 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10a280: 50 push %eax 10a281: 50 push %eax 10a282: 8d 45 f0 lea -0x10(%ebp),%eax 10a285: 50 push %eax 10a286: ff 75 08 pushl 0x8(%ebp) 10a289: e8 86 1a 00 00 call 10bd14 <_Thread_Get> 10a28e: 89 c3 mov %eax,%ebx switch (location) { 10a290: 83 c4 10 add $0x10,%esp 10a293: b8 04 00 00 00 mov $0x4,%eax 10a298: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10a29c: 75 57 jne 10a2f5 <== NEVER TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10a29e: 8b 83 04 01 00 00 mov 0x104(%ebx),%eax 10a2a4: eb 0c jmp 10a2b2 while (tvp) { if (tvp->ptr == ptr) { 10a2a6: 39 70 04 cmp %esi,0x4(%eax) 10a2a9: 75 05 jne 10a2b0 tvp->dtor = dtor; 10a2ab: 89 78 10 mov %edi,0x10(%eax) 10a2ae: eb 3e jmp 10a2ee _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10a2b0: 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) { 10a2b2: 85 c0 test %eax,%eax 10a2b4: 75 f0 jne 10a2a6 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 10a2b6: 83 ec 0c sub $0xc,%esp 10a2b9: 6a 14 push $0x14 10a2bb: e8 d1 29 00 00 call 10cc91 <_Workspace_Allocate> 10a2c0: 89 c2 mov %eax,%edx _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 10a2c2: 83 c4 10 add $0x10,%esp 10a2c5: 85 c0 test %eax,%eax 10a2c7: 75 0c jne 10a2d5 _Thread_Enable_dispatch(); 10a2c9: e8 26 1a 00 00 call 10bcf4 <_Thread_Enable_dispatch> 10a2ce: b8 1a 00 00 00 mov $0x1a,%eax 10a2d3: eb 20 jmp 10a2f5 return RTEMS_NO_MEMORY; } new->gval = *ptr; 10a2d5: 8b 06 mov (%esi),%eax 10a2d7: 89 42 08 mov %eax,0x8(%edx) new->ptr = ptr; 10a2da: 89 72 04 mov %esi,0x4(%edx) new->dtor = dtor; 10a2dd: 89 7a 10 mov %edi,0x10(%edx) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10a2e0: 8b 83 04 01 00 00 mov 0x104(%ebx),%eax 10a2e6: 89 02 mov %eax,(%edx) the_thread->task_variables = new; 10a2e8: 89 93 04 01 00 00 mov %edx,0x104(%ebx) _Thread_Enable_dispatch(); 10a2ee: e8 01 1a 00 00 call 10bcf4 <_Thread_Enable_dispatch> 10a2f3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a2f5: 8d 65 f4 lea -0xc(%ebp),%esp 10a2f8: 5b pop %ebx 10a2f9: 5e pop %esi 10a2fa: 5f pop %edi 10a2fb: c9 leave 10a2fc: c3 ret =============================================================================== 0010a300 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10a300: 55 push %ebp 10a301: 89 e5 mov %esp,%ebp 10a303: 56 push %esi 10a304: 53 push %ebx 10a305: 83 ec 10 sub $0x10,%esp 10a308: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10a30b: b8 09 00 00 00 mov $0x9,%eax 10a310: 85 f6 test %esi,%esi 10a312: 74 64 je 10a378 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10a314: 52 push %edx 10a315: 52 push %edx 10a316: 8d 45 f4 lea -0xc(%ebp),%eax 10a319: 50 push %eax 10a31a: ff 75 08 pushl 0x8(%ebp) 10a31d: e8 f2 19 00 00 call 10bd14 <_Thread_Get> 10a322: 89 c3 mov %eax,%ebx switch (location) { 10a324: 83 c4 10 add $0x10,%esp 10a327: b8 04 00 00 00 mov $0x4,%eax 10a32c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a330: 75 46 jne 10a378 <== NEVER TAKEN case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10a332: 8b 93 04 01 00 00 mov 0x104(%ebx),%edx 10a338: 31 c0 xor %eax,%eax 10a33a: eb 2e jmp 10a36a while (tvp) { if (tvp->ptr == ptr) { 10a33c: 39 72 04 cmp %esi,0x4(%edx) 10a33f: 75 25 jne 10a366 if (prev) 10a341: 85 c0 test %eax,%eax 10a343: 8b 0a mov (%edx),%ecx 10a345: 74 04 je 10a34b prev->next = tvp->next; 10a347: 89 08 mov %ecx,(%eax) 10a349: eb 06 jmp 10a351 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 10a34b: 89 8b 04 01 00 00 mov %ecx,0x104(%ebx) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 10a351: 50 push %eax 10a352: 50 push %eax 10a353: 52 push %edx 10a354: 53 push %ebx 10a355: e8 8e 00 00 00 call 10a3e8 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10a35a: e8 95 19 00 00 call 10bcf4 <_Thread_Enable_dispatch> 10a35f: 31 c0 xor %eax,%eax 10a361: 83 c4 10 add $0x10,%esp 10a364: eb 12 jmp 10a378 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10a366: 89 d0 mov %edx,%eax 10a368: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10a36a: 85 d2 test %edx,%edx 10a36c: 75 ce jne 10a33c return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10a36e: e8 81 19 00 00 call 10bcf4 <_Thread_Enable_dispatch> 10a373: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a378: 8d 65 f8 lea -0x8(%ebp),%esp 10a37b: 5b pop %ebx 10a37c: 5e pop %esi 10a37d: c9 leave 10a37e: c3 ret =============================================================================== 0010a380 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10a380: 55 push %ebp 10a381: 89 e5 mov %esp,%ebp 10a383: 56 push %esi 10a384: 53 push %ebx 10a385: 83 ec 10 sub $0x10,%esp 10a388: 8b 5d 0c mov 0xc(%ebp),%ebx 10a38b: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10a38e: 85 db test %ebx,%ebx 10a390: 74 48 je 10a3da return RTEMS_INVALID_ADDRESS; if ( !result ) 10a392: 85 f6 test %esi,%esi 10a394: 74 44 je 10a3da return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10a396: 50 push %eax 10a397: 50 push %eax 10a398: 8d 45 f4 lea -0xc(%ebp),%eax 10a39b: 50 push %eax 10a39c: ff 75 08 pushl 0x8(%ebp) 10a39f: e8 70 19 00 00 call 10bd14 <_Thread_Get> 10a3a4: 89 c2 mov %eax,%edx switch (location) { 10a3a6: 83 c4 10 add $0x10,%esp 10a3a9: b8 04 00 00 00 mov $0x4,%eax 10a3ae: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a3b2: 75 2b jne 10a3df <== NEVER TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10a3b4: 8b 82 04 01 00 00 mov 0x104(%edx),%eax 10a3ba: eb 15 jmp 10a3d1 while (tvp) { if (tvp->ptr == ptr) { 10a3bc: 39 58 04 cmp %ebx,0x4(%eax) 10a3bf: 75 0e jne 10a3cf /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10a3c1: 8b 40 0c mov 0xc(%eax),%eax 10a3c4: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10a3c6: e8 29 19 00 00 call 10bcf4 <_Thread_Enable_dispatch> 10a3cb: 31 c0 xor %eax,%eax 10a3cd: eb 10 jmp 10a3df return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10a3cf: 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) { 10a3d1: 85 c0 test %eax,%eax 10a3d3: 75 e7 jne 10a3bc _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10a3d5: e8 1a 19 00 00 call 10bcf4 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10a3da: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a3df: 8d 65 f8 lea -0x8(%ebp),%esp 10a3e2: 5b pop %ebx 10a3e3: 5e pop %esi 10a3e4: c9 leave 10a3e5: c3 ret =============================================================================== 0010a150 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10a150: 55 push %ebp 10a151: 89 e5 mov %esp,%ebp 10a153: 53 push %ebx 10a154: 83 ec 04 sub $0x4,%esp 10a157: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10a15a: b8 0b 00 00 00 mov $0xb,%eax 10a15f: 80 3d d0 0d 12 00 00 cmpb $0x0,0x120dd0 10a166: 0f 84 9e 00 00 00 je 10a20a return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10a16c: b8 09 00 00 00 mov $0x9,%eax 10a171: 85 db test %ebx,%ebx 10a173: 0f 84 91 00 00 00 je 10a20a <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10a179: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10a180: 83 ec 0c sub $0xc,%esp 10a183: 53 push %ebx 10a184: e8 d7 f4 ff ff call 109660 <_TOD_Validate> 10a189: 83 c4 10 add $0x10,%esp 10a18c: 84 c0 test %al,%al 10a18e: 74 75 je 10a205 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10a190: 83 ec 0c sub $0xc,%esp 10a193: 53 push %ebx 10a194: e8 5f f4 ff ff call 1095f8 <_TOD_To_seconds> 10a199: 89 c3 mov %eax,%ebx if ( seconds <= _TOD_Seconds_since_epoch ) 10a19b: 83 c4 10 add $0x10,%esp 10a19e: 3b 05 4c 0e 12 00 cmp 0x120e4c,%eax 10a1a4: 76 5f jbe 10a205 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a1a6: a1 bc 0d 12 00 mov 0x120dbc,%eax 10a1ab: 40 inc %eax 10a1ac: a3 bc 0d 12 00 mov %eax,0x120dbc return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10a1b1: 50 push %eax 10a1b2: 50 push %eax 10a1b3: 6a 10 push $0x10 10a1b5: ff 35 7c 0e 12 00 pushl 0x120e7c 10a1bb: e8 24 21 00 00 call 10c2e4 <_Thread_Set_state> _Watchdog_Initialize( 10a1c0: a1 7c 0e 12 00 mov 0x120e7c,%eax 10a1c5: 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. * 10a1c8: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) * @param[in] the_heap is the heap to operate upon 10a1cf: c7 40 64 78 b9 10 00 movl $0x10b978,0x64(%eax) * @param[in] starting_address is the starting address of the memory for 10a1d6: 89 50 68 mov %edx,0x68(%eax) * the heap 10a1d9: 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, 10a1e0: 2b 1d 4c 0e 12 00 sub 0x120e4c,%ebx 10a1e6: 89 58 54 mov %ebx,0x54(%eax) size_t size ); 10a1e9: 5a pop %edx 10a1ea: 59 pop %ecx 10a1eb: 83 c0 48 add $0x48,%eax 10a1ee: 50 push %eax 10a1ef: 68 90 0e 12 00 push $0x120e90 10a1f4: e8 03 27 00 00 call 10c8fc <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); 10a1f9: e8 f6 18 00 00 call 10baf4 <_Thread_Enable_dispatch> 10a1fe: 31 c0 xor %eax,%eax 10a200: 83 c4 10 add $0x10,%esp 10a203: eb 05 jmp 10a20a return RTEMS_SUCCESSFUL; 10a205: b8 14 00 00 00 mov $0x14,%eax } 10a20a: 8b 5d fc mov -0x4(%ebp),%ebx 10a20d: c9 leave 10a20e: c3 ret =============================================================================== 00112ad8 : */ rtems_status_code rtems_timer_cancel( Objects_Id id ) { 112ad8: 55 push %ebp 112ad9: 89 e5 mov %esp,%ebp 112adb: 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 112ade: 8d 45 fc lea -0x4(%ebp),%eax 112ae1: 50 push %eax 112ae2: ff 75 08 pushl 0x8(%ebp) 112ae5: 68 78 4a 13 00 push $0x134a78 112aea: e8 09 25 00 00 call 114ff8 <_Objects_Get> 112aef: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112af1: 83 c4 10 add $0x10,%esp 112af4: b8 04 00 00 00 mov $0x4,%eax 112af9: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 112afd: 75 1c jne 112b1b case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 112aff: 83 7a 38 04 cmpl $0x4,0x38(%edx) 112b03: 74 0f je 112b14 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 112b05: 83 ec 0c sub $0xc,%esp 112b08: 8d 42 10 lea 0x10(%edx),%eax 112b0b: 50 push %eax 112b0c: e8 db 3e 00 00 call 1169ec <_Watchdog_Remove> 112b11: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 112b14: e8 9f 2c 00 00 call 1157b8 <_Thread_Enable_dispatch> 112b19: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112b1b: c9 leave 112b1c: c3 ret =============================================================================== 0010a038 : rtems_status_code rtems_timer_create( rtems_name name, Objects_Id *id ) { 10a038: 55 push %ebp 10a039: 89 e5 mov %esp,%ebp 10a03b: 57 push %edi 10a03c: 56 push %esi 10a03d: 53 push %ebx 10a03e: 83 ec 0c sub $0xc,%esp 10a041: 8b 75 08 mov 0x8(%ebp),%esi 10a044: 8b 7d 0c mov 0xc(%ebp),%edi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10a047: b8 03 00 00 00 mov $0x3,%eax 10a04c: 85 f6 test %esi,%esi 10a04e: 74 73 je 10a0c3 return RTEMS_INVALID_NAME; if ( !id ) 10a050: b8 09 00 00 00 mov $0x9,%eax 10a055: 85 ff test %edi,%edi 10a057: 74 6a je 10a0c3 <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a059: a1 98 0a 12 00 mov 0x120a98,%eax 10a05e: 40 inc %eax 10a05f: a3 98 0a 12 00 mov %eax,0x120a98 #ifdef __cplusplus extern "C" { #endif /** 10a064: 83 ec 0c sub $0xc,%esp 10a067: 68 80 10 12 00 push $0x121080 10a06c: e8 f7 0d 00 00 call 10ae68 <_Objects_Allocate> 10a071: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10a073: 83 c4 10 add $0x10,%esp 10a076: 85 c0 test %eax,%eax 10a078: 75 0c jne 10a086 _Thread_Enable_dispatch(); 10a07a: e8 ed 19 00 00 call 10ba6c <_Thread_Enable_dispatch> 10a07f: b8 05 00 00 00 mov $0x5,%eax 10a084: eb 3d jmp 10a0c3 return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10a086: 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. * 10a08d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) * @param[in] the_heap is the heap to operate upon 10a094: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) * @param[in] starting_address is the starting address of the memory for 10a09b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) * the heap 10a0a2: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) 10a0a9: 8b 48 08 mov 0x8(%eax),%ecx 10a0ac: 0f b7 d1 movzwl %cx,%edx 10a0af: a1 9c 10 12 00 mov 0x12109c,%eax 10a0b4: 89 1c 90 mov %ebx,(%eax,%edx,4) 10a0b7: 89 73 0c mov %esi,0xc(%ebx) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10a0ba: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 10a0bc: e8 ab 19 00 00 call 10ba6c <_Thread_Enable_dispatch> 10a0c1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10a0c3: 8d 65 f4 lea -0xc(%ebp),%esp 10a0c6: 5b pop %ebx 10a0c7: 5e pop %esi 10a0c8: 5f pop %edi 10a0c9: c9 leave 10a0ca: c3 ret =============================================================================== 0010a0cc : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10a0cc: 55 push %ebp 10a0cd: 89 e5 mov %esp,%ebp 10a0cf: 57 push %edi 10a0d0: 56 push %esi 10a0d1: 53 push %ebx 10a0d2: 83 ec 1c sub $0x1c,%esp 10a0d5: 8b 7d 10 mov 0x10(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10a0d8: b8 0a 00 00 00 mov $0xa,%eax 10a0dd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10a0e1: 0f 84 8e 00 00 00 je 10a175 return RTEMS_INVALID_NUMBER; if ( !routine ) 10a0e7: b8 09 00 00 00 mov $0x9,%eax 10a0ec: 85 ff test %edi,%edi 10a0ee: 0f 84 81 00 00 00 je 10a175 <== 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 10a0f4: 52 push %edx 10a0f5: 8d 45 f0 lea -0x10(%ebp),%eax 10a0f8: 50 push %eax 10a0f9: ff 75 08 pushl 0x8(%ebp) 10a0fc: 68 80 10 12 00 push $0x121080 10a101: e8 a6 11 00 00 call 10b2ac <_Objects_Get> 10a106: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10a108: 83 c4 10 add $0x10,%esp 10a10b: b8 04 00 00 00 mov $0x4,%eax 10a110: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10a114: 75 5f jne 10a175 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10a116: 8d 73 10 lea 0x10(%ebx),%esi 10a119: 83 ec 0c sub $0xc,%esp 10a11c: 56 push %esi 10a11d: e8 6a 28 00 00 call 10c98c <_Watchdog_Remove> _ISR_Disable( level ); 10a122: 9c pushf 10a123: fa cli 10a124: 5a pop %edx /* * 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 ) { 10a125: 83 c4 10 add $0x10,%esp 10a128: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10a12c: 74 0b je 10a139 <== ALWAYS TAKEN _ISR_Enable( level ); 10a12e: 52 push %edx <== NOT EXECUTED 10a12f: 9d popf <== NOT EXECUTED _Thread_Enable_dispatch(); 10a130: e8 37 19 00 00 call 10ba6c <_Thread_Enable_dispatch><== NOT EXECUTED 10a135: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a137: eb 3c jmp 10a175 <== NOT EXECUTED /* * 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; 10a139: 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. * 10a140: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 10a147: 89 7b 2c mov %edi,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 10a14a: 8b 45 08 mov 0x8(%ebp),%eax 10a14d: 89 43 30 mov %eax,0x30(%ebx) * the heap 10a150: 8b 45 14 mov 0x14(%ebp),%eax 10a153: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10a156: 52 push %edx 10a157: 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, 10a158: 8b 45 0c mov 0xc(%ebp),%eax 10a15b: 89 43 1c mov %eax,0x1c(%ebx) void *starting_address, size_t *size 10a15e: 50 push %eax 10a15f: 50 push %eax 10a160: 56 push %esi 10a161: 68 78 0b 12 00 push $0x120b78 10a166: e8 09 27 00 00 call 10c874 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10a16b: e8 fc 18 00 00 call 10ba6c <_Thread_Enable_dispatch> 10a170: 31 c0 xor %eax,%eax 10a172: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a175: 8d 65 f4 lea -0xc(%ebp),%esp 10a178: 5b pop %ebx 10a179: 5e pop %esi 10a17a: 5f pop %edi 10a17b: c9 leave 10a17c: c3 ret =============================================================================== 00112cc4 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 112cc4: 55 push %ebp 112cc5: 89 e5 mov %esp,%ebp 112cc7: 57 push %edi 112cc8: 56 push %esi 112cc9: 53 push %ebx 112cca: 83 ec 1c sub $0x1c,%esp 112ccd: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 112cd0: b8 0b 00 00 00 mov $0xb,%eax 112cd5: 80 3d 4c 41 13 00 00 cmpb $0x0,0x13414c 112cdc: 0f 84 ae 00 00 00 je 112d90 return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 112ce2: 83 ec 0c sub $0xc,%esp 112ce5: 53 push %ebx 112ce6: e8 85 da ff ff call 110770 <_TOD_Validate> 112ceb: 83 c4 10 add $0x10,%esp 112cee: 84 c0 test %al,%al 112cf0: 0f 84 95 00 00 00 je 112d8b return RTEMS_INVALID_CLOCK; if ( !routine ) 112cf6: b8 09 00 00 00 mov $0x9,%eax 112cfb: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 112cff: 0f 84 8b 00 00 00 je 112d90 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 112d05: 83 ec 0c sub $0xc,%esp 112d08: 53 push %ebx 112d09: e8 fa d9 ff ff call 110708 <_TOD_To_seconds> 112d0e: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch ) 112d10: 83 c4 10 add $0x10,%esp 112d13: 3b 05 c8 41 13 00 cmp 0x1341c8,%eax 112d19: 76 70 jbe 112d8b /** * 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 112d1b: 51 push %ecx 112d1c: 8d 45 f0 lea -0x10(%ebp),%eax 112d1f: 50 push %eax 112d20: ff 75 08 pushl 0x8(%ebp) 112d23: 68 78 4a 13 00 push $0x134a78 112d28: e8 cb 22 00 00 call 114ff8 <_Objects_Get> 112d2d: 89 c6 mov %eax,%esi return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112d2f: 83 c4 10 add $0x10,%esp 112d32: b8 04 00 00 00 mov $0x4,%eax 112d37: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 112d3b: 75 53 jne 112d90 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 112d3d: 8d 5e 10 lea 0x10(%esi),%ebx 112d40: 83 ec 0c sub $0xc,%esp 112d43: 53 push %ebx 112d44: e8 a3 3c 00 00 call 1169ec <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 112d49: 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. * 112d50: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) * @param[in] the_heap is the heap to operate upon 112d57: 8b 45 10 mov 0x10(%ebp),%eax 112d5a: 89 46 2c mov %eax,0x2c(%esi) * @param[in] starting_address is the starting address of the memory for 112d5d: 8b 45 08 mov 0x8(%ebp),%eax 112d60: 89 46 30 mov %eax,0x30(%esi) * the heap 112d63: 8b 45 14 mov 0x14(%ebp),%eax 112d66: 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, 112d69: 2b 3d c8 41 13 00 sub 0x1341c8,%edi 112d6f: 89 7e 1c mov %edi,0x1c(%esi) size_t size ); 112d72: 58 pop %eax 112d73: 5a pop %edx 112d74: 53 push %ebx 112d75: 68 0c 42 13 00 push $0x13420c 112d7a: e8 55 3b 00 00 call 1168d4 <_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(); 112d7f: e8 34 2a 00 00 call 1157b8 <_Thread_Enable_dispatch> 112d84: 31 c0 xor %eax,%eax 112d86: 83 c4 10 add $0x10,%esp 112d89: eb 05 jmp 112d90 return RTEMS_SUCCESSFUL; 112d8b: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112d90: 8d 65 f4 lea -0xc(%ebp),%esp 112d93: 5b pop %ebx 112d94: 5e pop %esi 112d95: 5f pop %edi 112d96: c9 leave 112d97: c3 ret =============================================================================== 00112d98 : rtems_status_code rtems_timer_get_information( Objects_Id id, rtems_timer_information *the_info ) { 112d98: 55 push %ebp 112d99: 89 e5 mov %esp,%ebp 112d9b: 53 push %ebx 112d9c: 83 ec 14 sub $0x14,%esp 112d9f: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 112da2: b8 09 00 00 00 mov $0x9,%eax 112da7: 85 db test %ebx,%ebx 112da9: 74 40 je 112deb <== 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 112dab: 50 push %eax 112dac: 8d 45 f8 lea -0x8(%ebp),%eax 112daf: 50 push %eax 112db0: ff 75 08 pushl 0x8(%ebp) 112db3: 68 78 4a 13 00 push $0x134a78 112db8: e8 3b 22 00 00 call 114ff8 <_Objects_Get> 112dbd: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112dbf: 83 c4 10 add $0x10,%esp 112dc2: b8 04 00 00 00 mov $0x4,%eax 112dc7: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 112dcb: 75 1e jne 112deb case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 112dcd: 8b 42 38 mov 0x38(%edx),%eax 112dd0: 89 03 mov %eax,(%ebx) the_info->initial = the_timer->Ticker.initial; 112dd2: 8b 42 1c mov 0x1c(%edx),%eax 112dd5: 89 43 04 mov %eax,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 112dd8: 8b 42 24 mov 0x24(%edx),%eax 112ddb: 89 43 08 mov %eax,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 112dde: 8b 42 28 mov 0x28(%edx),%eax 112de1: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 112de4: e8 cf 29 00 00 call 1157b8 <_Thread_Enable_dispatch> 112de9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112deb: 8b 5d fc mov -0x4(%ebp),%ebx 112dee: c9 leave 112def: c3 ret =============================================================================== 00113048 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 113048: 55 push %ebp 113049: 89 e5 mov %esp,%ebp 11304b: 57 push %edi 11304c: 56 push %esi 11304d: 53 push %ebx 11304e: 83 ec 1c sub $0x1c,%esp 113051: 8b 55 08 mov 0x8(%ebp),%edx 113054: 8b 75 10 mov 0x10(%ebp),%esi bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ); 113057: 31 c0 xor %eax,%eax 113059: 85 d2 test %edx,%edx 11305b: 74 0f je 11306c 11305d: 0f b6 05 c4 b9 12 00 movzbl 0x12b9c4,%eax 113064: 39 c2 cmp %eax,%edx 113066: 0f 96 c0 setbe %al 113069: 0f b6 c0 movzbl %al,%eax * Make sure the requested priority is valid. The if is * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { 11306c: 89 d7 mov %edx,%edi 11306e: 85 c0 test %eax,%eax 113070: 75 0e jne 113080 <== NEVER TAKEN if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 113072: b8 13 00 00 00 mov $0x13,%eax 113077: 42 inc %edx 113078: 0f 85 31 01 00 00 jne 1131af 11307e: 31 ff xor %edi,%edi /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 113080: a1 38 41 13 00 mov 0x134138,%eax 113085: 40 inc %eax 113086: a3 38 41 13 00 mov %eax,0x134138 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11308b: 8a 1d ac fb 12 00 mov 0x12fbac,%bl initialized = true; 113091: c6 05 ac fb 12 00 01 movb $0x1,0x12fbac _Thread_Enable_dispatch(); 113098: e8 1b 27 00 00 call 1157b8 <_Thread_Enable_dispatch> if ( tmpInitialized ) 11309d: b8 0e 00 00 00 mov $0xe,%eax 1130a2: 84 db test %bl,%bl 1130a4: 0f 85 05 01 00 00 jne 1131af 1130aa: c7 05 cc 40 13 00 d0 movl $0x1340d0,0x1340cc 1130b1: 40 13 00 1130b4: c7 05 d0 40 13 00 00 movl $0x0,0x1340d0 1130bb: 00 00 00 1130be: c7 05 d4 40 13 00 cc movl $0x1340cc,0x1340d4 1130c5: 40 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( 1130c8: 52 push %edx 1130c9: 52 push %edx 1130ca: 8d 45 f0 lea -0x10(%ebp),%eax 1130cd: 50 push %eax 1130ce: 81 ce 00 80 00 00 or $0x8000,%esi 1130d4: 56 push %esi 1130d5: 68 00 01 00 00 push $0x100 1130da: ff 75 0c pushl 0xc(%ebp) 1130dd: 57 push %edi 1130de: 68 45 4d 49 54 push $0x54494d45 1130e3: e8 70 f3 ff ff call 112458 /* 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) { 1130e8: 83 c4 20 add $0x20,%esp 1130eb: 85 c0 test %eax,%eax 1130ed: 0f 85 b5 00 00 00 jne 1131a8 * 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( 1130f3: 8b 4d f0 mov -0x10(%ebp),%ecx bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 1130f6: 31 c0 xor %eax,%eax 1130f8: 66 3b 0d 7c 40 13 00 cmp 0x13407c,%cx 1130ff: 77 0b ja 11310c <== NEVER TAKEN * This heap routine returns information about the free blocks * in the specified heap. 113101: 0f b7 d1 movzwl %cx,%edx 113104: a1 88 40 13 00 mov 0x134088,%eax 113109: 8b 04 90 mov (%eax,%edx,4),%eax 11310c: a3 bc 4a 13 00 mov %eax,0x134abc 113111: c7 05 ac 40 13 00 b0 movl $0x1340b0,0x1340ac 113118: 40 13 00 11311b: c7 05 b0 40 13 00 00 movl $0x0,0x1340b0 113122: 00 00 00 113125: c7 05 b4 40 13 00 ac movl $0x1340ac,0x1340b4 11312c: 40 13 00 11312f: c7 05 c0 40 13 00 c4 movl $0x1340c4,0x1340c0 113136: 40 13 00 113139: c7 05 c4 40 13 00 00 movl $0x0,0x1340c4 113140: 00 00 00 113143: c7 05 c8 40 13 00 c0 movl $0x1340c0,0x1340c8 11314a: 40 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. * 11314d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) * @param[in] the_heap is the heap to operate upon 113154: c7 40 64 3c 56 11 00 movl $0x11563c,0x64(%eax) * @param[in] starting_address is the starting address of the memory for 11315b: 89 48 68 mov %ecx,0x68(%eax) * the heap 11315e: 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. * 113165: c7 05 e0 40 13 00 00 movl $0x0,0x1340e0 11316c: 00 00 00 * @param[in] the_heap is the heap to operate upon 11316f: c7 05 f4 40 13 00 3c movl $0x11563c,0x1340f4 113176: 56 11 00 * @param[in] starting_address is the starting address of the memory for 113179: 89 0d f8 40 13 00 mov %ecx,0x1340f8 * the heap 11317f: c7 05 fc 40 13 00 00 movl $0x0,0x1340fc 113186: 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; 113189: c7 05 b8 4a 13 00 b7 movl $0x1131b7,0x134ab8 113190: 31 11 00 /* * Start the timer server */ status = rtems_task_start( 113193: 50 push %eax 113194: 6a 00 push $0x0 113196: 68 40 32 11 00 push $0x113240 11319b: 51 push %ecx 11319c: e8 53 f7 ff ff call 1128f4 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 1131a1: 83 c4 10 add $0x10,%esp 1131a4: 85 c0 test %eax,%eax 1131a6: 74 07 je 1131af <== 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; 1131a8: c6 05 ac fb 12 00 00 movb $0x0,0x12fbac } return status; } 1131af: 8d 65 f4 lea -0xc(%ebp),%esp 1131b2: 5b pop %ebx 1131b3: 5e pop %esi 1131b4: 5f pop %edi 1131b5: c9 leave 1131b6: c3 ret =============================================================================== 00112e14 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 112e14: 55 push %ebp 112e15: 89 e5 mov %esp,%ebp 112e17: 53 push %ebx 112e18: 83 ec 18 sub $0x18,%esp 112e1b: 8d 45 f8 lea -0x8(%ebp),%eax 112e1e: 50 push %eax 112e1f: ff 75 08 pushl 0x8(%ebp) 112e22: 68 78 4a 13 00 push $0x134a78 112e27: e8 cc 21 00 00 call 114ff8 <_Objects_Get> 112e2c: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112e2e: 83 c4 10 add $0x10,%esp 112e31: b8 04 00 00 00 mov $0x4,%eax 112e36: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 112e3a: 75 6e jne 112eaa case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 112e3c: 8b 43 38 mov 0x38(%ebx),%eax 112e3f: 83 f8 01 cmp $0x1,%eax 112e42: 74 24 je 112e68 112e44: 72 07 jb 112e4d 112e46: 83 f8 04 cmp $0x4,%eax 112e49: 77 58 ja 112ea3 <== NEVER TAKEN 112e4b: eb 4a jmp 112e97 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 112e4d: 83 c3 10 add $0x10,%ebx 112e50: 83 ec 0c sub $0xc,%esp 112e53: 53 push %ebx 112e54: e8 93 3b 00 00 call 1169ec <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 112e59: 58 pop %eax 112e5a: 5a pop %edx 112e5b: 53 push %ebx 112e5c: 68 18 42 13 00 push $0x134218 112e61: e8 6e 3a 00 00 call 1168d4 <_Watchdog_Insert> 112e66: eb 2a jmp 112e92 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 112e68: 83 3d b8 4a 13 00 00 cmpl $0x0,0x134ab8 112e6f: 75 0c jne 112e7d <== ALWAYS TAKEN _Thread_Enable_dispatch(); 112e71: e8 42 29 00 00 call 1157b8 <_Thread_Enable_dispatch><== NOT EXECUTED 112e76: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED 112e7b: eb 2d jmp 112eaa <== NOT EXECUTED return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 112e7d: 83 ec 0c sub $0xc,%esp 112e80: 8d 43 10 lea 0x10(%ebx),%eax 112e83: 50 push %eax 112e84: e8 63 3b 00 00 call 1169ec <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 112e89: 89 1c 24 mov %ebx,(%esp) 112e8c: ff 15 b8 4a 13 00 call *0x134ab8 112e92: 83 c4 10 add $0x10,%esp 112e95: eb 0c jmp 112ea3 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 112e97: e8 1c 29 00 00 call 1157b8 <_Thread_Enable_dispatch> 112e9c: b8 0b 00 00 00 mov $0xb,%eax 112ea1: eb 07 jmp 112eaa return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 112ea3: e8 10 29 00 00 call 1157b8 <_Thread_Enable_dispatch> 112ea8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112eaa: 8b 5d fc mov -0x4(%ebp),%ebx 112ead: c9 leave 112eae: c3 ret =============================================================================== 00112eb0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 112eb0: 55 push %ebp 112eb1: 89 e5 mov %esp,%ebp 112eb3: 57 push %edi 112eb4: 56 push %esi 112eb5: 53 push %ebx 112eb6: 83 ec 1c sub $0x1c,%esp 112eb9: 8b 7d 08 mov 0x8(%ebp),%edi 112ebc: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 112ebf: b8 0e 00 00 00 mov $0xe,%eax 112ec4: 83 3d bc 4a 13 00 00 cmpl $0x0,0x134abc 112ecb: 0f 84 91 00 00 00 je 112f62 return RTEMS_INCORRECT_STATE; if ( !routine ) 112ed1: b8 09 00 00 00 mov $0x9,%eax 112ed6: 85 f6 test %esi,%esi 112ed8: 0f 84 84 00 00 00 je 112f62 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 112ede: b8 0a 00 00 00 mov $0xa,%eax 112ee3: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 112ee7: 74 79 je 112f62 112ee9: 50 push %eax 112eea: 8d 45 f0 lea -0x10(%ebp),%eax 112eed: 50 push %eax 112eee: 57 push %edi 112eef: 68 78 4a 13 00 push $0x134a78 112ef4: e8 ff 20 00 00 call 114ff8 <_Objects_Get> 112ef9: 89 c3 mov %eax,%ebx return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112efb: 83 c4 10 add $0x10,%esp 112efe: b8 04 00 00 00 mov $0x4,%eax 112f03: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 112f07: 75 59 jne 112f62 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 112f09: 83 ec 0c sub $0xc,%esp 112f0c: 8d 43 10 lea 0x10(%ebx),%eax 112f0f: 50 push %eax 112f10: e8 d7 3a 00 00 call 1169ec <_Watchdog_Remove> _ISR_Disable( level ); 112f15: 9c pushf 112f16: fa cli 112f17: 5a pop %edx /* * 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 ) { 112f18: 83 c4 10 add $0x10,%esp 112f1b: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 112f1f: 74 0b je 112f2c <== ALWAYS TAKEN _ISR_Enable( level ); 112f21: 52 push %edx <== NOT EXECUTED 112f22: 9d popf <== NOT EXECUTED _Thread_Enable_dispatch(); 112f23: e8 90 28 00 00 call 1157b8 <_Thread_Enable_dispatch><== NOT EXECUTED 112f28: 31 c0 xor %eax,%eax <== NOT EXECUTED 112f2a: eb 36 jmp 112f62 <== NOT EXECUTED /* * 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; 112f2c: 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. * 112f33: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 112f3a: 89 73 2c mov %esi,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 112f3d: 89 7b 30 mov %edi,0x30(%ebx) * the heap 112f40: 8b 45 14 mov 0x14(%ebp),%eax 112f43: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 112f46: 8b 45 0c mov 0xc(%ebp),%eax 112f49: 89 43 1c mov %eax,0x1c(%ebx) _ISR_Enable( level ); 112f4c: 52 push %edx 112f4d: 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 ); 112f4e: 83 ec 0c sub $0xc,%esp 112f51: 53 push %ebx 112f52: ff 15 b8 4a 13 00 call *0x134ab8 _Thread_Enable_dispatch(); 112f58: e8 5b 28 00 00 call 1157b8 <_Thread_Enable_dispatch> 112f5d: 31 c0 xor %eax,%eax 112f5f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112f62: 8d 65 f4 lea -0xc(%ebp),%esp 112f65: 5b pop %ebx 112f66: 5e pop %esi 112f67: 5f pop %edi 112f68: c9 leave 112f69: c3 ret =============================================================================== 00112f6c : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 112f6c: 55 push %ebp 112f6d: 89 e5 mov %esp,%ebp 112f6f: 57 push %edi 112f70: 56 push %esi 112f71: 53 push %ebx 112f72: 83 ec 1c sub $0x1c,%esp 112f75: 8b 5d 0c mov 0xc(%ebp),%ebx 112f78: 8b 7d 10 mov 0x10(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 112f7b: b8 0e 00 00 00 mov $0xe,%eax 112f80: 83 3d bc 4a 13 00 00 cmpl $0x0,0x134abc 112f87: 0f 84 b3 00 00 00 je 113040 <== NEVER TAKEN return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 112f8d: b8 0b 00 00 00 mov $0xb,%eax 112f92: 80 3d 4c 41 13 00 00 cmpb $0x0,0x13414c 112f99: 0f 84 a1 00 00 00 je 113040 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 112f9f: b8 09 00 00 00 mov $0x9,%eax 112fa4: 85 ff test %edi,%edi 112fa6: 0f 84 94 00 00 00 je 113040 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 112fac: 83 ec 0c sub $0xc,%esp 112faf: 53 push %ebx 112fb0: e8 bb d7 ff ff call 110770 <_TOD_Validate> 112fb5: 83 c4 10 add $0x10,%esp 112fb8: 84 c0 test %al,%al 112fba: 74 7f je 11303b <== NEVER TAKEN return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 112fbc: 83 ec 0c sub $0xc,%esp 112fbf: 53 push %ebx 112fc0: e8 43 d7 ff ff call 110708 <_TOD_To_seconds> 112fc5: 89 c6 mov %eax,%esi if ( seconds <= _TOD_Seconds_since_epoch ) 112fc7: 83 c4 10 add $0x10,%esp 112fca: 3b 05 c8 41 13 00 cmp 0x1341c8,%eax 112fd0: 76 69 jbe 11303b <== 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 112fd2: 50 push %eax 112fd3: 8d 45 f0 lea -0x10(%ebp),%eax 112fd6: 50 push %eax 112fd7: ff 75 08 pushl 0x8(%ebp) 112fda: 68 78 4a 13 00 push $0x134a78 112fdf: e8 14 20 00 00 call 114ff8 <_Objects_Get> 112fe4: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112fe6: 83 c4 10 add $0x10,%esp 112fe9: b8 04 00 00 00 mov $0x4,%eax 112fee: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 112ff2: 75 4c jne 113040 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 112ff4: 83 ec 0c sub $0xc,%esp 112ff7: 8d 43 10 lea 0x10(%ebx),%eax 112ffa: 50 push %eax 112ffb: e8 ec 39 00 00 call 1169ec <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 113000: 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. * 113007: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 11300e: 89 7b 2c mov %edi,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 113011: 8b 45 08 mov 0x8(%ebp),%eax 113014: 89 43 30 mov %eax,0x30(%ebx) * the heap 113017: 8b 45 14 mov 0x14(%ebp),%eax 11301a: 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; 11301d: 2b 35 c8 41 13 00 sub 0x1341c8,%esi 113023: 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 ); 113026: 89 1c 24 mov %ebx,(%esp) 113029: ff 15 b8 4a 13 00 call *0x134ab8 _Thread_Enable_dispatch(); 11302f: e8 84 27 00 00 call 1157b8 <_Thread_Enable_dispatch> 113034: 31 c0 xor %eax,%eax 113036: 83 c4 10 add $0x10,%esp 113039: eb 05 jmp 113040 return RTEMS_SUCCESSFUL; 11303b: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113040: 8d 65 f4 lea -0xc(%ebp),%esp 113043: 5b pop %ebx 113044: 5e pop %esi 113045: 5f pop %edi 113046: c9 leave 113047: c3 ret =============================================================================== 00109d5d : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 109d5d: 55 push %ebp 109d5e: 89 e5 mov %esp,%ebp 109d60: 53 push %ebx 109d61: 83 ec 04 sub $0x4,%esp 109d64: 8b 45 08 mov 0x8(%ebp),%eax 109d67: 8b 5d 0c mov 0xc(%ebp),%ebx void *ptr; /* * check the arguments */ if ( !pointer ) 109d6a: 85 db test %ebx,%ebx 109d6c: 74 1e je 109d8c <== NEVER TAKEN return false; if ( !bytes ) 109d6e: 85 c0 test %eax,%eax 109d70: 74 1a je 109d8c <== NEVER TAKEN return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 109d72: 52 push %edx 109d73: 52 push %edx 109d74: 50 push %eax 109d75: 68 c8 19 12 00 push $0x1219c8 109d7a: e8 c5 13 00 00 call 10b144 <_Protected_heap_Allocate> if (!ptr) 109d7f: 83 c4 10 add $0x10,%esp 109d82: 85 c0 test %eax,%eax 109d84: 74 06 je 109d8c <== NEVER TAKEN return false; *pointer = ptr; 109d86: 89 03 mov %eax,(%ebx) 109d88: b0 01 mov $0x1,%al 109d8a: eb 02 jmp 109d8e return true; 109d8c: 31 c0 xor %eax,%eax } 109d8e: 8b 5d fc mov -0x4(%ebp),%ebx 109d91: c9 leave 109d92: c3 ret =============================================================================== 00109d48 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 109d48: 55 push %ebp <== NOT EXECUTED 109d49: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109d4b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 109d4e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109d51: 68 c8 19 12 00 push $0x1219c8 <== NOT EXECUTED 109d56: e8 1d 14 00 00 call 10b178 <_Protected_heap_Free> <== NOT EXECUTED } 109d5b: c9 leave <== NOT EXECUTED 109d5c: c3 ret <== NOT EXECUTED =============================================================================== 00109d93 : #include /* for memset */ bool rtems_workspace_get_information( Heap_Information_block *the_info ) { 109d93: 55 push %ebp 109d94: 89 e5 mov %esp,%ebp 109d96: 83 ec 08 sub $0x8,%esp 109d99: 8b 55 08 mov 0x8(%ebp),%edx if ( !the_info ) 109d9c: 31 c0 xor %eax,%eax 109d9e: 85 d2 test %edx,%edx 109da0: 74 10 je 109db2 <== NEVER TAKEN return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 109da2: 51 push %ecx 109da3: 51 push %ecx 109da4: 52 push %edx 109da5: 68 c8 19 12 00 push $0x1219c8 109daa: e8 fd 13 00 00 call 10b1ac <_Protected_heap_Get_information> 109daf: 83 c4 10 add $0x10,%esp } 109db2: c9 leave 109db3: c3 ret =============================================================================== 0010a178 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10a178: 55 push %ebp 10a179: 89 e5 mov %esp,%ebp 10a17b: 56 push %esi 10a17c: 53 push %ebx 10a17d: 8b 5d 08 mov 0x8(%ebp),%ebx 10a180: 8b 75 0c mov 0xc(%ebp),%esi /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10a183: 85 db test %ebx,%ebx 10a185: 74 16 je 10a19d <== NEVER TAKEN 10a187: e8 54 d1 ff ff call 1072e0 10a18c: 39 c3 cmp %eax,%ebx 10a18e: 74 0d je 10a19d rtems_set_errno_and_return_minus_one( ESRCH ); 10a190: e8 6b 66 00 00 call 110800 <__errno> 10a195: c7 00 03 00 00 00 movl $0x3,(%eax) 10a19b: eb 0f jmp 10a1ac if ( !interval ) 10a19d: 85 f6 test %esi,%esi 10a19f: 75 10 jne 10a1b1 rtems_set_errno_and_return_minus_one( EINVAL ); 10a1a1: e8 5a 66 00 00 call 110800 <__errno> 10a1a6: c7 00 16 00 00 00 movl $0x16,(%eax) 10a1ac: 83 c8 ff or $0xffffffff,%eax 10a1af: eb 13 jmp 10a1c4 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10a1b1: 50 push %eax 10a1b2: 50 push %eax 10a1b3: 56 push %esi 10a1b4: ff 35 bc 10 12 00 pushl 0x1210bc 10a1ba: e8 45 32 00 00 call 10d404 <_Timespec_From_ticks> 10a1bf: 31 c0 xor %eax,%eax 10a1c1: 83 c4 10 add $0x10,%esp return 0; } 10a1c4: 8d 65 f8 lea -0x8(%ebp),%esp 10a1c7: 5b pop %ebx 10a1c8: 5e pop %esi 10a1c9: c9 leave 10a1ca: c3 ret =============================================================================== 0010b5c4 : */ int sem_destroy( sem_t *sem ) { 10b5c4: 55 push %ebp 10b5c5: 89 e5 mov %esp,%ebp 10b5c7: 83 ec 1c sub $0x1c,%esp 10b5ca: 8d 45 fc lea -0x4(%ebp),%eax 10b5cd: 50 push %eax 10b5ce: 8b 45 08 mov 0x8(%ebp),%eax 10b5d1: ff 30 pushl (%eax) 10b5d3: 68 00 38 12 00 push $0x123800 10b5d8: e8 4b 1f 00 00 call 10d528 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10b5dd: 83 c4 10 add $0x10,%esp 10b5e0: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 10b5e4: 75 22 jne 10b608 case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 10b5e6: 80 78 14 00 cmpb $0x0,0x14(%eax) 10b5ea: 74 07 je 10b5f3 <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10b5ec: e8 f7 26 00 00 call 10dce8 <_Thread_Enable_dispatch><== NOT EXECUTED 10b5f1: eb 15 jmp 10b608 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10b5f3: 83 ec 0c sub $0xc,%esp 10b5f6: 50 push %eax 10b5f7: e8 dc 55 00 00 call 110bd8 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10b5fc: e8 e7 26 00 00 call 10dce8 <_Thread_Enable_dispatch> 10b601: 31 c0 xor %eax,%eax 10b603: 83 c4 10 add $0x10,%esp 10b606: eb 0e jmp 10b616 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b608: e8 57 70 00 00 call 112664 <__errno> 10b60d: c7 00 16 00 00 00 movl $0x16,(%eax) 10b613: 83 c8 ff or $0xffffffff,%eax } 10b616: c9 leave 10b617: c3 ret =============================================================================== 0010b65c : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 10b65c: 55 push %ebp 10b65d: 89 e5 mov %esp,%ebp 10b65f: 53 push %ebx 10b660: 83 ec 14 sub $0x14,%esp 10b663: 8b 5d 08 mov 0x8(%ebp),%ebx int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 10b666: 85 db test %ebx,%ebx 10b668: 75 10 jne 10b67a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10b66a: e8 f5 6f 00 00 call 112664 <__errno> <== NOT EXECUTED 10b66f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10b675: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10b678: eb 23 jmp 10b69d <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 10b67a: 8d 45 f8 lea -0x8(%ebp),%eax 10b67d: 50 push %eax 10b67e: ff 75 10 pushl 0x10(%ebp) 10b681: ff 75 0c pushl 0xc(%ebp) 10b684: 6a 00 push $0x0 10b686: e8 55 54 00 00 call 110ae0 <_POSIX_Semaphore_Create_support> 10b68b: 89 c2 mov %eax,%edx pshared, value, &the_semaphore ); if ( status != -1 ) 10b68d: 83 c4 10 add $0x10,%esp 10b690: 83 f8 ff cmp $0xffffffff,%eax 10b693: 74 08 je 10b69d *sem = the_semaphore->Object.id; 10b695: 8b 45 f8 mov -0x8(%ebp),%eax 10b698: 8b 40 08 mov 0x8(%eax),%eax 10b69b: 89 03 mov %eax,(%ebx) return status; } 10b69d: 89 d0 mov %edx,%eax 10b69f: 8b 5d fc mov -0x4(%ebp),%ebx 10b6a2: c9 leave 10b6a3: c3 ret =============================================================================== 0010b6a4 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10b6a4: 55 push %ebp 10b6a5: 89 e5 mov %esp,%ebp 10b6a7: 57 push %edi 10b6a8: 56 push %esi 10b6a9: 53 push %ebx 10b6aa: 83 ec 1c sub $0x1c,%esp 10b6ad: 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 10b6b0: a1 10 35 12 00 mov 0x123510,%eax 10b6b5: 40 inc %eax 10b6b6: a3 10 35 12 00 mov %eax,0x123510 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10b6bb: 89 f0 mov %esi,%eax 10b6bd: 25 00 02 00 00 and $0x200,%eax 10b6c2: 89 45 e0 mov %eax,-0x20(%ebp) 10b6c5: 75 04 jne 10b6cb 10b6c7: 31 ff xor %edi,%edi 10b6c9: eb 03 jmp 10b6ce va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10b6cb: 8b 7d 14 mov 0x14(%ebp),%edi va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10b6ce: 52 push %edx 10b6cf: 52 push %edx 10b6d0: 8d 45 f0 lea -0x10(%ebp),%eax 10b6d3: 50 push %eax 10b6d4: ff 75 08 pushl 0x8(%ebp) 10b6d7: e8 44 55 00 00 call 110c20 <_POSIX_Semaphore_Name_to_id> 10b6dc: 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 ) { 10b6de: 83 c4 10 add $0x10,%esp 10b6e1: 85 c0 test %eax,%eax 10b6e3: 74 19 je 10b6fe /* * 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) ) ) { 10b6e5: 83 f8 02 cmp $0x2,%eax 10b6e8: 75 06 jne 10b6f0 <== NEVER TAKEN 10b6ea: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 10b6ee: 75 5e jne 10b74e _Thread_Enable_dispatch(); 10b6f0: e8 f3 25 00 00 call 10dce8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10b6f5: e8 6a 6f 00 00 call 112664 <__errno> 10b6fa: 89 18 mov %ebx,(%eax) 10b6fc: eb 1e jmp 10b71c /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10b6fe: 81 e6 00 0a 00 00 and $0xa00,%esi 10b704: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10b70a: 75 15 jne 10b721 _Thread_Enable_dispatch(); 10b70c: e8 d7 25 00 00 call 10dce8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10b711: e8 4e 6f 00 00 call 112664 <__errno> 10b716: c7 00 11 00 00 00 movl $0x11,(%eax) 10b71c: 83 c8 ff or $0xffffffff,%eax 10b71f: eb 52 jmp 10b773 * 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, 10b721: 50 push %eax 10b722: 8d 45 e8 lea -0x18(%ebp),%eax 10b725: 50 push %eax 10b726: ff 75 f0 pushl -0x10(%ebp) 10b729: 68 00 38 12 00 push $0x123800 10b72e: e8 f5 1d 00 00 call 10d528 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10b733: 89 45 ec mov %eax,-0x14(%ebp) the_semaphore->open_count += 1; 10b736: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10b739: e8 aa 25 00 00 call 10dce8 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10b73e: e8 a5 25 00 00 call 10dce8 <_Thread_Enable_dispatch> id = &the_semaphore->Object.id; return (sem_t *)id; 10b743: 8b 45 ec mov -0x14(%ebp),%eax 10b746: 83 c0 08 add $0x8,%eax 10b749: 83 c4 10 add $0x10,%esp 10b74c: eb 25 jmp 10b773 /* * 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( 10b74e: 8d 45 ec lea -0x14(%ebp),%eax 10b751: 50 push %eax 10b752: 57 push %edi 10b753: 6a 00 push $0x0 10b755: ff 75 08 pushl 0x8(%ebp) 10b758: e8 83 53 00 00 call 110ae0 <_POSIX_Semaphore_Create_support> 10b75d: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10b75f: e8 84 25 00 00 call 10dce8 <_Thread_Enable_dispatch> if ( status == -1 ) 10b764: 83 c4 10 add $0x10,%esp 10b767: 83 c8 ff or $0xffffffff,%eax 10b76a: 43 inc %ebx 10b76b: 74 06 je 10b773 <== NEVER TAKEN return SEM_FAILED; id = &the_semaphore->Object.id; return (sem_t *)id; 10b76d: 8b 45 ec mov -0x14(%ebp),%eax 10b770: 83 c0 08 add $0x8,%eax } 10b773: 8d 65 f4 lea -0xc(%ebp),%esp 10b776: 5b pop %ebx 10b777: 5e pop %esi 10b778: 5f pop %edi 10b779: c9 leave 10b77a: c3 ret =============================================================================== 0010b80c : */ int sem_unlink( const char *name ) { 10b80c: 55 push %ebp 10b80d: 89 e5 mov %esp,%ebp 10b80f: 53 push %ebx 10b810: 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 10b813: a1 10 35 12 00 mov 0x123510,%eax 10b818: 40 inc %eax 10b819: a3 10 35 12 00 mov %eax,0x123510 register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10b81e: 8d 45 f8 lea -0x8(%ebp),%eax 10b821: 50 push %eax 10b822: ff 75 08 pushl 0x8(%ebp) 10b825: e8 f6 53 00 00 call 110c20 <_POSIX_Semaphore_Name_to_id> 10b82a: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10b82c: 83 c4 10 add $0x10,%esp 10b82f: 85 c0 test %eax,%eax 10b831: 74 11 je 10b844 _Thread_Enable_dispatch(); 10b833: e8 b0 24 00 00 call 10dce8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10b838: e8 27 6e 00 00 call 112664 <__errno> 10b83d: 89 18 mov %ebx,(%eax) 10b83f: 83 c8 ff or $0xffffffff,%eax 10b842: eb 3c jmp 10b880 } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 10b844: 8b 45 f8 mov -0x8(%ebp),%eax bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 10b847: 31 db xor %ebx,%ebx 10b849: 66 3b 05 10 38 12 00 cmp 0x123810,%ax 10b850: 77 0b ja 10b85d <== NEVER TAKEN * This heap routine returns information about the free blocks * in the specified heap. 10b852: 0f b7 d0 movzwl %ax,%edx 10b855: a1 1c 38 12 00 mov 0x12381c,%eax 10b85a: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = FALSE; 10b85d: 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 ) 10b861: 50 push %eax 10b862: 50 push %eax 10b863: 53 push %ebx 10b864: 68 00 38 12 00 push $0x123800 10b869: e8 ce 1d 00 00 call 10d63c <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 10b86e: 89 1c 24 mov %ebx,(%esp) 10b871: e8 62 53 00 00 call 110bd8 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10b876: e8 6d 24 00 00 call 10dce8 <_Thread_Enable_dispatch> 10b87b: 31 c0 xor %eax,%eax 10b87d: 83 c4 10 add $0x10,%esp return 0; } 10b880: 8b 5d fc mov -0x4(%ebp),%ebx 10b883: c9 leave 10b884: c3 ret =============================================================================== 0010966c : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10966c: 55 push %ebp 10966d: 89 e5 mov %esp,%ebp 10966f: 57 push %edi 109670: 56 push %esi 109671: 53 push %ebx 109672: 83 ec 0c sub $0xc,%esp 109675: 8b 5d 08 mov 0x8(%ebp),%ebx 109678: 8b 7d 10 mov 0x10(%ebp),%edi ISR_Level level; if ( oact ) 10967b: 85 ff test %edi,%edi 10967d: 74 10 je 10968f *oact = _POSIX_signals_Vectors[ sig ]; 10967f: 6b c3 0c imul $0xc,%ebx,%eax 109682: 8d b0 9c 06 12 00 lea 0x12069c(%eax),%esi 109688: b9 03 00 00 00 mov $0x3,%ecx 10968d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10968f: 85 db test %ebx,%ebx 109691: 74 0d je 1096a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 109693: 8d 4b ff lea -0x1(%ebx),%ecx 109696: 83 f9 1f cmp $0x1f,%ecx 109699: 77 05 ja 1096a0 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10969b: 83 fb 09 cmp $0x9,%ebx 10969e: 75 10 jne 1096b0 rtems_set_errno_and_return_minus_one( EINVAL ); 1096a0: e8 6b 68 00 00 call 10ff10 <__errno> 1096a5: c7 00 16 00 00 00 movl $0x16,(%eax) 1096ab: 83 c8 ff or $0xffffffff,%eax 1096ae: eb 5a jmp 10970a /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 1096b0: 31 c0 xor %eax,%eax 1096b2: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 1096b6: 74 52 je 10970a <== 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 ); 1096b8: 9c pushf 1096b9: fa cli 1096ba: 8f 45 f0 popl -0x10(%ebp) if ( act->sa_handler == SIG_DFL ) { 1096bd: 8b 45 0c mov 0xc(%ebp),%eax 1096c0: 83 78 08 00 cmpl $0x0,0x8(%eax) 1096c4: 75 18 jne 1096de _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 1096c6: 6b c3 0c imul $0xc,%ebx,%eax 1096c9: 8d b8 9c 06 12 00 lea 0x12069c(%eax),%edi 1096cf: 8d b0 e0 9e 11 00 lea 0x119ee0(%eax),%esi 1096d5: b9 03 00 00 00 mov $0x3,%ecx 1096da: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1096dc: eb 26 jmp 109704 } else { _POSIX_signals_Clear_process_signals( signo_to_mask(sig) ); 1096de: 83 ec 0c sub $0xc,%esp 1096e1: b8 01 00 00 00 mov $0x1,%eax 1096e6: d3 e0 shl %cl,%eax 1096e8: 50 push %eax 1096e9: e8 1a 4e 00 00 call 10e508 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 1096ee: 6b c3 0c imul $0xc,%ebx,%eax 1096f1: 8d b8 9c 06 12 00 lea 0x12069c(%eax),%edi 1096f7: b9 03 00 00 00 mov $0x3,%ecx 1096fc: 8b 75 0c mov 0xc(%ebp),%esi 1096ff: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 109701: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 109704: ff 75 f0 pushl -0x10(%ebp) 109707: 9d popf 109708: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10970a: 8d 65 f4 lea -0xc(%ebp),%esp 10970d: 5b pop %ebx 10970e: 5e pop %esi 10970f: 5f pop %edi 109710: c9 leave 109711: c3 ret =============================================================================== 0010b250 : #include int sigsuspend( const sigset_t *sigmask ) { 10b250: 55 push %ebp 10b251: 89 e5 mov %esp,%ebp 10b253: 56 push %esi 10b254: 53 push %ebx 10b255: 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 ); 10b258: 8d 5d f4 lea -0xc(%ebp),%ebx 10b25b: 53 push %ebx 10b25c: ff 75 08 pushl 0x8(%ebp) 10b25f: 6a 01 push $0x1 10b261: e8 c6 ff ff ff call 10b22c (void) sigfillset( &all_signals ); 10b266: 8d 75 f0 lea -0x10(%ebp),%esi 10b269: 89 34 24 mov %esi,(%esp) 10b26c: e8 13 ff ff ff call 10b184 status = sigtimedwait( &all_signals, NULL, NULL ); 10b271: 83 c4 0c add $0xc,%esp 10b274: 6a 00 push $0x0 10b276: 6a 00 push $0x0 10b278: 56 push %esi 10b279: e8 6b 00 00 00 call 10b2e9 10b27e: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10b280: 83 c4 0c add $0xc,%esp 10b283: 6a 00 push $0x0 10b285: 53 push %ebx 10b286: 6a 00 push $0x0 10b288: e8 9f ff ff ff call 10b22c /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10b28d: 83 c4 10 add $0x10,%esp 10b290: 46 inc %esi 10b291: 74 0b je 10b29e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); 10b293: e8 78 6b 00 00 call 111e10 <__errno> 10b298: c7 00 04 00 00 00 movl $0x4,(%eax) return status; } 10b29e: 83 c8 ff or $0xffffffff,%eax 10b2a1: 8d 65 f8 lea -0x8(%ebp),%esp 10b2a4: 5b pop %ebx 10b2a5: 5e pop %esi 10b2a6: c9 leave 10b2a7: c3 ret =============================================================================== 00109a39 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 109a39: 55 push %ebp 109a3a: 89 e5 mov %esp,%ebp 109a3c: 57 push %edi 109a3d: 56 push %esi 109a3e: 53 push %ebx 109a3f: 83 ec 1c sub $0x1c,%esp 109a42: 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 ) { 109a45: 85 db test %ebx,%ebx 109a47: 74 35 je 109a7e if ( !_Timespec_Is_valid( timeout ) ) 109a49: 83 ec 0c sub $0xc,%esp 109a4c: 53 push %ebx 109a4d: e8 92 31 00 00 call 10cbe4 <_Timespec_Is_valid> 109a52: 83 c4 10 add $0x10,%esp 109a55: 84 c0 test %al,%al 109a57: 74 12 je 109a6b rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 109a59: 83 ec 0c sub $0xc,%esp 109a5c: 53 push %ebx 109a5d: e8 de 31 00 00 call 10cc40 <_Timespec_To_ticks> 109a62: 89 c3 mov %eax,%ebx if ( !interval ) 109a64: 83 c4 10 add $0x10,%esp 109a67: 85 c0 test %eax,%eax 109a69: 75 15 jne 109a80 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 109a6b: e8 10 6a 00 00 call 110480 <__errno> 109a70: c7 00 16 00 00 00 movl $0x16,(%eax) 109a76: 83 cb ff or $0xffffffff,%ebx 109a79: e9 05 01 00 00 jmp 109b83 109a7e: 31 db xor %ebx,%ebx /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 109a80: 8b 75 0c mov 0xc(%ebp),%esi 109a83: 85 f6 test %esi,%esi 109a85: 75 03 jne 109a8a 109a87: 8d 75 e8 lea -0x18(%ebp),%esi the_thread = _Thread_Executing; 109a8a: 8b 15 f8 07 12 00 mov 0x1207f8,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 109a90: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 109a96: 9c pushf 109a97: fa cli 109a98: 8f 45 e0 popl -0x20(%ebp) if ( *set & api->signals_pending ) { 109a9b: 8b 45 08 mov 0x8(%ebp),%eax 109a9e: 8b 08 mov (%eax),%ecx 109aa0: 8b 87 c8 00 00 00 mov 0xc8(%edi),%eax 109aa6: 85 c1 test %eax,%ecx 109aa8: 74 2c je 109ad6 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 109aaa: 50 push %eax 109aab: e8 48 ff ff ff call 1099f8 <_POSIX_signals_Get_highest> 109ab0: 89 06 mov %eax,(%esi) _POSIX_signals_Clear_signals( 109ab2: 51 push %ecx 109ab3: 51 push %ecx 109ab4: 6a 00 push $0x0 109ab6: 6a 00 push $0x0 109ab8: 56 push %esi 109ab9: 50 push %eax 109aba: 57 push %edi 109abb: e8 38 50 00 00 call 10eaf8 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 109ac0: ff 75 e0 pushl -0x20(%ebp) 109ac3: 9d popf the_info->si_code = SI_USER; 109ac4: c7 46 04 01 00 00 00 movl $0x1,0x4(%esi) the_info->si_value.sival_int = 0; 109acb: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) return the_info->si_signo; 109ad2: 8b 1e mov (%esi),%ebx 109ad4: eb 33 jmp 109b09 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 109ad6: a1 a8 0e 12 00 mov 0x120ea8,%eax 109adb: 85 c1 test %eax,%ecx 109add: 74 2f je 109b0e signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 109adf: 50 push %eax 109ae0: e8 13 ff ff ff call 1099f8 <_POSIX_signals_Get_highest> 109ae5: 89 c3 mov %eax,%ebx _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 109ae7: 52 push %edx 109ae8: 52 push %edx 109ae9: 6a 00 push $0x0 109aeb: 6a 01 push $0x1 109aed: 56 push %esi 109aee: 50 push %eax 109aef: 57 push %edi 109af0: e8 03 50 00 00 call 10eaf8 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 109af5: ff 75 e0 pushl -0x20(%ebp) 109af8: 9d popf the_info->si_signo = signo; 109af9: 89 1e mov %ebx,(%esi) the_info->si_code = SI_USER; 109afb: c7 46 04 01 00 00 00 movl $0x1,0x4(%esi) the_info->si_value.sival_int = 0; 109b02: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) 109b09: 83 c4 20 add $0x20,%esp 109b0c: eb 75 jmp 109b83 return signo; } the_info->si_signo = -1; 109b0e: 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 109b14: a1 38 07 12 00 mov 0x120738,%eax 109b19: 40 inc %eax 109b1a: a3 38 07 12 00 mov %eax,0x120738 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 109b1f: c7 42 44 68 0e 12 00 movl $0x120e68,0x44(%edx) the_thread->Wait.return_code = EINTR; 109b26: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 109b2d: 8b 4d 08 mov 0x8(%ebp),%ecx 109b30: 8b 01 mov (%ecx),%eax 109b32: 89 42 30 mov %eax,0x30(%edx) the_thread->Wait.return_argument = the_info; 109b35: 89 72 28 mov %esi,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 109b38: c7 05 98 0e 12 00 01 movl $0x1,0x120e98 109b3f: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 109b42: ff 75 e0 pushl -0x20(%ebp) 109b45: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 109b46: 50 push %eax 109b47: 68 e0 c7 10 00 push $0x10c7e0 109b4c: 53 push %ebx 109b4d: 68 68 0e 12 00 push $0x120e68 109b52: e8 85 29 00 00 call 10c4dc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 109b57: e8 30 25 00 00 call 10c08c <_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 ); 109b5c: c7 04 24 00 00 00 00 movl $0x0,(%esp) 109b63: 6a 00 push $0x0 109b65: 56 push %esi 109b66: ff 36 pushl (%esi) 109b68: 57 push %edi 109b69: e8 8a 4f 00 00 call 10eaf8 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 109b6e: 83 c4 20 add $0x20,%esp 109b71: e8 0a 69 00 00 call 110480 <__errno> 109b76: 8b 15 f8 07 12 00 mov 0x1207f8,%edx 109b7c: 8b 52 34 mov 0x34(%edx),%edx 109b7f: 89 10 mov %edx,(%eax) return the_info->si_signo; 109b81: 8b 1e mov (%esi),%ebx } 109b83: 89 d8 mov %ebx,%eax 109b85: 8d 65 f4 lea -0xc(%ebp),%esp 109b88: 5b pop %ebx 109b89: 5e pop %esi 109b8a: 5f pop %edi 109b8b: c9 leave 109b8c: c3 ret =============================================================================== 0010b458 : int sigwait( const sigset_t *set, int *sig ) { 10b458: 55 push %ebp 10b459: 89 e5 mov %esp,%ebp 10b45b: 53 push %ebx 10b45c: 83 ec 08 sub $0x8,%esp 10b45f: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10b462: 6a 00 push $0x0 10b464: 6a 00 push $0x0 10b466: ff 75 08 pushl 0x8(%ebp) 10b469: e8 7b fe ff ff call 10b2e9 10b46e: 89 c2 mov %eax,%edx if ( status != -1 ) { 10b470: 83 c4 10 add $0x10,%esp 10b473: 83 f8 ff cmp $0xffffffff,%eax 10b476: 74 0c je 10b484 <== NEVER TAKEN if ( sig ) 10b478: 31 c0 xor %eax,%eax 10b47a: 85 db test %ebx,%ebx 10b47c: 74 0d je 10b48b <== NEVER TAKEN *sig = status; 10b47e: 89 13 mov %edx,(%ebx) 10b480: 31 c0 xor %eax,%eax 10b482: eb 07 jmp 10b48b return 0; } return errno; 10b484: e8 87 69 00 00 call 111e10 <__errno> <== NOT EXECUTED 10b489: 8b 00 mov (%eax),%eax <== NOT EXECUTED } 10b48b: 8b 5d fc mov -0x4(%ebp),%ebx 10b48e: c9 leave 10b48f: c3 ret =============================================================================== 0010d50c : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10d50c: 55 push %ebp 10d50d: 89 e5 mov %esp,%ebp 10d50f: 57 push %edi 10d510: 56 push %esi 10d511: 53 push %ebx 10d512: 83 ec 0c sub $0xc,%esp 10d515: 8b 75 0c mov 0xc(%ebp),%esi 10d518: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10d51b: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10d51f: 75 1d jne 10d53e rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10d521: 85 ff test %edi,%edi 10d523: 74 19 je 10d53e /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10d525: 85 f6 test %esi,%esi 10d527: 74 22 je 10d54b /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10d529: 8b 06 mov (%esi),%eax 10d52b: 48 dec %eax 10d52c: 83 f8 01 cmp $0x1,%eax 10d52f: 77 0d ja 10d53e <== 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 ) 10d531: 8b 46 04 mov 0x4(%esi),%eax 10d534: 85 c0 test %eax,%eax 10d536: 74 06 je 10d53e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10d538: 48 dec %eax 10d539: 83 f8 1f cmp $0x1f,%eax 10d53c: 76 0d jbe 10d54b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10d53e: e8 c9 6e 00 00 call 11440c <__errno> 10d543: c7 00 16 00 00 00 movl $0x16,(%eax) 10d549: eb 31 jmp 10d57c /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10d54b: a1 58 63 12 00 mov 0x126358,%eax 10d550: 40 inc %eax 10d551: a3 58 63 12 00 mov %eax,0x126358 #ifdef __cplusplus extern "C" { #endif /** * This routine initializes @a the_heap record to manage the 10d556: 83 ec 0c sub $0xc,%esp 10d559: 68 88 66 12 00 push $0x126688 10d55e: e8 81 1b 00 00 call 10f0e4 <_Objects_Allocate> 10d563: 89 c3 mov %eax,%ebx /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10d565: 83 c4 10 add $0x10,%esp 10d568: 85 c0 test %eax,%eax 10d56a: 75 18 jne 10d584 _Thread_Enable_dispatch(); 10d56c: e8 c3 27 00 00 call 10fd34 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10d571: e8 96 6e 00 00 call 11440c <__errno> 10d576: c7 00 0b 00 00 00 movl $0xb,(%eax) 10d57c: 83 c8 ff or $0xffffffff,%eax 10d57f: e9 81 00 00 00 jmp 10d605 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 10d584: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10d588: a1 18 64 12 00 mov 0x126418,%eax 10d58d: 8b 40 08 mov 0x8(%eax),%eax 10d590: 89 43 38 mov %eax,0x38(%ebx) if ( evp != NULL ) { 10d593: 85 f6 test %esi,%esi 10d595: 74 11 je 10d5a8 ptimer->inf.sigev_notify = evp->sigev_notify; 10d597: 8b 06 mov (%esi),%eax 10d599: 89 43 40 mov %eax,0x40(%ebx) ptimer->inf.sigev_signo = evp->sigev_signo; 10d59c: 8b 46 04 mov 0x4(%esi),%eax 10d59f: 89 43 44 mov %eax,0x44(%ebx) ptimer->inf.sigev_value = evp->sigev_value; 10d5a2: 8b 46 08 mov 0x8(%esi),%eax 10d5a5: 89 43 48 mov %eax,0x48(%ebx) } ptimer->overrun = 0; 10d5a8: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) ptimer->timer_data.it_value.tv_sec = 0; 10d5af: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) ptimer->timer_data.it_value.tv_nsec = 0; 10d5b6: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) ptimer->timer_data.it_interval.tv_sec = 0; 10d5bd: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) ptimer->timer_data.it_interval.tv_nsec = 0; 10d5c4: 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. * 10d5cb: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 10d5d2: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 10d5d9: c7 43 30 00 00 00 00 movl $0x0,0x30(%ebx) * the heap 10d5e0: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) 10d5e7: 8b 4b 08 mov 0x8(%ebx),%ecx 10d5ea: 0f b7 d1 movzwl %cx,%edx 10d5ed: a1 a4 66 12 00 mov 0x1266a4,%eax 10d5f2: 89 1c 90 mov %ebx,(%eax,%edx,4) 10d5f5: 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; 10d5fc: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 10d5fe: e8 31 27 00 00 call 10fd34 <_Thread_Enable_dispatch> 10d603: 31 c0 xor %eax,%eax return 0; } 10d605: 8d 65 f4 lea -0xc(%ebp),%esp 10d608: 5b pop %ebx 10d609: 5e pop %esi 10d60a: 5f pop %edi 10d60b: c9 leave 10d60c: c3 ret =============================================================================== 0010a198 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10a198: 55 push %ebp 10a199: 89 e5 mov %esp,%ebp 10a19b: 57 push %edi 10a19c: 56 push %esi 10a19d: 53 push %ebx 10a19e: 83 ec 2c sub $0x2c,%esp 10a1a1: 8b 55 0c mov 0xc(%ebp),%edx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10a1a4: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a1a8: 0f 84 4c 01 00 00 je 10a2fa <== 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 ) || 10a1ae: 8b 45 10 mov 0x10(%ebp),%eax 10a1b1: 81 78 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%eax) 10a1b8: 0f 87 3c 01 00 00 ja 10a2fa 10a1be: 8b 40 04 mov 0x4(%eax),%eax 10a1c1: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10a1c6: 0f 87 2e 01 00 00 ja 10a2fa <== NEVER TAKEN 10a1cc: 85 c0 test %eax,%eax 10a1ce: 0f 88 26 01 00 00 js 10a2fa <== 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 ) { 10a1d4: 83 fa 04 cmp $0x4,%edx 10a1d7: 74 08 je 10a1e1 10a1d9: 85 d2 test %edx,%edx 10a1db: 0f 85 19 01 00 00 jne 10a2fa rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10a1e1: 8d 7d e0 lea -0x20(%ebp),%edi 10a1e4: b9 04 00 00 00 mov $0x4,%ecx 10a1e9: 8b 75 10 mov 0x10(%ebp),%esi 10a1ec: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 10a1ee: 83 fa 04 cmp $0x4,%edx 10a1f1: 75 2b jne 10a21e /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 10a1f3: 51 push %ecx 10a1f4: 51 push %ecx 10a1f5: 8d 5d e8 lea -0x18(%ebp),%ebx 10a1f8: 53 push %ebx 10a1f9: 68 e0 1a 12 00 push $0x121ae0 10a1fe: e8 4d 31 00 00 call 10d350 <_Timespec_Greater_than> 10a203: 83 c4 10 add $0x10,%esp 10a206: 84 c0 test %al,%al 10a208: 0f 85 ec 00 00 00 jne 10a2fa rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 10a20e: 52 push %edx 10a20f: 53 push %ebx 10a210: 53 push %ebx 10a211: 68 e0 1a 12 00 push $0x121ae0 10a216: e8 5d 31 00 00 call 10d378 <_Timespec_Subtract> 10a21b: 83 c4 10 add $0x10,%esp 10a21e: 50 push %eax 10a21f: 8d 45 f0 lea -0x10(%ebp),%eax 10a222: 50 push %eax 10a223: ff 75 08 pushl 0x8(%ebp) 10a226: 68 80 1d 12 00 push $0x121d80 10a22b: e8 dc 1d 00 00 call 10c00c <_Objects_Get> 10a230: 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 ) { 10a232: 83 c4 10 add $0x10,%esp 10a235: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10a239: 0f 85 bb 00 00 00 jne 10a2fa <== 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 ) { 10a23f: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 10a243: 75 3b jne 10a280 10a245: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 10a249: 75 35 jne 10a280 <== NEVER TAKEN /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10a24b: 83 ec 0c sub $0xc,%esp 10a24e: 8d 40 10 lea 0x10(%eax),%eax 10a251: 50 push %eax 10a252: e8 0d 35 00 00 call 10d764 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10a257: 83 c4 10 add $0x10,%esp 10a25a: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a25e: 74 0d je 10a26d <== ALWAYS TAKEN *ovalue = ptimer->timer_data; 10a260: 8d 73 54 lea 0x54(%ebx),%esi <== NOT EXECUTED 10a263: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 10a268: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 10a26b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 10a26d: 8d 7b 54 lea 0x54(%ebx),%edi 10a270: 8d 75 e0 lea -0x20(%ebp),%esi 10a273: b9 04 00 00 00 mov $0x4,%ecx 10a278: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a27a: c6 43 3c 04 movb $0x4,0x3c(%ebx) 10a27e: eb 35 jmp 10a2b5 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10a280: 83 ec 0c sub $0xc,%esp 10a283: ff 75 10 pushl 0x10(%ebp) 10a286: e8 25 31 00 00 call 10d3b0 <_Timespec_To_ticks> 10a28b: 89 43 64 mov %eax,0x64(%ebx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10a28e: 8d 45 e8 lea -0x18(%ebp),%eax 10a291: 89 04 24 mov %eax,(%esp) 10a294: e8 17 31 00 00 call 10d3b0 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10a299: 89 1c 24 mov %ebx,(%esp) 10a29c: 68 10 a3 10 00 push $0x10a310 10a2a1: ff 73 08 pushl 0x8(%ebx) 10a2a4: 50 push %eax 10a2a5: 8d 43 10 lea 0x10(%ebx),%eax 10a2a8: 50 push %eax 10a2a9: e8 5a 52 00 00 call 10f508 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10a2ae: 83 c4 20 add $0x20,%esp 10a2b1: 84 c0 test %al,%al 10a2b3: 75 09 jne 10a2be <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10a2b5: e8 12 25 00 00 call 10c7cc <_Thread_Enable_dispatch> 10a2ba: 31 c0 xor %eax,%eax 10a2bc: eb 4a jmp 10a308 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10a2be: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a2c2: 74 0d je 10a2d1 *ovalue = ptimer->timer_data; 10a2c4: 8d 73 54 lea 0x54(%ebx),%esi 10a2c7: b9 04 00 00 00 mov $0x4,%ecx 10a2cc: 8b 7d 14 mov 0x14(%ebp),%edi 10a2cf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10a2d1: 8d 7b 54 lea 0x54(%ebx),%edi 10a2d4: 8d 75 e0 lea -0x20(%ebp),%esi 10a2d7: b9 04 00 00 00 mov $0x4,%ecx 10a2dc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a2de: c6 43 3c 03 movb $0x3,0x3c(%ebx) _TOD_Get( &ptimer->time ); 10a2e2: 83 ec 0c sub $0xc,%esp 10a2e5: 8d 43 6c lea 0x6c(%ebx),%eax 10a2e8: 50 push %eax 10a2e9: e8 8e 15 00 00 call 10b87c <_TOD_Get> _Thread_Enable_dispatch(); 10a2ee: e8 d9 24 00 00 call 10c7cc <_Thread_Enable_dispatch> 10a2f3: 31 c0 xor %eax,%eax 10a2f5: 83 c4 10 add $0x10,%esp 10a2f8: eb 0e jmp 10a308 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a2fa: e8 71 69 00 00 call 110c70 <__errno> 10a2ff: c7 00 16 00 00 00 movl $0x16,(%eax) 10a305: 83 c8 ff or $0xffffffff,%eax } 10a308: 8d 65 f4 lea -0xc(%ebp),%esp 10a30b: 5b pop %ebx 10a30c: 5e pop %esi 10a30d: 5f pop %edi 10a30e: c9 leave 10a30f: c3 ret =============================================================================== 00108da8 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 108da8: 55 push %ebp 108da9: 89 e5 mov %esp,%ebp 108dab: 56 push %esi 108dac: 53 push %ebx 108dad: 83 ec 20 sub $0x20,%esp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 108db0: 83 3d ec fe 11 00 00 cmpl $0x0,0x11feec 108db7: 75 2c jne 108de5 * 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. * 108db9: c7 05 d8 fe 11 00 00 movl $0x0,0x11fed8 108dc0: 00 00 00 * @param[in] the_heap is the heap to operate upon 108dc3: c7 05 ec fe 11 00 88 movl $0x108e88,0x11feec 108dca: 8e 10 00 * @param[in] starting_address is the starting address of the memory for 108dcd: c7 05 f0 fe 11 00 00 movl $0x0,0x11fef0 108dd4: 00 00 00 * the heap 108dd7: c7 05 f4 fe 11 00 00 movl $0x0,0x11fef4 108dde: 00 00 00 108de1: 31 f6 xor %esi,%esi 108de3: eb 4f jmp 108e34 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 108de5: 83 ec 0c sub $0xc,%esp 108de8: 68 d0 fe 11 00 push $0x11fed0 108ded: e8 16 35 00 00 call 10c308 <_Watchdog_Remove> 108df2: 83 c4 10 add $0x10,%esp 108df5: 83 e8 02 sub $0x2,%eax 108df8: 31 f6 xor %esi,%esi 108dfa: 83 f8 01 cmp $0x1,%eax 108dfd: 77 35 ja 108e34 <== NEVER TAKEN * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 108dff: a1 e4 fe 11 00 mov 0x11fee4,%eax 108e04: 03 05 dc fe 11 00 add 0x11fedc,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 108e0a: 51 push %ecx 108e0b: 51 push %ecx 108e0c: 8d 55 f0 lea -0x10(%ebp),%edx 108e0f: 52 push %edx 108e10: 2b 05 e8 fe 11 00 sub 0x11fee8,%eax 108e16: 50 push %eax 108e17: e8 a4 30 00 00 call 10bec0 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 108e1c: 69 4d f0 40 42 0f 00 imul $0xf4240,-0x10(%ebp),%ecx remaining += tp.tv_nsec / 1000; 108e23: 8b 45 f4 mov -0xc(%ebp),%eax 108e26: bb e8 03 00 00 mov $0x3e8,%ebx 108e2b: 99 cltd 108e2c: f7 fb idiv %ebx 108e2e: 8d 34 08 lea (%eax,%ecx,1),%esi 108e31: 83 c4 10 add $0x10,%esp /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 108e34: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 108e38: 74 45 je 108e7f Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 108e3a: b9 40 42 0f 00 mov $0xf4240,%ecx 108e3f: 8b 45 08 mov 0x8(%ebp),%eax 108e42: 31 d2 xor %edx,%edx 108e44: f7 f1 div %ecx 108e46: 89 45 f0 mov %eax,-0x10(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 108e49: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 108e4f: 89 55 f4 mov %edx,-0xc(%ebp) ticks = _Timespec_To_ticks( &tp ); 108e52: 83 ec 0c sub $0xc,%esp 108e55: 8d 5d f0 lea -0x10(%ebp),%ebx 108e58: 53 push %ebx 108e59: e8 c6 30 00 00 call 10bf24 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 108e5e: 89 1c 24 mov %ebx,(%esp) 108e61: e8 be 30 00 00 call 10bf24 <_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, 108e66: a3 dc fe 11 00 mov %eax,0x11fedc void *starting_address, size_t *size 108e6b: 58 pop %eax 108e6c: 5a pop %edx 108e6d: 68 d0 fe 11 00 push $0x11fed0 108e72: 68 90 00 12 00 push $0x120090 108e77: e8 74 33 00 00 call 10c1f0 <_Watchdog_Insert> 108e7c: 83 c4 10 add $0x10,%esp } return remaining; } 108e7f: 89 f0 mov %esi,%eax 108e81: 8d 65 f8 lea -0x8(%ebp),%esp 108e84: 5b pop %ebx 108e85: 5e pop %esi 108e86: c9 leave 108e87: c3 ret