=============================================================================== 0010be78 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10be78: 55 push %ebp 10be79: 89 e5 mov %esp,%ebp 10be7b: 53 push %ebx 10be7c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be7f: 8b 1d 18 67 12 00 mov 0x126718,%ebx 10be85: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10be8b: 74 10 je 10be9d <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10be8d: 8d 76 00 lea 0x0(%esi),%esi * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 10be90: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10be93: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be95: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10be9b: 75 f3 jne 10be90 <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10be9d: 58 pop %eax 10be9e: 5b pop %ebx 10be9f: c9 leave 10bea0: c3 ret =============================================================================== 0010bea4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bea4: 55 push %ebp 10bea5: 89 e5 mov %esp,%ebp 10bea7: 53 push %ebx 10bea8: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10beab: 8b 1d 18 67 12 00 mov 0x126718,%ebx 10beb1: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10beb7: 74 1c je 10bed5 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10beb9: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 10bebc: 83 ec 0c sub $0xc,%esp 10bebf: ff 35 98 6a 12 00 pushl 0x126a98 10bec5: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10bec8: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10beca: 83 c4 10 add $0x10,%esp 10becd: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10bed3: 75 e7 jne 10bebc <_API_extensions_Run_postswitch+0x18> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bed5: 8b 5d fc mov -0x4(%ebp),%ebx 10bed8: c9 leave 10bed9: c3 ret =============================================================================== 0010e1f4 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e1f4: 55 push %ebp 10e1f5: 89 e5 mov %esp,%ebp 10e1f7: 57 push %edi 10e1f8: 56 push %esi 10e1f9: 53 push %ebx 10e1fa: 83 ec 1c sub $0x1c,%esp 10e1fd: 8b 5d 08 mov 0x8(%ebp),%ebx 10e200: 8b 7d 0c mov 0xc(%ebp),%edi 10e203: 8b 4d 14 mov 0x14(%ebp),%ecx 10e206: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e209: 8b 35 98 a6 12 00 mov 0x12a698,%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 ); 10e20f: 9c pushf 10e210: fa cli 10e211: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10e214: 8b 43 44 mov 0x44(%ebx),%eax 10e217: 85 c0 test %eax,%eax 10e219: 75 1d jne 10e238 <_CORE_RWLock_Obtain_for_reading+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e21b: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10e222: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e225: ff 75 e4 pushl -0x1c(%ebp) 10e228: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e229: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e230: 8d 65 f4 lea -0xc(%ebp),%esp 10e233: 5b pop %ebx 10e234: 5e pop %esi 10e235: 5f pop %edi 10e236: c9 leave 10e237: c3 ret * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 10e238: 48 dec %eax 10e239: 74 51 je 10e28c <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e23b: 84 d2 test %dl,%dl 10e23d: 75 15 jne 10e254 <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e23f: ff 75 e4 pushl -0x1c(%ebp) 10e242: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e243: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e24a: 8d 65 f4 lea -0xc(%ebp),%esp 10e24d: 5b pop %ebx 10e24e: 5e pop %esi 10e24f: 5f pop %edi 10e250: c9 leave 10e251: c3 ret 10e252: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e254: 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; 10e25b: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e25e: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e261: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e268: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e26f: ff 75 e4 pushl -0x1c(%ebp) 10e272: 9d popf _Thread_queue_Enqueue_with_handler( 10e273: c7 45 10 f8 e3 10 00 movl $0x10e3f8,0x10(%ebp) 10e27a: 89 4d 0c mov %ecx,0xc(%ebp) 10e27d: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e280: 8d 65 f4 lea -0xc(%ebp),%esp 10e283: 5b pop %ebx 10e284: 5e pop %esi 10e285: 5f pop %edi 10e286: 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( 10e287: e9 84 19 00 00 jmp 10fc10 <_Thread_queue_Enqueue_with_handler> executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 10e28c: 83 ec 0c sub $0xc,%esp 10e28f: 53 push %ebx 10e290: 88 55 e0 mov %dl,-0x20(%ebp) 10e293: 89 4d dc mov %ecx,-0x24(%ebp) 10e296: e8 bd 1c 00 00 call 10ff58 <_Thread_queue_First> if ( !waiter ) { 10e29b: 83 c4 10 add $0x10,%esp 10e29e: 85 c0 test %eax,%eax 10e2a0: 8a 55 e0 mov -0x20(%ebp),%dl 10e2a3: 8b 4d dc mov -0x24(%ebp),%ecx 10e2a6: 75 93 jne 10e23b <_CORE_RWLock_Obtain_for_reading+0x47><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10e2a8: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e2ab: ff 75 e4 pushl -0x1c(%ebp) 10e2ae: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e2af: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e2b6: e9 75 ff ff ff jmp 10e230 <_CORE_RWLock_Obtain_for_reading+0x3c> =============================================================================== 0010e2bc <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e2bc: 55 push %ebp 10e2bd: 89 e5 mov %esp,%ebp 10e2bf: 57 push %edi 10e2c0: 56 push %esi 10e2c1: 53 push %ebx 10e2c2: 83 ec 0c sub $0xc,%esp 10e2c5: 8b 45 08 mov 0x8(%ebp),%eax 10e2c8: 8b 7d 0c mov 0xc(%ebp),%edi 10e2cb: 8b 75 14 mov 0x14(%ebp),%esi 10e2ce: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e2d1: 8b 15 98 a6 12 00 mov 0x12a698,%edx * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10e2d7: 9c pushf 10e2d8: fa cli 10e2d9: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e2da: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e2de: 75 18 jne 10e2f8 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e2e0: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e2e7: 51 push %ecx 10e2e8: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e2e9: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e2f0: 83 c4 0c add $0xc,%esp 10e2f3: 5b pop %ebx 10e2f4: 5e pop %esi 10e2f5: 5f pop %edi 10e2f6: c9 leave 10e2f7: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e2f8: 84 db test %bl,%bl 10e2fa: 75 14 jne 10e310 <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e2fc: 51 push %ecx 10e2fd: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e2fe: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e305: 83 c4 0c add $0xc,%esp 10e308: 5b pop %ebx 10e309: 5e pop %esi 10e30a: 5f pop %edi 10e30b: c9 leave 10e30c: c3 ret 10e30d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10e310: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 10e317: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e31a: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e31d: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e324: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e32b: 51 push %ecx 10e32c: 9d popf _Thread_queue_Enqueue_with_handler( 10e32d: c7 45 10 f8 e3 10 00 movl $0x10e3f8,0x10(%ebp) 10e334: 89 75 0c mov %esi,0xc(%ebp) 10e337: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e33a: 83 c4 0c add $0xc,%esp 10e33d: 5b pop %ebx 10e33e: 5e pop %esi 10e33f: 5f pop %edi 10e340: c9 leave executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 10e341: e9 ca 18 00 00 jmp 10fc10 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010e348 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e348: 55 push %ebp 10e349: 89 e5 mov %esp,%ebp 10e34b: 53 push %ebx 10e34c: 83 ec 04 sub $0x4,%esp 10e34f: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e352: 8b 0d 98 a6 12 00 mov 0x12a698,%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 ); 10e358: 9c pushf 10e359: fa cli 10e35a: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e35b: 8b 43 44 mov 0x44(%ebx),%eax 10e35e: 85 c0 test %eax,%eax 10e360: 74 7a je 10e3dc <_CORE_RWLock_Release+0x94> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10e362: 48 dec %eax 10e363: 74 63 je 10e3c8 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e365: 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; 10e36c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e373: 52 push %edx 10e374: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e375: 83 ec 0c sub $0xc,%esp 10e378: 53 push %ebx 10e379: e8 6e 17 00 00 call 10faec <_Thread_queue_Dequeue> if ( next ) { 10e37e: 83 c4 10 add $0x10,%esp 10e381: 85 c0 test %eax,%eax 10e383: 74 39 je 10e3be <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e385: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e389: 74 61 je 10e3ec <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e38b: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e38e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e395: eb 17 jmp 10e3ae <_CORE_RWLock_Release+0x66> 10e397: 90 nop <== NOT EXECUTED /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 10e398: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e39c: 74 20 je 10e3be <_CORE_RWLock_Release+0x76><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10e39e: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e3a1: 83 ec 08 sub $0x8,%esp 10e3a4: 50 push %eax 10e3a5: 53 push %ebx 10e3a6: e8 99 1a 00 00 call 10fe44 <_Thread_queue_Extract> } 10e3ab: 83 c4 10 add $0x10,%esp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10e3ae: 83 ec 0c sub $0xc,%esp 10e3b1: 53 push %ebx 10e3b2: e8 a1 1b 00 00 call 10ff58 <_Thread_queue_First> if ( !next || 10e3b7: 83 c4 10 add $0x10,%esp 10e3ba: 85 c0 test %eax,%eax 10e3bc: 75 da jne 10e398 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e3be: 31 c0 xor %eax,%eax 10e3c0: 8b 5d fc mov -0x4(%ebp),%ebx 10e3c3: c9 leave 10e3c4: c3 ret 10e3c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 10e3c8: 8b 43 48 mov 0x48(%ebx),%eax 10e3cb: 48 dec %eax 10e3cc: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e3cf: 85 c0 test %eax,%eax 10e3d1: 74 92 je 10e365 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e3d3: 52 push %edx 10e3d4: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e3d5: 31 c0 xor %eax,%eax 10e3d7: 8b 5d fc mov -0x4(%ebp),%ebx 10e3da: c9 leave 10e3db: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e3dc: 52 push %edx 10e3dd: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e3de: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e3e5: 31 c0 xor %eax,%eax 10e3e7: 8b 5d fc mov -0x4(%ebp),%ebx 10e3ea: c9 leave 10e3eb: c3 ret next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e3ec: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e3f3: eb c9 jmp 10e3be <_CORE_RWLock_Release+0x76> =============================================================================== 0010e3f8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10e3f8: 55 push %ebp 10e3f9: 89 e5 mov %esp,%ebp 10e3fb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e3fe: 8d 45 f4 lea -0xc(%ebp),%eax 10e401: 50 push %eax 10e402: ff 75 08 pushl 0x8(%ebp) 10e405: e8 42 13 00 00 call 10f74c <_Thread_Get> switch ( location ) { 10e40a: 83 c4 10 add $0x10,%esp 10e40d: 8b 55 f4 mov -0xc(%ebp),%edx 10e410: 85 d2 test %edx,%edx 10e412: 75 17 jne 10e42b <_CORE_RWLock_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10e414: 83 ec 0c sub $0xc,%esp 10e417: 50 push %eax 10e418: e8 1b 1c 00 00 call 110038 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e41d: a1 d4 a0 12 00 mov 0x12a0d4,%eax 10e422: 48 dec %eax 10e423: a3 d4 a0 12 00 mov %eax,0x12a0d4 10e428: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e42b: c9 leave 10e42c: c3 ret =============================================================================== 0010d0dc <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 10d0dc: 55 push %ebp 10d0dd: 89 e5 mov %esp,%ebp 10d0df: 57 push %edi 10d0e0: 56 push %esi 10d0e1: 53 push %ebx 10d0e2: 83 ec 1c sub $0x1c,%esp 10d0e5: 8b 45 08 mov 0x8(%ebp),%eax 10d0e8: 8b 5d 0c mov 0xc(%ebp),%ebx 10d0eb: 8b 75 14 mov 0x14(%ebp),%esi 10d0ee: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 10d0f1: 8b 15 b8 91 12 00 mov 0x1291b8,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 10d0f7: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 10d0fe: 9c pushf 10d0ff: fa cli 10d100: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 10d103: 8b 48 48 mov 0x48(%eax),%ecx 10d106: 41 inc %ecx 10d107: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 10d10a: 83 78 40 00 cmpl $0x0,0x40(%eax) 10d10e: 75 05 jne 10d115 <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == 10d110: 3b 48 44 cmp 0x44(%eax),%ecx 10d113: 74 2b je 10d140 <_CORE_barrier_Wait+0x64> RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10d115: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 10d11c: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10d11f: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 10d122: ff 75 e4 pushl -0x1c(%ebp) 10d125: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10d126: c7 45 10 34 f0 10 00 movl $0x10f034,0x10(%ebp) 10d12d: 89 75 0c mov %esi,0xc(%ebp) 10d130: 89 45 08 mov %eax,0x8(%ebp) } 10d133: 83 c4 1c add $0x1c,%esp 10d136: 5b pop %ebx 10d137: 5e pop %esi 10d138: 5f pop %edi 10d139: 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 ); 10d13a: e9 a5 1b 00 00 jmp 10ece4 <_Thread_queue_Enqueue_with_handler> 10d13f: 90 nop <== NOT EXECUTED _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 10d140: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 10d147: ff 75 e4 pushl -0x1c(%ebp) 10d14a: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10d14b: 89 7d 10 mov %edi,0x10(%ebp) 10d14e: 89 5d 0c mov %ebx,0xc(%ebp) 10d151: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 10d154: 83 c4 1c add $0x1c,%esp 10d157: 5b pop %ebx 10d158: 5e pop %esi 10d159: 5f pop %edi 10d15a: c9 leave if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10d15b: e9 94 4f 00 00 jmp 1120f4 <_CORE_barrier_Release> =============================================================================== 00119884 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 119884: 55 push %ebp 119885: 89 e5 mov %esp,%ebp 119887: 57 push %edi 119888: 56 push %esi 119889: 53 push %ebx 11988a: 83 ec 1c sub $0x1c,%esp 11988d: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 119890: 8b 45 10 mov 0x10(%ebp),%eax 119893: 39 43 4c cmp %eax,0x4c(%ebx) 119896: 72 60 jb 1198f8 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 119898: 8b 43 48 mov 0x48(%ebx),%eax 11989b: 85 c0 test %eax,%eax 11989d: 75 45 jne 1198e4 <_CORE_message_queue_Broadcast+0x60> 11989f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1198a6: eb 18 jmp 1198c0 <_CORE_message_queue_Broadcast+0x3c> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 1198a8: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1198ab: 8b 42 2c mov 0x2c(%edx),%eax 1198ae: 89 c7 mov %eax,%edi 1198b0: 8b 75 0c mov 0xc(%ebp),%esi 1198b3: 8b 4d 10 mov 0x10(%ebp),%ecx 1198b6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1198b8: 8b 42 28 mov 0x28(%edx),%eax 1198bb: 8b 55 10 mov 0x10(%ebp),%edx 1198be: 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 = 1198c0: 83 ec 0c sub $0xc,%esp 1198c3: 53 push %ebx 1198c4: e8 0b 26 00 00 call 11bed4 <_Thread_queue_Dequeue> 1198c9: 89 c2 mov %eax,%edx 1198cb: 83 c4 10 add $0x10,%esp 1198ce: 85 c0 test %eax,%eax 1198d0: 75 d6 jne 1198a8 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 1198d2: 8b 55 e4 mov -0x1c(%ebp),%edx 1198d5: 8b 45 1c mov 0x1c(%ebp),%eax 1198d8: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1198da: 31 c0 xor %eax,%eax } 1198dc: 8d 65 f4 lea -0xc(%ebp),%esp 1198df: 5b pop %ebx 1198e0: 5e pop %esi 1198e1: 5f pop %edi 1198e2: c9 leave 1198e3: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 1198e4: 8b 55 1c mov 0x1c(%ebp),%edx 1198e7: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1198ed: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198ef: 8d 65 f4 lea -0xc(%ebp),%esp 1198f2: 5b pop %ebx 1198f3: 5e pop %esi 1198f4: 5f pop %edi 1198f5: c9 leave 1198f6: c3 ret 1198f7: 90 nop <== NOT EXECUTED Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 1198f8: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198fd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 119900: 5b pop %ebx <== NOT EXECUTED 119901: 5e pop %esi <== NOT EXECUTED 119902: 5f pop %edi <== NOT EXECUTED 119903: c9 leave <== NOT EXECUTED 119904: c3 ret <== NOT EXECUTED =============================================================================== 001149dc <_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 ) { 1149dc: 55 push %ebp 1149dd: 89 e5 mov %esp,%ebp 1149df: 57 push %edi 1149e0: 56 push %esi 1149e1: 53 push %ebx 1149e2: 83 ec 0c sub $0xc,%esp 1149e5: 8b 5d 08 mov 0x8(%ebp),%ebx 1149e8: 8b 75 10 mov 0x10(%ebp),%esi 1149eb: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1149ee: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1149f1: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1149f8: 89 43 4c mov %eax,0x4c(%ebx) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 1149fb: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 114a02: 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)) { 114a09: a8 03 test $0x3,%al 114a0b: 74 17 je 114a24 <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); 114a0d: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114a10: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114a13: 39 d0 cmp %edx,%eax 114a15: 76 0f jbe 114a26 <_CORE_message_queue_Initialize+0x4a><== ALWAYS TAKEN */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 114a17: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 114a19: 8d 65 f4 lea -0xc(%ebp),%esp 114a1c: 5b pop %ebx 114a1d: 5e pop %esi 114a1e: 5f pop %edi 114a1f: c9 leave 114a20: c3 ret 114a21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * 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)) { 114a24: 89 c2 mov %eax,%edx /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 114a26: 8d 7a 14 lea 0x14(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 114a29: 89 f8 mov %edi,%eax 114a2b: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114a2e: 39 d0 cmp %edx,%eax 114a30: 72 e5 jb 114a17 <_CORE_message_queue_Initialize+0x3b><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 114a32: 83 ec 0c sub $0xc,%esp 114a35: 50 push %eax 114a36: e8 75 2a 00 00 call 1174b0 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114a3b: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114a3e: 83 c4 10 add $0x10,%esp 114a41: 85 c0 test %eax,%eax 114a43: 74 d2 je 114a17 <_CORE_message_queue_Initialize+0x3b> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114a45: 57 push %edi 114a46: 56 push %esi 114a47: 50 push %eax 114a48: 8d 43 68 lea 0x68(%ebx),%eax 114a4b: 50 push %eax 114a4c: e8 63 51 00 00 call 119bb4 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114a51: 8d 43 54 lea 0x54(%ebx),%eax 114a54: 89 43 50 mov %eax,0x50(%ebx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 114a57: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 114a5e: 8d 43 50 lea 0x50(%ebx),%eax 114a61: 89 43 58 mov %eax,0x58(%ebx) _Thread_queue_Initialize( 114a64: 6a 06 push $0x6 114a66: 68 80 00 00 00 push $0x80 114a6b: 8b 45 0c mov 0xc(%ebp),%eax 114a6e: 83 38 01 cmpl $0x1,(%eax) 114a71: 0f 94 c0 sete %al 114a74: 0f b6 c0 movzbl %al,%eax 114a77: 50 push %eax 114a78: 53 push %ebx 114a79: e8 ca 1f 00 00 call 116a48 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114a7e: 83 c4 20 add $0x20,%esp 114a81: b0 01 mov $0x1,%al } 114a83: 8d 65 f4 lea -0xc(%ebp),%esp 114a86: 5b pop %ebx 114a87: 5e pop %esi 114a88: 5f pop %edi 114a89: c9 leave 114a8a: c3 ret =============================================================================== 00110fd0 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 110fd0: 55 push %ebp 110fd1: 89 e5 mov %esp,%ebp 110fd3: 56 push %esi 110fd4: 53 push %ebx 110fd5: 83 ec 10 sub $0x10,%esp 110fd8: 8b 45 08 mov 0x8(%ebp),%eax 110fdb: 8b 55 0c mov 0xc(%ebp),%edx 110fde: 8b 4d 10 mov 0x10(%ebp),%ecx 110fe1: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 110fe4: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 110fea: 74 70 je 11105c <_CORE_message_queue_Insert_message+0x8c> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 110fec: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 110ff2: 0f 84 88 00 00 00 je 111080 <_CORE_message_queue_Insert_message+0xb0> Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 110ff8: 8b 58 50 mov 0x50(%eax),%ebx 110ffb: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 110ffe: 39 de cmp %ebx,%esi 111000: 74 05 je 111007 <_CORE_message_queue_Insert_message+0x37> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 111002: 3b 4b 08 cmp 0x8(%ebx),%ecx 111005: 7d 45 jge 11104c <_CORE_message_queue_Insert_message+0x7c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 111007: 9c pushf 111008: fa cli 111009: 5e pop %esi SET_NOTIFY(); 11100a: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 11100d: 85 c9 test %ecx,%ecx 11100f: 0f 94 45 f7 sete -0x9(%ebp) } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 111013: 41 inc %ecx 111014: 89 48 48 mov %ecx,0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 111017: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 11101a: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 11101d: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 11101f: 89 11 mov %edx,(%ecx) the_node->next = before_node; 111021: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 111023: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 111026: 56 push %esi 111027: 9d popf /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 111028: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11102c: 74 16 je 111044 <_CORE_message_queue_Insert_message+0x74> 11102e: 8b 50 60 mov 0x60(%eax),%edx 111031: 85 d2 test %edx,%edx 111033: 74 0f je 111044 <_CORE_message_queue_Insert_message+0x74> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 111035: 8b 40 64 mov 0x64(%eax),%eax 111038: 89 45 08 mov %eax,0x8(%ebp) #endif } 11103b: 83 c4 10 add $0x10,%esp 11103e: 5b pop %ebx 11103f: 5e pop %esi 111040: c9 leave * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 111041: ff e2 jmp *%edx 111043: 90 nop <== NOT EXECUTED #endif } 111044: 83 c4 10 add $0x10,%esp 111047: 5b pop %ebx 111048: 5e pop %esi 111049: c9 leave 11104a: c3 ret 11104b: 90 nop <== NOT EXECUTED this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { the_node = the_node->next; 11104c: 8b 1b mov (%ebx),%ebx int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 11104e: 39 de cmp %ebx,%esi 111050: 74 b5 je 111007 <_CORE_message_queue_Insert_message+0x37> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 111052: 3b 4b 08 cmp 0x8(%ebx),%ecx 111055: 7c b0 jl 111007 <_CORE_message_queue_Insert_message+0x37> 111057: eb f3 jmp 11104c <_CORE_message_queue_Insert_message+0x7c> 111059: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 11105c: 9c pushf 11105d: fa cli 11105e: 5b pop %ebx SET_NOTIFY(); 11105f: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 111062: 85 c9 test %ecx,%ecx 111064: 0f 94 45 f7 sete -0x9(%ebp) _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 111068: 41 inc %ecx 111069: 89 48 48 mov %ecx,0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11106c: 8d 48 54 lea 0x54(%eax),%ecx 11106f: 89 0a mov %ecx,(%edx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 111071: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 111074: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 111077: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 111079: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 11107c: 53 push %ebx 11107d: 9d popf 11107e: eb a8 jmp 111028 <_CORE_message_queue_Insert_message+0x58> } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 111080: 9c pushf 111081: fa cli 111082: 5b pop %ebx SET_NOTIFY(); 111083: 8b 48 48 mov 0x48(%eax),%ecx * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 111086: 85 c9 test %ecx,%ecx 111088: 0f 94 45 f7 sete -0x9(%ebp) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 11108c: 41 inc %ecx 11108d: 89 48 48 mov %ecx,0x48(%eax) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Prepend_unprotected( 111090: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 111093: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 111096: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 111099: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 11109c: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 11109e: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 1110a1: 53 push %ebx 1110a2: 9d popf 1110a3: eb 83 jmp 111028 <_CORE_message_queue_Insert_message+0x58> =============================================================================== 00114a8c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114a8c: 55 push %ebp 114a8d: 89 e5 mov %esp,%ebp 114a8f: 57 push %edi 114a90: 56 push %esi 114a91: 53 push %ebx 114a92: 83 ec 2c sub $0x2c,%esp 114a95: 8b 55 08 mov 0x8(%ebp),%edx 114a98: 8b 45 0c mov 0xc(%ebp),%eax 114a9b: 89 45 dc mov %eax,-0x24(%ebp) 114a9e: 8b 4d 10 mov 0x10(%ebp),%ecx 114aa1: 89 4d e0 mov %ecx,-0x20(%ebp) 114aa4: 8b 45 14 mov 0x14(%ebp),%eax 114aa7: 8b 5d 1c mov 0x1c(%ebp),%ebx 114aaa: 89 5d d8 mov %ebx,-0x28(%ebp) 114aad: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114ab1: 8b 0d f8 10 13 00 mov 0x1310f8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114ab7: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114abe: 9c pushf 114abf: fa cli 114ac0: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114ac3: 8b 5a 50 mov 0x50(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114ac6: 8d 72 54 lea 0x54(%edx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 114ac9: 39 f3 cmp %esi,%ebx 114acb: 74 7b je 114b48 <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114acd: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 114acf: 89 4a 50 mov %ecx,0x50(%edx) CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get_unprotected( &the_message_queue->Pending_messages ); 114ad2: 8d 72 50 lea 0x50(%edx),%esi 114ad5: 89 71 04 mov %esi,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 114ad8: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 114adb: ff 75 e4 pushl -0x1c(%ebp) 114ade: 9d popf *size_p = the_message->Contents.size; 114adf: 8b 4b 0c mov 0xc(%ebx),%ecx 114ae2: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 114ae4: 8b 73 08 mov 0x8(%ebx),%esi 114ae7: 8b 0d f8 10 13 00 mov 0x1310f8,%ecx 114aed: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114af0: 8d 4b 10 lea 0x10(%ebx),%ecx 114af3: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114af6: 8b 08 mov (%eax),%ecx 114af8: 8b 7d e0 mov -0x20(%ebp),%edi 114afb: 8b 75 e4 mov -0x1c(%ebp),%esi 114afe: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 114b00: 83 ec 0c sub $0xc,%esp 114b03: 52 push %edx 114b04: 89 55 d4 mov %edx,-0x2c(%ebp) 114b07: e8 8c 1b 00 00 call 116698 <_Thread_queue_Dequeue> if ( !the_thread ) { 114b0c: 83 c4 10 add $0x10,%esp 114b0f: 85 c0 test %eax,%eax 114b11: 8b 55 d4 mov -0x2c(%ebp),%edx 114b14: 0f 84 86 00 00 00 je 114ba0 <_CORE_message_queue_Seize+0x114> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 114b1a: 8b 48 24 mov 0x24(%eax),%ecx 114b1d: 89 4b 08 mov %ecx,0x8(%ebx) */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 114b20: 8b 48 30 mov 0x30(%eax),%ecx 114b23: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114b26: 8b 70 2c mov 0x2c(%eax),%esi 114b29: 8b 7d e4 mov -0x1c(%ebp),%edi 114b2c: 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( 114b2e: 8b 43 08 mov 0x8(%ebx),%eax 114b31: 89 45 10 mov %eax,0x10(%ebp) 114b34: 89 5d 0c mov %ebx,0xc(%ebp) 114b37: 89 55 08 mov %edx,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 114b3a: 8d 65 f4 lea -0xc(%ebp),%esp 114b3d: 5b pop %ebx 114b3e: 5e pop %esi 114b3f: 5f pop %edi 114b40: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 114b41: e9 be 50 00 00 jmp 119c04 <_CORE_message_queue_Insert_message> 114b46: 66 90 xchg %ax,%ax <== NOT EXECUTED return; } #endif } if ( !wait ) { 114b48: 89 fb mov %edi,%ebx 114b4a: 84 db test %bl,%bl 114b4c: 75 16 jne 114b64 <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 114b4e: ff 75 e4 pushl -0x1c(%ebp) 114b51: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114b52: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) 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 ); } 114b59: 8d 65 f4 lea -0xc(%ebp),%esp 114b5c: 5b pop %ebx 114b5d: 5e pop %esi 114b5e: 5f pop %edi 114b5f: c9 leave 114b60: c3 ret 114b61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 114b64: 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; 114b6b: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 114b6e: 8b 5d dc mov -0x24(%ebp),%ebx 114b71: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114b74: 8b 5d e0 mov -0x20(%ebp),%ebx 114b77: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114b7a: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114b7d: ff 75 e4 pushl -0x1c(%ebp) 114b80: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114b81: c7 45 10 0c 6b 11 00 movl $0x116b0c,0x10(%ebp) 114b88: 8b 45 d8 mov -0x28(%ebp),%eax 114b8b: 89 45 0c mov %eax,0xc(%ebp) 114b8e: 89 55 08 mov %edx,0x8(%ebp) } 114b91: 8d 65 f4 lea -0xc(%ebp),%esp 114b94: 5b pop %ebx 114b95: 5e pop %esi 114b96: 5f pop %edi 114b97: 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 ); 114b98: e9 1f 1c 00 00 jmp 1167bc <_Thread_queue_Enqueue_with_handler> 114b9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 114ba0: 89 5d 0c mov %ebx,0xc(%ebp) 114ba3: 83 c2 68 add $0x68,%edx 114ba6: 89 55 08 mov %edx,0x8(%ebp) } 114ba9: 8d 65 f4 lea -0xc(%ebp),%esp 114bac: 5b pop %ebx 114bad: 5e pop %esi 114bae: 5f pop %edi 114baf: c9 leave 114bb0: e9 a7 fd ff ff jmp 11495c <_Chain_Append> =============================================================================== 0010c00c <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c00c: 55 push %ebp 10c00d: 89 e5 mov %esp,%ebp 10c00f: 57 push %edi 10c010: 56 push %esi 10c011: 53 push %ebx 10c012: 83 ec 1c sub $0x1c,%esp 10c015: 8b 5d 08 mov 0x8(%ebp),%ebx 10c018: 8b 75 0c mov 0xc(%ebp),%esi 10c01b: 8a 4d 20 mov 0x20(%ebp),%cl CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c01e: 8b 45 10 mov 0x10(%ebp),%eax 10c021: 39 43 4c cmp %eax,0x4c(%ebx) 10c024: 72 32 jb 10c058 <_CORE_message_queue_Submit+0x4c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c026: 8b 43 48 mov 0x48(%ebx),%eax 10c029: 85 c0 test %eax,%eax 10c02b: 74 3b je 10c068 <_CORE_message_queue_Submit+0x5c> /* * 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 < 10c02d: 39 43 44 cmp %eax,0x44(%ebx) 10c030: 0f 87 ba 00 00 00 ja 10c0f0 <_CORE_message_queue_Submit+0xe4> /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10c036: 84 c9 test %cl,%cl 10c038: 0f 84 ee 00 00 00 je 10c12c <_CORE_message_queue_Submit+0x120> /* * 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() ) { 10c03e: 8b 15 94 6a 12 00 mov 0x126a94,%edx 10c044: 85 d2 test %edx,%edx 10c046: 74 60 je 10c0a8 <_CORE_message_queue_Submit+0x9c> return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; 10c048: b8 03 00 00 00 mov $0x3,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c04d: 8d 65 f4 lea -0xc(%ebp),%esp 10c050: 5b pop %ebx 10c051: 5e pop %esi 10c052: 5f pop %edi 10c053: c9 leave 10c054: c3 ret 10c055: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 10c058: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c05d: 8d 65 f4 lea -0xc(%ebp),%esp 10c060: 5b pop %ebx 10c061: 5e pop %esi 10c062: 5f pop %edi 10c063: c9 leave 10c064: c3 ret 10c065: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10c068: 83 ec 0c sub $0xc,%esp 10c06b: 53 push %ebx 10c06c: 88 4d e4 mov %cl,-0x1c(%ebp) 10c06f: e8 f8 19 00 00 call 10da6c <_Thread_queue_Dequeue> 10c074: 89 c2 mov %eax,%edx if ( the_thread ) { 10c076: 83 c4 10 add $0x10,%esp 10c079: 85 c0 test %eax,%eax 10c07b: 8a 4d e4 mov -0x1c(%ebp),%cl 10c07e: 0f 84 b8 00 00 00 je 10c13c <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c084: 8b 40 2c mov 0x2c(%eax),%eax 10c087: 89 c7 mov %eax,%edi 10c089: 8b 4d 10 mov 0x10(%ebp),%ecx 10c08c: 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; 10c08e: 8b 42 28 mov 0x28(%edx),%eax 10c091: 8b 4d 10 mov 0x10(%ebp),%ecx 10c094: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c096: 8b 45 1c mov 0x1c(%ebp),%eax 10c099: 89 42 24 mov %eax,0x24(%edx) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c09c: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c09e: 8d 65 f4 lea -0xc(%ebp),%esp 10c0a1: 5b pop %ebx 10c0a2: 5e pop %esi 10c0a3: 5f pop %edi 10c0a4: c9 leave 10c0a5: c3 ret 10c0a6: 66 90 xchg %ax,%ax <== NOT EXECUTED * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 10c0a8: a1 98 6a 12 00 mov 0x126a98,%eax ISR_Level level; _ISR_Disable( level ); 10c0ad: 9c pushf 10c0ae: fa cli 10c0af: 59 pop %ecx RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c0b0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 10c0b7: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10c0ba: 8b 55 14 mov 0x14(%ebp),%edx 10c0bd: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10c0c0: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10c0c3: 8b 55 10 mov 0x10(%ebp),%edx 10c0c6: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10c0c9: 8b 55 1c mov 0x1c(%ebp),%edx 10c0cc: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10c0cf: 51 push %ecx 10c0d0: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10c0d1: 50 push %eax 10c0d2: 68 e0 de 10 00 push $0x10dee0 10c0d7: ff 75 24 pushl 0x24(%ebp) 10c0da: 53 push %ebx 10c0db: e8 b0 1a 00 00 call 10db90 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10c0e0: 83 c4 10 add $0x10,%esp 10c0e3: b8 07 00 00 00 mov $0x7,%eax #endif } 10c0e8: 8d 65 f4 lea -0xc(%ebp),%esp 10c0eb: 5b pop %ebx 10c0ec: 5e pop %esi 10c0ed: 5f pop %edi 10c0ee: c9 leave 10c0ef: c3 ret _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get( &the_message_queue->Inactive_messages ); 10c0f0: 83 ec 0c sub $0xc,%esp 10c0f3: 8d 43 68 lea 0x68(%ebx),%eax 10c0f6: 50 push %eax 10c0f7: e8 ec fe ff ff call 10bfe8 <_Chain_Get> 10c0fc: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10c0fe: 8d 40 10 lea 0x10(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c101: 89 c7 mov %eax,%edi 10c103: 8b 4d 10 mov 0x10(%ebp),%ecx 10c106: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c108: 8b 4d 10 mov 0x10(%ebp),%ecx 10c10b: 89 4a 0c mov %ecx,0xc(%edx) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 10c10e: 8b 45 1c mov 0x1c(%ebp),%eax 10c111: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c114: 83 c4 0c add $0xc,%esp 10c117: 50 push %eax 10c118: 52 push %edx 10c119: 53 push %ebx 10c11a: e8 b1 4e 00 00 call 110fd0 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c11f: 83 c4 10 add $0x10,%esp 10c122: 31 c0 xor %eax,%eax 10c124: e9 34 ff ff ff jmp 10c05d <_CORE_message_queue_Submit+0x51> 10c129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; 10c12c: b8 02 00 00 00 mov $0x2,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c131: 8d 65 f4 lea -0xc(%ebp),%esp 10c134: 5b pop %ebx 10c135: 5e pop %esi 10c136: 5f pop %edi 10c137: c9 leave 10c138: c3 ret 10c139: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10c13c: 8b 43 48 mov 0x48(%ebx),%eax 10c13f: e9 e9 fe ff ff jmp 10c02d <_CORE_message_queue_Submit+0x21> =============================================================================== 0010c150 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c150: 55 push %ebp 10c151: 89 e5 mov %esp,%ebp 10c153: 57 push %edi 10c154: 56 push %esi 10c155: 53 push %ebx 10c156: 83 ec 0c sub $0xc,%esp 10c159: 8b 45 08 mov 0x8(%ebp),%eax 10c15c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c15f: 8b 55 10 mov 0x10(%ebp),%edx /* 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; 10c162: 8d 78 40 lea 0x40(%eax),%edi 10c165: b9 04 00 00 00 mov $0x4,%ecx 10c16a: 89 de mov %ebx,%esi 10c16c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c16e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c171: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c178: 85 d2 test %edx,%edx 10c17a: 75 30 jne 10c1ac <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c17c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c183: 8b 15 98 6a 12 00 mov 0x126a98,%edx 10c189: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c18c: 8b 4a 08 mov 0x8(%edx),%ecx 10c18f: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c192: 8b 48 48 mov 0x48(%eax),%ecx if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c195: 83 f9 02 cmp $0x2,%ecx 10c198: 74 05 je 10c19f <_CORE_mutex_Initialize+0x4f> 10c19a: 83 f9 03 cmp $0x3,%ecx 10c19d: 75 22 jne 10c1c1 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c19f: 8b 48 4c mov 0x4c(%eax),%ecx 10c1a2: 39 4a 14 cmp %ecx,0x14(%edx) 10c1a5: 72 41 jb 10c1e8 <_CORE_mutex_Initialize+0x98> _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++; 10c1a7: ff 42 1c incl 0x1c(%edx) 10c1aa: eb 15 jmp 10c1c1 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c1ac: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c1b3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c1ba: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c1c1: 6a 05 push $0x5 10c1c3: 68 00 04 00 00 push $0x400 10c1c8: 31 d2 xor %edx,%edx 10c1ca: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c1ce: 0f 95 c2 setne %dl 10c1d1: 52 push %edx 10c1d2: 50 push %eax 10c1d3: e8 44 1c 00 00 call 10de1c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c1d8: 83 c4 10 add $0x10,%esp 10c1db: 31 c0 xor %eax,%eax } 10c1dd: 8d 65 f4 lea -0xc(%ebp),%esp 10c1e0: 5b pop %ebx 10c1e1: 5e pop %esi 10c1e2: 5f pop %edi 10c1e3: c9 leave 10c1e4: c3 ret 10c1e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; 10c1e8: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c1ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c1f0: 5b pop %ebx 10c1f1: 5e pop %esi 10c1f2: 5f pop %edi 10c1f3: c9 leave 10c1f4: c3 ret =============================================================================== 0010c248 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c248: 55 push %ebp 10c249: 89 e5 mov %esp,%ebp 10c24b: 53 push %ebx 10c24c: 83 ec 14 sub $0x14,%esp 10c24f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c252: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c255: a1 d4 64 12 00 mov 0x1264d4,%eax 10c25a: 85 c0 test %eax,%eax 10c25c: 74 04 je 10c262 <_CORE_mutex_Seize+0x1a> 10c25e: 84 d2 test %dl,%dl 10c260: 75 36 jne 10c298 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c262: 83 ec 08 sub $0x8,%esp 10c265: 8d 45 18 lea 0x18(%ebp),%eax 10c268: 50 push %eax 10c269: 53 push %ebx 10c26a: 88 55 f4 mov %dl,-0xc(%ebp) 10c26d: e8 36 4e 00 00 call 1110a8 <_CORE_mutex_Seize_interrupt_trylock> 10c272: 83 c4 10 add $0x10,%esp 10c275: 85 c0 test %eax,%eax 10c277: 8a 55 f4 mov -0xc(%ebp),%dl 10c27a: 74 14 je 10c290 <_CORE_mutex_Seize+0x48> 10c27c: 84 d2 test %dl,%dl 10c27e: 75 30 jne 10c2b0 <_CORE_mutex_Seize+0x68> 10c280: ff 75 18 pushl 0x18(%ebp) 10c283: 9d popf 10c284: a1 98 6a 12 00 mov 0x126a98,%eax 10c289: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c290: 8b 5d fc mov -0x4(%ebp),%ebx 10c293: c9 leave 10c294: c3 ret 10c295: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c298: 83 3d 80 66 12 00 01 cmpl $0x1,0x126680 10c29f: 76 c1 jbe 10c262 <_CORE_mutex_Seize+0x1a> 10c2a1: 53 push %ebx 10c2a2: 6a 12 push $0x12 10c2a4: 6a 00 push $0x0 10c2a6: 6a 00 push $0x0 10c2a8: e8 23 06 00 00 call 10c8d0 <_Internal_error_Occurred> 10c2ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c2b0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c2b7: a1 98 6a 12 00 mov 0x126a98,%eax 10c2bc: 89 58 44 mov %ebx,0x44(%eax) 10c2bf: 8b 55 0c mov 0xc(%ebp),%edx 10c2c2: 89 50 20 mov %edx,0x20(%eax) 10c2c5: a1 d4 64 12 00 mov 0x1264d4,%eax 10c2ca: 40 inc %eax 10c2cb: a3 d4 64 12 00 mov %eax,0x1264d4 10c2d0: ff 75 18 pushl 0x18(%ebp) 10c2d3: 9d popf 10c2d4: 83 ec 08 sub $0x8,%esp 10c2d7: ff 75 14 pushl 0x14(%ebp) 10c2da: 53 push %ebx 10c2db: e8 18 ff ff ff call 10c1f8 <_CORE_mutex_Seize_interrupt_blocking> 10c2e0: 83 c4 10 add $0x10,%esp } 10c2e3: 8b 5d fc mov -0x4(%ebp),%ebx 10c2e6: c9 leave 10c2e7: c3 ret =============================================================================== 001110a8 <_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 ) { 1110a8: 55 push %ebp 1110a9: 89 e5 mov %esp,%ebp 1110ab: 56 push %esi 1110ac: 53 push %ebx 1110ad: 8b 45 08 mov 0x8(%ebp),%eax 1110b0: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 1110b3: 8b 15 98 6a 12 00 mov 0x126a98,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1110b9: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 1110c0: 8b 58 50 mov 0x50(%eax),%ebx 1110c3: 85 db test %ebx,%ebx 1110c5: 74 31 je 1110f8 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 1110c7: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 1110ce: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 1110d1: 8b 5a 08 mov 0x8(%edx),%ebx 1110d4: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 1110d7: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 1110de: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 1110e1: 83 fb 02 cmp $0x2,%ebx 1110e4: 74 26 je 11110c <_CORE_mutex_Seize_interrupt_trylock+0x64> 1110e6: 83 fb 03 cmp $0x3,%ebx 1110e9: 74 3d je 111128 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 1110eb: ff 31 pushl (%ecx) 1110ed: 9d popf return 0; 1110ee: 31 c0 xor %eax,%eax 1110f0: 8d 65 f8 lea -0x8(%ebp),%esp 1110f3: 5b pop %ebx 1110f4: 5e pop %esi 1110f5: c9 leave 1110f6: c3 ret 1110f7: 90 nop <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 1110f8: 3b 50 5c cmp 0x5c(%eax),%edx 1110fb: 74 17 je 111114 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 1110fd: b8 01 00 00 00 mov $0x1,%eax 111102: 8d 65 f8 lea -0x8(%ebp),%esp 111105: 5b pop %ebx 111106: 5e pop %esi 111107: c9 leave 111108: c3 ret 111109: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 11110c: ff 42 1c incl 0x1c(%edx) 11110f: eb da jmp 1110eb <_CORE_mutex_Seize_interrupt_trylock+0x43> 111111: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 111114: 8b 58 40 mov 0x40(%eax),%ebx 111117: 85 db test %ebx,%ebx 111119: 75 45 jne 111160 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11111b: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 11111e: ff 31 pushl (%ecx) 111120: 9d popf return 0; 111121: 31 c0 xor %eax,%eax 111123: eb dd jmp 111102 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 111125: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 111128: 8b 5a 1c mov 0x1c(%edx),%ebx 11112b: 8d 73 01 lea 0x1(%ebx),%esi 11112e: 89 72 1c mov %esi,0x1c(%edx) Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 111131: 8b 72 14 mov 0x14(%edx),%esi 111134: 39 70 4c cmp %esi,0x4c(%eax) 111137: 74 6b je 1111a4 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 111139: 72 39 jb 111174 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 11113b: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 111142: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 111149: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 111150: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 111153: ff 31 pushl (%ecx) 111155: 9d popf return 0; 111156: 31 c0 xor %eax,%eax 111158: 8d 65 f8 lea -0x8(%ebp),%esp 11115b: 5b pop %ebx 11115c: 5e pop %esi 11115d: c9 leave 11115e: c3 ret 11115f: 90 nop <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 111160: 4b dec %ebx 111161: 75 9a jne 1110fd <_CORE_mutex_Seize_interrupt_trylock+0x55> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 111163: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 11116a: ff 31 pushl (%ecx) 11116c: 9d popf return 0; 11116d: 31 c0 xor %eax,%eax 11116f: eb 91 jmp 111102 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 111171: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 111174: 8b 15 d4 64 12 00 mov 0x1264d4,%edx 11117a: 42 inc %edx 11117b: 89 15 d4 64 12 00 mov %edx,0x1264d4 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 111181: ff 31 pushl (%ecx) 111183: 9d popf _Thread_Change_priority( 111184: 52 push %edx 111185: 6a 00 push $0x0 111187: ff 70 4c pushl 0x4c(%eax) 11118a: ff 70 5c pushl 0x5c(%eax) 11118d: e8 12 c0 ff ff call 10d1a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 111192: e8 11 c5 ff ff call 10d6a8 <_Thread_Enable_dispatch> 111197: 83 c4 10 add $0x10,%esp return 0; 11119a: 31 c0 xor %eax,%eax 11119c: e9 61 ff ff ff jmp 111102 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1111a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 1111a4: ff 31 pushl (%ecx) 1111a6: 9d popf return 0; 1111a7: 31 c0 xor %eax,%eax 1111a9: e9 54 ff ff ff jmp 111102 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c2e8 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c2e8: 55 push %ebp 10c2e9: 89 e5 mov %esp,%ebp 10c2eb: 53 push %ebx 10c2ec: 83 ec 04 sub $0x4,%esp 10c2ef: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c2f2: 8b 43 5c mov 0x5c(%ebx),%eax * 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 ) { 10c2f5: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c2f9: 74 15 je 10c310 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c2fb: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 10c301: 74 0d je 10c310 <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c303: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c308: 8b 5d fc mov -0x4(%ebp),%ebx 10c30b: c9 leave 10c30c: c3 ret 10c30d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c310: 8b 53 54 mov 0x54(%ebx),%edx 10c313: 85 d2 test %edx,%edx 10c315: 74 51 je 10c368 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c317: 4a dec %edx 10c318: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c31b: 85 d2 test %edx,%edx 10c31d: 75 49 jne 10c368 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c31f: 8b 53 48 mov 0x48(%ebx),%edx /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c322: 83 fa 02 cmp $0x2,%edx 10c325: 74 69 je 10c390 <_CORE_mutex_Surrender+0xa8> 10c327: 83 fa 03 cmp $0x3,%edx 10c32a: 74 64 je 10c390 <_CORE_mutex_Surrender+0xa8> if ( holder->resource_count == 0 && holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); } } the_mutex->holder = NULL; 10c32c: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c333: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * 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 ) ) ) { 10c33a: 83 ec 0c sub $0xc,%esp 10c33d: 53 push %ebx 10c33e: e8 29 17 00 00 call 10da6c <_Thread_queue_Dequeue> 10c343: 83 c4 10 add $0x10,%esp 10c346: 85 c0 test %eax,%eax 10c348: 74 7a je 10c3c4 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c34a: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c34d: 8b 50 08 mov 0x8(%eax),%edx 10c350: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c353: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c35a: 8b 53 48 mov 0x48(%ebx),%edx 10c35d: 83 fa 02 cmp $0x2,%edx 10c360: 74 56 je 10c3b8 <_CORE_mutex_Surrender+0xd0> 10c362: 83 fa 03 cmp $0x3,%edx 10c365: 74 09 je 10c370 <_CORE_mutex_Surrender+0x88> 10c367: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c368: 31 c0 xor %eax,%eax } 10c36a: 8b 5d fc mov -0x4(%ebp),%ebx 10c36d: c9 leave 10c36e: c3 ret 10c36f: 90 nop <== NOT EXECUTED _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c370: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c373: 8b 53 4c mov 0x4c(%ebx),%edx 10c376: 3b 50 14 cmp 0x14(%eax),%edx 10c379: 73 ed jae 10c368 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c37b: 51 push %ecx 10c37c: 6a 00 push $0x0 10c37e: 52 push %edx 10c37f: 50 push %eax 10c380: e8 1f 0e 00 00 call 10d1a4 <_Thread_Change_priority> 10c385: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c388: 31 c0 xor %eax,%eax 10c38a: e9 79 ff ff ff jmp 10c308 <_CORE_mutex_Surrender+0x20> 10c38f: 90 nop <== NOT EXECUTED _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c390: 8b 50 1c mov 0x1c(%eax),%edx 10c393: 4a dec %edx 10c394: 89 50 1c mov %edx,0x1c(%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 ( holder->resource_count == 0 && 10c397: 85 d2 test %edx,%edx 10c399: 75 91 jne 10c32c <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c39b: 8b 50 18 mov 0x18(%eax),%edx /* * 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 ( holder->resource_count == 0 && 10c39e: 3b 50 14 cmp 0x14(%eax),%edx 10c3a1: 74 89 je 10c32c <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c3a3: 51 push %ecx 10c3a4: 6a 01 push $0x1 10c3a6: 52 push %edx 10c3a7: 50 push %eax 10c3a8: e8 f7 0d 00 00 call 10d1a4 <_Thread_Change_priority> 10c3ad: 83 c4 10 add $0x10,%esp 10c3b0: e9 77 ff ff ff jmp 10c32c <_CORE_mutex_Surrender+0x44> 10c3b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c3b8: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c3bb: 31 c0 xor %eax,%eax case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; 10c3bd: e9 46 ff ff ff jmp 10c308 <_CORE_mutex_Surrender+0x20> 10c3c2: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c3c4: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c3cb: 31 c0 xor %eax,%eax 10c3cd: e9 36 ff ff ff jmp 10c308 <_CORE_mutex_Surrender+0x20> =============================================================================== 00115198 <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 115198: 55 push %ebp 115199: 89 e5 mov %esp,%ebp 11519b: 57 push %edi 11519c: 56 push %esi 11519d: 53 push %ebx 11519e: 83 ec 1c sub $0x1c,%esp 1151a1: 8b 45 08 mov 0x8(%ebp),%eax 1151a4: 8b 7d 0c mov 0xc(%ebp),%edi 1151a7: 8b 75 14 mov 0x14(%ebp),%esi 1151aa: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 1151ad: 8b 15 78 d7 12 00 mov 0x12d778,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 1151b3: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 1151ba: 9c pushf 1151bb: fa cli 1151bc: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 1151bf: 8b 48 48 mov 0x48(%eax),%ecx 1151c2: 85 c9 test %ecx,%ecx 1151c4: 75 46 jne 11520c <_CORE_semaphore_Seize+0x74> /* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { 1151c6: 84 db test %bl,%bl 1151c8: 75 16 jne 1151e0 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 1151ca: ff 75 e4 pushl -0x1c(%ebp) 1151cd: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 1151ce: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 1151d5: 83 c4 1c add $0x1c,%esp 1151d8: 5b pop %ebx 1151d9: 5e pop %esi 1151da: 5f pop %edi 1151db: c9 leave 1151dc: c3 ret 1151dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1151e0: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 1151e7: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1151ea: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 1151ed: ff 75 e4 pushl -0x1c(%ebp) 1151f0: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 1151f1: c7 45 10 f4 18 11 00 movl $0x1118f4,0x10(%ebp) 1151f8: 89 75 0c mov %esi,0xc(%ebp) 1151fb: 89 45 08 mov %eax,0x8(%ebp) } 1151fe: 83 c4 1c add $0x1c,%esp 115201: 5b pop %ebx 115202: 5e pop %esi 115203: 5f pop %edi 115204: c9 leave */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 115205: e9 9a c3 ff ff jmp 1115a4 <_Thread_queue_Enqueue_with_handler> 11520a: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 11520c: 49 dec %ecx 11520d: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 115210: ff 75 e4 pushl -0x1c(%ebp) 115213: 9d popf _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 115214: 83 c4 1c add $0x1c,%esp 115217: 5b pop %ebx 115218: 5e pop %esi 115219: 5f pop %edi 11521a: c9 leave 11521b: c3 ret =============================================================================== 0010c420 <_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 ) { 10c420: 55 push %ebp 10c421: 89 e5 mov %esp,%ebp 10c423: 53 push %ebx 10c424: 83 ec 10 sub $0x10,%esp 10c427: 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)) ) { 10c42a: 53 push %ebx 10c42b: e8 3c 16 00 00 call 10da6c <_Thread_queue_Dequeue> 10c430: 83 c4 10 add $0x10,%esp 10c433: 85 c0 test %eax,%eax 10c435: 74 09 je 10c440 <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c437: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c439: 8b 5d fc mov -0x4(%ebp),%ebx 10c43c: c9 leave 10c43d: c3 ret 10c43e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c440: 9c pushf 10c441: fa cli 10c442: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c443: 8b 43 48 mov 0x48(%ebx),%eax 10c446: 3b 43 40 cmp 0x40(%ebx),%eax 10c449: 72 0d jb 10c458 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c44b: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c450: 52 push %edx 10c451: 9d popf } return status; } 10c452: 8b 5d fc mov -0x4(%ebp),%ebx 10c455: c9 leave 10c456: c3 ret 10c457: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c458: 40 inc %eax 10c459: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c45c: 31 c0 xor %eax,%eax 10c45e: eb f0 jmp 10c450 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010cdc4 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10cdc4: 55 push %ebp 10cdc5: 89 e5 mov %esp,%ebp 10cdc7: 53 push %ebx 10cdc8: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10cdcb: 9c pushf 10cdcc: fa cli 10cdcd: 59 pop %ecx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cdce: 8b 50 04 mov 0x4(%eax),%edx 10cdd1: 85 d2 test %edx,%edx 10cdd3: 75 0b jne 10cde0 <_CORE_spinlock_Release+0x1c> _ISR_Enable( level ); 10cdd5: 51 push %ecx 10cdd6: 9d popf return CORE_SPINLOCK_NOT_LOCKED; 10cdd7: b8 06 00 00 00 mov $0x6,%eax the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 10cddc: 5b pop %ebx 10cddd: c9 leave 10cdde: c3 ret 10cddf: 90 nop <== NOT EXECUTED } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10cde0: 8b 58 0c mov 0xc(%eax),%ebx 10cde3: 8b 15 18 8b 12 00 mov 0x128b18,%edx 10cde9: 3b 5a 08 cmp 0x8(%edx),%ebx 10cdec: 74 0a je 10cdf8 <_CORE_spinlock_Release+0x34> _ISR_Enable( level ); 10cdee: 51 push %ecx 10cdef: 9d popf return CORE_SPINLOCK_NOT_HOLDER; 10cdf0: b8 02 00 00 00 mov $0x2,%eax the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 10cdf5: 5b pop %ebx 10cdf6: c9 leave 10cdf7: c3 ret } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10cdf8: 8b 50 08 mov 0x8(%eax),%edx 10cdfb: 4a dec %edx 10cdfc: 89 50 08 mov %edx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10cdff: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10ce06: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10ce0d: 51 push %ecx 10ce0e: 9d popf return CORE_SPINLOCK_SUCCESSFUL; 10ce0f: 31 c0 xor %eax,%eax 10ce11: eb c9 jmp 10cddc <_CORE_spinlock_Release+0x18> =============================================================================== 0010ce14 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10ce14: 55 push %ebp 10ce15: 89 e5 mov %esp,%ebp 10ce17: 56 push %esi 10ce18: 53 push %ebx 10ce19: 83 ec 10 sub $0x10,%esp 10ce1c: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce1f: 8a 45 0c mov 0xc(%ebp),%al 10ce22: 88 45 f7 mov %al,-0x9(%ebp) ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 10ce25: 9c pushf 10ce26: fa cli 10ce27: 5a pop %edx 10ce28: 89 d0 mov %edx,%eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10ce2a: 8b 4b 04 mov 0x4(%ebx),%ecx 10ce2d: 49 dec %ecx 10ce2e: 74 64 je 10ce94 <_CORE_spinlock_Wait+0x80> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10ce30: 8b 4b 08 mov 0x8(%ebx),%ecx 10ce33: 41 inc %ecx 10ce34: 89 4b 08 mov %ecx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ce37: 8b 4b 04 mov 0x4(%ebx),%ecx 10ce3a: 85 c9 test %ecx,%ecx 10ce3c: 74 22 je 10ce60 <_CORE_spinlock_Wait+0x4c> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10ce3e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 10ce42: 74 3a je 10ce7e <_CORE_spinlock_Wait+0x6a> * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10ce44: 50 push %eax 10ce45: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10ce46: e8 a9 12 00 00 call 10e0f4 <_Thread_Enable_dispatch> 10ce4b: a1 54 85 12 00 mov 0x128554,%eax 10ce50: 40 inc %eax 10ce51: a3 54 85 12 00 mov %eax,0x128554 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10ce56: 9c pushf 10ce57: fa cli 10ce58: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ce59: 8b 53 04 mov 0x4(%ebx),%edx 10ce5c: 85 d2 test %edx,%edx 10ce5e: 75 e4 jne 10ce44 <_CORE_spinlock_Wait+0x30> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10ce60: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10ce67: 8b 15 18 8b 12 00 mov 0x128b18,%edx 10ce6d: 8b 52 08 mov 0x8(%edx),%edx 10ce70: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10ce73: 50 push %eax 10ce74: 9d popf return CORE_SPINLOCK_SUCCESSFUL; 10ce75: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10ce77: 83 c4 10 add $0x10,%esp 10ce7a: 5b pop %ebx 10ce7b: 5e pop %esi 10ce7c: c9 leave 10ce7d: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10ce7e: 8b 43 08 mov 0x8(%ebx),%eax 10ce81: 48 dec %eax 10ce82: 89 43 08 mov %eax,0x8(%ebx) _ISR_Enable( level ); 10ce85: 52 push %edx 10ce86: 9d popf return CORE_SPINLOCK_UNAVAILABLE; 10ce87: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10ce8c: 83 c4 10 add $0x10,%esp 10ce8f: 5b pop %ebx 10ce90: 5e pop %esi 10ce91: c9 leave 10ce92: c3 ret 10ce93: 90 nop <== NOT EXECUTED Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { 10ce94: 8b 73 0c mov 0xc(%ebx),%esi 10ce97: 8b 0d 18 8b 12 00 mov 0x128b18,%ecx #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10ce9d: 3b 71 08 cmp 0x8(%ecx),%esi 10cea0: 75 8e jne 10ce30 <_CORE_spinlock_Wait+0x1c> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 10cea2: 52 push %edx 10cea3: 9d popf return CORE_SPINLOCK_HOLDER_RELOCKING; 10cea4: b8 01 00 00 00 mov $0x1,%eax 10cea9: eb cc jmp 10ce77 <_CORE_spinlock_Wait+0x63> =============================================================================== 0010bfe8 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10bfe8: 55 push %ebp 10bfe9: 89 e5 mov %esp,%ebp 10bfeb: 53 push %ebx 10bfec: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10bfef: 9c pushf 10bff0: fa cli 10bff1: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10bff2: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bff4: 8d 4a 04 lea 0x4(%edx),%ecx if ( !_Chain_Is_empty( the_chain ) ) 10bff7: 39 c8 cmp %ecx,%eax 10bff9: 74 0d je 10c008 <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10bffb: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10bffd: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10bfff: 89 51 04 mov %edx,0x4(%ecx) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10c002: 53 push %ebx 10c003: 9d popf return return_node; } 10c004: 5b pop %ebx 10c005: c9 leave 10c006: c3 ret 10c007: 90 nop <== NOT EXECUTED ) { ISR_Level level; Chain_Node *return_node; return_node = NULL; 10c008: 31 c0 xor %eax,%eax 10c00a: eb f6 jmp 10c002 <_Chain_Get+0x1a> =============================================================================== 0010c550 <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { 10c550: 55 push %ebp 10c551: 89 e5 mov %esp,%ebp 10c553: 57 push %edi 10c554: 56 push %esi 10c555: 53 push %ebx 10c556: 8b 45 08 mov 0x8(%ebp),%eax 10c559: 8b 7d 0c mov 0xc(%ebp),%edi ISR_Level level; bool is_empty_now; _ISR_Disable( level ); 10c55c: 9c pushf 10c55d: fa cli 10c55e: 5e pop %esi Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; Chain_Node *first = the_chain->first; 10c55f: 8b 10 mov (%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c561: 8d 58 04 lea 0x4(%eax),%ebx ) { bool is_empty_now = true; Chain_Node *first = the_chain->first; if ( first != _Chain_Tail( the_chain ) ) { 10c564: 39 da cmp %ebx,%edx 10c566: 74 18 je 10c580 <_Chain_Get_with_empty_check+0x30><== NEVER TAKEN Chain_Node *new_first = first->next; 10c568: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 10c56a: 89 08 mov %ecx,(%eax) new_first->previous = _Chain_Head( the_chain ); 10c56c: 89 41 04 mov %eax,0x4(%ecx) *the_node = first; 10c56f: 89 17 mov %edx,(%edi) is_empty_now = new_first == _Chain_Tail( the_chain ); 10c571: 39 cb cmp %ecx,%ebx 10c573: 0f 94 c0 sete %al is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); 10c576: 56 push %esi 10c577: 9d popf return is_empty_now; } 10c578: 5b pop %ebx 10c579: 5e pop %esi 10c57a: 5f pop %edi 10c57b: c9 leave 10c57c: c3 ret 10c57d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else *the_node = NULL; 10c580: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected( Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; 10c586: b0 01 mov $0x1,%al <== NOT EXECUTED 10c588: eb ec jmp 10c576 <_Chain_Get_with_empty_check+0x26><== NOT EXECUTED =============================================================================== 00110f80 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110f80: 55 push %ebp 110f81: 89 e5 mov %esp,%ebp 110f83: 57 push %edi 110f84: 56 push %esi 110f85: 53 push %ebx 110f86: 83 ec 04 sub $0x4,%esp 110f89: 8b 7d 08 mov 0x8(%ebp),%edi 110f8c: 8b 4d 10 mov 0x10(%ebp),%ecx 110f8f: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110f92: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 110f94: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 110f9b: 85 c9 test %ecx,%ecx 110f9d: 74 23 je 110fc2 <_Chain_Initialize+0x42><== NEVER TAKEN 110f9f: 49 dec %ecx 110fa0: 89 4d f0 mov %ecx,-0x10(%ebp) Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 110fa3: 8b 45 0c mov 0xc(%ebp),%eax 110fa6: eb 05 jmp 110fad <_Chain_Initialize+0x2d> while ( count-- ) { 110fa8: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 110faa: 89 d8 mov %ebx,%eax 110fac: 49 dec %ecx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 110fad: 89 02 mov %eax,(%edx) next->previous = current; 110faf: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110fb2: 8d 1c 30 lea (%eax,%esi,1),%ebx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 110fb5: 85 c9 test %ecx,%ecx 110fb7: 75 ef jne 110fa8 <_Chain_Initialize+0x28> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110fb9: 8b 55 f0 mov -0x10(%ebp),%edx 110fbc: 0f af d6 imul %esi,%edx 110fbf: 03 55 0c add 0xc(%ebp),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110fc2: 8d 47 04 lea 0x4(%edi),%eax 110fc5: 89 02 mov %eax,(%edx) current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 110fc7: 89 57 08 mov %edx,0x8(%edi) } 110fca: 58 pop %eax 110fcb: 5b pop %ebx 110fcc: 5e pop %esi 110fcd: 5f pop %edi 110fce: c9 leave 110fcf: c3 ret =============================================================================== 0010b050 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b050: 55 push %ebp 10b051: 89 e5 mov %esp,%ebp 10b053: 57 push %edi 10b054: 56 push %esi 10b055: 53 push %ebx 10b056: 83 ec 2c sub $0x2c,%esp 10b059: 8b 45 08 mov 0x8(%ebp),%eax 10b05c: 8b 4d 0c mov 0xc(%ebp),%ecx 10b05f: 8b 55 10 mov 0x10(%ebp),%edx 10b062: 89 55 dc mov %edx,-0x24(%ebp) 10b065: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10b068: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b06e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b075: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi _ISR_Disable( level ); 10b07b: 9c pushf 10b07c: fa cli 10b07d: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b080: 8b 16 mov (%esi),%edx 10b082: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b085: 21 c2 and %eax,%edx 10b087: 89 55 e4 mov %edx,-0x1c(%ebp) 10b08a: 74 0d je 10b099 <_Event_Seize+0x49> 10b08c: 39 d0 cmp %edx,%eax 10b08e: 0f 84 84 00 00 00 je 10b118 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b094: f6 c1 02 test $0x2,%cl 10b097: 75 7f jne 10b118 <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b099: f6 c1 01 test $0x1,%cl 10b09c: 75 62 jne 10b100 <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10b09e: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b0a1: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b0a4: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b0a7: c7 05 88 6e 12 00 01 movl $0x1,0x126e88 10b0ae: 00 00 00 _ISR_Enable( level ); 10b0b1: ff 75 e0 pushl -0x20(%ebp) 10b0b4: 9d popf if ( ticks ) { 10b0b5: 8b 45 dc mov -0x24(%ebp),%eax 10b0b8: 85 c0 test %eax,%eax 10b0ba: 0f 85 80 00 00 00 jne 10b140 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b0c0: 83 ec 08 sub $0x8,%esp 10b0c3: 68 00 01 00 00 push $0x100 10b0c8: 53 push %ebx 10b0c9: e8 b6 2e 00 00 call 10df84 <_Thread_Set_state> _ISR_Disable( level ); 10b0ce: 9c pushf 10b0cf: fa cli 10b0d0: 5a pop %edx sync_state = _Event_Sync_state; 10b0d1: a1 88 6e 12 00 mov 0x126e88,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b0d6: c7 05 88 6e 12 00 00 movl $0x0,0x126e88 10b0dd: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b0e0: 83 c4 10 add $0x10,%esp 10b0e3: 83 f8 01 cmp $0x1,%eax 10b0e6: 74 4c je 10b134 <_Event_Seize+0xe4> * 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 ); 10b0e8: 89 55 10 mov %edx,0x10(%ebp) 10b0eb: 89 5d 0c mov %ebx,0xc(%ebp) 10b0ee: 89 45 08 mov %eax,0x8(%ebp) } 10b0f1: 8d 65 f4 lea -0xc(%ebp),%esp 10b0f4: 5b pop %ebx 10b0f5: 5e pop %esi 10b0f6: 5f pop %edi 10b0f7: 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 ); 10b0f8: e9 5b 20 00 00 jmp 10d158 <_Thread_blocking_operation_Cancel> 10b0fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b100: ff 75 e0 pushl -0x20(%ebp) 10b103: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b104: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b10b: 8b 55 e4 mov -0x1c(%ebp),%edx 10b10e: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b110: 8d 65 f4 lea -0xc(%ebp),%esp 10b113: 5b pop %ebx 10b114: 5e pop %esi 10b115: 5f pop %edi 10b116: c9 leave 10b117: c3 ret RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 10b118: 8b 45 e4 mov -0x1c(%ebp),%eax 10b11b: f7 d0 not %eax 10b11d: 23 45 d4 and -0x2c(%ebp),%eax 10b120: 89 06 mov %eax,(%esi) if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b122: ff 75 e0 pushl -0x20(%ebp) 10b125: 9d popf *event_out = seized_events; 10b126: 8b 45 e4 mov -0x1c(%ebp),%eax 10b129: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b12b: 8d 65 f4 lea -0xc(%ebp),%esp 10b12e: 5b pop %ebx 10b12f: 5e pop %esi 10b130: 5f pop %edi 10b131: c9 leave 10b132: c3 ret 10b133: 90 nop <== NOT EXECUTED _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b134: 52 push %edx 10b135: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b136: 8d 65 f4 lea -0xc(%ebp),%esp 10b139: 5b pop %ebx 10b13a: 5e pop %esi 10b13b: 5f pop %edi 10b13c: c9 leave 10b13d: c3 ret 10b13e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b140: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b143: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b14a: c7 43 64 f4 b2 10 00 movl $0x10b2f4,0x64(%ebx) the_watchdog->id = id; 10b151: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b154: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b15b: 8b 45 dc mov -0x24(%ebp),%eax 10b15e: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b161: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b164: 8d 43 48 lea 0x48(%ebx),%eax 10b167: 50 push %eax 10b168: 68 a4 65 12 00 push $0x1265a4 10b16d: e8 b2 34 00 00 call 10e624 <_Watchdog_Insert> 10b172: 83 c4 10 add $0x10,%esp 10b175: e9 46 ff ff ff jmp 10b0c0 <_Event_Seize+0x70> =============================================================================== 0010b1d0 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b1d0: 55 push %ebp 10b1d1: 89 e5 mov %esp,%ebp 10b1d3: 57 push %edi 10b1d4: 56 push %esi 10b1d5: 53 push %ebx 10b1d6: 83 ec 2c sub $0x2c,%esp 10b1d9: 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 ]; 10b1dc: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b1e2: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b1e5: 9c pushf 10b1e6: fa cli 10b1e7: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b1ea: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b1ec: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b1ef: 89 c6 mov %eax,%esi 10b1f1: 21 d6 and %edx,%esi 10b1f3: 89 75 e4 mov %esi,-0x1c(%ebp) 10b1f6: 74 74 je 10b26c <_Event_Surrender+0x9c> /* * 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() && 10b1f8: 8b 35 94 6a 12 00 mov 0x126a94,%esi 10b1fe: 85 f6 test %esi,%esi 10b200: 74 0c je 10b20e <_Event_Surrender+0x3e> 10b202: 3b 1d 98 6a 12 00 cmp 0x126a98,%ebx 10b208: 0f 84 96 00 00 00 je 10b2a4 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b20e: f6 43 11 01 testb $0x1,0x11(%ebx) 10b212: 74 4c je 10b260 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b214: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b217: 74 05 je 10b21e <_Event_Surrender+0x4e> 10b219: 83 e7 02 and $0x2,%edi 10b21c: 74 42 je 10b260 <_Event_Surrender+0x90> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 10b21e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b221: f7 d0 not %eax 10b223: 21 d0 and %edx,%eax 10b225: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10b227: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b22e: 8b 43 28 mov 0x28(%ebx),%eax 10b231: 8b 75 e4 mov -0x1c(%ebp),%esi 10b234: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b236: ff 75 d4 pushl -0x2c(%ebp) 10b239: 9d popf 10b23a: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b23b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b23f: 74 37 je 10b278 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b241: ff 75 d4 pushl -0x2c(%ebp) 10b244: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b245: 83 ec 08 sub $0x8,%esp 10b248: 68 f8 ff 03 10 push $0x1003fff8 10b24d: 53 push %ebx 10b24e: e8 91 20 00 00 call 10d2e4 <_Thread_Clear_state> 10b253: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b256: 8d 65 f4 lea -0xc(%ebp),%esp 10b259: 5b pop %ebx 10b25a: 5e pop %esi 10b25b: 5f pop %edi 10b25c: c9 leave 10b25d: c3 ret 10b25e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b260: ff 75 d4 pushl -0x2c(%ebp) 10b263: 9d popf } 10b264: 8d 65 f4 lea -0xc(%ebp),%esp 10b267: 5b pop %ebx 10b268: 5e pop %esi 10b269: 5f pop %edi 10b26a: c9 leave 10b26b: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b26c: ff 75 d4 pushl -0x2c(%ebp) 10b26f: 9d popf } return; } } _ISR_Enable( level ); } 10b270: 8d 65 f4 lea -0xc(%ebp),%esp 10b273: 5b pop %ebx 10b274: 5e pop %esi 10b275: 5f pop %edi 10b276: c9 leave 10b277: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b278: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b27f: ff 75 d4 pushl -0x2c(%ebp) 10b282: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b283: 83 ec 0c sub $0xc,%esp 10b286: 8d 43 48 lea 0x48(%ebx),%eax 10b289: 50 push %eax 10b28a: e8 cd 34 00 00 call 10e75c <_Watchdog_Remove> 10b28f: 58 pop %eax 10b290: 5a pop %edx 10b291: 68 f8 ff 03 10 push $0x1003fff8 10b296: 53 push %ebx 10b297: e8 48 20 00 00 call 10d2e4 <_Thread_Clear_state> 10b29c: 83 c4 10 add $0x10,%esp 10b29f: eb c3 jmp 10b264 <_Event_Surrender+0x94> 10b2a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b2a4: 8b 35 88 6e 12 00 mov 0x126e88,%esi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 10b2aa: 83 fe 02 cmp $0x2,%esi 10b2ad: 74 0d je 10b2bc <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b2af: 8b 35 88 6e 12 00 mov 0x126e88,%esi * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b2b5: 4e dec %esi 10b2b6: 0f 85 52 ff ff ff jne 10b20e <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b2bc: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b2bf: 74 05 je 10b2c6 <_Event_Surrender+0xf6> 10b2c1: 83 e7 02 and $0x2,%edi 10b2c4: 74 22 je 10b2e8 <_Event_Surrender+0x118><== NEVER TAKEN 10b2c6: 8b 45 e4 mov -0x1c(%ebp),%eax 10b2c9: f7 d0 not %eax 10b2cb: 21 d0 and %edx,%eax 10b2cd: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b2cf: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b2d6: 8b 43 28 mov 0x28(%ebx),%eax 10b2d9: 8b 55 e4 mov -0x1c(%ebp),%edx 10b2dc: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b2de: c7 05 88 6e 12 00 03 movl $0x3,0x126e88 10b2e5: 00 00 00 } _ISR_Enable( level ); 10b2e8: ff 75 d4 pushl -0x2c(%ebp) 10b2eb: 9d popf return; 10b2ec: e9 73 ff ff ff jmp 10b264 <_Event_Surrender+0x94> =============================================================================== 0010b2f4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b2f4: 55 push %ebp 10b2f5: 89 e5 mov %esp,%ebp 10b2f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b2fa: 8d 45 f4 lea -0xc(%ebp),%eax 10b2fd: 50 push %eax 10b2fe: ff 75 08 pushl 0x8(%ebp) 10b301: e8 c6 23 00 00 call 10d6cc <_Thread_Get> switch ( location ) { 10b306: 83 c4 10 add $0x10,%esp 10b309: 8b 55 f4 mov -0xc(%ebp),%edx 10b30c: 85 d2 test %edx,%edx 10b30e: 75 37 jne 10b347 <_Event_Timeout+0x53> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10b310: 9c pushf 10b311: fa cli 10b312: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b313: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b31a: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 10b320: 74 2a je 10b34c <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b322: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b329: 52 push %edx 10b32a: 9d popf 10b32b: 83 ec 08 sub $0x8,%esp 10b32e: 68 f8 ff 03 10 push $0x1003fff8 10b333: 50 push %eax 10b334: e8 ab 1f 00 00 call 10d2e4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b339: a1 d4 64 12 00 mov 0x1264d4,%eax 10b33e: 48 dec %eax 10b33f: a3 d4 64 12 00 mov %eax,0x1264d4 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b344: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b347: c9 leave 10b348: c3 ret 10b349: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b34c: 8b 0d 88 6e 12 00 mov 0x126e88,%ecx 10b352: 49 dec %ecx 10b353: 75 cd jne 10b322 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b355: c7 05 88 6e 12 00 02 movl $0x2,0x126e88 10b35c: 00 00 00 10b35f: eb c1 jmp 10b322 <_Event_Timeout+0x2e> =============================================================================== 0011120c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 11120c: 55 push %ebp 11120d: 89 e5 mov %esp,%ebp 11120f: 57 push %edi 111210: 56 push %esi 111211: 53 push %ebx 111212: 83 ec 2c sub $0x2c,%esp 111215: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 111218: 8d 47 04 lea 0x4(%edi),%eax 11121b: 89 45 dc mov %eax,-0x24(%ebp) - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 11121e: 8b 55 08 mov 0x8(%ebp),%edx 111221: 8b 52 10 mov 0x10(%edx),%edx 111224: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 111227: 39 c7 cmp %eax,%edi 111229: 0f 87 69 01 00 00 ja 111398 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11122f: 8b 5d 14 mov 0x14(%ebp),%ebx 111232: 85 db test %ebx,%ebx 111234: 0f 85 56 01 00 00 jne 111390 <_Heap_Allocate_aligned_with_boundary+0x184> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 11123a: 8b 45 08 mov 0x8(%ebp),%eax 11123d: 8b 48 08 mov 0x8(%eax),%ecx do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 111240: 39 c8 cmp %ecx,%eax 111242: 0f 84 50 01 00 00 je 111398 <_Heap_Allocate_aligned_with_boundary+0x18c> 111248: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 11124f: 8b 55 cc mov -0x34(%ebp),%edx 111252: 83 c2 07 add $0x7,%edx 111255: 89 55 c8 mov %edx,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 111258: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 11125f: 29 7d d0 sub %edi,-0x30(%ebp) 111262: eb 1e jmp 111282 <_Heap_Allocate_aligned_with_boundary+0x76> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 111264: 8d 59 08 lea 0x8(%ecx),%ebx } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 111267: 85 db test %ebx,%ebx 111269: 0f 85 f1 00 00 00 jne 111360 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN break; } block = block->next; 11126f: 8b 49 08 mov 0x8(%ecx),%ecx 111272: 8b 45 e4 mov -0x1c(%ebp),%eax 111275: 40 inc %eax do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 111276: 39 4d 08 cmp %ecx,0x8(%ebp) 111279: 0f 84 25 01 00 00 je 1113a4 <_Heap_Allocate_aligned_with_boundary+0x198> 11127f: 89 45 e4 mov %eax,-0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 111282: 8b 59 04 mov 0x4(%ecx),%ebx 111285: 39 5d dc cmp %ebx,-0x24(%ebp) 111288: 73 e5 jae 11126f <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 11128a: 8b 55 10 mov 0x10(%ebp),%edx 11128d: 85 d2 test %edx,%edx 11128f: 74 d3 je 111264 <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 111291: 8b 45 08 mov 0x8(%ebp),%eax 111294: 8b 40 14 mov 0x14(%eax),%eax 111297: 89 45 d8 mov %eax,-0x28(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11129a: 83 e3 fe and $0xfffffffe,%ebx uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 11129d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1112a0: 8d 51 08 lea 0x8(%ecx),%edx 1112a3: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 1112a6: 8b 75 c8 mov -0x38(%ebp),%esi 1112a9: 29 c6 sub %eax,%esi uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 1112ab: 01 de add %ebx,%esi + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 1112ad: 03 5d d0 add -0x30(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1112b0: 89 d8 mov %ebx,%eax 1112b2: 31 d2 xor %edx,%edx 1112b4: f7 75 10 divl 0x10(%ebp) 1112b7: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 1112b9: 39 de cmp %ebx,%esi 1112bb: 73 0b jae 1112c8 <_Heap_Allocate_aligned_with_boundary+0xbc> 1112bd: 89 f0 mov %esi,%eax 1112bf: 31 d2 xor %edx,%edx 1112c1: f7 75 10 divl 0x10(%ebp) 1112c4: 89 f3 mov %esi,%ebx 1112c6: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 1112c8: 8b 45 14 mov 0x14(%ebp),%eax 1112cb: 85 c0 test %eax,%eax 1112cd: 74 5b je 11132a <_Heap_Allocate_aligned_with_boundary+0x11e> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 1112cf: 8d 34 3b lea (%ebx,%edi,1),%esi 1112d2: 89 f0 mov %esi,%eax 1112d4: 31 d2 xor %edx,%edx 1112d6: f7 75 14 divl 0x14(%ebp) 1112d9: 89 f0 mov %esi,%eax 1112db: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 1112dd: 39 c3 cmp %eax,%ebx 1112df: 73 49 jae 11132a <_Heap_Allocate_aligned_with_boundary+0x11e> 1112e1: 39 c6 cmp %eax,%esi 1112e3: 76 45 jbe 11132a <_Heap_Allocate_aligned_with_boundary+0x11e> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 1112e5: 8b 55 d4 mov -0x2c(%ebp),%edx 1112e8: 01 fa add %edi,%edx 1112ea: 89 55 e0 mov %edx,-0x20(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 1112ed: 39 c2 cmp %eax,%edx 1112ef: 0f 87 7a ff ff ff ja 11126f <_Heap_Allocate_aligned_with_boundary+0x63> 1112f5: 89 ce mov %ecx,%esi 1112f7: eb 10 jmp 111309 <_Heap_Allocate_aligned_with_boundary+0xfd> 1112f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 1112fc: 39 c1 cmp %eax,%ecx 1112fe: 76 28 jbe 111328 <_Heap_Allocate_aligned_with_boundary+0x11c> if ( boundary_line < boundary_floor ) { 111300: 39 45 e0 cmp %eax,-0x20(%ebp) 111303: 0f 87 9f 00 00 00 ja 1113a8 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 111309: 89 c3 mov %eax,%ebx 11130b: 29 fb sub %edi,%ebx 11130d: 89 d8 mov %ebx,%eax 11130f: 31 d2 xor %edx,%edx 111311: f7 75 10 divl 0x10(%ebp) 111314: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 111316: 8d 0c 3b lea (%ebx,%edi,1),%ecx 111319: 89 c8 mov %ecx,%eax 11131b: 31 d2 xor %edx,%edx 11131d: f7 75 14 divl 0x14(%ebp) 111320: 89 c8 mov %ecx,%eax 111322: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 111324: 39 c3 cmp %eax,%ebx 111326: 72 d4 jb 1112fc <_Heap_Allocate_aligned_with_boundary+0xf0> 111328: 89 f1 mov %esi,%ecx boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 11132a: 39 5d d4 cmp %ebx,-0x2c(%ebp) 11132d: 0f 87 3c ff ff ff ja 11126f <_Heap_Allocate_aligned_with_boundary+0x63> 111333: be f8 ff ff ff mov $0xfffffff8,%esi 111338: 29 ce sub %ecx,%esi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11133a: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11133c: 89 d8 mov %ebx,%eax 11133e: 31 d2 xor %edx,%edx 111340: f7 75 cc divl -0x34(%ebp) uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 111343: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 111345: 39 75 d8 cmp %esi,-0x28(%ebp) 111348: 0f 86 19 ff ff ff jbe 111267 <_Heap_Allocate_aligned_with_boundary+0x5b> 11134e: 85 f6 test %esi,%esi 111350: 0f 85 19 ff ff ff jne 11126f <_Heap_Allocate_aligned_with_boundary+0x63> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 111356: 85 db test %ebx,%ebx 111358: 0f 84 11 ff ff ff je 11126f <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 11135e: 66 90 xchg %ax,%ax search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 111360: 8b 45 08 mov 0x8(%ebp),%eax 111363: ff 40 48 incl 0x48(%eax) stats->searches += search_count; 111366: 8b 55 e4 mov -0x1c(%ebp),%edx 111369: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 11136c: 57 push %edi 11136d: 53 push %ebx 11136e: 51 push %ecx 11136f: 50 push %eax 111370: e8 67 b4 ff ff call 10c7dc <_Heap_Block_allocate> 111375: 89 d8 mov %ebx,%eax 111377: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 11137a: 8b 55 e4 mov -0x1c(%ebp),%edx 11137d: 8b 4d 08 mov 0x8(%ebp),%ecx 111380: 39 51 44 cmp %edx,0x44(%ecx) 111383: 73 15 jae 11139a <_Heap_Allocate_aligned_with_boundary+0x18e> stats->max_search = search_count; 111385: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 111388: 8d 65 f4 lea -0xc(%ebp),%esp 11138b: 5b pop %ebx 11138c: 5e pop %esi 11138d: 5f pop %edi 11138e: c9 leave 11138f: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 111390: 3b 7d 14 cmp 0x14(%ebp),%edi 111393: 76 1a jbe 1113af <_Heap_Allocate_aligned_with_boundary+0x1a3> 111395: 8d 76 00 lea 0x0(%esi),%esi do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 111398: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 11139a: 8d 65 f4 lea -0xc(%ebp),%esp 11139d: 5b pop %ebx 11139e: 5e pop %esi 11139f: 5f pop %edi 1113a0: c9 leave 1113a1: c3 ret 1113a2: 66 90 xchg %ax,%ax <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1113a4: 31 c0 xor %eax,%eax 1113a6: eb d2 jmp 11137a <_Heap_Allocate_aligned_with_boundary+0x16e> 1113a8: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1113aa: e9 c0 fe ff ff jmp 11126f <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 1113af: 8b 4d 10 mov 0x10(%ebp),%ecx 1113b2: 85 c9 test %ecx,%ecx 1113b4: 0f 85 80 fe ff ff jne 11123a <_Heap_Allocate_aligned_with_boundary+0x2e> alignment = page_size; 1113ba: 89 55 10 mov %edx,0x10(%ebp) 1113bd: e9 78 fe ff ff jmp 11123a <_Heap_Allocate_aligned_with_boundary+0x2e> =============================================================================== 0010c7dc <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c7dc: 55 push %ebp 10c7dd: 89 e5 mov %esp,%ebp 10c7df: 57 push %edi 10c7e0: 56 push %esi 10c7e1: 53 push %ebx 10c7e2: 83 ec 14 sub $0x14,%esp 10c7e5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c7e8: 8b 75 0c mov 0xc(%ebp),%esi 10c7eb: 8b 45 10 mov 0x10(%ebp),%eax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c7ee: 8d 50 f8 lea -0x8(%eax),%edx 10c7f1: 89 55 f0 mov %edx,-0x10(%ebp) Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10c7f4: 29 f2 sub %esi,%edx 10c7f6: 89 55 e4 mov %edx,-0x1c(%ebp) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c7f9: 8b 4e 04 mov 0x4(%esi),%ecx 10c7fc: 89 4d e8 mov %ecx,-0x18(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c7ff: 89 ca mov %ecx,%edx 10c801: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c804: 8d 0c 16 lea (%esi,%edx,1),%ecx 10c807: 89 4d ec mov %ecx,-0x14(%ebp) Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c80a: f6 41 04 01 testb $0x1,0x4(%ecx) 10c80e: 0f 85 80 00 00 00 jne 10c894 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c814: 8b 4e 0c mov 0xc(%esi),%ecx } _Heap_Protection_block_initialize( heap, block ); return block; } 10c817: 8b 7e 08 mov 0x8(%esi),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 10c81a: 89 79 08 mov %edi,0x8(%ecx) next->prev = prev; 10c81d: 89 4f 0c mov %ecx,0xc(%edi) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c820: ff 4b 38 decl 0x38(%ebx) ++stats->used_blocks; 10c823: ff 43 40 incl 0x40(%ebx) stats->free_size -= _Heap_Block_size( block ); 10c826: 29 53 30 sub %edx,0x30(%ebx) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c829: 8b 53 10 mov 0x10(%ebx),%edx 10c82c: 89 55 e0 mov %edx,-0x20(%ebp) 10c82f: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c832: 72 6d jb 10c8a1 <_Heap_Block_allocate+0xc5> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c834: 31 d2 xor %edx,%edx 10c836: f7 75 e0 divl -0x20(%ebp) 10c839: 89 d7 mov %edx,%edi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10c83b: 8b 55 f0 mov -0x10(%ebp),%edx 10c83e: 29 fa sub %edi,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10c840: 89 55 f0 mov %edx,-0x10(%ebp) uintptr_t block_end = block_begin + block_size; Heap_Block *const new_block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; 10c843: 8b 45 ec mov -0x14(%ebp),%eax 10c846: 29 d0 sub %edx,%eax 10c848: 89 45 ec mov %eax,-0x14(%ebp) block_end = new_block_begin; block_size = block_end - block_begin; 10c84b: 89 d0 mov %edx,%eax 10c84d: 29 f0 sub %esi,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10c84f: 01 43 30 add %eax,0x30(%ebx) if ( _Heap_Is_prev_used( block ) ) { 10c852: f6 45 e8 01 testb $0x1,-0x18(%ebp) 10c856: 75 60 jne 10c8b8 <_Heap_Block_allocate+0xdc> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10c858: 2b 36 sub (%esi),%esi - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c85a: 8b 7e 04 mov 0x4(%esi),%edi 10c85d: 83 e7 fe and $0xfffffffe,%edi Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10c860: 01 f8 add %edi,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c862: 89 c7 mov %eax,%edi 10c864: 83 cf 01 or $0x1,%edi 10c867: 89 7e 04 mov %edi,0x4(%esi) new_block->prev_size = block_size; 10c86a: 89 02 mov %eax,(%edx) new_block->size_and_flag = new_block_size; 10c86c: 8b 45 ec mov -0x14(%ebp),%eax 10c86f: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c872: ff 75 14 pushl 0x14(%ebp) 10c875: 89 d8 mov %ebx,%eax 10c877: e8 f0 fc ff ff call 10c56c <_Heap_Block_split> 10c87c: 58 pop %eax alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c87d: 8b 43 30 mov 0x30(%ebx),%eax 10c880: 39 43 34 cmp %eax,0x34(%ebx) 10c883: 76 03 jbe 10c888 <_Heap_Block_allocate+0xac> stats->min_free_size = stats->free_size; 10c885: 89 43 34 mov %eax,0x34(%ebx) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c888: 8b 45 f0 mov -0x10(%ebp),%eax 10c88b: 8d 65 f4 lea -0xc(%ebp),%esp 10c88e: 5b pop %ebx 10c88f: 5e pop %esi 10c890: 5f pop %edi 10c891: c9 leave 10c892: c3 ret 10c893: 90 nop <== NOT EXECUTED /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10c894: 89 d9 mov %ebx,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c896: 8b 53 10 mov 0x10(%ebx),%edx 10c899: 89 55 e0 mov %edx,-0x20(%ebp) 10c89c: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c89f: 73 93 jae 10c834 <_Heap_Block_allocate+0x58> alloc_size += alloc_area_offset; 10c8a1: 8b 45 e4 mov -0x1c(%ebp),%eax 10c8a4: 03 45 14 add 0x14(%ebp),%eax Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10c8a7: 50 push %eax 10c8a8: 89 f2 mov %esi,%edx 10c8aa: 89 d8 mov %ebx,%eax 10c8ac: e8 bb fc ff ff call 10c56c <_Heap_Block_split> 10c8b1: 5a pop %edx 10c8b2: 89 75 f0 mov %esi,-0x10(%ebp) 10c8b5: eb c6 jmp 10c87d <_Heap_Block_allocate+0xa1> 10c8b7: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c8b8: 8b 79 08 mov 0x8(%ecx),%edi new_block->next = next; 10c8bb: 89 7e 08 mov %edi,0x8(%esi) new_block->prev = block_before; 10c8be: 89 4e 0c mov %ecx,0xc(%esi) block_before->next = new_block; 10c8c1: 89 71 08 mov %esi,0x8(%ecx) next->prev = new_block; 10c8c4: 89 77 0c mov %esi,0xc(%edi) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c8c7: ff 43 38 incl 0x38(%ebx) 10c8ca: 89 f1 mov %esi,%ecx 10c8cc: eb 94 jmp 10c862 <_Heap_Block_allocate+0x86> =============================================================================== 0010c56c <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c56c: 55 push %ebp 10c56d: 89 e5 mov %esp,%ebp 10c56f: 57 push %edi 10c570: 56 push %esi 10c571: 53 push %ebx 10c572: 83 ec 18 sub $0x18,%esp 10c575: 89 c3 mov %eax,%ebx 10c577: 89 d6 mov %edx,%esi Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c579: 8b 78 10 mov 0x10(%eax),%edi uintptr_t const min_block_size = heap->min_block_size; 10c57c: 8b 40 14 mov 0x14(%eax),%eax 10c57f: 89 45 e4 mov %eax,-0x1c(%ebp) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c582: 8b 52 04 mov 0x4(%edx),%edx 10c585: 89 55 e0 mov %edx,-0x20(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c588: 83 e2 fe and $0xfffffffe,%edx 10c58b: 89 55 ec mov %edx,-0x14(%ebp) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; 10c58e: 89 c2 mov %eax,%edx 10c590: 83 ea 08 sub $0x8,%edx return heap->stats.size; } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b ) { return a > b ? a : b; 10c593: 8b 45 08 mov 0x8(%ebp),%eax 10c596: 39 d0 cmp %edx,%eax 10c598: 73 02 jae 10c59c <_Heap_Block_split+0x30> 10c59a: 89 d0 mov %edx,%eax uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = 10c59c: 83 c0 08 add $0x8,%eax 10c59f: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c5a2: 31 d2 xor %edx,%edx 10c5a4: f7 f7 div %edi if ( remainder != 0 ) { 10c5a6: 85 d2 test %edx,%edx 10c5a8: 0f 84 8e 00 00 00 je 10c63c <_Heap_Block_split+0xd0> return value - remainder + alignment; 10c5ae: 03 7d f0 add -0x10(%ebp),%edi 10c5b1: 29 d7 sub %edx,%edi 10c5b3: 89 7d e8 mov %edi,-0x18(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c5b6: 8b 45 ec mov -0x14(%ebp),%eax 10c5b9: 01 f0 add %esi,%eax 10c5bb: 89 45 dc mov %eax,-0x24(%ebp) _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size ); uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size; 10c5be: 8b 55 ec mov -0x14(%ebp),%edx 10c5c1: 83 c2 04 add $0x4,%edx 10c5c4: 2b 55 f0 sub -0x10(%ebp),%edx uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS; 10c5c7: 8b 7d e4 mov -0x1c(%ebp),%edi 10c5ca: 83 c7 04 add $0x4,%edi Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_ALLOC_BONUS ); _HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS ); if ( free_size >= free_size_limit ) { 10c5cd: 39 fa cmp %edi,%edx 10c5cf: 72 77 jb 10c648 <_Heap_Block_split+0xdc> 10c5d1: 8b 55 e8 mov -0x18(%ebp),%edx 10c5d4: 01 f2 add %esi,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c5d6: 8b 7d ec mov -0x14(%ebp),%edi 10c5d9: 2b 7d e8 sub -0x18(%ebp),%edi 10c5dc: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10c5df: 8b 7d e0 mov -0x20(%ebp),%edi 10c5e2: 83 e7 01 and $0x1,%edi 10c5e5: 89 7d f0 mov %edi,-0x10(%ebp) block->size_and_flag = size | flag; 10c5e8: 8b 7d e8 mov -0x18(%ebp),%edi 10c5eb: 09 7d f0 or %edi,-0x10(%ebp) 10c5ee: 8b 7d f0 mov -0x10(%ebp),%edi 10c5f1: 89 7e 04 mov %edi,0x4(%esi) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c5f4: 8b 75 ec mov -0x14(%ebp),%esi 10c5f7: 01 73 30 add %esi,0x30(%ebx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c5fa: 8b 70 04 mov 0x4(%eax),%esi 10c5fd: 83 e6 fe and $0xfffffffe,%esi if ( _Heap_Is_used( next_block ) ) { 10c600: f6 44 30 04 01 testb $0x1,0x4(%eax,%esi,1) 10c605: 75 51 jne 10c658 <_Heap_Block_split+0xec> } _Heap_Protection_block_initialize( heap, block ); return block; } 10c607: 8b 48 08 mov 0x8(%eax),%ecx 10c60a: 8b 40 0c mov 0xc(%eax),%eax ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 10c60d: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c610: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c613: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c616: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10c619: 01 75 ec add %esi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c61c: 8b 45 ec mov -0x14(%ebp),%eax 10c61f: 01 d0 add %edx,%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c621: 8b 4d ec mov -0x14(%ebp),%ecx 10c624: 83 c9 01 or $0x1,%ecx 10c627: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c62a: 8b 7d ec mov -0x14(%ebp),%edi 10c62d: 89 38 mov %edi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c62f: 83 60 04 fe andl $0xfffffffe,0x4(%eax) _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c633: 83 c4 18 add $0x18,%esp 10c636: 5b pop %ebx 10c637: 5e pop %esi 10c638: 5f pop %edi 10c639: c9 leave 10c63a: c3 ret 10c63b: 90 nop <== NOT EXECUTED uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c63c: 8b 7d f0 mov -0x10(%ebp),%edi 10c63f: 89 7d e8 mov %edi,-0x18(%ebp) 10c642: e9 6f ff ff ff jmp 10c5b6 <_Heap_Block_split+0x4a> 10c647: 90 nop <== NOT EXECUTED next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c648: 8b 45 dc mov -0x24(%ebp),%eax 10c64b: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c64f: 83 c4 18 add $0x18,%esp 10c652: 5b pop %ebx 10c653: 5e pop %esi 10c654: 5f pop %edi 10c655: c9 leave 10c656: c3 ret 10c657: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c658: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10c65b: 89 72 08 mov %esi,0x8(%edx) new_block->prev = block_before; 10c65e: 89 4a 0c mov %ecx,0xc(%edx) block_before->next = new_block; 10c661: 89 51 08 mov %edx,0x8(%ecx) next->prev = new_block; 10c664: 89 56 0c mov %edx,0xc(%esi) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c667: ff 43 38 incl 0x38(%ebx) 10c66a: eb b5 jmp 10c621 <_Heap_Block_split+0xb5> =============================================================================== 00111790 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 111790: 55 push %ebp 111791: 89 e5 mov %esp,%ebp 111793: 57 push %edi 111794: 56 push %esi 111795: 53 push %ebx 111796: 83 ec 4c sub $0x4c,%esp 111799: 8b 5d 08 mov 0x8(%ebp),%ebx 11179c: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 11179f: 8b 43 20 mov 0x20(%ebx),%eax 1117a2: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 1117a5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 1117ac: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 1117b3: 8b 53 10 mov 0x10(%ebx),%edx 1117b6: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 1117b9: 8b 43 14 mov 0x14(%ebx),%eax uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 1117bc: 8b 73 30 mov 0x30(%ebx),%esi 1117bf: 89 75 c0 mov %esi,-0x40(%ebp) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 1117c2: 8b 55 0c mov 0xc(%ebp),%edx 1117c5: 01 ca add %ecx,%edx 1117c7: 89 55 cc mov %edx,-0x34(%ebp) 1117ca: 73 0c jae 1117d8 <_Heap_Extend+0x48> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 1117cc: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 1117ce: 8d 65 f4 lea -0xc(%ebp),%esp 1117d1: 5b pop %ebx 1117d2: 5e pop %esi 1117d3: 5f pop %edi 1117d4: c9 leave 1117d5: c3 ret 1117d6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 1117d8: 83 ec 08 sub $0x8,%esp 1117db: 8d 55 e0 lea -0x20(%ebp),%edx 1117de: 52 push %edx 1117df: 8d 55 e4 lea -0x1c(%ebp),%edx 1117e2: 52 push %edx 1117e3: 50 push %eax 1117e4: ff 75 d4 pushl -0x2c(%ebp) 1117e7: 51 push %ecx 1117e8: ff 75 0c pushl 0xc(%ebp) 1117eb: e8 f8 b1 ff ff call 10c9e8 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 1117f0: 83 c4 20 add $0x20,%esp 1117f3: 84 c0 test %al,%al 1117f5: 74 d5 je 1117cc <_Heap_Extend+0x3c> 1117f7: 8b 7d d0 mov -0x30(%ebp),%edi 1117fa: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 111801: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 111808: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 11180f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 111816: 8b 75 cc mov -0x34(%ebp),%esi 111819: 89 5d b4 mov %ebx,-0x4c(%ebp) 11181c: eb 30 jmp 11184e <_Heap_Extend+0xbe> 11181e: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 111820: 39 ce cmp %ecx,%esi 111822: 73 03 jae 111827 <_Heap_Extend+0x97> 111824: 89 7d b8 mov %edi,-0x48(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 111827: 8d 59 f8 lea -0x8(%ecx),%ebx 11182a: 89 c8 mov %ecx,%eax 11182c: 31 d2 xor %edx,%edx 11182e: f7 75 d4 divl -0x2c(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 111831: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 111833: 3b 4d 0c cmp 0xc(%ebp),%ecx 111836: 74 3c je 111874 <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 111838: 39 4d 0c cmp %ecx,0xc(%ebp) 11183b: 76 03 jbe 111840 <_Heap_Extend+0xb0> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 11183d: 89 5d bc mov %ebx,-0x44(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 111840: 8b 7b 04 mov 0x4(%ebx),%edi 111843: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 111846: 8d 3c 3b lea (%ebx,%edi,1),%edi link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 111849: 39 7d d0 cmp %edi,-0x30(%ebp) 11184c: 74 39 je 111887 <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 11184e: 3b 7d d0 cmp -0x30(%ebp),%edi 111851: 0f 84 35 01 00 00 je 11198c <_Heap_Extend+0x1fc> 111857: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 111859: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 11185b: 39 4d 0c cmp %ecx,0xc(%ebp) 11185e: 73 08 jae 111868 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 111860: 39 f0 cmp %esi,%eax 111862: 0f 82 64 ff ff ff jb 1117cc <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 111868: 39 f0 cmp %esi,%eax 11186a: 75 b4 jne 111820 <_Heap_Extend+0x90> 11186c: 89 7d c4 mov %edi,-0x3c(%ebp) 11186f: eb b6 jmp 111827 <_Heap_Extend+0x97> 111871: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 111874: 89 37 mov %esi,(%edi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 111876: 89 5d c8 mov %ebx,-0x38(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 111879: 8b 7b 04 mov 0x4(%ebx),%edi 11187c: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11187f: 8d 3c 3b lea (%ebx,%edi,1),%edi } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 111882: 39 7d d0 cmp %edi,-0x30(%ebp) 111885: 75 c7 jne 11184e <_Heap_Extend+0xbe> <== NEVER TAKEN 111887: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 11188a: 8b 75 0c mov 0xc(%ebp),%esi 11188d: 3b 73 18 cmp 0x18(%ebx),%esi 111890: 0f 82 02 01 00 00 jb 111998 <_Heap_Extend+0x208> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 111896: 8b 45 cc mov -0x34(%ebp),%eax 111899: 3b 43 1c cmp 0x1c(%ebx),%eax 11189c: 76 03 jbe 1118a1 <_Heap_Extend+0x111> heap->area_end = extend_area_end; 11189e: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 1118a1: 8b 55 e0 mov -0x20(%ebp),%edx 1118a4: 8b 45 e4 mov -0x1c(%ebp),%eax heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 1118a7: 89 d1 mov %edx,%ecx 1118a9: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 1118ab: 8b 75 cc mov -0x34(%ebp),%esi 1118ae: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 1118b0: 89 ce mov %ecx,%esi 1118b2: 83 ce 01 or $0x1,%esi 1118b5: 89 70 04 mov %esi,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 1118b8: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 1118ba: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 1118c1: 39 43 20 cmp %eax,0x20(%ebx) 1118c4: 0f 86 d6 00 00 00 jbe 1119a0 <_Heap_Extend+0x210> heap->first_block = extend_first_block; 1118ca: 89 43 20 mov %eax,0x20(%ebx) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 1118cd: 8b 75 c4 mov -0x3c(%ebp),%esi 1118d0: 85 f6 test %esi,%esi 1118d2: 0f 84 04 01 00 00 je 1119dc <_Heap_Extend+0x24c> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 1118d8: 8b 73 10 mov 0x10(%ebx),%esi uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 1118db: 8b 4d 0c mov 0xc(%ebp),%ecx 1118de: 83 c1 08 add $0x8,%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 1118e1: 89 c8 mov %ecx,%eax 1118e3: 31 d2 xor %edx,%edx 1118e5: f7 f6 div %esi if ( remainder != 0 ) { 1118e7: 85 d2 test %edx,%edx 1118e9: 74 04 je 1118ef <_Heap_Extend+0x15f> <== ALWAYS TAKEN return value - remainder + alignment; 1118eb: 01 f1 add %esi,%ecx <== NOT EXECUTED 1118ed: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 1118ef: 8d 51 f8 lea -0x8(%ecx),%edx uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 1118f2: 8b 75 c4 mov -0x3c(%ebp),%esi 1118f5: 8b 06 mov (%esi),%eax 1118f7: 89 41 f8 mov %eax,-0x8(%ecx) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 1118fa: 89 f0 mov %esi,%eax 1118fc: 29 d0 sub %edx,%eax first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 1118fe: 83 c8 01 or $0x1,%eax 111901: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 111904: 89 d8 mov %ebx,%eax 111906: e8 69 fe ff ff call 111774 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 11190b: 8b 45 c8 mov -0x38(%ebp),%eax 11190e: 85 c0 test %eax,%eax 111910: 0f 84 9e 00 00 00 je 1119b4 <_Heap_Extend+0x224> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 111916: 8b 4d cc mov -0x34(%ebp),%ecx 111919: 83 e9 08 sub $0x8,%ecx uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 11191c: 2b 4d c8 sub -0x38(%ebp),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11191f: 89 c8 mov %ecx,%eax 111921: 31 d2 xor %edx,%edx 111923: f7 73 10 divl 0x10(%ebx) 111926: 29 d1 sub %edx,%ecx ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 111928: 8b 55 c8 mov -0x38(%ebp),%edx 11192b: 8b 42 04 mov 0x4(%edx),%eax 11192e: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 111930: 83 c8 01 or $0x1,%eax 111933: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 111937: 8b 42 04 mov 0x4(%edx),%eax 11193a: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 11193d: 09 c8 or %ecx,%eax 11193f: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 111942: 89 d8 mov %ebx,%eax 111944: e8 2b fe ff ff call 111774 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 111949: 8b 75 c4 mov -0x3c(%ebp),%esi 11194c: 85 f6 test %esi,%esi 11194e: 0f 84 a4 00 00 00 je 1119f8 <_Heap_Extend+0x268> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 111954: 8b 53 24 mov 0x24(%ebx),%edx * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 111957: 8b 43 20 mov 0x20(%ebx),%eax 11195a: 29 d0 sub %edx,%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 11195c: 8b 4a 04 mov 0x4(%edx),%ecx 11195f: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 111962: 09 c8 or %ecx,%eax 111964: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 111967: 8b 43 30 mov 0x30(%ebx),%eax 11196a: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 11196d: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 111970: 8b 55 14 mov 0x14(%ebp),%edx 111973: 85 d2 test %edx,%edx 111975: 0f 84 99 00 00 00 je 111a14 <_Heap_Extend+0x284> <== NEVER TAKEN *extended_size_ptr = extended_size; 11197b: 8b 55 14 mov 0x14(%ebp),%edx 11197e: 89 02 mov %eax,(%edx) return true; 111980: b0 01 mov $0x1,%al } 111982: 8d 65 f4 lea -0xc(%ebp),%esp 111985: 5b pop %ebx 111986: 5e pop %esi 111987: 5f pop %edi 111988: c9 leave 111989: c3 ret 11198a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 11198c: 8b 55 b4 mov -0x4c(%ebp),%edx 11198f: 8b 42 18 mov 0x18(%edx),%eax 111992: e9 c2 fe ff ff jmp 111859 <_Heap_Extend+0xc9> 111997: 90 nop <== NOT EXECUTED start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 111998: 89 73 18 mov %esi,0x18(%ebx) 11199b: e9 01 ff ff ff jmp 1118a1 <_Heap_Extend+0x111> extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 1119a0: 39 53 24 cmp %edx,0x24(%ebx) 1119a3: 0f 83 24 ff ff ff jae 1118cd <_Heap_Extend+0x13d> <== NEVER TAKEN heap->last_block = extend_last_block; 1119a9: 89 53 24 mov %edx,0x24(%ebx) 1119ac: e9 1c ff ff ff jmp 1118cd <_Heap_Extend+0x13d> 1119b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 1119b4: 8b 7d bc mov -0x44(%ebp),%edi 1119b7: 85 ff test %edi,%edi 1119b9: 74 8e je 111949 <_Heap_Extend+0x1b9> _Heap_Link_above( 1119bb: 8b 4d e0 mov -0x20(%ebp),%ecx ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 1119be: 8b 45 e4 mov -0x1c(%ebp),%eax 1119c1: 2b 45 bc sub -0x44(%ebp),%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 1119c4: 8b 75 bc mov -0x44(%ebp),%esi 1119c7: 8b 56 04 mov 0x4(%esi),%edx 1119ca: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 1119cd: 09 d0 or %edx,%eax 1119cf: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 1119d2: 83 49 04 01 orl $0x1,0x4(%ecx) 1119d6: e9 6e ff ff ff jmp 111949 <_Heap_Extend+0x1b9> 1119db: 90 nop <== NOT EXECUTED heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 1119dc: 8b 4d b8 mov -0x48(%ebp),%ecx 1119df: 85 c9 test %ecx,%ecx 1119e1: 0f 84 24 ff ff ff je 11190b <_Heap_Extend+0x17b> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 1119e7: 8b 45 b8 mov -0x48(%ebp),%eax 1119ea: 29 d0 sub %edx,%eax 1119ec: 83 c8 01 or $0x1,%eax 1119ef: 89 42 04 mov %eax,0x4(%edx) 1119f2: e9 14 ff ff ff jmp 11190b <_Heap_Extend+0x17b> 1119f7: 90 nop <== NOT EXECUTED extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 1119f8: 8b 4d c8 mov -0x38(%ebp),%ecx 1119fb: 85 c9 test %ecx,%ecx 1119fd: 0f 85 51 ff ff ff jne 111954 <_Heap_Extend+0x1c4> <== NEVER TAKEN _Heap_Free_block( heap, extend_first_block ); 111a03: 8b 55 e4 mov -0x1c(%ebp),%edx 111a06: 89 d8 mov %ebx,%eax 111a08: e8 67 fd ff ff call 111774 <_Heap_Free_block> 111a0d: e9 42 ff ff ff jmp 111954 <_Heap_Extend+0x1c4> 111a12: 66 90 xchg %ax,%ax <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 111a14: b0 01 mov $0x1,%al <== NOT EXECUTED 111a16: e9 b3 fd ff ff jmp 1117ce <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 001113c4 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 1113c4: 55 push %ebp 1113c5: 89 e5 mov %esp,%ebp 1113c7: 57 push %edi 1113c8: 56 push %esi 1113c9: 53 push %ebx 1113ca: 83 ec 10 sub $0x10,%esp 1113cd: 8b 5d 08 mov 0x8(%ebp),%ebx 1113d0: 8b 45 0c mov 0xc(%ebp),%eax 1113d3: 8d 48 f8 lea -0x8(%eax),%ecx 1113d6: 31 d2 xor %edx,%edx 1113d8: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 1113db: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 1113dd: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 1113e0: 39 c1 cmp %eax,%ecx 1113e2: 72 07 jb 1113eb <_Heap_Free+0x27> 1113e4: 8b 73 24 mov 0x24(%ebx),%esi 1113e7: 39 f1 cmp %esi,%ecx 1113e9: 76 0d jbe 1113f8 <_Heap_Free+0x34> /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 1113eb: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1113ed: 83 c4 10 add $0x10,%esp 1113f0: 5b pop %ebx 1113f1: 5e pop %esi 1113f2: 5f pop %edi 1113f3: c9 leave 1113f4: c3 ret 1113f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1113f8: 8b 51 04 mov 0x4(%ecx),%edx 1113fb: 89 55 f0 mov %edx,-0x10(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1113fe: 83 e2 fe and $0xfffffffe,%edx 111401: 89 55 ec mov %edx,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 111404: 8d 14 11 lea (%ecx,%edx,1),%edx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 111407: 39 d0 cmp %edx,%eax 111409: 77 e0 ja 1113eb <_Heap_Free+0x27> <== NEVER TAKEN 11140b: 39 d6 cmp %edx,%esi 11140d: 72 dc jb 1113eb <_Heap_Free+0x27> <== NEVER TAKEN 11140f: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 111412: f7 c7 01 00 00 00 test $0x1,%edi 111418: 74 d1 je 1113eb <_Heap_Free+0x27> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11141a: 83 e7 fe and $0xfffffffe,%edi 11141d: 89 7d e4 mov %edi,-0x1c(%ebp) return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 111420: 39 d6 cmp %edx,%esi 111422: 0f 84 c8 00 00 00 je 1114f0 <_Heap_Free+0x12c> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 111428: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 11142d: 0f 94 45 eb sete -0x15(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 111431: f6 45 f0 01 testb $0x1,-0x10(%ebp) 111435: 75 45 jne 11147c <_Heap_Free+0xb8> uintptr_t const prev_size = block->prev_size; 111437: 8b 39 mov (%ecx),%edi 111439: 89 7d f0 mov %edi,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11143c: 29 f9 sub %edi,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11143e: 39 c8 cmp %ecx,%eax 111440: 77 a9 ja 1113eb <_Heap_Free+0x27> <== NEVER TAKEN 111442: 39 ce cmp %ecx,%esi 111444: 72 a5 jb 1113eb <_Heap_Free+0x27> <== 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) ) { 111446: f6 41 04 01 testb $0x1,0x4(%ecx) 11144a: 74 9f je 1113eb <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 11144c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 111450: 0f 84 a6 00 00 00 je 1114fc <_Heap_Free+0x138> uintptr_t const size = block_size + prev_size + next_block_size; 111456: 8b 7d e4 mov -0x1c(%ebp),%edi 111459: 03 7d ec add -0x14(%ebp),%edi 11145c: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11145f: 8b 42 08 mov 0x8(%edx),%eax 111462: 8b 52 0c mov 0xc(%edx),%edx RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 111465: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 111468: 89 50 0c mov %edx,0xc(%eax) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 11146b: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11146e: 89 f8 mov %edi,%eax 111470: 83 c8 01 or $0x1,%eax 111473: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 111476: 89 3c 39 mov %edi,(%ecx,%edi,1) 111479: eb 2a jmp 1114a5 <_Heap_Free+0xe1> 11147b: 90 nop <== NOT EXECUTED uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 11147c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 111480: 74 3a je 1114bc <_Heap_Free+0xf8> uintptr_t const size = block_size + next_block_size; 111482: 8b 7d e4 mov -0x1c(%ebp),%edi 111485: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 111488: 8b 42 08 mov 0x8(%edx),%eax 11148b: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 11148e: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 111491: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 111494: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 111497: 89 4a 08 mov %ecx,0x8(%edx) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11149a: 89 f8 mov %edi,%eax 11149c: 83 c8 01 or $0x1,%eax 11149f: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1114a2: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 1114a5: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 1114a8: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 1114ab: 8b 55 ec mov -0x14(%ebp),%edx 1114ae: 01 53 30 add %edx,0x30(%ebx) return( true ); 1114b1: b0 01 mov $0x1,%al } 1114b3: 83 c4 10 add $0x10,%esp 1114b6: 5b pop %ebx 1114b7: 5e pop %esi 1114b8: 5f pop %edi 1114b9: c9 leave 1114ba: c3 ret 1114bb: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 1114bc: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 1114bf: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 1114c2: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 1114c5: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 1114c8: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 1114cb: 8b 45 ec mov -0x14(%ebp),%eax 1114ce: 83 c8 01 or $0x1,%eax 1114d1: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1114d4: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 1114d8: 8b 45 ec mov -0x14(%ebp),%eax 1114db: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 1114dd: 8b 43 38 mov 0x38(%ebx),%eax 1114e0: 40 inc %eax 1114e1: 89 43 38 mov %eax,0x38(%ebx) if ( stats->max_free_blocks < stats->free_blocks ) { 1114e4: 3b 43 3c cmp 0x3c(%ebx),%eax 1114e7: 76 bc jbe 1114a5 <_Heap_Free+0xe1> stats->max_free_blocks = stats->free_blocks; 1114e9: 89 43 3c mov %eax,0x3c(%ebx) 1114ec: eb b7 jmp 1114a5 <_Heap_Free+0xe1> 1114ee: 66 90 xchg %ax,%ax <== NOT EXECUTED return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 1114f0: c6 45 eb 00 movb $0x0,-0x15(%ebp) 1114f4: e9 38 ff ff ff jmp 111431 <_Heap_Free+0x6d> 1114f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 1114fc: 8b 45 ec mov -0x14(%ebp),%eax 1114ff: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111502: 89 c6 mov %eax,%esi 111504: 83 ce 01 or $0x1,%esi 111507: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 11150a: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 11150e: 89 02 mov %eax,(%edx) 111510: eb 93 jmp 1114a5 <_Heap_Free+0xe1> =============================================================================== 0010c66c <_Heap_Get_first_and_last_block>: uintptr_t page_size, uintptr_t min_block_size, Heap_Block **first_block_ptr, Heap_Block **last_block_ptr ) { 10c66c: 55 push %ebp 10c66d: 89 e5 mov %esp,%ebp 10c66f: 57 push %edi 10c670: 56 push %esi 10c671: 53 push %ebx 10c672: 8b 5d 08 mov 0x8(%ebp),%ebx 10c675: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c678: 8d 34 1f lea (%edi,%ebx,1),%esi uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10c67b: 8d 4b 08 lea 0x8(%ebx),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c67e: 89 c8 mov %ecx,%eax 10c680: 31 d2 xor %edx,%edx 10c682: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c685: 85 d2 test %edx,%edx 10c687: 74 05 je 10c68e <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c689: 03 4d 10 add 0x10(%ebp),%ecx 10c68c: 29 d1 sub %edx,%ecx _Heap_Align_down( heap_area_size - overhead, page_size ); Heap_Block *const first_block = (Heap_Block *) first_block_begin; Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( 10c68e: 39 f3 cmp %esi,%ebx 10c690: 77 2e ja 10c6c0 <_Heap_Get_first_and_last_block+0x54> uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10c692: 8d 71 f8 lea -0x8(%ecx),%esi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = 10c695: 29 d9 sub %ebx,%ecx Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead 10c697: 39 cf cmp %ecx,%edi 10c699: 76 25 jbe 10c6c0 <_Heap_Get_first_and_last_block+0x54> uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); uintptr_t const first_block_size = _Heap_Align_down( heap_area_size - overhead, page_size ); 10c69b: 29 cf sub %ecx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c69d: 89 f8 mov %edi,%eax 10c69f: 31 d2 xor %edx,%edx 10c6a1: f7 75 10 divl 0x10(%ebp) 10c6a4: 29 d7 sub %edx,%edi _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size 10c6a6: 39 7d 14 cmp %edi,0x14(%ebp) 10c6a9: 77 15 ja 10c6c0 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c6ab: 8b 45 18 mov 0x18(%ebp),%eax 10c6ae: 89 30 mov %esi,(%eax) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c6b0: 01 f7 add %esi,%edi 10c6b2: 8b 45 1c mov 0x1c(%ebp),%eax 10c6b5: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c6b7: b0 01 mov $0x1,%al } 10c6b9: 5b pop %ebx 10c6ba: 5e pop %esi 10c6bb: 5f pop %edi 10c6bc: c9 leave 10c6bd: c3 ret 10c6be: 66 90 xchg %ax,%ax <== NOT EXECUTED heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 10c6c0: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c6c2: 5b pop %ebx 10c6c3: 5e pop %esi 10c6c4: 5f pop %edi 10c6c5: c9 leave 10c6c6: c3 ret =============================================================================== 0011508c <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 11508c: 55 push %ebp 11508d: 89 e5 mov %esp,%ebp 11508f: 57 push %edi 115090: 56 push %esi 115091: 53 push %ebx 115092: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 115095: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 11509b: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 1150a2: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1150a9: 8b 45 08 mov 0x8(%ebp),%eax 1150ac: 8b 50 08 mov 0x8(%eax),%edx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 1150af: 39 d0 cmp %edx,%eax 1150b1: 74 31 je 1150e4 <_Heap_Get_free_information+0x58> 1150b3: bb 01 00 00 00 mov $0x1,%ebx 1150b8: 31 f6 xor %esi,%esi 1150ba: 31 c9 xor %ecx,%ecx 1150bc: eb 07 jmp 1150c5 <_Heap_Get_free_information+0x39> 1150be: 66 90 xchg %ax,%ax <== NOT EXECUTED 1150c0: 8b 77 04 mov 0x4(%edi),%esi 1150c3: 89 c3 mov %eax,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1150c5: 8b 42 04 mov 0x4(%edx),%eax 1150c8: 83 e0 fe and $0xfffffffe,%eax /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 1150cb: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 1150cd: 39 f0 cmp %esi,%eax 1150cf: 76 03 jbe 1150d4 <_Heap_Get_free_information+0x48> info->largest = the_size; 1150d1: 89 47 04 mov %eax,0x4(%edi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 1150d4: 8b 52 08 mov 0x8(%edx),%edx 1150d7: 8d 43 01 lea 0x1(%ebx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 1150da: 39 55 08 cmp %edx,0x8(%ebp) 1150dd: 75 e1 jne 1150c0 <_Heap_Get_free_information+0x34> 1150df: 89 1f mov %ebx,(%edi) 1150e1: 89 4f 08 mov %ecx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1150e4: 5b pop %ebx 1150e5: 5e pop %esi 1150e6: 5f pop %edi 1150e7: c9 leave 1150e8: c3 ret =============================================================================== 00111f3c <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 111f3c: 55 push %ebp 111f3d: 89 e5 mov %esp,%ebp 111f3f: 57 push %edi 111f40: 56 push %esi 111f41: 53 push %ebx 111f42: 8b 45 08 mov 0x8(%ebp),%eax 111f45: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 111f48: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 111f4b: 8b 70 24 mov 0x24(%eax),%esi memset(the_info, 0, sizeof(*the_info)); 111f4e: b9 18 00 00 00 mov $0x18,%ecx 111f53: 31 c0 xor %eax,%eax 111f55: 89 df mov %ebx,%edi 111f57: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 111f59: 39 f2 cmp %esi,%edx 111f5b: 74 33 je 111f90 <_Heap_Get_information+0x54><== NEVER TAKEN 111f5d: 8b 7a 04 mov 0x4(%edx),%edi 111f60: eb 16 jmp 111f78 <_Heap_Get_information+0x3c> 111f62: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 111f64: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 111f67: ff 00 incl (%eax) info->total += the_size; 111f69: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 111f6c: 39 48 04 cmp %ecx,0x4(%eax) 111f6f: 73 03 jae 111f74 <_Heap_Get_information+0x38> info->largest = the_size; 111f71: 89 48 04 mov %ecx,0x4(%eax) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 111f74: 39 d6 cmp %edx,%esi 111f76: 74 18 je 111f90 <_Heap_Get_information+0x54> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 111f78: 89 f9 mov %edi,%ecx 111f7a: 83 e1 fe and $0xfffffffe,%ecx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 111f7d: 01 ca add %ecx,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 111f7f: 8b 7a 04 mov 0x4(%edx),%edi while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 111f82: f7 c7 01 00 00 00 test $0x1,%edi 111f88: 75 da jne 111f64 <_Heap_Get_information+0x28> info = &the_info->Used; else info = &the_info->Free; 111f8a: 89 d8 mov %ebx,%eax 111f8c: eb d9 jmp 111f67 <_Heap_Get_information+0x2b> 111f8e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 111f90: 5b pop %ebx 111f91: 5e pop %esi 111f92: 5f pop %edi 111f93: c9 leave 111f94: c3 ret =============================================================================== 0010c6c8 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c6c8: 55 push %ebp 10c6c9: 89 e5 mov %esp,%ebp 10c6cb: 57 push %edi 10c6cc: 56 push %esi 10c6cd: 53 push %ebx 10c6ce: 83 ec 18 sub $0x18,%esp 10c6d1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6d4: 8b 7d 10 mov 0x10(%ebp),%edi 10c6d7: 8b 75 14 mov 0x14(%ebp),%esi uintptr_t first_block_begin = 0; uintptr_t first_block_size = 0; uintptr_t last_block_begin = 0; uintptr_t min_block_size = 0; bool area_ok = false; Heap_Block *first_block = NULL; 10c6da: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) Heap_Block *last_block = NULL; 10c6e1: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) if ( page_size == 0 ) { 10c6e8: 85 f6 test %esi,%esi 10c6ea: 74 2c je 10c718 <_Heap_Initialize+0x50> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c6ec: 89 f0 mov %esi,%eax 10c6ee: 83 e0 03 and $0x3,%eax 10c6f1: 74 05 je 10c6f8 <_Heap_Initialize+0x30> return value - remainder + alignment; 10c6f3: 83 c6 04 add $0x4,%esi 10c6f6: 29 c6 sub %eax,%esi page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c6f8: 83 fe 03 cmp $0x3,%esi 10c6fb: 76 45 jbe 10c742 <_Heap_Initialize+0x7a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c6fd: b8 10 00 00 00 mov $0x10,%eax 10c702: 31 d2 xor %edx,%edx 10c704: f7 f6 div %esi 10c706: 89 d1 mov %edx,%ecx if ( remainder != 0 ) { 10c708: 85 d2 test %edx,%edx 10c70a: 0f 84 bf 00 00 00 je 10c7cf <_Heap_Initialize+0x107> return value - remainder + alignment; 10c710: 8d 56 10 lea 0x10(%esi),%edx 10c713: 29 ca sub %ecx,%edx 10c715: eb 0b jmp 10c722 <_Heap_Initialize+0x5a> 10c717: 90 nop <== NOT EXECUTED bool area_ok = false; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; 10c718: be 04 00 00 00 mov $0x4,%esi } else { return value; 10c71d: ba 10 00 00 00 mov $0x10,%edx return 0; } } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); area_ok = _Heap_Get_first_and_last_block( 10c722: 8d 45 ec lea -0x14(%ebp),%eax 10c725: 50 push %eax 10c726: 8d 45 f0 lea -0x10(%ebp),%eax 10c729: 50 push %eax 10c72a: 52 push %edx 10c72b: 56 push %esi 10c72c: 57 push %edi 10c72d: ff 75 0c pushl 0xc(%ebp) 10c730: 89 55 dc mov %edx,-0x24(%ebp) 10c733: e8 34 ff ff ff call 10c66c <_Heap_Get_first_and_last_block> page_size, min_block_size, &first_block, &last_block ); if ( !area_ok ) { 10c738: 83 c4 18 add $0x18,%esp 10c73b: 84 c0 test %al,%al 10c73d: 8b 55 dc mov -0x24(%ebp),%edx 10c740: 75 0a jne 10c74c <_Heap_Initialize+0x84> return 0; 10c742: 31 c0 xor %eax,%eax _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c744: 8d 65 f4 lea -0xc(%ebp),%esp 10c747: 5b pop %ebx 10c748: 5e pop %esi 10c749: 5f pop %edi 10c74a: c9 leave 10c74b: c3 ret uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c74c: 03 7d 0c add 0xc(%ebp),%edi 10c74f: 89 7d e0 mov %edi,-0x20(%ebp) ); if ( !area_ok ) { return 0; } memset(heap, 0, sizeof(*heap)); 10c752: b9 58 00 00 00 mov $0x58,%ecx 10c757: 31 c0 xor %eax,%eax 10c759: 89 df mov %ebx,%edi 10c75b: f3 aa rep stos %al,%es:(%edi) heap->Protection.block_initialize = _Heap_Protection_block_initialize_default; heap->Protection.block_check = _Heap_Protection_block_check_default; heap->Protection.block_error = _Heap_Protection_block_error_default; #endif first_block_begin = (uintptr_t) first_block; 10c75d: 8b 4d f0 mov -0x10(%ebp),%ecx last_block_begin = (uintptr_t) last_block; first_block_size = last_block_begin - first_block_begin; 10c760: 8b 45 ec mov -0x14(%ebp),%eax 10c763: 29 c8 sub %ecx,%eax /* First block */ first_block->prev_size = heap_area_end; 10c765: 8b 7d e0 mov -0x20(%ebp),%edi 10c768: 89 39 mov %edi,(%ecx) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c76a: 89 c7 mov %eax,%edi 10c76c: 83 cf 01 or $0x1,%edi 10c76f: 89 79 04 mov %edi,0x4(%ecx) first_block->next = _Heap_Free_list_tail( heap ); 10c772: 89 59 08 mov %ebx,0x8(%ecx) first_block->prev = _Heap_Free_list_head( heap ); 10c775: 89 59 0c mov %ebx,0xc(%ecx) _Heap_Protection_block_initialize( heap, first_block ); /* Heap control */ heap->page_size = page_size; 10c778: 89 73 10 mov %esi,0x10(%ebx) heap->min_block_size = min_block_size; 10c77b: 89 53 14 mov %edx,0x14(%ebx) heap->area_begin = heap_area_begin; 10c77e: 8b 55 0c mov 0xc(%ebp),%edx 10c781: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c784: 8b 7d e0 mov -0x20(%ebp),%edi 10c787: 89 7b 1c mov %edi,0x1c(%ebx) heap->first_block = first_block; 10c78a: 89 4b 20 mov %ecx,0x20(%ebx) heap->last_block = last_block; 10c78d: 8b 55 ec mov -0x14(%ebp),%edx 10c790: 89 53 24 mov %edx,0x24(%ebx) _Heap_Free_list_head( heap )->next = first_block; 10c793: 89 4b 08 mov %ecx,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c796: 89 4b 0c mov %ecx,0xc(%ebx) /* Last block */ last_block->prev_size = first_block_size; 10c799: 89 02 mov %eax,(%edx) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 10c79b: 29 d1 sub %edx,%ecx 10c79d: 89 4a 04 mov %ecx,0x4(%edx) last_block->size_and_flag = 0; _Heap_Set_last_block_size( heap ); _Heap_Protection_block_initialize( heap, last_block ); /* Statistics */ stats->size = first_block_size; 10c7a0: 89 43 2c mov %eax,0x2c(%ebx) stats->free_size = first_block_size; 10c7a3: 89 43 30 mov %eax,0x30(%ebx) stats->min_free_size = first_block_size; 10c7a6: 89 43 34 mov %eax,0x34(%ebx) stats->free_blocks = 1; 10c7a9: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c7b0: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->instance = instance++; 10c7b7: 8b 15 40 61 12 00 mov 0x126140,%edx 10c7bd: 89 53 28 mov %edx,0x28(%ebx) 10c7c0: 42 inc %edx 10c7c1: 89 15 40 61 12 00 mov %edx,0x126140 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c7c7: 8d 65 f4 lea -0xc(%ebp),%esp 10c7ca: 5b pop %ebx 10c7cb: 5e pop %esi 10c7cc: 5f pop %edi 10c7cd: c9 leave 10c7ce: c3 ret uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c7cf: ba 10 00 00 00 mov $0x10,%edx 10c7d4: e9 49 ff ff ff jmp 10c722 <_Heap_Initialize+0x5a> =============================================================================== 0011ec84 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11ec84: 55 push %ebp 11ec85: 89 e5 mov %esp,%ebp 11ec87: 57 push %edi 11ec88: 56 push %esi 11ec89: 53 push %ebx 11ec8a: 83 ec 2c sub $0x2c,%esp 11ec8d: 8b 5d 08 mov 0x8(%ebp),%ebx 11ec90: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11ec93: 8d 4e f8 lea -0x8(%esi),%ecx 11ec96: 89 f0 mov %esi,%eax 11ec98: 31 d2 xor %edx,%edx 11ec9a: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11ec9d: 29 d1 sub %edx,%ecx uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 11ec9f: 8b 45 14 mov 0x14(%ebp),%eax 11eca2: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11eca8: 8b 55 18 mov 0x18(%ebp),%edx 11ecab: c7 02 00 00 00 00 movl $0x0,(%edx) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11ecb1: 39 4b 20 cmp %ecx,0x20(%ebx) 11ecb4: 77 05 ja 11ecbb <_Heap_Resize_block+0x37> 11ecb6: 39 4b 24 cmp %ecx,0x24(%ebx) 11ecb9: 73 0d jae 11ecc8 <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; 11ecbb: b8 02 00 00 00 mov $0x2,%eax } } 11ecc0: 8d 65 f4 lea -0xc(%ebp),%esp 11ecc3: 5b pop %ebx 11ecc4: 5e pop %esi 11ecc5: 5f pop %edi 11ecc6: c9 leave 11ecc7: c3 ret - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11ecc8: 8b 41 04 mov 0x4(%ecx),%eax 11eccb: 83 e0 fe and $0xfffffffe,%eax { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11ecce: 8d 3c 01 lea (%ecx,%eax,1),%edi 11ecd1: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; 11ecd4: 89 fa mov %edi,%edx 11ecd6: 29 f2 sub %esi,%edx 11ecd8: 83 c2 04 add $0x4,%edx 11ecdb: 89 55 e0 mov %edx,-0x20(%ebp) 11ecde: 8b 57 04 mov 0x4(%edi),%edx 11ece1: 83 e2 fe and $0xfffffffe,%edx 11ece4: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11ece7: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11ecec: 0f 94 45 df sete -0x21(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11ecf0: 8b 55 e0 mov -0x20(%ebp),%edx 11ecf3: 8b 7d 14 mov 0x14(%ebp),%edi 11ecf6: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11ecf8: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11ecfc: 75 6e jne 11ed6c <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11ecfe: 8b 55 e0 mov -0x20(%ebp),%edx 11ed01: 39 55 10 cmp %edx,0x10(%ebp) 11ed04: 77 79 ja 11ed7f <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11ed06: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11ed0a: 74 31 je 11ed3d <_Heap_Resize_block+0xb9> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 11ed0c: 8b 79 04 mov 0x4(%ecx),%edi 11ed0f: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11ed12: 09 c7 or %eax,%edi 11ed14: 89 79 04 mov %edi,0x4(%ecx) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11ed17: 8b 7d d4 mov -0x2c(%ebp),%edi 11ed1a: 8b 7f 08 mov 0x8(%edi),%edi 11ed1d: 89 7d e4 mov %edi,-0x1c(%ebp) 11ed20: 8b 55 d4 mov -0x2c(%ebp),%edx 11ed23: 8b 7a 0c mov 0xc(%edx),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 11ed26: 8b 55 e4 mov -0x1c(%ebp),%edx 11ed29: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11ed2c: 89 7a 0c mov %edi,0xc(%edx) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11ed2f: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11ed34: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11ed37: 8b 7d d0 mov -0x30(%ebp),%edi 11ed3a: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11ed3d: ff 75 10 pushl 0x10(%ebp) 11ed40: 56 push %esi 11ed41: 51 push %ecx 11ed42: 53 push %ebx 11ed43: e8 94 da fe ff call 10c7dc <_Heap_Block_allocate> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11ed48: 8b 50 04 mov 0x4(%eax),%edx 11ed4b: 83 e2 fe and $0xfffffffe,%edx block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS; 11ed4e: 29 f0 sub %esi,%eax 11ed50: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11ed54: 8b 55 18 mov 0x18(%ebp),%edx 11ed57: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11ed59: ff 43 54 incl 0x54(%ebx) 11ed5c: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11ed5f: 31 c0 xor %eax,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11ed61: 8d 65 f4 lea -0xc(%ebp),%esp 11ed64: 5b pop %ebx 11ed65: 5e pop %esi 11ed66: 5f pop %edi 11ed67: c9 leave 11ed68: c3 ret 11ed69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11ed6c: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11ed6f: 8b 7d d0 mov -0x30(%ebp),%edi 11ed72: 01 fa add %edi,%edx 11ed74: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11ed77: 8b 55 e0 mov -0x20(%ebp),%edx 11ed7a: 39 55 10 cmp %edx,0x10(%ebp) 11ed7d: 76 87 jbe 11ed06 <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11ed7f: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11ed84: 8d 65 f4 lea -0xc(%ebp),%esp 11ed87: 5b pop %ebx 11ed88: 5e pop %esi 11ed89: 5f pop %edi 11ed8a: c9 leave 11ed8b: c3 ret =============================================================================== 0011ed8c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11ed8c: 55 push %ebp 11ed8d: 89 e5 mov %esp,%ebp 11ed8f: 56 push %esi 11ed90: 53 push %ebx 11ed91: 8b 5d 08 mov 0x8(%ebp),%ebx 11ed94: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11ed97: 8d 4e f8 lea -0x8(%esi),%ecx 11ed9a: 89 f0 mov %esi,%eax 11ed9c: 31 d2 xor %edx,%edx 11ed9e: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11eda1: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11eda3: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11eda6: 39 c1 cmp %eax,%ecx 11eda8: 72 07 jb 11edb1 <_Heap_Size_of_alloc_area+0x25> 11edaa: 8b 53 24 mov 0x24(%ebx),%edx 11edad: 39 d1 cmp %edx,%ecx 11edaf: 76 07 jbe 11edb8 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11edb1: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 11edb3: 5b pop %ebx 11edb4: 5e pop %esi 11edb5: c9 leave 11edb6: c3 ret 11edb7: 90 nop <== NOT EXECUTED - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11edb8: 8b 59 04 mov 0x4(%ecx),%ebx 11edbb: 83 e3 fe and $0xfffffffe,%ebx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11edbe: 01 d9 add %ebx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11edc0: 39 c8 cmp %ecx,%eax 11edc2: 77 ed ja 11edb1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11edc4: 39 ca cmp %ecx,%edx 11edc6: 72 e9 jb 11edb1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11edc8: f6 41 04 01 testb $0x1,0x4(%ecx) 11edcc: 74 e3 je 11edb1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11edce: 29 f1 sub %esi,%ecx 11edd0: 8d 51 04 lea 0x4(%ecx),%edx 11edd3: 8b 45 10 mov 0x10(%ebp),%eax 11edd6: 89 10 mov %edx,(%eax) return true; 11edd8: b0 01 mov $0x1,%al } 11edda: 5b pop %ebx 11eddb: 5e pop %esi 11eddc: c9 leave 11eddd: c3 ret =============================================================================== 0010d300 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d300: 55 push %ebp 10d301: 89 e5 mov %esp,%ebp 10d303: 57 push %edi 10d304: 56 push %esi 10d305: 53 push %ebx 10d306: 83 ec 4c sub $0x4c,%esp 10d309: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d30c: 8b 43 10 mov 0x10(%ebx),%eax 10d30f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d312: 8b 53 14 mov 0x14(%ebx),%edx 10d315: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d318: 8b 43 20 mov 0x20(%ebx),%eax 10d31b: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d31e: 8b 53 24 mov 0x24(%ebx),%edx 10d321: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d324: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d328: 74 1a je 10d344 <_Heap_Walk+0x44> 10d32a: c7 45 d8 b8 d2 10 00 movl $0x10d2b8,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d331: 83 3d 00 9b 12 00 03 cmpl $0x3,0x129b00 10d338: 74 1a je 10d354 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d33a: b0 01 mov $0x1,%al } 10d33c: 8d 65 f4 lea -0xc(%ebp),%esp 10d33f: 5b pop %ebx 10d340: 5e pop %esi 10d341: 5f pop %edi 10d342: c9 leave 10d343: c3 ret uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d344: c7 45 d8 b0 d2 10 00 movl $0x10d2b0,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d34b: 83 3d 00 9b 12 00 03 cmpl $0x3,0x129b00 10d352: 75 e6 jne 10d33a <_Heap_Walk+0x3a> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10d354: 52 push %edx 10d355: ff 73 0c pushl 0xc(%ebx) 10d358: ff 73 08 pushl 0x8(%ebx) 10d35b: ff 75 cc pushl -0x34(%ebp) 10d35e: ff 75 dc pushl -0x24(%ebp) 10d361: ff 73 1c pushl 0x1c(%ebx) 10d364: ff 73 18 pushl 0x18(%ebx) 10d367: ff 75 d0 pushl -0x30(%ebp) 10d36a: ff 75 e0 pushl -0x20(%ebp) 10d36d: 68 b4 1c 12 00 push $0x121cb4 10d372: 6a 00 push $0x0 10d374: ff 75 0c pushl 0xc(%ebp) 10d377: ff 55 d8 call *-0x28(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d37a: 83 c4 30 add $0x30,%esp 10d37d: 8b 45 e0 mov -0x20(%ebp),%eax 10d380: 85 c0 test %eax,%eax 10d382: 74 70 je 10d3f4 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d384: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d388: 75 72 jne 10d3fc <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d38a: 8b 45 d0 mov -0x30(%ebp),%eax 10d38d: 31 d2 xor %edx,%edx 10d38f: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d392: 85 d2 test %edx,%edx 10d394: 75 72 jne 10d408 <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d396: 8b 45 dc mov -0x24(%ebp),%eax 10d399: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d39c: 31 d2 xor %edx,%edx 10d39e: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d3a1: 85 d2 test %edx,%edx 10d3a3: 75 6f jne 10d414 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d3a5: 8b 45 dc mov -0x24(%ebp),%eax 10d3a8: 8b 40 04 mov 0x4(%eax),%eax 10d3ab: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d3ae: a8 01 test $0x1,%al 10d3b0: 0f 84 8e 00 00 00 je 10d444 <_Heap_Walk+0x144> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d3b6: 8b 55 cc mov -0x34(%ebp),%edx 10d3b9: 8b 42 04 mov 0x4(%edx),%eax 10d3bc: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d3bf: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d3c1: f6 40 04 01 testb $0x1,0x4(%eax) 10d3c5: 74 25 je 10d3ec <_Heap_Walk+0xec> ); return false; } if ( 10d3c7: 39 45 dc cmp %eax,-0x24(%ebp) 10d3ca: 74 54 je 10d420 <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d3cc: 51 push %ecx <== NOT EXECUTED 10d3cd: 68 d0 1d 12 00 push $0x121dd0 <== NOT EXECUTED 10d3d2: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d3d4: 6a 01 push $0x1 10d3d6: ff 75 0c pushl 0xc(%ebp) 10d3d9: ff 55 d8 call *-0x28(%ebp) 10d3dc: 83 c4 10 add $0x10,%esp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 10d3df: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d3e1: 8d 65 f4 lea -0xc(%ebp),%esp 10d3e4: 5b pop %ebx 10d3e5: 5e pop %esi 10d3e6: 5f pop %edi 10d3e7: c9 leave 10d3e8: c3 ret 10d3e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d3ec: 53 push %ebx 10d3ed: 68 6a 1c 12 00 push $0x121c6a 10d3f2: eb e0 jmp 10d3d4 <_Heap_Walk+0xd4> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d3f4: 57 push %edi 10d3f5: 68 39 1c 12 00 push $0x121c39 10d3fa: eb d8 jmp 10d3d4 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d3fc: ff 75 e0 pushl -0x20(%ebp) 10d3ff: 68 4c 1c 12 00 push $0x121c4c 10d404: eb ce jmp 10d3d4 <_Heap_Walk+0xd4> 10d406: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d408: ff 75 d0 pushl -0x30(%ebp) 10d40b: 68 48 1d 12 00 push $0x121d48 10d410: eb c2 jmp 10d3d4 <_Heap_Walk+0xd4> 10d412: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d414: ff 75 dc pushl -0x24(%ebp) 10d417: 68 6c 1d 12 00 push $0x121d6c 10d41c: eb b6 jmp 10d3d4 <_Heap_Walk+0xd4> 10d41e: 66 90 xchg %ax,%ax <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d420: 8b 43 10 mov 0x10(%ebx),%eax 10d423: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d426: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d429: 39 cb cmp %ecx,%ebx 10d42b: 0f 84 a8 00 00 00 je 10d4d9 <_Heap_Walk+0x1d9> block = next_block; } while ( block != first_block ); return true; } 10d431: 8b 43 20 mov 0x20(%ebx),%eax 10d434: 89 45 d4 mov %eax,-0x2c(%ebp) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d437: 39 c8 cmp %ecx,%eax 10d439: 76 11 jbe 10d44c <_Heap_Walk+0x14c> <== ALWAYS TAKEN 10d43b: 90 nop <== NOT EXECUTED const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d43c: 51 push %ecx 10d43d: 68 00 1e 12 00 push $0x121e00 10d442: eb 90 jmp 10d3d4 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d444: 56 push %esi 10d445: 68 a0 1d 12 00 push $0x121da0 10d44a: eb 88 jmp 10d3d4 <_Heap_Walk+0xd4> 10d44c: 8b 7b 24 mov 0x24(%ebx),%edi 10d44f: 39 cf cmp %ecx,%edi 10d451: 72 e9 jb 10d43c <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d453: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d456: 31 d2 xor %edx,%edx 10d458: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d45b: 85 d2 test %edx,%edx 10d45d: 0f 85 44 02 00 00 jne 10d6a7 <_Heap_Walk+0x3a7> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d463: 8b 41 04 mov 0x4(%ecx),%eax 10d466: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d469: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d46e: 0f 85 3e 02 00 00 jne 10d6b2 <_Heap_Walk+0x3b2> <== NEVER TAKEN 10d474: 89 da mov %ebx,%edx 10d476: 89 ce mov %ecx,%esi 10d478: eb 37 jmp 10d4b1 <_Heap_Walk+0x1b1> 10d47a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; 10d47c: 8b 49 08 mov 0x8(%ecx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d47f: 39 cb cmp %ecx,%ebx 10d481: 74 5c je 10d4df <_Heap_Walk+0x1df> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d483: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d486: 77 b4 ja 10d43c <_Heap_Walk+0x13c> 10d488: 39 f9 cmp %edi,%ecx 10d48a: 77 b0 ja 10d43c <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d48c: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d48f: 31 d2 xor %edx,%edx 10d491: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d494: 85 d2 test %edx,%edx 10d496: 0f 85 0b 02 00 00 jne 10d6a7 <_Heap_Walk+0x3a7> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d49c: 8b 41 04 mov 0x4(%ecx),%eax 10d49f: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d4a2: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d4a7: 0f 85 05 02 00 00 jne 10d6b2 <_Heap_Walk+0x3b2> 10d4ad: 89 f2 mov %esi,%edx 10d4af: 89 ce mov %ecx,%esi ); return false; } if ( free_block->prev != prev_block ) { 10d4b1: 8b 41 0c mov 0xc(%ecx),%eax 10d4b4: 39 d0 cmp %edx,%eax 10d4b6: 74 c4 je 10d47c <_Heap_Walk+0x17c> (*printer)( 10d4b8: 83 ec 0c sub $0xc,%esp 10d4bb: 50 push %eax 10d4bc: 51 push %ecx 10d4bd: 68 50 1e 12 00 push $0x121e50 10d4c2: 66 90 xchg %ax,%ax Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d4c4: 6a 01 push $0x1 10d4c6: ff 75 0c pushl 0xc(%ebp) 10d4c9: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d4cc: 83 c4 20 add $0x20,%esp 10d4cf: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d4d1: 8d 65 f4 lea -0xc(%ebp),%esp 10d4d4: 5b pop %ebx 10d4d5: 5e pop %esi 10d4d6: 5f pop %edi 10d4d7: c9 leave 10d4d8: c3 ret const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d4d9: 8b 53 20 mov 0x20(%ebx),%edx 10d4dc: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d4df: 8b 7d dc mov -0x24(%ebp),%edi 10d4e2: 8b 45 d4 mov -0x2c(%ebp),%eax 10d4e5: 8d 76 00 lea 0x0(%esi),%esi 10d4e8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d4eb: 83 e1 fe and $0xfffffffe,%ecx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d4ee: 8d 34 39 lea (%ecx,%edi,1),%esi const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d4f1: 39 f0 cmp %esi,%eax 10d4f3: 76 0f jbe 10d504 <_Heap_Walk+0x204> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d4f5: 83 ec 0c sub $0xc,%esp 10d4f8: 56 push %esi 10d4f9: 57 push %edi 10d4fa: 68 84 1e 12 00 push $0x121e84 10d4ff: eb c3 jmp 10d4c4 <_Heap_Walk+0x1c4> 10d501: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d504: 39 73 24 cmp %esi,0x24(%ebx) 10d507: 72 ec jb 10d4f5 <_Heap_Walk+0x1f5> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 10d509: 3b 7d cc cmp -0x34(%ebp),%edi 10d50c: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d510: 89 c8 mov %ecx,%eax 10d512: 31 d2 xor %edx,%edx 10d514: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d517: 85 d2 test %edx,%edx 10d519: 74 0a je 10d525 <_Heap_Walk+0x225> 10d51b: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d51f: 0f 85 52 01 00 00 jne 10d677 <_Heap_Walk+0x377> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d525: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d528: 76 0a jbe 10d534 <_Heap_Walk+0x234> 10d52a: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d52e: 0f 85 52 01 00 00 jne 10d686 <_Heap_Walk+0x386> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d534: 39 f7 cmp %esi,%edi 10d536: 72 0a jb 10d542 <_Heap_Walk+0x242> 10d538: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d53c: 0f 85 56 01 00 00 jne 10d698 <_Heap_Walk+0x398> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10d542: 8b 55 e4 mov -0x1c(%ebp),%edx 10d545: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d548: f6 46 04 01 testb $0x1,0x4(%esi) 10d54c: 74 4e je 10d59c <_Heap_Walk+0x29c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d54e: 85 d2 test %edx,%edx 10d550: 74 2e je 10d580 <_Heap_Walk+0x280> (*printer)( 10d552: 83 ec 0c sub $0xc,%esp 10d555: 51 push %ecx 10d556: 57 push %edi 10d557: 68 9b 1c 12 00 push $0x121c9b 10d55c: 6a 00 push $0x0 10d55e: ff 75 0c pushl 0xc(%ebp) 10d561: ff 55 d8 call *-0x28(%ebp) 10d564: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d567: 39 75 dc cmp %esi,-0x24(%ebp) 10d56a: 0f 84 ca fd ff ff je 10d33a <_Heap_Walk+0x3a> 10d570: 8b 56 04 mov 0x4(%esi),%edx 10d573: 89 55 e4 mov %edx,-0x1c(%ebp) 10d576: 8b 43 20 mov 0x20(%ebx),%eax 10d579: 89 f7 mov %esi,%edi 10d57b: e9 68 ff ff ff jmp 10d4e8 <_Heap_Walk+0x1e8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d580: 83 ec 08 sub $0x8,%esp 10d583: ff 37 pushl (%edi) 10d585: 51 push %ecx 10d586: 57 push %edi 10d587: 68 e8 1f 12 00 push $0x121fe8 10d58c: 6a 00 push $0x0 10d58e: ff 75 0c pushl 0xc(%ebp) 10d591: ff 55 d8 call *-0x28(%ebp) 10d594: 83 c4 20 add $0x20,%esp 10d597: eb ce jmp 10d567 <_Heap_Walk+0x267> 10d599: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block = next_block; } while ( block != first_block ); return true; } 10d59c: 8b 43 08 mov 0x8(%ebx),%eax 10d59f: 89 45 b4 mov %eax,-0x4c(%ebp) block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10d5a2: 8b 47 08 mov 0x8(%edi),%eax 10d5a5: 89 45 e4 mov %eax,-0x1c(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d5a8: 39 43 0c cmp %eax,0xc(%ebx) 10d5ab: 0f 84 97 00 00 00 je 10d648 <_Heap_Walk+0x348> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d5b1: 39 c3 cmp %eax,%ebx 10d5b3: 0f 84 9b 00 00 00 je 10d654 <_Heap_Walk+0x354> 10d5b9: c7 45 c8 29 1b 12 00 movl $0x121b29,-0x38(%ebp) false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 10d5c0: 8b 47 0c mov 0xc(%edi),%eax 10d5c3: 89 45 d4 mov %eax,-0x2c(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d5c6: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d5c9: 74 75 je 10d640 <_Heap_Walk+0x340> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d5cb: 39 c3 cmp %eax,%ebx 10d5cd: 0f 84 8d 00 00 00 je 10d660 <_Heap_Walk+0x360> 10d5d3: b8 29 1b 12 00 mov $0x121b29,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d5d8: 83 ec 0c sub $0xc,%esp 10d5db: ff 75 c8 pushl -0x38(%ebp) 10d5de: ff 75 e4 pushl -0x1c(%ebp) 10d5e1: 50 push %eax 10d5e2: ff 75 d4 pushl -0x2c(%ebp) 10d5e5: 51 push %ecx 10d5e6: 57 push %edi 10d5e7: 68 44 1f 12 00 push $0x121f44 10d5ec: 6a 00 push $0x0 10d5ee: ff 75 0c pushl 0xc(%ebp) 10d5f1: 89 55 c4 mov %edx,-0x3c(%ebp) 10d5f4: 89 4d c0 mov %ecx,-0x40(%ebp) 10d5f7: ff 55 d8 call *-0x28(%ebp) block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10d5fa: 8b 06 mov (%esi),%eax 10d5fc: 83 c4 30 add $0x30,%esp 10d5ff: 8b 4d c0 mov -0x40(%ebp),%ecx 10d602: 39 c1 cmp %eax,%ecx 10d604: 8b 55 c4 mov -0x3c(%ebp),%edx 10d607: 75 27 jne 10d630 <_Heap_Walk+0x330> ); return false; } if ( !prev_used ) { 10d609: 85 d2 test %edx,%edx 10d60b: 74 5f je 10d66c <_Heap_Walk+0x36c> block = next_block; } while ( block != first_block ); return true; } 10d60d: 8b 43 08 mov 0x8(%ebx),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10d610: 39 c3 cmp %eax,%ebx 10d612: 74 0f je 10d623 <_Heap_Walk+0x323> <== NEVER TAKEN if ( free_block == block ) { 10d614: 39 c7 cmp %eax,%edi 10d616: 0f 84 4b ff ff ff je 10d567 <_Heap_Walk+0x267> return true; } free_block = free_block->next; 10d61c: 8b 40 08 mov 0x8(%eax),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10d61f: 39 c3 cmp %eax,%ebx 10d621: 75 f1 jne 10d614 <_Heap_Walk+0x314> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d623: 57 push %edi 10d624: 68 10 20 12 00 push $0x122010 10d629: e9 a6 fd ff ff jmp 10d3d4 <_Heap_Walk+0xd4> 10d62e: 66 90 xchg %ax,%ax <== NOT EXECUTED " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d630: 52 push %edx 10d631: 56 push %esi 10d632: 50 push %eax 10d633: 51 push %ecx 10d634: 57 push %edi 10d635: 68 7c 1f 12 00 push $0x121f7c 10d63a: e9 85 fe ff ff jmp 10d4c4 <_Heap_Walk+0x1c4> 10d63f: 90 nop <== NOT EXECUTED Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d640: b8 1f 1c 12 00 mov $0x121c1f,%eax 10d645: eb 91 jmp 10d5d8 <_Heap_Walk+0x2d8> 10d647: 90 nop <== NOT EXECUTED 10d648: c7 45 c8 06 1c 12 00 movl $0x121c06,-0x38(%ebp) 10d64f: e9 6c ff ff ff jmp 10d5c0 <_Heap_Walk+0x2c0> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d654: c7 45 c8 15 1c 12 00 movl $0x121c15,-0x38(%ebp) 10d65b: e9 60 ff ff ff jmp 10d5c0 <_Heap_Walk+0x2c0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d660: b8 2f 1c 12 00 mov $0x121c2f,%eax 10d665: e9 6e ff ff ff jmp 10d5d8 <_Heap_Walk+0x2d8> 10d66a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !prev_used ) { (*printer)( 10d66c: 57 push %edi 10d66d: 68 b8 1f 12 00 push $0x121fb8 10d672: e9 5d fd ff ff jmp 10d3d4 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d677: 83 ec 0c sub $0xc,%esp 10d67a: 51 push %ecx 10d67b: 57 push %edi 10d67c: 68 b4 1e 12 00 push $0x121eb4 10d681: e9 3e fe ff ff jmp 10d4c4 <_Heap_Walk+0x1c4> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d686: 83 ec 08 sub $0x8,%esp 10d689: ff 75 d0 pushl -0x30(%ebp) 10d68c: 51 push %ecx 10d68d: 57 push %edi 10d68e: 68 e4 1e 12 00 push $0x121ee4 10d693: e9 2c fe ff ff jmp 10d4c4 <_Heap_Walk+0x1c4> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d698: 83 ec 0c sub $0xc,%esp 10d69b: 56 push %esi 10d69c: 57 push %edi 10d69d: 68 10 1f 12 00 push $0x121f10 10d6a2: e9 1d fe ff ff jmp 10d4c4 <_Heap_Walk+0x1c4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d6a7: 51 push %ecx 10d6a8: 68 20 1e 12 00 push $0x121e20 10d6ad: e9 22 fd ff ff jmp 10d3d4 <_Heap_Walk+0xd4> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d6b2: 51 push %ecx 10d6b3: 68 7f 1c 12 00 push $0x121c7f 10d6b8: e9 17 fd ff ff jmp 10d3d4 <_Heap_Walk+0xd4> =============================================================================== 0010bd7c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bd7c: 55 push %ebp 10bd7d: 89 e5 mov %esp,%ebp 10bd7f: 53 push %ebx 10bd80: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bd83: 8b 0d 20 6f 12 00 mov 0x126f20,%ecx 10bd89: 85 c9 test %ecx,%ecx 10bd8b: 74 1a je 10bda7 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10bd8d: 31 db xor %ebx,%ebx 10bd8f: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bd90: 52 push %edx 10bd91: 6a 00 push $0x0 10bd93: 6a 00 push $0x0 10bd95: 53 push %ebx 10bd96: e8 a5 51 00 00 call 110f40 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bd9b: 43 inc %ebx 10bd9c: 83 c4 10 add $0x10,%esp 10bd9f: 39 1d 20 6f 12 00 cmp %ebx,0x126f20 10bda5: 77 e9 ja 10bd90 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bda7: 8b 5d fc mov -0x4(%ebp),%ebx 10bdaa: c9 leave 10bdab: c3 ret =============================================================================== 0010bce4 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bce4: 55 push %ebp 10bce5: 89 e5 mov %esp,%ebp 10bce7: 57 push %edi 10bce8: 56 push %esi 10bce9: 53 push %ebx 10bcea: 83 ec 1c sub $0x1c,%esp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 10bced: 8b 1d 54 22 12 00 mov 0x122254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bcf3: a1 50 22 12 00 mov 0x122250,%eax 10bcf8: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bcfb: 8b 35 4c 22 12 00 mov 0x12224c,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10bd01: 39 f0 cmp %esi,%eax 10bd03: 73 5f jae 10bd64 <_IO_Manager_initialization+0x80> * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 10bd05: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bd08: c1 e1 03 shl $0x3,%ecx 10bd0b: 83 ec 0c sub $0xc,%esp 10bd0e: 51 push %ecx 10bd0f: 89 4d dc mov %ecx,-0x24(%ebp) 10bd12: e8 a1 2b 00 00 call 10e8b8 <_Workspace_Allocate_or_fatal_error> 10bd17: 89 c2 mov %eax,%edx /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 10bd19: a3 24 6f 12 00 mov %eax,0x126f24 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bd1e: 89 35 20 6f 12 00 mov %esi,0x126f20 memset( 10bd24: 31 c0 xor %eax,%eax 10bd26: 8b 4d dc mov -0x24(%ebp),%ecx 10bd29: 89 d7 mov %edx,%edi 10bd2b: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bd2d: 83 c4 10 add $0x10,%esp 10bd30: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd33: 85 c0 test %eax,%eax 10bd35: 74 25 je 10bd5c <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bd37: a1 24 6f 12 00 mov 0x126f24,%eax 10bd3c: 89 45 e0 mov %eax,-0x20(%ebp) 10bd3f: 31 c0 xor %eax,%eax 10bd41: 31 d2 xor %edx,%edx 10bd43: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bd44: 8b 7d e0 mov -0x20(%ebp),%edi 10bd47: 01 c7 add %eax,%edi 10bd49: 8d 34 03 lea (%ebx,%eax,1),%esi 10bd4c: b9 06 00 00 00 mov $0x6,%ecx 10bd51: f3 a5 rep movsl %ds:(%esi),%es:(%edi) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bd53: 42 inc %edx 10bd54: 83 c0 18 add $0x18,%eax 10bd57: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bd5a: 77 e8 ja 10bd44 <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd5c: 8d 65 f4 lea -0xc(%ebp),%esp 10bd5f: 5b pop %ebx 10bd60: 5e pop %esi 10bd61: 5f pop %edi 10bd62: c9 leave 10bd63: c3 ret * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10bd64: 89 1d 24 6f 12 00 mov %ebx,0x126f24 _IO_Number_of_drivers = number_of_drivers; 10bd6a: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd6d: a3 20 6f 12 00 mov %eax,0x126f20 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd72: 8d 65 f4 lea -0xc(%ebp),%esp 10bd75: 5b pop %ebx 10bd76: 5e pop %esi 10bd77: 5f pop %edi 10bd78: c9 leave 10bd79: c3 ret =============================================================================== 0010c8d0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c8d0: 55 push %ebp 10c8d1: 89 e5 mov %esp,%ebp 10c8d3: 53 push %ebx 10c8d4: 83 ec 08 sub $0x8,%esp 10c8d7: 8b 45 08 mov 0x8(%ebp),%eax 10c8da: 8b 55 0c mov 0xc(%ebp),%edx 10c8dd: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c8e0: a3 74 65 12 00 mov %eax,0x126574 _Internal_errors_What_happened.is_internal = is_internal; 10c8e5: 88 15 78 65 12 00 mov %dl,0x126578 _Internal_errors_What_happened.the_error = the_error; 10c8eb: 89 1d 7c 65 12 00 mov %ebx,0x12657c _User_extensions_Fatal( the_source, is_internal, the_error ); 10c8f1: 53 push %ebx 10c8f2: 0f b6 d2 movzbl %dl,%edx 10c8f5: 52 push %edx 10c8f6: 50 push %eax 10c8f7: e8 c4 1b 00 00 call 10e4c0 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c8fc: c7 05 80 66 12 00 05 movl $0x5,0x126680 <== NOT EXECUTED 10c903: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c906: fa cli <== NOT EXECUTED 10c907: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c909: f4 hlt <== NOT EXECUTED 10c90a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c90d: eb fe jmp 10c90d <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00111514 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 111514: 55 push %ebp 111515: 89 e5 mov %esp,%ebp 111517: 8b 45 08 mov 0x8(%ebp),%eax 11151a: 48 dec %eax 11151b: 83 f8 02 cmp $0x2,%eax 11151e: 77 0c ja 11152c <_Objects_API_maximum_class+0x18> 111520: 8b 04 85 c0 12 12 00 mov 0x1212c0(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 111527: c9 leave 111528: c3 ret 111529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 11152c: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 11152e: c9 leave 11152f: c3 ret =============================================================================== 0010c960 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c960: 55 push %ebp 10c961: 89 e5 mov %esp,%ebp 10c963: 56 push %esi 10c964: 53 push %ebx 10c965: 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 ) 10c968: 8b 43 18 mov 0x18(%ebx),%eax 10c96b: 85 c0 test %eax,%eax 10c96d: 75 0d jne 10c97c <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10c96f: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10c971: 89 c8 mov %ecx,%eax 10c973: 8d 65 f8 lea -0x8(%ebp),%esp 10c976: 5b pop %ebx 10c977: 5e pop %esi 10c978: c9 leave 10c979: c3 ret 10c97a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 10c97c: 8d 73 20 lea 0x20(%ebx),%esi 10c97f: 83 ec 0c sub $0xc,%esp 10c982: 56 push %esi 10c983: e8 60 f6 ff ff call 10bfe8 <_Chain_Get> 10c988: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c98a: 83 c4 10 add $0x10,%esp 10c98d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c991: 74 de je 10c971 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c993: 85 c0 test %eax,%eax 10c995: 74 29 je 10c9c0 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c997: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c99b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c99f: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10c9a1: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c9a5: 31 d2 xor %edx,%edx 10c9a7: f7 f6 div %esi information->inactive_per_block[ block ]--; 10c9a9: c1 e0 02 shl $0x2,%eax 10c9ac: 03 43 30 add 0x30(%ebx),%eax 10c9af: ff 08 decl (%eax) information->inactive--; 10c9b1: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10c9b5: 89 c8 mov %ecx,%eax 10c9b7: 8d 65 f8 lea -0x8(%ebp),%esp 10c9ba: 5b pop %ebx 10c9bb: 5e pop %esi 10c9bc: c9 leave 10c9bd: c3 ret 10c9be: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10c9c0: 83 ec 0c sub $0xc,%esp 10c9c3: 53 push %ebx 10c9c4: e8 3b 00 00 00 call 10ca04 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c9c9: 89 34 24 mov %esi,(%esp) 10c9cc: e8 17 f6 ff ff call 10bfe8 <_Chain_Get> 10c9d1: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c9d3: 83 c4 10 add $0x10,%esp 10c9d6: 85 c0 test %eax,%eax 10c9d8: 74 97 je 10c971 <_Objects_Allocate+0x11> 10c9da: eb bb jmp 10c997 <_Objects_Allocate+0x37> =============================================================================== 0010ca04 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10ca04: 55 push %ebp 10ca05: 89 e5 mov %esp,%ebp 10ca07: 57 push %edi 10ca08: 56 push %esi 10ca09: 53 push %ebx 10ca0a: 83 ec 4c sub $0x4c,%esp 10ca0d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10ca10: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10ca14: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10ca17: 8b 4b 34 mov 0x34(%ebx),%ecx 10ca1a: 85 c9 test %ecx,%ecx 10ca1c: 0f 84 66 02 00 00 je 10cc88 <_Objects_Extend_information+0x284> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10ca22: 8b 73 10 mov 0x10(%ebx),%esi 10ca25: 66 89 75 d0 mov %si,-0x30(%ebp) 10ca29: 8b 7b 14 mov 0x14(%ebx),%edi 10ca2c: 89 f0 mov %esi,%eax 10ca2e: 31 d2 xor %edx,%edx 10ca30: 66 f7 f7 div %di 10ca33: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10ca36: 85 f6 test %esi,%esi 10ca38: 0f 84 63 02 00 00 je 10cca1 <_Objects_Extend_information+0x29d><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10ca3e: 8b 01 mov (%ecx),%eax 10ca40: 85 c0 test %eax,%eax 10ca42: 0f 84 6b 02 00 00 je 10ccb3 <_Objects_Extend_information+0x2af><== NEVER TAKEN 10ca48: 0f b7 ff movzwl %di,%edi /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10ca4b: 8b 55 cc mov -0x34(%ebp),%edx 10ca4e: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10ca51: 31 d2 xor %edx,%edx 10ca53: 8b 45 d4 mov -0x2c(%ebp),%eax 10ca56: eb 0a jmp 10ca62 <_Objects_Extend_information+0x5e> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10ca58: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10ca5c: 0f 84 c6 01 00 00 je 10cc28 <_Objects_Extend_information+0x224> do_extend = false; break; } else index_base += information->allocation_size; 10ca62: 01 f8 add %edi,%eax if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10ca64: 42 inc %edx 10ca65: 39 d6 cmp %edx,%esi 10ca67: 77 ef ja 10ca58 <_Objects_Extend_information+0x54> 10ca69: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10ca6c: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10ca6e: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10ca72: 01 f8 add %edi,%eax 10ca74: 89 45 d0 mov %eax,-0x30(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10ca77: 3d ff ff 00 00 cmp $0xffff,%eax 10ca7c: 0f 87 9e 01 00 00 ja 10cc20 <_Objects_Extend_information+0x21c> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10ca82: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10ca86: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ca8a: 0f 84 a4 01 00 00 je 10cc34 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); 10ca90: 83 ec 0c sub $0xc,%esp 10ca93: 57 push %edi 10ca94: 89 55 b8 mov %edx,-0x48(%ebp) 10ca97: 88 4d b4 mov %cl,-0x4c(%ebp) 10ca9a: e8 e5 1d 00 00 call 10e884 <_Workspace_Allocate> 10ca9f: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10caa2: 83 c4 10 add $0x10,%esp 10caa5: 85 c0 test %eax,%eax 10caa7: 8b 55 b8 mov -0x48(%ebp),%edx 10caaa: 8a 4d b4 mov -0x4c(%ebp),%cl 10caad: 0f 84 6d 01 00 00 je 10cc20 <_Objects_Extend_information+0x21c> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10cab3: 84 c9 test %cl,%cl 10cab5: 0f 84 ea 00 00 00 je 10cba5 <_Objects_Extend_information+0x1a1> */ /* * Up the block count and maximum */ block_count++; 10cabb: 8d 7e 01 lea 0x1(%esi),%edi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10cabe: 83 ec 0c sub $0xc,%esp /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10cac1: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10cac4: 03 45 d0 add -0x30(%ebp),%eax /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10cac7: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10caca: c1 e0 02 shl $0x2,%eax (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10cacd: 50 push %eax 10cace: 89 55 b8 mov %edx,-0x48(%ebp) 10cad1: e8 ae 1d 00 00 call 10e884 <_Workspace_Allocate> 10cad6: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10cad9: 83 c4 10 add $0x10,%esp 10cadc: 85 c0 test %eax,%eax 10cade: 8b 55 b8 mov -0x48(%ebp),%edx 10cae1: 0f 84 de 01 00 00 je 10ccc5 <_Objects_Extend_information+0x2c1> 10cae7: 8b 45 c4 mov -0x3c(%ebp),%eax 10caea: 8d 04 b8 lea (%eax,%edi,4),%eax 10caed: 89 45 bc mov %eax,-0x44(%ebp) 10caf0: 8b 4d c4 mov -0x3c(%ebp),%ecx 10caf3: 8d 04 f9 lea (%ecx,%edi,8),%eax * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10caf6: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cafa: 39 4d cc cmp %ecx,-0x34(%ebp) 10cafd: 0f 82 51 01 00 00 jb 10cc54 <_Objects_Extend_information+0x250> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10cb03: 8b 4d cc mov -0x34(%ebp),%ecx 10cb06: 85 c9 test %ecx,%ecx 10cb08: 74 12 je 10cb1c <_Objects_Extend_information+0x118><== NEVER TAKEN 10cb0a: 31 c9 xor %ecx,%ecx 10cb0c: 8b 7d cc mov -0x34(%ebp),%edi 10cb0f: 90 nop local_table[ index ] = NULL; 10cb10: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10cb17: 41 inc %ecx 10cb18: 39 cf cmp %ecx,%edi 10cb1a: 77 f4 ja 10cb10 <_Objects_Extend_information+0x10c><== NEVER TAKEN 10cb1c: c1 e6 02 shl $0x2,%esi 10cb1f: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10cb22: 8b 4d c4 mov -0x3c(%ebp),%ecx 10cb25: 8b 75 c0 mov -0x40(%ebp),%esi 10cb28: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10cb2f: 8b 4d bc mov -0x44(%ebp),%ecx 10cb32: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10cb39: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cb3d: 03 75 d4 add -0x2c(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10cb40: 39 75 d4 cmp %esi,-0x2c(%ebp) 10cb43: 73 0f jae 10cb54 <_Objects_Extend_information+0x150><== NEVER TAKEN 10cb45: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10cb48: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10cb4f: 41 inc %ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10cb50: 39 f1 cmp %esi,%ecx 10cb52: 72 f4 jb 10cb48 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10cb54: 9c pushf 10cb55: fa cli 10cb56: 5f pop %edi old_tables = information->object_blocks; 10cb57: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10cb5a: 8b 75 c4 mov -0x3c(%ebp),%esi 10cb5d: 89 73 34 mov %esi,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10cb60: 8b 75 bc mov -0x44(%ebp),%esi 10cb63: 89 73 30 mov %esi,0x30(%ebx) information->local_table = local_table; 10cb66: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10cb69: 8b 45 d0 mov -0x30(%ebp),%eax 10cb6c: 66 89 43 10 mov %ax,0x10(%ebx) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb70: 8b 33 mov (%ebx),%esi 10cb72: c1 e6 18 shl $0x18,%esi 10cb75: 81 ce 00 00 01 00 or $0x10000,%esi information->maximum_id = _Objects_Build_id( 10cb7b: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb7f: c1 e0 1b shl $0x1b,%eax 10cb82: 09 c6 or %eax,%esi 10cb84: 0f b7 45 d0 movzwl -0x30(%ebp),%eax uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb88: 09 c6 or %eax,%esi 10cb8a: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cb8d: 57 push %edi 10cb8e: 9d popf if ( old_tables ) 10cb8f: 85 c9 test %ecx,%ecx 10cb91: 74 12 je 10cba5 <_Objects_Extend_information+0x1a1> _Workspace_Free( old_tables ); 10cb93: 83 ec 0c sub $0xc,%esp 10cb96: 51 push %ecx 10cb97: 89 55 b8 mov %edx,-0x48(%ebp) 10cb9a: e8 01 1d 00 00 call 10e8a0 <_Workspace_Free> 10cb9f: 83 c4 10 add $0x10,%esp 10cba2: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10cba5: c1 e2 02 shl $0x2,%edx 10cba8: 89 55 d0 mov %edx,-0x30(%ebp) 10cbab: 8b 43 34 mov 0x34(%ebx),%eax 10cbae: 8b 4d c8 mov -0x38(%ebp),%ecx 10cbb1: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cbb4: ff 73 18 pushl 0x18(%ebx) 10cbb7: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cbbb: 50 push %eax 10cbbc: 51 push %ecx 10cbbd: 8d 7d dc lea -0x24(%ebp),%edi 10cbc0: 57 push %edi 10cbc1: e8 ba 43 00 00 call 110f80 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cbc6: 83 c4 10 add $0x10,%esp 10cbc9: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cbcc: 8d 43 20 lea 0x20(%ebx),%eax 10cbcf: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cbd2: eb 29 jmp 10cbfd <_Objects_Extend_information+0x1f9> 10cbd4: 8b 13 mov (%ebx),%edx 10cbd6: c1 e2 18 shl $0x18,%edx 10cbd9: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cbdf: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cbe3: c1 e1 1b shl $0x1b,%ecx 10cbe6: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cbe8: 09 f2 or %esi,%edx 10cbea: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cbed: 83 ec 08 sub $0x8,%esp 10cbf0: 50 push %eax 10cbf1: ff 75 d4 pushl -0x2c(%ebp) 10cbf4: e8 b3 f3 ff ff call 10bfac <_Chain_Append> index++; 10cbf9: 46 inc %esi 10cbfa: 83 c4 10 add $0x10,%esp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cbfd: 83 ec 0c sub $0xc,%esp 10cc00: 57 push %edi 10cc01: e8 e2 f3 ff ff call 10bfe8 <_Chain_Get> 10cc06: 83 c4 10 add $0x10,%esp 10cc09: 85 c0 test %eax,%eax 10cc0b: 75 c7 jne 10cbd4 <_Objects_Extend_information+0x1d0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cc0d: 8b 43 14 mov 0x14(%ebx),%eax 10cc10: 8b 53 30 mov 0x30(%ebx),%edx 10cc13: 0f b7 c8 movzwl %ax,%ecx 10cc16: 8b 75 d0 mov -0x30(%ebp),%esi 10cc19: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10cc1c: 66 01 43 2c add %ax,0x2c(%ebx) } 10cc20: 8d 65 f4 lea -0xc(%ebp),%esp 10cc23: 5b pop %ebx 10cc24: 5e pop %esi 10cc25: 5f pop %edi 10cc26: c9 leave 10cc27: c3 ret 10cc28: 89 45 d4 mov %eax,-0x2c(%ebp) else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10cc2b: 31 c9 xor %ecx,%ecx 10cc2d: e9 3c fe ff ff jmp 10ca6e <_Objects_Extend_information+0x6a> 10cc32: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10cc34: 83 ec 0c sub $0xc,%esp 10cc37: 57 push %edi 10cc38: 89 55 b8 mov %edx,-0x48(%ebp) 10cc3b: 88 4d b4 mov %cl,-0x4c(%ebp) 10cc3e: e8 75 1c 00 00 call 10e8b8 <_Workspace_Allocate_or_fatal_error> 10cc43: 89 45 c8 mov %eax,-0x38(%ebp) 10cc46: 83 c4 10 add $0x10,%esp 10cc49: 8a 4d b4 mov -0x4c(%ebp),%cl 10cc4c: 8b 55 b8 mov -0x48(%ebp),%edx 10cc4f: e9 5f fe ff ff jmp 10cab3 <_Objects_Extend_information+0xaf> /* * 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, 10cc54: c1 e6 02 shl $0x2,%esi 10cc57: 89 75 c0 mov %esi,-0x40(%ebp) 10cc5a: 8b 73 34 mov 0x34(%ebx),%esi 10cc5d: 8b 7d c4 mov -0x3c(%ebp),%edi 10cc60: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc63: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cc65: 8b 73 30 mov 0x30(%ebx),%esi 10cc68: 8b 7d bc mov -0x44(%ebp),%edi 10cc6b: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc6e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 10cc70: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cc74: 03 4d cc add -0x34(%ebp),%ecx information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10cc77: c1 e1 02 shl $0x2,%ecx 10cc7a: 8b 73 1c mov 0x1c(%ebx),%esi 10cc7d: 89 c7 mov %eax,%edi 10cc7f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cc81: e9 9c fe ff ff jmp 10cb22 <_Objects_Extend_information+0x11e> 10cc86: 66 90 xchg %ax,%ax <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cc88: 8b 53 10 mov 0x10(%ebx),%edx 10cc8b: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cc8f: 0f b7 7b 14 movzwl 0x14(%ebx),%edi /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cc93: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10cc96: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc98: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cc9a: 31 f6 xor %esi,%esi 10cc9c: e9 cd fd ff ff jmp 10ca6e <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cca1: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cca4: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cca7: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10ccaa: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10ccac: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ccae: e9 bb fd ff ff jmp 10ca6e <_Objects_Extend_information+0x6a><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10ccb3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10ccb6: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10ccb9: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10ccbc: 31 c9 xor %ecx,%ecx <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10ccbe: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ccc0: e9 a9 fd ff ff jmp 10ca6e <_Objects_Extend_information+0x6a><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10ccc5: 83 ec 0c sub $0xc,%esp 10ccc8: ff 75 c8 pushl -0x38(%ebp) 10cccb: e8 d0 1b 00 00 call 10e8a0 <_Workspace_Free> return; 10ccd0: 83 c4 10 add $0x10,%esp 10ccd3: e9 48 ff ff ff jmp 10cc20 <_Objects_Extend_information+0x21c> =============================================================================== 0010ce18 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10ce18: 55 push %ebp 10ce19: 89 e5 mov %esp,%ebp 10ce1b: 53 push %ebx 10ce1c: 83 ec 14 sub $0x14,%esp 10ce1f: 8b 55 08 mov 0x8(%ebp),%edx 10ce22: 8b 5d 10 mov 0x10(%ebp),%ebx * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10ce25: b8 01 00 00 00 mov $0x1,%eax 10ce2a: 2b 42 08 sub 0x8(%edx),%eax 10ce2d: 03 45 0c add 0xc(%ebp),%eax /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 10ce30: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10ce34: 39 c8 cmp %ecx,%eax 10ce36: 77 24 ja 10ce5c <_Objects_Get+0x44> 10ce38: 8b 0d d4 64 12 00 mov 0x1264d4,%ecx 10ce3e: 41 inc %ecx 10ce3f: 89 0d d4 64 12 00 mov %ecx,0x1264d4 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10ce45: 8b 52 1c mov 0x1c(%edx),%edx 10ce48: 8b 04 82 mov (%edx,%eax,4),%eax 10ce4b: 85 c0 test %eax,%eax 10ce4d: 74 1b je 10ce6a <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10ce4f: c7 03 00 00 00 00 movl $0x0,(%ebx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10ce55: 83 c4 14 add $0x14,%esp 10ce58: 5b pop %ebx 10ce59: c9 leave 10ce5a: c3 ret 10ce5b: 90 nop <== NOT EXECUTED /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10ce5c: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10ce62: 31 c0 xor %eax,%eax #endif } 10ce64: 83 c4 14 add $0x14,%esp 10ce67: 5b pop %ebx 10ce68: c9 leave 10ce69: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10ce6a: 89 45 f4 mov %eax,-0xc(%ebp) 10ce6d: e8 36 08 00 00 call 10d6a8 <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10ce72: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10ce78: 8b 45 f4 mov -0xc(%ebp),%eax 10ce7b: eb d8 jmp 10ce55 <_Objects_Get+0x3d> =============================================================================== 0010cd68 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10cd68: 55 push %ebp 10cd69: 89 e5 mov %esp,%ebp 10cd6b: 56 push %esi 10cd6c: 53 push %ebx 10cd6d: 8b 75 08 mov 0x8(%ebp),%esi 10cd70: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cd73: 66 85 db test %bx,%bx 10cd76: 75 0c jne 10cd84 <_Objects_Get_information+0x1c> the_class_api_maximum = _Objects_API_maximum_class( the_api ); if ( the_class_api_maximum == 0 ) return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; 10cd78: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10cd7a: 8d 65 f8 lea -0x8(%ebp),%esp 10cd7d: 5b pop %ebx 10cd7e: 5e pop %esi 10cd7f: c9 leave 10cd80: c3 ret 10cd81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10cd84: 83 ec 0c sub $0xc,%esp 10cd87: 56 push %esi 10cd88: e8 87 47 00 00 call 111514 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10cd8d: 83 c4 10 add $0x10,%esp 10cd90: 85 c0 test %eax,%eax 10cd92: 74 e4 je 10cd78 <_Objects_Get_information+0x10> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cd94: 0f b7 db movzwl %bx,%ebx 10cd97: 39 d8 cmp %ebx,%eax 10cd99: 72 dd jb 10cd78 <_Objects_Get_information+0x10> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cd9b: 8b 14 b5 ac 64 12 00 mov 0x1264ac(,%esi,4),%edx return NULL; 10cda2: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cda4: 85 d2 test %edx,%edx 10cda6: 74 d2 je 10cd7a <_Objects_Get_information+0x12><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cda8: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10cdab: 85 c0 test %eax,%eax 10cdad: 74 cb je 10cd7a <_Objects_Get_information+0x12><== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 10cdaf: 31 d2 xor %edx,%edx 10cdb1: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cdb6: 0f 95 c2 setne %dl 10cdb9: f7 da neg %edx 10cdbb: 21 d0 and %edx,%eax 10cdbd: eb bb jmp 10cd7a <_Objects_Get_information+0x12> =============================================================================== 0010cdc0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cdc0: 55 push %ebp 10cdc1: 89 e5 mov %esp,%ebp 10cdc3: 56 push %esi 10cdc4: 53 push %ebx 10cdc5: 8b 55 08 mov 0x8(%ebp),%edx 10cdc8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cdcb: b8 01 00 00 00 mov $0x1,%eax 10cdd0: 2b 42 08 sub 0x8(%edx),%eax 10cdd3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cdd6: 9c pushf 10cdd7: fa cli 10cdd8: 5e pop %esi if ( information->maximum >= index ) { 10cdd9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cddd: 39 c8 cmp %ecx,%eax 10cddf: 77 1b ja 10cdfc <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cde1: 8b 52 1c mov 0x1c(%edx),%edx 10cde4: 8b 04 82 mov (%edx,%eax,4),%eax 10cde7: 85 c0 test %eax,%eax 10cde9: 74 21 je 10ce0c <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cdeb: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cdf1: 8b 55 14 mov 0x14(%ebp),%edx 10cdf4: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cdf6: 5b pop %ebx 10cdf7: 5e pop %esi 10cdf8: c9 leave 10cdf9: c3 ret 10cdfa: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cdfc: 56 push %esi 10cdfd: 9d popf *location = OBJECTS_ERROR; 10cdfe: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10ce04: 31 c0 xor %eax,%eax #endif } 10ce06: 5b pop %ebx 10ce07: 5e pop %esi 10ce08: c9 leave 10ce09: c3 ret 10ce0a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10ce0c: 56 push %esi 10ce0d: 9d popf *location = OBJECTS_ERROR; 10ce0e: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10ce14: eb e0 jmp 10cdf6 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e49c <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e49c: 55 push %ebp 10e49d: 89 e5 mov %esp,%ebp 10e49f: 57 push %edi 10e4a0: 56 push %esi 10e4a1: 53 push %ebx 10e4a2: 83 ec 2c sub $0x2c,%esp 10e4a5: 8b 55 08 mov 0x8(%ebp),%edx 10e4a8: 8b 75 0c mov 0xc(%ebp),%esi 10e4ab: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e4ae: 85 f6 test %esi,%esi 10e4b0: 75 0e jne 10e4c0 <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e4b2: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e4b4: 89 d8 mov %ebx,%eax 10e4b6: 8d 65 f4 lea -0xc(%ebp),%esp 10e4b9: 5b pop %ebx 10e4ba: 5e pop %esi 10e4bb: 5f pop %edi 10e4bc: c9 leave 10e4bd: c3 ret 10e4be: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e4c0: 85 db test %ebx,%ebx 10e4c2: 74 f0 je 10e4b4 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e4c4: 85 d2 test %edx,%edx 10e4c6: 75 08 jne 10e4d0 <_Objects_Get_name_as_string+0x34> 10e4c8: a1 58 29 13 00 mov 0x132958,%eax 10e4cd: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 10e4d0: 83 ec 0c sub $0xc,%esp 10e4d3: 52 push %edx 10e4d4: 89 55 cc mov %edx,-0x34(%ebp) 10e4d7: e8 f0 fe ff ff call 10e3cc <_Objects_Get_information_id> 10e4dc: 89 c7 mov %eax,%edi if ( !information ) 10e4de: 83 c4 10 add $0x10,%esp 10e4e1: 85 c0 test %eax,%eax 10e4e3: 8b 55 cc mov -0x34(%ebp),%edx 10e4e6: 74 ca je 10e4b2 <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e4e8: 51 push %ecx 10e4e9: 8d 45 e4 lea -0x1c(%ebp),%eax 10e4ec: 50 push %eax 10e4ed: 52 push %edx 10e4ee: 57 push %edi 10e4ef: e8 90 00 00 00 call 10e584 <_Objects_Get> switch ( location ) { 10e4f4: 83 c4 10 add $0x10,%esp 10e4f7: 8b 55 e4 mov -0x1c(%ebp),%edx 10e4fa: 85 d2 test %edx,%edx 10e4fc: 75 b4 jne 10e4b2 <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10e4fe: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10e502: 74 54 je 10e558 <_Objects_Get_name_as_string+0xbc> s = the_object->name.name_p; 10e504: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 10e507: 85 ff test %edi,%edi 10e509: 74 74 je 10e57f <_Objects_Get_name_as_string+0xe3> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e50b: 4e dec %esi 10e50c: 89 75 d4 mov %esi,-0x2c(%ebp) 10e50f: 74 6e je 10e57f <_Objects_Get_name_as_string+0xe3><== NEVER TAKEN 10e511: 8a 07 mov (%edi),%al 10e513: 84 c0 test %al,%al 10e515: 74 68 je 10e57f <_Objects_Get_name_as_string+0xe3> 10e517: 89 d9 mov %ebx,%ecx 10e519: 31 d2 xor %edx,%edx 10e51b: 89 5d d0 mov %ebx,-0x30(%ebp) 10e51e: eb 07 jmp 10e527 <_Objects_Get_name_as_string+0x8b> 10e520: 8a 04 17 mov (%edi,%edx,1),%al 10e523: 84 c0 test %al,%al 10e525: 74 21 je 10e548 <_Objects_Get_name_as_string+0xac> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e527: 0f b6 d8 movzbl %al,%ebx 10e52a: 8b 35 88 82 12 00 mov 0x128288,%esi 10e530: 0f be 5c 1e 01 movsbl 0x1(%esi,%ebx,1),%ebx 10e535: 81 e3 97 00 00 00 and $0x97,%ebx 10e53b: 75 02 jne 10e53f <_Objects_Get_name_as_string+0xa3> 10e53d: b0 2a mov $0x2a,%al 10e53f: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e541: 42 inc %edx 10e542: 41 inc %ecx 10e543: 3b 55 d4 cmp -0x2c(%ebp),%edx 10e546: 72 d8 jb 10e520 <_Objects_Get_name_as_string+0x84> 10e548: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e54b: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e54e: e8 c1 08 00 00 call 10ee14 <_Thread_Enable_dispatch> return name; 10e553: e9 5c ff ff ff jmp 10e4b4 <_Objects_Get_name_as_string+0x18> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 10e558: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10e55b: 89 c2 mov %eax,%edx 10e55d: c1 ea 18 shr $0x18,%edx 10e560: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e563: 89 c2 mov %eax,%edx 10e565: c1 ea 10 shr $0x10,%edx 10e568: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e56b: 89 c2 mov %eax,%edx 10e56d: c1 ea 08 shr $0x8,%edx 10e570: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e573: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e576: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; 10e57a: 8d 7d df lea -0x21(%ebp),%edi 10e57d: eb 8c jmp 10e50b <_Objects_Get_name_as_string+0x6f> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e57f: 89 d9 mov %ebx,%ecx 10e581: eb c8 jmp 10e54b <_Objects_Get_name_as_string+0xaf> =============================================================================== 0010cf60 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10cf60: 55 push %ebp 10cf61: 89 e5 mov %esp,%ebp 10cf63: 57 push %edi 10cf64: 56 push %esi 10cf65: 53 push %ebx 10cf66: 83 ec 0c sub $0xc,%esp 10cf69: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf6c: 8b 75 0c mov 0xc(%ebp),%esi 10cf6f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10cf72: 85 db test %ebx,%ebx 10cf74: 75 0a jne 10cf80 <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10cf76: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf78: 8d 65 f4 lea -0xc(%ebp),%esp 10cf7b: 5b pop %ebx 10cf7c: 5e pop %esi 10cf7d: 5f pop %edi 10cf7e: c9 leave 10cf7f: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10cf80: 85 ff test %edi,%edi 10cf82: 74 f2 je 10cf76 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10cf84: 8b 45 14 mov 0x14(%ebp),%eax 10cf87: 85 c0 test %eax,%eax 10cf89: 74 eb je 10cf76 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10cf8b: 66 85 f6 test %si,%si 10cf8e: 75 04 jne 10cf94 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10cf90: 8b 73 08 mov 0x8(%ebx),%esi 10cf93: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10cf94: 66 39 73 10 cmp %si,0x10(%ebx) 10cf98: 72 22 jb 10cfbc <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10cf9a: 51 push %ecx 10cf9b: 57 push %edi 10cf9c: 56 push %esi 10cf9d: 53 push %ebx 10cf9e: e8 2d 00 00 00 call 10cfd0 <_Objects_Get> next_id++; 10cfa3: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10cfa4: 83 c4 10 add $0x10,%esp 10cfa7: 8b 17 mov (%edi),%edx 10cfa9: 85 d2 test %edx,%edx 10cfab: 75 e7 jne 10cf94 <_Objects_Get_next+0x34> *next_id_p = next_id; 10cfad: 8b 55 14 mov 0x14(%ebp),%edx 10cfb0: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cfb2: 8d 65 f4 lea -0xc(%ebp),%esp 10cfb5: 5b pop %ebx 10cfb6: 5e pop %esi 10cfb7: 5f pop %edi 10cfb8: c9 leave 10cfb9: c3 ret 10cfba: 66 90 xchg %ax,%ax <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10cfbc: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10cfc2: 8b 45 14 mov 0x14(%ebp),%eax 10cfc5: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10cfcb: 31 c0 xor %eax,%eax 10cfcd: eb a9 jmp 10cf78 <_Objects_Get_next+0x18> =============================================================================== 0011b244 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b244: 55 push %ebp 11b245: 89 e5 mov %esp,%ebp 11b247: 53 push %ebx 11b248: 8b 55 08 mov 0x8(%ebp),%edx 11b24b: 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; 11b24e: b8 01 00 00 00 mov $0x1,%eax 11b253: 2b 42 08 sub 0x8(%edx),%eax 11b256: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b259: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b25d: 39 c8 cmp %ecx,%eax 11b25f: 77 13 ja 11b274 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b261: 8b 52 1c mov 0x1c(%edx),%edx 11b264: 8b 04 82 mov (%edx,%eax,4),%eax 11b267: 85 c0 test %eax,%eax 11b269: 74 09 je 11b274 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b26b: c7 03 00 00 00 00 movl $0x0,(%ebx) * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 11b271: 5b pop %ebx 11b272: c9 leave 11b273: c3 ret /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11b274: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b27a: 31 c0 xor %eax,%eax } 11b27c: 5b pop %ebx 11b27d: c9 leave 11b27e: c3 ret =============================================================================== 0010e0c0 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e0c0: 55 push %ebp 10e0c1: 89 e5 mov %esp,%ebp 10e0c3: 83 ec 18 sub $0x18,%esp 10e0c6: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e0c9: 85 d2 test %edx,%edx 10e0cb: 75 08 jne 10e0d5 <_Objects_Id_to_name+0x15> 10e0cd: a1 58 a6 12 00 mov 0x12a658,%eax 10e0d2: 8b 50 08 mov 0x8(%eax),%edx 10e0d5: 89 d0 mov %edx,%eax 10e0d7: c1 e8 18 shr $0x18,%eax 10e0da: 83 e0 07 and $0x7,%eax */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10e0dd: 8d 48 ff lea -0x1(%eax),%ecx 10e0e0: 83 f9 02 cmp $0x2,%ecx 10e0e3: 77 1d ja 10e102 <_Objects_Id_to_name+0x42> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10e0e5: 8b 04 85 6c a0 12 00 mov 0x12a06c(,%eax,4),%eax 10e0ec: 85 c0 test %eax,%eax 10e0ee: 74 12 je 10e102 <_Objects_Id_to_name+0x42> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e0f0: 89 d1 mov %edx,%ecx 10e0f2: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e0f5: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e0f8: 85 c0 test %eax,%eax 10e0fa: 74 06 je 10e102 <_Objects_Id_to_name+0x42><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10e0fc: 80 78 38 00 cmpb $0x0,0x38(%eax) 10e100: 74 0a je 10e10c <_Objects_Id_to_name+0x4c><== ALWAYS TAKEN the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 10e102: b8 03 00 00 00 mov $0x3,%eax return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e107: c9 leave 10e108: c3 ret 10e109: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10e10c: 51 push %ecx 10e10d: 8d 4d f4 lea -0xc(%ebp),%ecx 10e110: 51 push %ecx 10e111: 52 push %edx 10e112: 50 push %eax 10e113: e8 40 ff ff ff call 10e058 <_Objects_Get> if ( !the_object ) 10e118: 83 c4 10 add $0x10,%esp 10e11b: 85 c0 test %eax,%eax 10e11d: 74 e3 je 10e102 <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 10e11f: 8b 50 0c mov 0xc(%eax),%edx 10e122: 8b 45 0c mov 0xc(%ebp),%eax 10e125: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e127: e8 2c 08 00 00 call 10e958 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e12c: 31 c0 xor %eax,%eax } 10e12e: c9 leave 10e12f: c3 ret =============================================================================== 0010ce80 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10ce80: 55 push %ebp 10ce81: 89 e5 mov %esp,%ebp 10ce83: 57 push %edi 10ce84: 56 push %esi 10ce85: 53 push %ebx 10ce86: 83 ec 0c sub $0xc,%esp 10ce89: 8b 45 08 mov 0x8(%ebp),%eax 10ce8c: 8b 55 0c mov 0xc(%ebp),%edx 10ce8f: 8b 5d 10 mov 0x10(%ebp),%ebx 10ce92: 8b 75 20 mov 0x20(%ebp),%esi 10ce95: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10ce99: 89 10 mov %edx,(%eax) information->the_class = the_class; 10ce9b: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10ce9f: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cea2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cea9: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10ceb0: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10ceb7: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10cebd: 8b 7d 1c mov 0x1c(%ebp),%edi 10cec0: 89 f9 mov %edi,%ecx 10cec2: 88 48 38 mov %cl,0x38(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10cec5: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10cecb: 0f b7 db movzwl %bx,%ebx 10cece: 8b 3c 95 ac 64 12 00 mov 0x1264ac(,%edx,4),%edi 10ced5: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10ced8: 8b 7d 14 mov 0x14(%ebp),%edi 10cedb: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10cede: 89 f9 mov %edi,%ecx 10cee0: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cee3: 8b 4d 14 mov 0x14(%ebp),%ecx 10cee6: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10ceec: 85 ff test %edi,%edi 10ceee: 74 04 je 10cef4 <_Objects_Initialize_information+0x74> 10cef0: 85 c9 test %ecx,%ecx 10cef2: 74 67 je 10cf5b <_Objects_Initialize_information+0xdb><== NEVER TAKEN } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cef4: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10cef8: c7 40 1c 44 61 12 00 movl $0x126144,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ceff: c1 e2 18 shl $0x18,%edx 10cf02: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cf08: c1 e3 1b shl $0x1b,%ebx 10cf0b: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10cf0d: 31 db xor %ebx,%ebx 10cf0f: 85 c9 test %ecx,%ecx 10cf11: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cf14: 09 da or %ebx,%edx 10cf16: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cf19: f7 c6 03 00 00 00 test $0x3,%esi 10cf1f: 75 23 jne 10cf44 <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10cf21: 66 89 70 3a mov %si,0x3a(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10cf25: 8d 50 24 lea 0x24(%eax),%edx 10cf28: 89 50 20 mov %edx,0x20(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10cf2b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) _Chain_Initialize_empty( &information->Inactive ); 10cf32: 8d 50 20 lea 0x20(%eax),%edx 10cf35: 89 50 28 mov %edx,0x28(%eax) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10cf38: 85 c9 test %ecx,%ecx 10cf3a: 75 10 jne 10cf4c <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cf3c: 8d 65 f4 lea -0xc(%ebp),%esp 10cf3f: 5b pop %ebx 10cf40: 5e pop %esi 10cf41: 5f pop %edi 10cf42: c9 leave 10cf43: c3 ret * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10cf44: 83 c6 04 add $0x4,%esi 10cf47: 83 e6 fc and $0xfffffffc,%esi 10cf4a: eb d5 jmp 10cf21 <_Objects_Initialize_information+0xa1> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10cf4c: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cf4f: 8d 65 f4 lea -0xc(%ebp),%esp 10cf52: 5b pop %ebx 10cf53: 5e pop %esi 10cf54: 5f pop %edi 10cf55: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10cf56: e9 a9 fa ff ff jmp 10ca04 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cf5b: 50 push %eax 10cf5c: 6a 13 push $0x13 10cf5e: 6a 01 push $0x1 10cf60: 6a 00 push $0x0 10cf62: e8 69 f9 ff ff call 10c8d0 <_Internal_error_Occurred> =============================================================================== 0011786c <_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 ) { 11786c: 55 push %ebp 11786d: 89 e5 mov %esp,%ebp 11786f: 57 push %edi 117870: 56 push %esi 117871: 53 push %ebx 117872: 83 ec 1c sub $0x1c,%esp 117875: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 117878: 8b 5d 10 mov 0x10(%ebp),%ebx 11787b: 85 db test %ebx,%ebx 11787d: 74 75 je 1178f4 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 11787f: 8b 4d 0c mov 0xc(%ebp),%ecx 117882: 85 c9 test %ecx,%ecx 117884: 74 4b je 1178d1 <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 117886: 8b 47 10 mov 0x10(%edi),%eax 117889: 66 85 c0 test %ax,%ax 11788c: 74 43 je 1178d1 <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 11788e: 0f b7 c0 movzwl %ax,%eax 117891: 89 45 e4 mov %eax,-0x1c(%ebp) 117894: 8b 47 1c mov 0x1c(%edi),%eax 117897: bb 01 00 00 00 mov $0x1,%ebx 11789c: 89 7d e0 mov %edi,-0x20(%ebp) 11789f: 89 c7 mov %eax,%edi 1178a1: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 1178a4: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 1178a7: 85 f6 test %esi,%esi 1178a9: 74 20 je 1178cb <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 1178ab: 8b 46 0c mov 0xc(%esi),%eax 1178ae: 85 c0 test %eax,%eax 1178b0: 74 19 je 1178cb <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 1178b2: 52 push %edx 1178b3: 8b 4d e0 mov -0x20(%ebp),%ecx 1178b6: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 1178ba: 52 push %edx 1178bb: 50 push %eax 1178bc: ff 75 0c pushl 0xc(%ebp) 1178bf: e8 d8 35 00 00 call 11ae9c 1178c4: 83 c4 10 add $0x10,%esp 1178c7: 85 c0 test %eax,%eax 1178c9: 74 15 je 1178e0 <_Objects_Name_to_id_string+0x74> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1178cb: 43 inc %ebx 1178cc: 3b 5d e4 cmp -0x1c(%ebp),%ebx 1178cf: 76 d3 jbe 1178a4 <_Objects_Name_to_id_string+0x38> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } } } return OBJECTS_INVALID_NAME; 1178d1: b8 01 00 00 00 mov $0x1,%eax } 1178d6: 8d 65 f4 lea -0xc(%ebp),%esp 1178d9: 5b pop %ebx 1178da: 5e pop %esi 1178db: 5f pop %edi 1178dc: c9 leave 1178dd: c3 ret 1178de: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 1178e0: 8b 46 08 mov 0x8(%esi),%eax 1178e3: 8b 55 10 mov 0x10(%ebp),%edx 1178e6: 89 02 mov %eax,(%edx) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 1178e8: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 1178ea: 8d 65 f4 lea -0xc(%ebp),%esp 1178ed: 5b pop %ebx 1178ee: 5e pop %esi 1178ef: 5f pop %edi 1178f0: c9 leave 1178f1: c3 ret 1178f2: 66 90 xchg %ax,%ax <== NOT EXECUTED uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 1178f4: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 1178f9: 8d 65 f4 lea -0xc(%ebp),%esp 1178fc: 5b pop %ebx 1178fd: 5e pop %esi 1178fe: 5f pop %edi 1178ff: c9 leave 117900: c3 ret =============================================================================== 0010cf9c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cf9c: 55 push %ebp 10cf9d: 89 e5 mov %esp,%ebp 10cf9f: 57 push %edi 10cfa0: 56 push %esi 10cfa1: 53 push %ebx 10cfa2: 8b 45 08 mov 0x8(%ebp),%eax 10cfa5: 8b 4d 0c mov 0xc(%ebp),%ecx 10cfa8: 8b 55 10 mov 0x10(%ebp),%edx 10cfab: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cfae: 85 ff test %edi,%edi 10cfb0: 74 56 je 10d008 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10cfb2: 85 c9 test %ecx,%ecx 10cfb4: 74 08 je 10cfbe <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cfb6: 8b 70 10 mov 0x10(%eax),%esi 10cfb9: 66 85 f6 test %si,%si 10cfbc: 75 0a jne 10cfc8 <_Objects_Name_to_id_u32+0x2c> return OBJECTS_INVALID_NAME; name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; 10cfbe: b8 01 00 00 00 mov $0x1,%eax #endif } 10cfc3: 5b pop %ebx 10cfc4: 5e pop %esi 10cfc5: 5f pop %edi 10cfc6: c9 leave 10cfc7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cfc8: 85 d2 test %edx,%edx 10cfca: 75 20 jne 10cfec <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cfcc: 0f b7 f6 movzwl %si,%esi 10cfcf: 8b 58 1c mov 0x1c(%eax),%ebx 10cfd2: b8 01 00 00 00 mov $0x1,%eax 10cfd7: 90 nop the_object = information->local_table[ index ]; 10cfd8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cfdb: 85 d2 test %edx,%edx 10cfdd: 74 05 je 10cfe4 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cfdf: 39 4a 0c cmp %ecx,0xc(%edx) 10cfe2: 74 18 je 10cffc <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cfe4: 40 inc %eax 10cfe5: 39 c6 cmp %eax,%esi 10cfe7: 73 ef jae 10cfd8 <_Objects_Name_to_id_u32+0x3c> 10cfe9: eb d3 jmp 10cfbe <_Objects_Name_to_id_u32+0x22> 10cfeb: 90 nop <== NOT EXECUTED return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10cfec: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cff2: 74 d8 je 10cfcc <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10cff4: 4a dec %edx 10cff5: 75 c7 jne 10cfbe <_Objects_Name_to_id_u32+0x22> 10cff7: eb d3 jmp 10cfcc <_Objects_Name_to_id_u32+0x30> 10cff9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10cffc: 8b 42 08 mov 0x8(%edx),%eax 10cfff: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10d001: 31 c0 xor %eax,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d003: 5b pop %ebx 10d004: 5e pop %esi 10d005: 5f pop %edi 10d006: c9 leave 10d007: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10d008: b8 02 00 00 00 mov $0x2,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d00d: 5b pop %ebx 10d00e: 5e pop %esi 10d00f: 5f pop %edi 10d010: c9 leave 10d011: c3 ret =============================================================================== 0010d680 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d680: 55 push %ebp 10d681: 89 e5 mov %esp,%ebp 10d683: 57 push %edi 10d684: 56 push %esi 10d685: 53 push %ebx 10d686: 83 ec 14 sub $0x14,%esp 10d689: 8b 7d 08 mov 0x8(%ebp),%edi 10d68c: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d68f: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10d693: 50 push %eax 10d694: 53 push %ebx 10d695: e8 ce 79 00 00 call 115068 10d69a: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10d69c: 83 c4 10 add $0x10,%esp 10d69f: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10d6a3: 75 57 jne 10d6fc <_Objects_Set_name+0x7c> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d6a5: 0f be 13 movsbl (%ebx),%edx 10d6a8: c1 e2 18 shl $0x18,%edx 10d6ab: 83 f8 01 cmp $0x1,%eax 10d6ae: 76 38 jbe 10d6e8 <_Objects_Set_name+0x68> 10d6b0: 0f be 43 01 movsbl 0x1(%ebx),%eax 10d6b4: c1 e0 10 shl $0x10,%eax 10d6b7: 09 d0 or %edx,%eax 10d6b9: 83 fe 02 cmp $0x2,%esi 10d6bc: 74 31 je 10d6ef <_Objects_Set_name+0x6f> 10d6be: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d6c2: c1 e2 08 shl $0x8,%edx 10d6c5: 09 c2 or %eax,%edx 10d6c7: 83 fe 03 cmp $0x3,%esi 10d6ca: 0f 84 88 00 00 00 je 10d758 <_Objects_Set_name+0xd8> 10d6d0: 0f be 43 03 movsbl 0x3(%ebx),%eax 10d6d4: 09 c2 or %eax,%edx 10d6d6: 8b 45 0c mov 0xc(%ebp),%eax 10d6d9: 89 50 0c mov %edx,0xc(%eax) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 10d6dc: b0 01 mov $0x1,%al } 10d6de: 8d 65 f4 lea -0xc(%ebp),%esp 10d6e1: 5b pop %ebx 10d6e2: 5e pop %esi 10d6e3: 5f pop %edi 10d6e4: c9 leave 10d6e5: c3 ret 10d6e6: 66 90 xchg %ax,%ax <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d6e8: 89 d0 mov %edx,%eax 10d6ea: 0d 00 00 20 00 or $0x200000,%eax 10d6ef: 89 c2 mov %eax,%edx 10d6f1: 80 ce 20 or $0x20,%dh 10d6f4: b8 20 00 00 00 mov $0x20,%eax 10d6f9: eb d9 jmp 10d6d4 <_Objects_Set_name+0x54> 10d6fb: 90 nop <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10d6fc: 83 ec 0c sub $0xc,%esp 10d6ff: 8d 40 01 lea 0x1(%eax),%eax 10d702: 50 push %eax 10d703: e8 cc 18 00 00 call 10efd4 <_Workspace_Allocate> 10d708: 89 c7 mov %eax,%edi if ( !d ) 10d70a: 83 c4 10 add $0x10,%esp 10d70d: 85 c0 test %eax,%eax 10d70f: 74 43 je 10d754 <_Objects_Set_name+0xd4> return false; if ( the_object->name.name_p ) { 10d711: 8b 55 0c mov 0xc(%ebp),%edx 10d714: 8b 42 0c mov 0xc(%edx),%eax 10d717: 85 c0 test %eax,%eax 10d719: 74 16 je 10d731 <_Objects_Set_name+0xb1> _Workspace_Free( (void *)the_object->name.name_p ); 10d71b: 83 ec 0c sub $0xc,%esp 10d71e: 50 push %eax 10d71f: e8 cc 18 00 00 call 10eff0 <_Workspace_Free> the_object->name.name_p = NULL; 10d724: 8b 45 0c mov 0xc(%ebp),%eax 10d727: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10d72e: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10d731: 50 push %eax 10d732: 56 push %esi 10d733: 53 push %ebx 10d734: 57 push %edi 10d735: e8 b2 78 00 00 call 114fec d[length] = '\0'; 10d73a: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10d73e: 8b 55 0c mov 0xc(%ebp),%edx 10d741: 89 7a 0c mov %edi,0xc(%edx) 10d744: 83 c4 10 add $0x10,%esp ((3 < length) ? s[ 3 ] : ' ') ); } return true; 10d747: b0 01 mov $0x1,%al } 10d749: 8d 65 f4 lea -0xc(%ebp),%esp 10d74c: 5b pop %ebx 10d74d: 5e pop %esi 10d74e: 5f pop %edi 10d74f: c9 leave 10d750: c3 ret 10d751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 10d754: 31 c0 xor %eax,%eax 10d756: eb 86 jmp 10d6de <_Objects_Set_name+0x5e> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d758: b8 20 00 00 00 mov $0x20,%eax 10d75d: e9 72 ff ff ff jmp 10d6d4 <_Objects_Set_name+0x54> =============================================================================== 0010d014 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d014: 55 push %ebp 10d015: 89 e5 mov %esp,%ebp 10d017: 57 push %edi 10d018: 56 push %esi 10d019: 53 push %ebx 10d01a: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10d01d: 8b 45 08 mov 0x8(%ebp),%eax 10d020: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d024: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d028: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d02c: 29 d8 sub %ebx,%eax 10d02e: 31 d2 xor %edx,%edx 10d030: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d032: 85 c0 test %eax,%eax 10d034: 74 21 je 10d057 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d036: 8b 55 08 mov 0x8(%ebp),%edx 10d039: 8b 7a 30 mov 0x30(%edx),%edi 10d03c: 3b 0f cmp (%edi),%ecx 10d03e: 74 1f je 10d05f <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10d040: 31 d2 xor %edx,%edx 10d042: eb 0e jmp 10d052 <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10d044: 01 cb add %ecx,%ebx 10d046: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10d04d: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d050: 74 12 je 10d064 <_Objects_Shrink_information+0x50> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d052: 42 inc %edx 10d053: 39 d0 cmp %edx,%eax 10d055: 77 ed ja 10d044 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d057: 8d 65 f4 lea -0xc(%ebp),%esp 10d05a: 5b pop %ebx 10d05b: 5e pop %esi 10d05c: 5f pop %edi 10d05d: c9 leave 10d05e: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10d05f: 31 f6 xor %esi,%esi <== NOT EXECUTED 10d061: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10d064: 8b 55 08 mov 0x8(%ebp),%edx 10d067: 8b 42 20 mov 0x20(%edx),%eax 10d06a: 89 75 e4 mov %esi,-0x1c(%ebp) 10d06d: eb 07 jmp 10d076 <_Objects_Shrink_information+0x62> 10d06f: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d070: 85 ff test %edi,%edi 10d072: 74 2c je 10d0a0 <_Objects_Shrink_information+0x8c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10d074: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10d076: 0f b7 50 08 movzwl 0x8(%eax),%edx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10d07a: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d07c: 39 da cmp %ebx,%edx 10d07e: 72 f0 jb 10d070 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d080: 8b 75 08 mov 0x8(%ebp),%esi 10d083: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d087: 8d 0c 0b lea (%ebx,%ecx,1),%ecx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 10d08a: 39 ca cmp %ecx,%edx 10d08c: 73 e2 jae 10d070 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10d08e: 83 ec 0c sub $0xc,%esp 10d091: 50 push %eax 10d092: e8 39 ef ff ff call 10bfd0 <_Chain_Extract> 10d097: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d09a: 85 ff test %edi,%edi 10d09c: 75 d6 jne 10d074 <_Objects_Shrink_information+0x60> 10d09e: 66 90 xchg %ax,%ax 10d0a0: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d0a3: 83 ec 0c sub $0xc,%esp 10d0a6: 8b 55 08 mov 0x8(%ebp),%edx 10d0a9: 8b 42 34 mov 0x34(%edx),%eax 10d0ac: ff 34 30 pushl (%eax,%esi,1) 10d0af: e8 ec 17 00 00 call 10e8a0 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d0b4: 8b 55 08 mov 0x8(%ebp),%edx 10d0b7: 8b 42 34 mov 0x34(%edx),%eax 10d0ba: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d0c1: 8b 42 30 mov 0x30(%edx),%eax 10d0c4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d0cb: 8b 42 14 mov 0x14(%edx),%eax 10d0ce: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d0d2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d0d5: 8d 65 f4 lea -0xc(%ebp),%esp 10d0d8: 5b pop %ebx 10d0d9: 5e pop %esi 10d0da: 5f pop %edi 10d0db: c9 leave 10d0dc: c3 ret =============================================================================== 0010d4f4 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10d4f4: 55 push %ebp 10d4f5: 89 e5 mov %esp,%ebp 10d4f7: 57 push %edi 10d4f8: 56 push %esi 10d4f9: 53 push %ebx 10d4fa: 83 ec 38 sub $0x38,%esp 10d4fd: 8b 5d 08 mov 0x8(%ebp),%ebx 10d500: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10d503: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10d509: 53 push %ebx 10d50a: e8 e5 3c 00 00 call 1111f4 <_Timespec_Is_valid> 10d50f: 83 c4 10 add $0x10,%esp 10d512: 84 c0 test %al,%al 10d514: 75 0a jne 10d520 <_POSIX_Absolute_timeout_to_ticks+0x2c> return POSIX_ABSOLUTE_TIMEOUT_INVALID; 10d516: 31 c0 xor %eax,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d518: 8d 65 f4 lea -0xc(%ebp),%esp 10d51b: 5b pop %ebx 10d51c: 5e pop %esi 10d51d: 5f pop %edi 10d51e: c9 leave 10d51f: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10d520: 83 ec 0c sub $0xc,%esp 10d523: 8d 7d e0 lea -0x20(%ebp),%edi 10d526: 57 push %edi 10d527: e8 78 1d 00 00 call 10f2a4 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10d52c: 5a pop %edx 10d52d: 59 pop %ecx 10d52e: 57 push %edi 10d52f: 53 push %ebx 10d530: e8 e7 3c 00 00 call 11121c <_Timespec_Less_than> 10d535: 83 c4 10 add $0x10,%esp 10d538: 84 c0 test %al,%al 10d53a: 74 10 je 10d54c <_POSIX_Absolute_timeout_to_ticks+0x58> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; 10d53c: b8 01 00 00 00 mov $0x1,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d541: 8d 65 f4 lea -0xc(%ebp),%esp 10d544: 5b pop %ebx 10d545: 5e pop %esi 10d546: 5f pop %edi 10d547: c9 leave 10d548: c3 ret 10d549: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); 10d54c: 50 push %eax 10d54d: 8d 45 d8 lea -0x28(%ebp),%eax 10d550: 50 push %eax 10d551: 53 push %ebx 10d552: 57 push %edi 10d553: 89 45 d4 mov %eax,-0x2c(%ebp) 10d556: e8 e5 3c 00 00 call 111240 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10d55b: 8b 45 d4 mov -0x2c(%ebp),%eax 10d55e: 89 04 24 mov %eax,(%esp) 10d561: e8 1a 3d 00 00 call 111280 <_Timespec_To_ticks> 10d566: 89 06 mov %eax,(%esi) /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) 10d568: 83 c4 10 add $0x10,%esp return POSIX_ABSOLUTE_TIMEOUT_IS_NOW; 10d56b: 83 f8 01 cmp $0x1,%eax 10d56e: 19 c0 sbb %eax,%eax 10d570: 83 c0 03 add $0x3,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d573: 8d 65 f4 lea -0xc(%ebp),%esp 10d576: 5b pop %ebx 10d577: 5e pop %esi 10d578: 5f pop %edi 10d579: c9 leave 10d57a: c3 ret =============================================================================== 0010c0ac <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10c0ac: 55 push %ebp 10c0ad: 89 e5 mov %esp,%ebp 10c0af: 56 push %esi 10c0b0: 53 push %ebx 10c0b1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c0b4: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10c0b7: 85 db test %ebx,%ebx 10c0b9: 74 39 je 10c0f4 <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10c0bb: 8b 03 mov (%ebx),%eax 10c0bd: 83 f8 ff cmp $0xffffffff,%eax 10c0c0: 74 1a je 10c0dc <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10c0c2: 52 push %edx 10c0c3: 56 push %esi 10c0c4: 50 push %eax 10c0c5: 68 60 a0 12 00 push $0x12a060 10c0ca: e8 75 2b 00 00 call 10ec44 <_Objects_Get> 10c0cf: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10c0d2: 8d 65 f8 lea -0x8(%ebp),%esp 10c0d5: 5b pop %ebx 10c0d6: 5e pop %esi 10c0d7: c9 leave 10c0d8: c3 ret 10c0d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 10c0dc: 83 ec 08 sub $0x8,%esp 10c0df: 6a 00 push $0x0 10c0e1: 53 push %ebx 10c0e2: e8 19 00 00 00 call 10c100 if ( status ) { 10c0e7: 83 c4 10 add $0x10,%esp 10c0ea: 85 c0 test %eax,%eax 10c0ec: 75 06 jne 10c0f4 <_POSIX_Condition_variables_Get+0x48> 10c0ee: 8b 03 mov (%ebx),%eax 10c0f0: eb d0 jmp 10c0c2 <_POSIX_Condition_variables_Get+0x16> 10c0f2: 66 90 xchg %ax,%ax <== NOT EXECUTED *location = OBJECTS_ERROR; 10c0f4: c7 06 01 00 00 00 movl $0x1,(%esi) return (POSIX_Condition_variables_Control *) 0; 10c0fa: 31 c0 xor %eax,%eax 10c0fc: eb d4 jmp 10c0d2 <_POSIX_Condition_variables_Get+0x26> =============================================================================== 0010c1c8 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c1c8: 55 push %ebp 10c1c9: 89 e5 mov %esp,%ebp 10c1cb: 57 push %edi 10c1cc: 56 push %esi 10c1cd: 53 push %ebx 10c1ce: 83 ec 24 sub $0x24,%esp 10c1d1: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c1d4: 8d 45 e4 lea -0x1c(%ebp),%eax 10c1d7: 50 push %eax 10c1d8: ff 75 08 pushl 0x8(%ebp) 10c1db: e8 cc fe ff ff call 10c0ac <_POSIX_Condition_variables_Get> 10c1e0: 89 c7 mov %eax,%edi switch ( location ) { 10c1e2: 83 c4 10 add $0x10,%esp 10c1e5: 8b 45 e4 mov -0x1c(%ebp),%eax 10c1e8: 85 c0 test %eax,%eax 10c1ea: 74 10 je 10c1fc <_POSIX_Condition_variables_Signal_support+0x34> #endif case OBJECTS_ERROR: break; } return EINVAL; 10c1ec: b8 16 00 00 00 mov $0x16,%eax } 10c1f1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1f4: 5b pop %ebx 10c1f5: 5e pop %esi 10c1f6: 5f pop %edi 10c1f7: c9 leave 10c1f8: c3 ret 10c1f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c1fc: 8d 77 18 lea 0x18(%edi),%esi 10c1ff: eb 0b jmp 10c20c <_POSIX_Condition_variables_Signal_support+0x44> 10c201: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 10c204: 84 db test %bl,%bl 10c206: 74 20 je 10c228 <_POSIX_Condition_variables_Signal_support+0x60> 10c208: 85 c0 test %eax,%eax 10c20a: 74 1c je 10c228 <_POSIX_Condition_variables_Signal_support+0x60> the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c20c: 83 ec 0c sub $0xc,%esp 10c20f: 56 push %esi 10c210: e8 83 36 00 00 call 10f898 <_Thread_queue_Dequeue> if ( !the_thread ) 10c215: 83 c4 10 add $0x10,%esp 10c218: 85 c0 test %eax,%eax 10c21a: 75 e8 jne 10c204 <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c21c: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c223: 84 db test %bl,%bl 10c225: 75 e1 jne 10c208 <_POSIX_Condition_variables_Signal_support+0x40> 10c227: 90 nop _Thread_Enable_dispatch(); 10c228: e8 a7 32 00 00 call 10f4d4 <_Thread_Enable_dispatch> return 0; 10c22d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c22f: 8d 65 f4 lea -0xc(%ebp),%esp 10c232: 5b pop %ebx 10c233: 5e pop %esi 10c234: 5f pop %edi 10c235: c9 leave 10c236: c3 ret =============================================================================== 0010c290 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c290: 55 push %ebp 10c291: 89 e5 mov %esp,%ebp 10c293: 57 push %edi 10c294: 56 push %esi 10c295: 53 push %ebx 10c296: 83 ec 34 sub $0x34,%esp 10c299: 8b 7d 08 mov 0x8(%ebp),%edi 10c29c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c29f: 8a 45 14 mov 0x14(%ebp),%al 10c2a2: 88 45 d7 mov %al,-0x29(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 10c2a5: 8d 75 e4 lea -0x1c(%ebp),%esi 10c2a8: 56 push %esi 10c2a9: 53 push %ebx 10c2aa: e8 59 01 00 00 call 10c408 <_POSIX_Mutex_Get> 10c2af: 83 c4 10 add $0x10,%esp 10c2b2: 85 c0 test %eax,%eax 10c2b4: 74 21 je 10c2d7 <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c2b6: a1 94 9b 12 00 mov 0x129b94,%eax 10c2bb: 48 dec %eax 10c2bc: a3 94 9b 12 00 mov %eax,0x129b94 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c2c1: 83 ec 08 sub $0x8,%esp 10c2c4: 56 push %esi 10c2c5: 57 push %edi 10c2c6: e8 e1 fd ff ff call 10c0ac <_POSIX_Condition_variables_Get> 10c2cb: 89 c6 mov %eax,%esi switch ( location ) { 10c2cd: 83 c4 10 add $0x10,%esp 10c2d0: 8b 55 e4 mov -0x1c(%ebp),%edx 10c2d3: 85 d2 test %edx,%edx 10c2d5: 74 11 je 10c2e8 <_POSIX_Condition_variables_Wait_support+0x58> #endif case OBJECTS_ERROR: break; } return EINVAL; 10c2d7: be 16 00 00 00 mov $0x16,%esi } 10c2dc: 89 f0 mov %esi,%eax 10c2de: 8d 65 f4 lea -0xc(%ebp),%esp 10c2e1: 5b pop %ebx 10c2e2: 5e pop %esi 10c2e3: 5f pop %edi 10c2e4: c9 leave 10c2e5: c3 ret 10c2e6: 66 90 xchg %ax,%ax <== NOT EXECUTED the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10c2e8: 8b 40 14 mov 0x14(%eax),%eax 10c2eb: 85 c0 test %eax,%eax 10c2ed: 74 19 je 10c308 <_POSIX_Condition_variables_Wait_support+0x78> 10c2ef: 3b 03 cmp (%ebx),%eax 10c2f1: 74 15 je 10c308 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c2f3: e8 dc 31 00 00 call 10f4d4 <_Thread_Enable_dispatch> return EINVAL; 10c2f8: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c2fd: 89 f0 mov %esi,%eax 10c2ff: 8d 65 f4 lea -0xc(%ebp),%esp 10c302: 5b pop %ebx 10c303: 5e pop %esi 10c304: 5f pop %edi 10c305: c9 leave 10c306: c3 ret 10c307: 90 nop <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c308: 83 ec 0c sub $0xc,%esp 10c30b: 53 push %ebx 10c30c: e8 73 03 00 00 call 10c684 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c311: 83 c4 10 add $0x10,%esp 10c314: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c318: 75 4e jne 10c368 <_POSIX_Condition_variables_Wait_support+0xd8> the_cond->Mutex = *mutex; 10c31a: 8b 03 mov (%ebx),%eax 10c31c: 89 46 14 mov %eax,0x14(%esi) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c31f: c7 46 48 01 00 00 00 movl $0x1,0x48(%esi) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10c326: a1 58 a1 12 00 mov 0x12a158,%eax 10c32b: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c332: 83 c6 18 add $0x18,%esi 10c335: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c338: 8b 17 mov (%edi),%edx 10c33a: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c33d: 50 push %eax 10c33e: 68 5c fd 10 00 push $0x10fd5c 10c343: ff 75 10 pushl 0x10(%ebp) 10c346: 56 push %esi 10c347: e8 70 36 00 00 call 10f9bc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c34c: e8 83 31 00 00 call 10f4d4 <_Thread_Enable_dispatch> * a POSIX signal, then pthread_cond_wait returns spuriously, * according to the POSIX standard. It means that pthread_cond_wait * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; 10c351: a1 58 a1 12 00 mov 0x12a158,%eax 10c356: 8b 70 34 mov 0x34(%eax),%esi if ( status == EINTR ) 10c359: 83 c4 10 add $0x10,%esp 10c35c: 83 fe 04 cmp $0x4,%esi 10c35f: 75 11 jne 10c372 <_POSIX_Condition_variables_Wait_support+0xe2><== ALWAYS TAKEN status = 0; 10c361: 31 f6 xor %esi,%esi <== NOT EXECUTED 10c363: eb 0d jmp 10c372 <_POSIX_Condition_variables_Wait_support+0xe2><== NOT EXECUTED 10c365: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else { _Thread_Enable_dispatch(); 10c368: e8 67 31 00 00 call 10f4d4 <_Thread_Enable_dispatch> status = ETIMEDOUT; 10c36d: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c372: 83 ec 0c sub $0xc,%esp 10c375: 53 push %ebx 10c376: e8 81 02 00 00 call 10c5fc if ( mutex_status ) 10c37b: 83 c4 10 add $0x10,%esp 10c37e: 85 c0 test %eax,%eax 10c380: 0f 85 51 ff ff ff jne 10c2d7 <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c386: 89 f0 mov %esi,%eax 10c388: 8d 65 f4 lea -0xc(%ebp),%esp 10c38b: 5b pop %ebx 10c38c: 5e pop %esi 10c38d: 5f pop %edi 10c38e: c9 leave 10c38f: c3 ret =============================================================================== 00112b38 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 112b38: 55 push %ebp 112b39: 89 e5 mov %esp,%ebp 112b3b: 57 push %edi 112b3c: 56 push %esi 112b3d: 53 push %ebx 112b3e: 83 ec 2c sub $0x2c,%esp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 112b41: 8b 45 08 mov 0x8(%ebp),%eax 112b44: 8b 40 08 mov 0x8(%eax),%eax 112b47: 89 c7 mov %eax,%edi 112b49: c1 ef 18 shr $0x18,%edi 112b4c: 83 e7 07 and $0x7,%edi for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 112b4f: 0f b7 c0 movzwl %ax,%eax 112b52: c1 e0 02 shl $0x2,%eax 112b55: 89 45 e0 mov %eax,-0x20(%ebp) * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 112b58: 8b 1d 70 69 12 00 mov 0x126970,%ebx done = true; for ( index = 1 ; index <= max ; ++index ) { 112b5e: 66 85 db test %bx,%bx 112b61: 75 09 jne 112b6c <_POSIX_Keys_Run_destructors+0x34> done = false; } } } } } 112b63: 8d 65 f4 lea -0xc(%ebp),%esp 112b66: 5b pop %ebx 112b67: 5e pop %esi 112b68: 5f pop %edi 112b69: c9 leave 112b6a: c3 ret 112b6b: 90 nop <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 112b6c: be 01 00 00 00 mov $0x1,%esi 112b71: b0 01 mov $0x1,%al POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 112b73: 0f b7 ce movzwl %si,%ecx 112b76: 8b 15 7c 69 12 00 mov 0x12697c,%edx Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) 112b7c: 8b 0c 8a mov (%edx,%ecx,4),%ecx _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 112b7f: 85 c9 test %ecx,%ecx 112b81: 74 2c je 112baf <_POSIX_Keys_Run_destructors+0x77> 112b83: 8b 51 10 mov 0x10(%ecx),%edx 112b86: 89 55 d4 mov %edx,-0x2c(%ebp) 112b89: 85 d2 test %edx,%edx 112b8b: 74 22 je 112baf <_POSIX_Keys_Run_destructors+0x77> void *value = key->Values [ thread_api ][ thread_index ]; 112b8d: 8b 55 e0 mov -0x20(%ebp),%edx 112b90: 03 54 b9 14 add 0x14(%ecx,%edi,4),%edx 112b94: 89 55 e4 mov %edx,-0x1c(%ebp) 112b97: 8b 0a mov (%edx),%ecx if ( value != NULL ) { 112b99: 85 c9 test %ecx,%ecx 112b9b: 74 12 je 112baf <_POSIX_Keys_Run_destructors+0x77> key->Values [ thread_api ][ thread_index ] = NULL; 112b9d: c7 02 00 00 00 00 movl $0x0,(%edx) (*key->destructor)( value ); 112ba3: 83 ec 0c sub $0xc,%esp 112ba6: 51 push %ecx 112ba7: ff 55 d4 call *-0x2c(%ebp) 112baa: 83 c4 10 add $0x10,%esp done = false; 112bad: 31 c0 xor %eax,%eax Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 112baf: 46 inc %esi 112bb0: 66 39 f3 cmp %si,%bx 112bb3: 73 be jae 112b73 <_POSIX_Keys_Run_destructors+0x3b> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 112bb5: 84 c0 test %al,%al 112bb7: 74 9f je 112b58 <_POSIX_Keys_Run_destructors+0x20> 112bb9: eb a8 jmp 112b63 <_POSIX_Keys_Run_destructors+0x2b> =============================================================================== 00116290 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 116290: 55 push %ebp 116291: 89 e5 mov %esp,%ebp 116293: 57 push %edi 116294: 56 push %esi 116295: 53 push %ebx 116296: 83 ec 24 sub $0x24,%esp 116299: 8b 5d 10 mov 0x10(%ebp),%ebx CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 11629c: 68 ff 00 00 00 push $0xff 1162a1: ff 75 08 pushl 0x8(%ebp) 1162a4: e8 ff 4c 00 00 call 11afa8 1162a9: 89 c6 mov %eax,%esi 1162ab: a1 94 fa 12 00 mov 0x12fa94,%eax 1162b0: 40 inc %eax 1162b1: a3 94 fa 12 00 mov %eax,0x12fa94 * There is no real basis for the default values. They will work * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 1162b6: 83 c4 10 add $0x10,%esp 1162b9: 85 db test %ebx,%ebx 1162bb: 0f 84 b7 00 00 00 je 116378 <_POSIX_Message_queue_Create_support+0xe8> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 1162c1: 8b 7b 04 mov 0x4(%ebx),%edi 1162c4: 85 ff test %edi,%edi 1162c6: 0f 8e f0 00 00 00 jle 1163bc <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 1162cc: 8b 5b 08 mov 0x8(%ebx),%ebx 1162cf: 89 5d e4 mov %ebx,-0x1c(%ebp) 1162d2: 85 db test %ebx,%ebx 1162d4: 0f 8e e2 00 00 00 jle 1163bc <_POSIX_Message_queue_Create_support+0x12c> RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) _Objects_Allocate( &_POSIX_Message_queue_Information ); 1162da: 83 ec 0c sub $0xc,%esp 1162dd: 68 40 fe 12 00 push $0x12fe40 1162e2: e8 99 c4 ff ff call 112780 <_Objects_Allocate> 1162e7: 89 c3 mov %eax,%ebx attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 1162e9: 83 c4 10 add $0x10,%esp 1162ec: 85 c0 test %eax,%eax 1162ee: 0f 84 0a 01 00 00 je 1163fe <_POSIX_Message_queue_Create_support+0x16e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 1162f4: 8b 45 0c mov 0xc(%ebp),%eax 1162f7: 89 43 10 mov %eax,0x10(%ebx) the_mq->named = true; 1162fa: c6 43 14 01 movb $0x1,0x14(%ebx) the_mq->open_count = 1; 1162fe: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx) the_mq->linked = true; 116305: c6 43 15 01 movb $0x1,0x15(%ebx) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 116309: 8d 56 01 lea 0x1(%esi),%edx 11630c: 83 ec 0c sub $0xc,%esp 11630f: 52 push %edx 116310: 89 55 e0 mov %edx,-0x20(%ebp) 116313: e8 e8 e4 ff ff call 114800 <_Workspace_Allocate> 116318: 89 c6 mov %eax,%esi if (!name) { 11631a: 83 c4 10 add $0x10,%esp 11631d: 85 c0 test %eax,%eax 11631f: 8b 55 e0 mov -0x20(%ebp),%edx 116322: 0f 84 ab 00 00 00 je 1163d3 <_POSIX_Message_queue_Create_support+0x143> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strncpy( name, name_arg, n+1 ); 116328: 50 push %eax 116329: 52 push %edx 11632a: ff 75 08 pushl 0x8(%ebp) 11632d: 56 push %esi 11632e: e8 f9 4b 00 00 call 11af2c * * Joel: Cite POSIX or OpenGroup on above statement so we can determine * if it is a real requirement. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 116333: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) if ( !_CORE_message_queue_Initialize( 11633a: ff 75 e4 pushl -0x1c(%ebp) 11633d: 57 push %edi * current scheduling policy. * * Joel: Cite POSIX or OpenGroup on above statement so we can determine * if it is a real requirement. */ the_mq_attr = &the_mq->Message_queue.Attributes; 11633e: 8d 43 5c lea 0x5c(%ebx),%eax the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( !_CORE_message_queue_Initialize( 116341: 50 push %eax 116342: 8d 43 1c lea 0x1c(%ebx),%eax 116345: 50 push %eax 116346: e8 19 0f 00 00 call 117264 <_CORE_message_queue_Initialize> 11634b: 83 c4 20 add $0x20,%esp 11634e: 84 c0 test %al,%al 116350: 74 3a je 11638c <_POSIX_Message_queue_Create_support+0xfc> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 116352: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116356: a1 5c fe 12 00 mov 0x12fe5c,%eax 11635b: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 11635e: 89 73 0c mov %esi,0xc(%ebx) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 116361: 8b 45 14 mov 0x14(%ebp),%eax 116364: 89 18 mov %ebx,(%eax) _Thread_Enable_dispatch(); 116366: e8 dd d1 ff ff call 113548 <_Thread_Enable_dispatch> return 0; 11636b: 31 c0 xor %eax,%eax } 11636d: 8d 65 f4 lea -0xc(%ebp),%esp 116370: 5b pop %ebx 116371: 5e pop %esi 116372: 5f pop %edi 116373: c9 leave 116374: c3 ret 116375: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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 ) { attr.mq_maxmsg = 10; attr.mq_msgsize = 16; 116378: c7 45 e4 10 00 00 00 movl $0x10,-0x1c(%ebp) * 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 ) { attr.mq_maxmsg = 10; 11637f: bf 0a 00 00 00 mov $0xa,%edi 116384: e9 51 ff ff ff jmp 1162da <_POSIX_Message_queue_Create_support+0x4a> 116389: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 11638c: 83 ec 08 sub $0x8,%esp 11638f: 53 push %ebx 116390: 68 40 fe 12 00 push $0x12fe40 116395: e8 5e c7 ff ff call 112af8 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 11639a: 89 34 24 mov %esi,(%esp) 11639d: e8 7a e4 ff ff call 11481c <_Workspace_Free> _Thread_Enable_dispatch(); 1163a2: e8 a1 d1 ff ff call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 1163a7: e8 74 34 00 00 call 119820 <__errno> 1163ac: c7 00 1c 00 00 00 movl $0x1c,(%eax) 1163b2: 83 c4 10 add $0x10,%esp 1163b5: b8 ff ff ff ff mov $0xffffffff,%eax 1163ba: eb b1 jmp 11636d <_POSIX_Message_queue_Create_support+0xdd> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 1163bc: e8 87 d1 ff ff call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 1163c1: e8 5a 34 00 00 call 119820 <__errno> 1163c6: c7 00 16 00 00 00 movl $0x16,(%eax) 1163cc: b8 ff ff ff ff mov $0xffffffff,%eax 1163d1: eb 9a jmp 11636d <_POSIX_Message_queue_Create_support+0xdd> 1163d3: 83 ec 08 sub $0x8,%esp 1163d6: 53 push %ebx 1163d7: 68 40 fe 12 00 push $0x12fe40 1163dc: e8 17 c7 ff ff call 112af8 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 1163e1: e8 62 d1 ff ff call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 1163e6: e8 35 34 00 00 call 119820 <__errno> 1163eb: c7 00 0c 00 00 00 movl $0xc,(%eax) 1163f1: 83 c4 10 add $0x10,%esp 1163f4: b8 ff ff ff ff mov $0xffffffff,%eax 1163f9: e9 6f ff ff ff jmp 11636d <_POSIX_Message_queue_Create_support+0xdd> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 1163fe: e8 45 d1 ff ff call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 116403: e8 18 34 00 00 call 119820 <__errno> 116408: c7 00 17 00 00 00 movl $0x17,(%eax) 11640e: b8 ff ff ff ff mov $0xffffffff,%eax 116413: e9 55 ff ff ff jmp 11636d <_POSIX_Message_queue_Create_support+0xdd> =============================================================================== 00116418 <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 116418: 55 push %ebp 116419: 89 e5 mov %esp,%ebp 11641b: 53 push %ebx 11641c: 83 ec 14 sub $0x14,%esp 11641f: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 116422: 85 db test %ebx,%ebx 116424: 74 05 je 11642b <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 116426: 80 3b 00 cmpb $0x0,(%ebx) 116429: 75 0d jne 116438 <_POSIX_Message_queue_Name_to_id+0x20> return EINVAL; 11642b: b8 16 00 00 00 mov $0x16,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 116430: 8b 5d fc mov -0x4(%ebp),%ebx 116433: c9 leave 116434: c3 ret 116435: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 116438: 83 ec 08 sub $0x8,%esp 11643b: 68 ff 00 00 00 push $0xff 116440: 53 push %ebx 116441: e8 62 4b 00 00 call 11afa8 116446: 83 c4 10 add $0x10,%esp 116449: 3d fe 00 00 00 cmp $0xfe,%eax 11644e: 76 0c jbe 11645c <_POSIX_Message_queue_Name_to_id+0x44> return ENAMETOOLONG; 116450: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 116455: 8b 5d fc mov -0x4(%ebp),%ebx 116458: c9 leave 116459: c3 ret 11645a: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 11645c: 50 push %eax 11645d: 8d 45 f4 lea -0xc(%ebp),%eax 116460: 50 push %eax 116461: 53 push %ebx 116462: 68 40 fe 12 00 push $0x12fe40 116467: e8 00 14 00 00 call 11786c <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 11646c: 8b 4d f4 mov -0xc(%ebp),%ecx 11646f: 8b 55 0c mov 0xc(%ebp),%edx 116472: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 116474: 83 c4 10 add $0x10,%esp return 0; 116477: 83 f8 01 cmp $0x1,%eax 11647a: 19 c0 sbb %eax,%eax 11647c: f7 d0 not %eax 11647e: 83 e0 02 and $0x2,%eax return ENOENT; } 116481: 8b 5d fc mov -0x4(%ebp),%ebx 116484: c9 leave 116485: c3 ret =============================================================================== 0010fcc8 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10fcc8: 55 push %ebp 10fcc9: 89 e5 mov %esp,%ebp 10fccb: 53 push %ebx 10fccc: 83 ec 28 sub $0x28,%esp 10fccf: 8b 5d 08 mov 0x8(%ebp),%ebx 10fcd2: 8a 45 18 mov 0x18(%ebp),%al 10fcd5: 88 45 e7 mov %al,-0x19(%ebp) POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10fcd8: 8d 45 f4 lea -0xc(%ebp),%eax RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10fcdb: 50 push %eax 10fcdc: 53 push %ebx 10fcdd: 68 e0 ff 12 00 push $0x12ffe0 10fce2: e8 51 2f 00 00 call 112c38 <_Objects_Get> switch ( location ) { 10fce7: 83 c4 10 add $0x10,%esp 10fcea: 8b 55 f4 mov -0xc(%ebp),%edx 10fced: 85 d2 test %edx,%edx 10fcef: 74 17 je 10fd08 <_POSIX_Message_queue_Receive_support+0x40> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fcf1: e8 2a 9b 00 00 call 119820 <__errno> 10fcf6: c7 00 09 00 00 00 movl $0x9,(%eax) 10fcfc: b8 ff ff ff ff mov $0xffffffff,%eax } 10fd01: 8b 5d fc mov -0x4(%ebp),%ebx 10fd04: c9 leave 10fd05: c3 ret 10fd06: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10fd08: 8b 50 14 mov 0x14(%eax),%edx 10fd0b: 89 d1 mov %edx,%ecx 10fd0d: 83 e1 03 and $0x3,%ecx 10fd10: 49 dec %ecx 10fd11: 0f 84 af 00 00 00 je 10fdc6 <_POSIX_Message_queue_Receive_support+0xfe> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fd17: 8b 40 10 mov 0x10(%eax),%eax if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10fd1a: 8b 4d 10 mov 0x10(%ebp),%ecx 10fd1d: 39 48 68 cmp %ecx,0x68(%eax) 10fd20: 77 62 ja 10fd84 <_POSIX_Message_queue_Receive_support+0xbc> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10fd22: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fd29: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10fd2d: 75 45 jne 10fd74 <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN 10fd2f: 31 d2 xor %edx,%edx <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10fd31: 83 ec 08 sub $0x8,%esp 10fd34: ff 75 1c pushl 0x1c(%ebp) 10fd37: 52 push %edx 10fd38: 8d 55 f0 lea -0x10(%ebp),%edx 10fd3b: 52 push %edx 10fd3c: ff 75 0c pushl 0xc(%ebp) 10fd3f: 53 push %ebx 10fd40: 83 c0 1c add $0x1c,%eax 10fd43: 50 push %eax 10fd44: e8 93 1f 00 00 call 111cdc <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10fd49: 83 c4 20 add $0x20,%esp 10fd4c: e8 f7 37 00 00 call 113548 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10fd51: 8b 15 58 00 13 00 mov 0x130058,%edx RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); 10fd57: 8b 42 24 mov 0x24(%edx),%eax 10fd5a: 85 c0 test %eax,%eax 10fd5c: 78 22 js 10fd80 <_POSIX_Message_queue_Receive_support+0xb8> do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fd5e: 8b 4d 14 mov 0x14(%ebp),%ecx 10fd61: 89 01 mov %eax,(%ecx) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10fd63: 8b 42 34 mov 0x34(%edx),%eax 10fd66: 85 c0 test %eax,%eax 10fd68: 75 36 jne 10fda0 <_POSIX_Message_queue_Receive_support+0xd8> return length_out; 10fd6a: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fd6d: 8b 5d fc mov -0x4(%ebp),%ebx 10fd70: c9 leave 10fd71: c3 ret 10fd72: 66 90 xchg %ax,%ax <== NOT EXECUTED length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fd74: 80 e6 40 and $0x40,%dh 10fd77: 0f 94 c2 sete %dl 10fd7a: 0f b6 d2 movzbl %dl,%edx 10fd7d: eb b2 jmp 10fd31 <_POSIX_Message_queue_Receive_support+0x69> 10fd7f: 90 nop <== NOT EXECUTED 10fd80: f7 d8 neg %eax 10fd82: eb da jmp 10fd5e <_POSIX_Message_queue_Receive_support+0x96> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 10fd84: e8 bf 37 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10fd89: e8 92 9a 00 00 call 119820 <__errno> 10fd8e: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10fd94: b8 ff ff ff ff mov $0xffffffff,%eax 10fd99: e9 63 ff ff ff jmp 10fd01 <_POSIX_Message_queue_Receive_support+0x39> 10fd9e: 66 90 xchg %ax,%ax <== NOT EXECUTED _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 10fda0: e8 7b 9a 00 00 call 119820 <__errno> 10fda5: 89 c3 mov %eax,%ebx 10fda7: 83 ec 0c sub $0xc,%esp 10fdaa: a1 58 00 13 00 mov 0x130058,%eax 10fdaf: ff 70 34 pushl 0x34(%eax) 10fdb2: e8 29 02 00 00 call 10ffe0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fdb7: 89 03 mov %eax,(%ebx) 10fdb9: 83 c4 10 add $0x10,%esp 10fdbc: b8 ff ff ff ff mov $0xffffffff,%eax 10fdc1: e9 3b ff ff ff jmp 10fd01 <_POSIX_Message_queue_Receive_support+0x39> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 10fdc6: e8 7d 37 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fdcb: e8 50 9a 00 00 call 119820 <__errno> 10fdd0: c7 00 09 00 00 00 movl $0x9,(%eax) 10fdd6: b8 ff ff ff ff mov $0xffffffff,%eax 10fddb: e9 21 ff ff ff jmp 10fd01 <_POSIX_Message_queue_Receive_support+0x39> =============================================================================== 0010fe00 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10fe00: 55 push %ebp 10fe01: 89 e5 mov %esp,%ebp 10fe03: 56 push %esi 10fe04: 53 push %ebx 10fe05: 83 ec 20 sub $0x20,%esp 10fe08: 8b 75 08 mov 0x8(%ebp),%esi 10fe0b: 8b 5d 14 mov 0x14(%ebp),%ebx 10fe0e: 8a 55 18 mov 0x18(%ebp),%dl /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 10fe11: 83 fb 20 cmp $0x20,%ebx 10fe14: 0f 87 92 00 00 00 ja 10feac <_POSIX_Message_queue_Send_support+0xac> RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10fe1a: 51 push %ecx rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10fe1b: 8d 45 f4 lea -0xc(%ebp),%eax 10fe1e: 50 push %eax 10fe1f: 56 push %esi 10fe20: 68 e0 ff 12 00 push $0x12ffe0 10fe25: 88 55 e4 mov %dl,-0x1c(%ebp) 10fe28: e8 0b 2e 00 00 call 112c38 <_Objects_Get> switch ( location ) { 10fe2d: 83 c4 10 add $0x10,%esp 10fe30: 8b 55 f4 mov -0xc(%ebp),%edx 10fe33: 85 d2 test %edx,%edx 10fe35: 8a 55 e4 mov -0x1c(%ebp),%dl 10fe38: 75 5e jne 10fe98 <_POSIX_Message_queue_Send_support+0x98> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10fe3a: 8b 48 14 mov 0x14(%eax),%ecx 10fe3d: f6 c1 03 test $0x3,%cl 10fe40: 74 7e je 10fec0 <_POSIX_Message_queue_Send_support+0xc0> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fe42: 8b 40 10 mov 0x10(%eax),%eax /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fe45: 84 d2 test %dl,%dl 10fe47: 75 37 jne 10fe80 <_POSIX_Message_queue_Send_support+0x80> 10fe49: 31 d2 xor %edx,%edx do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10fe4b: ff 75 1c pushl 0x1c(%ebp) 10fe4e: 52 push %edx RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core( unsigned int priority ) { return priority * -1; 10fe4f: f7 db neg %ebx 10fe51: 53 push %ebx 10fe52: 6a 00 push $0x0 10fe54: 56 push %esi 10fe55: ff 75 10 pushl 0x10(%ebp) 10fe58: ff 75 0c pushl 0xc(%ebp) 10fe5b: 83 c0 1c add $0x1c,%eax 10fe5e: 50 push %eax 10fe5f: e8 a4 1f 00 00 call 111e08 <_CORE_message_queue_Submit> 10fe64: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10fe66: 83 c4 20 add $0x20,%esp 10fe69: e8 da 36 00 00 call 113548 <_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 ) 10fe6e: 83 fb 07 cmp $0x7,%ebx 10fe71: 74 19 je 10fe8c <_POSIX_Message_queue_Send_support+0x8c> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10fe73: 85 db test %ebx,%ebx 10fe75: 75 61 jne 10fed8 <_POSIX_Message_queue_Send_support+0xd8> return msg_status; 10fe77: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fe79: 8d 65 f8 lea -0x8(%ebp),%esp 10fe7c: 5b pop %ebx 10fe7d: 5e pop %esi 10fe7e: c9 leave 10fe7f: c3 ret the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fe80: 31 d2 xor %edx,%edx 10fe82: f6 c5 40 test $0x40,%ch 10fe85: 0f 94 c2 sete %dl 10fe88: eb c1 jmp 10fe4b <_POSIX_Message_queue_Send_support+0x4b> 10fe8a: 66 90 xchg %ax,%ax <== NOT EXECUTED * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) msg_status = _Thread_Executing->Wait.return_code; 10fe8c: a1 58 00 13 00 mov 0x130058,%eax 10fe91: 8b 58 34 mov 0x34(%eax),%ebx 10fe94: eb dd jmp 10fe73 <_POSIX_Message_queue_Send_support+0x73> 10fe96: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fe98: e8 83 99 00 00 call 119820 <__errno> 10fe9d: c7 00 09 00 00 00 movl $0x9,(%eax) 10fea3: b8 ff ff ff ff mov $0xffffffff,%eax 10fea8: eb cf jmp 10fe79 <_POSIX_Message_queue_Send_support+0x79> 10feaa: 66 90 xchg %ax,%ax <== NOT EXECUTED * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 10feac: e8 6f 99 00 00 call 119820 <__errno> 10feb1: c7 00 16 00 00 00 movl $0x16,(%eax) 10feb7: b8 ff ff ff ff mov $0xffffffff,%eax 10febc: eb bb jmp 10fe79 <_POSIX_Message_queue_Send_support+0x79> 10febe: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 10fec0: e8 83 36 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fec5: e8 56 99 00 00 call 119820 <__errno> 10feca: c7 00 09 00 00 00 movl $0x9,(%eax) 10fed0: b8 ff ff ff ff mov $0xffffffff,%eax 10fed5: eb a2 jmp 10fe79 <_POSIX_Message_queue_Send_support+0x79> 10fed7: 90 nop <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10fed8: e8 43 99 00 00 call 119820 <__errno> 10fedd: 89 c6 mov %eax,%esi 10fedf: 83 ec 0c sub $0xc,%esp 10fee2: 53 push %ebx 10fee3: e8 f8 00 00 00 call 10ffe0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fee8: 89 06 mov %eax,(%esi) 10feea: 83 c4 10 add $0x10,%esp 10feed: b8 ff ff ff ff mov $0xffffffff,%eax 10fef2: eb 85 jmp 10fe79 <_POSIX_Message_queue_Send_support+0x79> =============================================================================== 0010d0c4 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10d0c4: 55 push %ebp 10d0c5: 89 e5 mov %esp,%ebp 10d0c7: 56 push %esi 10d0c8: 53 push %ebx 10d0c9: 8b 5d 08 mov 0x8(%ebp),%ebx 10d0cc: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d0cf: 85 db test %ebx,%ebx 10d0d1: 74 39 je 10d10c <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d0d3: 8b 03 mov (%ebx),%eax 10d0d5: 83 f8 ff cmp $0xffffffff,%eax 10d0d8: 74 1a je 10d0f4 <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); 10d0da: 52 push %edx 10d0db: 56 push %esi 10d0dc: 50 push %eax 10d0dd: 68 80 c7 12 00 push $0x12c780 10d0e2: e8 e1 2b 00 00 call 10fcc8 <_Objects_Get> { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); return (POSIX_Mutex_Control *) 10d0e7: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d0ea: 8d 65 f8 lea -0x8(%ebp),%esp 10d0ed: 5b pop %ebx 10d0ee: 5e pop %esi 10d0ef: c9 leave 10d0f0: c3 ret 10d0f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations *location ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d0f4: 83 ec 08 sub $0x8,%esp 10d0f7: 6a 00 push $0x0 10d0f9: 53 push %ebx 10d0fa: e8 b9 00 00 00 call 10d1b8 10d0ff: 83 c4 10 add $0x10,%esp 10d102: 85 c0 test %eax,%eax 10d104: 75 06 jne 10d10c <_POSIX_Mutex_Get+0x48> 10d106: 8b 03 mov (%ebx),%eax 10d108: eb d0 jmp 10d0da <_POSIX_Mutex_Get+0x16> 10d10a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d10c: c7 06 01 00 00 00 movl $0x1,(%esi) 10d112: 31 c0 xor %eax,%eax 10d114: eb d4 jmp 10d0ea <_POSIX_Mutex_Get+0x26> =============================================================================== 0010d118 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10d118: 55 push %ebp 10d119: 89 e5 mov %esp,%ebp 10d11b: 56 push %esi 10d11c: 53 push %ebx 10d11d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d120: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d123: 85 db test %ebx,%ebx 10d125: 74 39 je 10d160 <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d127: 8b 03 mov (%ebx),%eax 10d129: 83 f8 ff cmp $0xffffffff,%eax 10d12c: 74 1a je 10d148 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d12e: ff 75 10 pushl 0x10(%ebp) 10d131: 56 push %esi 10d132: 50 push %eax 10d133: 68 80 c7 12 00 push $0x12c780 10d138: e8 33 2b 00 00 call 10fc70 <_Objects_Get_isr_disable> 10d13d: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d140: 8d 65 f8 lea -0x8(%ebp),%esp 10d143: 5b pop %ebx 10d144: 5e pop %esi 10d145: c9 leave 10d146: c3 ret 10d147: 90 nop <== NOT EXECUTED ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d148: 83 ec 08 sub $0x8,%esp 10d14b: 6a 00 push $0x0 10d14d: 53 push %ebx 10d14e: e8 65 00 00 00 call 10d1b8 10d153: 83 c4 10 add $0x10,%esp 10d156: 85 c0 test %eax,%eax 10d158: 75 06 jne 10d160 <_POSIX_Mutex_Get_interrupt_disable+0x48> 10d15a: 8b 03 mov (%ebx),%eax 10d15c: eb d0 jmp 10d12e <_POSIX_Mutex_Get_interrupt_disable+0x16> 10d15e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d160: c7 06 01 00 00 00 movl $0x1,(%esi) 10d166: 31 c0 xor %eax,%eax 10d168: eb d6 jmp 10d140 <_POSIX_Mutex_Get_interrupt_disable+0x28> =============================================================================== 0010d318 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d318: 55 push %ebp 10d319: 89 e5 mov %esp,%ebp 10d31b: 53 push %ebx 10d31c: 83 ec 18 sub $0x18,%esp 10d31f: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 10d322: 8d 45 f0 lea -0x10(%ebp),%eax 10d325: 50 push %eax 10d326: 8d 45 f4 lea -0xc(%ebp),%eax 10d329: 50 push %eax 10d32a: ff 75 08 pushl 0x8(%ebp) 10d32d: e8 e6 fd ff ff call 10d118 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 10d332: 83 c4 10 add $0x10,%esp 10d335: 8b 55 f4 mov -0xc(%ebp),%edx 10d338: 85 d2 test %edx,%edx 10d33a: 75 34 jne 10d370 <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d33c: 83 ec 0c sub $0xc,%esp 10d33f: ff 75 f0 pushl -0x10(%ebp) 10d342: ff 75 10 pushl 0x10(%ebp) 10d345: 0f b6 db movzbl %bl,%ebx 10d348: 53 push %ebx 10d349: ff 70 08 pushl 0x8(%eax) 10d34c: 83 c0 14 add $0x14,%eax 10d34f: 50 push %eax 10d350: e8 37 1d 00 00 call 10f08c <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d355: 83 c4 14 add $0x14,%esp (CORE_mutex_Status) _Thread_Executing->Wait.return_code 10d358: a1 58 c9 12 00 mov 0x12c958,%eax the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d35d: ff 70 34 pushl 0x34(%eax) 10d360: e8 1b 01 00 00 call 10d480 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d365: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d368: 8b 5d fc mov -0x4(%ebp),%ebx 10d36b: c9 leave 10d36c: c3 ret 10d36d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10d370: b8 16 00 00 00 mov $0x16,%eax } 10d375: 8b 5d fc mov -0x4(%ebp),%ebx 10d378: c9 leave 10d379: c3 ret =============================================================================== 00114864 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 114864: 55 push %ebp 114865: 89 e5 mov %esp,%ebp 114867: 56 push %esi 114868: 53 push %ebx 114869: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 11486c: 8b 55 0c mov 0xc(%ebp),%edx 11486f: 85 d2 test %edx,%edx 114871: 0f 85 b9 00 00 00 jne 114930 <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 114877: 85 db test %ebx,%ebx 114879: 74 1c je 114897 <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 11487b: 83 ec 08 sub $0x8,%esp 11487e: 68 ff 00 00 00 push $0xff 114883: 53 push %ebx 114884: e8 5f 3e 00 00 call 1186e8 114889: 83 c4 10 add $0x10,%esp 11488c: 3d fe 00 00 00 cmp $0xfe,%eax 114891: 0f 87 ad 00 00 00 ja 114944 <_POSIX_Semaphore_Create_support+0xe0> 114897: a1 b4 d1 12 00 mov 0x12d1b4,%eax 11489c: 40 inc %eax 11489d: a3 b4 d1 12 00 mov %eax,0x12d1b4 */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) _Objects_Allocate( &_POSIX_Semaphore_Information ); 1148a2: 83 ec 0c sub $0xc,%esp 1148a5: 68 e0 d4 12 00 push $0x12d4e0 1148aa: e8 45 ba ff ff call 1102f4 <_Objects_Allocate> 1148af: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 1148b1: 83 c4 10 add $0x10,%esp 1148b4: 85 c0 test %eax,%eax 1148b6: 0f 84 9a 00 00 00 je 114956 <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 1148bc: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 1148c3: 85 db test %ebx,%ebx 1148c5: 74 55 je 11491c <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 1148c7: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 1148cb: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 1148d2: c6 40 15 01 movb $0x1,0x15(%eax) * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 1148d6: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 1148dd: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1148e4: 50 push %eax 1148e5: ff 75 10 pushl 0x10(%ebp) the_semaphore->named = false; the_semaphore->open_count = 0; the_semaphore->linked = false; } the_sem_attr = &the_semaphore->Semaphore.Attributes; 1148e8: 8d 46 5c lea 0x5c(%esi),%eax /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1148eb: 50 push %eax 1148ec: 8d 46 1c lea 0x1c(%esi),%eax 1148ef: 50 push %eax 1148f0: e8 7f b4 ff ff call 10fd74 <_CORE_semaphore_Initialize> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 1148f5: 0f b7 56 08 movzwl 0x8(%esi),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1148f9: a1 fc d4 12 00 mov 0x12d4fc,%eax 1148fe: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 114901: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 114904: 8b 45 14 mov 0x14(%ebp),%eax 114907: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 114909: e8 ae c7 ff ff call 1110bc <_Thread_Enable_dispatch> return 0; 11490e: 83 c4 10 add $0x10,%esp 114911: 31 c0 xor %eax,%eax } 114913: 8d 65 f8 lea -0x8(%ebp),%esp 114916: 5b pop %ebx 114917: 5e pop %esi 114918: c9 leave 114919: c3 ret 11491a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 11491c: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 114920: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 114927: c6 40 15 00 movb $0x0,0x15(%eax) 11492b: eb a9 jmp 1148d6 <_POSIX_Semaphore_Create_support+0x72> 11492d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 114930: e8 7f 2c 00 00 call 1175b4 <__errno> 114935: c7 00 58 00 00 00 movl $0x58,(%eax) 11493b: b8 ff ff ff ff mov $0xffffffff,%eax 114940: eb d1 jmp 114913 <_POSIX_Semaphore_Create_support+0xaf> 114942: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 114944: e8 6b 2c 00 00 call 1175b4 <__errno> 114949: c7 00 5b 00 00 00 movl $0x5b,(%eax) 11494f: b8 ff ff ff ff mov $0xffffffff,%eax 114954: eb bd jmp 114913 <_POSIX_Semaphore_Create_support+0xaf> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 114956: e8 61 c7 ff ff call 1110bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 11495b: e8 54 2c 00 00 call 1175b4 <__errno> 114960: c7 00 1c 00 00 00 movl $0x1c,(%eax) 114966: b8 ff ff ff ff mov $0xffffffff,%eax 11496b: eb a6 jmp 114913 <_POSIX_Semaphore_Create_support+0xaf> =============================================================================== 001149c0 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 1149c0: 55 push %ebp 1149c1: 89 e5 mov %esp,%ebp 1149c3: 83 ec 18 sub $0x18,%esp 1149c6: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 1149c9: 85 c0 test %eax,%eax 1149cb: 74 05 je 1149d2 <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 1149cd: 80 38 00 cmpb $0x0,(%eax) 1149d0: 75 0a jne 1149dc <_POSIX_Semaphore_Name_to_id+0x1c> return EINVAL; 1149d2: b8 16 00 00 00 mov $0x16,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 1149d7: c9 leave 1149d8: c3 ret 1149d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 1149dc: 52 push %edx 1149dd: 8d 55 f4 lea -0xc(%ebp),%edx 1149e0: 52 push %edx 1149e1: 50 push %eax 1149e2: 68 e0 d4 12 00 push $0x12d4e0 1149e7: e8 6c 0c 00 00 call 115658 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 1149ec: 8b 4d f4 mov -0xc(%ebp),%ecx 1149ef: 8b 55 0c mov 0xc(%ebp),%edx 1149f2: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1149f4: 83 c4 10 add $0x10,%esp return 0; 1149f7: 83 f8 01 cmp $0x1,%eax 1149fa: 19 c0 sbb %eax,%eax 1149fc: f7 d0 not %eax 1149fe: 83 e0 02 and $0x2,%eax return ENOENT; } 114a01: c9 leave 114a02: c3 ret =============================================================================== 00114a2c <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 114a2c: 55 push %ebp 114a2d: 89 e5 mov %esp,%ebp 114a2f: 53 push %ebx 114a30: 83 ec 18 sub $0x18,%esp 114a33: 8a 5d 0c mov 0xc(%ebp),%bl POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 114a36: 8d 45 f4 lea -0xc(%ebp),%eax sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) _Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location ); 114a39: 50 push %eax 114a3a: 8b 45 08 mov 0x8(%ebp),%eax 114a3d: ff 30 pushl (%eax) 114a3f: 68 e0 d4 12 00 push $0x12d4e0 114a44: e8 63 bd ff ff call 1107ac <_Objects_Get> switch ( location ) { 114a49: 83 c4 10 add $0x10,%esp 114a4c: 8b 55 f4 mov -0xc(%ebp),%edx 114a4f: 85 d2 test %edx,%edx 114a51: 74 15 je 114a68 <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 114a53: e8 5c 2b 00 00 call 1175b4 <__errno> 114a58: c7 00 16 00 00 00 movl $0x16,(%eax) 114a5e: b8 ff ff ff ff mov $0xffffffff,%eax } 114a63: 8b 5d fc mov -0x4(%ebp),%ebx 114a66: c9 leave 114a67: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 114a68: ff 75 10 pushl 0x10(%ebp) 114a6b: 0f b6 db movzbl %bl,%ebx 114a6e: 53 push %ebx 114a6f: ff 70 08 pushl 0x8(%eax) 114a72: 83 c0 1c add $0x1c,%eax 114a75: 50 push %eax 114a76: e8 1d 07 00 00 call 115198 <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 114a7b: e8 3c c6 ff ff call 1110bc <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 114a80: 83 c4 10 add $0x10,%esp 114a83: a1 78 d7 12 00 mov 0x12d778,%eax 114a88: 8b 40 34 mov 0x34(%eax),%eax 114a8b: 85 c0 test %eax,%eax 114a8d: 75 09 jne 114a98 <_POSIX_Semaphore_Wait_support+0x6c> return 0; 114a8f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 114a91: 8b 5d fc mov -0x4(%ebp),%ebx 114a94: c9 leave 114a95: c3 ret 114a96: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 114a98: e8 17 2b 00 00 call 1175b4 <__errno> 114a9d: 89 c3 mov %eax,%ebx 114a9f: 83 ec 0c sub $0xc,%esp 114aa2: a1 78 d7 12 00 mov 0x12d778,%eax 114aa7: ff 70 34 pushl 0x34(%eax) 114aaa: e8 75 26 00 00 call 117124 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 114aaf: 89 03 mov %eax,(%ebx) 114ab1: 83 c4 10 add $0x10,%esp 114ab4: b8 ff ff ff ff mov $0xffffffff,%eax 114ab9: eb a8 jmp 114a63 <_POSIX_Semaphore_Wait_support+0x37> =============================================================================== 001105f8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 1105f8: 55 push %ebp 1105f9: 89 e5 mov %esp,%ebp 1105fb: 83 ec 08 sub $0x8,%esp 1105fe: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110601: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 110607: 8b 88 d8 00 00 00 mov 0xd8(%eax),%ecx 11060d: 85 c9 test %ecx,%ecx 11060f: 75 09 jne 11061a <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN 110611: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax) 110618: 74 06 je 110620 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 11061a: c9 leave thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 11061b: e9 d0 d4 ff ff jmp 10daf0 <_Thread_Enable_dispatch> POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 110620: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax 110626: 85 c0 test %eax,%eax 110628: 74 f0 je 11061a <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 11062a: a1 94 87 12 00 mov 0x128794,%eax 11062f: 48 dec %eax 110630: a3 94 87 12 00 mov %eax,0x128794 thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 110635: 83 ec 08 sub $0x8,%esp 110638: 6a ff push $0xffffffff 11063a: 52 push %edx 11063b: e8 c0 08 00 00 call 110f00 <_POSIX_Thread_Exit> 110640: 83 c4 10 add $0x10,%esp } else _Thread_Enable_dispatch(); } 110643: c9 leave 110644: c3 ret =============================================================================== 00111954 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 111954: 55 push %ebp 111955: 89 e5 mov %esp,%ebp 111957: 57 push %edi 111958: 56 push %esi 111959: 53 push %ebx 11195a: 83 ec 18 sub $0x18,%esp 11195d: 8b 5d 08 mov 0x8(%ebp),%ebx 111960: 8b 75 0c mov 0xc(%ebp),%esi 111963: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 111966: ff 36 pushl (%esi) 111968: e8 cb ff ff ff call 111938 <_POSIX_Priority_Is_valid> 11196d: 83 c4 10 add $0x10,%esp 111970: 84 c0 test %al,%al 111972: 74 2a je 11199e <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111974: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 11197a: 8b 45 14 mov 0x14(%ebp),%eax 11197d: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 111983: 85 db test %ebx,%ebx 111985: 74 25 je 1119ac <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 111987: 83 fb 01 cmp $0x1,%ebx 11198a: 0f 84 90 00 00 00 je 111a20 <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 111990: 83 fb 02 cmp $0x2,%ebx 111993: 0f 84 8f 00 00 00 je 111a28 <_POSIX_Thread_Translate_sched_param+0xd4> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 111999: 83 fb 04 cmp $0x4,%ebx 11199c: 74 1e je 1119bc <_POSIX_Thread_Translate_sched_param+0x68> if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; 11199e: b8 16 00 00 00 mov $0x16,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 1119a3: 8d 65 f4 lea -0xc(%ebp),%esp 1119a6: 5b pop %ebx 1119a7: 5e pop %esi 1119a8: 5f pop %edi 1119a9: c9 leave 1119aa: c3 ret 1119ab: 90 nop <== NOT EXECUTED *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1119ac: c7 07 01 00 00 00 movl $0x1,(%edi) return 0; 1119b2: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 1119b4: 8d 65 f4 lea -0xc(%ebp),%esp 1119b7: 5b pop %ebx 1119b8: 5e pop %esi 1119b9: 5f pop %edi 1119ba: c9 leave 1119bb: c3 ret *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && 1119bc: 8b 5e 08 mov 0x8(%esi),%ebx 1119bf: 85 db test %ebx,%ebx 1119c1: 75 07 jne 1119ca <_POSIX_Thread_Translate_sched_param+0x76> 1119c3: 8b 4e 0c mov 0xc(%esi),%ecx 1119c6: 85 c9 test %ecx,%ecx 1119c8: 74 d4 je 11199e <_POSIX_Thread_Translate_sched_param+0x4a> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 1119ca: 8b 56 10 mov 0x10(%esi),%edx 1119cd: 85 d2 test %edx,%edx 1119cf: 75 07 jne 1119d8 <_POSIX_Thread_Translate_sched_param+0x84> 1119d1: 8b 46 14 mov 0x14(%esi),%eax 1119d4: 85 c0 test %eax,%eax 1119d6: 74 c6 je 11199e <_POSIX_Thread_Translate_sched_param+0x4a> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 1119d8: 83 ec 0c sub $0xc,%esp 1119db: 8d 46 08 lea 0x8(%esi),%eax 1119de: 50 push %eax 1119df: e8 1c da ff ff call 10f400 <_Timespec_To_ticks> 1119e4: 89 c3 mov %eax,%ebx _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 1119e6: 8d 46 10 lea 0x10(%esi),%eax 1119e9: 89 04 24 mov %eax,(%esp) 1119ec: e8 0f da ff ff call 10f400 <_Timespec_To_ticks> if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 1119f1: 83 c4 10 add $0x10,%esp 1119f4: 39 c3 cmp %eax,%ebx 1119f6: 72 a6 jb 11199e <_POSIX_Thread_Translate_sched_param+0x4a> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 1119f8: 83 ec 0c sub $0xc,%esp 1119fb: ff 76 04 pushl 0x4(%esi) 1119fe: e8 35 ff ff ff call 111938 <_POSIX_Priority_Is_valid> 111a03: 83 c4 10 add $0x10,%esp 111a06: 84 c0 test %al,%al 111a08: 74 94 je 11199e <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 111a0a: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 111a10: 8b 45 14 mov 0x14(%ebp),%eax 111a13: c7 00 f4 bc 10 00 movl $0x10bcf4,(%eax) return 0; 111a19: 31 c0 xor %eax,%eax 111a1b: eb 86 jmp 1119a3 <_POSIX_Thread_Translate_sched_param+0x4f> 111a1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 111a20: 31 c0 xor %eax,%eax 111a22: e9 7c ff ff ff jmp 1119a3 <_POSIX_Thread_Translate_sched_param+0x4f> 111a27: 90 nop <== NOT EXECUTED } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 111a28: c7 07 02 00 00 00 movl $0x2,(%edi) return 0; 111a2e: 31 c0 xor %eax,%eax 111a30: e9 6e ff ff ff jmp 1119a3 <_POSIX_Thread_Translate_sched_param+0x4f> =============================================================================== 00110814 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 110814: 55 push %ebp 110815: 89 e5 mov %esp,%ebp 110817: 57 push %edi 110818: 56 push %esi 110819: 53 push %ebx 11081a: 83 ec 28 sub $0x28,%esp 11081d: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 110820: 68 f0 00 00 00 push $0xf0 110825: 89 55 e4 mov %edx,-0x1c(%ebp) 110828: e8 57 e0 ff ff call 10e884 <_Workspace_Allocate> 11082d: 89 c3 mov %eax,%ebx if ( !api ) 11082f: 83 c4 10 add $0x10,%esp 110832: 85 c0 test %eax,%eax 110834: 8b 55 e4 mov -0x1c(%ebp),%edx 110837: 0f 84 2f 01 00 00 je 11096c <_POSIX_Threads_Create_extension+0x158> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 11083d: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 110843: b9 40 00 00 00 mov $0x40,%ecx 110848: 31 c0 xor %eax,%eax 11084a: 89 df mov %ebx,%edi 11084c: f3 aa rep stos %al,%es:(%edi) 11084e: c7 03 01 00 00 00 movl $0x1,(%ebx) 110854: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) 11085b: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx) 110862: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx) 110869: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) 110870: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 110877: c7 43 40 01 00 00 00 movl $0x1,0x40(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 11087e: c7 83 84 00 00 00 01 movl $0x1,0x84(%ebx) 110885: 00 00 00 api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 110888: be 98 12 12 00 mov $0x121298,%esi 11088d: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi 110893: b1 07 mov $0x7,%cl 110895: f3 a5 rep movsl %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 110897: 0f b6 05 14 22 12 00 movzbl 0x122214,%eax 11089e: 2b 42 14 sub 0x14(%edx),%eax 1108a1: 89 83 88 00 00 00 mov %eax,0x88(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 1108a7: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 1108ae: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 1108b1: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx) 1108b8: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 1108bb: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 1108c2: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1108c5: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 1108cb: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 1108d1: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 1108d8: 00 00 00 _Chain_Initialize_empty (&api->Cancellation_Handlers); 1108db: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax 1108e1: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 1108e7: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 1108ee: 00 00 00 1108f1: 0f b6 42 0b movzbl 0xb(%edx),%eax 1108f5: 83 e0 07 and $0x7,%eax if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 1108f8: 83 f8 03 cmp $0x3,%eax 1108fb: 74 53 je 110950 <_POSIX_Threads_Create_extension+0x13c> #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; } else { api->signals_blocked = 0xffffffff; 1108fd: c7 83 d0 00 00 00 ff movl $0xffffffff,0xd0(%ebx) 110904: ff ff ff } _Thread_queue_Initialize( 110907: 6a 00 push $0x0 110909: 68 00 10 00 00 push $0x1000 11090e: 6a 00 push $0x0 110910: 8d 43 44 lea 0x44(%ebx),%eax 110913: 50 push %eax 110914: 89 55 e4 mov %edx,-0x1c(%ebp) 110917: e8 00 d5 ff ff call 10de1c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 11091c: 8b 55 e4 mov -0x1c(%ebp),%edx 11091f: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 110922: c7 83 b0 00 00 00 00 movl $0x0,0xb0(%ebx) 110929: 00 00 00 the_watchdog->routine = routine; 11092c: c7 83 c4 00 00 00 78 movl $0x110978,0xc4(%ebx) 110933: 09 11 00 the_watchdog->id = id; 110936: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) the_watchdog->user_data = user_data; 11093c: 89 93 cc 00 00 00 mov %edx,0xcc(%ebx) _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 110942: 83 c4 10 add $0x10,%esp 110945: b0 01 mov $0x1,%al } 110947: 8d 65 f4 lea -0xc(%ebp),%esp 11094a: 5b pop %ebx 11094b: 5e pop %esi 11094c: 5f pop %edi 11094d: c9 leave 11094e: c3 ret 11094f: 90 nop <== NOT EXECUTED if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 110950: a1 98 6a 12 00 mov 0x126a98,%eax api->signals_blocked = executing_api->signals_blocked; 110955: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 11095b: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 110961: 89 83 d0 00 00 00 mov %eax,0xd0(%ebx) 110967: eb 9e jmp 110907 <_POSIX_Threads_Create_extension+0xf3> 110969: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) return false; 11096c: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 11096e: 8d 65 f4 lea -0xc(%ebp),%esp 110971: 5b pop %ebx 110972: 5e pop %esi 110973: 5f pop %edi 110974: c9 leave 110975: c3 ret =============================================================================== 0011078c <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 11078c: 55 push %ebp 11078d: 89 e5 mov %esp,%ebp 11078f: 57 push %edi 110790: 56 push %esi 110791: 53 push %ebx 110792: 83 ec 28 sub $0x28,%esp 110795: 8b 7d 0c mov 0xc(%ebp),%edi Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 110798: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 11079e: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 1107a1: 57 push %edi 1107a2: e8 2d 23 00 00 call 112ad4 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 1107a7: 89 3c 24 mov %edi,(%esp) 1107aa: e8 89 23 00 00 call 112b38 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 1107af: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1107b2: 83 c4 10 add $0x10,%esp 1107b5: 8b 45 e4 mov -0x1c(%ebp),%eax 1107b8: 8d 58 44 lea 0x44(%eax),%ebx 1107bb: eb 08 jmp 1107c5 <_POSIX_Threads_Delete_extension+0x39> 1107bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; 1107c0: 8b 40 28 mov 0x28(%eax),%eax 1107c3: 89 30 mov %esi,(%eax) /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1107c5: 83 ec 0c sub $0xc,%esp 1107c8: 53 push %ebx 1107c9: e8 9e d2 ff ff call 10da6c <_Thread_queue_Dequeue> 1107ce: 83 c4 10 add $0x10,%esp 1107d1: 85 c0 test %eax,%eax 1107d3: 75 eb jne 1107c0 <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 1107d5: 8b 45 e4 mov -0x1c(%ebp),%eax 1107d8: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax) 1107df: 74 1f je 110800 <_POSIX_Threads_Delete_extension+0x74> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 1107e1: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 1107e8: 00 00 00 (void) _Workspace_Free( api ); 1107eb: 8b 45 e4 mov -0x1c(%ebp),%eax 1107ee: 89 45 08 mov %eax,0x8(%ebp) } 1107f1: 8d 65 f4 lea -0xc(%ebp),%esp 1107f4: 5b pop %ebx 1107f5: 5e pop %esi 1107f6: 5f pop %edi 1107f7: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 1107f8: e9 a3 e0 ff ff jmp 10e8a0 <_Workspace_Free> 1107fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 110800: 83 ec 0c sub $0xc,%esp 110803: 05 a8 00 00 00 add $0xa8,%eax 110808: 50 push %eax 110809: e8 4e df ff ff call 10e75c <_Watchdog_Remove> 11080e: 83 c4 10 add $0x10,%esp 110811: eb ce jmp 1107e1 <_POSIX_Threads_Delete_extension+0x55> =============================================================================== 00110768 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 110768: 55 push %ebp 110769: 89 e5 mov %esp,%ebp 11076b: 83 ec 08 sub $0x8,%esp 11076e: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 110771: 0f b6 42 0b movzbl 0xb(%edx),%eax 110775: 83 e0 07 and $0x7,%eax /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) 110778: 83 f8 03 cmp $0x3,%eax 11077b: 74 03 je 110780 <_POSIX_Threads_Exitted_extension+0x18> pthread_exit( executing->Wait.return_argument ); } 11077d: c9 leave 11077e: c3 ret 11077f: 90 nop <== NOT EXECUTED /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); 110780: 8b 42 28 mov 0x28(%edx),%eax 110783: 89 45 08 mov %eax,0x8(%ebp) } 110786: c9 leave /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); 110787: e9 70 26 00 00 jmp 112dfc =============================================================================== 00110750 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 110750: 55 push %ebp 110751: 89 e5 mov %esp,%ebp 110753: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 110756: a1 78 47 12 00 mov 0x124778,%eax 11075b: 85 c0 test %eax,%eax 11075d: 74 05 je 110764 <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 11075f: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 110760: ff e0 jmp *%eax 110762: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110764: c9 leave 110765: c3 ret =============================================================================== 0010b9d4 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10b9d4: 55 push %ebp 10b9d5: 89 e5 mov %esp,%ebp 10b9d7: 57 push %edi 10b9d8: 56 push %esi 10b9d9: 53 push %ebx 10b9da: 83 ec 6c sub $0x6c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10b9dd: 8b 3d b4 44 12 00 mov 0x1244b4,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10b9e3: a1 b0 44 12 00 mov 0x1244b0,%eax 10b9e8: 89 45 94 mov %eax,-0x6c(%ebp) if ( !user_threads || maximum == 0 ) 10b9eb: 85 ff test %edi,%edi 10b9ed: 74 44 je 10ba33 <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10b9ef: 85 c0 test %eax,%eax 10b9f1: 74 40 je 10ba33 <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10b9f3: 31 db xor %ebx,%ebx 10b9f5: 8d 75 a4 lea -0x5c(%ebp),%esi for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10b9f8: 83 ec 0c sub $0xc,%esp 10b9fb: 56 push %esi 10b9fc: e8 37 60 00 00 call 111a38 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10ba01: 5a pop %edx 10ba02: 59 pop %ecx 10ba03: 6a 02 push $0x2 10ba05: 56 push %esi 10ba06: e8 59 60 00 00 call 111a64 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10ba0b: 59 pop %ecx 10ba0c: 58 pop %eax 10ba0d: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10ba11: 56 push %esi 10ba12: e8 81 60 00 00 call 111a98 status = pthread_create( 10ba17: 6a 00 push $0x0 10ba19: ff 34 df pushl (%edi,%ebx,8) 10ba1c: 56 push %esi 10ba1d: 8d 45 e4 lea -0x1c(%ebp),%eax 10ba20: 50 push %eax 10ba21: e8 92 fc ff ff call 10b6b8 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10ba26: 83 c4 20 add $0x20,%esp 10ba29: 85 c0 test %eax,%eax 10ba2b: 75 0e jne 10ba3b <_POSIX_Threads_Initialize_user_threads_body+0x67> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10ba2d: 43 inc %ebx 10ba2e: 39 5d 94 cmp %ebx,-0x6c(%ebp) 10ba31: 77 c5 ja 10b9f8 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10ba33: 8d 65 f4 lea -0xc(%ebp),%esp 10ba36: 5b pop %ebx 10ba37: 5e pop %esi 10ba38: 5f pop %edi 10ba39: c9 leave 10ba3a: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10ba3b: 52 push %edx 10ba3c: 50 push %eax 10ba3d: 6a 01 push $0x1 10ba3f: 6a 02 push $0x2 10ba41: e8 be 1e 00 00 call 10d904 <_Internal_error_Occurred> =============================================================================== 00110978 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 110978: 55 push %ebp 110979: 89 e5 mov %esp,%ebp 11097b: 56 push %esi 11097c: 53 push %ebx 11097d: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110980: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 110986: 83 ec 0c sub $0xc,%esp 110989: 8d 83 98 00 00 00 lea 0x98(%ebx),%eax 11098f: 50 push %eax 110990: e8 97 0f 00 00 call 11192c <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 110995: 89 46 78 mov %eax,0x78(%esi) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 110998: 0f b6 05 14 22 12 00 movzbl 0x122214,%eax 11099f: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 1109a5: 89 46 18 mov %eax,0x18(%esi) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 1109a8: 83 c4 10 add $0x10,%esp 1109ab: 8b 4e 1c mov 0x1c(%esi),%ecx 1109ae: 85 c9 test %ecx,%ecx 1109b0: 75 05 jne 1109b7 <_POSIX_Threads_Sporadic_budget_TSR+0x3f><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 1109b2: 39 46 14 cmp %eax,0x14(%esi) 1109b5: 77 35 ja 1109ec <_POSIX_Threads_Sporadic_budget_TSR+0x74> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 1109b7: 83 ec 0c sub $0xc,%esp 1109ba: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax 1109c0: 50 push %eax 1109c1: e8 66 0f 00 00 call 11192c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1109c6: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1109cc: 83 c4 10 add $0x10,%esp _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 1109cf: 81 c3 a8 00 00 00 add $0xa8,%ebx 1109d5: 89 5d 0c mov %ebx,0xc(%ebp) 1109d8: c7 45 08 a4 65 12 00 movl $0x1265a4,0x8(%ebp) } 1109df: 8d 65 f8 lea -0x8(%ebp),%esp 1109e2: 5b pop %ebx 1109e3: 5e pop %esi 1109e4: c9 leave 1109e5: e9 3a dc ff ff jmp 10e624 <_Watchdog_Insert> 1109ea: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 1109ec: 52 push %edx 1109ed: 6a 01 push $0x1 1109ef: 50 push %eax 1109f0: 56 push %esi 1109f1: e8 ae c7 ff ff call 10d1a4 <_Thread_Change_priority> 1109f6: 83 c4 10 add $0x10,%esp 1109f9: eb bc jmp 1109b7 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> =============================================================================== 001109fc <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 1109fc: 55 push %ebp 1109fd: 89 e5 mov %esp,%ebp 1109ff: 83 ec 08 sub $0x8,%esp 110a02: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110a05: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 110a0b: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) 110a12: 0f b6 15 14 22 12 00 movzbl 0x122214,%edx 110a19: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 110a1f: 89 50 18 mov %edx,0x18(%eax) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 110a22: 8b 48 1c mov 0x1c(%eax),%ecx 110a25: 85 c9 test %ecx,%ecx 110a27: 75 05 jne 110a2e <_POSIX_Threads_Sporadic_budget_callout+0x32><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 110a29: 39 50 14 cmp %edx,0x14(%eax) 110a2c: 72 02 jb 110a30 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 110a2e: c9 leave <== NOT EXECUTED 110a2f: c3 ret <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 110a30: 51 push %ecx 110a31: 6a 01 push $0x1 110a33: 52 push %edx 110a34: 50 push %eax 110a35: e8 6a c7 ff ff call 10d1a4 <_Thread_Change_priority> 110a3a: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 110a3d: c9 leave 110a3e: c3 ret =============================================================================== 00112ad4 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 112ad4: 55 push %ebp 112ad5: 89 e5 mov %esp,%ebp 112ad7: 57 push %edi 112ad8: 56 push %esi 112ad9: 53 push %ebx 112ada: 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 ]; 112add: 8b 45 08 mov 0x8(%ebp),%eax 112ae0: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 112ae6: c7 86 d8 00 00 00 01 movl $0x1,0xd8(%esi) 112aed: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112af0: 8d 9e e8 00 00 00 lea 0xe8(%esi),%ebx while ( !_Chain_Is_empty( handler_stack ) ) { 112af6: 39 9e e4 00 00 00 cmp %ebx,0xe4(%esi) 112afc: 74 30 je 112b2e <_POSIX_Threads_cancel_run+0x5a> 112afe: 66 90 xchg %ax,%ax _ISR_Disable( level ); 112b00: 9c pushf 112b01: fa cli 112b02: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 112b03: 8b 7b 04 mov 0x4(%ebx),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112b06: 8b 17 mov (%edi),%edx previous = the_node->previous; 112b08: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 112b0b: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 112b0e: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 112b10: 51 push %ecx 112b11: 9d popf (*handler->routine)( handler->arg ); 112b12: 83 ec 0c sub $0xc,%esp 112b15: ff 77 0c pushl 0xc(%edi) 112b18: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 112b1b: 89 3c 24 mov %edi,(%esp) 112b1e: e8 7d bd ff ff call 10e8a0 <_Workspace_Free> handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 112b23: 83 c4 10 add $0x10,%esp 112b26: 39 9e e4 00 00 00 cmp %ebx,0xe4(%esi) 112b2c: 75 d2 jne 112b00 <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 112b2e: 8d 65 f4 lea -0xc(%ebp),%esp 112b31: 5b pop %ebx 112b32: 5e pop %esi 112b33: 5f pop %edi 112b34: c9 leave 112b35: c3 ret =============================================================================== 00111738 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 111738: 55 push %ebp 111739: 89 e5 mov %esp,%ebp 11173b: 56 push %esi 11173c: 53 push %ebx 11173d: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 111740: 83 ec 0c sub $0xc,%esp 111743: 53 push %ebx 111744: e8 0f db ff ff call 10f258 <_Watchdog_Remove> _ISR_Disable( level ); 111749: 9c pushf 11174a: fa cli 11174b: 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 ) { 11174c: 83 c4 10 add $0x10,%esp 11174f: 8b 43 08 mov 0x8(%ebx),%eax 111752: 85 c0 test %eax,%eax 111754: 74 0e je 111764 <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 111756: 56 push %esi 111757: 9d popf return false; 111758: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 11175a: 8d 65 f8 lea -0x8(%ebp),%esp 11175d: 5b pop %ebx 11175e: 5e pop %esi 11175f: c9 leave 111760: c3 ret 111761: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 111764: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 11176b: 8b 45 14 mov 0x14(%ebp),%eax 11176e: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 111771: 8b 45 10 mov 0x10(%ebp),%eax 111774: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 111777: 8b 45 18 mov 0x18(%ebp),%eax 11177a: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11177d: 8b 45 0c mov 0xc(%ebp),%eax 111780: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 111783: 83 ec 08 sub $0x8,%esp 111786: 53 push %ebx 111787: 68 64 98 12 00 push $0x129864 11178c: e8 8f d9 ff ff call 10f120 <_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 ); 111791: 56 push %esi 111792: 9d popf return true; 111793: 83 c4 10 add $0x10,%esp 111796: b0 01 mov $0x1,%al } 111798: 8d 65 f8 lea -0x8(%ebp),%esp 11179b: 5b pop %ebx 11179c: 5e pop %esi 11179d: c9 leave 11179e: c3 ret =============================================================================== 0010b7d0 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 10b7d0: 55 push %ebp 10b7d1: 89 e5 mov %esp,%ebp 10b7d3: 53 push %ebx 10b7d4: 83 ec 04 sub $0x4,%esp 10b7d7: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10b7da: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b7dd: 8b 53 54 mov 0x54(%ebx),%edx 10b7e0: 85 d2 test %edx,%edx 10b7e2: 75 28 jne 10b80c <_POSIX_Timer_TSR+0x3c> 10b7e4: 8b 43 58 mov 0x58(%ebx),%eax 10b7e7: 85 c0 test %eax,%eax 10b7e9: 75 21 jne 10b80c <_POSIX_Timer_TSR+0x3c> <== ALWAYS TAKEN /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b7eb: 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 ) ) { 10b7ef: 83 ec 08 sub $0x8,%esp 10b7f2: ff 73 44 pushl 0x44(%ebx) 10b7f5: ff 73 38 pushl 0x38(%ebx) 10b7f8: e8 cb 5a 00 00 call 1112c8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10b7fd: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10b804: 83 c4 10 add $0x10,%esp } 10b807: 8b 5d fc mov -0x4(%ebp),%ebx 10b80a: c9 leave 10b80b: c3 ret ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 10b80c: 83 ec 0c sub $0xc,%esp 10b80f: 53 push %ebx 10b810: 68 d0 b7 10 00 push $0x10b7d0 10b815: ff 73 08 pushl 0x8(%ebx) 10b818: ff 73 64 pushl 0x64(%ebx) 10b81b: 8d 43 10 lea 0x10(%ebx),%eax 10b81e: 50 push %eax 10b81f: e8 14 5f 00 00 call 111738 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10b824: 83 c4 20 add $0x20,%esp 10b827: 84 c0 test %al,%al 10b829: 74 dc je 10b807 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10b82b: 83 ec 0c sub $0xc,%esp 10b82e: 8d 43 6c lea 0x6c(%ebx),%eax 10b831: 50 push %eax 10b832: e8 85 16 00 00 call 10cebc <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b837: c6 43 3c 03 movb $0x3,0x3c(%ebx) 10b83b: 83 c4 10 add $0x10,%esp 10b83e: eb af jmp 10b7ef <_POSIX_Timer_TSR+0x1f> =============================================================================== 00112bbc <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 112bbc: 55 push %ebp 112bbd: 89 e5 mov %esp,%ebp 112bbf: 57 push %edi 112bc0: 56 push %esi 112bc1: 53 push %ebx 112bc2: 83 ec 78 sub $0x78,%esp 112bc5: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 112bc8: 6a 01 push $0x1 112bca: 0f b6 45 10 movzbl 0x10(%ebp),%eax 112bce: 50 push %eax 112bcf: 8d 55 dc lea -0x24(%ebp),%edx 112bd2: 52 push %edx 112bd3: 53 push %ebx 112bd4: ff 75 08 pushl 0x8(%ebp) 112bd7: 89 55 9c mov %edx,-0x64(%ebp) 112bda: e8 b5 00 00 00 call 112c94 <_POSIX_signals_Clear_signals> 112bdf: 83 c4 20 add $0x20,%esp 112be2: 84 c0 test %al,%al 112be4: 8b 55 9c mov -0x64(%ebp),%edx 112be7: 0f 84 9b 00 00 00 je 112c88 <_POSIX_signals_Check_signal+0xcc> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 112bed: 8d 04 5b lea (%ebx,%ebx,2),%eax 112bf0: c1 e0 02 shl $0x2,%eax 112bf3: 8b 88 c8 6a 12 00 mov 0x126ac8(%eax),%ecx 112bf9: 89 4d a4 mov %ecx,-0x5c(%ebp) 112bfc: 49 dec %ecx 112bfd: 0f 84 85 00 00 00 je 112c88 <_POSIX_signals_Check_signal+0xcc><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 112c03: 8b 75 08 mov 0x8(%ebp),%esi 112c06: 8b b6 d0 00 00 00 mov 0xd0(%esi),%esi 112c0c: 89 75 a0 mov %esi,-0x60(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 112c0f: 8b 88 c4 6a 12 00 mov 0x126ac4(%eax),%ecx 112c15: 09 f1 or %esi,%ecx 112c17: 8b 75 08 mov 0x8(%ebp),%esi 112c1a: 89 8e d0 00 00 00 mov %ecx,0xd0(%esi) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 112c20: 8d 75 b4 lea -0x4c(%ebp),%esi 112c23: 89 75 94 mov %esi,-0x6c(%ebp) 112c26: 8b 35 98 6a 12 00 mov 0x126a98,%esi 112c2c: 83 c6 20 add $0x20,%esi 112c2f: b9 0a 00 00 00 mov $0xa,%ecx 112c34: 8b 7d 94 mov -0x6c(%ebp),%edi 112c37: f3 a5 rep movsl %ds:(%esi),%es:(%edi) sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 112c39: 83 b8 c0 6a 12 00 02 cmpl $0x2,0x126ac0(%eax) 112c40: 74 36 je 112c78 <_POSIX_signals_Check_signal+0xbc> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 112c42: 83 ec 0c sub $0xc,%esp 112c45: 53 push %ebx 112c46: ff 55 a4 call *-0x5c(%ebp) break; 112c49: 83 c4 10 add $0x10,%esp } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 112c4c: 8b 3d 98 6a 12 00 mov 0x126a98,%edi 112c52: 83 c7 20 add $0x20,%edi 112c55: b9 0a 00 00 00 mov $0xa,%ecx 112c5a: 8b 75 94 mov -0x6c(%ebp),%esi 112c5d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 112c5f: 8b 55 a0 mov -0x60(%ebp),%edx 112c62: 8b 45 08 mov 0x8(%ebp),%eax 112c65: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) return true; 112c6b: b0 01 mov $0x1,%al } 112c6d: 8d 65 f4 lea -0xc(%ebp),%esp 112c70: 5b pop %ebx 112c71: 5e pop %esi 112c72: 5f pop %edi 112c73: c9 leave 112c74: c3 ret 112c75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 112c78: 50 push %eax 112c79: 6a 00 push $0x0 112c7b: 52 push %edx 112c7c: 53 push %ebx 112c7d: ff 55 a4 call *-0x5c(%ebp) signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 112c80: 83 c4 10 add $0x10,%esp 112c83: eb c7 jmp 112c4c <_POSIX_signals_Check_signal+0x90> 112c85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) return false; 112c88: 31 c0 xor %eax,%eax * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } 112c8a: 8d 65 f4 lea -0xc(%ebp),%esp 112c8d: 5b pop %ebx 112c8e: 5e pop %esi 112c8f: 5f pop %edi 112c90: c9 leave 112c91: c3 ret =============================================================================== 00113244 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 113244: 55 push %ebp 113245: 89 e5 mov %esp,%ebp 113247: 53 push %ebx 113248: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 11324b: 9c pushf 11324c: fa cli 11324d: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 11324e: 8d 04 49 lea (%ecx,%ecx,2),%eax 113251: c1 e0 02 shl $0x2,%eax 113254: 83 b8 c0 6a 12 00 02 cmpl $0x2,0x126ac0(%eax) 11325b: 74 13 je 113270 <_POSIX_signals_Clear_process_signals+0x2c> 11325d: 49 dec %ecx 11325e: b8 fe ff ff ff mov $0xfffffffe,%eax if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 113263: d3 c0 rol %cl,%eax 113265: 21 05 c8 6c 12 00 and %eax,0x126cc8 } _ISR_Enable( level ); 11326b: 52 push %edx 11326c: 9d popf } 11326d: 5b pop %ebx 11326e: c9 leave 11326f: c3 ret */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113270: 8d 98 e4 6c 12 00 lea 0x126ce4(%eax),%ebx ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 113276: 39 98 e0 6c 12 00 cmp %ebx,0x126ce0(%eax) 11327c: 75 ed jne 11326b <_POSIX_signals_Clear_process_signals+0x27><== NEVER TAKEN 11327e: eb dd jmp 11325d <_POSIX_signals_Clear_process_signals+0x19> =============================================================================== 00112c94 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 112c94: 55 push %ebp 112c95: 89 e5 mov %esp,%ebp 112c97: 57 push %edi 112c98: 56 push %esi 112c99: 53 push %ebx 112c9a: 83 ec 1c sub $0x1c,%esp 112c9d: 8b 5d 0c mov 0xc(%ebp),%ebx 112ca0: 0f b6 7d 14 movzbl 0x14(%ebp),%edi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 112ca4: 8d 4b ff lea -0x1(%ebx),%ecx 112ca7: b8 01 00 00 00 mov $0x1,%eax 112cac: d3 e0 shl %cl,%eax /* 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 ) 112cae: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 112cb2: 74 40 je 112cf4 <_POSIX_signals_Clear_signals+0x60> signals_blocked = ~api->signals_blocked; 112cb4: 8b 55 08 mov 0x8(%ebp),%edx 112cb7: 8b 8a d0 00 00 00 mov 0xd0(%edx),%ecx 112cbd: f7 d1 not %ecx signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 112cbf: 9c pushf 112cc0: fa cli 112cc1: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 112cc4: 89 fa mov %edi,%edx 112cc6: 84 d2 test %dl,%dl 112cc8: 74 32 je 112cfc <_POSIX_signals_Clear_signals+0x68> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 112cca: 23 05 c8 6c 12 00 and 0x126cc8,%eax 112cd0: 85 c8 test %ecx,%eax 112cd2: 74 54 je 112d28 <_POSIX_signals_Clear_signals+0x94> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 112cd4: 8d 14 5b lea (%ebx,%ebx,2),%edx 112cd7: c1 e2 02 shl $0x2,%edx 112cda: 83 ba c0 6a 12 00 02 cmpl $0x2,0x126ac0(%edx) 112ce1: 74 49 je 112d2c <_POSIX_signals_Clear_signals+0x98> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 112ce3: 83 ec 0c sub $0xc,%esp 112ce6: 53 push %ebx 112ce7: e8 58 05 00 00 call 113244 <_POSIX_signals_Clear_process_signals> 112cec: 83 c4 10 add $0x10,%esp do_callout = true; 112cef: b0 01 mov $0x1,%al 112cf1: eb 26 jmp 112d19 <_POSIX_signals_Clear_signals+0x85> 112cf3: 90 nop <== NOT EXECUTED */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; else signals_blocked = SIGNAL_ALL_MASK; 112cf4: b9 ff ff ff ff mov $0xffffffff,%ecx 112cf9: eb c4 jmp 112cbf <_POSIX_signals_Clear_signals+0x2b> 112cfb: 90 nop <== NOT EXECUTED } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 112cfc: 8b 55 08 mov 0x8(%ebp),%edx 112cff: 8b 9a d4 00 00 00 mov 0xd4(%edx),%ebx 112d05: 89 c6 mov %eax,%esi 112d07: 21 de and %ebx,%esi 112d09: 85 ce test %ecx,%esi 112d0b: 74 1b je 112d28 <_POSIX_signals_Clear_signals+0x94> api->signals_pending &= ~mask; 112d0d: f7 d0 not %eax 112d0f: 21 d8 and %ebx,%eax 112d11: 89 82 d4 00 00 00 mov %eax,0xd4(%edx) do_callout = true; 112d17: b0 01 mov $0x1,%al } } _ISR_Enable( level ); 112d19: ff 75 e4 pushl -0x1c(%ebp) 112d1c: 9d popf return do_callout; } 112d1d: 8d 65 f4 lea -0xc(%ebp),%esp 112d20: 5b pop %ebx 112d21: 5e pop %esi 112d22: 5f pop %edi 112d23: c9 leave 112d24: c3 ret 112d25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); do_callout = false; 112d28: 31 c0 xor %eax,%eax 112d2a: eb ed jmp 112d19 <_POSIX_signals_Clear_signals+0x85> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112d2c: 8d 8a e0 6c 12 00 lea 0x126ce0(%edx),%ecx 112d32: 8b 82 e0 6c 12 00 mov 0x126ce0(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112d38: 8d 71 04 lea 0x4(%ecx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 112d3b: 39 f0 cmp %esi,%eax 112d3d: 74 45 je 112d84 <_POSIX_signals_Clear_signals+0xf0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112d3f: 8b 30 mov (%eax),%esi the_chain->first = new_first; 112d41: 89 b2 e0 6c 12 00 mov %esi,0x126ce0(%edx) _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); 112d47: 89 4e 04 mov %ecx,0x4(%esi) _POSIX_signals_Clear_process_signals( signo ); 112d4a: 83 ec 0c sub $0xc,%esp 112d4d: 53 push %ebx 112d4e: 89 45 e0 mov %eax,-0x20(%ebp) 112d51: e8 ee 04 00 00 call 113244 <_POSIX_signals_Clear_process_signals> * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { *info = psiginfo->Info; 112d56: 8b 45 e0 mov -0x20(%ebp),%eax 112d59: 8d 70 08 lea 0x8(%eax),%esi 112d5c: b9 03 00 00 00 mov $0x3,%ecx 112d61: 8b 7d 10 mov 0x10(%ebp),%edi 112d64: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 112d66: c7 00 44 6c 12 00 movl $0x126c44,(%eax) old_last_node = the_chain->last; 112d6c: 8b 15 48 6c 12 00 mov 0x126c48,%edx the_chain->last = the_node; 112d72: a3 48 6c 12 00 mov %eax,0x126c48 old_last_node->next = the_node; 112d77: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 112d79: 89 50 04 mov %edx,0x4(%eax) 112d7c: 83 c4 10 add $0x10,%esp 112d7f: e9 5f ff ff ff jmp 112ce3 <_POSIX_signals_Clear_signals+0x4f> if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 112d84: 83 ec 0c sub $0xc,%esp 112d87: 53 push %ebx 112d88: e8 b7 04 00 00 call 113244 <_POSIX_signals_Clear_process_signals> 112d8d: 83 c4 10 add $0x10,%esp 112d90: e9 4e ff ff ff jmp 112ce3 <_POSIX_signals_Clear_signals+0x4f> =============================================================================== 0010c0ac <_POSIX_signals_Get_lowest>: #include int _POSIX_signals_Get_lowest( sigset_t set ) { 10c0ac: 55 push %ebp 10c0ad: 89 e5 mov %esp,%ebp 10c0af: 56 push %esi 10c0b0: 53 push %ebx 10c0b1: 8b 55 08 mov 0x8(%ebp),%edx int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c0b4: b8 1b 00 00 00 mov $0x1b,%eax 10c0b9: bb 01 00 00 00 mov $0x1,%ebx #include #include #include #include int _POSIX_signals_Get_lowest( 10c0be: 8d 48 ff lea -0x1(%eax),%ecx 10c0c1: 89 de mov %ebx,%esi 10c0c3: d3 e6 shl %cl,%esi ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c0c5: 85 d6 test %edx,%esi 10c0c7: 75 20 jne 10c0e9 <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c0c9: 40 inc %eax 10c0ca: 83 f8 20 cmp $0x20,%eax 10c0cd: 75 ef jne 10c0be <_POSIX_signals_Get_lowest+0x12> 10c0cf: b0 01 mov $0x1,%al 10c0d1: bb 01 00 00 00 mov $0x1,%ebx 10c0d6: eb 06 jmp 10c0de <_POSIX_signals_Get_lowest+0x32> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10c0d8: 40 inc %eax 10c0d9: 83 f8 1b cmp $0x1b,%eax 10c0dc: 74 0b je 10c0e9 <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN #include #include #include #include int _POSIX_signals_Get_lowest( 10c0de: 8d 48 ff lea -0x1(%eax),%ecx 10c0e1: 89 de mov %ebx,%esi 10c0e3: d3 e6 shl %cl,%esi #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c0e5: 85 d6 test %edx,%esi 10c0e7: 74 ef je 10c0d8 <_POSIX_signals_Get_lowest+0x2c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10c0e9: 5b pop %ebx 10c0ea: 5e pop %esi 10c0eb: c9 leave 10c0ec: c3 ret =============================================================================== 00124384 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 124384: 55 push %ebp 124385: 89 e5 mov %esp,%ebp 124387: 57 push %edi 124388: 56 push %esi 124389: 53 push %ebx 12438a: 83 ec 0c sub $0xc,%esp 12438d: 8b 5d 08 mov 0x8(%ebp),%ebx 124390: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 124393: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 124399: 8d 4a ff lea -0x1(%edx),%ecx 12439c: b8 01 00 00 00 mov $0x1,%eax 1243a1: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1243a3: 8b 4b 10 mov 0x10(%ebx),%ecx 1243a6: 89 cf mov %ecx,%edi 1243a8: 81 e7 00 80 00 10 and $0x10008000,%edi 1243ae: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1243b4: 74 72 je 124428 <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1243b6: 8b 96 d0 00 00 00 mov 0xd0(%esi),%edx 1243bc: f7 d2 not %edx 1243be: 85 d0 test %edx,%eax 1243c0: 74 5a je 12441c <_POSIX_signals_Unblock_thread+0x98> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 1243c2: f7 c1 00 00 00 10 test $0x10000000,%ecx 1243c8: 74 3a je 124404 <_POSIX_signals_Unblock_thread+0x80> the_thread->Wait.return_code = EINTR; 1243ca: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 1243d1: f7 c1 e0 be 03 00 test $0x3bee0,%ecx 1243d7: 0f 85 93 00 00 00 jne 124470 <_POSIX_signals_Unblock_thread+0xec><== NEVER TAKEN _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 1243dd: 83 e1 08 and $0x8,%ecx 1243e0: 74 3a je 12441c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 1243e2: 83 ec 0c sub $0xc,%esp 1243e5: 8d 43 48 lea 0x48(%ebx),%eax 1243e8: 50 push %eax 1243e9: e8 4e f4 fe ff call 11383c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1243ee: 5a pop %edx 1243ef: 59 pop %ecx 1243f0: 68 f8 ff 03 10 push $0x1003fff8 1243f5: 53 push %ebx 1243f6: e8 c9 df fe ff call 1123c4 <_Thread_Clear_state> 1243fb: 83 c4 10 add $0x10,%esp } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 1243fe: 31 c0 xor %eax,%eax 124400: eb 1c jmp 12441e <_POSIX_signals_Unblock_thread+0x9a> 124402: 66 90 xchg %ax,%ax <== NOT EXECUTED else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 124404: 85 c9 test %ecx,%ecx 124406: 75 14 jne 12441c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 124408: a1 54 e7 12 00 mov 0x12e754,%eax 12440d: 85 c0 test %eax,%eax 12440f: 74 0b je 12441c <_POSIX_signals_Unblock_thread+0x98> 124411: 3b 1d 58 e7 12 00 cmp 0x12e758,%ebx 124417: 74 7b je 124494 <_POSIX_signals_Unblock_thread+0x110><== ALWAYS TAKEN 124419: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Dispatch_necessary = true; } } return false; 12441c: 31 c0 xor %eax,%eax } 12441e: 8d 65 f4 lea -0xc(%ebp),%esp 124421: 5b pop %ebx 124422: 5e pop %esi 124423: 5f pop %edi 124424: c9 leave 124425: c3 ret 124426: 66 90 xchg %ax,%ax <== NOT EXECUTED * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 124428: 85 43 30 test %eax,0x30(%ebx) 12442b: 74 33 je 124460 <_POSIX_signals_Unblock_thread+0xdc> the_thread->Wait.return_code = EINTR; 12442d: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 124434: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 124437: 8b 75 10 mov 0x10(%ebp),%esi 12443a: 85 f6 test %esi,%esi 12443c: 74 42 je 124480 <_POSIX_signals_Unblock_thread+0xfc> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 12443e: b9 03 00 00 00 mov $0x3,%ecx 124443: 89 c7 mov %eax,%edi 124445: 8b 75 10 mov 0x10(%ebp),%esi 124448: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 12444a: 83 ec 0c sub $0xc,%esp 12444d: 53 push %ebx 12444e: e8 51 ea fe ff call 112ea4 <_Thread_queue_Extract_with_proxy> return true; 124453: 83 c4 10 add $0x10,%esp 124456: b0 01 mov $0x1,%al if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 124458: 8d 65 f4 lea -0xc(%ebp),%esp 12445b: 5b pop %ebx 12445c: 5e pop %esi 12445d: 5f pop %edi 12445e: c9 leave 12445f: c3 ret * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 124460: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx 124466: f7 d1 not %ecx 124468: 85 c8 test %ecx,%eax 12446a: 75 c1 jne 12442d <_POSIX_signals_Unblock_thread+0xa9> 12446c: eb ae jmp 12441c <_POSIX_signals_Unblock_thread+0x98> 12446e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 124470: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124473: 53 push %ebx <== NOT EXECUTED 124474: e8 2b ea fe ff call 112ea4 <_Thread_queue_Extract_with_proxy><== NOT EXECUTED 124479: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 12447c: 31 c0 xor %eax,%eax <== NOT EXECUTED 12447e: eb 9e jmp 12441e <_POSIX_signals_Unblock_thread+0x9a><== NOT EXECUTED the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 124480: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 124482: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 124489: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 124490: eb b8 jmp 12444a <_POSIX_signals_Unblock_thread+0xc6> 124492: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 124494: c6 05 64 e7 12 00 01 movb $0x1,0x12e764 } } return false; 12449b: 31 c0 xor %eax,%eax 12449d: e9 7c ff ff ff jmp 12441e <_POSIX_signals_Unblock_thread+0x9a> =============================================================================== 0010d83c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10d83c: 55 push %ebp 10d83d: 89 e5 mov %esp,%ebp 10d83f: 56 push %esi 10d840: 53 push %ebx 10d841: 8b 5d 08 mov 0x8(%ebp),%ebx 10d844: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 10d847: 85 db test %ebx,%ebx 10d849: 74 35 je 10d880 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 10d84b: 85 f6 test %esi,%esi 10d84d: 74 31 je 10d880 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 10d84f: 83 ec 0c sub $0xc,%esp 10d852: ff 35 e4 7e 12 00 pushl 0x127ee4 10d858: e8 c7 ed ff ff call 10c624 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 10d85d: 5a pop %edx 10d85e: 59 pop %ecx 10d85f: 56 push %esi 10d860: 53 push %ebx 10d861: e8 d6 46 00 00 call 111f3c <_Heap_Get_information> _RTEMS_Unlock_allocator(); 10d866: 58 pop %eax 10d867: ff 35 e4 7e 12 00 pushl 0x127ee4 10d86d: e8 fa ed ff ff call 10c66c <_API_Mutex_Unlock> return true; 10d872: 83 c4 10 add $0x10,%esp 10d875: b0 01 mov $0x1,%al } 10d877: 8d 65 f8 lea -0x8(%ebp),%esp 10d87a: 5b pop %ebx 10d87b: 5e pop %esi 10d87c: c9 leave 10d87d: c3 ret 10d87e: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !the_heap ) return false; if ( !the_info ) return false; 10d880: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 10d882: 8d 65 f8 lea -0x8(%ebp),%esp 10d885: 5b pop %ebx 10d886: 5e pop %esi 10d887: c9 leave 10d888: c3 ret =============================================================================== 00110bc4 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110bc4: 55 push %ebp 110bc5: 89 e5 mov %esp,%ebp 110bc7: 56 push %esi 110bc8: 53 push %ebx 110bc9: 83 ec 10 sub $0x10,%esp 110bcc: 8b 5d 08 mov 0x8(%ebp),%ebx 110bcf: 8b 75 0c mov 0xc(%ebp),%esi 110bd2: 8a 45 10 mov 0x10(%ebp),%al * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 110bd5: 8b 15 14 de 12 00 mov 0x12de14,%edx 110bdb: 85 d2 test %edx,%edx 110bdd: 74 19 je 110bf8 <_Protected_heap_Walk+0x34> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110bdf: 0f b6 c0 movzbl %al,%eax 110be2: 89 45 10 mov %eax,0x10(%ebp) 110be5: 89 75 0c mov %esi,0xc(%ebp) 110be8: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110beb: 8d 65 f8 lea -0x8(%ebp),%esp 110bee: 5b pop %ebx 110bef: 5e pop %esi 110bf0: c9 leave if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110bf1: e9 4a f2 ff ff jmp 10fe40 <_Heap_Walk> 110bf6: 66 90 xchg %ax,%ax <== NOT EXECUTED * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 110bf8: 83 ec 0c sub $0xc,%esp 110bfb: ff 35 c4 de 12 00 pushl 0x12dec4 110c01: 88 45 f4 mov %al,-0xc(%ebp) 110c04: e8 cf e3 ff ff call 10efd8 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110c09: 83 c4 0c add $0xc,%esp 110c0c: 8a 45 f4 mov -0xc(%ebp),%al 110c0f: 0f b6 c0 movzbl %al,%eax 110c12: 50 push %eax 110c13: 56 push %esi 110c14: 53 push %ebx 110c15: e8 26 f2 ff ff call 10fe40 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110c1a: 5a pop %edx 110c1b: ff 35 c4 de 12 00 pushl 0x12dec4 110c21: 88 45 f4 mov %al,-0xc(%ebp) 110c24: e8 f7 e3 ff ff call 10f020 <_API_Mutex_Unlock> 110c29: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110c2c: 8a 45 f4 mov -0xc(%ebp),%al 110c2f: 8d 65 f8 lea -0x8(%ebp),%esp 110c32: 5b pop %ebx 110c33: 5e pop %esi 110c34: c9 leave 110c35: c3 ret =============================================================================== 00110d90 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 110d90: 55 push %ebp 110d91: 89 e5 mov %esp,%ebp 110d93: 53 push %ebx 110d94: 83 ec 10 sub $0x10,%esp 110d97: 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 ); 110d9a: 80 3d e4 21 12 00 01 cmpb $0x1,0x1221e4 110da1: 19 c0 sbb %eax,%eax 110da3: 83 e0 c0 and $0xffffffc0,%eax 110da6: 83 c0 60 add $0x60,%eax if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 110da9: 50 push %eax 110daa: e8 d5 da ff ff call 10e884 <_Workspace_Allocate> if ( !api ) 110daf: 83 c4 10 add $0x10,%esp 110db2: 85 c0 test %eax,%eax 110db4: 74 6a je 110e20 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 110db6: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 110dbc: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 110dc2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 110dc9: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 110dcd: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 110dd4: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 110ddb: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 110de2: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 110de9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 110df0: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 110df7: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 110dfa: 80 3d e4 21 12 00 00 cmpb $0x0,0x1221e4 110e01: 74 13 je 110e16 <_RTEMS_tasks_Create_extension+0x86> 110e03: 31 d2 xor %edx,%edx 110e05: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 110e08: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 110e0f: 00 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 110e10: 42 inc %edx 110e11: 83 fa 10 cmp $0x10,%edx 110e14: 75 f2 jne 110e08 <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 110e16: b0 01 mov $0x1,%al } 110e18: 8b 5d fc mov -0x4(%ebp),%ebx 110e1b: c9 leave 110e1c: c3 ret 110e1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 110e20: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 110e22: 8b 5d fc mov -0x4(%ebp),%ebx 110e25: c9 leave 110e26: c3 ret =============================================================================== 00110d38 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 110d38: 55 push %ebp 110d39: 89 e5 mov %esp,%ebp 110d3b: 56 push %esi 110d3c: 53 push %ebx 110d3d: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 110d40: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax deleted->task_variables = NULL; 110d46: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 110d4d: 00 00 00 while (tvp) { 110d50: 85 c0 test %eax,%eax 110d52: 75 06 jne 110d5a <_RTEMS_tasks_Delete_extension+0x22> 110d54: eb 17 jmp 110d6d <_RTEMS_tasks_Delete_extension+0x35> 110d56: 66 90 xchg %ax,%ax <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 110d58: 89 f0 mov %esi,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 110d5a: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 110d5c: 83 ec 08 sub $0x8,%esp 110d5f: 50 push %eax 110d60: 53 push %ebx 110d61: e8 56 01 00 00 call 110ebc <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 110d66: 83 c4 10 add $0x10,%esp 110d69: 85 f6 test %esi,%esi 110d6b: 75 eb jne 110d58 <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 110d6d: 83 ec 0c sub $0xc,%esp 110d70: ff b3 f4 00 00 00 pushl 0xf4(%ebx) 110d76: e8 25 db ff ff call 10e8a0 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 110d7b: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 110d82: 00 00 00 110d85: 83 c4 10 add $0x10,%esp } 110d88: 8d 65 f8 lea -0x8(%ebp),%esp 110d8b: 5b pop %ebx 110d8c: 5e pop %esi 110d8d: c9 leave 110d8e: c3 ret =============================================================================== 00110cbc <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 110cbc: 55 push %ebp 110cbd: 89 e5 mov %esp,%ebp 110cbf: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 110cc2: a1 60 22 12 00 mov 0x122260,%eax 110cc7: 85 c0 test %eax,%eax 110cc9: 74 05 je 110cd0 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 110ccb: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 110ccc: ff e0 jmp *%eax 110cce: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110cd0: c9 leave 110cd1: c3 ret =============================================================================== 0010ba60 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10ba60: 55 push %ebp 10ba61: 89 e5 mov %esp,%ebp 10ba63: 57 push %edi 10ba64: 56 push %esi 10ba65: 53 push %ebx 10ba66: 83 ec 1c sub $0x1c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10ba69: 8b 1d 0c 22 12 00 mov 0x12220c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10ba6f: 8b 3d 08 22 12 00 mov 0x122208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10ba75: 85 db test %ebx,%ebx 10ba77: 74 46 je 10babf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10ba79: 85 ff test %edi,%edi 10ba7b: 74 42 je 10babf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10ba7d: 31 f6 xor %esi,%esi 10ba7f: 90 nop return_value = rtems_task_create( 10ba80: 83 ec 08 sub $0x8,%esp 10ba83: 8d 45 e4 lea -0x1c(%ebp),%eax 10ba86: 50 push %eax 10ba87: ff 73 0c pushl 0xc(%ebx) 10ba8a: ff 73 14 pushl 0x14(%ebx) 10ba8d: ff 73 04 pushl 0x4(%ebx) 10ba90: ff 73 08 pushl 0x8(%ebx) 10ba93: ff 33 pushl (%ebx) 10ba95: e8 92 fd ff ff call 10b82c user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10ba9a: 83 c4 20 add $0x20,%esp 10ba9d: 85 c0 test %eax,%eax 10ba9f: 75 26 jne 10bac7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10baa1: 51 push %ecx 10baa2: ff 73 18 pushl 0x18(%ebx) 10baa5: ff 73 10 pushl 0x10(%ebx) 10baa8: ff 75 e4 pushl -0x1c(%ebp) 10baab: e8 24 00 00 00 call 10bad4 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bab0: 83 c4 10 add $0x10,%esp 10bab3: 85 c0 test %eax,%eax 10bab5: 75 10 jne 10bac7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bab7: 46 inc %esi 10bab8: 83 c3 1c add $0x1c,%ebx 10babb: 39 f7 cmp %esi,%edi 10babd: 77 c1 ja 10ba80 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10babf: 8d 65 f4 lea -0xc(%ebp),%esp 10bac2: 5b pop %ebx 10bac3: 5e pop %esi 10bac4: 5f pop %edi 10bac5: c9 leave 10bac6: c3 ret id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10bac7: 52 push %edx 10bac8: 50 push %eax 10bac9: 6a 01 push $0x1 10bacb: 6a 01 push $0x1 10bacd: e8 fe 0d 00 00 call 10c8d0 <_Internal_error_Occurred> =============================================================================== 00110c74 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110c74: 55 push %ebp 110c75: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 110c77: 8b 45 08 mov 0x8(%ebp),%eax 110c7a: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 110c80: 85 c0 test %eax,%eax 110c82: 74 13 je 110c97 <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110c84: 8b 50 04 mov 0x4(%eax),%edx 110c87: 8b 0a mov (%edx),%ecx 110c89: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 110c8c: 8b 48 08 mov 0x8(%eax),%ecx 110c8f: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110c91: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 110c93: 85 c0 test %eax,%eax 110c95: 75 ed jne 110c84 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 110c97: 8b 45 0c mov 0xc(%ebp),%eax 110c9a: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 110ca0: 85 c0 test %eax,%eax 110ca2: 74 13 je 110cb7 <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 110ca4: 8b 50 04 mov 0x4(%eax),%edx 110ca7: 8b 0a mov (%edx),%ecx 110ca9: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 110cac: 8b 48 0c mov 0xc(%eax),%ecx 110caf: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110cb1: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 110cb3: 85 c0 test %eax,%eax 110cb5: 75 ed jne 110ca4 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 110cb7: c9 leave 110cb8: c3 ret =============================================================================== 0010c424 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 10c424: 55 push %ebp 10c425: 89 e5 mov %esp,%ebp 10c427: 57 push %edi 10c428: 56 push %esi 10c429: 53 push %ebx 10c42a: 83 ec 38 sub $0x38,%esp 10c42d: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 10c430: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 10c433: 8d 75 e0 lea -0x20(%ebp),%esi 10c436: 56 push %esi 10c437: e8 2c 19 00 00 call 10dd68 <_TOD_Get_uptime> _Timestamp_Subtract( 10c43c: 83 c4 0c add $0xc,%esp 10c43f: ff 75 0c pushl 0xc(%ebp) 10c442: 56 push %esi 10c443: 8d 43 4c lea 0x4c(%ebx),%eax 10c446: 50 push %eax 10c447: e8 8c 3a 00 00 call 10fed8 <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 10c44c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 10c452: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 10c458: 89 45 d8 mov %eax,-0x28(%ebp) 10c45b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c45e: 83 c4 10 add $0x10,%esp 10c461: 39 3d b8 ad 12 00 cmp %edi,0x12adb8 10c467: 74 0b je 10c474 <_Rate_monotonic_Get_status+0x50> if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c469: b0 01 mov $0x1,%al } 10c46b: 8d 65 f4 lea -0xc(%ebp),%esp 10c46e: 5b pop %ebx 10c46f: 5e pop %esi 10c470: 5f pop %edi 10c471: c9 leave 10c472: c3 ret 10c473: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 10c474: 52 push %edx 10c475: 8d 7d d0 lea -0x30(%ebp),%edi 10c478: 57 push %edi 10c479: 56 push %esi 10c47a: 68 b0 a8 12 00 push $0x12a8b0 10c47f: e8 54 3a 00 00 call 10fed8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 10c484: 5e pop %esi 10c485: 58 pop %eax 10c486: 57 push %edi 10c487: 8d 75 d8 lea -0x28(%ebp),%esi 10c48a: 56 push %esi 10c48b: e8 4c 39 00 00 call 10fddc <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 10c490: 83 c3 44 add $0x44,%ebx 10c493: 5a pop %edx 10c494: 59 pop %ecx 10c495: 53 push %ebx 10c496: 56 push %esi 10c497: e8 18 3a 00 00 call 10feb4 <_Timespec_Less_than> 10c49c: 83 c4 10 add $0x10,%esp 10c49f: 84 c0 test %al,%al 10c4a1: 74 05 je 10c4a8 <_Rate_monotonic_Get_status+0x84> return false; 10c4a3: 31 c0 xor %eax,%eax 10c4a5: eb c4 jmp 10c46b <_Rate_monotonic_Get_status+0x47> 10c4a7: 90 nop <== NOT EXECUTED /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 10c4a8: 50 push %eax 10c4a9: ff 75 10 pushl 0x10(%ebp) 10c4ac: 56 push %esi 10c4ad: 53 push %ebx 10c4ae: e8 25 3a 00 00 call 10fed8 <_Timespec_Subtract> 10c4b3: 83 c4 10 add $0x10,%esp if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c4b6: b0 01 mov $0x1,%al 10c4b8: eb b1 jmp 10c46b <_Rate_monotonic_Get_status+0x47> =============================================================================== 0010c4bc <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c4bc: 55 push %ebp 10c4bd: 89 e5 mov %esp,%ebp 10c4bf: 57 push %edi 10c4c0: 56 push %esi 10c4c1: 53 push %ebx 10c4c2: 83 ec 28 sub $0x28,%esp 10c4c5: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c4c8: 8b 73 40 mov 0x40(%ebx),%esi * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); 10c4cb: 8d 7d e0 lea -0x20(%ebp),%edi 10c4ce: 57 push %edi 10c4cf: e8 94 18 00 00 call 10dd68 <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; 10c4d4: 8b 45 e0 mov -0x20(%ebp),%eax 10c4d7: 8b 55 e4 mov -0x1c(%ebp),%edx 10c4da: 89 43 4c mov %eax,0x4c(%ebx) 10c4dd: 89 53 50 mov %edx,0x50(%ebx) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; 10c4e0: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c4e6: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c4ec: 89 43 44 mov %eax,0x44(%ebx) 10c4ef: 89 53 48 mov %edx,0x48(%ebx) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c4f2: 83 c4 10 add $0x10,%esp 10c4f5: 39 35 b8 ad 12 00 cmp %esi,0x12adb8 10c4fb: 74 0b je 10c508 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c4fd: 8d 65 f4 lea -0xc(%ebp),%esp 10c500: 5b pop %ebx 10c501: 5e pop %esi 10c502: 5f pop %edi 10c503: c9 leave 10c504: c3 ret 10c505: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c508: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c509: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c50c: 56 push %esi 10c50d: 57 push %edi 10c50e: 68 b0 a8 12 00 push $0x12a8b0 10c513: e8 c0 39 00 00 call 10fed8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c518: 59 pop %ecx 10c519: 5f pop %edi 10c51a: 56 push %esi 10c51b: 83 c3 44 add $0x44,%ebx 10c51e: 53 push %ebx 10c51f: e8 b8 38 00 00 call 10fddc <_Timespec_Add_to> 10c524: 83 c4 10 add $0x10,%esp } #endif } 10c527: 8d 65 f4 lea -0xc(%ebp),%esp 10c52a: 5b pop %ebx 10c52b: 5e pop %esi 10c52c: 5f pop %edi 10c52d: c9 leave 10c52e: c3 ret =============================================================================== 0010ca78 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10ca78: 55 push %ebp 10ca79: 89 e5 mov %esp,%ebp 10ca7b: 83 ec 2c sub $0x2c,%esp /* * 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 ); 10ca7e: 8d 45 f4 lea -0xc(%ebp),%eax 10ca81: 50 push %eax 10ca82: ff 75 08 pushl 0x8(%ebp) 10ca85: 68 00 a7 12 00 push $0x12a700 10ca8a: e8 79 1d 00 00 call 10e808 <_Objects_Get> switch ( location ) { 10ca8f: 83 c4 10 add $0x10,%esp 10ca92: 8b 55 f4 mov -0xc(%ebp),%edx 10ca95: 85 d2 test %edx,%edx 10ca97: 75 29 jne 10cac2 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10ca99: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10ca9c: f6 42 11 40 testb $0x40,0x11(%edx) 10caa0: 74 08 je 10caaa <_Rate_monotonic_Timeout+0x32> 10caa2: 8b 48 08 mov 0x8(%eax),%ecx 10caa5: 39 4a 20 cmp %ecx,0x20(%edx) 10caa8: 74 4e je 10caf8 <_Rate_monotonic_Timeout+0x80> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10caaa: 83 78 38 01 cmpl $0x1,0x38(%eax) 10caae: 74 14 je 10cac4 <_Rate_monotonic_Timeout+0x4c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10cab0: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10cab7: a1 f4 a7 12 00 mov 0x12a7f4,%eax 10cabc: 48 dec %eax 10cabd: a3 f4 a7 12 00 mov %eax,0x12a7f4 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10cac2: c9 leave 10cac3: c3 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10cac4: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10cacb: 83 ec 0c sub $0xc,%esp 10cace: 50 push %eax 10cacf: 89 45 e4 mov %eax,-0x1c(%ebp) 10cad2: e8 e5 f9 ff ff call 10c4bc <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cad7: 8b 45 e4 mov -0x1c(%ebp),%eax 10cada: 8b 50 3c mov 0x3c(%eax),%edx 10cadd: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cae0: 5a pop %edx 10cae1: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cae2: 83 c0 10 add $0x10,%eax 10cae5: 50 push %eax 10cae6: 68 c4 a8 12 00 push $0x12a8c4 10caeb: e8 c8 36 00 00 call 1101b8 <_Watchdog_Insert> 10caf0: 83 c4 10 add $0x10,%esp 10caf3: eb c2 jmp 10cab7 <_Rate_monotonic_Timeout+0x3f> 10caf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10caf8: 83 ec 08 sub $0x8,%esp 10cafb: 68 f8 ff 03 10 push $0x1003fff8 10cb00: 52 push %edx 10cb01: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb04: e8 cb 21 00 00 call 10ecd4 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10cb09: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb0c: 89 04 24 mov %eax,(%esp) 10cb0f: eb c1 jmp 10cad2 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c530 <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c530: 55 push %ebp 10c531: 89 e5 mov %esp,%ebp 10c533: 57 push %edi 10c534: 56 push %esi 10c535: 53 push %ebx 10c536: 83 ec 1c sub $0x1c,%esp 10c539: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c53c: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c53f: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c543: 0f 84 bf 00 00 00 je 10c608 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c549: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c54a: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c54d: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c54e: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c551: 56 push %esi 10c552: 53 push %ebx 10c553: e8 cc fe ff ff call 10c424 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c558: 83 c4 10 add $0x10,%esp 10c55b: 84 c0 test %al,%al 10c55d: 75 09 jne 10c568 <_Rate_monotonic_Update_statistics+0x38> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 10c55f: 8d 65 f4 lea -0xc(%ebp),%esp 10c562: 5b pop %ebx 10c563: 5e pop %esi 10c564: 5f pop %edi 10c565: c9 leave 10c566: c3 ret 10c567: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c568: 83 ec 08 sub $0x8,%esp 10c56b: 57 push %edi 10c56c: 8d 43 6c lea 0x6c(%ebx),%eax 10c56f: 50 push %eax 10c570: e8 67 38 00 00 call 10fddc <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c575: 58 pop %eax 10c576: 5a pop %edx 10c577: 8d 43 5c lea 0x5c(%ebx),%eax 10c57a: 50 push %eax 10c57b: 57 push %edi 10c57c: e8 33 39 00 00 call 10feb4 <_Timespec_Less_than> 10c581: 83 c4 10 add $0x10,%esp 10c584: 84 c0 test %al,%al 10c586: 74 0c je 10c594 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c588: 8b 45 e0 mov -0x20(%ebp),%eax 10c58b: 8b 55 e4 mov -0x1c(%ebp),%edx 10c58e: 89 43 5c mov %eax,0x5c(%ebx) 10c591: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c594: 83 ec 08 sub $0x8,%esp 10c597: 8d 43 64 lea 0x64(%ebx),%eax 10c59a: 50 push %eax 10c59b: 57 push %edi 10c59c: e8 ef 38 00 00 call 10fe90 <_Timespec_Greater_than> 10c5a1: 83 c4 10 add $0x10,%esp 10c5a4: 84 c0 test %al,%al 10c5a6: 74 0c je 10c5b4 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c5a8: 8b 45 e0 mov -0x20(%ebp),%eax 10c5ab: 8b 55 e4 mov -0x1c(%ebp),%edx 10c5ae: 89 43 64 mov %eax,0x64(%ebx) 10c5b1: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 10c5b4: 83 ec 08 sub $0x8,%esp 10c5b7: 56 push %esi 10c5b8: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c5be: 50 push %eax 10c5bf: e8 18 38 00 00 call 10fddc <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c5c4: 5a pop %edx 10c5c5: 59 pop %ecx 10c5c6: 8d 43 74 lea 0x74(%ebx),%eax 10c5c9: 50 push %eax 10c5ca: 56 push %esi 10c5cb: e8 e4 38 00 00 call 10feb4 <_Timespec_Less_than> 10c5d0: 83 c4 10 add $0x10,%esp 10c5d3: 84 c0 test %al,%al 10c5d5: 75 39 jne 10c610 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c5d7: 83 ec 08 sub $0x8,%esp 10c5da: 8d 43 7c lea 0x7c(%ebx),%eax 10c5dd: 50 push %eax 10c5de: 56 push %esi 10c5df: e8 ac 38 00 00 call 10fe90 <_Timespec_Greater_than> 10c5e4: 83 c4 10 add $0x10,%esp 10c5e7: 84 c0 test %al,%al 10c5e9: 0f 84 70 ff ff ff je 10c55f <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c5ef: 8b 45 d8 mov -0x28(%ebp),%eax 10c5f2: 8b 55 dc mov -0x24(%ebp),%edx 10c5f5: 89 43 7c mov %eax,0x7c(%ebx) 10c5f8: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 10c5fe: 8d 65 f4 lea -0xc(%ebp),%esp 10c601: 5b pop %ebx 10c602: 5e pop %esi 10c603: 5f pop %edi 10c604: c9 leave 10c605: c3 ret 10c606: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c608: ff 43 58 incl 0x58(%ebx) 10c60b: e9 39 ff ff ff jmp 10c549 <_Rate_monotonic_Update_statistics+0x19> */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 10c610: 8b 45 d8 mov -0x28(%ebp),%eax 10c613: 8b 55 dc mov -0x24(%ebp),%edx 10c616: 89 43 74 mov %eax,0x74(%ebx) 10c619: 89 53 78 mov %edx,0x78(%ebx) 10c61c: eb b9 jmp 10c5d7 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010daa4 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10daa4: 55 push %ebp 10daa5: 89 e5 mov %esp,%ebp 10daa7: 53 push %ebx 10daa8: 83 ec 04 sub $0x4,%esp 10daab: 8b 5d 08 mov 0x8(%ebp),%ebx 10daae: a1 54 23 13 00 mov 0x132354,%eax 10dab3: 40 inc %eax 10dab4: a3 54 23 13 00 mov %eax,0x132354 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10dab9: a1 e8 23 13 00 mov 0x1323e8,%eax if ( time->tv_sec < seconds ) 10dabe: 8b 13 mov (%ebx),%edx 10dac0: 39 d0 cmp %edx,%eax 10dac2: 7f 34 jg 10daf8 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10dac4: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10dac5: 29 c2 sub %eax,%edx 10dac7: 52 push %edx 10dac8: 6a 00 push $0x0 10daca: 68 18 24 13 00 push $0x132418 10dacf: e8 30 25 00 00 call 110004 <_Watchdog_Adjust> 10dad4: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10dad7: 8b 03 mov (%ebx),%eax 10dad9: a3 e8 23 13 00 mov %eax,0x1323e8 10dade: 8b 43 04 mov 0x4(%ebx),%eax 10dae1: a3 ec 23 13 00 mov %eax,0x1323ec _TOD_Is_set = true; 10dae6: c6 05 68 23 13 00 01 movb $0x1,0x132368 _TOD_Activate(); _Thread_Enable_dispatch(); } 10daed: 8b 5d fc mov -0x4(%ebp),%ebx 10daf0: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10daf1: e9 1e 13 00 00 jmp 10ee14 <_Thread_Enable_dispatch> 10daf6: 66 90 xchg %ax,%ax <== NOT EXECUTED 10daf8: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10daf9: 29 d0 sub %edx,%eax 10dafb: 50 push %eax 10dafc: 6a 01 push $0x1 10dafe: 68 18 24 13 00 push $0x132418 10db03: e8 fc 24 00 00 call 110004 <_Watchdog_Adjust> 10db08: 83 c4 10 add $0x10,%esp 10db0b: eb ca jmp 10dad7 <_TOD_Set+0x33> =============================================================================== 0010c1ac <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c1ac: 55 push %ebp 10c1ad: 89 e5 mov %esp,%ebp 10c1af: 56 push %esi 10c1b0: 53 push %ebx 10c1b1: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c1b4: 8b 72 08 mov 0x8(%edx),%esi 10c1b7: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c1b8: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c1ba: 89 c3 mov %eax,%ebx 10c1bc: 83 e3 03 and $0x3,%ebx 10c1bf: 74 67 je 10c228 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c1c1: 8b 4a 04 mov 0x4(%edx),%ecx 10c1c4: 0f b7 8c 09 40 3a 12 movzwl 0x123a40(%ecx,%ecx,1),%ecx 10c1cb: 00 10c1cc: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c1cf: 0f b7 8c 1b 74 3a 12 movzwl 0x123a74(%ebx,%ebx,1),%ecx 10c1d6: 00 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c1d7: 2d c4 07 00 00 sub $0x7c4,%eax 10c1dc: c1 e8 02 shr $0x2,%eax 10c1df: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c1e2: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c1e5: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c1e8: 8d 04 98 lea (%eax,%ebx,4),%eax 10c1eb: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c1ed: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c1ef: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c1f2: 8d 04 81 lea (%ecx,%eax,4),%eax 10c1f5: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c1f8: c1 e0 02 shl $0x2,%eax 10c1fb: 29 c8 sub %ecx,%eax 10c1fd: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c200: 8b 5a 14 mov 0x14(%edx),%ebx 10c203: 8b 4a 0c mov 0xc(%edx),%ecx 10c206: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c209: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c20c: c1 e1 02 shl $0x2,%ecx 10c20f: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c212: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c215: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c218: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c21f: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c222: 5b pop %ebx 10c223: 5e pop %esi 10c224: c9 leave 10c225: c3 ret 10c226: 66 90 xchg %ax,%ax <== NOT EXECUTED time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c228: 8b 4a 04 mov 0x4(%edx),%ecx 10c22b: 0f b7 8c 09 5a 3a 12 movzwl 0x123a5a(%ecx,%ecx,1),%ecx 10c232: 00 10c233: 8d 34 31 lea (%ecx,%esi,1),%esi 10c236: eb 97 jmp 10c1cf <_TOD_To_seconds+0x23> =============================================================================== 0010c238 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c238: 55 push %ebp 10c239: 89 e5 mov %esp,%ebp 10c23b: 53 push %ebx 10c23c: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10c23f: 8b 1d 2c 62 12 00 mov 0x12622c,%ebx if ((!the_tod) || 10c245: 85 c9 test %ecx,%ecx 10c247: 74 53 je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c249: b8 40 42 0f 00 mov $0xf4240,%eax 10c24e: 31 d2 xor %edx,%edx 10c250: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c252: 3b 41 18 cmp 0x18(%ecx),%eax 10c255: 76 45 jbe 10c29c <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c257: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c25b: 77 3f ja 10c29c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c25d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c261: 77 39 ja 10c29c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c263: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c267: 77 33 ja 10c29c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c269: 8b 41 04 mov 0x4(%ecx),%eax rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c26c: 85 c0 test %eax,%eax 10c26e: 74 2c je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c270: 83 f8 0c cmp $0xc,%eax 10c273: 77 27 ja 10c29c <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c275: 8b 11 mov (%ecx),%edx (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 10c277: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c27d: 76 1d jbe 10c29c <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c27f: 8b 49 08 mov 0x8(%ecx),%ecx (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c282: 85 c9 test %ecx,%ecx 10c284: 74 16 je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c286: 83 e2 03 and $0x3,%edx 10c289: 75 16 jne 10c2a1 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c28b: 8b 04 85 b4 3a 12 00 mov 0x123ab4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c292: 39 c8 cmp %ecx,%eax 10c294: 0f 93 c0 setae %al 10c297: eb 05 jmp 10c29e <_TOD_Validate+0x66> 10c299: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 10c29c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c29e: 5b pop %ebx 10c29f: c9 leave 10c2a0: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c2a1: 8b 04 85 80 3a 12 00 mov 0x123a80(,%eax,4),%eax 10c2a8: eb e8 jmp 10c292 <_TOD_Validate+0x5a> =============================================================================== 0010d1a4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d1a4: 55 push %ebp 10d1a5: 89 e5 mov %esp,%ebp 10d1a7: 57 push %edi 10d1a8: 56 push %esi 10d1a9: 53 push %ebx 10d1aa: 83 ec 28 sub $0x28,%esp 10d1ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10d1b0: 8b 75 0c mov 0xc(%ebp),%esi 10d1b3: 8a 45 10 mov 0x10(%ebp),%al 10d1b6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d1b9: 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 ); 10d1bc: 53 push %ebx 10d1bd: e8 a2 0e 00 00 call 10e064 <_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 ) 10d1c2: 83 c4 10 add $0x10,%esp 10d1c5: 39 73 14 cmp %esi,0x14(%ebx) 10d1c8: 74 0d je 10d1d7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d1ca: 83 ec 08 sub $0x8,%esp 10d1cd: 56 push %esi 10d1ce: 53 push %ebx 10d1cf: e8 44 0d 00 00 call 10df18 <_Thread_Set_priority> 10d1d4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d1d7: 9c pushf 10d1d8: fa cli 10d1d9: 5a pop %edx /* * 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; 10d1da: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d1dd: 83 f8 04 cmp $0x4,%eax 10d1e0: 74 26 je 10d208 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d1e2: 83 e7 04 and $0x4,%edi 10d1e5: 74 15 je 10d1fc <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d1e7: 52 push %edx 10d1e8: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d1e9: a9 e0 be 03 00 test $0x3bee0,%eax 10d1ee: 0f 85 bc 00 00 00 jne 10d2b0 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d1f4: 8d 65 f4 lea -0xc(%ebp),%esp 10d1f7: 5b pop %ebx 10d1f8: 5e pop %esi 10d1f9: 5f pop %edi 10d1fa: c9 leave 10d1fb: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d1fc: 89 c1 mov %eax,%ecx 10d1fe: 83 e1 fb and $0xfffffffb,%ecx 10d201: 89 4b 10 mov %ecx,0x10(%ebx) 10d204: eb e1 jmp 10d1e7 <_Thread_Change_priority+0x43> 10d206: 66 90 xchg %ax,%ax <== NOT EXECUTED } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d208: 83 e7 04 and $0x4,%edi 10d20b: 75 45 jne 10d252 <_Thread_Change_priority+0xae><== 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 ); 10d20d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d214: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d21a: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d221: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d224: 66 a1 80 65 12 00 mov 0x126580,%ax 10d22a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d230: 66 a3 80 65 12 00 mov %ax,0x126580 _Priority_bit_map_Add( &the_thread->Priority_map ); if ( prepend_it ) 10d236: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d23a: 0f 84 88 00 00 00 je 10d2c8 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d240: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d246: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d249: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d24b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d24d: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d24f: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10d252: 52 push %edx 10d253: 9d popf 10d254: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d255: 66 8b 1d 80 65 12 00 mov 0x126580,%bx 10d25c: 31 c0 xor %eax,%eax 10d25e: 89 c1 mov %eax,%ecx 10d260: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d264: 0f b7 c9 movzwl %cx,%ecx 10d267: 66 8b 9c 09 00 66 12 mov 0x126600(%ecx,%ecx,1),%bx 10d26e: 00 10d26f: 66 0f bc c3 bsf %bx,%ax return (_Priority_Bits_index( major ) << 4) + 10d273: c1 e1 04 shl $0x4,%ecx 10d276: 0f b7 c0 movzwl %ax,%eax */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 10d279: 8d 04 01 lea (%ecx,%eax,1),%eax 10d27c: 8d 04 40 lea (%eax,%eax,2),%eax 10d27f: c1 e0 02 shl $0x2,%eax 10d282: 03 05 a0 64 12 00 add 0x1264a0,%eax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d288: 8b 00 mov (%eax),%eax 10d28a: a3 9c 6a 12 00 mov %eax,0x126a9c * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d28f: 8b 0d 98 6a 12 00 mov 0x126a98,%ecx * 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() && 10d295: 39 c8 cmp %ecx,%eax 10d297: 74 0d je 10d2a6 <_Thread_Change_priority+0x102> 10d299: 80 79 74 00 cmpb $0x0,0x74(%ecx) 10d29d: 74 07 je 10d2a6 <_Thread_Change_priority+0x102> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10d29f: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 _ISR_Enable( level ); 10d2a6: 52 push %edx 10d2a7: 9d popf } 10d2a8: 8d 65 f4 lea -0xc(%ebp),%esp 10d2ab: 5b pop %ebx 10d2ac: 5e pop %esi 10d2ad: 5f pop %edi 10d2ae: c9 leave 10d2af: c3 ret /* 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 ); 10d2b0: 89 5d 0c mov %ebx,0xc(%ebp) 10d2b3: 8b 43 44 mov 0x44(%ebx),%eax 10d2b6: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d2b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d2bc: 5b pop %ebx 10d2bd: 5e pop %esi 10d2be: 5f pop %edi 10d2bf: 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 ); 10d2c0: e9 bb 0b 00 00 jmp 10de80 <_Thread_queue_Requeue> 10d2c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_bit_map_Add( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d2c8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d2ce: 8d 48 04 lea 0x4(%eax),%ecx 10d2d1: 89 0b mov %ecx,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d2d3: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d2d6: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d2d9: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d2db: 89 4b 04 mov %ecx,0x4(%ebx) 10d2de: e9 6f ff ff ff jmp 10d252 <_Thread_Change_priority+0xae> =============================================================================== 0010d2e4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d2e4: 55 push %ebp 10d2e5: 89 e5 mov %esp,%ebp 10d2e7: 53 push %ebx 10d2e8: 8b 45 08 mov 0x8(%ebp),%eax 10d2eb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d2ee: 9c pushf 10d2ef: fa cli 10d2f0: 5b pop %ebx current_state = the_thread->current_state; 10d2f1: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d2f4: 85 ca test %ecx,%edx 10d2f6: 74 70 je 10d368 <_Thread_Clear_state+0x84> 10d2f8: f7 d2 not %edx 10d2fa: 21 ca and %ecx,%edx current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d2fc: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10d2ff: 85 d2 test %edx,%edx 10d301: 75 65 jne 10d368 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d303: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d309: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d310: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d313: 66 8b 15 80 65 12 00 mov 0x126580,%dx 10d31a: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d320: 66 89 15 80 65 12 00 mov %dx,0x126580 _Priority_bit_map_Add( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d327: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d32d: 8d 4a 04 lea 0x4(%edx),%ecx 10d330: 89 08 mov %ecx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d332: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d335: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d338: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d33a: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d33d: 53 push %ebx 10d33e: 9d popf 10d33f: 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 ) { 10d340: 8b 50 14 mov 0x14(%eax),%edx 10d343: 8b 0d 9c 6a 12 00 mov 0x126a9c,%ecx 10d349: 3b 51 14 cmp 0x14(%ecx),%edx 10d34c: 73 1a jae 10d368 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d34e: a3 9c 6a 12 00 mov %eax,0x126a9c if ( _Thread_Executing->is_preemptible || 10d353: a1 98 6a 12 00 mov 0x126a98,%eax 10d358: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d35c: 74 12 je 10d370 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 10d35e: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 10d365: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d368: 53 push %ebx 10d369: 9d popf } 10d36a: 5b pop %ebx 10d36b: c9 leave 10d36c: c3 ret 10d36d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d370: 85 d2 test %edx,%edx 10d372: 74 ea je 10d35e <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d374: eb f2 jmp 10d368 <_Thread_Clear_state+0x84> =============================================================================== 0010d378 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d378: 55 push %ebp 10d379: 89 e5 mov %esp,%ebp 10d37b: 56 push %esi 10d37c: 53 push %ebx 10d37d: 8b 75 08 mov 0x8(%ebp),%esi 10d380: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 10d383: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d387: 8b 46 1c mov 0x1c(%esi),%eax 10d38a: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d391: a1 d4 64 12 00 mov 0x1264d4,%eax 10d396: 48 dec %eax 10d397: a3 d4 64 12 00 mov %eax,0x1264d4 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d39c: 83 ec 0c sub $0xc,%esp 10d39f: 53 push %ebx 10d3a0: e8 bf 11 00 00 call 10e564 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d3a5: a1 d4 64 12 00 mov 0x1264d4,%eax 10d3aa: 40 inc %eax 10d3ab: a3 d4 64 12 00 mov %eax,0x1264d4 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10d3b0: 59 pop %ecx 10d3b1: 58 pop %eax 10d3b2: 53 push %ebx 10d3b3: 56 push %esi 10d3b4: e8 23 f6 ff ff call 10c9dc <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d3b9: 58 pop %eax 10d3ba: 5a pop %edx 10d3bb: 6a 01 push $0x1 10d3bd: 53 push %ebx 10d3be: e8 c1 0b 00 00 call 10df84 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d3c3: 89 1c 24 mov %ebx,(%esp) 10d3c6: e8 f9 09 00 00 call 10ddc4 <_Thread_queue_Extract_with_proxy> 10d3cb: 83 c4 10 add $0x10,%esp 10d3ce: 84 c0 test %al,%al 10d3d0: 75 06 jne 10d3d8 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d3d2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d3d6: 74 68 je 10d440 <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d3d8: 3b 1d 60 65 12 00 cmp 0x126560,%ebx 10d3de: 74 74 je 10d454 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d3e0: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d3e7: 00 00 00 if ( the_thread->Start.fp_context ) 10d3ea: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d3f0: 85 c0 test %eax,%eax 10d3f2: 74 0c je 10d400 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d3f4: 83 ec 0c sub $0xc,%esp 10d3f7: 50 push %eax 10d3f8: e8 a3 14 00 00 call 10e8a0 <_Workspace_Free> 10d3fd: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10d400: 83 ec 0c sub $0xc,%esp 10d403: 53 push %ebx 10d404: e8 37 0d 00 00 call 10e140 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d409: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d410: 00 00 00 if ( the_thread->extensions ) 10d413: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d419: 83 c4 10 add $0x10,%esp 10d41c: 85 c0 test %eax,%eax 10d41e: 74 0c je 10d42c <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d420: 83 ec 0c sub $0xc,%esp 10d423: 50 push %eax 10d424: e8 77 14 00 00 call 10e8a0 <_Workspace_Free> 10d429: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d42c: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d433: 00 00 00 } 10d436: 8d 65 f8 lea -0x8(%ebp),%esp 10d439: 5b pop %ebx 10d43a: 5e pop %esi 10d43b: c9 leave 10d43c: c3 ret 10d43d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d440: 83 ec 0c sub $0xc,%esp 10d443: 8d 43 48 lea 0x48(%ebx),%eax 10d446: 50 push %eax 10d447: e8 10 13 00 00 call 10e75c <_Watchdog_Remove> 10d44c: 83 c4 10 add $0x10,%esp 10d44f: eb 87 jmp 10d3d8 <_Thread_Close+0x60> 10d451: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d454: c7 05 60 65 12 00 00 movl $0x0,0x126560 10d45b: 00 00 00 10d45e: eb 80 jmp 10d3e0 <_Thread_Close+0x68> =============================================================================== 0010d4f4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d4f4: 55 push %ebp 10d4f5: 89 e5 mov %esp,%ebp 10d4f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d4fa: 8d 45 f4 lea -0xc(%ebp),%eax 10d4fd: 50 push %eax 10d4fe: ff 75 08 pushl 0x8(%ebp) 10d501: e8 c6 01 00 00 call 10d6cc <_Thread_Get> switch ( location ) { 10d506: 83 c4 10 add $0x10,%esp 10d509: 8b 55 f4 mov -0xc(%ebp),%edx 10d50c: 85 d2 test %edx,%edx 10d50e: 75 1c jne 10d52c <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d510: 83 ec 08 sub $0x8,%esp 10d513: 68 18 00 00 10 push $0x10000018 10d518: 50 push %eax 10d519: e8 c6 fd ff ff call 10d2e4 <_Thread_Clear_state> 10d51e: a1 d4 64 12 00 mov 0x1264d4,%eax 10d523: 48 dec %eax 10d524: a3 d4 64 12 00 mov %eax,0x1264d4 10d529: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d52c: c9 leave 10d52d: c3 ret =============================================================================== 0010d530 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d530: 55 push %ebp 10d531: 89 e5 mov %esp,%ebp 10d533: 57 push %edi 10d534: 56 push %esi 10d535: 53 push %ebx 10d536: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d539: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx _ISR_Disable( level ); 10d53f: 9c pushf 10d540: fa cli 10d541: 58 pop %eax while ( _Thread_Dispatch_necessary == true ) { 10d542: 8a 15 a4 6a 12 00 mov 0x126aa4,%dl 10d548: 84 d2 test %dl,%dl 10d54a: 0f 84 3c 01 00 00 je 10d68c <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d550: 8b 35 9c 6a 12 00 mov 0x126a9c,%esi _Thread_Dispatch_disable_level = 1; 10d556: c7 05 d4 64 12 00 01 movl $0x1,0x1264d4 10d55d: 00 00 00 _Thread_Dispatch_necessary = false; 10d560: c6 05 a4 6a 12 00 00 movb $0x0,0x126aa4 _Thread_Executing = heir; 10d567: 89 35 98 6a 12 00 mov %esi,0x126a98 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10d56d: 39 f3 cmp %esi,%ebx 10d56f: 0f 84 17 01 00 00 je 10d68c <_Thread_Dispatch+0x15c> 10d575: 8d 7d d8 lea -0x28(%ebp),%edi 10d578: e9 f5 00 00 00 jmp 10d672 <_Thread_Dispatch+0x142> 10d57d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10d580: 50 push %eax 10d581: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d582: 83 ec 0c sub $0xc,%esp 10d585: 8d 45 e0 lea -0x20(%ebp),%eax 10d588: 50 push %eax 10d589: e8 22 3c 00 00 call 1111b0 <_TOD_Get_uptime> _Timestamp_Subtract( 10d58e: 83 c4 0c add $0xc,%esp 10d591: 57 push %edi 10d592: 8d 45 e0 lea -0x20(%ebp),%eax 10d595: 50 push %eax 10d596: 68 90 65 12 00 push $0x126590 10d59b: e8 a4 0d 00 00 call 10e344 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d5a0: 58 pop %eax 10d5a1: 5a pop %edx 10d5a2: 57 push %edi 10d5a3: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d5a9: 50 push %eax 10d5aa: e8 59 0d 00 00 call 10e308 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d5af: 8b 45 e0 mov -0x20(%ebp),%eax 10d5b2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d5b5: a3 90 65 12 00 mov %eax,0x126590 10d5ba: 89 15 94 65 12 00 mov %edx,0x126594 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d5c0: a1 64 65 12 00 mov 0x126564,%eax 10d5c5: 83 c4 10 add $0x10,%esp 10d5c8: 85 c0 test %eax,%eax 10d5ca: 74 10 je 10d5dc <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d5cc: 8b 10 mov (%eax),%edx 10d5ce: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d5d4: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10d5da: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d5dc: 83 ec 08 sub $0x8,%esp 10d5df: 56 push %esi 10d5e0: 53 push %ebx 10d5e1: e8 fe 0f 00 00 call 10e5e4 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d5e6: 5a pop %edx 10d5e7: 59 pop %ecx 10d5e8: 81 c6 d4 00 00 00 add $0xd4,%esi 10d5ee: 56 push %esi 10d5ef: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10d5f5: 50 push %eax 10d5f6: e8 f5 12 00 00 call 10e8f0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d5fb: 83 c4 10 add $0x10,%esp 10d5fe: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d604: 85 c0 test %eax,%eax 10d606: 74 36 je 10d63e <_Thread_Dispatch+0x10e> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10d608: a1 60 65 12 00 mov 0x126560,%eax 10d60d: 39 c3 cmp %eax,%ebx 10d60f: 74 2d je 10d63e <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d611: 85 c0 test %eax,%eax 10d613: 74 11 je 10d626 <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d615: 83 ec 0c sub $0xc,%esp 10d618: 05 ec 00 00 00 add $0xec,%eax 10d61d: 50 push %eax 10d61e: e8 01 13 00 00 call 10e924 <_CPU_Context_save_fp> 10d623: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d626: 83 ec 0c sub $0xc,%esp 10d629: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10d62f: 50 push %eax 10d630: e8 f9 12 00 00 call 10e92e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d635: 89 1d 60 65 12 00 mov %ebx,0x126560 10d63b: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d63e: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx _ISR_Disable( level ); 10d644: 9c pushf 10d645: fa cli 10d646: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10d647: 8a 15 a4 6a 12 00 mov 0x126aa4,%dl 10d64d: 84 d2 test %dl,%dl 10d64f: 74 3b je 10d68c <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d651: 8b 35 9c 6a 12 00 mov 0x126a9c,%esi _Thread_Dispatch_disable_level = 1; 10d657: c7 05 d4 64 12 00 01 movl $0x1,0x1264d4 10d65e: 00 00 00 _Thread_Dispatch_necessary = false; 10d661: c6 05 a4 6a 12 00 00 movb $0x0,0x126aa4 _Thread_Executing = heir; 10d668: 89 35 98 6a 12 00 mov %esi,0x126a98 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10d66e: 39 de cmp %ebx,%esi 10d670: 74 1a je 10d68c <_Thread_Dispatch+0x15c><== NEVER TAKEN */ #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 ) 10d672: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d676: 0f 85 04 ff ff ff jne 10d580 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d67c: 8b 15 a4 64 12 00 mov 0x1264a4,%edx 10d682: 89 56 78 mov %edx,0x78(%esi) 10d685: e9 f6 fe ff ff jmp 10d580 <_Thread_Dispatch+0x50> 10d68a: 66 90 xchg %ax,%ax <== NOT EXECUTED _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d68c: c7 05 d4 64 12 00 00 movl $0x0,0x1264d4 10d693: 00 00 00 _ISR_Enable( level ); 10d696: 50 push %eax 10d697: 9d popf _API_extensions_Run_postswitch(); 10d698: e8 07 e8 ff ff call 10bea4 <_API_extensions_Run_postswitch> } 10d69d: 8d 65 f4 lea -0xc(%ebp),%esp 10d6a0: 5b pop %ebx 10d6a1: 5e pop %esi 10d6a2: 5f pop %edi 10d6a3: c9 leave 10d6a4: c3 ret =============================================================================== 0010d6cc <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d6cc: 55 push %ebp 10d6cd: 89 e5 mov %esp,%ebp 10d6cf: 53 push %ebx 10d6d0: 83 ec 04 sub $0x4,%esp 10d6d3: 8b 45 08 mov 0x8(%ebp),%eax 10d6d6: 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 ) ) { 10d6d9: 85 c0 test %eax,%eax 10d6db: 74 47 je 10d724 <_Thread_Get+0x58> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10d6dd: 89 c2 mov %eax,%edx 10d6df: c1 ea 18 shr $0x18,%edx 10d6e2: 83 e2 07 and $0x7,%edx */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10d6e5: 8d 5a ff lea -0x1(%edx),%ebx 10d6e8: 83 fb 02 cmp $0x2,%ebx 10d6eb: 77 27 ja 10d714 <_Thread_Get+0x48> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d6ed: 89 c3 mov %eax,%ebx 10d6ef: c1 eb 1b shr $0x1b,%ebx *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d6f2: 4b dec %ebx 10d6f3: 75 1f jne 10d714 <_Thread_Get+0x48> *location = OBJECTS_ERROR; goto done; } #endif information = api_information[ the_class ]; 10d6f5: 8b 14 95 ac 64 12 00 mov 0x1264ac(,%edx,4),%edx 10d6fc: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d6ff: 85 d2 test %edx,%edx 10d701: 74 11 je 10d714 <_Thread_Get+0x48> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d703: 53 push %ebx 10d704: 51 push %ecx 10d705: 50 push %eax 10d706: 52 push %edx 10d707: e8 0c f7 ff ff call 10ce18 <_Objects_Get> 10d70c: 83 c4 10 add $0x10,%esp done: return tp; } 10d70f: 8b 5d fc mov -0x4(%ebp),%ebx 10d712: c9 leave 10d713: c3 ret } #endif information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d714: c7 01 01 00 00 00 movl $0x1,(%ecx) { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 10d71a: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d71c: 8b 5d fc mov -0x4(%ebp),%ebx 10d71f: c9 leave 10d720: c3 ret 10d721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d724: a1 d4 64 12 00 mov 0x1264d4,%eax 10d729: 40 inc %eax 10d72a: a3 d4 64 12 00 mov %eax,0x1264d4 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10d72f: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d735: a1 98 6a 12 00 mov 0x126a98,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d73a: 8b 5d fc mov -0x4(%ebp),%ebx 10d73d: c9 leave 10d73e: c3 ret =============================================================================== 001130d0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 1130d0: 55 push %ebp 1130d1: 89 e5 mov %esp,%ebp 1130d3: 53 push %ebx 1130d4: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 1130d7: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 1130dd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 1130e3: 85 c0 test %eax,%eax 1130e5: 74 79 je 113160 <_Thread_Handler+0x90> 1130e7: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 1130e8: a0 4c 61 12 00 mov 0x12614c,%al 1130ed: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 1130f0: c6 05 4c 61 12 00 01 movb $0x1,0x12614c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 1130f7: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 1130fd: 85 c0 test %eax,%eax 1130ff: 74 24 je 113125 <_Thread_Handler+0x55> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 113101: a1 60 65 12 00 mov 0x126560,%eax 113106: 39 c3 cmp %eax,%ebx 113108: 74 1b je 113125 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 11310a: 85 c0 test %eax,%eax 11310c: 74 11 je 11311f <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 11310e: 83 ec 0c sub $0xc,%esp 113111: 05 ec 00 00 00 add $0xec,%eax 113116: 50 push %eax 113117: e8 08 b8 ff ff call 10e924 <_CPU_Context_save_fp> 11311c: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 11311f: 89 1d 60 65 12 00 mov %ebx,0x126560 /* * 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 ); 113125: 83 ec 0c sub $0xc,%esp 113128: 53 push %ebx 113129: e8 1a b3 ff ff call 10e448 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 11312e: e8 75 a5 ff ff call 10d6a8 <_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) */ { 113133: 83 c4 10 add $0x10,%esp 113136: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11313a: 74 28 je 113164 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 11313c: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113142: 85 c0 test %eax,%eax 113144: 74 2d je 113173 <_Thread_Handler+0xa3> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 113146: 48 dec %eax 113147: 74 43 je 11318c <_Thread_Handler+0xbc> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 113149: 83 ec 0c sub $0xc,%esp 11314c: 53 push %ebx 11314d: e8 32 b3 ff ff call 10e484 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 113152: 83 c4 0c add $0xc,%esp 113155: 6a 05 push $0x5 113157: 6a 01 push $0x1 113159: 6a 00 push $0x0 11315b: e8 70 97 ff ff call 10c8d0 <_Internal_error_Occurred> * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 113160: fb sti 113161: eb 85 jmp 1130e8 <_Thread_Handler+0x18> 113163: 90 nop <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 113164: e8 77 be 00 00 call 11efe0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113169: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 11316f: 85 c0 test %eax,%eax 113171: 75 d3 jne 113146 <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 113173: 83 ec 0c sub $0xc,%esp 113176: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 11317c: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 113182: 89 43 28 mov %eax,0x28(%ebx) 113185: 83 c4 10 add $0x10,%esp 113188: eb bf jmp 113149 <_Thread_Handler+0x79> 11318a: 66 90 xchg %ax,%ax <== NOT EXECUTED ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 11318c: 83 ec 0c sub $0xc,%esp 11318f: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 113195: ff 93 9c 00 00 00 call *0x9c(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 11319b: 89 43 28 mov %eax,0x28(%ebx) 11319e: 83 c4 10 add $0x10,%esp 1131a1: eb a6 jmp 113149 <_Thread_Handler+0x79> =============================================================================== 0010d740 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d740: 55 push %ebp 10d741: 89 e5 mov %esp,%ebp 10d743: 57 push %edi 10d744: 56 push %esi 10d745: 53 push %ebx 10d746: 83 ec 1c sub $0x1c,%esp 10d749: 8b 5d 0c mov 0xc(%ebp),%ebx 10d74c: 8b 4d 10 mov 0x10(%ebp),%ecx 10d74f: 8b 75 14 mov 0x14(%ebp),%esi 10d752: 8b 7d 1c mov 0x1c(%ebp),%edi 10d755: 8a 55 18 mov 0x18(%ebp),%dl 10d758: 8a 45 20 mov 0x20(%ebp),%al 10d75b: 88 45 e3 mov %al,-0x1d(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10d75e: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d765: 00 00 00 10d768: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d76f: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d772: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d779: 00 00 00 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 10d77c: 85 c9 test %ecx,%ecx 10d77e: 0f 84 e3 01 00 00 je 10d967 <_Thread_Initialize+0x227> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10d784: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10d78b: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d78d: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10d793: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10d799: 84 d2 test %dl,%dl 10d79b: 0f 85 63 01 00 00 jne 10d904 <_Thread_Initialize+0x1c4> 10d7a1: 31 c0 xor %eax,%eax extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10d7a3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10d7aa: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10d7b0: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d7b6: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d7bd: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d7c4: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d7cb: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d7d2: a1 70 65 12 00 mov 0x126570,%eax 10d7d7: 85 c0 test %eax,%eax 10d7d9: 0f 85 45 01 00 00 jne 10d924 <_Thread_Initialize+0x1e4> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d7df: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d7e6: 00 00 00 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d7e9: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d7eb: 8a 45 e3 mov -0x1d(%ebp),%al 10d7ee: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d7f4: 8b 45 24 mov 0x24(%ebp),%eax 10d7f7: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d7fd: 8b 45 28 mov 0x28(%ebp),%eax 10d800: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10d806: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10d80a: 75 08 jne 10d814 <_Thread_Initialize+0xd4> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d80c: a1 a4 64 12 00 mov 0x1264a4,%eax 10d811: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d814: 8b 45 2c mov 0x2c(%ebp),%eax 10d817: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d81d: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d824: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d82b: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10d832: 89 7b 18 mov %edi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d835: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d83b: 83 ec 08 sub $0x8,%esp 10d83e: 57 push %edi 10d83f: 53 push %ebx 10d840: e8 d3 06 00 00 call 10df18 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d845: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d84c: 00 00 00 10d84f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d856: 00 00 00 _Thread_Stack_Free( the_thread ); return false; } 10d859: 8b 45 08 mov 0x8(%ebp),%eax 10d85c: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d85f: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d863: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d866: 8b 45 30 mov 0x30(%ebp),%eax 10d869: 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 ); 10d86c: 89 1c 24 mov %ebx,(%esp) 10d86f: e8 9c 0c 00 00 call 10e510 <_User_extensions_Thread_create> if ( extension_status ) 10d874: 83 c4 10 add $0x10,%esp 10d877: 84 c0 test %al,%al 10d879: 75 7d jne 10d8f8 <_Thread_Initialize+0x1b8> return true; failed: if ( the_thread->libc_reent ) 10d87b: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d881: 85 c0 test %eax,%eax 10d883: 74 0c je 10d891 <_Thread_Initialize+0x151> _Workspace_Free( the_thread->libc_reent ); 10d885: 83 ec 0c sub $0xc,%esp 10d888: 50 push %eax 10d889: e8 12 10 00 00 call 10e8a0 <_Workspace_Free> 10d88e: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d891: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10d897: 85 c0 test %eax,%eax 10d899: 74 0c je 10d8a7 <_Thread_Initialize+0x167> _Workspace_Free( the_thread->API_Extensions[i] ); 10d89b: 83 ec 0c sub $0xc,%esp 10d89e: 50 push %eax 10d89f: e8 fc 0f 00 00 call 10e8a0 <_Workspace_Free> 10d8a4: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d8a7: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10d8ad: 85 c0 test %eax,%eax 10d8af: 74 0c je 10d8bd <_Thread_Initialize+0x17d> _Workspace_Free( the_thread->API_Extensions[i] ); 10d8b1: 83 ec 0c sub $0xc,%esp 10d8b4: 50 push %eax 10d8b5: e8 e6 0f 00 00 call 10e8a0 <_Workspace_Free> 10d8ba: 83 c4 10 add $0x10,%esp if ( extensions_area ) 10d8bd: 85 f6 test %esi,%esi 10d8bf: 74 0c je 10d8cd <_Thread_Initialize+0x18d> (void) _Workspace_Free( extensions_area ); 10d8c1: 83 ec 0c sub $0xc,%esp 10d8c4: 56 push %esi 10d8c5: e8 d6 0f 00 00 call 10e8a0 <_Workspace_Free> 10d8ca: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d8cd: 8b 45 e4 mov -0x1c(%ebp),%eax 10d8d0: 85 c0 test %eax,%eax 10d8d2: 74 0e je 10d8e2 <_Thread_Initialize+0x1a2> (void) _Workspace_Free( fp_area ); 10d8d4: 83 ec 0c sub $0xc,%esp 10d8d7: ff 75 e4 pushl -0x1c(%ebp) 10d8da: e8 c1 0f 00 00 call 10e8a0 <_Workspace_Free> 10d8df: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d8e2: 83 ec 0c sub $0xc,%esp 10d8e5: 53 push %ebx 10d8e6: e8 55 08 00 00 call 10e140 <_Thread_Stack_Free> return false; 10d8eb: 83 c4 10 add $0x10,%esp 10d8ee: 31 c0 xor %eax,%eax } 10d8f0: 8d 65 f4 lea -0xc(%ebp),%esp 10d8f3: 5b pop %ebx 10d8f4: 5e pop %esi 10d8f5: 5f pop %edi 10d8f6: c9 leave 10d8f7: c3 ret * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 10d8f8: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d8fa: 8d 65 f4 lea -0xc(%ebp),%esp 10d8fd: 5b pop %ebx 10d8fe: 5e pop %esi 10d8ff: 5f pop %edi 10d900: c9 leave 10d901: c3 ret 10d902: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10d904: 83 ec 0c sub $0xc,%esp 10d907: 6a 6c push $0x6c 10d909: e8 76 0f 00 00 call 10e884 <_Workspace_Allocate> 10d90e: 89 45 e4 mov %eax,-0x1c(%ebp) if ( !fp_area ) 10d911: 83 c4 10 add $0x10,%esp 10d914: 85 c0 test %eax,%eax 10d916: 0f 85 8e fe ff ff jne 10d7aa <_Thread_Initialize+0x6a> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d91c: 31 f6 xor %esi,%esi 10d91e: e9 58 ff ff ff jmp 10d87b <_Thread_Initialize+0x13b> 10d923: 90 nop <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d924: 83 ec 0c sub $0xc,%esp 10d927: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d92e: 50 push %eax 10d92f: e8 50 0f 00 00 call 10e884 <_Workspace_Allocate> 10d934: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d936: 83 c4 10 add $0x10,%esp 10d939: 85 c0 test %eax,%eax 10d93b: 0f 84 3a ff ff ff je 10d87b <_Thread_Initialize+0x13b> goto failed; } the_thread->extensions = (void **) extensions_area; 10d941: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx) 10d947: 8b 0d 70 65 12 00 mov 0x126570,%ecx * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d94d: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d94f: 31 c0 xor %eax,%eax 10d951: 8d 76 00 lea 0x0(%esi),%esi * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 10d954: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d95b: 40 inc %eax 10d95c: 89 c2 mov %eax,%edx 10d95e: 39 c1 cmp %eax,%ecx 10d960: 73 f2 jae 10d954 <_Thread_Initialize+0x214> 10d962: e9 84 fe ff ff jmp 10d7eb <_Thread_Initialize+0xab> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10d967: 83 ec 08 sub $0x8,%esp 10d96a: 56 push %esi 10d96b: 53 push %ebx 10d96c: 88 55 dc mov %dl,-0x24(%ebp) 10d96f: e8 68 07 00 00 call 10e0dc <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d974: 83 c4 10 add $0x10,%esp 10d977: 85 c0 test %eax,%eax 10d979: 8a 55 dc mov -0x24(%ebp),%dl 10d97c: 74 16 je 10d994 <_Thread_Initialize+0x254> 10d97e: 39 c6 cmp %eax,%esi 10d980: 77 12 ja 10d994 <_Thread_Initialize+0x254><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10d982: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10d988: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10d98f: e9 f9 fd ff ff jmp 10d78d <_Thread_Initialize+0x4d> stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10d994: 31 c0 xor %eax,%eax 10d996: e9 55 ff ff ff jmp 10d8f0 <_Thread_Initialize+0x1b0> =============================================================================== 001124d0 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 1124d0: 55 push %ebp 1124d1: 89 e5 mov %esp,%ebp 1124d3: 53 push %ebx 1124d4: 83 ec 10 sub $0x10,%esp 1124d7: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 1124da: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 1124e1: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 1124e7: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 1124ea: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 1124f0: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 1124f3: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 1124f9: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 1124ff: 8b 45 0c mov 0xc(%ebp),%eax 112502: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 112508: 8b 45 10 mov 0x10(%ebp),%eax 11250b: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 112511: 53 push %ebx 112512: e8 e5 c3 ff ff call 10e8fc <_Thread_queue_Extract_with_proxy> 112517: 83 c4 10 add $0x10,%esp 11251a: 84 c0 test %al,%al 11251c: 75 06 jne 112524 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11251e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112522: 74 28 je 11254c <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 112524: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 11252a: 39 43 14 cmp %eax,0x14(%ebx) 11252d: 74 15 je 112544 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 11252f: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 112532: 89 45 0c mov %eax,0xc(%ebp) 112535: 89 5d 08 mov %ebx,0x8(%ebp) } } 112538: 8b 5d fc mov -0x4(%ebp),%ebx 11253b: 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 ); 11253c: e9 97 c5 ff ff jmp 10ead8 <_Thread_Set_priority> 112541: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 112544: 8b 5d fc mov -0x4(%ebp),%ebx 112547: c9 leave 112548: c3 ret 112549: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 11254c: 83 ec 0c sub $0xc,%esp 11254f: 8d 43 48 lea 0x48(%ebx),%eax 112552: 50 push %eax 112553: e8 04 ce ff ff call 10f35c <_Watchdog_Remove> 112558: 83 c4 10 add $0x10,%esp 11255b: eb c7 jmp 112524 <_Thread_Reset+0x54> =============================================================================== 0010ea50 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10ea50: 55 push %ebp 10ea51: 89 e5 mov %esp,%ebp 10ea53: 53 push %ebx 10ea54: 83 ec 04 sub $0x4,%esp 10ea57: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10ea5a: f6 43 10 01 testb $0x1,0x10(%ebx) 10ea5e: 74 08 je 10ea68 <_Thread_Restart+0x18> _Thread_Restart_self(); return true; } return false; 10ea60: 31 c0 xor %eax,%eax } 10ea62: 8b 5d fc mov -0x4(%ebp),%ebx 10ea65: c9 leave 10ea66: c3 ret 10ea67: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10ea68: 83 ec 0c sub $0xc,%esp 10ea6b: 53 push %ebx 10ea6c: e8 b3 01 00 00 call 10ec24 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10ea71: 83 c4 0c add $0xc,%esp 10ea74: ff 75 10 pushl 0x10(%ebp) 10ea77: ff 75 0c pushl 0xc(%ebp) 10ea7a: 53 push %ebx 10ea7b: e8 50 3a 00 00 call 1124d0 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10ea80: 89 1c 24 mov %ebx,(%esp) 10ea83: e8 30 37 00 00 call 1121b8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10ea88: 89 1c 24 mov %ebx,(%esp) 10ea8b: e8 9c 39 00 00 call 11242c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10ea90: 89 1c 24 mov %ebx,(%esp) 10ea93: e8 cc 06 00 00 call 10f164 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10ea98: 83 c4 10 add $0x10,%esp 10ea9b: 3b 1d 38 9d 12 00 cmp 0x129d38,%ebx 10eaa1: 74 07 je 10eaaa <_Thread_Restart+0x5a> _Thread_Restart_self(); return true; 10eaa3: b0 01 mov $0x1,%al } return false; } 10eaa5: 8b 5d fc mov -0x4(%ebp),%ebx 10eaa8: c9 leave 10eaa9: c3 ret */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10eaaa: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10eab1: 74 12 je 10eac5 <_Thread_Restart+0x75> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10eab3: 83 ec 0c sub $0xc,%esp 10eab6: 81 c3 ec 00 00 00 add $0xec,%ebx 10eabc: 53 push %ebx 10eabd: e8 6c 0a 00 00 call 10f52e <_CPU_Context_restore_fp> 10eac2: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10eac5: 83 ec 0c sub $0xc,%esp 10eac8: a1 38 9d 12 00 mov 0x129d38,%eax 10eacd: 05 d4 00 00 00 add $0xd4,%eax 10ead2: 50 push %eax 10ead3: e8 45 0a 00 00 call 10f51d <_CPU_Context_restore> =============================================================================== 0011122c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 11122c: 55 push %ebp 11122d: 89 e5 mov %esp,%ebp 11122f: 53 push %ebx 111230: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 111233: 9c pushf 111234: fa cli 111235: 59 pop %ecx current_state = the_thread->current_state; 111236: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111239: f6 c2 02 test $0x2,%dl 11123c: 74 6e je 1112ac <_Thread_Resume+0x80> <== NEVER TAKEN 11123e: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 111241: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 111244: 85 d2 test %edx,%edx 111246: 75 64 jne 1112ac <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111248: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11124e: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111255: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111258: 66 8b 15 20 af 12 00 mov 0x12af20,%dx 11125f: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111265: 66 89 15 20 af 12 00 mov %dx,0x12af20 _Priority_bit_map_Add( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 11126c: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111272: 8d 5a 04 lea 0x4(%edx),%ebx 111275: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 111277: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 11127a: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 11127d: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 11127f: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 111282: 51 push %ecx 111283: 9d popf 111284: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111285: 8b 50 14 mov 0x14(%eax),%edx 111288: 8b 1d 3c b4 12 00 mov 0x12b43c,%ebx 11128e: 3b 53 14 cmp 0x14(%ebx),%edx 111291: 73 19 jae 1112ac <_Thread_Resume+0x80> _Thread_Heir = the_thread; 111293: a3 3c b4 12 00 mov %eax,0x12b43c if ( _Thread_Executing->is_preemptible || 111298: a1 38 b4 12 00 mov 0x12b438,%eax 11129d: 80 78 74 00 cmpb $0x0,0x74(%eax) 1112a1: 74 11 je 1112b4 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 1112a3: c6 05 44 b4 12 00 01 movb $0x1,0x12b444 1112aa: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1112ac: 51 push %ecx 1112ad: 9d popf } 1112ae: 5b pop %ebx 1112af: c9 leave 1112b0: c3 ret 1112b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 1112b4: 85 d2 test %edx,%edx 1112b6: 74 eb je 1112a3 <_Thread_Resume+0x77> <== NEVER TAKEN 1112b8: eb f2 jmp 1112ac <_Thread_Resume+0x80> =============================================================================== 0010df84 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10df84: 55 push %ebp 10df85: 89 e5 mov %esp,%ebp 10df87: 56 push %esi 10df88: 53 push %ebx 10df89: 8b 45 08 mov 0x8(%ebp),%eax 10df8c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10df8f: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10df95: 9c pushf 10df96: fa cli 10df97: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10df98: 8b 58 10 mov 0x10(%eax),%ebx 10df9b: 85 db test %ebx,%ebx 10df9d: 75 2d jne 10dfcc <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10df9f: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10dfa2: 8b 5a 08 mov 0x8(%edx),%ebx 10dfa5: 39 1a cmp %ebx,(%edx) 10dfa7: 74 3b je 10dfe4 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dfa9: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10dfab: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10dfae: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10dfb1: 89 1a mov %ebx,(%edx) _Priority_bit_map_Remove( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10dfb3: 51 push %ecx 10dfb4: 9d popf 10dfb5: fa cli if ( _Thread_Is_heir( the_thread ) ) 10dfb6: 3b 05 9c 6a 12 00 cmp 0x126a9c,%eax 10dfbc: 74 66 je 10e024 <_Thread_Set_state+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10dfbe: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 10dfc4: 74 12 je 10dfd8 <_Thread_Set_state+0x54> _Thread_Dispatch_necessary = true; _ISR_Enable( level ); 10dfc6: 51 push %ecx 10dfc7: 9d popf } 10dfc8: 5b pop %ebx 10dfc9: 5e pop %esi 10dfca: c9 leave 10dfcb: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Set ( States_Control states_to_set, States_Control current_state ) { return (current_state | states_to_set); 10dfcc: 09 f3 or %esi,%ebx 10dfce: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10dfd1: 51 push %ecx 10dfd2: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10dfd3: 5b pop %ebx 10dfd4: 5e pop %esi 10dfd5: c9 leave 10dfd6: c3 ret 10dfd7: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 10dfd8: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 10dfdf: eb e5 jmp 10dfc6 <_Thread_Set_state+0x42> 10dfe1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dfe4: 8d 5a 04 lea 0x4(%edx),%ebx 10dfe7: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dfe9: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10dff0: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10dff3: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 10dff9: 66 8b 13 mov (%ebx),%dx 10dffc: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10e003: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10e006: 66 85 d2 test %dx,%dx 10e009: 75 a8 jne 10dfb3 <_Thread_Set_state+0x2f> _Priority_Major_bit_map &= the_priority_map->block_major; 10e00b: 66 8b 15 80 65 12 00 mov 0x126580,%dx 10e012: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e018: 66 89 15 80 65 12 00 mov %dx,0x126580 10e01f: eb 92 jmp 10dfb3 <_Thread_Set_state+0x2f> 10e021: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10e024: 66 8b 35 80 65 12 00 mov 0x126580,%si 10e02b: 31 d2 xor %edx,%edx 10e02d: 89 d3 mov %edx,%ebx 10e02f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e033: 0f b7 db movzwl %bx,%ebx 10e036: 66 8b b4 1b 00 66 12 mov 0x126600(%ebx,%ebx,1),%si 10e03d: 00 10e03e: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 10e042: c1 e3 04 shl $0x4,%ebx 10e045: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 10e048: 8d 14 13 lea (%ebx,%edx,1),%edx 10e04b: 8d 14 52 lea (%edx,%edx,2),%edx 10e04e: c1 e2 02 shl $0x2,%edx 10e051: 03 15 a0 64 12 00 add 0x1264a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e057: 8b 12 mov (%edx),%edx 10e059: 89 15 9c 6a 12 00 mov %edx,0x126a9c 10e05f: e9 5a ff ff ff jmp 10dfbe <_Thread_Set_state+0x3a> =============================================================================== 0010e064 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10e064: 55 push %ebp 10e065: 89 e5 mov %esp,%ebp 10e067: 56 push %esi 10e068: 53 push %ebx 10e069: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10e06c: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10e072: 9c pushf 10e073: fa cli 10e074: 5b pop %ebx old_state = the_thread->current_state; 10e075: 8b 50 10 mov 0x10(%eax),%edx 10e078: 89 d6 mov %edx,%esi 10e07a: 83 ce 04 or $0x4,%esi 10e07d: 89 70 10 mov %esi,0x10(%eax) the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { 10e080: 85 d2 test %edx,%edx 10e082: 75 11 jne 10e095 <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10e084: 8b 51 08 mov 0x8(%ecx),%edx 10e087: 39 11 cmp %edx,(%ecx) 10e089: 74 11 je 10e09c <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e08b: 8b 10 mov (%eax),%edx previous = the_node->previous; 10e08d: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10e090: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10e093: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10e095: 53 push %ebx 10e096: 9d popf } 10e097: 5b pop %ebx 10e098: 5e pop %esi 10e099: c9 leave 10e09a: c3 ret 10e09b: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e09c: 8d 51 04 lea 0x4(%ecx),%edx 10e09f: 89 11 mov %edx,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10e0a1: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10e0a8: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e0ab: 8b 88 90 00 00 00 mov 0x90(%eax),%ecx 10e0b1: 66 8b 11 mov (%ecx),%dx 10e0b4: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10e0bb: 66 89 11 mov %dx,(%ecx) if ( *the_priority_map->minor == 0 ) 10e0be: 66 85 d2 test %dx,%dx 10e0c1: 75 d2 jne 10e095 <_Thread_Set_transient+0x31> _Priority_Major_bit_map &= the_priority_map->block_major; 10e0c3: 66 8b 15 80 65 12 00 mov 0x126580,%dx 10e0ca: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e0d0: 66 89 15 80 65 12 00 mov %dx,0x126580 10e0d7: eb bc jmp 10e095 <_Thread_Set_transient+0x31> =============================================================================== 0010e0dc <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e0dc: 55 push %ebp 10e0dd: 89 e5 mov %esp,%ebp 10e0df: 53 push %ebx 10e0e0: 83 ec 04 sub $0x4,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10e0e3: a1 10 22 12 00 mov 0x122210,%eax 10e0e8: 8b 5d 0c mov 0xc(%ebp),%ebx 10e0eb: 39 c3 cmp %eax,%ebx 10e0ed: 73 02 jae 10e0f1 <_Thread_Stack_Allocate+0x15> 10e0ef: 89 c3 mov %eax,%ebx * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 10e0f1: a1 40 22 12 00 mov 0x122240,%eax 10e0f6: 85 c0 test %eax,%eax 10e0f8: 74 32 je 10e12c <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e0fa: 83 ec 0c sub $0xc,%esp 10e0fd: 53 push %ebx 10e0fe: ff d0 call *%eax 10e100: 83 c4 10 add $0x10,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e103: 85 c0 test %eax,%eax 10e105: 74 11 je 10e118 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e107: 8b 55 08 mov 0x8(%ebp),%edx 10e10a: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e110: 89 d8 mov %ebx,%eax 10e112: 8b 5d fc mov -0x4(%ebp),%ebx 10e115: c9 leave 10e116: c3 ret 10e117: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10e118: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10e11a: 8b 55 08 mov 0x8(%ebp),%edx 10e11d: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e123: 89 d8 mov %ebx,%eax 10e125: 8b 5d fc mov -0x4(%ebp),%ebx 10e128: c9 leave 10e129: c3 ret 10e12a: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e12c: 83 c3 10 add $0x10,%ebx * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 10e12f: 83 ec 0c sub $0xc,%esp 10e132: 53 push %ebx 10e133: e8 4c 07 00 00 call 10e884 <_Workspace_Allocate> 10e138: 83 c4 10 add $0x10,%esp 10e13b: eb c6 jmp 10e103 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e140 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e140: 55 push %ebp 10e141: 89 e5 mov %esp,%ebp 10e143: 83 ec 08 sub $0x8,%esp 10e146: 8b 45 08 mov 0x8(%ebp),%eax #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 10e149: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10e150: 74 16 je 10e168 <_Thread_Stack_Free+0x28> * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10e152: 8b 15 44 22 12 00 mov 0x122244,%edx 10e158: 85 d2 test %edx,%edx 10e15a: 74 10 je 10e16c <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e15c: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e162: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e165: c9 leave * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e166: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e168: c9 leave 10e169: c3 ret 10e16a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e16c: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e172: 89 45 08 mov %eax,0x8(%ebp) } 10e175: c9 leave */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e176: e9 25 07 00 00 jmp 10e8a0 <_Workspace_Free> =============================================================================== 0010e1d8 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e1d8: 55 push %ebp 10e1d9: 89 e5 mov %esp,%ebp 10e1db: 53 push %ebx 10e1dc: 83 ec 04 sub $0x4,%esp 10e1df: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e1e2: f6 43 10 01 testb $0x1,0x10(%ebx) 10e1e6: 75 08 jne 10e1f0 <_Thread_Start+0x18> _User_extensions_Thread_start( the_thread ); return true; } return false; 10e1e8: 31 c0 xor %eax,%eax } 10e1ea: 8b 5d fc mov -0x4(%ebp),%ebx 10e1ed: c9 leave 10e1ee: c3 ret 10e1ef: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; 10e1f0: 8b 45 10 mov 0x10(%ebp),%eax 10e1f3: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e1f9: 8b 45 0c mov 0xc(%ebp),%eax 10e1fc: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e202: 8b 45 14 mov 0x14(%ebp),%eax 10e205: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e20b: 8b 45 18 mov 0x18(%ebp),%eax 10e20e: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e214: 83 ec 0c sub $0xc,%esp 10e217: 53 push %ebx 10e218: e8 13 33 00 00 call 111530 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e21d: 89 1c 24 mov %ebx,(%esp) 10e220: e8 7f 35 00 00 call 1117a4 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e225: 89 1c 24 mov %ebx,(%esp) 10e228: e8 77 03 00 00 call 10e5a4 <_User_extensions_Thread_start> return true; 10e22d: 83 c4 10 add $0x10,%esp 10e230: b0 01 mov $0x1,%al } return false; } 10e232: 8b 5d fc mov -0x4(%ebp),%ebx 10e235: c9 leave 10e236: c3 ret =============================================================================== 00111848 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111848: 55 push %ebp 111849: 89 e5 mov %esp,%ebp 11184b: 56 push %esi 11184c: 53 push %ebx 11184d: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111850: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111856: 9c pushf 111857: fa cli 111858: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 111859: 8b 58 10 mov 0x10(%eax),%ebx 11185c: 85 db test %ebx,%ebx 11185e: 75 34 jne 111894 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111860: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 111867: 8b 5a 08 mov 0x8(%edx),%ebx 11186a: 39 1a cmp %ebx,(%edx) 11186c: 74 3e je 1118ac <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11186e: 8b 18 mov (%eax),%ebx previous = the_node->previous; 111870: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 111873: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 111876: 89 1a mov %ebx,(%edx) _Priority_bit_map_Remove( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 111878: 51 push %ecx 111879: 9d popf 11187a: fa cli if ( _Thread_Is_heir( the_thread ) ) 11187b: 3b 05 9c 6a 12 00 cmp 0x126a9c,%eax 111881: 74 69 je 1118ec <_Thread_Suspend+0xa4> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 111883: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 111889: 74 15 je 1118a0 <_Thread_Suspend+0x58> _Thread_Dispatch_necessary = true; _ISR_Enable( level ); 11188b: 51 push %ecx 11188c: 9d popf } 11188d: 5b pop %ebx 11188e: 5e pop %esi 11188f: c9 leave 111890: c3 ret 111891: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 111894: 83 cb 02 or $0x2,%ebx 111897: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 11189a: 51 push %ecx 11189b: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 11189c: 5b pop %ebx 11189d: 5e pop %esi 11189e: c9 leave 11189f: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 1118a0: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 1118a7: eb e2 jmp 11188b <_Thread_Suspend+0x43> 1118a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1118ac: 8d 5a 04 lea 0x4(%edx),%ebx 1118af: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 1118b1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 1118b8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 1118bb: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 1118c1: 66 8b 13 mov (%ebx),%dx 1118c4: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 1118cb: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 1118ce: 66 85 d2 test %dx,%dx 1118d1: 75 a5 jne 111878 <_Thread_Suspend+0x30> _Priority_Major_bit_map &= the_priority_map->block_major; 1118d3: 66 8b 15 80 65 12 00 mov 0x126580,%dx 1118da: 23 90 98 00 00 00 and 0x98(%eax),%edx 1118e0: 66 89 15 80 65 12 00 mov %dx,0x126580 1118e7: eb 8f jmp 111878 <_Thread_Suspend+0x30> 1118e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 1118ec: 66 8b 35 80 65 12 00 mov 0x126580,%si 1118f3: 31 d2 xor %edx,%edx 1118f5: 89 d3 mov %edx,%ebx 1118f7: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 1118fb: 0f b7 db movzwl %bx,%ebx 1118fe: 66 8b b4 1b 00 66 12 mov 0x126600(%ebx,%ebx,1),%si 111905: 00 111906: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 11190a: c1 e3 04 shl $0x4,%ebx 11190d: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 111910: 8d 14 13 lea (%ebx,%edx,1),%edx 111913: 8d 14 52 lea (%edx,%edx,2),%edx 111916: c1 e2 02 shl $0x2,%edx 111919: 03 15 a0 64 12 00 add 0x1264a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 11191f: 8b 12 mov (%edx),%edx 111921: 89 15 9c 6a 12 00 mov %edx,0x126a9c 111927: e9 57 ff ff ff jmp 111883 <_Thread_Suspend+0x3b> =============================================================================== 0010e238 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e238: 55 push %ebp 10e239: 89 e5 mov %esp,%ebp 10e23b: 53 push %ebx 10e23c: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e23f: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e245: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10e249: 74 19 je 10e264 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e24b: 8b 43 10 mov 0x10(%ebx),%eax 10e24e: 85 c0 test %eax,%eax 10e250: 75 12 jne 10e264 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e252: 8b 43 7c mov 0x7c(%ebx),%eax 10e255: 83 f8 01 cmp $0x1,%eax 10e258: 72 0a jb 10e264 <_Thread_Tickle_timeslice+0x2c> 10e25a: 83 f8 02 cmp $0x2,%eax 10e25d: 76 29 jbe 10e288 <_Thread_Tickle_timeslice+0x50> 10e25f: 83 f8 03 cmp $0x3,%eax 10e262: 74 08 je 10e26c <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e264: 8b 5d fc mov -0x4(%ebp),%ebx 10e267: c9 leave 10e268: c3 ret 10e269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10e26c: 8b 43 78 mov 0x78(%ebx),%eax 10e26f: 48 dec %eax 10e270: 89 43 78 mov %eax,0x78(%ebx) 10e273: 85 c0 test %eax,%eax 10e275: 75 ed jne 10e264 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e277: 83 ec 0c sub $0xc,%esp 10e27a: 53 push %ebx 10e27b: ff 93 80 00 00 00 call *0x80(%ebx) 10e281: 83 c4 10 add $0x10,%esp 10e284: eb de jmp 10e264 <_Thread_Tickle_timeslice+0x2c> 10e286: 66 90 xchg %ax,%ax <== NOT EXECUTED case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10e288: 8b 43 78 mov 0x78(%ebx),%eax 10e28b: 48 dec %eax 10e28c: 89 43 78 mov %eax,0x78(%ebx) 10e28f: 85 c0 test %eax,%eax 10e291: 7f d1 jg 10e264 <_Thread_Tickle_timeslice+0x2c> * at the priority of the currently executing thread, then the * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Thread_Yield_processor(); 10e293: e8 0c 00 00 00 call 10e2a4 <_Thread_Yield_processor> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e298: a1 a4 64 12 00 mov 0x1264a4,%eax 10e29d: 89 43 78 mov %eax,0x78(%ebx) 10e2a0: eb c2 jmp 10e264 <_Thread_Tickle_timeslice+0x2c> =============================================================================== 0010e2a4 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e2a4: 55 push %ebp 10e2a5: 89 e5 mov %esp,%ebp 10e2a7: 57 push %edi 10e2a8: 56 push %esi 10e2a9: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e2aa: a1 98 6a 12 00 mov 0x126a98,%eax ready = executing->ready; 10e2af: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e2b5: 9c pushf 10e2b6: fa cli 10e2b7: 5b pop %ebx } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10e2b8: 8b 4a 08 mov 0x8(%edx),%ecx Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { 10e2bb: 39 0a cmp %ecx,(%edx) 10e2bd: 74 3d je 10e2fc <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e2bf: 8b 38 mov (%eax),%edi previous = the_node->previous; 10e2c1: 8b 70 04 mov 0x4(%eax),%esi next->previous = previous; 10e2c4: 89 77 04 mov %esi,0x4(%edi) previous->next = next; 10e2c7: 89 3e mov %edi,(%esi) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e2c9: 8d 72 04 lea 0x4(%edx),%esi 10e2cc: 89 30 mov %esi,(%eax) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 10e2ce: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e2d1: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e2d3: 89 48 04 mov %ecx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e2d6: 53 push %ebx 10e2d7: 9d popf 10e2d8: fa cli if ( _Thread_Is_heir( executing ) ) 10e2d9: 3b 05 9c 6a 12 00 cmp 0x126a9c,%eax 10e2df: 74 0f je 10e2f0 <_Thread_Yield_processor+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 10e2e1: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 _ISR_Enable( level ); 10e2e8: 53 push %ebx 10e2e9: 9d popf } 10e2ea: 5b pop %ebx 10e2eb: 5e pop %esi 10e2ec: 5f pop %edi 10e2ed: c9 leave 10e2ee: c3 ret 10e2ef: 90 nop <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e2f0: 8b 02 mov (%edx),%eax 10e2f2: a3 9c 6a 12 00 mov %eax,0x126a9c 10e2f7: eb e8 jmp 10e2e1 <_Thread_Yield_processor+0x3d> 10e2f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e2fc: 3b 05 9c 6a 12 00 cmp 0x126a9c,%eax 10e302: 75 dd jne 10e2e1 <_Thread_Yield_processor+0x3d> 10e304: eb e2 jmp 10e2e8 <_Thread_Yield_processor+0x44> =============================================================================== 0010d158 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10d158: 55 push %ebp 10d159: 89 e5 mov %esp,%ebp 10d15b: 53 push %ebx 10d15c: 83 ec 04 sub $0x4,%esp 10d15f: 8b 5d 0c mov 0xc(%ebp),%ebx 10d162: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10d165: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 10d16c: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d170: 74 16 je 10d188 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10d172: 50 push %eax 10d173: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d174: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10d17b: 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 } 10d17e: 8b 5d fc mov -0x4(%ebp),%ebx 10d181: c9 leave 10d182: e9 5d 01 00 00 jmp 10d2e4 <_Thread_Clear_state> 10d187: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d188: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d18f: 50 push %eax 10d190: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d191: 83 ec 0c sub $0xc,%esp 10d194: 8d 43 48 lea 0x48(%ebx),%eax 10d197: 50 push %eax 10d198: e8 bf 15 00 00 call 10e75c <_Watchdog_Remove> 10d19d: 83 c4 10 add $0x10,%esp 10d1a0: eb d2 jmp 10d174 <_Thread_blocking_operation_Cancel+0x1c> =============================================================================== 0010da6c <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10da6c: 55 push %ebp 10da6d: 89 e5 mov %esp,%ebp 10da6f: 53 push %ebx 10da70: 83 ec 04 sub $0x4,%esp 10da73: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10da76: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10da7a: 74 1c je 10da98 <_Thread_queue_Dequeue+0x2c> dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; 10da7c: b8 bc 15 11 00 mov $0x1115bc,%eax the_thread = (*dequeue_p)( the_thread_queue ); 10da81: 83 ec 0c sub $0xc,%esp 10da84: 53 push %ebx 10da85: ff d0 call *%eax _ISR_Disable( level ); 10da87: 9c pushf 10da88: fa cli 10da89: 5a pop %edx if ( !the_thread ) { 10da8a: 83 c4 10 add $0x10,%esp 10da8d: 85 c0 test %eax,%eax 10da8f: 74 0f je 10daa0 <_Thread_queue_Dequeue+0x34> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 10da91: 52 push %edx 10da92: 9d popf return the_thread; } 10da93: 8b 5d fc mov -0x4(%ebp),%ebx 10da96: c9 leave 10da97: c3 ret Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) dequeue_p = _Thread_queue_Dequeue_priority; 10da98: b8 b8 da 10 00 mov $0x10dab8,%eax 10da9d: eb e2 jmp 10da81 <_Thread_queue_Dequeue+0x15> 10da9f: 90 nop <== NOT EXECUTED the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10daa0: 8b 4b 30 mov 0x30(%ebx),%ecx 10daa3: 49 dec %ecx 10daa4: 83 f9 01 cmp $0x1,%ecx 10daa7: 77 e8 ja 10da91 <_Thread_queue_Dequeue+0x25> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10daa9: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10dab0: a1 98 6a 12 00 mov 0x126a98,%eax 10dab5: eb da jmp 10da91 <_Thread_queue_Dequeue+0x25> =============================================================================== 0010dab8 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10dab8: 55 push %ebp 10dab9: 89 e5 mov %esp,%ebp 10dabb: 57 push %edi 10dabc: 56 push %esi 10dabd: 53 push %ebx 10dabe: 83 ec 2c sub $0x2c,%esp 10dac1: 8b 7d 08 mov 0x8(%ebp),%edi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10dac4: 9c pushf 10dac5: fa cli 10dac6: 58 pop %eax 10dac7: 89 f9 mov %edi,%ecx for( index=0 ; 10dac9: 31 d2 xor %edx,%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10dacb: 8b 19 mov (%ecx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dacd: 8d 34 52 lea (%edx,%edx,2),%esi 10dad0: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 10dad4: 39 f3 cmp %esi,%ebx 10dad6: 75 18 jne 10daf0 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10dad8: 42 inc %edx 10dad9: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10dadc: 83 fa 04 cmp $0x4,%edx 10dadf: 75 ea jne 10dacb <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10dae1: 50 push %eax 10dae2: 9d popf return NULL; 10dae3: 31 f6 xor %esi,%esi #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10dae5: 89 f0 mov %esi,%eax 10dae7: 8d 65 f4 lea -0xc(%ebp),%esp 10daea: 5b pop %ebx 10daeb: 5e pop %esi 10daec: 5f pop %edi 10daed: c9 leave 10daee: c3 ret 10daef: 90 nop <== NOT EXECUTED _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10daf0: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10daf2: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10daf9: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10dafc: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10dafe: 8b 7b 04 mov 0x4(%ebx),%edi 10db01: 89 7d d4 mov %edi,-0x2c(%ebp) 10db04: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10db07: 39 fa cmp %edi,%edx 10db09: 74 7b je 10db86 <_Thread_queue_Dequeue_priority+0xce> last_node = the_thread->Wait.Block2n.last; 10db0b: 8b 7b 40 mov 0x40(%ebx),%edi 10db0e: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10db11: 8b 3a mov (%edx),%edi 10db13: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10db16: 8b 7d d4 mov -0x2c(%ebp),%edi 10db19: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10db1b: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10db1e: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10db20: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10db23: 3b 55 e4 cmp -0x1c(%ebp),%edx 10db26: 74 17 je 10db3f <_Thread_queue_Dequeue_priority+0x87> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 10db28: 8d 4a 38 lea 0x38(%edx),%ecx 10db2b: 8b 7d e0 mov -0x20(%ebp),%edi 10db2e: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 10db31: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10db34: 8b 4d e4 mov -0x1c(%ebp),%ecx 10db37: 89 4a 40 mov %ecx,0x40(%edx) 10db3a: 83 c2 3c add $0x3c,%edx 10db3d: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10db3f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10db43: 74 17 je 10db5c <_Thread_queue_Dequeue_priority+0xa4> _ISR_Enable( level ); 10db45: 50 push %eax 10db46: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10db47: 83 ec 08 sub $0x8,%esp 10db4a: 68 f8 ff 03 10 push $0x1003fff8 10db4f: 53 push %ebx 10db50: e8 8f f7 ff ff call 10d2e4 <_Thread_Clear_state> 10db55: 83 c4 10 add $0x10,%esp 10db58: eb 8b jmp 10dae5 <_Thread_queue_Dequeue_priority+0x2d> 10db5a: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10db5c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10db63: 50 push %eax 10db64: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10db65: 83 ec 0c sub $0xc,%esp 10db68: 8d 43 48 lea 0x48(%ebx),%eax 10db6b: 50 push %eax 10db6c: e8 eb 0b 00 00 call 10e75c <_Watchdog_Remove> 10db71: 58 pop %eax 10db72: 5a pop %edx 10db73: 68 f8 ff 03 10 push $0x1003fff8 10db78: 53 push %ebx 10db79: e8 66 f7 ff ff call 10d2e4 <_Thread_Clear_state> 10db7e: 83 c4 10 add $0x10,%esp 10db81: e9 5f ff ff ff jmp 10dae5 <_Thread_queue_Dequeue_priority+0x2d> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10db86: 8b 7d d4 mov -0x2c(%ebp),%edi 10db89: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10db8b: 89 79 04 mov %edi,0x4(%ecx) 10db8e: eb af jmp 10db3f <_Thread_queue_Dequeue_priority+0x87> =============================================================================== 00111634 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 111634: 55 push %ebp 111635: 89 e5 mov %esp,%ebp 111637: 56 push %esi 111638: 53 push %ebx 111639: 8b 55 08 mov 0x8(%ebp),%edx 11163c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 11163f: 9c pushf 111640: fa cli 111641: 59 pop %ecx sync_state = the_thread_queue->sync_state; 111642: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 111645: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 11164c: 83 f8 01 cmp $0x1,%eax 11164f: 74 0b je 11165c <_Thread_queue_Enqueue_fifo+0x28> * 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; 111651: 8b 55 10 mov 0x10(%ebp),%edx 111654: 89 0a mov %ecx,(%edx) return sync_state; } 111656: 5b pop %ebx 111657: 5e pop %esi 111658: c9 leave 111659: c3 ret 11165a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11165c: 8d 72 04 lea 0x4(%edx),%esi 11165f: 89 33 mov %esi,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 111661: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 111664: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 111667: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 111669: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 11166c: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 11166f: 51 push %ecx 111670: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111671: 5b pop %ebx 111672: 5e pop %esi 111673: c9 leave 111674: c3 ret =============================================================================== 0010dc28 <_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 ) { 10dc28: 55 push %ebp 10dc29: 89 e5 mov %esp,%ebp 10dc2b: 57 push %edi 10dc2c: 56 push %esi 10dc2d: 53 push %ebx 10dc2e: 83 ec 10 sub $0x10,%esp 10dc31: 8b 7d 0c mov 0xc(%ebp),%edi 10dc34: 8d 47 3c lea 0x3c(%edi),%eax 10dc37: 89 47 38 mov %eax,0x38(%edi) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dc3a: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 10dc41: 8d 47 38 lea 0x38(%edi),%eax 10dc44: 89 47 40 mov %eax,0x40(%edi) priority = the_thread->current_priority; 10dc47: 8b 57 14 mov 0x14(%edi),%edx RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 10dc4a: 89 d0 mov %edx,%eax 10dc4c: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 10dc4f: 8b 4d 08 mov 0x8(%ebp),%ecx 10dc52: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10dc55: f6 c2 20 test $0x20,%dl 10dc58: 75 66 jne 10dcc0 <_Thread_queue_Enqueue_priority+0x98> goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 10dc5a: 8d 04 40 lea (%eax,%eax,2),%eax 10dc5d: 8d 04 81 lea (%ecx,%eax,4),%eax 10dc60: 89 45 f0 mov %eax,-0x10(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dc63: 83 c0 04 add $0x4,%eax 10dc66: 89 7d e8 mov %edi,-0x18(%ebp) 10dc69: 89 c7 mov %eax,%edi if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10dc6b: 9c pushf 10dc6c: fa cli 10dc6d: 5e pop %esi 10dc6e: 89 75 ec mov %esi,-0x14(%ebp) search_thread = (Thread_Control *) header->first; 10dc71: 8b 4d f0 mov -0x10(%ebp),%ecx 10dc74: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10dc76: 39 f8 cmp %edi,%eax 10dc78: 75 18 jne 10dc92 <_Thread_queue_Enqueue_priority+0x6a> 10dc7a: e9 32 01 00 00 jmp 10ddb1 <_Thread_queue_Enqueue_priority+0x189> 10dc7f: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10dc80: 56 push %esi 10dc81: 9d popf 10dc82: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dc83: 85 58 10 test %ebx,0x10(%eax) 10dc86: 0f 84 d0 00 00 00 je 10dd5c <_Thread_queue_Enqueue_priority+0x134> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10dc8c: 8b 00 mov (%eax),%eax 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 ) ) { 10dc8e: 39 f8 cmp %edi,%eax 10dc90: 74 07 je 10dc99 <_Thread_queue_Enqueue_priority+0x71> search_priority = search_thread->current_priority; 10dc92: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10dc95: 39 ca cmp %ecx,%edx 10dc97: 77 e7 ja 10dc80 <_Thread_queue_Enqueue_priority+0x58> 10dc99: 8b 7d e8 mov -0x18(%ebp),%edi 10dc9c: 89 75 f0 mov %esi,-0x10(%ebp) } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10dc9f: 8b 75 08 mov 0x8(%ebp),%esi 10dca2: 8b 5e 30 mov 0x30(%esi),%ebx 10dca5: 83 fb 01 cmp $0x1,%ebx 10dca8: 0f 84 b6 00 00 00 je 10dd64 <_Thread_queue_Enqueue_priority+0x13c> * 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; 10dcae: 8b 45 10 mov 0x10(%ebp),%eax 10dcb1: 8b 55 ec mov -0x14(%ebp),%edx 10dcb4: 89 10 mov %edx,(%eax) return the_thread_queue->sync_state; } 10dcb6: 89 d8 mov %ebx,%eax 10dcb8: 83 c4 10 add $0x10,%esp 10dcbb: 5b pop %ebx 10dcbc: 5e pop %esi 10dcbd: 5f pop %edi 10dcbe: c9 leave 10dcbf: c3 ret _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10dcc0: 8d 04 40 lea (%eax,%eax,2),%eax 10dcc3: 8b 4d 08 mov 0x8(%ebp),%ecx 10dcc6: 8d 34 81 lea (%ecx,%eax,4),%esi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 10dcc9: 89 75 f0 mov %esi,-0x10(%ebp) 10dccc: 89 75 e4 mov %esi,-0x1c(%ebp) 10dccf: 89 7d e8 mov %edi,-0x18(%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; 10dcd2: 0f b6 0d 14 22 12 00 movzbl 0x122214,%ecx 10dcd9: 41 inc %ecx _ISR_Disable( level ); 10dcda: 9c pushf 10dcdb: fa cli 10dcdc: 5f pop %edi 10dcdd: 89 7d ec mov %edi,-0x14(%ebp) search_thread = (Thread_Control *) header->last; 10dce0: 8b 75 f0 mov -0x10(%ebp),%esi 10dce3: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dce6: 3b 45 e4 cmp -0x1c(%ebp),%eax 10dce9: 74 2b je 10dd16 <_Thread_queue_Enqueue_priority+0xee> search_priority = search_thread->current_priority; 10dceb: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dcee: 39 ca cmp %ecx,%edx 10dcf0: 73 24 jae 10dd16 <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dcf2: 57 push %edi 10dcf3: 9d popf 10dcf4: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dcf5: 85 58 10 test %ebx,0x10(%eax) 10dcf8: 74 59 je 10dd53 <_Thread_queue_Enqueue_priority+0x12b> 10dcfa: 8b 75 e4 mov -0x1c(%ebp),%esi 10dcfd: eb 10 jmp 10dd0f <_Thread_queue_Enqueue_priority+0xe7> 10dcff: 90 nop <== NOT EXECUTED search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10dd00: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dd03: 39 ca cmp %ecx,%edx 10dd05: 73 0f jae 10dd16 <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dd07: 57 push %edi 10dd08: 9d popf 10dd09: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dd0a: 85 58 10 test %ebx,0x10(%eax) 10dd0d: 74 41 je 10dd50 <_Thread_queue_Enqueue_priority+0x128><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 10dd0f: 8b 40 04 mov 0x4(%eax),%eax 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 ) ) { 10dd12: 39 f0 cmp %esi,%eax 10dd14: 75 ea jne 10dd00 <_Thread_queue_Enqueue_priority+0xd8> 10dd16: 89 7d f0 mov %edi,-0x10(%ebp) 10dd19: 8b 7d e8 mov -0x18(%ebp),%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10dd1c: 8b 75 08 mov 0x8(%ebp),%esi 10dd1f: 8b 5e 30 mov 0x30(%esi),%ebx 10dd22: 83 fb 01 cmp $0x1,%ebx 10dd25: 75 87 jne 10dcae <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dd27: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dd2e: 39 ca cmp %ecx,%edx 10dd30: 74 5b je 10dd8d <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10dd32: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10dd34: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10dd36: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10dd39: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10dd3b: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10dd3e: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dd41: ff 75 f0 pushl -0x10(%ebp) 10dd44: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dd45: 89 d8 mov %ebx,%eax 10dd47: 83 c4 10 add $0x10,%esp 10dd4a: 5b pop %ebx 10dd4b: 5e pop %esi 10dd4c: 5f pop %edi 10dd4d: c9 leave 10dd4e: c3 ret 10dd4f: 90 nop <== NOT EXECUTED 10dd50: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dd53: 57 push %edi 10dd54: 9d popf goto restart_reverse_search; 10dd55: e9 78 ff ff ff jmp 10dcd2 <_Thread_queue_Enqueue_priority+0xaa> 10dd5a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dd5c: 56 push %esi 10dd5d: 9d popf goto restart_forward_search; 10dd5e: e9 08 ff ff ff jmp 10dc6b <_Thread_queue_Enqueue_priority+0x43> 10dd63: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dd64: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dd6b: 39 ca cmp %ecx,%edx 10dd6d: 74 1e je 10dd8d <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10dd6f: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dd72: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dd74: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dd77: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dd79: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dd7c: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dd7f: ff 75 f0 pushl -0x10(%ebp) 10dd82: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dd83: 89 d8 mov %ebx,%eax 10dd85: 83 c4 10 add $0x10,%esp 10dd88: 5b pop %ebx 10dd89: 5e pop %esi 10dd8a: 5f pop %edi 10dd8b: c9 leave 10dd8c: c3 ret 10dd8d: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10dd90: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dd93: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dd95: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dd98: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dd9a: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dd9d: 8b 45 08 mov 0x8(%ebp),%eax 10dda0: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dda3: ff 75 ec pushl -0x14(%ebp) 10dda6: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dda7: bb 01 00 00 00 mov $0x1,%ebx 10ddac: e9 05 ff ff ff jmp 10dcb6 <_Thread_queue_Enqueue_priority+0x8e> 10ddb1: 8b 7d e8 mov -0x18(%ebp),%edi 10ddb4: 89 75 f0 mov %esi,-0x10(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 10ddb7: b9 ff ff ff ff mov $0xffffffff,%ecx 10ddbc: e9 de fe ff ff jmp 10dc9f <_Thread_queue_Enqueue_priority+0x77> =============================================================================== 0010db90 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 10db90: 55 push %ebp 10db91: 89 e5 mov %esp,%ebp 10db93: 57 push %edi 10db94: 56 push %esi 10db95: 53 push %ebx 10db96: 83 ec 24 sub $0x24,%esp 10db99: 8b 75 08 mov 0x8(%ebp),%esi 10db9c: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10db9f: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10dba5: ff 76 38 pushl 0x38(%esi) 10dba8: 53 push %ebx 10dba9: e8 d6 03 00 00 call 10df84 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10dbae: 83 c4 10 add $0x10,%esp 10dbb1: 85 ff test %edi,%edi 10dbb3: 75 33 jne 10dbe8 <_Thread_queue_Enqueue_with_handler+0x58> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10dbb5: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dbb9: 74 64 je 10dc1f <_Thread_queue_Enqueue_with_handler+0x8f> enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; 10dbbb: b8 34 16 11 00 mov $0x111634,%eax sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10dbc0: 51 push %ecx 10dbc1: 8d 55 e4 lea -0x1c(%ebp),%edx 10dbc4: 52 push %edx 10dbc5: 53 push %ebx 10dbc6: 56 push %esi 10dbc7: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10dbc9: 83 c4 10 add $0x10,%esp 10dbcc: 83 f8 01 cmp $0x1,%eax 10dbcf: 74 0e je 10dbdf <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10dbd1: 52 push %edx 10dbd2: ff 75 e4 pushl -0x1c(%ebp) 10dbd5: 53 push %ebx 10dbd6: 50 push %eax 10dbd7: e8 7c f5 ff ff call 10d158 <_Thread_blocking_operation_Cancel> 10dbdc: 83 c4 10 add $0x10,%esp } 10dbdf: 8d 65 f4 lea -0xc(%ebp),%esp 10dbe2: 5b pop %ebx 10dbe3: 5e pop %esi 10dbe4: 5f pop %edi 10dbe5: c9 leave 10dbe6: c3 ret 10dbe7: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10dbe8: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dbeb: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dbf2: 8b 55 10 mov 0x10(%ebp),%edx 10dbf5: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10dbf8: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10dbfb: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10dc02: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10dc05: 83 ec 08 sub $0x8,%esp handler, the_thread->Object.id, NULL ); _Watchdog_Insert_ticks( &the_thread->Timer, timeout ); 10dc08: 8d 43 48 lea 0x48(%ebx),%eax 10dc0b: 50 push %eax 10dc0c: 68 a4 65 12 00 push $0x1265a4 10dc11: e8 0e 0a 00 00 call 10e624 <_Watchdog_Insert> 10dc16: 83 c4 10 add $0x10,%esp } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10dc19: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dc1d: 75 9c jne 10dbbb <_Thread_queue_Enqueue_with_handler+0x2b> enqueue_p = _Thread_queue_Enqueue_priority; 10dc1f: b8 28 dc 10 00 mov $0x10dc28,%eax 10dc24: eb 9a jmp 10dbc0 <_Thread_queue_Enqueue_with_handler+0x30> =============================================================================== 00111678 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 111678: 55 push %ebp 111679: 89 e5 mov %esp,%ebp 11167b: 83 ec 08 sub $0x8,%esp 11167e: 8b 45 08 mov 0x8(%ebp),%eax 111681: 8b 55 0c mov 0xc(%ebp),%edx /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 111684: 83 78 34 01 cmpl $0x1,0x34(%eax) 111688: 74 0e je 111698 <_Thread_queue_Extract+0x20> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 11168a: 89 55 0c mov %edx,0xc(%ebp) 11168d: 89 45 08 mov %eax,0x8(%ebp) } 111690: c9 leave * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 111691: e9 0e 1b 00 00 jmp 1131a4 <_Thread_queue_Extract_fifo> 111696: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 111698: 51 push %ecx 111699: 6a 00 push $0x0 11169b: 52 push %edx 11169c: 50 push %eax 11169d: e8 06 00 00 00 call 1116a8 <_Thread_queue_Extract_priority_helper> 1116a2: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 1116a5: c9 leave 1116a6: c3 ret =============================================================================== 001131a4 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 1131a4: 55 push %ebp 1131a5: 89 e5 mov %esp,%ebp 1131a7: 53 push %ebx 1131a8: 83 ec 04 sub $0x4,%esp 1131ab: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 1131ae: 9c pushf 1131af: fa cli 1131b0: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1131b1: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1131b8: 74 2e je 1131e8 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1131ba: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 1131bc: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 1131bf: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 1131c2: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 1131c4: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1131cb: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1131cf: 74 1f je 1131f0 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 1131d1: 50 push %eax 1131d2: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1131d3: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 1131da: 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 } 1131dd: 8b 5d fc mov -0x4(%ebp),%ebx 1131e0: c9 leave 1131e1: e9 fe a0 ff ff jmp 10d2e4 <_Thread_Clear_state> 1131e6: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 1131e8: 50 push %eax 1131e9: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1131ea: 8b 5d fc mov -0x4(%ebp),%ebx 1131ed: c9 leave 1131ee: c3 ret 1131ef: 90 nop <== NOT EXECUTED 1131f0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 1131f7: 50 push %eax 1131f8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1131f9: 83 ec 0c sub $0xc,%esp 1131fc: 8d 43 48 lea 0x48(%ebx),%eax 1131ff: 50 push %eax 113200: e8 57 b5 ff ff call 10e75c <_Watchdog_Remove> 113205: 83 c4 10 add $0x10,%esp 113208: eb c9 jmp 1131d3 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 001116a8 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 1116a8: 55 push %ebp 1116a9: 89 e5 mov %esp,%ebp 1116ab: 57 push %edi 1116ac: 56 push %esi 1116ad: 53 push %ebx 1116ae: 83 ec 1c sub $0x1c,%esp 1116b1: 8b 5d 0c mov 0xc(%ebp),%ebx 1116b4: 8a 45 10 mov 0x10(%ebp),%al 1116b7: 88 45 e3 mov %al,-0x1d(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 1116ba: 9c pushf 1116bb: fa cli 1116bc: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1116bf: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1116c6: 74 68 je 111730 <_Thread_queue_Extract_priority_helper+0x88> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 1116c8: 8b 0b mov (%ebx),%ecx previous_node = the_node->previous; 1116ca: 8b 73 04 mov 0x4(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1116cd: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1116d0: 8d 53 3c lea 0x3c(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 1116d3: 39 d0 cmp %edx,%eax 1116d5: 74 65 je 11173c <_Thread_queue_Extract_priority_helper+0x94> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 1116d7: 8b 53 40 mov 0x40(%ebx),%edx new_second_node = new_first_node->next; 1116da: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 1116dc: 89 06 mov %eax,(%esi) next_node->previous = new_first_node; 1116de: 89 41 04 mov %eax,0x4(%ecx) new_first_node->next = next_node; 1116e1: 89 08 mov %ecx,(%eax) new_first_node->previous = previous_node; 1116e3: 89 70 04 mov %esi,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 1116e6: 39 c2 cmp %eax,%edx 1116e8: 74 11 je 1116fb <_Thread_queue_Extract_priority_helper+0x53> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 1116ea: 8d 48 38 lea 0x38(%eax),%ecx 1116ed: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 1116f0: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 1116f3: 89 50 40 mov %edx,0x40(%eax) 1116f6: 83 c0 3c add $0x3c,%eax 1116f9: 89 02 mov %eax,(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 1116fb: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 1116ff: 75 23 jne 111724 <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111701: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111705: 74 3d je 111744 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); 111707: ff 75 e4 pushl -0x1c(%ebp) 11170a: 9d popf 11170b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111712: 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 } 111715: 8d 65 f4 lea -0xc(%ebp),%esp 111718: 5b pop %ebx 111719: 5e pop %esi 11171a: 5f pop %edi 11171b: c9 leave 11171c: e9 c3 bb ff ff jmp 10d2e4 <_Thread_Clear_state> 111721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 111724: ff 75 e4 pushl -0x1c(%ebp) 111727: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111728: 8d 65 f4 lea -0xc(%ebp),%esp 11172b: 5b pop %ebx 11172c: 5e pop %esi 11172d: 5f pop %edi 11172e: c9 leave 11172f: c3 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 111730: ff 75 e4 pushl -0x1c(%ebp) 111733: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111734: 8d 65 f4 lea -0xc(%ebp),%esp 111737: 5b pop %ebx 111738: 5e pop %esi 111739: 5f pop %edi 11173a: c9 leave 11173b: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 11173c: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 11173e: 89 71 04 mov %esi,0x4(%ecx) 111741: eb b8 jmp 1116fb <_Thread_queue_Extract_priority_helper+0x53> 111743: 90 nop <== NOT EXECUTED 111744: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 11174b: ff 75 e4 pushl -0x1c(%ebp) 11174e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 11174f: 83 ec 0c sub $0xc,%esp 111752: 8d 43 48 lea 0x48(%ebx),%eax 111755: 50 push %eax 111756: e8 01 d0 ff ff call 10e75c <_Watchdog_Remove> 11175b: 83 c4 10 add $0x10,%esp 11175e: eb ab jmp 11170b <_Thread_queue_Extract_priority_helper+0x63> =============================================================================== 0010ddc4 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10ddc4: 55 push %ebp 10ddc5: 89 e5 mov %esp,%ebp 10ddc7: 83 ec 08 sub $0x8,%esp 10ddca: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10ddcd: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10ddd4: 75 06 jne 10dddc <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10ddd6: 31 c0 xor %eax,%eax } 10ddd8: c9 leave 10ddd9: c3 ret 10ddda: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10dddc: 83 ec 08 sub $0x8,%esp 10dddf: 50 push %eax 10dde0: ff 70 44 pushl 0x44(%eax) 10dde3: e8 90 38 00 00 call 111678 <_Thread_queue_Extract> return true; 10dde8: 83 c4 10 add $0x10,%esp 10ddeb: b0 01 mov $0x1,%al } return false; } 10dded: c9 leave 10ddee: c3 ret =============================================================================== 0010fc1c <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 10fc1c: 55 push %ebp 10fc1d: 89 e5 mov %esp,%ebp 10fc1f: 83 ec 08 sub $0x8,%esp 10fc22: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10fc25: 83 78 34 01 cmpl $0x1,0x34(%eax) 10fc29: 74 0d je 10fc38 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 10fc2b: ba f4 35 11 00 mov $0x1135f4,%edx return (*first_p)( the_thread_queue ); 10fc30: 89 45 08 mov %eax,0x8(%ebp) } 10fc33: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fc34: ff e2 jmp *%edx 10fc36: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; 10fc38: ba 44 fc 10 00 mov $0x10fc44,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fc3d: 89 45 08 mov %eax,0x8(%ebp) } 10fc40: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fc41: ff e2 jmp *%edx =============================================================================== 001135f4 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1135f4: 55 push %ebp 1135f5: 89 e5 mov %esp,%ebp 1135f7: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1135fa: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1135fc: 83 c2 04 add $0x4,%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 1135ff: 39 d0 cmp %edx,%eax 113601: 74 05 je 113608 <_Thread_queue_First_fifo+0x14> return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 113603: c9 leave 113604: c3 ret 113605: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; 113608: 31 c0 xor %eax,%eax } 11360a: c9 leave 11360b: c3 ret =============================================================================== 0010ddf0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10ddf0: 55 push %ebp 10ddf1: 89 e5 mov %esp,%ebp 10ddf3: 56 push %esi 10ddf4: 53 push %ebx 10ddf5: 8b 5d 08 mov 0x8(%ebp),%ebx 10ddf8: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10ddfb: eb 06 jmp 10de03 <_Thread_queue_Flush+0x13> 10ddfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10de00: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10de03: 83 ec 0c sub $0xc,%esp 10de06: 53 push %ebx 10de07: e8 60 fc ff ff call 10da6c <_Thread_queue_Dequeue> 10de0c: 83 c4 10 add $0x10,%esp 10de0f: 85 c0 test %eax,%eax 10de11: 75 ed jne 10de00 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10de13: 8d 65 f8 lea -0x8(%ebp),%esp 10de16: 5b pop %ebx 10de17: 5e pop %esi 10de18: c9 leave 10de19: c3 ret =============================================================================== 0010de1c <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10de1c: 55 push %ebp 10de1d: 89 e5 mov %esp,%ebp 10de1f: 56 push %esi 10de20: 53 push %ebx 10de21: 8b 45 08 mov 0x8(%ebp),%eax 10de24: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10de27: 8b 4d 10 mov 0x10(%ebp),%ecx 10de2a: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10de2d: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10de30: 8b 4d 14 mov 0x14(%ebp),%ecx 10de33: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10de36: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10de3d: 83 fa 01 cmp $0x1,%edx 10de40: 74 16 je 10de58 <_Thread_queue_Initialize+0x3c> 10de42: 8d 50 04 lea 0x4(%eax),%edx 10de45: 89 10 mov %edx,(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10de47: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10de4e: 89 40 08 mov %eax,0x8(%eax) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10de51: 5b pop %ebx 10de52: 5e pop %esi 10de53: c9 leave 10de54: c3 ret 10de55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10de58: 89 c1 mov %eax,%ecx 10de5a: 30 d2 xor %dl,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10de5c: 8d 1c 52 lea (%edx,%edx,2),%ebx 10de5f: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10de62: 8d 73 04 lea 0x4(%ebx),%esi 10de65: 89 31 mov %esi,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10de67: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 10de6e: 89 59 08 mov %ebx,0x8(%ecx) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10de71: 42 inc %edx 10de72: 83 c1 0c add $0xc,%ecx the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10de75: 83 fa 04 cmp $0x4,%edx 10de78: 75 e2 jne 10de5c <_Thread_queue_Initialize+0x40> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10de7a: 5b pop %ebx 10de7b: 5e pop %esi 10de7c: c9 leave 10de7d: c3 ret =============================================================================== 00111760 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 111760: 55 push %ebp 111761: 89 e5 mov %esp,%ebp 111763: 83 ec 08 sub $0x8,%esp 111766: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 111769: 8b 50 44 mov 0x44(%eax),%edx * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 11176c: 8b 4a 30 mov 0x30(%edx),%ecx 11176f: 85 c9 test %ecx,%ecx 111771: 74 08 je 11177b <_Thread_queue_Process_timeout+0x1b> 111773: 3b 05 98 6a 12 00 cmp 0x126a98,%eax 111779: 74 15 je 111790 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 11177b: 8b 4a 3c mov 0x3c(%edx),%ecx 11177e: 89 48 34 mov %ecx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 111781: 83 ec 08 sub $0x8,%esp 111784: 50 push %eax 111785: 52 push %edx 111786: e8 ed fe ff ff call 111678 <_Thread_queue_Extract> 11178b: 83 c4 10 add $0x10,%esp } } 11178e: c9 leave 11178f: c3 ret * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 111790: 83 f9 03 cmp $0x3,%ecx 111793: 74 f9 je 11178e <_Thread_queue_Process_timeout+0x2e> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111795: 8b 4a 3c mov 0x3c(%edx),%ecx 111798: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 11179b: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 1117a2: c9 leave 1117a3: c3 ret =============================================================================== 0010de80 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10de80: 55 push %ebp 10de81: 89 e5 mov %esp,%ebp 10de83: 57 push %edi 10de84: 56 push %esi 10de85: 53 push %ebx 10de86: 83 ec 1c sub $0x1c,%esp 10de89: 8b 75 08 mov 0x8(%ebp),%esi 10de8c: 8b 7d 0c mov 0xc(%ebp),%edi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10de8f: 85 f6 test %esi,%esi 10de91: 74 06 je 10de99 <_Thread_queue_Requeue+0x19><== 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 ) { 10de93: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10de97: 74 0b je 10dea4 <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10de99: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10de9c: 5b pop %ebx <== NOT EXECUTED 10de9d: 5e pop %esi <== NOT EXECUTED 10de9e: 5f pop %edi <== NOT EXECUTED 10de9f: c9 leave <== NOT EXECUTED 10dea0: c3 ret <== NOT EXECUTED 10dea1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10dea4: 9c pushf 10dea5: fa cli 10dea6: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dea7: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10deae: 75 0c jne 10debc <_Thread_queue_Requeue+0x3c><== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10deb0: 53 push %ebx 10deb1: 9d popf } } 10deb2: 8d 65 f4 lea -0xc(%ebp),%esp 10deb5: 5b pop %ebx 10deb6: 5e pop %esi 10deb7: 5f pop %edi 10deb8: c9 leave 10deb9: c3 ret 10deba: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10debc: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10dec3: 50 push %eax 10dec4: 6a 01 push $0x1 10dec6: 57 push %edi 10dec7: 56 push %esi 10dec8: e8 db 37 00 00 call 1116a8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10decd: 83 c4 0c add $0xc,%esp 10ded0: 8d 45 e4 lea -0x1c(%ebp),%eax 10ded3: 50 push %eax 10ded4: 57 push %edi 10ded5: 56 push %esi 10ded6: e8 4d fd ff ff call 10dc28 <_Thread_queue_Enqueue_priority> 10dedb: 83 c4 10 add $0x10,%esp 10dede: eb d0 jmp 10deb0 <_Thread_queue_Requeue+0x30> =============================================================================== 0010dee0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10dee0: 55 push %ebp 10dee1: 89 e5 mov %esp,%ebp 10dee3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10dee6: 8d 45 f4 lea -0xc(%ebp),%eax 10dee9: 50 push %eax 10deea: ff 75 08 pushl 0x8(%ebp) 10deed: e8 da f7 ff ff call 10d6cc <_Thread_Get> switch ( location ) { 10def2: 83 c4 10 add $0x10,%esp 10def5: 8b 55 f4 mov -0xc(%ebp),%edx 10def8: 85 d2 test %edx,%edx 10defa: 75 17 jne 10df13 <_Thread_queue_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10defc: 83 ec 0c sub $0xc,%esp 10deff: 50 push %eax 10df00: e8 5b 38 00 00 call 111760 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10df05: a1 d4 64 12 00 mov 0x1264d4,%eax 10df0a: 48 dec %eax 10df0b: a3 d4 64 12 00 mov %eax,0x1264d4 10df10: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10df13: c9 leave 10df14: c3 ret =============================================================================== 00118d94 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118d94: 55 push %ebp 118d95: 89 e5 mov %esp,%ebp 118d97: 57 push %edi 118d98: 56 push %esi 118d99: 53 push %ebx 118d9a: 83 ec 4c sub $0x4c,%esp 118d9d: 8b 5d 08 mov 0x8(%ebp),%ebx 118da0: 8d 45 e0 lea -0x20(%ebp),%eax 118da3: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118da6: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118da9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) Timer_server_Control *ts = (Timer_server_Control *) arg; Chain_Control insert_chain; Chain_Control fire_chain; _Chain_Initialize_empty( &insert_chain ); 118db0: 8d 4d dc lea -0x24(%ebp),%ecx 118db3: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118db6: 8d 7d d0 lea -0x30(%ebp),%edi 118db9: 8d 45 d4 lea -0x2c(%ebp),%eax 118dbc: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118dbf: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118dc2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118dc9: 89 7d d8 mov %edi,-0x28(%ebp) 118dcc: 8d 73 30 lea 0x30(%ebx),%esi 118dcf: 8d 4b 68 lea 0x68(%ebx),%ecx 118dd2: 89 4d c4 mov %ecx,-0x3c(%ebp) 118dd5: 8d 43 08 lea 0x8(%ebx),%eax 118dd8: 89 45 c0 mov %eax,-0x40(%ebp) 118ddb: 8d 53 40 lea 0x40(%ebx),%edx 118dde: 89 55 bc mov %edx,-0x44(%ebp) 118de1: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 118de4: 8d 4d dc lea -0x24(%ebp),%ecx 118de7: 89 4b 78 mov %ecx,0x78(%ebx) 118dea: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 118dec: a1 64 22 14 00 mov 0x142264,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118df1: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118df4: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118df7: 51 push %ecx 118df8: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118df9: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118dfb: 50 push %eax 118dfc: 56 push %esi 118dfd: e8 86 3f 00 00 call 11cd88 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118e02: a1 a8 21 14 00 mov 0x1421a8,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118e07: 8b 53 74 mov 0x74(%ebx),%edx /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 118e0a: 83 c4 10 add $0x10,%esp 118e0d: 39 d0 cmp %edx,%eax 118e0f: 77 63 ja 118e74 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 118e11: 72 7d jb 118e90 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118e13: 89 43 74 mov %eax,0x74(%ebx) 118e16: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 118e18: 8b 43 78 mov 0x78(%ebx),%eax 118e1b: 83 ec 0c sub $0xc,%esp 118e1e: 50 push %eax 118e1f: e8 ec 09 00 00 call 119810 <_Chain_Get> if ( timer == NULL ) { 118e24: 83 c4 10 add $0x10,%esp 118e27: 85 c0 test %eax,%eax 118e29: 74 35 je 118e60 <_Timer_server_Body+0xcc><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118e2b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118e2e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118e31: 74 19 je 118e4c <_Timer_server_Body+0xb8><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118e33: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118e36: 75 e0 jne 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118e38: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e3b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e3e: 50 push %eax <== NOT EXECUTED 118e3f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118e42: e8 cd 3f 00 00 call 11ce14 <_Watchdog_Insert> <== NOT EXECUTED 118e47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e4a: eb cc jmp 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118e4c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e4f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e52: 50 push %eax <== NOT EXECUTED 118e53: 56 push %esi <== NOT EXECUTED 118e54: e8 bb 3f 00 00 call 11ce14 <_Watchdog_Insert> <== NOT EXECUTED 118e59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e5c: eb ba jmp 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED 118e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 118e60: 9c pushf 118e61: fa cli 118e62: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118e63: 8b 55 b4 mov -0x4c(%ebp),%edx 118e66: 3b 55 dc cmp -0x24(%ebp),%edx 118e69: 74 41 je 118eac <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118e6b: 50 push %eax <== NOT EXECUTED 118e6c: 9d popf <== NOT EXECUTED 118e6d: e9 7a ff ff ff jmp 118dec <_Timer_server_Body+0x58><== NOT EXECUTED 118e72: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e74: 51 push %ecx 118e75: 57 push %edi if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 118e76: 89 c1 mov %eax,%ecx 118e78: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e7a: 51 push %ecx 118e7b: ff 75 c4 pushl -0x3c(%ebp) 118e7e: 89 45 b8 mov %eax,-0x48(%ebp) 118e81: e8 02 3f 00 00 call 11cd88 <_Watchdog_Adjust_to_chain> 118e86: 83 c4 10 add $0x10,%esp 118e89: 8b 45 b8 mov -0x48(%ebp),%eax 118e8c: eb 85 jmp 118e13 <_Timer_server_Body+0x7f> 118e8e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118e90: 51 push %ecx } else if ( snapshot < last_snapshot ) { /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; 118e91: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118e93: 52 push %edx 118e94: 6a 01 push $0x1 118e96: ff 75 c4 pushl -0x3c(%ebp) 118e99: 89 45 b8 mov %eax,-0x48(%ebp) 118e9c: e8 6f 3e 00 00 call 11cd10 <_Watchdog_Adjust> 118ea1: 83 c4 10 add $0x10,%esp 118ea4: 8b 45 b8 mov -0x48(%ebp),%eax 118ea7: e9 67 ff ff ff jmp 118e13 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118eac: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118eb3: 50 push %eax 118eb4: 9d popf _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 118eb5: 8b 4d b0 mov -0x50(%ebp),%ecx 118eb8: 3b 4d d0 cmp -0x30(%ebp),%ecx 118ebb: 75 23 jne 118ee0 <_Timer_server_Body+0x14c> 118ebd: eb 33 jmp 118ef2 <_Timer_server_Body+0x15e> 118ebf: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 118ec0: 8b 10 mov (%eax),%edx the_chain->first = new_first; 118ec2: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 118ec5: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 118ec8: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118ecf: 51 push %ecx 118ed0: 9d popf /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 118ed1: 83 ec 08 sub $0x8,%esp 118ed4: ff 70 24 pushl 0x24(%eax) 118ed7: ff 70 20 pushl 0x20(%eax) 118eda: ff 50 1c call *0x1c(%eax) } 118edd: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 118ee0: 9c pushf 118ee1: fa cli 118ee2: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118ee3: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 118ee6: 39 45 b0 cmp %eax,-0x50(%ebp) 118ee9: 75 d5 jne 118ec0 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 118eeb: 51 push %ecx 118eec: 9d popf 118eed: e9 f2 fe ff ff jmp 118de4 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118ef2: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118ef6: a1 14 21 14 00 mov 0x142114,%eax 118efb: 40 inc %eax 118efc: a3 14 21 14 00 mov %eax,0x142114 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118f01: 83 ec 08 sub $0x8,%esp 118f04: 6a 08 push $0x8 118f06: ff 33 pushl (%ebx) 118f08: e8 f7 35 00 00 call 11c504 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118f0d: 89 d8 mov %ebx,%eax 118f0f: e8 e0 fd ff ff call 118cf4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118f14: 89 d8 mov %ebx,%eax 118f16: e8 29 fe ff ff call 118d44 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118f1b: e8 f0 2b 00 00 call 11bb10 <_Thread_Enable_dispatch> ts->active = true; 118f20: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118f24: 5a pop %edx 118f25: ff 75 c0 pushl -0x40(%ebp) 118f28: e8 1f 40 00 00 call 11cf4c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118f2d: 58 pop %eax 118f2e: ff 75 bc pushl -0x44(%ebp) 118f31: e8 16 40 00 00 call 11cf4c <_Watchdog_Remove> 118f36: 83 c4 10 add $0x10,%esp 118f39: e9 a6 fe ff ff jmp 118de4 <_Timer_server_Body+0x50> =============================================================================== 00118cf4 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118cf4: 55 push %ebp 118cf5: 89 e5 mov %esp,%ebp 118cf7: 56 push %esi 118cf8: 53 push %ebx 118cf9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118cfb: 8d 70 08 lea 0x8(%eax),%esi 118cfe: 83 ec 0c sub $0xc,%esp 118d01: 56 push %esi 118d02: e8 45 42 00 00 call 11cf4c <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118d07: 9c pushf 118d08: fa cli 118d09: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d0a: 8b 43 30 mov 0x30(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118d0d: 8d 53 34 lea 0x34(%ebx),%edx if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 118d10: 83 c4 10 add $0x10,%esp 118d13: 39 d0 cmp %edx,%eax 118d15: 74 21 je 118d38 <_Timer_server_Reset_interval_system_watchdog+0x44> Watchdog_Interval delta_interval = 118d17: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118d1a: 51 push %ecx 118d1b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118d1c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118d1f: 83 ec 08 sub $0x8,%esp 118d22: 56 push %esi 118d23: 68 e4 21 14 00 push $0x1421e4 118d28: e8 e7 40 00 00 call 11ce14 <_Watchdog_Insert> 118d2d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118d30: 8d 65 f8 lea -0x8(%ebp),%esp 118d33: 5b pop %ebx 118d34: 5e pop %esi 118d35: c9 leave 118d36: c3 ret 118d37: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118d38: 51 push %ecx 118d39: 9d popf } } 118d3a: 8d 65 f8 lea -0x8(%ebp),%esp 118d3d: 5b pop %ebx 118d3e: 5e pop %esi 118d3f: c9 leave 118d40: c3 ret =============================================================================== 00118d44 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118d44: 55 push %ebp 118d45: 89 e5 mov %esp,%ebp 118d47: 56 push %esi 118d48: 53 push %ebx 118d49: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118d4b: 8d 70 40 lea 0x40(%eax),%esi 118d4e: 83 ec 0c sub $0xc,%esp 118d51: 56 push %esi 118d52: e8 f5 41 00 00 call 11cf4c <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118d57: 9c pushf 118d58: fa cli 118d59: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d5a: 8b 43 68 mov 0x68(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118d5d: 8d 53 6c lea 0x6c(%ebx),%edx if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118d60: 83 c4 10 add $0x10,%esp 118d63: 39 d0 cmp %edx,%eax 118d65: 74 21 je 118d88 <_Timer_server_Reset_tod_system_watchdog+0x44> Watchdog_Interval delta_interval = 118d67: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118d6a: 51 push %ecx 118d6b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118d6c: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118d6f: 83 ec 08 sub $0x8,%esp 118d72: 56 push %esi 118d73: 68 d8 21 14 00 push $0x1421d8 118d78: e8 97 40 00 00 call 11ce14 <_Watchdog_Insert> 118d7d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118d80: 8d 65 f8 lea -0x8(%ebp),%esp 118d83: 5b pop %ebx 118d84: 5e pop %esi 118d85: c9 leave 118d86: c3 ret 118d87: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118d88: 51 push %ecx 118d89: 9d popf } } 118d8a: 8d 65 f8 lea -0x8(%ebp),%esp 118d8d: 5b pop %ebx 118d8e: 5e pop %esi 118d8f: c9 leave 118d90: c3 ret =============================================================================== 00118f40 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118f40: 55 push %ebp 118f41: 89 e5 mov %esp,%ebp 118f43: 57 push %edi 118f44: 56 push %esi 118f45: 53 push %ebx 118f46: 83 ec 2c sub $0x2c,%esp 118f49: 8b 5d 08 mov 0x8(%ebp),%ebx 118f4c: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118f4f: 8b 53 78 mov 0x78(%ebx),%edx 118f52: 85 d2 test %edx,%edx 118f54: 74 16 je 118f6c <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 118f56: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118f59: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118f5c: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118f5f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118f62: 5b pop %ebx <== NOT EXECUTED 118f63: 5e pop %esi <== NOT EXECUTED 118f64: 5f pop %edi <== NOT EXECUTED 118f65: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 118f66: e9 69 08 00 00 jmp 1197d4 <_Chain_Append> <== NOT EXECUTED 118f6b: 90 nop <== NOT EXECUTED 118f6c: 8b 15 14 21 14 00 mov 0x142114,%edx 118f72: 42 inc %edx 118f73: 89 15 14 21 14 00 mov %edx,0x142114 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118f79: 8b 50 38 mov 0x38(%eax),%edx 118f7c: 83 fa 01 cmp $0x1,%edx 118f7f: 74 7b je 118ffc <_Timer_server_Schedule_operation_method+0xbc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118f81: 83 fa 03 cmp $0x3,%edx 118f84: 74 0e je 118f94 <_Timer_server_Schedule_operation_method+0x54> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 118f86: 8d 65 f4 lea -0xc(%ebp),%esp 118f89: 5b pop %ebx 118f8a: 5e pop %esi 118f8b: 5f pop %edi 118f8c: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118f8d: e9 7e 2b 00 00 jmp 11bb10 <_Thread_Enable_dispatch> 118f92: 66 90 xchg %ax,%ax <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118f94: 9c pushf 118f95: fa cli 118f96: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118f99: 8b 0d a8 21 14 00 mov 0x1421a8,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118f9f: 8b 53 74 mov 0x74(%ebx),%edx 118fa2: 89 55 d4 mov %edx,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118fa5: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118fa8: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118fab: 39 fa cmp %edi,%edx 118fad: 74 21 je 118fd0 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118faf: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 118fb2: 3b 4d d4 cmp -0x2c(%ebp),%ecx 118fb5: 0f 86 a1 00 00 00 jbe 11905c <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118fbb: 89 ce mov %ecx,%esi 118fbd: 2b 75 d4 sub -0x2c(%ebp),%esi 118fc0: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 118fc3: 39 f7 cmp %esi,%edi 118fc5: 0f 86 9b 00 00 00 jbe 119066 <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 118fcb: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118fcd: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 118fd0: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 118fd3: ff 75 e4 pushl -0x1c(%ebp) 118fd6: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118fd7: 83 ec 08 sub $0x8,%esp 118fda: 83 c0 10 add $0x10,%eax 118fdd: 50 push %eax 118fde: 8d 43 68 lea 0x68(%ebx),%eax 118fe1: 50 push %eax 118fe2: e8 2d 3e 00 00 call 11ce14 <_Watchdog_Insert> if ( !ts->active ) { 118fe7: 8a 43 7c mov 0x7c(%ebx),%al 118fea: 83 c4 10 add $0x10,%esp 118fed: 84 c0 test %al,%al 118fef: 75 95 jne 118f86 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 118ff1: 89 d8 mov %ebx,%eax 118ff3: e8 4c fd ff ff call 118d44 <_Timer_server_Reset_tod_system_watchdog> 118ff8: eb 8c jmp 118f86 <_Timer_server_Schedule_operation_method+0x46> 118ffa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118ffc: 9c pushf 118ffd: fa cli 118ffe: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119001: 8b 0d 64 22 14 00 mov 0x142264,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119007: 8b 7b 3c mov 0x3c(%ebx),%edi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11900a: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11900d: 8d 73 34 lea 0x34(%ebx),%esi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 119010: 39 f2 cmp %esi,%edx 119012: 74 10 je 119024 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119014: 89 ce mov %ecx,%esi 119016: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 119018: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 11901b: 39 fe cmp %edi,%esi 11901d: 73 39 jae 119058 <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 11901f: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119021: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119024: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119027: ff 75 e4 pushl -0x1c(%ebp) 11902a: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11902b: 83 ec 08 sub $0x8,%esp 11902e: 83 c0 10 add $0x10,%eax 119031: 50 push %eax 119032: 8d 43 30 lea 0x30(%ebx),%eax 119035: 50 push %eax 119036: e8 d9 3d 00 00 call 11ce14 <_Watchdog_Insert> if ( !ts->active ) { 11903b: 8a 43 7c mov 0x7c(%ebx),%al 11903e: 83 c4 10 add $0x10,%esp 119041: 84 c0 test %al,%al 119043: 0f 85 3d ff ff ff jne 118f86 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119049: 89 d8 mov %ebx,%eax 11904b: e8 a4 fc ff ff call 118cf4 <_Timer_server_Reset_interval_system_watchdog> 119050: e9 31 ff ff ff jmp 118f86 <_Timer_server_Schedule_operation_method+0x46> 119055: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119058: 31 ff xor %edi,%edi 11905a: eb c5 jmp 119021 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 11905c: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 11905f: 29 cf sub %ecx,%edi 119061: e9 67 ff ff ff jmp 118fcd <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119066: 31 ff xor %edi,%edi <== NOT EXECUTED 119068: e9 60 ff ff ff jmp 118fcd <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010fc24 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fc24: 55 push %ebp 10fc25: 89 e5 mov %esp,%ebp 10fc27: 57 push %edi 10fc28: 56 push %esi 10fc29: 53 push %ebx 10fc2a: 83 ec 2c sub $0x2c,%esp 10fc2d: 8b 45 08 mov 0x8(%ebp),%eax 10fc30: 8b 4d 0c mov 0xc(%ebp),%ecx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fc33: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10fc35: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fc38: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10fc3d: 8b 01 mov (%ecx),%eax 10fc3f: f7 eb imul %ebx 10fc41: 89 45 e0 mov %eax,-0x20(%ebp) 10fc44: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10fc47: 8b 41 04 mov 0x4(%ecx),%eax 10fc4a: 99 cltd 10fc4b: 01 45 e0 add %eax,-0x20(%ebp) 10fc4e: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fc51: 8b 55 e4 mov -0x1c(%ebp),%edx 10fc54: 0b 55 e0 or -0x20(%ebp),%edx 10fc57: 74 73 je 10fccc <_Timespec_Divide+0xa8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fc59: 89 f8 mov %edi,%eax 10fc5b: f7 eb imul %ebx 10fc5d: 89 45 d0 mov %eax,-0x30(%ebp) 10fc60: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fc63: 89 f7 mov %esi,%edi 10fc65: c1 ff 1f sar $0x1f,%edi 10fc68: 01 75 d0 add %esi,-0x30(%ebp) 10fc6b: 11 7d d4 adc %edi,-0x2c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10fc6e: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10fc75: bb a0 86 01 00 mov $0x186a0,%ebx 10fc7a: 8b 45 d0 mov -0x30(%ebp),%eax 10fc7d: f7 e3 mul %ebx 10fc7f: 8d 34 11 lea (%ecx,%edx,1),%esi 10fc82: ff 75 e4 pushl -0x1c(%ebp) 10fc85: ff 75 e0 pushl -0x20(%ebp) 10fc88: 56 push %esi 10fc89: 50 push %eax 10fc8a: e8 cd 09 01 00 call 12065c <__udivdi3> 10fc8f: 83 c4 10 add $0x10,%esp 10fc92: 89 c3 mov %eax,%ebx 10fc94: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fc96: 6a 00 push $0x0 10fc98: 68 e8 03 00 00 push $0x3e8 10fc9d: 52 push %edx 10fc9e: 50 push %eax 10fc9f: e8 b8 09 01 00 call 12065c <__udivdi3> 10fca4: 83 c4 10 add $0x10,%esp 10fca7: 8b 55 10 mov 0x10(%ebp),%edx 10fcaa: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fcac: 6a 00 push $0x0 10fcae: 68 e8 03 00 00 push $0x3e8 10fcb3: 56 push %esi 10fcb4: 53 push %ebx 10fcb5: e8 b2 0a 01 00 call 12076c <__umoddi3> 10fcba: 83 c4 10 add $0x10,%esp 10fcbd: 8b 55 14 mov 0x14(%ebp),%edx 10fcc0: 89 02 mov %eax,(%edx) } 10fcc2: 8d 65 f4 lea -0xc(%ebp),%esp 10fcc5: 5b pop %ebx 10fcc6: 5e pop %esi 10fcc7: 5f pop %edi 10fcc8: c9 leave 10fcc9: c3 ret 10fcca: 66 90 xchg %ax,%ax <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10fccc: 8b 45 10 mov 0x10(%ebp),%eax 10fccf: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fcd5: 8b 55 14 mov 0x14(%ebp),%edx 10fcd8: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fcde: 8d 65 f4 lea -0xc(%ebp),%esp 10fce1: 5b pop %ebx 10fce2: 5e pop %esi 10fce3: 5f pop %edi 10fce4: c9 leave 10fce5: c3 ret =============================================================================== 0011f6f0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 11f6f0: 55 push %ebp 11f6f1: 89 e5 mov %esp,%ebp 11f6f3: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 11f6f6: 85 c0 test %eax,%eax 11f6f8: 74 1a je 11f714 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 11f6fa: 8b 10 mov (%eax),%edx 11f6fc: 85 d2 test %edx,%edx 11f6fe: 78 14 js 11f714 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 11f700: 8b 40 04 mov 0x4(%eax),%eax 11f703: 85 c0 test %eax,%eax 11f705: 78 0d js 11f714 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 11f707: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 11f70c: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11f70f: c9 leave 11f710: c3 ret 11f711: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 11f714: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11f716: c9 leave 11f717: c3 ret =============================================================================== 0010e344 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10e344: 55 push %ebp 10e345: 89 e5 mov %esp,%ebp 10e347: 56 push %esi 10e348: 53 push %ebx 10e349: 8b 5d 08 mov 0x8(%ebp),%ebx 10e34c: 8b 75 0c mov 0xc(%ebp),%esi 10e34f: 8b 45 10 mov 0x10(%ebp),%eax if (end->tv_nsec < start->tv_nsec) { 10e352: 8b 4e 04 mov 0x4(%esi),%ecx 10e355: 8b 53 04 mov 0x4(%ebx),%edx 10e358: 39 d1 cmp %edx,%ecx 10e35a: 7c 10 jl 10e36c <_Timespec_Subtract+0x28> result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 10e35c: 8b 36 mov (%esi),%esi 10e35e: 2b 33 sub (%ebx),%esi 10e360: 89 30 mov %esi,(%eax) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10e362: 29 d1 sub %edx,%ecx 10e364: 89 48 04 mov %ecx,0x4(%eax) } } 10e367: 5b pop %ebx 10e368: 5e pop %esi 10e369: c9 leave 10e36a: c3 ret 10e36b: 90 nop <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 10e36c: 8b 36 mov (%esi),%esi 10e36e: 4e dec %esi 10e36f: 2b 33 sub (%ebx),%esi 10e371: 89 30 mov %esi,(%eax) result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 10e373: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10e379: 29 d1 sub %edx,%ecx 10e37b: 89 48 04 mov %ecx,0x4(%eax) } else { result->tv_sec = end->tv_sec - start->tv_sec; result->tv_nsec = end->tv_nsec - start->tv_nsec; } } 10e37e: 5b pop %ebx 10e37f: 5e pop %esi 10e380: c9 leave 10e381: c3 ret =============================================================================== 0011192c <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 11192c: 55 push %ebp 11192d: 89 e5 mov %esp,%ebp 11192f: 56 push %esi 111930: 53 push %ebx 111931: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 111934: 8b 33 mov (%ebx),%esi 111936: 85 f6 test %esi,%esi 111938: 75 07 jne 111941 <_Timespec_To_ticks+0x15> 11193a: 8b 43 04 mov 0x4(%ebx),%eax 11193d: 85 c0 test %eax,%eax 11193f: 74 37 je 111978 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 111941: e8 76 17 00 00 call 1130bc 111946: 89 c1 mov %eax,%ecx 111948: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 11194b: a1 2c 22 12 00 mov 0x12222c,%eax 111950: 8d 04 80 lea (%eax,%eax,4),%eax 111953: 8d 04 80 lea (%eax,%eax,4),%eax 111956: 8d 34 80 lea (%eax,%eax,4),%esi 111959: c1 e6 03 shl $0x3,%esi 11195c: 8b 43 04 mov 0x4(%ebx),%eax 11195f: 31 d2 xor %edx,%edx 111961: f7 f6 div %esi if (ticks) 111963: 01 c8 add %ecx,%eax 111965: 74 05 je 11196c <_Timespec_To_ticks+0x40> return ticks; return 1; } 111967: 5b pop %ebx 111968: 5e pop %esi 111969: c9 leave 11196a: c3 ret 11196b: 90 nop <== NOT EXECUTED ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 11196c: b8 01 00 00 00 mov $0x1,%eax } 111971: 5b pop %ebx 111972: 5e pop %esi 111973: c9 leave 111974: c3 ret 111975: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 111978: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 11197a: 5b pop %ebx 11197b: 5e pop %esi 11197c: c9 leave 11197d: c3 ret =============================================================================== 0010e4c0 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e4c0: 55 push %ebp 10e4c1: 89 e5 mov %esp,%ebp 10e4c3: 57 push %edi 10e4c4: 56 push %esi 10e4c5: 53 push %ebx 10e4c6: 83 ec 1c sub $0x1c,%esp 10e4c9: 8b 75 08 mov 0x8(%ebp),%esi 10e4cc: 8b 7d 10 mov 0x10(%ebp),%edi 10e4cf: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4d2: 8b 1d 14 67 12 00 mov 0x126714,%ebx 10e4d8: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e4de: 74 25 je 10e505 <_User_extensions_Fatal+0x45><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e4e0: 0f b6 c0 movzbl %al,%eax 10e4e3: 89 45 e4 mov %eax,-0x1c(%ebp) 10e4e6: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 10e4e8: 8b 43 30 mov 0x30(%ebx),%eax 10e4eb: 85 c0 test %eax,%eax 10e4ed: 74 0b je 10e4fa <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e4ef: 52 push %edx 10e4f0: 57 push %edi 10e4f1: ff 75 e4 pushl -0x1c(%ebp) 10e4f4: 56 push %esi 10e4f5: ff d0 call *%eax 10e4f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e4fa: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4fd: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e503: 75 e3 jne 10e4e8 <_User_extensions_Fatal+0x28><== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e505: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e508: 5b pop %ebx <== NOT EXECUTED 10e509: 5e pop %esi <== NOT EXECUTED 10e50a: 5f pop %edi <== NOT EXECUTED 10e50b: c9 leave <== NOT EXECUTED 10e50c: c3 ret <== NOT EXECUTED =============================================================================== 0010e384 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e384: 55 push %ebp 10e385: 89 e5 mov %esp,%ebp 10e387: 57 push %edi 10e388: 56 push %esi 10e389: 53 push %ebx 10e38a: 83 ec 1c sub $0x1c,%esp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 10e38d: a1 58 22 12 00 mov 0x122258,%eax 10e392: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e395: 8b 35 5c 22 12 00 mov 0x12225c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e39b: c7 05 0c 67 12 00 10 movl $0x126710,0x12670c 10e3a2: 67 12 00 the_chain->permanent_null = NULL; 10e3a5: c7 05 10 67 12 00 00 movl $0x0,0x126710 10e3ac: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e3af: c7 05 14 67 12 00 0c movl $0x12670c,0x126714 10e3b6: 67 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e3b9: c7 05 d8 64 12 00 dc movl $0x1264dc,0x1264d8 10e3c0: 64 12 00 the_chain->permanent_null = NULL; 10e3c3: c7 05 dc 64 12 00 00 movl $0x0,0x1264dc 10e3ca: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e3cd: c7 05 e0 64 12 00 d8 movl $0x1264d8,0x1264e0 10e3d4: 64 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e3d7: 85 f6 test %esi,%esi 10e3d9: 74 64 je 10e43f <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e3db: 89 c2 mov %eax,%edx 10e3dd: 8d 04 40 lea (%eax,%eax,2),%eax 10e3e0: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e3e3: c1 e1 02 shl $0x2,%ecx 10e3e6: 83 ec 0c sub $0xc,%esp 10e3e9: 51 push %ecx 10e3ea: 89 4d d8 mov %ecx,-0x28(%ebp) 10e3ed: e8 c6 04 00 00 call 10e8b8 <_Workspace_Allocate_or_fatal_error> 10e3f2: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e3f4: 31 c0 xor %eax,%eax 10e3f6: 8b 4d d8 mov -0x28(%ebp),%ecx 10e3f9: 89 df mov %ebx,%edi 10e3fb: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e3fd: 83 c4 10 add $0x10,%esp 10e400: 8b 45 dc mov -0x24(%ebp),%eax 10e403: 85 c0 test %eax,%eax 10e405: 74 38 je 10e43f <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e407: 89 75 e4 mov %esi,-0x1c(%ebp) 10e40a: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e411: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10e414: 8d 7b 14 lea 0x14(%ebx),%edi 10e417: 8b 75 e4 mov -0x1c(%ebp),%esi 10e41a: b9 08 00 00 00 mov $0x8,%ecx 10e41f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e421: 83 ec 0c sub $0xc,%esp 10e424: 53 push %ebx 10e425: e8 56 35 00 00 call 111980 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e42a: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e42d: ff 45 e0 incl -0x20(%ebp) 10e430: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e434: 83 c4 10 add $0x10,%esp 10e437: 8b 45 e0 mov -0x20(%ebp),%eax 10e43a: 39 45 dc cmp %eax,-0x24(%ebp) 10e43d: 77 d5 ja 10e414 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e43f: 8d 65 f4 lea -0xc(%ebp),%esp 10e442: 5b pop %ebx 10e443: 5e pop %esi 10e444: 5f pop %edi 10e445: c9 leave 10e446: c3 ret =============================================================================== 0010f9fc <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10f9fc: 55 push %ebp 10f9fd: 89 e5 mov %esp,%ebp 10f9ff: 53 push %ebx 10fa00: 83 ec 10 sub $0x10,%esp 10fa03: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10fa06: 53 push %ebx 10fa07: e8 5c d9 ff ff call 10d368 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10fa0c: 83 c4 10 add $0x10,%esp 10fa0f: 8b 43 24 mov 0x24(%ebx),%eax 10fa12: 85 c0 test %eax,%eax 10fa14: 74 12 je 10fa28 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10fa16: 83 c3 08 add $0x8,%ebx 10fa19: 89 5d 08 mov %ebx,0x8(%ebp) } 10fa1c: 8b 5d fc mov -0x4(%ebp),%ebx 10fa1f: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10fa20: e9 43 d9 ff ff jmp 10d368 <_Chain_Extract> 10fa25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 10fa28: 8b 5d fc mov -0x4(%ebp),%ebx 10fa2b: c9 leave 10fa2c: c3 ret =============================================================================== 0010e448 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e448: 55 push %ebp 10e449: 89 e5 mov %esp,%ebp 10e44b: 56 push %esi 10e44c: 53 push %ebx 10e44d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e450: 8b 1d 0c 67 12 00 mov 0x12670c,%ebx 10e456: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e45c: 74 1c je 10e47a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e45e: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 10e460: 8b 43 28 mov 0x28(%ebx),%eax 10e463: 85 c0 test %eax,%eax 10e465: 74 09 je 10e470 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e467: 83 ec 0c sub $0xc,%esp 10e46a: 56 push %esi 10e46b: ff d0 call *%eax 10e46d: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e470: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e472: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e478: 75 e6 jne 10e460 <_User_extensions_Thread_begin+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10e47a: 8d 65 f8 lea -0x8(%ebp),%esp 10e47d: 5b pop %ebx 10e47e: 5e pop %esi 10e47f: c9 leave 10e480: c3 ret =============================================================================== 0010e510 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e510: 55 push %ebp 10e511: 89 e5 mov %esp,%ebp 10e513: 56 push %esi 10e514: 53 push %ebx 10e515: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e518: 8b 1d 0c 67 12 00 mov 0x12670c,%ebx 10e51e: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e524: 74 26 je 10e54c <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e526: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10e528: 8b 43 14 mov 0x14(%ebx),%eax 10e52b: 85 c0 test %eax,%eax 10e52d: 74 13 je 10e542 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e52f: 83 ec 08 sub $0x8,%esp 10e532: 56 push %esi 10e533: ff 35 98 6a 12 00 pushl 0x126a98 10e539: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e53b: 83 c4 10 add $0x10,%esp 10e53e: 84 c0 test %al,%al 10e540: 74 16 je 10e558 <_User_extensions_Thread_create+0x48> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e542: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e544: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e54a: 75 dc jne 10e528 <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e54c: b0 01 mov $0x1,%al } 10e54e: 8d 65 f8 lea -0x8(%ebp),%esp 10e551: 5b pop %ebx 10e552: 5e pop %esi 10e553: c9 leave 10e554: c3 ret 10e555: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e558: 31 c0 xor %eax,%eax } } return true; } 10e55a: 8d 65 f8 lea -0x8(%ebp),%esp 10e55d: 5b pop %ebx 10e55e: 5e pop %esi 10e55f: c9 leave 10e560: c3 ret =============================================================================== 0010e564 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e564: 55 push %ebp 10e565: 89 e5 mov %esp,%ebp 10e567: 56 push %esi 10e568: 53 push %ebx 10e569: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e56c: 8b 1d 14 67 12 00 mov 0x126714,%ebx 10e572: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e578: 74 23 je 10e59d <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e57a: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10e57c: 8b 43 20 mov 0x20(%ebx),%eax 10e57f: 85 c0 test %eax,%eax 10e581: 74 0f je 10e592 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e583: 83 ec 08 sub $0x8,%esp 10e586: 56 push %esi 10e587: ff 35 98 6a 12 00 pushl 0x126a98 10e58d: ff d0 call *%eax 10e58f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e592: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e595: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e59b: 75 df jne 10e57c <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e59d: 8d 65 f8 lea -0x8(%ebp),%esp 10e5a0: 5b pop %ebx 10e5a1: 5e pop %esi 10e5a2: c9 leave 10e5a3: c3 ret =============================================================================== 0010e484 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e484: 55 push %ebp 10e485: 89 e5 mov %esp,%ebp 10e487: 56 push %esi 10e488: 53 push %ebx 10e489: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e48c: 8b 1d 14 67 12 00 mov 0x126714,%ebx 10e492: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e498: 74 1d je 10e4b7 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e49a: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10e49c: 8b 43 2c mov 0x2c(%ebx),%eax 10e49f: 85 c0 test %eax,%eax 10e4a1: 74 09 je 10e4ac <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e4a3: 83 ec 0c sub $0xc,%esp 10e4a6: 56 push %esi 10e4a7: ff d0 call *%eax 10e4a9: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e4ac: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4af: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10e4b5: 75 e5 jne 10e49c <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10e4b7: 8d 65 f8 lea -0x8(%ebp),%esp 10e4ba: 5b pop %ebx 10e4bb: 5e pop %esi 10e4bc: c9 leave 10e4bd: c3 ret =============================================================================== 0010f164 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f164: 55 push %ebp 10f165: 89 e5 mov %esp,%ebp 10f167: 56 push %esi 10f168: 53 push %ebx 10f169: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f16c: 8b 1d ac 99 12 00 mov 0x1299ac,%ebx 10f172: 81 fb b0 99 12 00 cmp $0x1299b0,%ebx 10f178: 74 22 je 10f19c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f17a: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 10f17c: 8b 43 1c mov 0x1c(%ebx),%eax 10f17f: 85 c0 test %eax,%eax 10f181: 74 0f je 10f192 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f183: 83 ec 08 sub $0x8,%esp 10f186: 56 push %esi 10f187: ff 35 38 9d 12 00 pushl 0x129d38 10f18d: ff d0 call *%eax 10f18f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10f192: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f194: 81 fb b0 99 12 00 cmp $0x1299b0,%ebx 10f19a: 75 e0 jne 10f17c <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f19c: 8d 65 f8 lea -0x8(%ebp),%esp 10f19f: 5b pop %ebx 10f1a0: 5e pop %esi 10f1a1: c9 leave 10f1a2: c3 ret =============================================================================== 0010e5a4 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e5a4: 55 push %ebp 10e5a5: 89 e5 mov %esp,%ebp 10e5a7: 56 push %esi 10e5a8: 53 push %ebx 10e5a9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e5ac: 8b 1d 0c 67 12 00 mov 0x12670c,%ebx 10e5b2: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e5b8: 74 22 je 10e5dc <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e5ba: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 10e5bc: 8b 43 18 mov 0x18(%ebx),%eax 10e5bf: 85 c0 test %eax,%eax 10e5c1: 74 0f je 10e5d2 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e5c3: 83 ec 08 sub $0x8,%esp 10e5c6: 56 push %esi 10e5c7: ff 35 98 6a 12 00 pushl 0x126a98 10e5cd: ff d0 call *%eax 10e5cf: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e5d2: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e5d4: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10e5da: 75 e0 jne 10e5bc <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e5dc: 8d 65 f8 lea -0x8(%ebp),%esp 10e5df: 5b pop %ebx 10e5e0: 5e pop %esi 10e5e1: c9 leave 10e5e2: c3 ret =============================================================================== 0010e5e4 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e5e4: 55 push %ebp 10e5e5: 89 e5 mov %esp,%ebp 10e5e7: 57 push %edi 10e5e8: 56 push %esi 10e5e9: 53 push %ebx 10e5ea: 83 ec 0c sub $0xc,%esp 10e5ed: 8b 7d 08 mov 0x8(%ebp),%edi 10e5f0: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e5f3: 8b 1d d8 64 12 00 mov 0x1264d8,%ebx 10e5f9: 81 fb dc 64 12 00 cmp $0x1264dc,%ebx 10e5ff: 74 18 je 10e619 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e601: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10e604: 83 ec 08 sub $0x8,%esp 10e607: 56 push %esi 10e608: 57 push %edi 10e609: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10e60c: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e60e: 83 c4 10 add $0x10,%esp 10e611: 81 fb dc 64 12 00 cmp $0x1264dc,%ebx 10e617: 75 eb jne 10e604 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e619: 8d 65 f4 lea -0xc(%ebp),%esp 10e61c: 5b pop %ebx 10e61d: 5e pop %esi 10e61e: 5f pop %edi 10e61f: c9 leave 10e620: c3 ret =============================================================================== 00110004 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 110004: 55 push %ebp 110005: 89 e5 mov %esp,%ebp 110007: 57 push %edi 110008: 56 push %esi 110009: 53 push %ebx 11000a: 83 ec 1c sub $0x1c,%esp 11000d: 8b 75 08 mov 0x8(%ebp),%esi 110010: 8b 4d 0c mov 0xc(%ebp),%ecx 110013: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110016: 9c pushf 110017: fa cli 110018: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110019: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11001b: 8d 7e 04 lea 0x4(%esi),%edi 11001e: 89 7d e4 mov %edi,-0x1c(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 110021: 39 fa cmp %edi,%edx 110023: 74 3d je 110062 <_Watchdog_Adjust+0x5e> switch ( direction ) { 110025: 85 c9 test %ecx,%ecx 110027: 75 43 jne 11006c <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110029: 85 db test %ebx,%ebx 11002b: 74 35 je 110062 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 11002d: 8b 7a 10 mov 0x10(%edx),%edi 110030: 39 fb cmp %edi,%ebx 110032: 73 0f jae 110043 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 110034: eb 3e jmp 110074 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 110036: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110038: 29 fb sub %edi,%ebx 11003a: 74 26 je 110062 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 11003c: 8b 7a 10 mov 0x10(%edx),%edi 11003f: 39 df cmp %ebx,%edi 110041: 77 31 ja 110074 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 110043: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 11004a: 50 push %eax 11004b: 9d popf _Watchdog_Tickle( header ); 11004c: 83 ec 0c sub $0xc,%esp 11004f: 56 push %esi 110050: e8 cb 01 00 00 call 110220 <_Watchdog_Tickle> _ISR_Disable( level ); 110055: 9c pushf 110056: fa cli 110057: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110058: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 11005a: 83 c4 10 add $0x10,%esp 11005d: 39 55 e4 cmp %edx,-0x1c(%ebp) 110060: 75 d6 jne 110038 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 110062: 50 push %eax 110063: 9d popf } 110064: 8d 65 f4 lea -0xc(%ebp),%esp 110067: 5b pop %ebx 110068: 5e pop %esi 110069: 5f pop %edi 11006a: c9 leave 11006b: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 11006c: 49 dec %ecx 11006d: 75 f3 jne 110062 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 11006f: 01 5a 10 add %ebx,0x10(%edx) break; 110072: eb ee jmp 110062 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 110074: 29 df sub %ebx,%edi 110076: 89 7a 10 mov %edi,0x10(%edx) break; 110079: eb e7 jmp 110062 <_Watchdog_Adjust+0x5e> =============================================================================== 0010e624 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e624: 55 push %ebp 10e625: 89 e5 mov %esp,%ebp 10e627: 57 push %edi 10e628: 56 push %esi 10e629: 53 push %ebx 10e62a: 83 ec 04 sub $0x4,%esp 10e62d: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10e630: 8b 3d 94 6a 12 00 mov 0x126a94,%edi _ISR_Disable( level ); 10e636: 9c pushf 10e637: fa cli 10e638: 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 ) { 10e63b: 8b 43 08 mov 0x8(%ebx),%eax 10e63e: 85 c0 test %eax,%eax 10e640: 0f 85 9e 00 00 00 jne 10e6e4 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e646: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e64d: a1 20 66 12 00 mov 0x126620,%eax 10e652: 40 inc %eax 10e653: a3 20 66 12 00 mov %eax,0x126620 restart: delta_interval = the_watchdog->initial; 10e658: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10e65b: 8b 4d 08 mov 0x8(%ebp),%ecx 10e65e: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e660: 85 c0 test %eax,%eax 10e662: 74 5d je 10e6c1 <_Watchdog_Insert+0x9d> 10e664: 8b 32 mov (%edx),%esi 10e666: 85 f6 test %esi,%esi 10e668: 74 57 je 10e6c1 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e66a: 8b 4a 10 mov 0x10(%edx),%ecx 10e66d: 39 c8 cmp %ecx,%eax 10e66f: 73 22 jae 10e693 <_Watchdog_Insert+0x6f> 10e671: eb 49 jmp 10e6bc <_Watchdog_Insert+0x98> 10e673: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e674: 8b 35 88 65 12 00 mov 0x126588,%esi 10e67a: 39 f7 cmp %esi,%edi 10e67c: 72 72 jb 10e6f0 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e67e: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e680: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e682: 85 c0 test %eax,%eax 10e684: 74 3b je 10e6c1 <_Watchdog_Insert+0x9d> 10e686: 8b 0a mov (%edx),%ecx 10e688: 85 c9 test %ecx,%ecx 10e68a: 74 35 je 10e6c1 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e68c: 8b 4a 10 mov 0x10(%edx),%ecx 10e68f: 39 c1 cmp %eax,%ecx 10e691: 77 29 ja 10e6bc <_Watchdog_Insert+0x98> * 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 ); 10e693: ff 75 f0 pushl -0x10(%ebp) 10e696: 9d popf 10e697: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e698: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e69c: 74 d6 je 10e674 <_Watchdog_Insert+0x50> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10e69e: 89 3d 88 65 12 00 mov %edi,0x126588 _Watchdog_Sync_count--; 10e6a4: a1 20 66 12 00 mov 0x126620,%eax 10e6a9: 48 dec %eax 10e6aa: a3 20 66 12 00 mov %eax,0x126620 _ISR_Enable( level ); 10e6af: ff 75 f0 pushl -0x10(%ebp) 10e6b2: 9d popf } 10e6b3: 58 pop %eax 10e6b4: 5b pop %ebx 10e6b5: 5e pop %esi 10e6b6: 5f pop %edi 10e6b7: c9 leave 10e6b8: c3 ret 10e6b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10e6bc: 29 c1 sub %eax,%ecx 10e6be: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e6c1: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e6c8: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e6cb: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e6ce: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e6d1: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e6d3: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e6d5: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e6d7: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e6da: a1 24 66 12 00 mov 0x126624,%eax 10e6df: 89 43 14 mov %eax,0x14(%ebx) 10e6e2: eb ba jmp 10e69e <_Watchdog_Insert+0x7a> * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10e6e4: ff 75 f0 pushl -0x10(%ebp) 10e6e7: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e6e8: 58 pop %eax 10e6e9: 5b pop %ebx 10e6ea: 5e pop %esi 10e6eb: 5f pop %edi 10e6ec: c9 leave 10e6ed: c3 ret 10e6ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10e6f0: 89 3d 88 65 12 00 mov %edi,0x126588 goto restart; 10e6f6: e9 5d ff ff ff jmp 10e658 <_Watchdog_Insert+0x34> =============================================================================== 0010e75c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e75c: 55 push %ebp 10e75d: 89 e5 mov %esp,%ebp 10e75f: 56 push %esi 10e760: 53 push %ebx 10e761: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e764: 9c pushf 10e765: fa cli 10e766: 59 pop %ecx previous_state = the_watchdog->state; 10e767: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e76a: 83 f8 01 cmp $0x1,%eax 10e76d: 74 4d je 10e7bc <_Watchdog_Remove+0x60> 10e76f: 73 0f jae 10e780 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e771: 8b 1d 24 66 12 00 mov 0x126624,%ebx 10e777: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e77a: 51 push %ecx 10e77b: 9d popf return( previous_state ); } 10e77c: 5b pop %ebx 10e77d: 5e pop %esi 10e77e: c9 leave 10e77f: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e780: 83 f8 03 cmp $0x3,%eax 10e783: 77 ec ja 10e771 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e785: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 10e78c: 8b 1a mov (%edx),%ebx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e78e: 8b 33 mov (%ebx),%esi 10e790: 85 f6 test %esi,%esi 10e792: 74 06 je 10e79a <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e794: 8b 72 10 mov 0x10(%edx),%esi 10e797: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e79a: 8b 35 20 66 12 00 mov 0x126620,%esi 10e7a0: 85 f6 test %esi,%esi 10e7a2: 74 0c je 10e7b0 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e7a4: 8b 35 94 6a 12 00 mov 0x126a94,%esi 10e7aa: 89 35 88 65 12 00 mov %esi,0x126588 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e7b0: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e7b3: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e7b6: 89 1e mov %ebx,(%esi) 10e7b8: eb b7 jmp 10e771 <_Watchdog_Remove+0x15> 10e7ba: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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; 10e7bc: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e7c3: eb ac jmp 10e771 <_Watchdog_Remove+0x15> =============================================================================== 0010fbf0 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fbf0: 55 push %ebp 10fbf1: 89 e5 mov %esp,%ebp 10fbf3: 57 push %edi 10fbf4: 56 push %esi 10fbf5: 53 push %ebx 10fbf6: 83 ec 2c sub $0x2c,%esp 10fbf9: 8b 55 08 mov 0x8(%ebp),%edx 10fbfc: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fbff: 8b 78 24 mov 0x24(%eax),%edi 10fc02: 8b 70 20 mov 0x20(%eax),%esi 10fc05: 8b 58 1c mov 0x1c(%eax),%ebx 10fc08: 8b 48 0c mov 0xc(%eax),%ecx 10fc0b: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fc0e: 8b 48 10 mov 0x10(%eax),%ecx 10fc11: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fc14: 85 d2 test %edx,%edx 10fc16: 74 2c je 10fc44 <_Watchdog_Report+0x54> 10fc18: b9 03 2c 12 00 mov $0x122c03,%ecx 10fc1d: 83 ec 0c sub $0xc,%esp 10fc20: 57 push %edi 10fc21: 56 push %esi 10fc22: 53 push %ebx 10fc23: 50 push %eax 10fc24: ff 75 d4 pushl -0x2c(%ebp) 10fc27: ff 75 e4 pushl -0x1c(%ebp) 10fc2a: 51 push %ecx 10fc2b: 52 push %edx 10fc2c: 68 66 36 12 00 push $0x123666 10fc31: e8 2e 9e ff ff call 109a64 10fc36: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fc39: 8d 65 f4 lea -0xc(%ebp),%esp 10fc3c: 5b pop %ebx 10fc3d: 5e pop %esi 10fc3e: 5f pop %edi 10fc3f: c9 leave 10fc40: c3 ret 10fc41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fc44: b9 c9 34 12 00 mov $0x1234c9,%ecx 10fc49: 89 ca mov %ecx,%edx 10fc4b: eb d0 jmp 10fc1d <_Watchdog_Report+0x2d> =============================================================================== 0010fb80 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10fb80: 55 push %ebp 10fb81: 89 e5 mov %esp,%ebp 10fb83: 57 push %edi 10fb84: 56 push %esi 10fb85: 53 push %ebx 10fb86: 83 ec 20 sub $0x20,%esp 10fb89: 8b 7d 08 mov 0x8(%ebp),%edi 10fb8c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fb8f: 9c pushf 10fb90: fa cli 10fb91: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fb94: 56 push %esi 10fb95: 57 push %edi 10fb96: 68 30 36 12 00 push $0x123630 10fb9b: e8 c4 9e ff ff call 109a64 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fba0: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fba2: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10fba5: 83 c4 10 add $0x10,%esp 10fba8: 39 f3 cmp %esi,%ebx 10fbaa: 74 31 je 10fbdd <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fbac: 83 ec 08 sub $0x8,%esp 10fbaf: 53 push %ebx 10fbb0: 6a 00 push $0x0 10fbb2: e8 39 00 00 00 call 10fbf0 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 10fbb7: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 10fbb9: 83 c4 10 add $0x10,%esp 10fbbc: 39 f3 cmp %esi,%ebx 10fbbe: 75 ec jne 10fbac <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10fbc0: 83 ec 08 sub $0x8,%esp 10fbc3: 57 push %edi 10fbc4: 68 47 36 12 00 push $0x123647 10fbc9: e8 96 9e ff ff call 109a64 10fbce: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fbd1: ff 75 e4 pushl -0x1c(%ebp) 10fbd4: 9d popf } 10fbd5: 8d 65 f4 lea -0xc(%ebp),%esp 10fbd8: 5b pop %ebx 10fbd9: 5e pop %esi 10fbda: 5f pop %edi 10fbdb: c9 leave 10fbdc: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fbdd: 83 ec 0c sub $0xc,%esp 10fbe0: 68 56 36 12 00 push $0x123656 10fbe5: e8 7a 9e ff ff call 109a64 10fbea: 83 c4 10 add $0x10,%esp 10fbed: eb e2 jmp 10fbd1 <_Watchdog_Report_chain+0x51> =============================================================================== 0010e7c8 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e7c8: 55 push %ebp 10e7c9: 89 e5 mov %esp,%ebp 10e7cb: 57 push %edi 10e7cc: 56 push %esi 10e7cd: 53 push %ebx 10e7ce: 83 ec 1c sub $0x1c,%esp 10e7d1: 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 ); 10e7d4: 9c pushf 10e7d5: fa cli 10e7d6: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e7d7: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e7d9: 8d 47 04 lea 0x4(%edi),%eax 10e7dc: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e7df: 39 c3 cmp %eax,%ebx 10e7e1: 74 11 je 10e7f4 <_Watchdog_Tickle+0x2c> * 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) { 10e7e3: 8b 43 10 mov 0x10(%ebx),%eax 10e7e6: 85 c0 test %eax,%eax 10e7e8: 74 34 je 10e81e <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e7ea: 48 dec %eax 10e7eb: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e7ee: 85 c0 test %eax,%eax 10e7f0: 74 2c je 10e81e <_Watchdog_Tickle+0x56> 10e7f2: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e7f4: 56 push %esi 10e7f5: 9d popf } 10e7f6: 8d 65 f4 lea -0xc(%ebp),%esp 10e7f9: 5b pop %ebx 10e7fa: 5e pop %esi 10e7fb: 5f pop %edi 10e7fc: c9 leave 10e7fd: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e7fe: 83 ec 08 sub $0x8,%esp 10e801: ff 73 24 pushl 0x24(%ebx) 10e804: ff 73 20 pushl 0x20(%ebx) 10e807: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10e80a: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e80d: 9c pushf 10e80e: fa cli 10e80f: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10e810: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e812: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e815: 74 dd je 10e7f4 <_Watchdog_Tickle+0x2c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10e817: 8b 43 10 mov 0x10(%ebx),%eax 10e81a: 85 c0 test %eax,%eax 10e81c: 75 d6 jne 10e7f4 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e81e: 83 ec 0c sub $0xc,%esp 10e821: 53 push %ebx 10e822: e8 35 ff ff ff call 10e75c <_Watchdog_Remove> _ISR_Enable( level ); 10e827: 56 push %esi 10e828: 9d popf switch( watchdog_state ) { 10e829: 83 c4 10 add $0x10,%esp 10e82c: 83 f8 02 cmp $0x2,%eax 10e82f: 75 dc jne 10e80d <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10e831: eb cb jmp 10e7fe <_Watchdog_Tickle+0x36> =============================================================================== 0010e834 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e834: 55 push %ebp 10e835: 89 e5 mov %esp,%ebp 10e837: 57 push %edi 10e838: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e839: 8b 1d 20 22 12 00 mov 0x122220,%ebx uintptr_t size = Configuration.work_space_size; 10e83f: 8b 15 24 22 12 00 mov 0x122224,%edx if ( Configuration.do_zero_of_workspace ) 10e845: 80 3d 48 22 12 00 00 cmpb $0x0,0x122248 10e84c: 75 1e jne 10e86c <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e84e: 6a 04 push $0x4 10e850: 52 push %edx 10e851: 53 push %ebx 10e852: 68 00 65 12 00 push $0x126500 10e857: e8 6c de ff ff call 10c6c8 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e85c: 83 c4 10 add $0x10,%esp 10e85f: 85 c0 test %eax,%eax 10e861: 74 13 je 10e876 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e863: 8d 65 f8 lea -0x8(%ebp),%esp 10e866: 5b pop %ebx 10e867: 5f pop %edi 10e868: c9 leave 10e869: c3 ret 10e86a: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 10e86c: 31 c0 xor %eax,%eax 10e86e: 89 df mov %ebx,%edi 10e870: 89 d1 mov %edx,%ecx 10e872: f3 aa rep stos %al,%es:(%edi) 10e874: eb d8 jmp 10e84e <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e876: 50 push %eax 10e877: 6a 02 push $0x2 10e879: 6a 01 push $0x1 10e87b: 6a 00 push $0x0 10e87d: e8 4e e0 ff ff call 10c8d0 <_Internal_error_Occurred> =============================================================================== 0010b5b4 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10b5b4: 55 push %ebp 10b5b5: 89 e5 mov %esp,%ebp 10b5b7: 57 push %edi 10b5b8: 56 push %esi 10b5b9: 53 push %ebx 10b5ba: 83 ec 1c sub $0x1c,%esp 10b5bd: 8b 5d 08 mov 0x8(%ebp),%ebx 10b5c0: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10b5c3: 85 db test %ebx,%ebx 10b5c5: 0f 84 f1 00 00 00 je 10b6bc rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10b5cb: 8b 53 04 mov 0x4(%ebx),%edx 10b5ce: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10b5d4: 0f 87 e2 00 00 00 ja 10b6bc rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10b5da: 85 f6 test %esi,%esi 10b5dc: 74 10 je 10b5ee olddelta->tv_sec = 0; 10b5de: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10b5e4: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10b5eb: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10b5ee: 8b 03 mov (%ebx),%eax 10b5f0: 8d 04 80 lea (%eax,%eax,4),%eax 10b5f3: 8d 04 80 lea (%eax,%eax,4),%eax 10b5f6: 8d 04 80 lea (%eax,%eax,4),%eax 10b5f9: 8d 04 80 lea (%eax,%eax,4),%eax 10b5fc: 8d 04 80 lea (%eax,%eax,4),%eax 10b5ff: 8d 04 80 lea (%eax,%eax,4),%eax 10b602: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; 10b605: 8d 04 02 lea (%edx,%eax,1),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10b608: 3b 05 ac 46 12 00 cmp 0x1246ac,%eax 10b60e: 73 0c jae 10b61c /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; 10b610: 31 c0 xor %eax,%eax } 10b612: 8d 65 f4 lea -0xc(%ebp),%esp 10b615: 5b pop %ebx 10b616: 5e pop %esi 10b617: 5f pop %edi 10b618: c9 leave 10b619: c3 ret 10b61a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b61c: a1 b4 8a 12 00 mov 0x128ab4,%eax 10b621: 40 inc %eax 10b622: a3 b4 8a 12 00 mov %eax,0x128ab4 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10b627: 83 ec 0c sub $0xc,%esp 10b62a: 8d 7d e0 lea -0x20(%ebp),%edi 10b62d: 57 push %edi 10b62e: e8 79 17 00 00 call 10cdac <_TOD_Get> ts.tv_sec += delta->tv_sec; 10b633: 8b 03 mov (%ebx),%eax 10b635: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10b638: 8b 43 04 mov 0x4(%ebx),%eax 10b63b: 8d 04 80 lea (%eax,%eax,4),%eax 10b63e: 8d 04 80 lea (%eax,%eax,4),%eax 10b641: 8d 04 80 lea (%eax,%eax,4),%eax 10b644: c1 e0 03 shl $0x3,%eax 10b647: 03 45 e4 add -0x1c(%ebp),%eax 10b64a: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b64d: 83 c4 10 add $0x10,%esp 10b650: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b655: 76 18 jbe 10b66f 10b657: 8b 55 e0 mov -0x20(%ebp),%edx 10b65a: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10b65c: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 10b661: 42 inc %edx ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b662: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b667: 77 f3 ja 10b65c <== NEVER TAKEN 10b669: 89 45 e4 mov %eax,-0x1c(%ebp) 10b66c: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 10b66f: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b674: 77 19 ja 10b68f <== NEVER TAKEN 10b676: 8b 55 e0 mov -0x20(%ebp),%edx 10b679: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10b67c: 05 00 ca 9a 3b add $0x3b9aca00,%eax * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 10b681: 4a dec %edx ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 10b682: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b687: 76 f3 jbe 10b67c 10b689: 89 45 e4 mov %eax,-0x1c(%ebp) 10b68c: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10b68f: 83 ec 0c sub $0xc,%esp 10b692: 57 push %edi 10b693: e8 a4 17 00 00 call 10ce3c <_TOD_Set> _Thread_Enable_dispatch(); 10b698: e8 c3 29 00 00 call 10e060 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10b69d: 83 c4 10 add $0x10,%esp 10b6a0: 85 f6 test %esi,%esi 10b6a2: 0f 84 68 ff ff ff je 10b610 *olddelta = *delta; 10b6a8: 8b 03 mov (%ebx),%eax 10b6aa: 8b 53 04 mov 0x4(%ebx),%edx 10b6ad: 89 06 mov %eax,(%esi) 10b6af: 89 56 04 mov %edx,0x4(%esi) return 0; 10b6b2: 31 c0 xor %eax,%eax } 10b6b4: 8d 65 f4 lea -0xc(%ebp),%esp 10b6b7: 5b pop %ebx 10b6b8: 5e pop %esi 10b6b9: 5f pop %edi 10b6ba: c9 leave 10b6bb: c3 ret */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b6bc: e8 8b 86 00 00 call 113d4c <__errno> 10b6c1: c7 00 16 00 00 00 movl $0x16,(%eax) 10b6c7: b8 ff ff ff ff mov $0xffffffff,%eax 10b6cc: e9 41 ff ff ff jmp 10b612 =============================================================================== 0010b424 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10b424: 55 push %ebp 10b425: 89 e5 mov %esp,%ebp 10b427: 83 ec 08 sub $0x8,%esp 10b42a: 8b 45 08 mov 0x8(%ebp),%eax 10b42d: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b430: 85 d2 test %edx,%edx 10b432: 74 14 je 10b448 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b434: 83 f8 01 cmp $0x1,%eax 10b437: 74 47 je 10b480 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10b439: 83 f8 04 cmp $0x4,%eax 10b43c: 74 32 je 10b470 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10b43e: 83 f8 02 cmp $0x2,%eax 10b441: 74 2d je 10b470 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b443: 83 f8 03 cmp $0x3,%eax 10b446: 74 14 je 10b45c rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b448: e8 37 8e 00 00 call 114284 <__errno> 10b44d: c7 00 16 00 00 00 movl $0x16,(%eax) 10b453: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b458: c9 leave 10b459: c3 ret 10b45a: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10b45c: e8 23 8e 00 00 call 114284 <__errno> 10b461: c7 00 58 00 00 00 movl $0x58,(%eax) 10b467: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b46c: c9 leave 10b46d: c3 ret 10b46e: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10b470: 83 ec 0c sub $0xc,%esp 10b473: 52 push %edx 10b474: e8 8f 1e 00 00 call 10d308 <_TOD_Get_uptime_as_timespec> return 0; 10b479: 83 c4 10 add $0x10,%esp 10b47c: 31 c0 xor %eax,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b47e: c9 leave 10b47f: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10b480: 83 ec 0c sub $0xc,%esp 10b483: 52 push %edx 10b484: e8 23 1e 00 00 call 10d2ac <_TOD_Get> return 0; 10b489: 83 c4 10 add $0x10,%esp 10b48c: 31 c0 xor %eax,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b48e: c9 leave 10b48f: c3 ret =============================================================================== 0010b490 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 10b490: 55 push %ebp 10b491: 89 e5 mov %esp,%ebp 10b493: 83 ec 08 sub $0x8,%esp 10b496: 8b 45 08 mov 0x8(%ebp),%eax 10b499: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b49c: 85 d2 test %edx,%edx 10b49e: 74 0f je 10b4af <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b4a0: 83 f8 01 cmp $0x1,%eax 10b4a3: 74 1f je 10b4c4 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10b4a5: 83 f8 02 cmp $0x2,%eax 10b4a8: 74 42 je 10b4ec rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b4aa: 83 f8 03 cmp $0x3,%eax 10b4ad: 74 3d je 10b4ec rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10b4af: e8 d0 8d 00 00 call 114284 <__errno> 10b4b4: c7 00 16 00 00 00 movl $0x16,(%eax) 10b4ba: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b4bf: c9 leave 10b4c0: c3 ret 10b4c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 10b4c4: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 10b4ca: 76 e3 jbe 10b4af rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b4cc: a1 54 85 12 00 mov 0x128554,%eax 10b4d1: 40 inc %eax 10b4d2: a3 54 85 12 00 mov %eax,0x128554 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 10b4d7: 83 ec 0c sub $0xc,%esp 10b4da: 52 push %edx 10b4db: e8 80 1e 00 00 call 10d360 <_TOD_Set> _Thread_Enable_dispatch(); 10b4e0: e8 9f 30 00 00 call 10e584 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 10b4e5: 83 c4 10 add $0x10,%esp 10b4e8: 31 c0 xor %eax,%eax } 10b4ea: c9 leave 10b4eb: c3 ret else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10b4ec: e8 93 8d 00 00 call 114284 <__errno> 10b4f1: c7 00 58 00 00 00 movl $0x58,(%eax) 10b4f7: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b4fc: c9 leave 10b4fd: c3 ret =============================================================================== 0010b214 : int getitimer( int which, struct itimerval *value ) { 10b214: 55 push %ebp 10b215: 89 e5 mov %esp,%ebp 10b217: 83 ec 08 sub $0x8,%esp if ( !value ) 10b21a: 8b 45 0c mov 0xc(%ebp),%eax 10b21d: 85 c0 test %eax,%eax 10b21f: 74 2f je 10b250 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b221: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b225: 76 15 jbe 10b23c case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b227: e8 7c 87 00 00 call 1139a8 <__errno> 10b22c: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b232: b8 ff ff ff ff mov $0xffffffff,%eax 10b237: c9 leave 10b238: c3 ret 10b239: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b23c: e8 67 87 00 00 call 1139a8 <__errno> 10b241: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b247: b8 ff ff ff ff mov $0xffffffff,%eax 10b24c: c9 leave 10b24d: c3 ret 10b24e: 66 90 xchg %ax,%ax <== NOT EXECUTED int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b250: e8 53 87 00 00 call 1139a8 <__errno> 10b255: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b25b: eb d5 jmp 10b232 =============================================================================== 001240d0 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 1240d0: 55 push %ebp 1240d1: 89 e5 mov %esp,%ebp 1240d3: 57 push %edi 1240d4: 56 push %esi 1240d5: 53 push %ebx 1240d6: 83 ec 3c sub $0x3c,%esp 1240d9: 8b 75 0c mov 0xc(%ebp),%esi 1240dc: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 1240df: e8 00 fd ff ff call 123de4 1240e4: 3b 45 08 cmp 0x8(%ebp),%eax 1240e7: 0f 85 3f 02 00 00 jne 12432c rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 1240ed: 85 f6 test %esi,%esi 1240ef: 0f 84 4c 02 00 00 je 124341 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1240f5: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1240f8: 83 f9 1f cmp $0x1f,%ecx 1240fb: 0f 87 40 02 00 00 ja 124341 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 124101: 8d 04 76 lea (%esi,%esi,2),%eax 124104: 83 3c 85 88 e7 12 00 cmpl $0x1,0x12e788(,%eax,4) 12410b: 01 12410c: 0f 84 e6 01 00 00 je 1242f8 /* * 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 ) ) 124112: 83 fe 08 cmp $0x8,%esi 124115: 0f 84 c9 00 00 00 je 1241e4 12411b: 83 fe 04 cmp $0x4,%esi 12411e: 0f 84 c0 00 00 00 je 1241e4 124124: 83 fe 0b cmp $0xb,%esi 124127: 0f 84 b7 00 00 00 je 1241e4 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 12412d: bb 01 00 00 00 mov $0x1,%ebx 124132: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 124134: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 124137: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 12413e: 85 ff test %edi,%edi 124140: 0f 84 ba 01 00 00 je 124300 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 124146: 8b 07 mov (%edi),%eax 124148: 89 45 e4 mov %eax,-0x1c(%ebp) 12414b: a1 94 e1 12 00 mov 0x12e194,%eax 124150: 40 inc %eax 124151: a3 94 e1 12 00 mov %eax,0x12e194 /* * 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; 124156: 8b 0d 58 e7 12 00 mov 0x12e758,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 12415c: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 124162: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 124168: f7 d0 not %eax 12416a: 85 c3 test %eax,%ebx 12416c: 75 34 jne 1241a2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 12416e: a1 20 e9 12 00 mov 0x12e920,%eax 124173: 3d 24 e9 12 00 cmp $0x12e924,%eax 124178: 75 1b jne 124195 12417a: e9 81 00 00 00 jmp 124200 12417f: 90 nop <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 124180: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx 124186: f7 d2 not %edx 124188: 85 d3 test %edx,%ebx 12418a: 75 16 jne 1241a2 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 12418c: 8b 00 mov (%eax),%eax /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 12418e: 3d 24 e9 12 00 cmp $0x12e924,%eax 124193: 74 6b je 124200 <== ALWAYS TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 124195: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 124197: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 12419d: 85 58 30 test %ebx,0x30(%eax) 1241a0: 74 de je 124180 /* * 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 ) ) { 1241a2: 50 push %eax mask = signo_to_mask( sig ); /* * Build up a siginfo structure */ siginfo = &siginfo_struct; 1241a3: 8d 45 dc lea -0x24(%ebp),%eax /* * 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 ) ) { 1241a6: 50 push %eax 1241a7: 56 push %esi 1241a8: 51 push %ecx 1241a9: e8 d6 01 00 00 call 124384 <_POSIX_signals_Unblock_thread> 1241ae: 83 c4 10 add $0x10,%esp 1241b1: 84 c0 test %al,%al 1241b3: 75 1f jne 1241d4 /* * 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 ); 1241b5: 83 ec 0c sub $0xc,%esp 1241b8: 53 push %ebx 1241b9: e8 b2 01 00 00 call 124370 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 1241be: 8d 1c 76 lea (%esi,%esi,2),%ebx 1241c1: c1 e3 02 shl $0x2,%ebx 1241c4: 83 c4 10 add $0x10,%esp 1241c7: 83 bb 80 e7 12 00 02 cmpl $0x2,0x12e780(%ebx) 1241ce: 0f 84 e4 00 00 00 je 1242b8 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 1241d4: e8 af e5 fe ff call 112788 <_Thread_Enable_dispatch> return 0; 1241d9: 31 c0 xor %eax,%eax } 1241db: 8d 65 f4 lea -0xc(%ebp),%esp 1241de: 5b pop %ebx 1241df: 5e pop %esi 1241e0: 5f pop %edi 1241e1: c9 leave 1241e2: c3 ret 1241e3: 90 nop <== NOT EXECUTED * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 1241e4: e8 7b 03 00 00 call 124564 1241e9: 83 ec 08 sub $0x8,%esp 1241ec: 56 push %esi 1241ed: 50 push %eax 1241ee: e8 b1 02 00 00 call 1244a4 1241f3: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 1241f6: 8d 65 f4 lea -0xc(%ebp),%esp 1241f9: 5b pop %ebx 1241fa: 5e pop %esi 1241fb: 5f pop %edi 1241fc: c9 leave 1241fd: c3 ret 1241fe: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 124200: 0f b6 05 34 9d 12 00 movzbl 0x129d34,%eax 124207: 40 inc %eax 124208: 89 45 d4 mov %eax,-0x2c(%ebp) * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 12420b: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 124212: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) 124219: 89 5d d0 mov %ebx,-0x30(%ebp) 12421c: 89 75 c0 mov %esi,-0x40(%ebp) /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 12421f: 8b 55 cc mov -0x34(%ebp),%edx 124222: 8b 04 95 6c e1 12 00 mov 0x12e16c(,%edx,4),%eax 124229: 85 c0 test %eax,%eax 12422b: 74 68 je 124295 <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 12422d: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 124230: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 124234: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 124237: 85 f6 test %esi,%esi 124239: 74 5a je 124295 12423b: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 124240: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 124243: 85 d2 test %edx,%edx 124245: 74 49 je 124290 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 124247: 8b 4a 14 mov 0x14(%edx),%ecx 12424a: 3b 4d d4 cmp -0x2c(%ebp),%ecx 12424d: 77 41 ja 124290 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 12424f: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 124255: 8b 9b d0 00 00 00 mov 0xd0(%ebx),%ebx 12425b: f7 d3 not %ebx 12425d: 85 5d d0 test %ebx,-0x30(%ebp) 124260: 74 2e je 124290 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 124262: 3b 4d d4 cmp -0x2c(%ebp),%ecx 124265: 72 21 jb 124288 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 124267: 8b 5d c8 mov -0x38(%ebp),%ebx 12426a: 85 db test %ebx,%ebx 12426c: 74 22 je 124290 <== NEVER TAKEN 12426e: 8b 5d c8 mov -0x38(%ebp),%ebx 124271: 8b 5b 10 mov 0x10(%ebx),%ebx 124274: 89 5d c4 mov %ebx,-0x3c(%ebp) 124277: 85 db test %ebx,%ebx 124279: 74 15 je 124290 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 12427b: 8b 5a 10 mov 0x10(%edx),%ebx 12427e: 85 db test %ebx,%ebx 124280: 0f 85 86 00 00 00 jne 12430c 124286: 66 90 xchg %ax,%ax 124288: 89 4d d4 mov %ecx,-0x2c(%ebp) 12428b: 89 55 c8 mov %edx,-0x38(%ebp) 12428e: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 124290: 40 inc %eax 124291: 39 c6 cmp %eax,%esi 124293: 73 ab jae 124240 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 124295: ff 45 cc incl -0x34(%ebp) 124298: 83 7d cc 04 cmpl $0x4,-0x34(%ebp) 12429c: 75 81 jne 12421f 12429e: 8b 5d d0 mov -0x30(%ebp),%ebx 1242a1: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 1242a4: 8b 55 c8 mov -0x38(%ebp),%edx 1242a7: 85 d2 test %edx,%edx 1242a9: 0f 84 06 ff ff ff je 1241b5 1242af: 8b 4d c8 mov -0x38(%ebp),%ecx 1242b2: e9 eb fe ff ff jmp 1241a2 1242b7: 90 nop <== NOT EXECUTED _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 1242b8: 83 ec 0c sub $0xc,%esp 1242bb: 68 00 e9 12 00 push $0x12e900 1242c0: e8 63 cd fe ff call 111028 <_Chain_Get> if ( !psiginfo ) { 1242c5: 83 c4 10 add $0x10,%esp 1242c8: 85 c0 test %eax,%eax 1242ca: 0f 84 86 00 00 00 je 124356 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 1242d0: 8d 78 08 lea 0x8(%eax),%edi 1242d3: 8d 75 dc lea -0x24(%ebp),%esi 1242d6: b9 03 00 00 00 mov $0x3,%ecx 1242db: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 1242dd: 83 ec 08 sub $0x8,%esp 1242e0: 50 push %eax 1242e1: 81 c3 a0 e9 12 00 add $0x12e9a0,%ebx 1242e7: 53 push %ebx 1242e8: e8 ff cc fe ff call 110fec <_Chain_Append> 1242ed: 83 c4 10 add $0x10,%esp 1242f0: e9 df fe ff ff jmp 1241d4 1242f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 1242f8: 31 c0 xor %eax,%eax 1242fa: e9 f7 fe ff ff jmp 1241f6 1242ff: 90 nop <== NOT EXECUTED */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 124300: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 124307: e9 3f fe ff ff jmp 12414b continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 12430c: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 124313: 0f 85 77 ff ff ff jne 124290 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 124319: 81 e3 00 00 00 10 and $0x10000000,%ebx 12431f: 0f 84 6b ff ff ff je 124290 124325: e9 5e ff ff ff jmp 124288 12432a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 12432c: e8 ef 40 ff ff call 118420 <__errno> 124331: c7 00 03 00 00 00 movl $0x3,(%eax) 124337: b8 ff ff ff ff mov $0xffffffff,%eax 12433c: e9 b5 fe ff ff jmp 1241f6 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 124341: e8 da 40 ff ff call 118420 <__errno> 124346: c7 00 16 00 00 00 movl $0x16,(%eax) 12434c: b8 ff ff ff ff mov $0xffffffff,%eax 124351: e9 a0 fe ff ff jmp 1241f6 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 124356: e8 2d e4 fe ff call 112788 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 12435b: e8 c0 40 ff ff call 118420 <__errno> 124360: c7 00 0b 00 00 00 movl $0xb,(%eax) 124366: 83 c8 ff or $0xffffffff,%eax 124369: e9 88 fe ff ff jmp 1241f6 =============================================================================== 0010fa48 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10fa48: 55 push %ebp 10fa49: 89 e5 mov %esp,%ebp 10fa4b: 57 push %edi 10fa4c: 56 push %esi 10fa4d: 83 ec 14 sub $0x14,%esp 10fa50: 8b 75 0c mov 0xc(%ebp),%esi POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10fa53: 8d 45 f4 lea -0xc(%ebp),%eax 10fa56: 50 push %eax 10fa57: ff 75 08 pushl 0x8(%ebp) 10fa5a: 68 e0 ff 12 00 push $0x12ffe0 10fa5f: e8 d4 31 00 00 call 112c38 <_Objects_Get> switch ( location ) { 10fa64: 83 c4 10 add $0x10,%esp 10fa67: 8b 4d f4 mov -0xc(%ebp),%ecx 10fa6a: 85 c9 test %ecx,%ecx 10fa6c: 74 1a je 10fa88 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fa6e: e8 ad 9d 00 00 call 119820 <__errno> 10fa73: c7 00 09 00 00 00 movl $0x9,(%eax) 10fa79: b8 ff ff ff ff mov $0xffffffff,%eax 10fa7e: 66 90 xchg %ax,%ax } 10fa80: 8d 65 f8 lea -0x8(%ebp),%esp 10fa83: 5e pop %esi 10fa84: 5f pop %edi 10fa85: c9 leave 10fa86: c3 ret 10fa87: 90 nop <== NOT EXECUTED the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10fa88: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10fa8b: 85 f6 test %esi,%esi 10fa8d: 74 39 je 10fac8 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10fa8f: 8b 50 7c mov 0x7c(%eax),%edx 10fa92: 85 d2 test %edx,%edx 10fa94: 75 46 jne 10fadc 10fa96: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10fa9d: 00 00 00 rtems_set_errno_and_return_minus_one( EBUSY ); } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 10faa0: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10faa6: b9 05 00 00 00 mov $0x5,%ecx 10faab: f3 a5 rep movsl %ds:(%esi),%es:(%edi) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10faad: c7 40 7c 10 fa 10 00 movl $0x10fa10,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10fab4: 89 80 80 00 00 00 mov %eax,0x80(%eax) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10faba: e8 89 3a 00 00 call 113548 <_Thread_Enable_dispatch> return 0; 10fabf: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fac1: 8d 65 f8 lea -0x8(%ebp),%esp 10fac4: 5e pop %esi 10fac5: 5f pop %edi 10fac6: c9 leave 10fac7: c3 ret CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10fac8: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10facf: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10fad6: 00 00 00 10fad9: eb df jmp 10faba 10fadb: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; if ( notification ) { if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { _Thread_Enable_dispatch(); 10fadc: e8 67 3a 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10fae1: e8 3a 9d 00 00 call 119820 <__errno> 10fae6: c7 00 10 00 00 00 movl $0x10,(%eax) 10faec: b8 ff ff ff ff mov $0xffffffff,%eax 10faf1: eb 8d jmp 10fa80 =============================================================================== 0010faf4 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10faf4: 55 push %ebp 10faf5: 89 e5 mov %esp,%ebp 10faf7: 57 push %edi 10faf8: 56 push %esi 10faf9: 53 push %ebx 10fafa: 83 ec 2c sub $0x2c,%esp 10fafd: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10fb00: a1 94 fa 12 00 mov 0x12fa94,%eax 10fb05: 40 inc %eax 10fb06: a3 94 fa 12 00 mov %eax,0x12fa94 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10fb0b: 89 f0 mov %esi,%eax 10fb0d: 25 00 02 00 00 and $0x200,%eax 10fb12: 89 45 d4 mov %eax,-0x2c(%ebp) 10fb15: 0f 85 c9 00 00 00 jne 10fbe4 /* struct mq_attr attr */ ) { va_list arg; mode_t mode; struct mq_attr *attr = NULL; 10fb1b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) _Objects_Allocate( &_POSIX_Message_queue_Information_fds ); 10fb22: 83 ec 0c sub $0xc,%esp 10fb25: 68 e0 ff 12 00 push $0x12ffe0 10fb2a: e8 51 2c 00 00 call 112780 <_Objects_Allocate> 10fb2f: 89 c3 mov %eax,%ebx attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 10fb31: 83 c4 10 add $0x10,%esp 10fb34: 85 c0 test %eax,%eax 10fb36: 0f 84 b4 00 00 00 je 10fbf0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10fb3c: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10fb3f: 83 ec 08 sub $0x8,%esp 10fb42: 8d 45 e4 lea -0x1c(%ebp),%eax 10fb45: 50 push %eax 10fb46: ff 75 08 pushl 0x8(%ebp) 10fb49: e8 ca 68 00 00 call 116418 <_POSIX_Message_queue_Name_to_id> 10fb4e: 89 c7 mov %eax,%edi * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 10fb50: 83 c4 10 add $0x10,%esp 10fb53: 85 c0 test %eax,%eax 10fb55: 75 59 jne 10fbb0 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10fb57: 81 e6 00 0a 00 00 and $0xa00,%esi 10fb5d: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10fb63: 0f 84 a7 00 00 00 je 10fc10 Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) _Objects_Get( &_POSIX_Message_queue_Information, id, location ); 10fb69: 50 push %eax /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 10fb6a: 8d 45 dc lea -0x24(%ebp),%eax 10fb6d: 50 push %eax 10fb6e: ff 75 e4 pushl -0x1c(%ebp) 10fb71: 68 40 fe 12 00 push $0x12fe40 10fb76: e8 bd 30 00 00 call 112c38 <_Objects_Get> 10fb7b: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10fb7e: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10fb81: 89 43 10 mov %eax,0x10(%ebx) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 10fb84: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fb88: a1 fc ff 12 00 mov 0x12fffc,%eax 10fb8d: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 10fb90: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10fb97: e8 ac 39 00 00 call 113548 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10fb9c: e8 a7 39 00 00 call 113548 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10fba1: 8b 43 08 mov 0x8(%ebx),%eax 10fba4: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fba7: 8d 65 f4 lea -0xc(%ebp),%esp 10fbaa: 5b pop %ebx 10fbab: 5e pop %esi 10fbac: 5f pop %edi 10fbad: c9 leave 10fbae: c3 ret 10fbaf: 90 nop <== NOT EXECUTED if ( status ) { /* * 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) ) ) { 10fbb0: 83 f8 02 cmp $0x2,%eax 10fbb3: 0f 84 87 00 00 00 je 10fc40 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10fbb9: 83 ec 08 sub $0x8,%esp 10fbbc: 53 push %ebx 10fbbd: 68 e0 ff 12 00 push $0x12ffe0 10fbc2: e8 31 2f 00 00 call 112af8 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10fbc7: e8 7c 39 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10fbcc: e8 4f 9c 00 00 call 119820 <__errno> 10fbd1: 89 38 mov %edi,(%eax) 10fbd3: 83 c4 10 add $0x10,%esp 10fbd6: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fbdb: 8d 65 f4 lea -0xc(%ebp),%esp 10fbde: 5b pop %ebx 10fbdf: 5e pop %esi 10fbe0: 5f pop %edi 10fbe1: c9 leave 10fbe2: c3 ret 10fbe3: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 10fbe4: 8b 45 14 mov 0x14(%ebp),%eax 10fbe7: 89 45 d0 mov %eax,-0x30(%ebp) 10fbea: e9 33 ff ff ff jmp 10fb22 10fbef: 90 nop <== NOT EXECUTED va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10fbf0: e8 53 39 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10fbf5: e8 26 9c 00 00 call 119820 <__errno> 10fbfa: c7 00 17 00 00 00 movl $0x17,(%eax) 10fc00: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fc05: 8d 65 f4 lea -0xc(%ebp),%esp 10fc08: 5b pop %ebx 10fc09: 5e pop %esi 10fc0a: 5f pop %edi 10fc0b: c9 leave 10fc0c: c3 ret 10fc0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10fc10: 83 ec 08 sub $0x8,%esp 10fc13: 53 push %ebx 10fc14: 68 e0 ff 12 00 push $0x12ffe0 10fc19: e8 da 2e 00 00 call 112af8 <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10fc1e: e8 25 39 00 00 call 113548 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10fc23: e8 f8 9b 00 00 call 119820 <__errno> 10fc28: c7 00 11 00 00 00 movl $0x11,(%eax) 10fc2e: 83 c4 10 add $0x10,%esp 10fc31: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fc36: 8d 65 f4 lea -0xc(%ebp),%esp 10fc39: 5b pop %ebx 10fc3a: 5e pop %esi 10fc3b: 5f pop %edi 10fc3c: c9 leave 10fc3d: c3 ret 10fc3e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( status ) { /* * 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) ) ) { 10fc40: 8b 55 d4 mov -0x2c(%ebp),%edx 10fc43: 85 d2 test %edx,%edx 10fc45: 0f 84 6e ff ff ff je 10fbb9 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 10fc4b: 8d 45 e0 lea -0x20(%ebp),%eax 10fc4e: 50 push %eax 10fc4f: ff 75 d0 pushl -0x30(%ebp) 10fc52: 6a 01 push $0x1 10fc54: ff 75 08 pushl 0x8(%ebp) 10fc57: e8 34 66 00 00 call 116290 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10fc5c: 83 c4 10 add $0x10,%esp 10fc5f: 40 inc %eax 10fc60: 74 26 je 10fc88 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10fc62: 8b 45 e0 mov -0x20(%ebp),%eax 10fc65: 89 43 10 mov %eax,0x10(%ebx) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 10fc68: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fc6c: a1 fc ff 12 00 mov 0x12fffc,%eax 10fc71: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 10fc74: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10fc7b: e8 c8 38 00 00 call 113548 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10fc80: 8b 43 08 mov 0x8(%ebx),%eax 10fc83: e9 1f ff ff ff jmp 10fba7 10fc88: 83 ec 08 sub $0x8,%esp 10fc8b: 53 push %ebx 10fc8c: 68 e0 ff 12 00 push $0x12ffe0 10fc91: e8 62 2e 00 00 call 112af8 <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10fc96: e8 ad 38 00 00 call 113548 <_Thread_Enable_dispatch> return (mqd_t) -1; 10fc9b: 83 c4 10 add $0x10,%esp 10fc9e: b8 ff ff ff ff mov $0xffffffff,%eax 10fca3: e9 ff fe ff ff jmp 10fba7 =============================================================================== 0010fef4 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10fef4: 55 push %ebp 10fef5: 89 e5 mov %esp,%ebp 10fef7: 56 push %esi 10fef8: 53 push %ebx 10fef9: 83 ec 10 sub $0x10,%esp 10fefc: 8b 75 0c mov 0xc(%ebp),%esi 10feff: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 10ff02: 85 f6 test %esi,%esi 10ff04: 74 60 je 10ff66 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10ff06: 51 push %ecx rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10ff07: 8d 45 f4 lea -0xc(%ebp),%eax 10ff0a: 50 push %eax 10ff0b: ff 75 08 pushl 0x8(%ebp) 10ff0e: 68 e0 ff 12 00 push $0x12ffe0 10ff13: e8 20 2d 00 00 call 112c38 <_Objects_Get> switch ( location ) { 10ff18: 83 c4 10 add $0x10,%esp 10ff1b: 8b 55 f4 mov -0xc(%ebp),%edx 10ff1e: 85 d2 test %edx,%edx 10ff20: 75 32 jne 10ff54 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10ff22: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10ff25: 85 db test %ebx,%ebx 10ff27: 74 17 je 10ff40 omqstat->mq_flags = the_mq_fd->oflag; 10ff29: 8b 48 14 mov 0x14(%eax),%ecx 10ff2c: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10ff2e: 8b 4a 68 mov 0x68(%edx),%ecx 10ff31: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10ff34: 8b 4a 60 mov 0x60(%edx),%ecx 10ff37: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10ff3a: 8b 52 64 mov 0x64(%edx),%edx 10ff3d: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10ff40: 8b 16 mov (%esi),%edx 10ff42: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10ff45: e8 fe 35 00 00 call 113548 <_Thread_Enable_dispatch> return 0; 10ff4a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10ff4c: 8d 65 f8 lea -0x8(%ebp),%esp 10ff4f: 5b pop %ebx 10ff50: 5e pop %esi 10ff51: c9 leave 10ff52: c3 ret 10ff53: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10ff54: e8 c7 98 00 00 call 119820 <__errno> 10ff59: c7 00 09 00 00 00 movl $0x9,(%eax) 10ff5f: b8 ff ff ff ff mov $0xffffffff,%eax 10ff64: eb e6 jmp 10ff4c POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 10ff66: e8 b5 98 00 00 call 119820 <__errno> 10ff6b: c7 00 16 00 00 00 movl $0x16,(%eax) 10ff71: b8 ff ff ff ff mov $0xffffffff,%eax 10ff76: eb d4 jmp 10ff4c =============================================================================== 0011091c : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 11091c: 55 push %ebp 11091d: 89 e5 mov %esp,%ebp 11091f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 110922: 85 c0 test %eax,%eax 110924: 74 12 je 110938 110926: 8b 10 mov (%eax),%edx 110928: 85 d2 test %edx,%edx 11092a: 74 0c je 110938 return EINVAL; attr->is_initialized = false; 11092c: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 110932: 31 c0 xor %eax,%eax } 110934: c9 leave 110935: c3 ret 110936: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_attr_destroy( pthread_attr_t *attr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110938: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 11093d: c9 leave 11093e: c3 ret =============================================================================== 001109b8 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 1109b8: 55 push %ebp 1109b9: 89 e5 mov %esp,%ebp 1109bb: 57 push %edi 1109bc: 56 push %esi 1109bd: 8b 75 08 mov 0x8(%ebp),%esi 1109c0: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 1109c3: 85 f6 test %esi,%esi 1109c5: 74 1d je 1109e4 1109c7: 8b 16 mov (%esi),%edx 1109c9: 85 d2 test %edx,%edx 1109cb: 74 17 je 1109e4 1109cd: 85 c0 test %eax,%eax 1109cf: 74 13 je 1109e4 return EINVAL; *param = attr->schedparam; 1109d1: 83 c6 18 add $0x18,%esi 1109d4: b9 07 00 00 00 mov $0x7,%ecx 1109d9: 89 c7 mov %eax,%edi 1109db: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 1109dd: 31 c0 xor %eax,%eax } 1109df: 5e pop %esi 1109e0: 5f pop %edi 1109e1: c9 leave 1109e2: c3 ret 1109e3: 90 nop <== NOT EXECUTED const pthread_attr_t *attr, struct sched_param *param ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; 1109e4: b8 16 00 00 00 mov $0x16,%eax *param = attr->schedparam; return 0; } 1109e9: 5e pop %esi 1109ea: 5f pop %edi 1109eb: c9 leave 1109ec: c3 ret =============================================================================== 00110a68 : int pthread_attr_getstack( const pthread_attr_t *attr, void **stackaddr, size_t *stacksize ) { 110a68: 55 push %ebp 110a69: 89 e5 mov %esp,%ebp 110a6b: 53 push %ebx 110a6c: 8b 45 08 mov 0x8(%ebp),%eax 110a6f: 8b 55 0c mov 0xc(%ebp),%edx 110a72: 8b 4d 10 mov 0x10(%ebp),%ecx if ( !attr || !attr->is_initialized || !stackaddr || !stacksize ) 110a75: 85 c0 test %eax,%eax 110a77: 74 1f je 110a98 110a79: 8b 18 mov (%eax),%ebx 110a7b: 85 db test %ebx,%ebx 110a7d: 74 19 je 110a98 110a7f: 85 d2 test %edx,%edx 110a81: 74 15 je 110a98 110a83: 85 c9 test %ecx,%ecx 110a85: 74 11 je 110a98 return EINVAL; *stackaddr = attr->stackaddr; 110a87: 8b 58 04 mov 0x4(%eax),%ebx 110a8a: 89 1a mov %ebx,(%edx) *stacksize = attr->stacksize; 110a8c: 8b 40 08 mov 0x8(%eax),%eax 110a8f: 89 01 mov %eax,(%ecx) return 0; 110a91: 31 c0 xor %eax,%eax } 110a93: 5b pop %ebx 110a94: c9 leave 110a95: c3 ret 110a96: 66 90 xchg %ax,%ax <== NOT EXECUTED void **stackaddr, size_t *stacksize ) { if ( !attr || !attr->is_initialized || !stackaddr || !stacksize ) return EINVAL; 110a98: b8 16 00 00 00 mov $0x16,%eax *stackaddr = attr->stackaddr; *stacksize = attr->stacksize; return 0; } 110a9d: 5b pop %ebx 110a9e: c9 leave 110a9f: c3 ret =============================================================================== 001114c8 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 1114c8: 55 push %ebp 1114c9: 89 e5 mov %esp,%ebp 1114cb: 8b 45 08 mov 0x8(%ebp),%eax 1114ce: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1114d1: 85 c0 test %eax,%eax 1114d3: 74 0b je 1114e0 1114d5: 8b 08 mov (%eax),%ecx 1114d7: 85 c9 test %ecx,%ecx 1114d9: 74 05 je 1114e0 return EINVAL; switch ( clock_allowed ) { 1114db: 83 fa 01 cmp $0x1,%edx 1114de: 76 08 jbe 1114e8 case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; default: return EINVAL; 1114e0: b8 16 00 00 00 mov $0x16,%eax } } 1114e5: c9 leave 1114e6: c3 ret 1114e7: 90 nop <== NOT EXECUTED return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 1114e8: 89 50 38 mov %edx,0x38(%eax) return 0; 1114eb: 31 c0 xor %eax,%eax default: return EINVAL; } } 1114ed: c9 leave 1114ee: c3 ret =============================================================================== 00110af4 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 110af4: 55 push %ebp 110af5: 89 e5 mov %esp,%ebp 110af7: 8b 45 08 mov 0x8(%ebp),%eax 110afa: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 110afd: 85 c0 test %eax,%eax 110aff: 74 0b je 110b0c 110b01: 8b 08 mov (%eax),%ecx 110b03: 85 c9 test %ecx,%ecx 110b05: 74 05 je 110b0c return EINVAL; switch ( detachstate ) { 110b07: 83 fa 01 cmp $0x1,%edx 110b0a: 76 08 jbe 110b14 case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; default: return EINVAL; 110b0c: b8 16 00 00 00 mov $0x16,%eax } } 110b11: c9 leave 110b12: c3 ret 110b13: 90 nop <== NOT EXECUTED return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 110b14: 89 50 3c mov %edx,0x3c(%eax) return 0; 110b17: 31 c0 xor %eax,%eax default: return EINVAL; } } 110b19: c9 leave 110b1a: c3 ret =============================================================================== 00110b1c : int pthread_attr_setguardsize( pthread_attr_t *attr, size_t guardsize ) { 110b1c: 55 push %ebp 110b1d: 89 e5 mov %esp,%ebp 110b1f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 110b22: 85 c0 test %eax,%eax 110b24: 74 12 je 110b38 110b26: 8b 10 mov (%eax),%edx 110b28: 85 d2 test %edx,%edx 110b2a: 74 0c je 110b38 return EINVAL; attr->guardsize = guardsize; 110b2c: 8b 55 0c mov 0xc(%ebp),%edx 110b2f: 89 50 34 mov %edx,0x34(%eax) return 0; 110b32: 31 c0 xor %eax,%eax } 110b34: c9 leave 110b35: c3 ret 110b36: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_attr_t *attr, size_t guardsize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110b38: b8 16 00 00 00 mov $0x16,%eax attr->guardsize = guardsize; return 0; } 110b3d: c9 leave 110b3e: c3 ret =============================================================================== 00111a64 : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 111a64: 55 push %ebp 111a65: 89 e5 mov %esp,%ebp 111a67: 8b 45 08 mov 0x8(%ebp),%eax 111a6a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111a6d: 85 c0 test %eax,%eax 111a6f: 74 1f je 111a90 111a71: 8b 08 mov (%eax),%ecx 111a73: 85 c9 test %ecx,%ecx 111a75: 74 19 je 111a90 return EINVAL; switch ( inheritsched ) { 111a77: 8d 4a ff lea -0x1(%edx),%ecx 111a7a: 83 f9 01 cmp $0x1,%ecx 111a7d: 76 09 jbe 111a88 case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; default: return ENOTSUP; 111a7f: b8 86 00 00 00 mov $0x86,%eax } } 111a84: c9 leave 111a85: c3 ret 111a86: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 111a88: 89 50 10 mov %edx,0x10(%eax) return 0; 111a8b: 31 c0 xor %eax,%eax default: return ENOTSUP; } } 111a8d: c9 leave 111a8e: c3 ret 111a8f: 90 nop <== NOT EXECUTED pthread_attr_t *attr, int inheritsched ) { if ( !attr || !attr->is_initialized ) return EINVAL; 111a90: b8 16 00 00 00 mov $0x16,%eax return 0; default: return ENOTSUP; } } 111a95: c9 leave 111a96: c3 ret =============================================================================== 00110b74 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 110b74: 55 push %ebp 110b75: 89 e5 mov %esp,%ebp 110b77: 57 push %edi 110b78: 56 push %esi 110b79: 8b 7d 08 mov 0x8(%ebp),%edi 110b7c: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 110b7f: 85 ff test %edi,%edi 110b81: 74 1d je 110ba0 110b83: 8b 07 mov (%edi),%eax 110b85: 85 c0 test %eax,%eax 110b87: 74 17 je 110ba0 110b89: 85 f6 test %esi,%esi 110b8b: 74 13 je 110ba0 return EINVAL; attr->schedparam = *param; 110b8d: 83 c7 18 add $0x18,%edi 110b90: b9 07 00 00 00 mov $0x7,%ecx 110b95: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 110b97: 31 c0 xor %eax,%eax } 110b99: 5e pop %esi 110b9a: 5f pop %edi 110b9b: c9 leave 110b9c: c3 ret 110b9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pthread_attr_t *attr, const struct sched_param *param ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; 110ba0: b8 16 00 00 00 mov $0x16,%eax attr->schedparam = *param; return 0; } 110ba5: 5e pop %esi 110ba6: 5f pop %edi 110ba7: c9 leave 110ba8: c3 ret =============================================================================== 00110bac : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 110bac: 55 push %ebp 110bad: 89 e5 mov %esp,%ebp 110baf: 8b 45 08 mov 0x8(%ebp),%eax 110bb2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 110bb5: 85 c0 test %eax,%eax 110bb7: 74 23 je 110bdc 110bb9: 8b 08 mov (%eax),%ecx 110bbb: 85 c9 test %ecx,%ecx 110bbd: 74 1d je 110bdc return EINVAL; switch ( policy ) { 110bbf: 85 d2 test %edx,%edx 110bc1: 78 0a js 110bcd 110bc3: 83 fa 02 cmp $0x2,%edx 110bc6: 7e 0c jle 110bd4 110bc8: 83 fa 04 cmp $0x4,%edx 110bcb: 74 07 je 110bd4 <== ALWAYS TAKEN case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 110bcd: b8 86 00 00 00 mov $0x86,%eax } } 110bd2: c9 leave 110bd3: c3 ret switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 110bd4: 89 50 14 mov %edx,0x14(%eax) return 0; 110bd7: 31 c0 xor %eax,%eax default: return ENOTSUP; } } 110bd9: c9 leave 110bda: c3 ret 110bdb: 90 nop <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110bdc: b8 16 00 00 00 mov $0x16,%eax return 0; default: return ENOTSUP; } } 110be1: c9 leave 110be2: c3 ret =============================================================================== 00110be4 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 110be4: 55 push %ebp 110be5: 89 e5 mov %esp,%ebp 110be7: 8b 45 08 mov 0x8(%ebp),%eax 110bea: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 110bed: 85 c0 test %eax,%eax 110bef: 74 1a je 110c0b 110bf1: 8b 08 mov (%eax),%ecx 110bf3: 85 c9 test %ecx,%ecx 110bf5: 74 14 je 110c0b return EINVAL; switch ( contentionscope ) { 110bf7: 85 d2 test %edx,%edx 110bf9: 75 0d jne 110c08 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 110bfb: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) return 0; 110c02: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 110c04: c9 leave 110c05: c3 ret 110c06: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 110c08: 4a dec %edx 110c09: 74 09 je 110c14 case PTHREAD_SCOPE_SYSTEM: return ENOTSUP; default: return EINVAL; 110c0b: b8 16 00 00 00 mov $0x16,%eax } } 110c10: c9 leave 110c11: c3 ret 110c12: 66 90 xchg %ax,%ax <== NOT EXECUTED case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; case PTHREAD_SCOPE_SYSTEM: return ENOTSUP; 110c14: b8 86 00 00 00 mov $0x86,%eax default: return EINVAL; } } 110c19: c9 leave 110c1a: c3 ret =============================================================================== 00110c40 : int pthread_attr_setstack( pthread_attr_t *attr, void *stackaddr, size_t stacksize ) { 110c40: 55 push %ebp 110c41: 89 e5 mov %esp,%ebp 110c43: 8b 45 08 mov 0x8(%ebp),%eax 110c46: 8b 55 10 mov 0x10(%ebp),%edx if ( !attr || !attr->is_initialized ) 110c49: 85 c0 test %eax,%eax 110c4b: 74 27 je 110c74 110c4d: 8b 08 mov (%eax),%ecx 110c4f: 85 c9 test %ecx,%ecx 110c51: 74 21 je 110c74 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 110c53: 8b 0d 18 db 12 00 mov 0x12db18,%ecx 110c59: d1 e1 shl %ecx 110c5b: 39 d1 cmp %edx,%ecx 110c5d: 77 0d ja 110c6c attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 110c5f: 89 50 08 mov %edx,0x8(%eax) attr->stackaddr = stackaddr; 110c62: 8b 55 0c mov 0xc(%ebp),%edx 110c65: 89 50 04 mov %edx,0x4(%eax) return 0; 110c68: 31 c0 xor %eax,%eax } 110c6a: c9 leave 110c6b: c3 ret { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 110c6c: 89 48 08 mov %ecx,0x8(%eax) 110c6f: eb f1 jmp 110c62 110c71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *stackaddr, size_t stacksize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110c74: b8 16 00 00 00 mov $0x16,%eax else attr->stacksize = stacksize; attr->stackaddr = stackaddr; return 0; } 110c79: c9 leave 110c7a: c3 ret =============================================================================== 00110c1c : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 110c1c: 55 push %ebp 110c1d: 89 e5 mov %esp,%ebp 110c1f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 110c22: 85 c0 test %eax,%eax 110c24: 74 12 je 110c38 110c26: 8b 10 mov (%eax),%edx 110c28: 85 d2 test %edx,%edx 110c2a: 74 0c je 110c38 return EINVAL; attr->stackaddr = stackaddr; 110c2c: 8b 55 0c mov 0xc(%ebp),%edx 110c2f: 89 50 04 mov %edx,0x4(%eax) return 0; 110c32: 31 c0 xor %eax,%eax } 110c34: c9 leave 110c35: c3 ret 110c36: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_attr_t *attr, void *stackaddr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110c38: b8 16 00 00 00 mov $0x16,%eax attr->stackaddr = stackaddr; return 0; } 110c3d: c9 leave 110c3e: c3 ret =============================================================================== 00111a98 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 111a98: 55 push %ebp 111a99: 89 e5 mov %esp,%ebp 111a9b: 8b 45 08 mov 0x8(%ebp),%eax 111a9e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111aa1: 85 c0 test %eax,%eax 111aa3: 74 23 je 111ac8 111aa5: 8b 08 mov (%eax),%ecx 111aa7: 85 c9 test %ecx,%ecx 111aa9: 74 1d je 111ac8 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 111aab: 8b 0d b8 44 12 00 mov 0x1244b8,%ecx 111ab1: d1 e1 shl %ecx 111ab3: 39 d1 cmp %edx,%ecx 111ab5: 77 09 ja 111ac0 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 111ab7: 89 50 08 mov %edx,0x8(%eax) return 0; 111aba: 31 c0 xor %eax,%eax } 111abc: c9 leave 111abd: c3 ret 111abe: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 111ac0: 89 48 08 mov %ecx,0x8(%eax) else attr->stacksize = stacksize; return 0; 111ac3: 31 c0 xor %eax,%eax } 111ac5: c9 leave 111ac6: c3 ret 111ac7: 90 nop <== NOT EXECUTED pthread_attr_t *attr, size_t stacksize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 111ac8: b8 16 00 00 00 mov $0x16,%eax if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; return 0; } 111acd: c9 leave 111ace: c3 ret =============================================================================== 0010b8f8 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10b8f8: 55 push %ebp 10b8f9: 89 e5 mov %esp,%ebp 10b8fb: 83 ec 28 sub $0x28,%esp 10b8fe: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b901: 85 c0 test %eax,%eax 10b903: 74 2f je 10b934 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b905: 51 push %ecx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); 10b906: 8d 55 f4 lea -0xc(%ebp),%edx 10b909: 52 push %edx 10b90a: ff 30 pushl (%eax) 10b90c: 68 20 90 12 00 push $0x129020 10b911: e8 56 26 00 00 call 10df6c <_Objects_Get> switch ( location ) { 10b916: 83 c4 10 add $0x10,%esp 10b919: 8b 55 f4 mov -0xc(%ebp),%edx 10b91c: 85 d2 test %edx,%edx 10b91e: 75 14 jne 10b934 case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10b920: 8b 48 58 mov 0x58(%eax),%ecx 10b923: 85 c9 test %ecx,%ecx 10b925: 74 15 je 10b93c _Thread_Enable_dispatch(); 10b927: e8 d0 2e 00 00 call 10e7fc <_Thread_Enable_dispatch> return EBUSY; 10b92c: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b931: c9 leave 10b932: c3 ret 10b933: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10b934: b8 16 00 00 00 mov $0x16,%eax } 10b939: c9 leave 10b93a: c3 ret 10b93b: 90 nop <== NOT EXECUTED if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b93c: 83 ec 08 sub $0x8,%esp 10b93f: 50 push %eax 10b940: 68 20 90 12 00 push $0x129020 10b945: 89 45 e4 mov %eax,-0x1c(%ebp) 10b948: e8 e3 21 00 00 call 10db30 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b94d: 58 pop %eax 10b94e: 5a pop %edx 10b94f: 8b 45 e4 mov -0x1c(%ebp),%eax 10b952: 50 push %eax 10b953: 68 20 90 12 00 push $0x129020 10b958: e8 cf 24 00 00 call 10de2c <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10b95d: e8 9a 2e 00 00 call 10e7fc <_Thread_Enable_dispatch> return 0; 10b962: 83 c4 10 add $0x10,%esp 10b965: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b967: c9 leave 10b968: c3 ret =============================================================================== 0010b96c : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10b96c: 55 push %ebp 10b96d: 89 e5 mov %esp,%ebp 10b96f: 57 push %edi 10b970: 56 push %esi 10b971: 53 push %ebx 10b972: 83 ec 2c sub $0x2c,%esp 10b975: 8b 5d 08 mov 0x8(%ebp),%ebx 10b978: 8b 7d 0c mov 0xc(%ebp),%edi 10b97b: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10b97e: 85 db test %ebx,%ebx 10b980: 0f 84 82 00 00 00 je 10ba08 return EINVAL; if ( count == 0 ) 10b986: 85 f6 test %esi,%esi 10b988: 74 7e je 10ba08 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b98a: 85 ff test %edi,%edi 10b98c: 0f 84 92 00 00 00 je 10ba24 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b992: 8b 17 mov (%edi),%edx 10b994: 85 d2 test %edx,%edx 10b996: 74 70 je 10ba08 return EINVAL; switch ( the_attr->process_shared ) { 10b998: 8b 47 04 mov 0x4(%edi),%eax 10b99b: 85 c0 test %eax,%eax 10b99d: 75 69 jne 10ba08 <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10b99f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10b9a6: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b9a9: a1 f4 8b 12 00 mov 0x128bf4,%eax 10b9ae: 40 inc %eax 10b9af: a3 f4 8b 12 00 mov %eax,0x128bf4 * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) _Objects_Allocate( &_POSIX_Barrier_Information ); 10b9b4: 83 ec 0c sub $0xc,%esp 10b9b7: 68 20 90 12 00 push $0x129020 10b9bc: e8 f3 20 00 00 call 10dab4 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10b9c1: 83 c4 10 add $0x10,%esp 10b9c4: 85 c0 test %eax,%eax 10b9c6: 74 50 je 10ba18 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10b9c8: 83 ec 08 sub $0x8,%esp 10b9cb: 8d 55 e0 lea -0x20(%ebp),%edx 10b9ce: 52 push %edx 10b9cf: 8d 50 10 lea 0x10(%eax),%edx 10b9d2: 52 push %edx 10b9d3: 89 45 d4 mov %eax,-0x2c(%ebp) 10b9d6: e8 cd 16 00 00 call 10d0a8 <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b9db: 8b 45 d4 mov -0x2c(%ebp),%eax 10b9de: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b9e1: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b9e4: 8b 0d 3c 90 12 00 mov 0x12903c,%ecx 10b9ea: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b9ed: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10b9f4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b9f6: e8 01 2e 00 00 call 10e7fc <_Thread_Enable_dispatch> return 0; 10b9fb: 83 c4 10 add $0x10,%esp 10b9fe: 31 c0 xor %eax,%eax } 10ba00: 8d 65 f4 lea -0xc(%ebp),%esp 10ba03: 5b pop %ebx 10ba04: 5e pop %esi 10ba05: 5f pop %edi 10ba06: c9 leave 10ba07: c3 ret switch ( the_attr->process_shared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10ba08: b8 16 00 00 00 mov $0x16,%eax * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 10ba0d: 8d 65 f4 lea -0xc(%ebp),%esp 10ba10: 5b pop %ebx 10ba11: 5e pop %esi 10ba12: 5f pop %edi 10ba13: c9 leave 10ba14: c3 ret 10ba15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 10ba18: e8 df 2d 00 00 call 10e7fc <_Thread_Enable_dispatch> return EAGAIN; 10ba1d: b8 0b 00 00 00 mov $0xb,%eax 10ba22: eb e9 jmp 10ba0d * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10ba24: 83 ec 0c sub $0xc,%esp 10ba27: 8d 7d d8 lea -0x28(%ebp),%edi 10ba2a: 57 push %edi 10ba2b: e8 7c fe ff ff call 10b8ac 10ba30: 83 c4 10 add $0x10,%esp 10ba33: e9 5a ff ff ff jmp 10b992 =============================================================================== 0010ba38 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10ba38: 55 push %ebp 10ba39: 89 e5 mov %esp,%ebp 10ba3b: 83 ec 18 sub $0x18,%esp 10ba3e: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10ba41: 85 c0 test %eax,%eax 10ba43: 74 4f je 10ba94 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10ba45: 51 push %ecx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); 10ba46: 8d 55 f4 lea -0xc(%ebp),%edx 10ba49: 52 push %edx 10ba4a: ff 30 pushl (%eax) 10ba4c: 68 20 90 12 00 push $0x129020 10ba51: e8 16 25 00 00 call 10df6c <_Objects_Get> switch ( location ) { 10ba56: 83 c4 10 add $0x10,%esp 10ba59: 8b 55 f4 mov -0xc(%ebp),%edx 10ba5c: 85 d2 test %edx,%edx 10ba5e: 75 34 jne 10ba94 case OBJECTS_LOCAL: _CORE_barrier_Wait( 10ba60: 83 ec 0c sub $0xc,%esp 10ba63: 6a 00 push $0x0 10ba65: 6a 00 push $0x0 10ba67: 6a 01 push $0x1 10ba69: ff 70 08 pushl 0x8(%eax) 10ba6c: 83 c0 10 add $0x10,%eax 10ba6f: 50 push %eax 10ba70: e8 67 16 00 00 call 10d0dc <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10ba75: 83 c4 20 add $0x20,%esp 10ba78: e8 7f 2d 00 00 call 10e7fc <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10ba7d: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10ba80: a1 b8 91 12 00 mov 0x1291b8,%eax true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10ba85: ff 70 34 pushl 0x34(%eax) 10ba88: e8 1f 5b 00 00 call 1115ac <_POSIX_Barrier_Translate_core_barrier_return_code> 10ba8d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10ba90: c9 leave 10ba91: c3 ret 10ba92: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10ba94: b8 16 00 00 00 mov $0x16,%eax } 10ba99: c9 leave 10ba9a: c3 ret =============================================================================== 0010b864 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10b864: 55 push %ebp 10b865: 89 e5 mov %esp,%ebp 10b867: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b86a: 85 c0 test %eax,%eax 10b86c: 74 12 je 10b880 10b86e: 8b 10 mov (%eax),%edx 10b870: 85 d2 test %edx,%edx 10b872: 74 0c je 10b880 return EINVAL; attr->is_initialized = false; 10b874: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10b87a: 31 c0 xor %eax,%eax } 10b87c: c9 leave 10b87d: c3 ret 10b87e: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10b880: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10b885: c9 leave 10b886: c3 ret =============================================================================== 0010b8ac : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 10b8ac: 55 push %ebp 10b8ad: 89 e5 mov %esp,%ebp 10b8af: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b8b2: 85 c0 test %eax,%eax 10b8b4: 74 12 je 10b8c8 return EINVAL; attr->is_initialized = true; 10b8b6: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10b8bc: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) return 0; 10b8c3: 31 c0 xor %eax,%eax } 10b8c5: c9 leave 10b8c6: c3 ret 10b8c7: 90 nop <== NOT EXECUTED int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { if ( !attr ) return EINVAL; 10b8c8: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10b8cd: c9 leave 10b8ce: c3 ret =============================================================================== 0010b8d0 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10b8d0: 55 push %ebp 10b8d1: 89 e5 mov %esp,%ebp 10b8d3: 8b 45 08 mov 0x8(%ebp),%eax 10b8d6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b8d9: 85 c0 test %eax,%eax 10b8db: 74 0b je 10b8e8 return EINVAL; if ( !attr->is_initialized ) 10b8dd: 8b 08 mov (%eax),%ecx 10b8df: 85 c9 test %ecx,%ecx 10b8e1: 74 05 je 10b8e8 return EINVAL; switch ( pshared ) { 10b8e3: 83 fa 01 cmp $0x1,%edx 10b8e6: 76 08 jbe 10b8f0 case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10b8e8: b8 16 00 00 00 mov $0x16,%eax } } 10b8ed: c9 leave 10b8ee: c3 ret 10b8ef: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b8f0: 89 50 04 mov %edx,0x4(%eax) return 0; 10b8f3: 31 c0 xor %eax,%eax default: return EINVAL; } } 10b8f5: c9 leave 10b8f6: c3 ret =============================================================================== 0010b114 : */ int pthread_cancel( pthread_t thread ) { 10b114: 55 push %ebp 10b115: 89 e5 mov %esp,%ebp 10b117: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10b11a: a1 54 8d 12 00 mov 0x128d54,%eax 10b11f: 85 c0 test %eax,%eax 10b121: 74 09 je 10b12c return EPROTO; 10b123: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b128: c9 leave 10b129: c3 ret 10b12a: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 10b12c: 51 push %ecx */ if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); 10b12d: 8d 45 f4 lea -0xc(%ebp),%eax 10b130: 50 push %eax 10b131: ff 75 08 pushl 0x8(%ebp) 10b134: 68 40 8a 12 00 push $0x128a40 10b139: e8 22 21 00 00 call 10d260 <_Objects_Get> switch ( location ) { 10b13e: 83 c4 10 add $0x10,%esp 10b141: 8b 55 f4 mov -0xc(%ebp),%edx 10b144: 85 d2 test %edx,%edx 10b146: 75 20 jne 10b168 case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10b148: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10b14e: c7 82 e0 00 00 00 01 movl $0x1,0xe0(%edx) 10b155: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10b158: 83 ec 0c sub $0xc,%esp 10b15b: 50 push %eax 10b15c: e8 97 54 00 00 call 1105f8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> return 0; 10b161: 83 c4 10 add $0x10,%esp 10b164: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b166: c9 leave 10b167: c3 ret #endif case OBJECTS_ERROR: break; } return EINVAL; 10b168: b8 16 00 00 00 mov $0x16,%eax } 10b16d: c9 leave 10b16e: c3 ret =============================================================================== 0010af84 : */ void pthread_cleanup_pop( int execute ) { 10af84: 55 push %ebp 10af85: 89 e5 mov %esp,%ebp 10af87: 57 push %edi 10af88: 56 push %esi 10af89: 53 push %ebx 10af8a: 83 ec 0c sub $0xc,%esp 10af8d: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10af90: a1 58 7e 12 00 mov 0x127e58,%eax 10af95: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10af9b: 8b 15 94 78 12 00 mov 0x127894,%edx 10afa1: 42 inc %edx 10afa2: 89 15 94 78 12 00 mov %edx,0x127894 * 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 ); 10afa8: 9c pushf 10afa9: fa cli 10afaa: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10afab: 8d 90 e8 00 00 00 lea 0xe8(%eax),%edx if ( _Chain_Is_empty( handler_stack ) ) { 10afb1: 39 90 e4 00 00 00 cmp %edx,0xe4(%eax) 10afb7: 74 43 je 10affc _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10afb9: 8b 42 04 mov 0x4(%edx),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10afbc: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10afbe: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10afc1: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10afc4: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10afc6: 56 push %esi 10afc7: 9d popf 10afc8: 8b 70 08 mov 0x8(%eax),%esi 10afcb: 8b 78 0c mov 0xc(%eax),%edi tmp_handler = *handler; _Workspace_Free( handler ); 10afce: 83 ec 0c sub $0xc,%esp 10afd1: 50 push %eax 10afd2: e8 7d 39 00 00 call 10e954 <_Workspace_Free> _Thread_Enable_dispatch(); 10afd7: e8 80 27 00 00 call 10d75c <_Thread_Enable_dispatch> if ( execute ) 10afdc: 83 c4 10 add $0x10,%esp 10afdf: 85 db test %ebx,%ebx 10afe1: 75 09 jne 10afec (*tmp_handler.routine)( tmp_handler.arg ); } 10afe3: 8d 65 f4 lea -0xc(%ebp),%esp 10afe6: 5b pop %ebx 10afe7: 5e pop %esi 10afe8: 5f pop %edi 10afe9: c9 leave 10afea: c3 ret 10afeb: 90 nop <== NOT EXECUTED _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10afec: 89 7d 08 mov %edi,0x8(%ebp) 10afef: 89 f0 mov %esi,%eax } 10aff1: 8d 65 f4 lea -0xc(%ebp),%esp 10aff4: 5b pop %ebx 10aff5: 5e pop %esi 10aff6: 5f pop %edi 10aff7: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10aff8: ff e0 jmp *%eax 10affa: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10affc: e8 5b 27 00 00 call 10d75c <_Thread_Enable_dispatch> _ISR_Enable( level ); 10b001: 56 push %esi 10b002: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10b003: 8d 65 f4 lea -0xc(%ebp),%esp 10b006: 5b pop %ebx 10b007: 5e pop %esi 10b008: 5f pop %edi 10b009: c9 leave 10b00a: c3 ret =============================================================================== 0010b340 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10b340: 55 push %ebp 10b341: 89 e5 mov %esp,%ebp 10b343: 56 push %esi 10b344: 53 push %ebx 10b345: 8b 5d 08 mov 0x8(%ebp),%ebx 10b348: 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 ) 10b34b: 85 db test %ebx,%ebx 10b34d: 74 4d je 10b39c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b34f: a1 14 8f 12 00 mov 0x128f14,%eax 10b354: 40 inc %eax 10b355: a3 14 8f 12 00 mov %eax,0x128f14 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10b35a: 83 ec 0c sub $0xc,%esp 10b35d: 6a 10 push $0x10 10b35f: e8 44 41 00 00 call 10f4a8 <_Workspace_Allocate> if ( handler ) { 10b364: 83 c4 10 add $0x10,%esp 10b367: 85 c0 test %eax,%eax 10b369: 74 25 je 10b390 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b36b: 8b 15 d8 94 12 00 mov 0x1294d8,%edx handler_stack = &thread_support->Cancellation_Handlers; 10b371: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10b377: 81 c2 e4 00 00 00 add $0xe4,%edx handler->routine = routine; 10b37d: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10b380: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10b383: 83 ec 08 sub $0x8,%esp 10b386: 50 push %eax 10b387: 52 push %edx 10b388: e8 b3 17 00 00 call 10cb40 <_Chain_Append> 10b38d: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10b390: 8d 65 f8 lea -0x8(%ebp),%esp 10b393: 5b pop %ebx 10b394: 5e pop %esi 10b395: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10b396: e9 a1 2e 00 00 jmp 10e23c <_Thread_Enable_dispatch> 10b39b: 90 nop <== NOT EXECUTED } 10b39c: 8d 65 f8 lea -0x8(%ebp),%esp 10b39f: 5b pop %ebx 10b3a0: 5e pop %esi 10b3a1: c9 leave 10b3a2: c3 ret =============================================================================== 0010c034 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10c034: 55 push %ebp 10c035: 89 e5 mov %esp,%ebp 10c037: 53 push %ebx 10c038: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c03b: 8d 45 f4 lea -0xc(%ebp),%eax 10c03e: 50 push %eax 10c03f: ff 75 08 pushl 0x8(%ebp) 10c042: e8 65 00 00 00 call 10c0ac <_POSIX_Condition_variables_Get> 10c047: 89 c3 mov %eax,%ebx switch ( location ) { 10c049: 83 c4 10 add $0x10,%esp 10c04c: 8b 4d f4 mov -0xc(%ebp),%ecx 10c04f: 85 c9 test %ecx,%ecx 10c051: 75 25 jne 10c078 case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10c053: 83 ec 0c sub $0xc,%esp 10c056: 8d 40 18 lea 0x18(%eax),%eax 10c059: 50 push %eax 10c05a: e8 bd 3b 00 00 call 10fc1c <_Thread_queue_First> 10c05f: 83 c4 10 add $0x10,%esp 10c062: 85 c0 test %eax,%eax 10c064: 74 1e je 10c084 _Thread_Enable_dispatch(); 10c066: e8 69 34 00 00 call 10f4d4 <_Thread_Enable_dispatch> return EBUSY; 10c06b: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c070: 8b 5d fc mov -0x4(%ebp),%ebx 10c073: c9 leave 10c074: c3 ret 10c075: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10c078: b8 16 00 00 00 mov $0x16,%eax } 10c07d: 8b 5d fc mov -0x4(%ebp),%ebx 10c080: c9 leave 10c081: c3 ret 10c082: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10c084: 83 ec 08 sub $0x8,%esp 10c087: 53 push %ebx 10c088: 68 60 a0 12 00 push $0x12a060 10c08d: e8 76 27 00 00 call 10e808 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10c092: 58 pop %eax 10c093: 5a pop %edx 10c094: 53 push %ebx 10c095: 68 60 a0 12 00 push $0x12a060 10c09a: e8 65 2a 00 00 call 10eb04 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10c09f: e8 30 34 00 00 call 10f4d4 <_Thread_Enable_dispatch> return 0; 10c0a4: 83 c4 10 add $0x10,%esp 10c0a7: 31 c0 xor %eax,%eax 10c0a9: eb d2 jmp 10c07d =============================================================================== 0010c100 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10c100: 55 push %ebp 10c101: 89 e5 mov %esp,%ebp 10c103: 53 push %ebx 10c104: 83 ec 14 sub $0x14,%esp 10c107: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c10a: 85 db test %ebx,%ebx 10c10c: 0f 84 86 00 00 00 je 10c198 else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10c112: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10c116: 74 06 je 10c11e <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10c118: 8b 03 mov (%ebx),%eax 10c11a: 85 c0 test %eax,%eax 10c11c: 75 0a jne 10c128 return EINVAL; 10c11e: b8 16 00 00 00 mov $0x16,%eax *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 10c123: 8b 5d fc mov -0x4(%ebp),%ebx 10c126: c9 leave 10c127: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c128: a1 94 9b 12 00 mov 0x129b94,%eax 10c12d: 40 inc %eax 10c12e: a3 94 9b 12 00 mov %eax,0x129b94 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); 10c133: 83 ec 0c sub $0xc,%esp 10c136: 68 60 a0 12 00 push $0x12a060 10c13b: e8 4c 26 00 00 call 10e78c <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10c140: 83 c4 10 add $0x10,%esp 10c143: 85 c0 test %eax,%eax 10c145: 74 5d je 10c1a4 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10c147: 8b 53 04 mov 0x4(%ebx),%edx 10c14a: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c14d: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) _Thread_queue_Initialize( 10c154: 6a 74 push $0x74 10c156: 68 00 08 00 10 push $0x10000800 10c15b: 6a 00 push $0x0 10c15d: 8d 50 18 lea 0x18(%eax),%edx 10c160: 52 push %edx 10c161: 89 45 f4 mov %eax,-0xc(%ebp) 10c164: e8 2f 3b 00 00 call 10fc98 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c169: 8b 45 f4 mov -0xc(%ebp),%eax 10c16c: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10c16f: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c172: 8b 0d 7c a0 12 00 mov 0x12a07c,%ecx 10c178: 89 04 99 mov %eax,(%ecx,%ebx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10c17b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10c182: 8b 45 08 mov 0x8(%ebp),%eax 10c185: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c187: e8 48 33 00 00 call 10f4d4 <_Thread_Enable_dispatch> return 0; 10c18c: 83 c4 10 add $0x10,%esp 10c18f: 31 c0 xor %eax,%eax } 10c191: 8b 5d fc mov -0x4(%ebp),%ebx 10c194: c9 leave 10c195: c3 ret 10c196: 66 90 xchg %ax,%ax <== NOT EXECUTED { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; else the_attr = &_POSIX_Condition_variables_Default_attributes; 10c198: bb 3c 32 12 00 mov $0x12323c,%ebx 10c19d: e9 70 ff ff ff jmp 10c112 10c1a2: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10c1a4: e8 2b 33 00 00 call 10f4d4 <_Thread_Enable_dispatch> return ENOMEM; 10c1a9: b8 0c 00 00 00 mov $0xc,%eax 10c1ae: e9 70 ff ff ff jmp 10c123 =============================================================================== 0010c238 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 10c238: 55 push %ebp 10c239: 89 e5 mov %esp,%ebp 10c23b: 83 ec 20 sub $0x20,%esp * 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. */ already_timedout = false; status = _POSIX_Absolute_timeout_to_ticks(abstime, &ticks); 10c23e: 8d 45 f4 lea -0xc(%ebp),%eax 10c241: 50 push %eax 10c242: ff 75 10 pushl 0x10(%ebp) 10c245: e8 8a 04 00 00 call 10c6d4 <_POSIX_Absolute_timeout_to_ticks> if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10c24a: 83 c4 10 add $0x10,%esp 10c24d: 85 c0 test %eax,%eax 10c24f: 74 1f je 10c270 return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10c251: 48 dec %eax status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) already_timedout = true; return _POSIX_Condition_variables_Wait_support( 10c252: 83 f8 01 cmp $0x1,%eax 10c255: 0f 96 c0 setbe %al 10c258: 0f b6 c0 movzbl %al,%eax 10c25b: 50 push %eax 10c25c: ff 75 f4 pushl -0xc(%ebp) 10c25f: ff 75 0c pushl 0xc(%ebp) 10c262: ff 75 08 pushl 0x8(%ebp) 10c265: e8 26 00 00 00 call 10c290 <_POSIX_Condition_variables_Wait_support> 10c26a: 83 c4 10 add $0x10,%esp cond, mutex, ticks, already_timedout ); } 10c26d: c9 leave 10c26e: c3 ret 10c26f: 90 nop <== NOT EXECUTED * status into the appropriate error. */ already_timedout = false; status = _POSIX_Absolute_timeout_to_ticks(abstime, &ticks); if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10c270: b8 16 00 00 00 mov $0x16,%eax cond, mutex, ticks, already_timedout ); } 10c275: c9 leave 10c276: c3 ret =============================================================================== 0010bf90 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10bf90: 55 push %ebp 10bf91: 89 e5 mov %esp,%ebp 10bf93: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10bf96: 85 c0 test %eax,%eax 10bf98: 74 12 je 10bfac 10bf9a: 8b 10 mov (%eax),%edx 10bf9c: 85 d2 test %edx,%edx 10bf9e: 74 0c je 10bfac <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10bfa0: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10bfa6: 31 c0 xor %eax,%eax } 10bfa8: c9 leave 10bfa9: c3 ret 10bfaa: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10bfac: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10bfb1: c9 leave 10bfb2: c3 ret =============================================================================== 0010bfb4 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10bfb4: 55 push %ebp 10bfb5: 89 e5 mov %esp,%ebp 10bfb7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10bfba: 85 c0 test %eax,%eax 10bfbc: 74 0e je 10bfcc return EINVAL; *pshared = attr->process_shared; 10bfbe: 8b 50 04 mov 0x4(%eax),%edx 10bfc1: 8b 45 0c mov 0xc(%ebp),%eax 10bfc4: 89 10 mov %edx,(%eax) return 0; 10bfc6: 31 c0 xor %eax,%eax } 10bfc8: c9 leave 10bfc9: c3 ret 10bfca: 66 90 xchg %ax,%ax <== NOT EXECUTED const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) return EINVAL; 10bfcc: b8 16 00 00 00 mov $0x16,%eax *pshared = attr->process_shared; return 0; } 10bfd1: c9 leave 10bfd2: c3 ret =============================================================================== 0010bfd4 : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 10bfd4: 55 push %ebp 10bfd5: 89 e5 mov %esp,%ebp 10bfd7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10bfda: 85 c0 test %eax,%eax 10bfdc: 74 16 je 10bff4 return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 10bfde: 8b 15 3c 32 12 00 mov 0x12323c,%edx 10bfe4: 8b 0d 40 32 12 00 mov 0x123240,%ecx 10bfea: 89 10 mov %edx,(%eax) 10bfec: 89 48 04 mov %ecx,0x4(%eax) return 0; 10bfef: 31 c0 xor %eax,%eax } 10bff1: c9 leave 10bff2: c3 ret 10bff3: 90 nop <== NOT EXECUTED int pthread_condattr_init( pthread_condattr_t *attr ) { if ( !attr ) return EINVAL; 10bff4: b8 16 00 00 00 mov $0x16,%eax *attr = _POSIX_Condition_variables_Default_attributes; return 0; } 10bff9: c9 leave 10bffa: c3 ret =============================================================================== 0010bffc : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10bffc: 55 push %ebp 10bffd: 89 e5 mov %esp,%ebp 10bfff: 8b 45 08 mov 0x8(%ebp),%eax 10c002: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10c005: 85 c0 test %eax,%eax 10c007: 74 05 je 10c00e return EINVAL; switch ( pshared ) { 10c009: 83 fa 01 cmp $0x1,%edx 10c00c: 76 0a jbe 10c018 case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10c00e: b8 16 00 00 00 mov $0x16,%eax } } 10c013: c9 leave 10c014: c3 ret 10c015: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10c018: 89 50 04 mov %edx,0x4(%eax) return 0; 10c01b: 31 c0 xor %eax,%eax default: return EINVAL; } } 10c01d: c9 leave 10c01e: c3 ret =============================================================================== 0010b6b8 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10b6b8: 55 push %ebp 10b6b9: 89 e5 mov %esp,%ebp 10b6bb: 57 push %edi 10b6bc: 56 push %esi 10b6bd: 53 push %ebx 10b6be: 83 ec 5c sub $0x5c,%esp 10b6c1: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b6c4: 8b 75 10 mov 0x10(%ebp),%esi 10b6c7: 85 f6 test %esi,%esi 10b6c9: 0f 84 8d 01 00 00 je 10b85c return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b6cf: 85 db test %ebx,%ebx 10b6d1: 74 65 je 10b738 if ( !the_attr->is_initialized ) 10b6d3: 8b 0b mov (%ebx),%ecx 10b6d5: 85 c9 test %ecx,%ecx 10b6d7: 74 1e je 10b6f7 * 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) ) 10b6d9: 8b 53 04 mov 0x4(%ebx),%edx 10b6dc: 85 d2 test %edx,%edx 10b6de: 74 0a je 10b6ea 10b6e0: a1 b8 44 12 00 mov 0x1244b8,%eax 10b6e5: 39 43 08 cmp %eax,0x8(%ebx) 10b6e8: 72 0d jb 10b6f7 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 10b6ea: 8b 43 10 mov 0x10(%ebx),%eax 10b6ed: 83 f8 01 cmp $0x1,%eax 10b6f0: 74 4e je 10b740 10b6f2: 83 f8 02 cmp $0x2,%eax 10b6f5: 74 11 je 10b708 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; 10b6f7: ba 16 00 00 00 mov $0x16,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b6fc: 89 d0 mov %edx,%eax 10b6fe: 8d 65 f4 lea -0xc(%ebp),%esp 10b701: 5b pop %ebx 10b702: 5e pop %esi 10b703: 5f pop %edi 10b704: c9 leave 10b705: c3 ret 10b706: 66 90 xchg %ax,%ax <== NOT EXECUTED schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10b708: 8b 4b 14 mov 0x14(%ebx),%ecx 10b70b: 89 4d b0 mov %ecx,-0x50(%ebp) schedparam = the_attr->schedparam; 10b70e: 8d 45 c4 lea -0x3c(%ebp),%eax 10b711: 89 45 b4 mov %eax,-0x4c(%ebp) 10b714: 8d 73 18 lea 0x18(%ebx),%esi 10b717: b9 07 00 00 00 mov $0x7,%ecx 10b71c: 89 c7 mov %eax,%edi 10b71e: 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 ) 10b720: 8b 43 0c mov 0xc(%ebx),%eax 10b723: 85 c0 test %eax,%eax 10b725: 74 49 je 10b770 <== ALWAYS TAKEN return ENOTSUP; 10b727: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b72c: 89 d0 mov %edx,%eax 10b72e: 8d 65 f4 lea -0xc(%ebp),%esp 10b731: 5b pop %ebx 10b732: 5e pop %esi 10b733: 5f pop %edi 10b734: c9 leave 10b735: c3 ret 10b736: 66 90 xchg %ax,%ax <== NOT EXECUTED int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b738: bb 20 1e 12 00 mov $0x121e20,%ebx 10b73d: eb 94 jmp 10b6d3 10b73f: 90 nop <== NOT EXECUTED * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b740: a1 18 8d 12 00 mov 0x128d18,%eax 10b745: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10b74b: 8b 8e 84 00 00 00 mov 0x84(%esi),%ecx 10b751: 89 4d b0 mov %ecx,-0x50(%ebp) schedparam = api->schedparam; 10b754: 8d 45 c4 lea -0x3c(%ebp),%eax 10b757: 89 45 b4 mov %eax,-0x4c(%ebp) 10b75a: 81 c6 88 00 00 00 add $0x88,%esi 10b760: b9 07 00 00 00 mov $0x7,%ecx 10b765: 89 c7 mov %eax,%edi 10b767: 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 ) 10b769: 8b 43 0c mov 0xc(%ebx),%eax 10b76c: 85 c0 test %eax,%eax 10b76e: 75 b7 jne 10b727 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10b770: 83 ec 0c sub $0xc,%esp 10b773: ff 75 c4 pushl -0x3c(%ebp) 10b776: e8 bd 61 00 00 call 111938 <_POSIX_Priority_Is_valid> 10b77b: 83 c4 10 add $0x10,%esp 10b77e: 84 c0 test %al,%al 10b780: 0f 84 71 ff ff ff je 10b6f7 <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10b786: 8b 7d c4 mov -0x3c(%ebp),%edi RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10b789: 0f b6 35 bc 44 12 00 movzbl 0x1244bc,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10b790: 8d 45 e0 lea -0x20(%ebp),%eax 10b793: 50 push %eax 10b794: 8d 45 e4 lea -0x1c(%ebp),%eax 10b797: 50 push %eax 10b798: ff 75 b4 pushl -0x4c(%ebp) 10b79b: ff 75 b0 pushl -0x50(%ebp) 10b79e: e8 b1 61 00 00 call 111954 <_POSIX_Thread_Translate_sched_param> 10b7a3: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10b7a5: 83 c4 10 add $0x10,%esp 10b7a8: 85 c0 test %eax,%eax 10b7aa: 0f 85 4c ff ff ff jne 10b6fc #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b7b0: 83 ec 0c sub $0xc,%esp 10b7b3: ff 35 04 88 12 00 pushl 0x128804 10b7b9: 89 45 a0 mov %eax,-0x60(%ebp) 10b7bc: e8 a7 17 00 00 call 10cf68 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10b7c1: c7 04 24 00 8a 12 00 movl $0x128a00,(%esp) 10b7c8: e8 c7 21 00 00 call 10d994 <_Objects_Allocate> 10b7cd: 89 45 ac mov %eax,-0x54(%ebp) * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10b7d0: 83 c4 10 add $0x10,%esp 10b7d3: 85 c0 test %eax,%eax 10b7d5: 8b 55 a0 mov -0x60(%ebp),%edx 10b7d8: 0f 84 0f 01 00 00 je 10b8ed /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10b7de: 8b 4d e0 mov -0x20(%ebp),%ecx 10b7e1: 8b 45 e4 mov -0x1c(%ebp),%eax 10b7e4: 89 45 a4 mov %eax,-0x5c(%ebp) 10b7e7: 8b 43 08 mov 0x8(%ebx),%eax 10b7ea: 89 45 a8 mov %eax,-0x58(%ebp) 10b7ed: a1 b8 44 12 00 mov 0x1244b8,%eax 10b7f2: d1 e0 shl %eax 10b7f4: 3b 45 a8 cmp -0x58(%ebp),%eax 10b7f7: 73 03 jae 10b7fc 10b7f9: 8b 45 a8 mov -0x58(%ebp),%eax 10b7fc: 83 ec 04 sub $0x4,%esp 10b7ff: 6a 00 push $0x0 10b801: 6a 00 push $0x0 10b803: 51 push %ecx 10b804: ff 75 a4 pushl -0x5c(%ebp) 10b807: 6a 01 push $0x1 10b809: 81 e6 ff 00 00 00 and $0xff,%esi 10b80f: 29 fe sub %edi,%esi 10b811: 56 push %esi 10b812: 6a 01 push $0x1 10b814: 50 push %eax 10b815: ff 73 04 pushl 0x4(%ebx) 10b818: ff 75 ac pushl -0x54(%ebp) 10b81b: 68 00 8a 12 00 push $0x128a00 10b820: 89 55 a0 mov %edx,-0x60(%ebp) 10b823: e8 4c 2f 00 00 call 10e774 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10b828: 83 c4 30 add $0x30,%esp 10b82b: 84 c0 test %al,%al 10b82d: 8b 55 a0 mov -0x60(%ebp),%edx 10b830: 75 34 jne 10b866 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10b832: 83 ec 08 sub $0x8,%esp 10b835: ff 75 ac pushl -0x54(%ebp) 10b838: 68 00 8a 12 00 push $0x128a00 10b83d: e8 ca 24 00 00 call 10dd0c <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b842: 59 pop %ecx 10b843: ff 35 04 88 12 00 pushl 0x128804 10b849: e8 62 17 00 00 call 10cfb0 <_API_Mutex_Unlock> return EAGAIN; 10b84e: 83 c4 10 add $0x10,%esp 10b851: ba 0b 00 00 00 mov $0xb,%edx 10b856: e9 a1 fe ff ff jmp 10b6fc 10b85b: 90 nop <== NOT EXECUTED struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) return EFAULT; 10b85c: ba 0e 00 00 00 mov $0xe,%edx 10b861: e9 96 fe ff ff jmp 10b6fc } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b866: 8b 4d ac mov -0x54(%ebp),%ecx 10b869: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx 10b86f: 89 4d a8 mov %ecx,-0x58(%ebp) api->Attributes = *the_attr; 10b872: b9 10 00 00 00 mov $0x10,%ecx 10b877: 8b 7d a8 mov -0x58(%ebp),%edi 10b87a: 89 de mov %ebx,%esi 10b87c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10b87e: 8b 43 3c mov 0x3c(%ebx),%eax 10b881: 8b 4d a8 mov -0x58(%ebp),%ecx 10b884: 89 41 40 mov %eax,0x40(%ecx) api->schedpolicy = schedpolicy; 10b887: 8b 45 b0 mov -0x50(%ebp),%eax 10b88a: 89 81 84 00 00 00 mov %eax,0x84(%ecx) api->schedparam = schedparam; 10b890: 89 cf mov %ecx,%edi 10b892: 81 c7 88 00 00 00 add $0x88,%edi 10b898: b9 07 00 00 00 mov $0x7,%ecx 10b89d: 8b 75 b4 mov -0x4c(%ebp),%esi 10b8a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10b8a2: 83 ec 0c sub $0xc,%esp 10b8a5: 6a 00 push $0x0 10b8a7: ff 75 14 pushl 0x14(%ebp) 10b8aa: ff 75 10 pushl 0x10(%ebp) 10b8ad: 6a 01 push $0x1 10b8af: ff 75 ac pushl -0x54(%ebp) 10b8b2: 89 55 a0 mov %edx,-0x60(%ebp) 10b8b5: e8 52 39 00 00 call 10f20c <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10b8ba: 83 c4 20 add $0x20,%esp 10b8bd: 83 7d b0 04 cmpl $0x4,-0x50(%ebp) 10b8c1: 8b 55 a0 mov -0x60(%ebp),%edx 10b8c4: 74 42 je 10b908 } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10b8c6: 8b 45 ac mov -0x54(%ebp),%eax 10b8c9: 8b 48 08 mov 0x8(%eax),%ecx 10b8cc: 8b 45 08 mov 0x8(%ebp),%eax 10b8cf: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10b8d1: 83 ec 0c sub $0xc,%esp 10b8d4: ff 35 04 88 12 00 pushl 0x128804 10b8da: 89 55 a0 mov %edx,-0x60(%ebp) 10b8dd: e8 ce 16 00 00 call 10cfb0 <_API_Mutex_Unlock> return 0; 10b8e2: 83 c4 10 add $0x10,%esp 10b8e5: 8b 55 a0 mov -0x60(%ebp),%edx 10b8e8: e9 0f fe ff ff jmp 10b6fc * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b8ed: 83 ec 0c sub $0xc,%esp 10b8f0: ff 35 04 88 12 00 pushl 0x128804 10b8f6: e8 b5 16 00 00 call 10cfb0 <_API_Mutex_Unlock> return EAGAIN; 10b8fb: 83 c4 10 add $0x10,%esp 10b8fe: ba 0b 00 00 00 mov $0xb,%edx 10b903: e9 f4 fd ff ff jmp 10b6fc return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b908: 83 ec 0c sub $0xc,%esp &api->Sporadic_timer, _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ) 10b90b: 8b 45 a8 mov -0x58(%ebp),%eax 10b90e: 05 90 00 00 00 add $0x90,%eax return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b913: 50 push %eax 10b914: e8 e7 3a 00 00 call 10f400 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b919: 8b 4d a8 mov -0x58(%ebp),%ecx 10b91c: 89 81 b4 00 00 00 mov %eax,0xb4(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b922: 58 pop %eax 10b923: 5a pop %edx 10b924: 89 c8 mov %ecx,%eax 10b926: 05 a8 00 00 00 add $0xa8,%eax 10b92b: 50 push %eax 10b92c: 68 24 88 12 00 push $0x128824 10b931: e8 fa 3d 00 00 call 10f730 <_Watchdog_Insert> 10b936: 83 c4 10 add $0x10,%esp 10b939: 8b 55 a0 mov -0x60(%ebp),%edx 10b93c: eb 88 jmp 10b8c6 =============================================================================== 0010b7cc : #include int pthread_detach( pthread_t thread ) { 10b7cc: 55 push %ebp 10b7cd: 89 e5 mov %esp,%ebp 10b7cf: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); 10b7d2: 8d 45 f4 lea -0xc(%ebp),%eax pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 10b7d5: 50 push %eax 10b7d6: ff 75 08 pushl 0x8(%ebp) 10b7d9: 68 80 95 12 00 push $0x129580 10b7de: e8 55 23 00 00 call 10db38 <_Objects_Get> switch ( location ) { 10b7e3: 83 c4 10 add $0x10,%esp 10b7e6: 8b 55 f4 mov -0xc(%ebp),%edx 10b7e9: 85 d2 test %edx,%edx 10b7eb: 75 17 jne 10b804 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10b7ed: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b7f3: c7 40 40 00 00 00 00 movl $0x0,0x40(%eax) _Thread_Enable_dispatch(); 10b7fa: e8 c9 2b 00 00 call 10e3c8 <_Thread_Enable_dispatch> return 0; 10b7ff: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b801: c9 leave 10b802: c3 ret 10b803: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10b804: b8 03 00 00 00 mov $0x3,%eax } 10b809: c9 leave 10b80a: c3 ret =============================================================================== 00112dfc : } void pthread_exit( void *value_ptr ) { 112dfc: 55 push %ebp 112dfd: 89 e5 mov %esp,%ebp 112dff: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 112e02: ff 75 08 pushl 0x8(%ebp) 112e05: ff 35 98 6a 12 00 pushl 0x126a98 112e0b: e8 88 ff ff ff call 112d98 <_POSIX_Thread_Exit> 112e10: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 112e13: c9 leave <== NOT EXECUTED 112e14: c3 ret <== NOT EXECUTED =============================================================================== 0010d8a0 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10d8a0: 55 push %ebp 10d8a1: 89 e5 mov %esp,%ebp 10d8a3: 57 push %edi 10d8a4: 56 push %esi 10d8a5: 53 push %ebx 10d8a6: 83 ec 1c sub $0x1c,%esp 10d8a9: 8b 7d 0c mov 0xc(%ebp),%edi 10d8ac: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10d8af: 85 ff test %edi,%edi 10d8b1: 74 69 je 10d91c <== NEVER TAKEN 10d8b3: 85 db test %ebx,%ebx 10d8b5: 74 65 je 10d91c <== NEVER TAKEN pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 10d8b7: 51 push %ecx return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); 10d8b8: 8d 45 e4 lea -0x1c(%ebp),%eax 10d8bb: 50 push %eax 10d8bc: ff 75 08 pushl 0x8(%ebp) 10d8bf: 68 40 c6 12 00 push $0x12c640 10d8c4: e8 ff 23 00 00 call 10fcc8 <_Objects_Get> switch ( location ) { 10d8c9: 83 c4 10 add $0x10,%esp 10d8cc: 8b 55 e4 mov -0x1c(%ebp),%edx 10d8cf: 85 d2 test %edx,%edx 10d8d1: 75 39 jne 10d90c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d8d3: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10d8d9: 8b 96 84 00 00 00 mov 0x84(%esi),%edx 10d8df: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10d8e1: 81 c6 88 00 00 00 add $0x88,%esi 10d8e7: b9 07 00 00 00 mov $0x7,%ecx 10d8ec: 89 df mov %ebx,%edi 10d8ee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d8f0: 0f b6 15 9c 80 12 00 movzbl 0x12809c,%edx 10d8f7: 2b 50 14 sub 0x14(%eax),%edx 10d8fa: 89 13 mov %edx,(%ebx) param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10d8fc: e8 57 2c 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d901: 31 c0 xor %eax,%eax break; } return ESRCH; } 10d903: 8d 65 f4 lea -0xc(%ebp),%esp 10d906: 5b pop %ebx 10d907: 5e pop %esi 10d908: 5f pop %edi 10d909: c9 leave 10d90a: c3 ret 10d90b: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10d90c: b8 03 00 00 00 mov $0x3,%eax } 10d911: 8d 65 f4 lea -0xc(%ebp),%esp 10d914: 5b pop %ebx 10d915: 5e pop %esi 10d916: 5f pop %edi 10d917: c9 leave 10d918: c3 ret 10d919: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) return EINVAL; 10d91c: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10d921: 8d 65 f4 lea -0xc(%ebp),%esp 10d924: 5b pop %ebx 10d925: 5e pop %esi 10d926: 5f pop %edi 10d927: c9 leave 10d928: c3 ret =============================================================================== 0010b698 : */ void *pthread_getspecific( pthread_key_t key ) { 10b698: 55 push %ebp 10b699: 89 e5 mov %esp,%ebp 10b69b: 83 ec 2c sub $0x2c,%esp uint32_t api; uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); 10b69e: 8d 45 f4 lea -0xc(%ebp),%eax pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location ); 10b6a1: 50 push %eax 10b6a2: ff 75 08 pushl 0x8(%ebp) 10b6a5: 68 e0 97 12 00 push $0x1297e0 10b6aa: e8 9d 25 00 00 call 10dc4c <_Objects_Get> switch ( location ) { 10b6af: 83 c4 10 add $0x10,%esp 10b6b2: 8b 55 f4 mov -0xc(%ebp),%edx 10b6b5: 85 d2 test %edx,%edx 10b6b7: 75 2b jne 10b6e4 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10b6b9: 8b 15 18 99 12 00 mov 0x129918,%edx 10b6bf: 8b 4a 08 mov 0x8(%edx),%ecx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10b6c2: 89 ca mov %ecx,%edx 10b6c4: c1 ea 18 shr $0x18,%edx 10b6c7: 83 e2 07 and $0x7,%edx index = _Objects_Get_index( _Thread_Executing->Object.id ); 10b6ca: 0f b7 c9 movzwl %cx,%ecx key_data = (void *) the_key->Values[ api ][ index ]; 10b6cd: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10b6d1: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10b6d4: 89 45 e4 mov %eax,-0x1c(%ebp) 10b6d7: e8 00 2e 00 00 call 10e4dc <_Thread_Enable_dispatch> return key_data; 10b6dc: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10b6df: c9 leave 10b6e0: c3 ret 10b6e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return NULL; 10b6e4: 31 c0 xor %eax,%eax } 10b6e6: c9 leave 10b6e7: c3 ret =============================================================================== 001110e4 : int pthread_join( pthread_t thread, void **value_ptr ) { 1110e4: 55 push %ebp 1110e5: 89 e5 mov %esp,%ebp 1110e7: 53 push %ebx 1110e8: 83 ec 18 sub $0x18,%esp 1110eb: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); 1110ee: 8d 45 f4 lea -0xc(%ebp),%eax 1110f1: 50 push %eax 1110f2: ff 75 08 pushl 0x8(%ebp) 1110f5: 68 00 21 13 00 push $0x132100 1110fa: e8 09 24 00 00 call 113508 <_Objects_Get> switch ( location ) { 1110ff: 83 c4 10 add $0x10,%esp 111102: 8b 55 f4 mov -0xc(%ebp),%edx 111105: 85 d2 test %edx,%edx 111107: 74 0b je 111114 #endif case OBJECTS_ERROR: break; } return ESRCH; 111109: b8 03 00 00 00 mov $0x3,%eax } 11110e: 8b 5d fc mov -0x4(%ebp),%ebx 111111: c9 leave 111112: c3 ret 111113: 90 nop <== NOT EXECUTED the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111114: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 11111a: 8b 4a 40 mov 0x40(%edx),%ecx 11111d: 85 c9 test %ecx,%ecx 11111f: 74 43 je 111164 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 111121: 8b 0d 18 24 13 00 mov 0x132418,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 111127: 39 c8 cmp %ecx,%eax 111129: 74 49 je 111174 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 11112b: 8d 45 f0 lea -0x10(%ebp),%eax 11112e: 89 41 28 mov %eax,0x28(%ecx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 111131: c7 42 74 01 00 00 00 movl $0x1,0x74(%edx) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 111138: 50 push %eax 111139: 68 d0 45 11 00 push $0x1145d0 11113e: 6a 00 push $0x0 111140: 83 c2 44 add $0x44,%edx 111143: 52 push %edx 111144: e8 37 31 00 00 call 114280 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 111149: e8 4a 2c 00 00 call 113d98 <_Thread_Enable_dispatch> if ( value_ptr ) 11114e: 83 c4 10 add $0x10,%esp 111151: 85 db test %ebx,%ebx 111153: 74 2b je 111180 *value_ptr = return_pointer; 111155: 8b 45 f0 mov -0x10(%ebp),%eax 111158: 89 03 mov %eax,(%ebx) return 0; 11115a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 11115c: 8b 5d fc mov -0x4(%ebp),%ebx 11115f: c9 leave 111160: c3 ret 111161: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); 111164: e8 2f 2c 00 00 call 113d98 <_Thread_Enable_dispatch> return EINVAL; 111169: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 11116e: 8b 5d fc mov -0x4(%ebp),%ebx 111171: c9 leave 111172: c3 ret 111173: 90 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 111174: e8 1f 2c 00 00 call 113d98 <_Thread_Enable_dispatch> return EDEADLK; 111179: b8 2d 00 00 00 mov $0x2d,%eax 11117e: eb 8e jmp 11110e _Thread_Enable_dispatch(); if ( value_ptr ) *value_ptr = return_pointer; return 0; 111180: 31 c0 xor %eax,%eax 111182: eb 8a jmp 11110e =============================================================================== 0010b524 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10b524: 55 push %ebp 10b525: 89 e5 mov %esp,%ebp 10b527: 57 push %edi 10b528: 56 push %esi 10b529: 53 push %ebx 10b52a: 83 ec 28 sub $0x28,%esp 10b52d: a1 54 93 12 00 mov 0x129354,%eax 10b532: 40 inc %eax 10b533: a3 54 93 12 00 mov %eax,0x129354 * the inactive chain of free keys control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 10b538: 68 e0 97 12 00 push $0x1297e0 10b53d: e8 52 22 00 00 call 10d794 <_Objects_Allocate> 10b542: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10b544: 83 c4 10 add $0x10,%esp 10b547: 85 c0 test %eax,%eax 10b549: 74 79 je 10b5c4 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10b54b: 8b 45 0c mov 0xc(%ebp),%eax 10b54e: 89 46 10 mov %eax,0x10(%esi) * This is a bit more complex than one might initially expect because * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10b551: bb 01 00 00 00 mov $0x1,%ebx the_key->Values[ the_api ] = NULL; 10b556: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) 10b55d: 00 INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); 10b55e: 8b 04 9d 2c 93 12 00 mov 0x12932c(,%ebx,4),%eax 10b565: 8b 40 04 mov 0x4(%eax),%eax 10b568: 0f b7 40 10 movzwl 0x10(%eax),%eax true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10b56c: 8d 0c 85 04 00 00 00 lea 0x4(,%eax,4),%ecx (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 10b573: 83 ec 0c sub $0xc,%esp 10b576: 51 push %ecx 10b577: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b57a: e8 41 42 00 00 call 10f7c0 <_Workspace_Allocate> if ( !table ) { 10b57f: 83 c4 10 add $0x10,%esp 10b582: 85 c0 test %eax,%eax 10b584: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b587: 74 4f je 10b5d8 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10b589: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10b58d: 89 c7 mov %eax,%edi 10b58f: 31 c0 xor %eax,%eax 10b591: f3 aa rep stos %al,%es:(%edi) * This is a bit more complex than one might initially expect because * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10b593: 43 inc %ebx 10b594: 83 fb 04 cmp $0x4,%ebx 10b597: 75 bd jne 10b556 uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b599: 8b 46 08 mov 0x8(%esi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b59c: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b59f: 8b 15 fc 97 12 00 mov 0x1297fc,%edx 10b5a5: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b5a8: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 10b5af: 8b 55 08 mov 0x8(%ebp),%edx 10b5b2: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b5b4: e8 23 2f 00 00 call 10e4dc <_Thread_Enable_dispatch> return 0; 10b5b9: 31 c0 xor %eax,%eax } 10b5bb: 8d 65 f4 lea -0xc(%ebp),%esp 10b5be: 5b pop %ebx 10b5bf: 5e pop %esi 10b5c0: 5f pop %edi 10b5c1: c9 leave 10b5c2: c3 ret 10b5c3: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10b5c4: e8 13 2f 00 00 call 10e4dc <_Thread_Enable_dispatch> return EAGAIN; 10b5c9: b8 0b 00 00 00 mov $0xb,%eax _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b5ce: 8d 65 f4 lea -0xc(%ebp),%esp 10b5d1: 5b pop %ebx 10b5d2: 5e pop %esi 10b5d3: 5f pop %edi 10b5d4: c9 leave 10b5d5: c3 ret 10b5d6: 66 90 xchg %ax,%ax <== NOT EXECUTED bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { _POSIX_Keys_Free_memory( the_key ); 10b5d8: 83 ec 0c sub $0xc,%esp 10b5db: 56 push %esi 10b5dc: e8 87 00 00 00 call 10b668 <_POSIX_Keys_Free_memory> */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b5e1: 58 pop %eax 10b5e2: 5a pop %edx 10b5e3: 56 push %esi 10b5e4: 68 e0 97 12 00 push $0x1297e0 10b5e9: e8 1e 25 00 00 call 10db0c <_Objects_Free> _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10b5ee: e8 e9 2e 00 00 call 10e4dc <_Thread_Enable_dispatch> return ENOMEM; 10b5f3: 83 c4 10 add $0x10,%esp 10b5f6: b8 0c 00 00 00 mov $0xc,%eax _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b5fb: 8d 65 f4 lea -0xc(%ebp),%esp 10b5fe: 5b pop %ebx 10b5ff: 5e pop %esi 10b600: 5f pop %edi 10b601: c9 leave 10b602: c3 ret =============================================================================== 0010b604 : * 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ int pthread_key_delete( pthread_key_t key ) { 10b604: 55 push %ebp 10b605: 89 e5 mov %esp,%ebp 10b607: 53 push %ebx 10b608: 83 ec 18 sub $0x18,%esp POSIX_Keys_Control *the_key; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); 10b60b: 8d 45 f4 lea -0xc(%ebp),%eax pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location ); 10b60e: 50 push %eax 10b60f: ff 75 08 pushl 0x8(%ebp) 10b612: 68 e0 97 12 00 push $0x1297e0 10b617: e8 30 26 00 00 call 10dc4c <_Objects_Get> 10b61c: 89 c3 mov %eax,%ebx switch ( location ) { 10b61e: 83 c4 10 add $0x10,%esp 10b621: 8b 4d f4 mov -0xc(%ebp),%ecx 10b624: 85 c9 test %ecx,%ecx 10b626: 75 34 jne 10b65c case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 10b628: 83 ec 08 sub $0x8,%esp 10b62b: 50 push %eax 10b62c: 68 e0 97 12 00 push $0x1297e0 10b631: e8 da 21 00 00 call 10d810 <_Objects_Close> _POSIX_Keys_Free_memory( the_key ); 10b636: 89 1c 24 mov %ebx,(%esp) 10b639: e8 2a 00 00 00 call 10b668 <_POSIX_Keys_Free_memory> */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b63e: 58 pop %eax 10b63f: 5a pop %edx 10b640: 53 push %ebx 10b641: 68 e0 97 12 00 push $0x1297e0 10b646: e8 c1 24 00 00 call 10db0c <_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(); 10b64b: e8 8c 2e 00 00 call 10e4dc <_Thread_Enable_dispatch> return 0; 10b650: 83 c4 10 add $0x10,%esp 10b653: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b655: 8b 5d fc mov -0x4(%ebp),%ebx 10b658: c9 leave 10b659: c3 ret 10b65a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10b65c: b8 16 00 00 00 mov $0x16,%eax } 10b661: 8b 5d fc mov -0x4(%ebp),%ebx 10b664: c9 leave 10b665: c3 ret =============================================================================== 001244a4 : int pthread_kill( pthread_t thread, int sig ) { 1244a4: 55 push %ebp 1244a5: 89 e5 mov %esp,%ebp 1244a7: 57 push %edi 1244a8: 56 push %esi 1244a9: 53 push %ebx 1244aa: 83 ec 1c sub $0x1c,%esp 1244ad: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1244b0: 85 db test %ebx,%ebx 1244b2: 0f 84 84 00 00 00 je 12453c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1244b8: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1244bb: 83 ff 1f cmp $0x1f,%edi 1244be: 77 7c ja 12453c pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 1244c0: 56 push %esi rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); 1244c1: 8d 45 e4 lea -0x1c(%ebp),%eax 1244c4: 50 push %eax 1244c5: ff 75 08 pushl 0x8(%ebp) 1244c8: 68 40 e4 12 00 push $0x12e440 1244cd: e8 a6 d9 fe ff call 111e78 <_Objects_Get> 1244d2: 89 c6 mov %eax,%esi switch ( location ) { 1244d4: 83 c4 10 add $0x10,%esp 1244d7: 8b 4d e4 mov -0x1c(%ebp),%ecx 1244da: 85 c9 test %ecx,%ecx 1244dc: 75 72 jne 124550 case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1244de: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1244e4: 8d 04 5b lea (%ebx,%ebx,2),%eax 1244e7: 83 3c 85 88 e7 12 00 cmpl $0x1,0x12e788(,%eax,4) 1244ee: 01 1244ef: 74 2d je 12451e static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1244f1: b8 01 00 00 00 mov $0x1,%eax 1244f6: 89 f9 mov %edi,%ecx 1244f8: d3 e0 shl %cl,%eax return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 1244fa: 09 82 d4 00 00 00 or %eax,0xd4(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 124500: 52 push %edx 124501: 6a 00 push $0x0 124503: 53 push %ebx 124504: 56 push %esi 124505: e8 7a fe ff ff call 124384 <_POSIX_signals_Unblock_thread> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 12450a: 83 c4 10 add $0x10,%esp 12450d: a1 54 e7 12 00 mov 0x12e754,%eax 124512: 85 c0 test %eax,%eax 124514: 74 08 je 12451e 124516: 3b 35 58 e7 12 00 cmp 0x12e758,%esi 12451c: 74 12 je 124530 _Thread_Dispatch_necessary = true; } _Thread_Enable_dispatch(); 12451e: e8 65 e2 fe ff call 112788 <_Thread_Enable_dispatch> return 0; 124523: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 124525: 8d 65 f4 lea -0xc(%ebp),%esp 124528: 5b pop %ebx 124529: 5e pop %esi 12452a: 5f pop %edi 12452b: c9 leave 12452c: c3 ret 12452d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED api->signals_pending |= signo_to_mask( sig ); (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 124530: c6 05 64 e7 12 00 01 movb $0x1,0x12e764 124537: eb e5 jmp 12451e 124539: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 12453c: e8 df 3e ff ff call 118420 <__errno> 124541: c7 00 16 00 00 00 movl $0x16,(%eax) 124547: b8 ff ff ff ff mov $0xffffffff,%eax 12454c: eb d7 jmp 124525 12454e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 124550: e8 cb 3e ff ff call 118420 <__errno> 124555: c7 00 03 00 00 00 movl $0x3,(%eax) 12455b: b8 ff ff ff ff mov $0xffffffff,%eax 124560: eb c3 jmp 124525 =============================================================================== 0010d04c : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10d04c: 55 push %ebp 10d04d: 89 e5 mov %esp,%ebp 10d04f: 83 ec 30 sub $0x30,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d052: 8d 45 f4 lea -0xc(%ebp),%eax 10d055: 50 push %eax 10d056: ff 75 08 pushl 0x8(%ebp) 10d059: e8 66 00 00 00 call 10d0c4 <_POSIX_Mutex_Get> switch ( location ) { 10d05e: 83 c4 10 add $0x10,%esp 10d061: 8b 55 f4 mov -0xc(%ebp),%edx 10d064: 85 d2 test %edx,%edx 10d066: 74 08 je 10d070 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d068: b8 16 00 00 00 mov $0x16,%eax } 10d06d: c9 leave 10d06e: c3 ret 10d06f: 90 nop <== NOT EXECUTED /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 10d070: 8b 48 64 mov 0x64(%eax),%ecx 10d073: 85 c9 test %ecx,%ecx 10d075: 75 0d jne 10d084 _Thread_Enable_dispatch(); 10d077: e8 dc 34 00 00 call 110558 <_Thread_Enable_dispatch> return EBUSY; 10d07c: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d081: c9 leave 10d082: c3 ret 10d083: 90 nop <== NOT EXECUTED if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 10d084: 83 ec 08 sub $0x8,%esp 10d087: 50 push %eax 10d088: 68 80 c7 12 00 push $0x12c780 10d08d: 89 45 e4 mov %eax,-0x1c(%ebp) 10d090: e8 f7 27 00 00 call 10f88c <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10d095: 83 c4 0c add $0xc,%esp 10d098: 6a 16 push $0x16 10d09a: 6a 00 push $0x0 10d09c: 8b 45 e4 mov -0x1c(%ebp),%eax 10d09f: 8d 50 14 lea 0x14(%eax),%edx 10d0a2: 52 push %edx 10d0a3: e8 e0 1e 00 00 call 10ef88 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 10d0a8: 58 pop %eax 10d0a9: 5a pop %edx 10d0aa: 8b 45 e4 mov -0x1c(%ebp),%eax 10d0ad: 50 push %eax 10d0ae: 68 80 c7 12 00 push $0x12c780 10d0b3: e8 d0 2a 00 00 call 10fb88 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10d0b8: e8 9b 34 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d0bd: 83 c4 10 add $0x10,%esp 10d0c0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d0c2: c9 leave 10d0c3: c3 ret =============================================================================== 0010d16c : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10d16c: 55 push %ebp 10d16d: 89 e5 mov %esp,%ebp 10d16f: 53 push %ebx 10d170: 83 ec 14 sub $0x14,%esp 10d173: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10d176: 85 db test %ebx,%ebx 10d178: 74 19 je 10d193 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d17a: 83 ec 08 sub $0x8,%esp 10d17d: 8d 45 f4 lea -0xc(%ebp),%eax 10d180: 50 push %eax 10d181: ff 75 08 pushl 0x8(%ebp) 10d184: e8 3b ff ff ff call 10d0c4 <_POSIX_Mutex_Get> switch ( location ) { 10d189: 83 c4 10 add $0x10,%esp 10d18c: 8b 55 f4 mov -0xc(%ebp),%edx 10d18f: 85 d2 test %edx,%edx 10d191: 74 0d je 10d1a0 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d193: b8 16 00 00 00 mov $0x16,%eax } 10d198: 8b 5d fc mov -0x4(%ebp),%ebx 10d19b: c9 leave 10d19c: c3 ret 10d19d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d1a0: 0f b6 15 9c 80 12 00 movzbl 0x12809c,%edx 10d1a7: 2b 50 60 sub 0x60(%eax),%edx 10d1aa: 89 13 mov %edx,(%ebx) case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10d1ac: e8 a7 33 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d1b1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d1b3: 8b 5d fc mov -0x4(%ebp),%ebx 10d1b6: c9 leave 10d1b7: c3 ret =============================================================================== 0010d1b8 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10d1b8: 55 push %ebp 10d1b9: 89 e5 mov %esp,%ebp 10d1bb: 57 push %edi 10d1bc: 56 push %esi 10d1bd: 53 push %ebx 10d1be: 83 ec 1c sub $0x1c,%esp 10d1c1: 8b 75 08 mov 0x8(%ebp),%esi 10d1c4: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Mutex_Control *the_mutex; CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr; 10d1c7: 85 db test %ebx,%ebx 10d1c9: 0f 84 09 01 00 00 je 10d2d8 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10d1cf: 85 f6 test %esi,%esi 10d1d1: 0f 84 e5 00 00 00 je 10d2bc } } } #endif if ( !the_attr->is_initialized ) 10d1d7: 8b 13 mov (%ebx),%edx 10d1d9: 85 d2 test %edx,%edx 10d1db: 0f 84 db 00 00 00 je 10d2bc return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d1e1: 8b 43 04 mov 0x4(%ebx),%eax 10d1e4: 83 f8 01 cmp $0x1,%eax 10d1e7: 0f 84 f7 00 00 00 je 10d2e4 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10d1ed: 85 c0 test %eax,%eax 10d1ef: 0f 85 c7 00 00 00 jne 10d2bc return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d1f5: 8b 43 0c mov 0xc(%ebx),%eax 10d1f8: 83 f8 01 cmp $0x1,%eax 10d1fb: 0f 84 eb 00 00 00 je 10d2ec 10d201: 83 f8 02 cmp $0x2,%eax 10d204: 0f 84 c2 00 00 00 je 10d2cc 10d20a: 85 c0 test %eax,%eax 10d20c: 0f 85 aa 00 00 00 jne 10d2bc case PTHREAD_PRIO_NONE: the_discipline = CORE_MUTEX_DISCIPLINES_FIFO; 10d212: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) } /* * Validate the priority ceiling field -- should always be valid. */ if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 10d219: 83 ec 0c sub $0xc,%esp 10d21c: ff 73 08 pushl 0x8(%ebx) 10d21f: e8 58 03 00 00 call 10d57c <_POSIX_Priority_Is_valid> 10d224: 83 c4 10 add $0x10,%esp 10d227: 84 c0 test %al,%al 10d229: 0f 84 8d 00 00 00 je 10d2bc #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10d22f: 83 7b 10 03 cmpl $0x3,0x10(%ebx) 10d233: 0f 87 83 00 00 00 ja 10d2bc 10d239: a1 94 c3 12 00 mov 0x12c394,%eax 10d23e: 40 inc %eax 10d23f: a3 94 c3 12 00 mov %eax,0x12c394 * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10d244: 83 ec 0c sub $0xc,%esp 10d247: 68 80 c7 12 00 push $0x12c780 10d24c: e8 bf 25 00 00 call 10f810 <_Objects_Allocate> 10d251: 89 c7 mov %eax,%edi */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10d253: 83 c4 10 add $0x10,%esp 10d256: 85 c0 test %eax,%eax 10d258: 0f 84 9a 00 00 00 je 10d2f8 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10d25e: 8b 43 04 mov 0x4(%ebx),%eax 10d261: 89 47 10 mov %eax,0x10(%edi) the_mutex_attr = &the_mutex->Mutex.Attributes; 10d264: 8d 57 54 lea 0x54(%edi),%edx if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10d267: 31 c0 xor %eax,%eax 10d269: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10d26d: 0f 94 c0 sete %al 10d270: 89 47 54 mov %eax,0x54(%edi) else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 10d273: c6 47 58 01 movb $0x1,0x58(%edi) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d277: 0f b6 05 9c 80 12 00 movzbl 0x12809c,%eax 10d27e: 2b 43 08 sub 0x8(%ebx),%eax 10d281: 89 47 60 mov %eax,0x60(%edi) the_mutex_attr->priority_ceiling = _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10d284: 8b 45 e4 mov -0x1c(%ebp),%eax 10d287: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10d28a: 50 push %eax 10d28b: 6a 01 push $0x1 10d28d: 52 push %edx 10d28e: 8d 47 14 lea 0x14(%edi),%eax 10d291: 50 push %eax 10d292: e8 fd 1c 00 00 call 10ef94 <_CORE_mutex_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d297: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10d29a: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d29d: 8b 15 9c c7 12 00 mov 0x12c79c,%edx 10d2a3: 89 3c 8a mov %edi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10d2a6: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 10d2ad: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10d2af: e8 a4 32 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d2b4: 83 c4 10 add $0x10,%esp 10d2b7: 31 c0 xor %eax,%eax 10d2b9: eb 06 jmp 10d2c1 10d2bb: 90 nop <== NOT EXECUTED case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: break; default: return EINVAL; 10d2bc: b8 16 00 00 00 mov $0x16,%eax *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 10d2c1: 8d 65 f4 lea -0xc(%ebp),%esp 10d2c4: 5b pop %ebx 10d2c5: 5e pop %esi 10d2c6: 5f pop %edi 10d2c7: c9 leave 10d2c8: c3 ret 10d2c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; break; case PTHREAD_PRIO_PROTECT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10d2cc: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) break; 10d2d3: e9 41 ff ff ff jmp 10d219 CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr; else the_attr = &_POSIX_Mutex_Default_attributes; 10d2d8: bb 00 c8 12 00 mov $0x12c800,%ebx 10d2dd: e9 ed fe ff ff jmp 10d1cf 10d2e2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return ENOSYS; 10d2e4: b8 58 00 00 00 mov $0x58,%eax 10d2e9: eb d6 jmp 10d2c1 10d2eb: 90 nop <== NOT EXECUTED switch ( the_attr->protocol ) { case PTHREAD_PRIO_NONE: the_discipline = CORE_MUTEX_DISCIPLINES_FIFO; break; case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10d2ec: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10d2f3: e9 21 ff ff ff jmp 10d219 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10d2f8: e8 5b 32 00 00 call 110558 <_Thread_Enable_dispatch> return EAGAIN; 10d2fd: b8 0b 00 00 00 mov $0xb,%eax 10d302: eb bd jmp 10d2c1 =============================================================================== 0010d37c : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10d37c: 55 push %ebp 10d37d: 89 e5 mov %esp,%ebp 10d37f: 57 push %edi 10d380: 56 push %esi 10d381: 53 push %ebx 10d382: 83 ec 2c sub $0x2c,%esp 10d385: 8b 7d 08 mov 0x8(%ebp),%edi 10d388: 8b 75 0c mov 0xc(%ebp),%esi 10d38b: 8b 5d 10 mov 0x10(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10d38e: 85 db test %ebx,%ebx 10d390: 74 10 je 10d3a2 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d392: 83 ec 0c sub $0xc,%esp 10d395: 56 push %esi 10d396: e8 e1 01 00 00 call 10d57c <_POSIX_Priority_Is_valid> 10d39b: 83 c4 10 add $0x10,%esp 10d39e: 84 c0 test %al,%al 10d3a0: 75 0e jne 10d3b0 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d3a2: b8 16 00 00 00 mov $0x16,%eax } 10d3a7: 8d 65 f4 lea -0xc(%ebp),%esp 10d3aa: 5b pop %ebx 10d3ab: 5e pop %esi 10d3ac: 5f pop %edi 10d3ad: c9 leave 10d3ae: c3 ret 10d3af: 90 nop <== NOT EXECUTED 10d3b0: a0 9c 80 12 00 mov 0x12809c,%al 10d3b5: 88 45 d7 mov %al,-0x29(%ebp) /* * Must acquire the mutex before we can change it's ceiling. * POSIX says block until we acquire it. */ (void) pthread_mutex_lock( mutex ); 10d3b8: 83 ec 0c sub $0xc,%esp 10d3bb: 57 push %edi 10d3bc: e8 43 ff ff ff call 10d304 * operations. * * NOTE: This makes it easier to get 100% binary coverage since the * bad Id case is handled by the switch. */ the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d3c1: 58 pop %eax 10d3c2: 5a pop %edx 10d3c3: 8d 45 e4 lea -0x1c(%ebp),%eax 10d3c6: 50 push %eax 10d3c7: 57 push %edi 10d3c8: e8 f7 fc ff ff call 10d0c4 <_POSIX_Mutex_Get> switch ( location ) { 10d3cd: 83 c4 10 add $0x10,%esp 10d3d0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d3d3: 85 c9 test %ecx,%ecx 10d3d5: 75 cb jne 10d3a2 RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d3d7: 0f b6 15 9c 80 12 00 movzbl 0x12809c,%edx 10d3de: 2b 50 60 sub 0x60(%eax),%edx 10d3e1: 89 13 mov %edx,(%ebx) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d3e3: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10d3e7: 29 f2 sub %esi,%edx 10d3e9: 89 50 60 mov %edx,0x60(%eax) ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 10d3ec: 52 push %edx 10d3ed: 6a 00 push $0x0 10d3ef: ff 70 08 pushl 0x8(%eax) 10d3f2: 83 c0 14 add $0x14,%eax 10d3f5: 50 push %eax 10d3f6: e8 31 1d 00 00 call 10f12c <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d3fb: e8 58 31 00 00 call 110558 <_Thread_Enable_dispatch> return 0; 10d400: 83 c4 10 add $0x10,%esp 10d403: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d405: 8d 65 f4 lea -0xc(%ebp),%esp 10d408: 5b pop %ebx 10d409: 5e pop %esi 10d40a: 5f pop %edi 10d40b: c9 leave 10d40c: c3 ret =============================================================================== 0010d410 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10d410: 55 push %ebp 10d411: 89 e5 mov %esp,%ebp 10d413: 56 push %esi 10d414: 53 push %ebx 10d415: 83 ec 18 sub $0x18,%esp 10d418: 8b 75 08 mov 0x8(%ebp),%esi * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10d41b: 8d 45 f4 lea -0xc(%ebp),%eax 10d41e: 50 push %eax 10d41f: ff 75 0c pushl 0xc(%ebp) 10d422: e8 cd 00 00 00 call 10d4f4 <_POSIX_Absolute_timeout_to_ticks> 10d427: 89 c3 mov %eax,%ebx if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10d429: 83 c4 10 add $0x10,%esp 10d42c: 83 f8 03 cmp $0x3,%eax 10d42f: 74 2f je 10d460 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d431: 50 push %eax 10d432: ff 75 f4 pushl -0xc(%ebp) 10d435: 6a 00 push $0x0 10d437: 56 push %esi 10d438: e8 db fe ff ff call 10d318 <_POSIX_Mutex_Lock_support> * This service only gives us the option to block. We used a polling * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { 10d43d: 83 c4 10 add $0x10,%esp 10d440: 83 f8 10 cmp $0x10,%eax 10d443: 74 07 je 10d44c <== ALWAYS TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 10d445: 8d 65 f8 lea -0x8(%ebp),%esp 10d448: 5b pop %ebx 10d449: 5e pop %esi 10d44a: c9 leave 10d44b: c3 ret * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10d44c: 85 db test %ebx,%ebx 10d44e: 74 28 je 10d478 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10d450: 4b dec %ebx 10d451: 83 fb 01 cmp $0x1,%ebx 10d454: 77 ef ja 10d445 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10d456: b8 74 00 00 00 mov $0x74,%eax 10d45b: eb e8 jmp 10d445 10d45d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d460: 52 push %edx 10d461: ff 75 f4 pushl -0xc(%ebp) 10d464: 6a 01 push $0x1 10d466: 56 push %esi 10d467: e8 ac fe ff ff call 10d318 <_POSIX_Mutex_Lock_support> 10d46c: 83 c4 10 add $0x10,%esp status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 10d46f: 8d 65 f8 lea -0x8(%ebp),%esp 10d472: 5b pop %ebx 10d473: 5e pop %esi 10d474: c9 leave 10d475: c3 ret 10d476: 66 90 xchg %ax,%ax <== NOT EXECUTED * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10d478: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED 10d47d: eb c6 jmp 10d445 <== NOT EXECUTED =============================================================================== 0010d4a4 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10d4a4: 55 push %ebp 10d4a5: 89 e5 mov %esp,%ebp 10d4a7: 53 push %ebx 10d4a8: 83 ec 1c sub $0x1c,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d4ab: 8d 45 f4 lea -0xc(%ebp),%eax 10d4ae: 50 push %eax 10d4af: ff 75 08 pushl 0x8(%ebp) 10d4b2: e8 0d fc ff ff call 10d0c4 <_POSIX_Mutex_Get> switch ( location ) { 10d4b7: 83 c4 10 add $0x10,%esp 10d4ba: 8b 4d f4 mov -0xc(%ebp),%ecx 10d4bd: 85 c9 test %ecx,%ecx 10d4bf: 75 27 jne 10d4e8 case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10d4c1: 52 push %edx 10d4c2: 6a 00 push $0x0 10d4c4: ff 70 08 pushl 0x8(%eax) 10d4c7: 83 c0 14 add $0x14,%eax 10d4ca: 50 push %eax 10d4cb: e8 5c 1c 00 00 call 10f12c <_CORE_mutex_Surrender> 10d4d0: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d4d2: e8 81 30 00 00 call 110558 <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10d4d7: 89 1c 24 mov %ebx,(%esp) 10d4da: e8 a1 ff ff ff call 10d480 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d4df: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d4e2: 8b 5d fc mov -0x4(%ebp),%ebx 10d4e5: c9 leave 10d4e6: c3 ret 10d4e7: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10d4e8: b8 16 00 00 00 mov $0x16,%eax } 10d4ed: 8b 5d fc mov -0x4(%ebp),%ebx 10d4f0: c9 leave 10d4f1: c3 ret =============================================================================== 0010cef4 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10cef4: 55 push %ebp 10cef5: 89 e5 mov %esp,%ebp 10cef7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10cefa: 85 c0 test %eax,%eax 10cefc: 74 12 je 10cf10 10cefe: 8b 10 mov (%eax),%edx 10cf00: 85 d2 test %edx,%edx 10cf02: 74 0c je 10cf10 return EINVAL; attr->is_initialized = false; 10cf04: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10cf0a: 31 c0 xor %eax,%eax } 10cf0c: c9 leave 10cf0d: c3 ret 10cf0e: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 10cf10: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10cf15: c9 leave 10cf16: c3 ret =============================================================================== 0010cfbc : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10cfbc: 55 push %ebp 10cfbd: 89 e5 mov %esp,%ebp 10cfbf: 56 push %esi 10cfc0: 53 push %ebx 10cfc1: 8b 5d 08 mov 0x8(%ebp),%ebx 10cfc4: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10cfc7: 85 db test %ebx,%ebx 10cfc9: 74 06 je 10cfd1 10cfcb: 8b 03 mov (%ebx),%eax 10cfcd: 85 c0 test %eax,%eax 10cfcf: 75 0f jne 10cfe0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; 10cfd1: b8 16 00 00 00 mov $0x16,%eax attr->prio_ceiling = prioceiling; return 0; } 10cfd6: 8d 65 f8 lea -0x8(%ebp),%esp 10cfd9: 5b pop %ebx 10cfda: 5e pop %esi 10cfdb: c9 leave 10cfdc: c3 ret 10cfdd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10cfe0: 83 ec 0c sub $0xc,%esp 10cfe3: 56 push %esi 10cfe4: e8 93 05 00 00 call 10d57c <_POSIX_Priority_Is_valid> 10cfe9: 83 c4 10 add $0x10,%esp 10cfec: 84 c0 test %al,%al 10cfee: 74 e1 je 10cfd1 return EINVAL; attr->prio_ceiling = prioceiling; 10cff0: 89 73 08 mov %esi,0x8(%ebx) return 0; 10cff3: 31 c0 xor %eax,%eax } 10cff5: 8d 65 f8 lea -0x8(%ebp),%esp 10cff8: 5b pop %ebx 10cff9: 5e pop %esi 10cffa: c9 leave 10cffb: c3 ret =============================================================================== 0010cffc : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10cffc: 55 push %ebp 10cffd: 89 e5 mov %esp,%ebp 10cfff: 8b 45 08 mov 0x8(%ebp),%eax 10d002: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10d005: 85 c0 test %eax,%eax 10d007: 74 0b je 10d014 10d009: 8b 08 mov (%eax),%ecx 10d00b: 85 c9 test %ecx,%ecx 10d00d: 74 05 je 10d014 return EINVAL; switch ( protocol ) { 10d00f: 83 fa 02 cmp $0x2,%edx 10d012: 76 08 jbe 10d01c case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; default: return EINVAL; 10d014: b8 16 00 00 00 mov $0x16,%eax } } 10d019: c9 leave 10d01a: c3 ret 10d01b: 90 nop <== NOT EXECUTED switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10d01c: 89 50 0c mov %edx,0xc(%eax) return 0; 10d01f: 31 c0 xor %eax,%eax default: return EINVAL; } } 10d021: c9 leave 10d022: c3 ret =============================================================================== 0010d024 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10d024: 55 push %ebp 10d025: 89 e5 mov %esp,%ebp 10d027: 8b 45 08 mov 0x8(%ebp),%eax 10d02a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10d02d: 85 c0 test %eax,%eax 10d02f: 74 0b je 10d03c 10d031: 8b 08 mov (%eax),%ecx 10d033: 85 c9 test %ecx,%ecx 10d035: 74 05 je 10d03c return EINVAL; switch ( pshared ) { 10d037: 83 fa 01 cmp $0x1,%edx 10d03a: 76 08 jbe 10d044 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10d03c: b8 16 00 00 00 mov $0x16,%eax } } 10d041: c9 leave 10d042: c3 ret 10d043: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10d044: 89 50 04 mov %edx,0x4(%eax) return 0; 10d047: 31 c0 xor %eax,%eax default: return EINVAL; } } 10d049: c9 leave 10d04a: c3 ret =============================================================================== 0010b208 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10b208: 55 push %ebp 10b209: 89 e5 mov %esp,%ebp 10b20b: 8b 45 08 mov 0x8(%ebp),%eax 10b20e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b211: 85 c0 test %eax,%eax 10b213: 74 0b je 10b220 10b215: 8b 08 mov (%eax),%ecx 10b217: 85 c9 test %ecx,%ecx 10b219: 74 05 je 10b220 <== NEVER TAKEN return EINVAL; switch ( type ) { 10b21b: 83 fa 03 cmp $0x3,%edx 10b21e: 76 08 jbe 10b228 case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; default: return EINVAL; 10b220: b8 16 00 00 00 mov $0x16,%eax } } 10b225: c9 leave 10b226: c3 ret 10b227: 90 nop <== NOT EXECUTED switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 10b228: 89 50 10 mov %edx,0x10(%eax) return 0; 10b22b: 31 c0 xor %eax,%eax default: return EINVAL; } } 10b22d: c9 leave 10b22e: c3 ret =============================================================================== 0010bd7c : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10bd7c: 55 push %ebp 10bd7d: 89 e5 mov %esp,%ebp 10bd7f: 57 push %edi 10bd80: 56 push %esi 10bd81: 53 push %ebx 10bd82: 83 ec 1c sub $0x1c,%esp 10bd85: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd88: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10bd8b: 85 db test %ebx,%ebx 10bd8d: 74 51 je 10bde0 10bd8f: 85 f6 test %esi,%esi 10bd91: 74 4d je 10bde0 return EINVAL; if ( !once_control->init_executed ) { 10bd93: 8b 7b 04 mov 0x4(%ebx),%edi 10bd96: 85 ff test %edi,%edi 10bd98: 74 0a je 10bda4 once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; 10bd9a: 31 c0 xor %eax,%eax } 10bd9c: 8d 65 f4 lea -0xc(%ebp),%esp 10bd9f: 5b pop %ebx 10bda0: 5e pop %esi 10bda1: 5f pop %edi 10bda2: c9 leave 10bda3: c3 ret if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10bda4: 51 push %ecx 10bda5: 8d 7d e4 lea -0x1c(%ebp),%edi 10bda8: 57 push %edi 10bda9: 68 00 01 00 00 push $0x100 10bdae: 68 00 01 00 00 push $0x100 10bdb3: e8 ec 0b 00 00 call 10c9a4 if ( !once_control->init_executed ) { 10bdb8: 83 c4 10 add $0x10,%esp 10bdbb: 8b 53 04 mov 0x4(%ebx),%edx 10bdbe: 85 d2 test %edx,%edx 10bdc0: 74 2e je 10bdf0 <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bdc2: 50 push %eax 10bdc3: 57 push %edi 10bdc4: 68 00 01 00 00 push $0x100 10bdc9: ff 75 e4 pushl -0x1c(%ebp) 10bdcc: e8 d3 0b 00 00 call 10c9a4 10bdd1: 83 c4 10 add $0x10,%esp } return 0; 10bdd4: 31 c0 xor %eax,%eax } 10bdd6: 8d 65 f4 lea -0xc(%ebp),%esp 10bdd9: 5b pop %ebx 10bdda: 5e pop %esi 10bddb: 5f pop %edi 10bddc: c9 leave 10bddd: c3 ret 10bdde: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) return EINVAL; 10bde0: b8 16 00 00 00 mov $0x16,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10bde5: 8d 65 f4 lea -0xc(%ebp),%esp 10bde8: 5b pop %ebx 10bde9: 5e pop %esi 10bdea: 5f pop %edi 10bdeb: c9 leave 10bdec: c3 ret 10bded: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; 10bdf0: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10bdf6: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10bdfd: ff d6 call *%esi 10bdff: eb c1 jmp 10bdc2 =============================================================================== 0010c2a0 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10c2a0: 55 push %ebp 10c2a1: 89 e5 mov %esp,%ebp 10c2a3: 53 push %ebx 10c2a4: 83 ec 14 sub $0x14,%esp 10c2a7: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10c2aa: 85 c0 test %eax,%eax 10c2ac: 74 42 je 10c2f0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c2ae: 53 push %ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c2af: 8d 55 f4 lea -0xc(%ebp),%edx 10c2b2: 52 push %edx 10c2b3: ff 30 pushl (%eax) 10c2b5: 68 40 a3 12 00 push $0x12a340 10c2ba: e8 d9 2b 00 00 call 10ee98 <_Objects_Get> 10c2bf: 89 c3 mov %eax,%ebx switch ( location ) { 10c2c1: 83 c4 10 add $0x10,%esp 10c2c4: 8b 4d f4 mov -0xc(%ebp),%ecx 10c2c7: 85 c9 test %ecx,%ecx 10c2c9: 75 25 jne 10c2f0 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 10c2cb: 83 ec 0c sub $0xc,%esp 10c2ce: 8d 40 10 lea 0x10(%eax),%eax 10c2d1: 50 push %eax 10c2d2: e8 81 3c 00 00 call 10ff58 <_Thread_queue_First> 10c2d7: 83 c4 10 add $0x10,%esp 10c2da: 85 c0 test %eax,%eax 10c2dc: 74 1e je 10c2fc _Thread_Enable_dispatch(); 10c2de: e8 45 34 00 00 call 10f728 <_Thread_Enable_dispatch> return EBUSY; 10c2e3: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c2e8: 8b 5d fc mov -0x4(%ebp),%ebx 10c2eb: c9 leave 10c2ec: c3 ret 10c2ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10c2f0: b8 16 00 00 00 mov $0x16,%eax } 10c2f5: 8b 5d fc mov -0x4(%ebp),%ebx 10c2f8: c9 leave 10c2f9: c3 ret 10c2fa: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10c2fc: 83 ec 08 sub $0x8,%esp 10c2ff: 53 push %ebx 10c300: 68 40 a3 12 00 push $0x12a340 10c305: e8 52 27 00 00 call 10ea5c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10c30a: 58 pop %eax 10c30b: 5a pop %edx 10c30c: 53 push %ebx 10c30d: 68 40 a3 12 00 push $0x12a340 10c312: e8 41 2a 00 00 call 10ed58 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10c317: e8 0c 34 00 00 call 10f728 <_Thread_Enable_dispatch> return 0; 10c31c: 83 c4 10 add $0x10,%esp 10c31f: 31 c0 xor %eax,%eax 10c321: eb d2 jmp 10c2f5 =============================================================================== 0010c324 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10c324: 55 push %ebp 10c325: 89 e5 mov %esp,%ebp 10c327: 56 push %esi 10c328: 53 push %ebx 10c329: 83 ec 20 sub $0x20,%esp 10c32c: 8b 5d 08 mov 0x8(%ebp),%ebx 10c32f: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10c332: 85 db test %ebx,%ebx 10c334: 74 15 je 10c34b return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10c336: 85 f6 test %esi,%esi 10c338: 0f 84 8e 00 00 00 je 10c3cc } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10c33e: 8b 16 mov (%esi),%edx 10c340: 85 d2 test %edx,%edx 10c342: 74 07 je 10c34b <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10c344: 8b 46 04 mov 0x4(%esi),%eax 10c347: 85 c0 test %eax,%eax 10c349: 74 0d je 10c358 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10c34b: b8 16 00 00 00 mov $0x16,%eax *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 10c350: 8d 65 f8 lea -0x8(%ebp),%esp 10c353: 5b pop %ebx 10c354: 5e pop %esi 10c355: c9 leave 10c356: c3 ret 10c357: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes( CORE_RWLock_Attributes *the_attributes ) { the_attributes->XXX = 0; 10c358: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c35f: a1 d4 a0 12 00 mov 0x12a0d4,%eax 10c364: 40 inc %eax 10c365: a3 d4 a0 12 00 mov %eax,0x12a0d4 * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) _Objects_Allocate( &_POSIX_RWLock_Information ); 10c36a: 83 ec 0c sub $0xc,%esp 10c36d: 68 40 a3 12 00 push $0x12a340 10c372: e8 69 26 00 00 call 10e9e0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10c377: 83 c4 10 add $0x10,%esp 10c37a: 85 c0 test %eax,%eax 10c37c: 74 42 je 10c3c0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10c37e: 83 ec 08 sub $0x8,%esp 10c381: 8d 55 f4 lea -0xc(%ebp),%edx 10c384: 52 push %edx 10c385: 8d 50 10 lea 0x10(%eax),%edx 10c388: 52 push %edx 10c389: 89 45 e4 mov %eax,-0x1c(%ebp) 10c38c: e8 2f 1e 00 00 call 10e1c0 <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c391: 8b 45 e4 mov -0x1c(%ebp),%eax 10c394: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10c397: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c39a: 8b 0d 5c a3 12 00 mov 0x12a35c,%ecx 10c3a0: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10c3a3: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10c3aa: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c3ac: e8 77 33 00 00 call 10f728 <_Thread_Enable_dispatch> return 0; 10c3b1: 83 c4 10 add $0x10,%esp 10c3b4: 31 c0 xor %eax,%eax } 10c3b6: 8d 65 f8 lea -0x8(%ebp),%esp 10c3b9: 5b pop %ebx 10c3ba: 5e pop %esi 10c3bb: c9 leave 10c3bc: c3 ret 10c3bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10c3c0: e8 63 33 00 00 call 10f728 <_Thread_Enable_dispatch> return EAGAIN; 10c3c5: b8 0b 00 00 00 mov $0xb,%eax 10c3ca: eb 84 jmp 10c350 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10c3cc: 83 ec 0c sub $0xc,%esp 10c3cf: 8d 75 ec lea -0x14(%ebp),%esi 10c3d2: 56 push %esi 10c3d3: e8 84 09 00 00 call 10cd5c 10c3d8: 83 c4 10 add $0x10,%esp 10c3db: e9 5e ff ff ff jmp 10c33e =============================================================================== 0010c3e0 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10c3e0: 55 push %ebp 10c3e1: 89 e5 mov %esp,%ebp 10c3e3: 53 push %ebx 10c3e4: 83 ec 14 sub $0x14,%esp 10c3e7: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c3ea: 85 db test %ebx,%ebx 10c3ec: 74 1b je 10c409 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c3ee: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c3ef: 8d 45 f4 lea -0xc(%ebp),%eax 10c3f2: 50 push %eax 10c3f3: ff 33 pushl (%ebx) 10c3f5: 68 40 a3 12 00 push $0x12a340 10c3fa: e8 99 2a 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c3ff: 83 c4 10 add $0x10,%esp 10c402: 8b 55 f4 mov -0xc(%ebp),%edx 10c405: 85 d2 test %edx,%edx 10c407: 74 0b je 10c414 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c409: b8 16 00 00 00 mov $0x16,%eax } 10c40e: 8b 5d fc mov -0x4(%ebp),%ebx 10c411: c9 leave 10c412: c3 ret 10c413: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c414: 83 ec 0c sub $0xc,%esp 10c417: 6a 00 push $0x0 10c419: 6a 00 push $0x0 10c41b: 6a 01 push $0x1 10c41d: ff 33 pushl (%ebx) 10c41f: 83 c0 10 add $0x10,%eax 10c422: 50 push %eax 10c423: e8 cc 1d 00 00 call 10e1f4 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c428: 83 c4 20 add $0x20,%esp 10c42b: e8 f8 32 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c430: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c433: a1 98 a6 12 00 mov 0x12a698,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c438: ff 70 34 pushl 0x34(%eax) 10c43b: e8 78 01 00 00 call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c440: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c443: 8b 5d fc mov -0x4(%ebp),%ebx 10c446: c9 leave 10c447: c3 ret =============================================================================== 0010c448 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c448: 55 push %ebp 10c449: 89 e5 mov %esp,%ebp 10c44b: 56 push %esi 10c44c: 53 push %ebx 10c44d: 83 ec 20 sub $0x20,%esp 10c450: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10c453: 85 db test %ebx,%ebx 10c455: 74 7d je 10c4d4 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10c457: 83 ec 08 sub $0x8,%esp 10c45a: 8d 45 f0 lea -0x10(%ebp),%eax 10c45d: 50 push %eax 10c45e: ff 75 0c pushl 0xc(%ebp) 10c461: e8 e6 61 00 00 call 11264c <_POSIX_Absolute_timeout_to_ticks> 10c466: 89 c6 mov %eax,%esi 10c468: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c46b: 8d 45 f4 lea -0xc(%ebp),%eax 10c46e: 50 push %eax 10c46f: ff 33 pushl (%ebx) 10c471: 68 40 a3 12 00 push $0x12a340 10c476: e8 1d 2a 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c47b: 83 c4 10 add $0x10,%esp 10c47e: 8b 55 f4 mov -0xc(%ebp),%edx 10c481: 85 d2 test %edx,%edx 10c483: 75 4f jne 10c4d4 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 10c485: 83 fe 03 cmp $0x3,%esi 10c488: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c48b: 83 ec 0c sub $0xc,%esp 10c48e: 6a 00 push $0x0 10c490: ff 75 f0 pushl -0x10(%ebp) 10c493: 0f b6 ca movzbl %dl,%ecx 10c496: 51 push %ecx 10c497: ff 33 pushl (%ebx) 10c499: 83 c0 10 add $0x10,%eax 10c49c: 50 push %eax 10c49d: 88 55 e4 mov %dl,-0x1c(%ebp) 10c4a0: e8 4f 1d 00 00 call 10e1f4 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c4a5: 83 c4 20 add $0x20,%esp 10c4a8: e8 7b 32 00 00 call 10f728 <_Thread_Enable_dispatch> if ( !do_wait ) { 10c4ad: 8a 55 e4 mov -0x1c(%ebp),%dl 10c4b0: 84 d2 test %dl,%dl 10c4b2: 75 40 jne 10c4f4 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10c4b4: a1 98 a6 12 00 mov 0x12a698,%eax 10c4b9: 8b 40 34 mov 0x34(%eax),%eax 10c4bc: 83 f8 02 cmp $0x2,%eax 10c4bf: 74 1f je 10c4e0 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4c1: 83 ec 0c sub $0xc,%esp 10c4c4: 50 push %eax 10c4c5: e8 ee 00 00 00 call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c4ca: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c4cd: 8d 65 f8 lea -0x8(%ebp),%esp 10c4d0: 5b pop %ebx 10c4d1: 5e pop %esi 10c4d2: c9 leave 10c4d3: c3 ret _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10c4d4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c4d9: 8d 65 f8 lea -0x8(%ebp),%esp 10c4dc: 5b pop %ebx 10c4dd: 5e pop %esi 10c4de: c9 leave 10c4df: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10c4e0: 85 f6 test %esi,%esi 10c4e2: 74 f0 je 10c4d4 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10c4e4: 4e dec %esi 10c4e5: 83 fe 01 cmp $0x1,%esi 10c4e8: 77 d7 ja 10c4c1 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10c4ea: b8 74 00 00 00 mov $0x74,%eax 10c4ef: eb e8 jmp 10c4d9 10c4f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { 10c4f4: a1 98 a6 12 00 mov 0x12a698,%eax 10c4f9: 8b 40 34 mov 0x34(%eax),%eax 10c4fc: eb c3 jmp 10c4c1 =============================================================================== 0010c500 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c500: 55 push %ebp 10c501: 89 e5 mov %esp,%ebp 10c503: 56 push %esi 10c504: 53 push %ebx 10c505: 83 ec 20 sub $0x20,%esp 10c508: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10c50b: 85 db test %ebx,%ebx 10c50d: 74 7d je 10c58c * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10c50f: 83 ec 08 sub $0x8,%esp 10c512: 8d 45 f0 lea -0x10(%ebp),%eax 10c515: 50 push %eax 10c516: ff 75 0c pushl 0xc(%ebp) 10c519: e8 2e 61 00 00 call 11264c <_POSIX_Absolute_timeout_to_ticks> 10c51e: 89 c6 mov %eax,%esi 10c520: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c523: 8d 45 f4 lea -0xc(%ebp),%eax 10c526: 50 push %eax 10c527: ff 33 pushl (%ebx) 10c529: 68 40 a3 12 00 push $0x12a340 10c52e: e8 65 29 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c533: 83 c4 10 add $0x10,%esp 10c536: 8b 55 f4 mov -0xc(%ebp),%edx 10c539: 85 d2 test %edx,%edx 10c53b: 75 4f jne 10c58c (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 10c53d: 83 fe 03 cmp $0x3,%esi 10c540: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c543: 83 ec 0c sub $0xc,%esp 10c546: 6a 00 push $0x0 10c548: ff 75 f0 pushl -0x10(%ebp) 10c54b: 0f b6 ca movzbl %dl,%ecx 10c54e: 51 push %ecx 10c54f: ff 33 pushl (%ebx) 10c551: 83 c0 10 add $0x10,%eax 10c554: 50 push %eax 10c555: 88 55 e4 mov %dl,-0x1c(%ebp) 10c558: e8 5f 1d 00 00 call 10e2bc <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c55d: 83 c4 20 add $0x20,%esp 10c560: e8 c3 31 00 00 call 10f728 <_Thread_Enable_dispatch> if ( !do_wait && 10c565: 8a 55 e4 mov -0x1c(%ebp),%dl 10c568: 84 d2 test %dl,%dl 10c56a: 75 40 jne 10c5ac (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10c56c: a1 98 a6 12 00 mov 0x12a698,%eax 10c571: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c574: 83 f8 02 cmp $0x2,%eax 10c577: 74 1f je 10c598 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c579: 83 ec 0c sub $0xc,%esp 10c57c: 50 push %eax 10c57d: e8 36 00 00 00 call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c582: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c585: 8d 65 f8 lea -0x8(%ebp),%esp 10c588: 5b pop %ebx 10c589: 5e pop %esi 10c58a: c9 leave 10c58b: c3 ret _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10c58c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c591: 8d 65 f8 lea -0x8(%ebp),%esp 10c594: 5b pop %ebx 10c595: 5e pop %esi 10c596: c9 leave 10c597: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10c598: 85 f6 test %esi,%esi 10c59a: 74 f0 je 10c58c <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10c59c: 4e dec %esi 10c59d: 83 fe 01 cmp $0x1,%esi 10c5a0: 77 d7 ja 10c579 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10c5a2: b8 74 00 00 00 mov $0x74,%eax 10c5a7: eb e8 jmp 10c591 10c5a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c5ac: a1 98 a6 12 00 mov 0x12a698,%eax 10c5b1: 8b 40 34 mov 0x34(%eax),%eax 10c5b4: eb c3 jmp 10c579 =============================================================================== 0010c5c8 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10c5c8: 55 push %ebp 10c5c9: 89 e5 mov %esp,%ebp 10c5cb: 53 push %ebx 10c5cc: 83 ec 14 sub $0x14,%esp 10c5cf: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c5d2: 85 db test %ebx,%ebx 10c5d4: 74 1b je 10c5f1 10c5d6: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c5d7: 8d 45 f4 lea -0xc(%ebp),%eax 10c5da: 50 push %eax 10c5db: ff 33 pushl (%ebx) 10c5dd: 68 40 a3 12 00 push $0x12a340 10c5e2: e8 b1 28 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c5e7: 83 c4 10 add $0x10,%esp 10c5ea: 8b 55 f4 mov -0xc(%ebp),%edx 10c5ed: 85 d2 test %edx,%edx 10c5ef: 74 0b je 10c5fc #endif case OBJECTS_ERROR: break; } return EINVAL; 10c5f1: b8 16 00 00 00 mov $0x16,%eax } 10c5f6: 8b 5d fc mov -0x4(%ebp),%ebx 10c5f9: c9 leave 10c5fa: c3 ret 10c5fb: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c5fc: 83 ec 0c sub $0xc,%esp 10c5ff: 6a 00 push $0x0 10c601: 6a 00 push $0x0 10c603: 6a 00 push $0x0 10c605: ff 33 pushl (%ebx) 10c607: 83 c0 10 add $0x10,%eax 10c60a: 50 push %eax 10c60b: e8 e4 1b 00 00 call 10e1f4 <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10c610: 83 c4 20 add $0x20,%esp 10c613: e8 10 31 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c618: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c61b: a1 98 a6 12 00 mov 0x12a698,%eax NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c620: ff 70 34 pushl 0x34(%eax) 10c623: e8 90 ff ff ff call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c628: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c62b: 8b 5d fc mov -0x4(%ebp),%ebx 10c62e: c9 leave 10c62f: c3 ret =============================================================================== 0010c630 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10c630: 55 push %ebp 10c631: 89 e5 mov %esp,%ebp 10c633: 53 push %ebx 10c634: 83 ec 14 sub $0x14,%esp 10c637: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c63a: 85 db test %ebx,%ebx 10c63c: 74 1b je 10c659 10c63e: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c63f: 8d 45 f4 lea -0xc(%ebp),%eax 10c642: 50 push %eax 10c643: ff 33 pushl (%ebx) 10c645: 68 40 a3 12 00 push $0x12a340 10c64a: e8 49 28 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c64f: 83 c4 10 add $0x10,%esp 10c652: 8b 55 f4 mov -0xc(%ebp),%edx 10c655: 85 d2 test %edx,%edx 10c657: 74 0b je 10c664 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c659: b8 16 00 00 00 mov $0x16,%eax } 10c65e: 8b 5d fc mov -0x4(%ebp),%ebx 10c661: c9 leave 10c662: c3 ret 10c663: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c664: 83 ec 0c sub $0xc,%esp 10c667: 6a 00 push $0x0 10c669: 6a 00 push $0x0 10c66b: 6a 00 push $0x0 10c66d: ff 33 pushl (%ebx) 10c66f: 83 c0 10 add $0x10,%eax 10c672: 50 push %eax 10c673: e8 44 1c 00 00 call 10e2bc <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10c678: 83 c4 20 add $0x20,%esp 10c67b: e8 a8 30 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c680: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c683: a1 98 a6 12 00 mov 0x12a698,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c688: ff 70 34 pushl 0x34(%eax) 10c68b: e8 28 ff ff ff call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c690: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c693: 8b 5d fc mov -0x4(%ebp),%ebx 10c696: c9 leave 10c697: c3 ret =============================================================================== 0010c698 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10c698: 55 push %ebp 10c699: 89 e5 mov %esp,%ebp 10c69b: 53 push %ebx 10c69c: 83 ec 14 sub $0x14,%esp 10c69f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10c6a2: 85 c0 test %eax,%eax 10c6a4: 74 1b je 10c6c1 10c6a6: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c6a7: 8d 55 f4 lea -0xc(%ebp),%edx 10c6aa: 52 push %edx 10c6ab: ff 30 pushl (%eax) 10c6ad: 68 40 a3 12 00 push $0x12a340 10c6b2: e8 e1 27 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c6b7: 83 c4 10 add $0x10,%esp 10c6ba: 8b 55 f4 mov -0xc(%ebp),%edx 10c6bd: 85 d2 test %edx,%edx 10c6bf: 74 0b je 10c6cc #endif case OBJECTS_ERROR: break; } return EINVAL; 10c6c1: b8 16 00 00 00 mov $0x16,%eax } 10c6c6: 8b 5d fc mov -0x4(%ebp),%ebx 10c6c9: c9 leave 10c6ca: c3 ret 10c6cb: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10c6cc: 83 ec 0c sub $0xc,%esp 10c6cf: 83 c0 10 add $0x10,%eax 10c6d2: 50 push %eax 10c6d3: e8 70 1c 00 00 call 10e348 <_CORE_RWLock_Release> 10c6d8: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10c6da: e8 49 30 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c6df: 89 1c 24 mov %ebx,(%esp) 10c6e2: e8 d1 fe ff ff call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c6e7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c6ea: 8b 5d fc mov -0x4(%ebp),%ebx 10c6ed: c9 leave 10c6ee: c3 ret =============================================================================== 0010c6f0 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10c6f0: 55 push %ebp 10c6f1: 89 e5 mov %esp,%ebp 10c6f3: 53 push %ebx 10c6f4: 83 ec 14 sub $0x14,%esp 10c6f7: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c6fa: 85 db test %ebx,%ebx 10c6fc: 74 1b je 10c719 10c6fe: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c6ff: 8d 45 f4 lea -0xc(%ebp),%eax 10c702: 50 push %eax 10c703: ff 33 pushl (%ebx) 10c705: 68 40 a3 12 00 push $0x12a340 10c70a: e8 89 27 00 00 call 10ee98 <_Objects_Get> switch ( location ) { 10c70f: 83 c4 10 add $0x10,%esp 10c712: 8b 55 f4 mov -0xc(%ebp),%edx 10c715: 85 d2 test %edx,%edx 10c717: 74 0b je 10c724 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c719: b8 16 00 00 00 mov $0x16,%eax } 10c71e: 8b 5d fc mov -0x4(%ebp),%ebx 10c721: c9 leave 10c722: c3 ret 10c723: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c724: 83 ec 0c sub $0xc,%esp 10c727: 6a 00 push $0x0 10c729: 6a 00 push $0x0 10c72b: 6a 01 push $0x1 10c72d: ff 33 pushl (%ebx) 10c72f: 83 c0 10 add $0x10,%eax 10c732: 50 push %eax 10c733: e8 84 1b 00 00 call 10e2bc <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c738: 83 c4 20 add $0x20,%esp 10c73b: e8 e8 2f 00 00 call 10f728 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c740: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c743: a1 98 a6 12 00 mov 0x12a698,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c748: ff 70 34 pushl 0x34(%eax) 10c74b: e8 68 fe ff ff call 10c5b8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c750: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c753: 8b 5d fc mov -0x4(%ebp),%ebx 10c756: c9 leave 10c757: c3 ret =============================================================================== 0010cd14 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10cd14: 55 push %ebp 10cd15: 89 e5 mov %esp,%ebp 10cd17: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10cd1a: 85 c0 test %eax,%eax 10cd1c: 74 12 je 10cd30 10cd1e: 8b 10 mov (%eax),%edx 10cd20: 85 d2 test %edx,%edx 10cd22: 74 0c je 10cd30 return EINVAL; attr->is_initialized = false; 10cd24: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10cd2a: 31 c0 xor %eax,%eax } 10cd2c: c9 leave 10cd2d: c3 ret 10cd2e: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10cd30: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10cd35: c9 leave 10cd36: c3 ret =============================================================================== 0010cd5c : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 10cd5c: 55 push %ebp 10cd5d: 89 e5 mov %esp,%ebp 10cd5f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10cd62: 85 c0 test %eax,%eax 10cd64: 74 12 je 10cd78 return EINVAL; attr->is_initialized = true; 10cd66: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10cd6c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) return 0; 10cd73: 31 c0 xor %eax,%eax } 10cd75: c9 leave 10cd76: c3 ret 10cd77: 90 nop <== NOT EXECUTED int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { if ( !attr ) return EINVAL; 10cd78: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10cd7d: c9 leave 10cd7e: c3 ret =============================================================================== 0010cd80 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10cd80: 55 push %ebp 10cd81: 89 e5 mov %esp,%ebp 10cd83: 8b 45 08 mov 0x8(%ebp),%eax 10cd86: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10cd89: 85 c0 test %eax,%eax 10cd8b: 74 0b je 10cd98 return EINVAL; if ( !attr->is_initialized ) 10cd8d: 8b 08 mov (%eax),%ecx 10cd8f: 85 c9 test %ecx,%ecx 10cd91: 74 05 je 10cd98 return EINVAL; switch ( pshared ) { 10cd93: 83 fa 01 cmp $0x1,%edx 10cd96: 76 08 jbe 10cda0 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10cd98: b8 16 00 00 00 mov $0x16,%eax } } 10cd9d: c9 leave 10cd9e: c3 ret 10cd9f: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cda0: 89 50 04 mov %edx,0x4(%eax) return 0; 10cda3: 31 c0 xor %eax,%eax default: return EINVAL; } } 10cda5: c9 leave 10cda6: c3 ret =============================================================================== 0010b1f4 : int pthread_setcancelstate( int state, int *oldstate ) { 10b1f4: 55 push %ebp 10b1f5: 89 e5 mov %esp,%ebp 10b1f7: 53 push %ebx 10b1f8: 83 ec 04 sub $0x4,%esp 10b1fb: 8b 55 08 mov 0x8(%ebp),%edx 10b1fe: 8b 45 0c mov 0xc(%ebp),%eax * 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() ) 10b201: 8b 0d 54 8d 12 00 mov 0x128d54,%ecx 10b207: 85 c9 test %ecx,%ecx 10b209: 75 15 jne 10b220 return EPROTO; if ( !oldstate ) 10b20b: 85 c0 test %eax,%eax 10b20d: 74 05 je 10b214 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10b20f: 83 fa 01 cmp $0x1,%edx 10b212: 76 18 jbe 10b22c return EINVAL; 10b214: b8 16 00 00 00 mov $0x16,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b219: 8b 5d fc mov -0x4(%ebp),%ebx 10b21c: c9 leave 10b21d: c3 ret 10b21e: 66 90 xchg %ax,%ax <== NOT EXECUTED * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) return EPROTO; 10b220: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b225: 8b 5d fc mov -0x4(%ebp),%ebx 10b228: c9 leave 10b229: c3 ret 10b22a: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b22c: 8b 0d 58 8d 12 00 mov 0x128d58,%ecx 10b232: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b238: 8b 1d 94 87 12 00 mov 0x128794,%ebx 10b23e: 43 inc %ebx 10b23f: 89 1d 94 87 12 00 mov %ebx,0x128794 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10b245: 8b 99 d8 00 00 00 mov 0xd8(%ecx),%ebx 10b24b: 89 18 mov %ebx,(%eax) thread_support->cancelability_state = state; 10b24d: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b253: 83 ec 0c sub $0xc,%esp 10b256: ff 35 58 8d 12 00 pushl 0x128d58 10b25c: e8 97 53 00 00 call 1105f8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b261: 83 c4 10 add $0x10,%esp 10b264: 31 c0 xor %eax,%eax } 10b266: 8b 5d fc mov -0x4(%ebp),%ebx 10b269: c9 leave 10b26a: c3 ret =============================================================================== 0010b26c : int pthread_setcanceltype( int type, int *oldtype ) { 10b26c: 55 push %ebp 10b26d: 89 e5 mov %esp,%ebp 10b26f: 53 push %ebx 10b270: 83 ec 04 sub $0x4,%esp 10b273: 8b 55 08 mov 0x8(%ebp),%edx 10b276: 8b 45 0c mov 0xc(%ebp),%eax * 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() ) 10b279: 8b 0d 54 8d 12 00 mov 0x128d54,%ecx 10b27f: 85 c9 test %ecx,%ecx 10b281: 75 15 jne 10b298 return EPROTO; if ( !oldtype ) 10b283: 85 c0 test %eax,%eax 10b285: 74 05 je 10b28c return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10b287: 83 fa 01 cmp $0x1,%edx 10b28a: 76 18 jbe 10b2a4 return EINVAL; 10b28c: b8 16 00 00 00 mov $0x16,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b291: 8b 5d fc mov -0x4(%ebp),%ebx 10b294: c9 leave 10b295: c3 ret 10b296: 66 90 xchg %ax,%ax <== NOT EXECUTED * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) return EPROTO; 10b298: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b29d: 8b 5d fc mov -0x4(%ebp),%ebx 10b2a0: c9 leave 10b2a1: c3 ret 10b2a2: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b2a4: 8b 0d 58 8d 12 00 mov 0x128d58,%ecx 10b2aa: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx 10b2b0: 8b 1d 94 87 12 00 mov 0x128794,%ebx 10b2b6: 43 inc %ebx 10b2b7: 89 1d 94 87 12 00 mov %ebx,0x128794 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10b2bd: 8b 99 dc 00 00 00 mov 0xdc(%ecx),%ebx 10b2c3: 89 18 mov %ebx,(%eax) thread_support->cancelability_type = type; 10b2c5: 89 91 dc 00 00 00 mov %edx,0xdc(%ecx) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b2cb: 83 ec 0c sub $0xc,%esp 10b2ce: ff 35 58 8d 12 00 pushl 0x128d58 10b2d4: e8 1f 53 00 00 call 1105f8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b2d9: 83 c4 10 add $0x10,%esp 10b2dc: 31 c0 xor %eax,%eax } 10b2de: 8b 5d fc mov -0x4(%ebp),%ebx 10b2e1: c9 leave 10b2e2: c3 ret =============================================================================== 0010dce4 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10dce4: 55 push %ebp 10dce5: 89 e5 mov %esp,%ebp 10dce7: 57 push %edi 10dce8: 56 push %esi 10dce9: 53 push %ebx 10dcea: 83 ec 2c sub $0x2c,%esp 10dced: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10dcf0: 85 f6 test %esi,%esi 10dcf2: 0f 84 cc 00 00 00 je 10ddc4 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10dcf8: 8d 45 e0 lea -0x20(%ebp),%eax 10dcfb: 50 push %eax 10dcfc: 8d 45 e4 lea -0x1c(%ebp),%eax 10dcff: 50 push %eax 10dd00: 56 push %esi 10dd01: ff 75 0c pushl 0xc(%ebp) 10dd04: e8 2f 5b 00 00 call 113838 <_POSIX_Thread_Translate_sched_param> 10dd09: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10dd0b: 83 c4 10 add $0x10,%esp 10dd0e: 85 c0 test %eax,%eax 10dd10: 74 0a je 10dd1c case OBJECTS_ERROR: break; } return ESRCH; } 10dd12: 89 d8 mov %ebx,%eax 10dd14: 8d 65 f4 lea -0xc(%ebp),%esp 10dd17: 5b pop %ebx 10dd18: 5e pop %esi 10dd19: 5f pop %edi 10dd1a: c9 leave 10dd1b: c3 ret 10dd1c: 50 push %eax return rc; /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); 10dd1d: 8d 45 dc lea -0x24(%ebp),%eax 10dd20: 50 push %eax 10dd21: ff 75 08 pushl 0x8(%ebp) 10dd24: 68 40 c6 12 00 push $0x12c640 10dd29: e8 9a 1f 00 00 call 10fcc8 <_Objects_Get> 10dd2e: 89 c2 mov %eax,%edx switch ( location ) { 10dd30: 83 c4 10 add $0x10,%esp 10dd33: 8b 7d dc mov -0x24(%ebp),%edi 10dd36: 85 ff test %edi,%edi 10dd38: 0f 85 96 00 00 00 jne 10ddd4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10dd3e: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10dd44: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10dd47: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax) 10dd4e: 0f 84 cc 00 00 00 je 10de20 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10dd54: 8b 45 0c mov 0xc(%ebp),%eax 10dd57: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dd5a: 89 81 84 00 00 00 mov %eax,0x84(%ecx) api->schedparam = *param; 10dd60: 89 cf mov %ecx,%edi 10dd62: 81 c7 88 00 00 00 add $0x88,%edi 10dd68: b9 07 00 00 00 mov $0x7,%ecx 10dd6d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10dd6f: 8b 45 e4 mov -0x1c(%ebp),%eax 10dd72: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10dd75: 8b 45 e0 mov -0x20(%ebp),%eax 10dd78: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10dd7e: 8b 75 0c mov 0xc(%ebp),%esi 10dd81: 85 f6 test %esi,%esi 10dd83: 78 2e js 10ddb3 <== NEVER TAKEN 10dd85: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10dd89: 7f 59 jg 10dde4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dd8b: a1 64 c3 12 00 mov 0x12c364,%eax 10dd90: 89 42 78 mov %eax,0x78(%edx) 10dd93: 0f b6 05 9c 80 12 00 movzbl 0x12809c,%eax 10dd9a: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dd9d: 2b 81 88 00 00 00 sub 0x88(%ecx),%eax the_thread->real_priority = 10dda3: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10dda6: 51 push %ecx 10dda7: 6a 01 push $0x1 10dda9: 50 push %eax 10ddaa: 52 push %edx 10ddab: e8 a4 22 00 00 call 110054 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10ddb0: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10ddb3: e8 a0 27 00 00 call 110558 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10ddb8: 89 d8 mov %ebx,%eax 10ddba: 8d 65 f4 lea -0xc(%ebp),%esp 10ddbd: 5b pop %ebx 10ddbe: 5e pop %esi 10ddbf: 5f pop %edi 10ddc0: c9 leave 10ddc1: c3 ret 10ddc2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Check all the parameters */ if ( !param ) return EINVAL; 10ddc4: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10ddc9: 89 d8 mov %ebx,%eax 10ddcb: 8d 65 f4 lea -0xc(%ebp),%esp 10ddce: 5b pop %ebx 10ddcf: 5e pop %esi 10ddd0: 5f pop %edi 10ddd1: c9 leave 10ddd2: c3 ret 10ddd3: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10ddd4: bb 03 00 00 00 mov $0x3,%ebx } 10ddd9: 89 d8 mov %ebx,%eax 10dddb: 8d 65 f4 lea -0xc(%ebp),%esp 10ddde: 5b pop %ebx 10dddf: 5e pop %esi 10dde0: 5f pop %edi 10dde1: c9 leave 10dde2: c3 ret 10dde3: 90 nop <== NOT EXECUTED api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10dde4: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10dde8: 75 c9 jne 10ddb3 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10ddea: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dded: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10ddf3: 89 81 a4 00 00 00 mov %eax,0xa4(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10ddf9: 83 ec 0c sub $0xc,%esp 10ddfc: 89 c8 mov %ecx,%eax 10ddfe: 05 a8 00 00 00 add $0xa8,%eax 10de03: 50 push %eax 10de04: 89 55 d0 mov %edx,-0x30(%ebp) 10de07: e8 54 39 00 00 call 111760 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10de0c: 58 pop %eax 10de0d: 5a pop %edx 10de0e: 8b 55 d0 mov -0x30(%ebp),%edx 10de11: 52 push %edx 10de12: 6a 00 push $0x0 10de14: e8 af fd ff ff call 10dbc8 <_POSIX_Threads_Sporadic_budget_TSR> break; 10de19: 83 c4 10 add $0x10,%esp 10de1c: eb 95 jmp 10ddb3 10de1e: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 10de20: 83 ec 0c sub $0xc,%esp 10de23: 05 a8 00 00 00 add $0xa8,%eax 10de28: 50 push %eax 10de29: 89 55 d0 mov %edx,-0x30(%ebp) 10de2c: e8 2f 39 00 00 call 111760 <_Watchdog_Remove> 10de31: 83 c4 10 add $0x10,%esp 10de34: 8b 55 d0 mov -0x30(%ebp),%edx 10de37: e9 18 ff ff ff jmp 10dd54 =============================================================================== 00111bfc : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 111bfc: 55 push %ebp 111bfd: 89 e5 mov %esp,%ebp 111bff: 56 push %esi 111c00: 53 push %ebx 111c01: 8b 4d 08 mov 0x8(%ebp),%ecx 111c04: 8b 55 0c mov 0xc(%ebp),%edx 111c07: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 111c0a: 85 d2 test %edx,%edx 111c0c: 0f 84 8a 00 00 00 je 111c9c rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111c12: a1 18 8b 12 00 mov 0x128b18,%eax 111c17: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax if ( oset ) 111c1d: 85 db test %ebx,%ebx 111c1f: 74 0c je 111c2d *oset = api->signals_blocked; 111c21: 8b b0 d0 00 00 00 mov 0xd0(%eax),%esi 111c27: 89 33 mov %esi,(%ebx) if ( !set ) 111c29: 85 d2 test %edx,%edx 111c2b: 74 3b je 111c68 return 0; switch ( how ) { 111c2d: 83 f9 01 cmp $0x1,%ecx 111c30: 74 5e je 111c90 111c32: 83 f9 02 cmp $0x2,%ecx 111c35: 74 39 je 111c70 111c37: 85 c9 test %ecx,%ecx 111c39: 75 41 jne 111c7c break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 111c3b: 8b 12 mov (%edx),%edx 111c3d: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 111c43: 8b 15 48 8d 12 00 mov 0x128d48,%edx 111c49: 0b 90 d4 00 00 00 or 0xd4(%eax),%edx /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 111c4f: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 111c55: f7 d0 not %eax 111c57: 85 c2 test %eax,%edx 111c59: 74 0d je 111c68 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); 111c5b: e8 ac c7 ff ff call 10e40c <_Thread_Dispatch> } return 0; 111c60: 31 c0 xor %eax,%eax } 111c62: 5b pop %ebx 111c63: 5e pop %esi 111c64: c9 leave 111c65: c3 ret 111c66: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; 111c68: 31 c0 xor %eax,%eax } 111c6a: 5b pop %ebx 111c6b: 5e pop %esi 111c6c: c9 leave 111c6d: c3 ret 111c6e: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 111c70: 8b 12 mov (%edx),%edx 111c72: f7 d2 not %edx 111c74: 21 90 d0 00 00 00 and %edx,0xd0(%eax) break; 111c7a: eb c7 jmp 111c43 case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 111c7c: e8 03 26 00 00 call 114284 <__errno> 111c81: c7 00 16 00 00 00 movl $0x16,(%eax) 111c87: b8 ff ff ff ff mov $0xffffffff,%eax (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 111c8c: 5b pop %ebx 111c8d: 5e pop %esi 111c8e: c9 leave 111c8f: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 111c90: 8b 12 mov (%edx),%edx 111c92: 09 90 d0 00 00 00 or %edx,0xd0(%eax) break; 111c98: eb a9 jmp 111c43 111c9a: 66 90 xchg %ax,%ax <== NOT EXECUTED sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 111c9c: 85 db test %ebx,%ebx 111c9e: 74 dc je 111c7c rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111ca0: a1 18 8b 12 00 mov 0x128b18,%eax 111ca5: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 111cab: e9 71 ff ff ff jmp 111c21 =============================================================================== 0010b6d4 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10b6d4: 55 push %ebp 10b6d5: 89 e5 mov %esp,%ebp 10b6d7: 83 ec 28 sub $0x28,%esp 10b6da: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10b6dd: 85 c0 test %eax,%eax 10b6df: 74 2f je 10b710 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b6e1: 52 push %edx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b6e2: 8d 55 f4 lea -0xc(%ebp),%edx 10b6e5: 52 push %edx 10b6e6: ff 30 pushl (%eax) 10b6e8: 68 40 88 12 00 push $0x128840 10b6ed: e8 72 21 00 00 call 10d864 <_Objects_Get> switch ( location ) { 10b6f2: 83 c4 10 add $0x10,%esp 10b6f5: 8b 4d f4 mov -0xc(%ebp),%ecx 10b6f8: 85 c9 test %ecx,%ecx 10b6fa: 75 14 jne 10b710 */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10b6fc: 8b 50 18 mov 0x18(%eax),%edx case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10b6ff: 85 d2 test %edx,%edx 10b701: 74 15 je 10b718 _Thread_Enable_dispatch(); 10b703: e8 ec 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> return EBUSY; 10b708: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b70d: c9 leave 10b70e: c3 ret 10b70f: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10b710: b8 16 00 00 00 mov $0x16,%eax } 10b715: c9 leave 10b716: c3 ret 10b717: 90 nop <== NOT EXECUTED if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b718: 83 ec 08 sub $0x8,%esp 10b71b: 50 push %eax 10b71c: 68 40 88 12 00 push $0x128840 10b721: 89 45 e4 mov %eax,-0x1c(%ebp) 10b724: e8 ff 1c 00 00 call 10d428 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b729: 58 pop %eax 10b72a: 5a pop %edx 10b72b: 8b 45 e4 mov -0x1c(%ebp),%eax 10b72e: 50 push %eax 10b72f: 68 40 88 12 00 push $0x128840 10b734: e8 eb 1f 00 00 call 10d724 <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10b739: e8 b6 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> return 0; 10b73e: 83 c4 10 add $0x10,%esp 10b741: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b743: c9 leave 10b744: c3 ret =============================================================================== 0010b748 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 10b748: 55 push %ebp 10b749: 89 e5 mov %esp,%ebp 10b74b: 56 push %esi 10b74c: 53 push %ebx 10b74d: 83 ec 20 sub $0x20,%esp 10b750: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 10b753: 85 db test %ebx,%ebx 10b755: 74 6d je 10b7c4 return EINVAL; switch ( pshared ) { 10b757: 8b 45 0c mov 0xc(%ebp),%eax 10b75a: 85 c0 test %eax,%eax 10b75c: 75 66 jne 10b7c4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b75e: a1 54 85 12 00 mov 0x128554,%eax 10b763: 40 inc %eax 10b764: a3 54 85 12 00 mov %eax,0x128554 * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) _Objects_Allocate( &_POSIX_Spinlock_Information ); 10b769: 83 ec 0c sub $0xc,%esp 10b76c: 68 40 88 12 00 push $0x128840 10b771: e8 36 1c 00 00 call 10d3ac <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 10b776: 83 c4 10 add $0x10,%esp 10b779: 85 c0 test %eax,%eax 10b77b: 74 53 je 10b7d0 */ RTEMS_INLINE_ROUTINE void _CORE_spinlock_Initialize_attributes( CORE_spinlock_Attributes *the_attributes ) { the_attributes->XXX = 0; 10b77d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) return EAGAIN; } _CORE_spinlock_Initialize_attributes( &attributes ); _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 10b784: 83 ec 08 sub $0x8,%esp 10b787: 8d 55 f4 lea -0xc(%ebp),%edx 10b78a: 52 push %edx 10b78b: 8d 50 10 lea 0x10(%eax),%edx 10b78e: 52 push %edx 10b78f: 89 45 e4 mov %eax,-0x1c(%ebp) 10b792: e8 09 16 00 00 call 10cda0 <_CORE_spinlock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b797: 8b 45 e4 mov -0x1c(%ebp),%eax 10b79a: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b79d: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b7a0: 8b 0d 5c 88 12 00 mov 0x12885c,%ecx 10b7a6: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b7a9: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 10b7b0: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b7b2: e8 3d 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> return 0; 10b7b7: 83 c4 10 add $0x10,%esp 10b7ba: 31 c0 xor %eax,%eax } 10b7bc: 8d 65 f8 lea -0x8(%ebp),%esp 10b7bf: 5b pop %ebx 10b7c0: 5e pop %esi 10b7c1: c9 leave 10b7c2: c3 ret 10b7c3: 90 nop <== NOT EXECUTED switch ( pshared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10b7c4: b8 16 00 00 00 mov $0x16,%eax *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; } 10b7c9: 8d 65 f8 lea -0x8(%ebp),%esp 10b7cc: 5b pop %ebx 10b7cd: 5e pop %esi 10b7ce: c9 leave 10b7cf: c3 ret _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { _Thread_Enable_dispatch(); 10b7d0: e8 1f 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> return EAGAIN; 10b7d5: b8 0b 00 00 00 mov $0xb,%eax 10b7da: eb ed jmp 10b7c9 =============================================================================== 0010b7dc : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10b7dc: 55 push %ebp 10b7dd: 89 e5 mov %esp,%ebp 10b7df: 53 push %ebx 10b7e0: 83 ec 14 sub $0x14,%esp 10b7e3: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b7e6: 85 c0 test %eax,%eax 10b7e8: 74 1b je 10b805 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b7ea: 53 push %ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b7eb: 8d 55 f4 lea -0xc(%ebp),%edx 10b7ee: 52 push %edx 10b7ef: ff 30 pushl (%eax) 10b7f1: 68 40 88 12 00 push $0x128840 10b7f6: e8 69 20 00 00 call 10d864 <_Objects_Get> switch ( location ) { 10b7fb: 83 c4 10 add $0x10,%esp 10b7fe: 8b 4d f4 mov -0xc(%ebp),%ecx 10b801: 85 c9 test %ecx,%ecx 10b803: 74 0b je 10b810 #endif case OBJECTS_ERROR: break; } return EINVAL; 10b805: b8 16 00 00 00 mov $0x16,%eax } 10b80a: 8b 5d fc mov -0x4(%ebp),%ebx 10b80d: c9 leave 10b80e: c3 ret 10b80f: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); 10b810: 52 push %edx 10b811: 6a 00 push $0x0 10b813: 6a 01 push $0x1 10b815: 83 c0 10 add $0x10,%eax 10b818: 50 push %eax 10b819: e8 f6 15 00 00 call 10ce14 <_CORE_spinlock_Wait> 10b81e: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b820: e8 cf 28 00 00 call 10e0f4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b825: 89 1c 24 mov %ebx,(%esp) 10b828: e8 0b 00 00 00 call 10b838 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b82d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b830: 8b 5d fc mov -0x4(%ebp),%ebx 10b833: c9 leave 10b834: c3 ret =============================================================================== 0010b848 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10b848: 55 push %ebp 10b849: 89 e5 mov %esp,%ebp 10b84b: 53 push %ebx 10b84c: 83 ec 14 sub $0x14,%esp 10b84f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b852: 85 c0 test %eax,%eax 10b854: 74 1b je 10b871 10b856: 53 push %ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b857: 8d 55 f4 lea -0xc(%ebp),%edx 10b85a: 52 push %edx 10b85b: ff 30 pushl (%eax) 10b85d: 68 40 88 12 00 push $0x128840 10b862: e8 fd 1f 00 00 call 10d864 <_Objects_Get> switch ( location ) { 10b867: 83 c4 10 add $0x10,%esp 10b86a: 8b 4d f4 mov -0xc(%ebp),%ecx 10b86d: 85 c9 test %ecx,%ecx 10b86f: 74 0b je 10b87c #endif case OBJECTS_ERROR: break; } return EINVAL; 10b871: b8 16 00 00 00 mov $0x16,%eax } 10b876: 8b 5d fc mov -0x4(%ebp),%ebx 10b879: c9 leave 10b87a: c3 ret 10b87b: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 10b87c: 52 push %edx 10b87d: 6a 00 push $0x0 10b87f: 6a 00 push $0x0 10b881: 83 c0 10 add $0x10,%eax 10b884: 50 push %eax 10b885: e8 8a 15 00 00 call 10ce14 <_CORE_spinlock_Wait> 10b88a: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b88c: e8 63 28 00 00 call 10e0f4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b891: 89 1c 24 mov %ebx,(%esp) 10b894: e8 9f ff ff ff call 10b838 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b899: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b89c: 8b 5d fc mov -0x4(%ebp),%ebx 10b89f: c9 leave 10b8a0: c3 ret =============================================================================== 0010b8a4 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10b8a4: 55 push %ebp 10b8a5: 89 e5 mov %esp,%ebp 10b8a7: 53 push %ebx 10b8a8: 83 ec 14 sub $0x14,%esp 10b8ab: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b8ae: 85 c0 test %eax,%eax 10b8b0: 74 1b je 10b8cd 10b8b2: 51 push %ecx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b8b3: 8d 55 f4 lea -0xc(%ebp),%edx 10b8b6: 52 push %edx 10b8b7: ff 30 pushl (%eax) 10b8b9: 68 40 88 12 00 push $0x128840 10b8be: e8 a1 1f 00 00 call 10d864 <_Objects_Get> switch ( location ) { 10b8c3: 83 c4 10 add $0x10,%esp 10b8c6: 8b 55 f4 mov -0xc(%ebp),%edx 10b8c9: 85 d2 test %edx,%edx 10b8cb: 74 0b je 10b8d8 #endif case OBJECTS_ERROR: break; } return EINVAL; 10b8cd: b8 16 00 00 00 mov $0x16,%eax } 10b8d2: 8b 5d fc mov -0x4(%ebp),%ebx 10b8d5: c9 leave 10b8d6: c3 ret 10b8d7: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10b8d8: 83 ec 0c sub $0xc,%esp 10b8db: 83 c0 10 add $0x10,%eax 10b8de: 50 push %eax 10b8df: e8 e0 14 00 00 call 10cdc4 <_CORE_spinlock_Release> 10b8e4: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b8e6: e8 09 28 00 00 call 10e0f4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b8eb: 89 1c 24 mov %ebx,(%esp) 10b8ee: e8 45 ff ff ff call 10b838 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b8f3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b8f6: 8b 5d fc mov -0x4(%ebp),%ebx 10b8f9: c9 leave 10b8fa: c3 ret =============================================================================== 0010bb64 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10bb64: 55 push %ebp 10bb65: 89 e5 mov %esp,%ebp 10bb67: 83 ec 08 sub $0x8,%esp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10bb6a: 8b 0d d4 94 12 00 mov 0x1294d4,%ecx 10bb70: 85 c9 test %ecx,%ecx 10bb72: 75 44 jne 10bbb8 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10bb74: a1 d8 94 12 00 mov 0x1294d8,%eax 10bb79: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10bb7f: 8b 15 14 8f 12 00 mov 0x128f14,%edx 10bb85: 42 inc %edx 10bb86: 89 15 14 8f 12 00 mov %edx,0x128f14 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10bb8c: 8b 90 d8 00 00 00 mov 0xd8(%eax),%edx 10bb92: 85 d2 test %edx,%edx 10bb94: 75 26 jne 10bbbc <== NEVER TAKEN 10bb96: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax 10bb9c: 85 c0 test %eax,%eax 10bb9e: 74 1c je 10bbbc thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10bba0: e8 97 26 00 00 call 10e23c <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10bba5: 83 ec 08 sub $0x8,%esp 10bba8: 6a ff push $0xffffffff 10bbaa: ff 35 d8 94 12 00 pushl 0x1294d8 10bbb0: e8 8b 5a 00 00 call 111640 <_POSIX_Thread_Exit> 10bbb5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10bbb8: c9 leave <== NOT EXECUTED 10bbb9: c3 ret <== NOT EXECUTED 10bbba: 66 90 xchg %ax,%ax <== NOT EXECUTED 10bbbc: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10bbbd: e9 7a 26 00 00 jmp 10e23c <_Thread_Enable_dispatch> =============================================================================== 001135a4 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 1135a4: 55 push %ebp 1135a5: 89 e5 mov %esp,%ebp 1135a7: 57 push %edi 1135a8: 56 push %esi 1135a9: 53 push %ebx 1135aa: 83 ec 2c sub $0x2c,%esp 1135ad: 8b 5d 08 mov 0x8(%ebp),%ebx 1135b0: 8b 7d 0c mov 0xc(%ebp),%edi 1135b3: 8b 45 10 mov 0x10(%ebp),%eax 1135b6: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1135b9: 85 db test %ebx,%ebx 1135bb: 0f 84 87 00 00 00 je 113648 return RTEMS_INVALID_NAME; if ( !id ) 1135c1: 85 f6 test %esi,%esi 1135c3: 0f 84 bf 00 00 00 je 113688 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 1135c9: f7 c7 10 00 00 00 test $0x10,%edi 1135cf: 0f 84 83 00 00 00 je 113658 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1135d5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 1135dc: 85 c0 test %eax,%eax 1135de: 0f 84 80 00 00 00 je 113664 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 1135e4: 89 45 e4 mov %eax,-0x1c(%ebp) 1135e7: a1 74 9e 12 00 mov 0x129e74,%eax 1135ec: 40 inc %eax 1135ed: a3 74 9e 12 00 mov %eax,0x129e74 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 1135f2: 83 ec 0c sub $0xc,%esp 1135f5: 68 40 a8 12 00 push $0x12a840 1135fa: e8 19 b1 ff ff call 10e718 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 1135ff: 83 c4 10 add $0x10,%esp 113602: 85 c0 test %eax,%eax 113604: 74 6e je 113674 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 113606: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 113609: 83 ec 08 sub $0x8,%esp 11360c: 8d 55 e0 lea -0x20(%ebp),%edx 11360f: 52 push %edx 113610: 8d 50 14 lea 0x14(%eax),%edx 113613: 52 push %edx 113614: 89 45 d4 mov %eax,-0x2c(%ebp) 113617: e8 b4 07 00 00 call 113dd0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 11361c: 8b 45 d4 mov -0x2c(%ebp),%eax 11361f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 113622: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113625: 8b 0d 5c a8 12 00 mov 0x12a85c,%ecx 11362b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11362e: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 113631: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 113633: e8 58 be ff ff call 10f490 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 113638: 83 c4 10 add $0x10,%esp 11363b: 31 c0 xor %eax,%eax } 11363d: 8d 65 f4 lea -0xc(%ebp),%esp 113640: 5b pop %ebx 113641: 5e pop %esi 113642: 5f pop %edi 113643: c9 leave 113644: c3 ret 113645: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 113648: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11364d: 8d 65 f4 lea -0xc(%ebp),%esp 113650: 5b pop %ebx 113651: 5e pop %esi 113652: 5f pop %edi 113653: c9 leave 113654: c3 ret 113655: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 113658: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 11365f: eb 83 jmp 1135e4 113661: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; 113664: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113669: 8d 65 f4 lea -0xc(%ebp),%esp 11366c: 5b pop %ebx 11366d: 5e pop %esi 11366e: 5f pop %edi 11366f: c9 leave 113670: c3 ret 113671: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 113674: e8 17 be ff ff call 10f490 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113679: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11367e: 8d 65 f4 lea -0xc(%ebp),%esp 113681: 5b pop %ebx 113682: 5e pop %esi 113683: 5f pop %edi 113684: c9 leave 113685: c3 ret 113686: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 113688: b8 09 00 00 00 mov $0x9,%eax 11368d: eb ae jmp 11363d =============================================================================== 00113690 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 113690: 55 push %ebp 113691: 89 e5 mov %esp,%ebp 113693: 53 push %ebx 113694: 83 ec 18 sub $0x18,%esp Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 113697: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 11369a: 50 push %eax 11369b: ff 75 08 pushl 0x8(%ebp) 11369e: 68 40 a8 12 00 push $0x12a840 1136a3: e8 28 b5 ff ff call 10ebd0 <_Objects_Get> 1136a8: 89 c3 mov %eax,%ebx switch ( location ) { 1136aa: 83 c4 10 add $0x10,%esp 1136ad: 8b 4d f4 mov -0xc(%ebp),%ecx 1136b0: 85 c9 test %ecx,%ecx 1136b2: 75 38 jne 1136ec case OBJECTS_LOCAL: _CORE_barrier_Flush( 1136b4: 52 push %edx 1136b5: 6a 02 push $0x2 1136b7: 6a 00 push $0x0 1136b9: 8d 40 14 lea 0x14(%eax),%eax 1136bc: 50 push %eax 1136bd: e8 16 c5 ff ff call 10fbd8 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 1136c2: 59 pop %ecx 1136c3: 58 pop %eax 1136c4: 53 push %ebx 1136c5: 68 40 a8 12 00 push $0x12a840 1136ca: e8 c5 b0 ff ff call 10e794 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 1136cf: 58 pop %eax 1136d0: 5a pop %edx 1136d1: 53 push %ebx 1136d2: 68 40 a8 12 00 push $0x12a840 1136d7: e8 b4 b3 ff ff call 10ea90 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 1136dc: e8 af bd ff ff call 10f490 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1136e1: 83 c4 10 add $0x10,%esp 1136e4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1136e6: 8b 5d fc mov -0x4(%ebp),%ebx 1136e9: c9 leave 1136ea: c3 ret 1136eb: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1136ec: b8 04 00 00 00 mov $0x4,%eax } 1136f1: 8b 5d fc mov -0x4(%ebp),%ebx 1136f4: c9 leave 1136f5: c3 ret =============================================================================== 00113784 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 113784: 55 push %ebp 113785: 89 e5 mov %esp,%ebp 113787: 53 push %ebx 113788: 83 ec 18 sub $0x18,%esp 11378b: 8b 5d 08 mov 0x8(%ebp),%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 11378e: 8d 45 f4 lea -0xc(%ebp),%eax 113791: 50 push %eax 113792: 53 push %ebx 113793: 68 40 a8 12 00 push $0x12a840 113798: e8 33 b4 ff ff call 10ebd0 <_Objects_Get> switch ( location ) { 11379d: 83 c4 10 add $0x10,%esp 1137a0: 8b 55 f4 mov -0xc(%ebp),%edx 1137a3: 85 d2 test %edx,%edx 1137a5: 75 35 jne 1137dc case OBJECTS_LOCAL: _CORE_barrier_Wait( 1137a7: 83 ec 0c sub $0xc,%esp 1137aa: 6a 00 push $0x0 1137ac: ff 75 0c pushl 0xc(%ebp) 1137af: 6a 01 push $0x1 1137b1: 53 push %ebx 1137b2: 83 c0 14 add $0x14,%eax 1137b5: 50 push %eax 1137b6: e8 79 06 00 00 call 113e34 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 1137bb: 83 c4 20 add $0x20,%esp 1137be: e8 cd bc ff ff call 10f490 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 1137c3: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 1137c6: a1 38 a4 12 00 mov 0x12a438,%eax true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 1137cb: ff 70 34 pushl 0x34(%eax) 1137ce: e8 69 19 00 00 call 11513c <_Barrier_Translate_core_barrier_return_code> 1137d3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1137d6: 8b 5d fc mov -0x4(%ebp),%ebx 1137d9: c9 leave 1137da: c3 ret 1137db: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1137dc: b8 04 00 00 00 mov $0x4,%eax } 1137e1: 8b 5d fc mov -0x4(%ebp),%ebx 1137e4: c9 leave 1137e5: c3 ret =============================================================================== 0010bff0 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10bff0: 55 push %ebp 10bff1: 89 e5 mov %esp,%ebp 10bff3: 56 push %esi 10bff4: 53 push %ebx 10bff5: 8b 5d 10 mov 0x10(%ebp),%ebx 10bff8: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); 10bffb: 83 ec 08 sub $0x8,%esp 10bffe: ff 75 0c pushl 0xc(%ebp) 10c001: ff 75 08 pushl 0x8(%ebp) 10c004: e8 df 04 00 00 call 10c4e8 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { 10c009: 83 c4 10 add $0x10,%esp 10c00c: 84 c0 test %al,%al 10c00e: 75 0c jne 10c01c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c010: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c012: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c015: 5b pop %ebx <== NOT EXECUTED 10c016: 5e pop %esi <== NOT EXECUTED 10c017: c9 leave <== NOT EXECUTED 10c018: c3 ret <== NOT EXECUTED 10c019: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c01c: 89 75 0c mov %esi,0xc(%ebp) 10c01f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c022: 8d 65 f8 lea -0x8(%ebp),%esp 10c025: 5b pop %ebx 10c026: 5e pop %esi 10c027: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c028: e9 af f5 ff ff jmp 10b5dc =============================================================================== 0010c030 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 10c030: 55 push %ebp 10c031: 89 e5 mov %esp,%ebp 10c033: 56 push %esi 10c034: 53 push %ebx 10c035: 8b 5d 0c mov 0xc(%ebp),%ebx 10c038: 8b 75 10 mov 0x10(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); 10c03b: 83 ec 08 sub $0x8,%esp 10c03e: ff 75 14 pushl 0x14(%ebp) 10c041: ff 75 08 pushl 0x8(%ebp) 10c044: e8 07 05 00 00 call 10c550 <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { 10c049: 83 c4 10 add $0x10,%esp 10c04c: 84 c0 test %al,%al 10c04e: 75 0c jne 10c05c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c050: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c052: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c055: 5b pop %ebx <== NOT EXECUTED 10c056: 5e pop %esi <== NOT EXECUTED 10c057: c9 leave <== NOT EXECUTED 10c058: c3 ret <== NOT EXECUTED 10c059: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c05c: 89 75 0c mov %esi,0xc(%ebp) 10c05f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c062: 8d 65 f8 lea -0x8(%ebp),%esp 10c065: 5b pop %ebx 10c066: 5e pop %esi 10c067: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c068: e9 6f f5 ff ff jmp 10b5dc =============================================================================== 0010c070 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10c070: 55 push %ebp 10c071: 89 e5 mov %esp,%ebp 10c073: 57 push %edi 10c074: 56 push %esi 10c075: 53 push %ebx 10c076: 83 ec 1c sub $0x1c,%esp 10c079: 8b 75 08 mov 0x8(%ebp),%esi while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 10c07c: 8d 7d e4 lea -0x1c(%ebp),%edi 10c07f: 90 nop */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10c080: 83 ec 0c sub $0xc,%esp 10c083: 56 push %esi 10c084: e8 03 05 00 00 call 10c58c <_Chain_Get> 10c089: 89 c3 mov %eax,%ebx rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c08b: 83 c4 10 add $0x10,%esp 10c08e: 85 c0 test %eax,%eax 10c090: 75 22 jne 10c0b4 ) { rtems_event_set out; sc = rtems_event_receive( 10c092: 57 push %edi 10c093: ff 75 10 pushl 0x10(%ebp) 10c096: 6a 00 push $0x0 10c098: ff 75 0c pushl 0xc(%ebp) 10c09b: e8 b4 f3 ff ff call 10b454 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10c0a0: 83 c4 10 add $0x10,%esp 10c0a3: 85 c0 test %eax,%eax 10c0a5: 74 d9 je 10c080 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 10c0a7: 8b 55 14 mov 0x14(%ebp),%edx 10c0aa: 89 1a mov %ebx,(%edx) return sc; } 10c0ac: 8d 65 f4 lea -0xc(%ebp),%esp 10c0af: 5b pop %ebx 10c0b0: 5e pop %esi 10c0b1: 5f pop %edi 10c0b2: c9 leave 10c0b3: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c0b4: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10c0b6: 8b 55 14 mov 0x14(%ebp),%edx 10c0b9: 89 1a mov %ebx,(%edx) return sc; } 10c0bb: 8d 65 f4 lea -0xc(%ebp),%esp 10c0be: 5b pop %ebx 10c0bf: 5e pop %esi 10c0c0: 5f pop %edi 10c0c1: c9 leave 10c0c2: c3 ret =============================================================================== 0010c0c4 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10c0c4: 55 push %ebp 10c0c5: 89 e5 mov %esp,%ebp 10c0c7: 56 push %esi 10c0c8: 53 push %ebx 10c0c9: 8b 5d 10 mov 0x10(%ebp),%ebx 10c0cc: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); 10c0cf: 83 ec 08 sub $0x8,%esp 10c0d2: ff 75 0c pushl 0xc(%ebp) 10c0d5: ff 75 08 pushl 0x8(%ebp) 10c0d8: e8 f3 04 00 00 call 10c5d0 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { 10c0dd: 83 c4 10 add $0x10,%esp 10c0e0: 84 c0 test %al,%al 10c0e2: 75 0c jne 10c0f0 <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c0e4: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c0e6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c0e9: 5b pop %ebx <== NOT EXECUTED 10c0ea: 5e pop %esi <== NOT EXECUTED 10c0eb: c9 leave <== NOT EXECUTED 10c0ec: c3 ret <== NOT EXECUTED 10c0ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c0f0: 89 75 0c mov %esi,0xc(%ebp) 10c0f3: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c0f6: 8d 65 f8 lea -0x8(%ebp),%esp 10c0f9: 5b pop %ebx 10c0fa: 5e pop %esi 10c0fb: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c0fc: e9 db f4 ff ff jmp 10b5dc =============================================================================== 00115a3c : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115a3c: 55 push %ebp 115a3d: 89 e5 mov %esp,%ebp 115a3f: 53 push %ebx 115a40: 83 ec 04 sub $0x4,%esp 115a43: 8b 45 08 mov 0x8(%ebp),%eax 115a46: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115a49: 85 db test %ebx,%ebx 115a4b: 74 3b je 115a88 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115a4d: 85 c0 test %eax,%eax 115a4f: 74 2b je 115a7c return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115a51: 83 f8 01 cmp $0x1,%eax 115a54: 74 3e je 115a94 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115a56: 83 f8 02 cmp $0x2,%eax 115a59: 74 45 je 115aa0 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115a5b: 83 f8 03 cmp $0x3,%eax 115a5e: 74 4c je 115aac *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115a60: 83 f8 04 cmp $0x4,%eax 115a63: 74 0b je 115a70 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115a65: b8 0a 00 00 00 mov $0xa,%eax } 115a6a: 5a pop %edx 115a6b: 5b pop %ebx 115a6c: c9 leave 115a6d: c3 ret 115a6e: 66 90 xchg %ax,%ax <== NOT EXECUTED *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 115a70: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115a73: 59 pop %ecx 115a74: 5b pop %ebx 115a75: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 115a76: e9 41 01 00 00 jmp 115bbc 115a7b: 90 nop <== NOT EXECUTED { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 115a7c: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115a7f: 58 pop %eax 115a80: 5b pop %ebx 115a81: c9 leave { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 115a82: e9 81 00 00 00 jmp 115b08 115a87: 90 nop <== NOT EXECUTED rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115a88: b8 09 00 00 00 mov $0x9,%eax if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115a8d: 5a pop %edx 115a8e: 5b pop %ebx 115a8f: c9 leave 115a90: c3 ret 115a91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 115a94: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115a97: 5b pop %ebx 115a98: 5b pop %ebx 115a99: c9 leave if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 115a9a: e9 19 00 00 00 jmp 115ab8 115a9f: 90 nop <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 115aa0: e8 57 00 00 00 call 115afc 115aa5: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115aa7: 31 c0 xor %eax,%eax 115aa9: eb bf jmp 115a6a 115aab: 90 nop <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 115aac: e8 37 00 00 00 call 115ae8 115ab1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115ab3: 31 c0 xor %eax,%eax 115ab5: eb b3 jmp 115a6a =============================================================================== 0010bfc8 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10bfc8: 55 push %ebp 10bfc9: 89 e5 mov %esp,%ebp 10bfcb: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10bfce: 85 c0 test %eax,%eax 10bfd0: 74 1e je 10bff0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bfd2: 80 3d 68 23 13 00 00 cmpb $0x0,0x132368 10bfd9: 74 0d je 10bfe8 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10bfdb: 8b 15 e8 23 13 00 mov 0x1323e8,%edx 10bfe1: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10bfe3: 31 c0 xor %eax,%eax } 10bfe5: c9 leave 10bfe6: c3 ret 10bfe7: 90 nop <== NOT EXECUTED { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10bfe8: b8 0b 00 00 00 mov $0xb,%eax *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bfed: c9 leave 10bfee: c3 ret 10bfef: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; 10bff0: b8 09 00 00 00 mov $0x9,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bff5: c9 leave 10bff6: c3 ret =============================================================================== 00115bbc : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115bbc: 55 push %ebp 115bbd: 89 e5 mov %esp,%ebp 115bbf: 56 push %esi 115bc0: 53 push %ebx 115bc1: 83 ec 10 sub $0x10,%esp 115bc4: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115bc7: 85 db test %ebx,%ebx 115bc9: 74 51 je 115c1c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115bcb: 80 3d 28 21 14 00 00 cmpb $0x0,0x142128 115bd2: 75 0c jne 115be0 return RTEMS_NOT_DEFINED; 115bd4: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115bd9: 8d 65 f8 lea -0x8(%ebp),%esp 115bdc: 5b pop %ebx 115bdd: 5e pop %esi 115bde: c9 leave 115bdf: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115be0: 9c pushf 115be1: fa cli 115be2: 5e pop %esi _TOD_Get( &now ); 115be3: 83 ec 0c sub $0xc,%esp 115be6: 8d 45 f0 lea -0x10(%ebp),%eax 115be9: 50 push %eax 115bea: e8 e9 43 00 00 call 119fd8 <_TOD_Get> _ISR_Enable(level); 115bef: 56 push %esi 115bf0: 9d popf useconds = (suseconds_t)now.tv_nsec; 115bf1: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115bf4: 8b 45 f0 mov -0x10(%ebp),%eax 115bf7: 89 03 mov %eax,(%ebx) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 115bf9: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115bfe: f7 e9 imul %ecx 115c00: 89 d0 mov %edx,%eax 115c02: c1 f8 06 sar $0x6,%eax 115c05: c1 f9 1f sar $0x1f,%ecx 115c08: 29 c8 sub %ecx,%eax 115c0a: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115c0d: 83 c4 10 add $0x10,%esp 115c10: 31 c0 xor %eax,%eax } 115c12: 8d 65 f8 lea -0x8(%ebp),%esp 115c15: 5b pop %ebx 115c16: 5e pop %esi 115c17: c9 leave 115c18: c3 ret 115c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115c1c: b8 09 00 00 00 mov $0x9,%eax 115c21: eb b6 jmp 115bd9 =============================================================================== 0010b1b4 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b1b4: 55 push %ebp 10b1b5: 89 e5 mov %esp,%ebp 10b1b7: 83 ec 08 sub $0x8,%esp 10b1ba: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b1bd: 85 c0 test %eax,%eax 10b1bf: 74 13 je 10b1d4 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b1c1: 83 ec 0c sub $0xc,%esp 10b1c4: 50 push %eax 10b1c5: e8 72 16 00 00 call 10c83c <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b1ca: 83 c4 10 add $0x10,%esp 10b1cd: 31 c0 xor %eax,%eax } 10b1cf: c9 leave 10b1d0: c3 ret 10b1d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10b1d4: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b1d9: c9 leave 10b1da: c3 ret =============================================================================== 0010c0e8 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 83 ec 14 sub $0x14,%esp 10c0ef: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c0f2: 85 db test %ebx,%ebx 10c0f4: 74 66 je 10c15c return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c0f6: 83 ec 0c sub $0xc,%esp 10c0f9: 53 push %ebx 10c0fa: e8 39 01 00 00 call 10c238 <_TOD_Validate> 10c0ff: 83 c4 10 add $0x10,%esp 10c102: 84 c0 test %al,%al 10c104: 75 0a jne 10c110 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c106: b8 14 00 00 00 mov $0x14,%eax } 10c10b: 8b 5d fc mov -0x4(%ebp),%ebx 10c10e: c9 leave 10c10f: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c110: 83 ec 0c sub $0xc,%esp 10c113: 53 push %ebx 10c114: e8 93 00 00 00 call 10c1ac <_TOD_To_seconds> 10c119: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c11c: 8b 43 18 mov 0x18(%ebx),%eax 10c11f: 0f af 05 2c 62 12 00 imul 0x12622c,%eax 10c126: 8d 04 80 lea (%eax,%eax,4),%eax 10c129: 8d 04 80 lea (%eax,%eax,4),%eax 10c12c: 8d 04 80 lea (%eax,%eax,4),%eax 10c12f: c1 e0 03 shl $0x3,%eax 10c132: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c135: a1 54 23 13 00 mov 0x132354,%eax 10c13a: 40 inc %eax 10c13b: a3 54 23 13 00 mov %eax,0x132354 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c140: 8d 45 f0 lea -0x10(%ebp),%eax 10c143: 89 04 24 mov %eax,(%esp) 10c146: e8 59 19 00 00 call 10daa4 <_TOD_Set> _Thread_Enable_dispatch(); 10c14b: e8 c4 2c 00 00 call 10ee14 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c150: 83 c4 10 add $0x10,%esp 10c153: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c155: 8b 5d fc mov -0x4(%ebp),%ebx 10c158: c9 leave 10c159: c3 ret 10c15a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c15c: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c161: 8b 5d fc mov -0x4(%ebp),%ebx 10c164: c9 leave 10c165: c3 ret =============================================================================== 0010af94 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10af94: 55 push %ebp 10af95: 89 e5 mov %esp,%ebp 10af97: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10af9a: 85 c0 test %eax,%eax 10af9c: 74 0a je 10afa8 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10af9e: a3 84 66 12 00 mov %eax,0x126684 return RTEMS_SUCCESSFUL; 10afa3: 31 c0 xor %eax,%eax } 10afa5: c9 leave 10afa6: c3 ret 10afa7: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) return RTEMS_INVALID_ADDRESS; 10afa8: b8 09 00 00 00 mov $0x9,%eax _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10afad: c9 leave 10afae: c3 ret =============================================================================== 0010afb0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10afb0: 55 push %ebp 10afb1: 89 e5 mov %esp,%ebp 10afb3: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10afb6: e8 35 15 00 00 call 10c4f0 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10afbb: 83 ec 0c sub $0xc,%esp 10afbe: 68 a4 65 12 00 push $0x1265a4 10afc3: e8 00 38 00 00 call 10e7c8 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10afc8: e8 6b 32 00 00 call 10e238 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); 10afcd: a0 a4 6a 12 00 mov 0x126aa4,%al if ( _Thread_Is_context_switch_necessary() && 10afd2: 83 c4 10 add $0x10,%esp 10afd5: 84 c0 test %al,%al 10afd7: 74 09 je 10afe2 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10afd9: a1 d4 64 12 00 mov 0x1264d4,%eax 10afde: 85 c0 test %eax,%eax 10afe0: 74 06 je 10afe8 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10afe2: 31 c0 xor %eax,%eax 10afe4: c9 leave 10afe5: c3 ret 10afe6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10afe8: e8 43 25 00 00 call 10d530 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10afed: 31 c0 xor %eax,%eax 10afef: c9 leave 10aff0: c3 ret =============================================================================== 0010b17c : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b17c: 55 push %ebp 10b17d: 89 e5 mov %esp,%ebp 10b17f: 53 push %ebx 10b180: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b183: 8d 45 f4 lea -0xc(%ebp),%eax 10b186: 50 push %eax 10b187: ff 75 08 pushl 0x8(%ebp) 10b18a: e8 3d 25 00 00 call 10d6cc <_Thread_Get> switch ( location ) { 10b18f: 83 c4 10 add $0x10,%esp 10b192: 8b 55 f4 mov -0xc(%ebp),%edx 10b195: 85 d2 test %edx,%edx 10b197: 75 2b jne 10b1c4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b199: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b19f: 9c pushf 10b1a0: fa cli 10b1a1: 59 pop %ecx *the_event_set |= the_new_events; 10b1a2: 8b 5d 0c mov 0xc(%ebp),%ebx 10b1a5: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b1a7: 51 push %ecx 10b1a8: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b1a9: 83 ec 0c sub $0xc,%esp 10b1ac: 50 push %eax 10b1ad: e8 1e 00 00 00 call 10b1d0 <_Event_Surrender> _Thread_Enable_dispatch(); 10b1b2: e8 f1 24 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b1b7: 83 c4 10 add $0x10,%esp 10b1ba: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b1bc: 8b 5d fc mov -0x4(%ebp),%ebx 10b1bf: c9 leave 10b1c0: c3 ret 10b1c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b1c4: b8 04 00 00 00 mov $0x4,%eax } 10b1c9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1cc: c9 leave 10b1cd: c3 ret =============================================================================== 0010d15c : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d15c: 55 push %ebp 10d15d: 89 e5 mov %esp,%ebp 10d15f: 57 push %edi 10d160: 56 push %esi 10d161: 53 push %ebx 10d162: 83 ec 1c sub $0x1c,%esp 10d165: 8b 75 0c mov 0xc(%ebp),%esi 10d168: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d16b: 85 db test %ebx,%ebx 10d16d: 0f 84 85 00 00 00 je 10d1f8 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d173: 8b 45 08 mov 0x8(%ebp),%eax 10d176: 85 c0 test %eax,%eax 10d178: 75 0e jne 10d188 return RTEMS_INVALID_NAME; 10d17a: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d17f: 8d 65 f4 lea -0xc(%ebp),%esp 10d182: 5b pop %ebx 10d183: 5e pop %esi 10d184: 5f pop %edi 10d185: c9 leave 10d186: c3 ret 10d187: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d188: a1 54 23 13 00 mov 0x132354,%eax 10d18d: 40 inc %eax 10d18e: a3 54 23 13 00 mov %eax,0x132354 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d193: 83 ec 0c sub $0xc,%esp 10d196: 68 c0 25 13 00 push $0x1325c0 10d19b: e8 44 0e 00 00 call 10dfe4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d1a0: 83 c4 10 add $0x10,%esp 10d1a3: 85 c0 test %eax,%eax 10d1a5: 74 45 je 10d1ec RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d1a7: 8d 78 24 lea 0x24(%eax),%edi 10d1aa: b9 08 00 00 00 mov $0x8,%ecx 10d1af: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d1b1: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10d1b4: 8d 50 10 lea 0x10(%eax),%edx 10d1b7: 52 push %edx 10d1b8: 89 45 e4 mov %eax,-0x1c(%ebp) 10d1bb: e8 68 2b 00 00 call 10fd28 <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d1c0: 8b 45 e4 mov -0x1c(%ebp),%eax 10d1c3: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d1c6: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d1c9: 8b 0d dc 25 13 00 mov 0x1325dc,%ecx 10d1cf: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d1d2: 8b 4d 08 mov 0x8(%ebp),%ecx 10d1d5: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d1d8: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d1da: e8 35 1c 00 00 call 10ee14 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d1df: 83 c4 10 add $0x10,%esp 10d1e2: 31 c0 xor %eax,%eax } 10d1e4: 8d 65 f4 lea -0xc(%ebp),%esp 10d1e7: 5b pop %ebx 10d1e8: 5e pop %esi 10d1e9: 5f pop %edi 10d1ea: c9 leave 10d1eb: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d1ec: e8 23 1c 00 00 call 10ee14 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10d1f1: b8 05 00 00 00 mov $0x5,%eax 10d1f6: eb 87 jmp 10d17f ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10d1f8: b8 09 00 00 00 mov $0x9,%eax 10d1fd: eb 80 jmp 10d17f =============================================================================== 0010cfd8 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10cfd8: 55 push %ebp 10cfd9: 89 e5 mov %esp,%ebp 10cfdb: 53 push %ebx 10cfdc: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10cfdf: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10cfe2: 50 push %eax 10cfe3: ff 75 08 pushl 0x8(%ebp) 10cfe6: 68 c0 25 13 00 push $0x1325c0 10cfeb: e8 2c 12 00 00 call 10e21c <_Objects_Get> 10cff0: 89 c3 mov %eax,%ebx switch ( location ) { 10cff2: 83 c4 10 add $0x10,%esp 10cff5: 8b 55 f4 mov -0xc(%ebp),%edx 10cff8: 85 d2 test %edx,%edx 10cffa: 75 38 jne 10d034 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10cffc: 83 ec 0c sub $0xc,%esp 10cfff: 8d 40 10 lea 0x10(%eax),%eax 10d002: 50 push %eax 10d003: e8 f4 29 00 00 call 10f9fc <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d008: 59 pop %ecx 10d009: 58 pop %eax 10d00a: 53 push %ebx 10d00b: 68 c0 25 13 00 push $0x1325c0 10d010: e8 cb 0d 00 00 call 10dde0 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d015: 58 pop %eax 10d016: 5a pop %edx 10d017: 53 push %ebx 10d018: 68 c0 25 13 00 push $0x1325c0 10d01d: e8 ba 10 00 00 call 10e0dc <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d022: e8 85 1a 00 00 call 10eaac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d027: 83 c4 10 add $0x10,%esp 10d02a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d02c: 8b 5d fc mov -0x4(%ebp),%ebx 10d02f: c9 leave 10d030: c3 ret 10d031: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d034: b8 04 00 00 00 mov $0x4,%eax } 10d039: 8b 5d fc mov -0x4(%ebp),%ebx 10d03c: c9 leave 10d03d: c3 ret =============================================================================== 00112f7c : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112f7c: 55 push %ebp 112f7d: 89 e5 mov %esp,%ebp 112f7f: 53 push %ebx 112f80: 83 ec 04 sub $0x4,%esp 112f83: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112f86: 39 05 20 6f 12 00 cmp %eax,0x126f20 112f8c: 76 1a jbe 112fa8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112f8e: 8d 14 40 lea (%eax,%eax,2),%edx 112f91: c1 e2 03 shl $0x3,%edx 112f94: 03 15 24 6f 12 00 add 0x126f24,%edx 112f9a: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112f9d: 85 d2 test %edx,%edx 112f9f: 74 13 je 112fb4 } 112fa1: 59 pop %ecx 112fa2: 5b pop %ebx 112fa3: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112fa4: ff e2 jmp *%edx 112fa6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112fa8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112fad: 5a pop %edx 112fae: 5b pop %ebx 112faf: c9 leave 112fb0: c3 ret 112fb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112fb4: 31 c0 xor %eax,%eax } 112fb6: 5a pop %edx 112fb7: 5b pop %ebx 112fb8: c9 leave 112fb9: c3 ret =============================================================================== 00112fbc : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112fbc: 55 push %ebp 112fbd: 89 e5 mov %esp,%ebp 112fbf: 53 push %ebx 112fc0: 83 ec 04 sub $0x4,%esp 112fc3: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112fc6: 39 05 20 6f 12 00 cmp %eax,0x126f20 112fcc: 76 1a jbe 112fe8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112fce: 8d 14 40 lea (%eax,%eax,2),%edx 112fd1: c1 e2 03 shl $0x3,%edx 112fd4: 03 15 24 6f 12 00 add 0x126f24,%edx 112fda: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112fdd: 85 d2 test %edx,%edx 112fdf: 74 13 je 112ff4 } 112fe1: 59 pop %ecx 112fe2: 5b pop %ebx 112fe3: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112fe4: ff e2 jmp *%edx 112fe6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112fe8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112fed: 5a pop %edx 112fee: 5b pop %ebx 112fef: c9 leave 112ff0: c3 ret 112ff1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112ff4: 31 c0 xor %eax,%eax } 112ff6: 5a pop %edx 112ff7: 5b pop %ebx 112ff8: c9 leave 112ff9: c3 ret =============================================================================== 00110f40 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110f40: 55 push %ebp 110f41: 89 e5 mov %esp,%ebp 110f43: 53 push %ebx 110f44: 83 ec 04 sub $0x4,%esp 110f47: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110f4a: 39 05 20 6f 12 00 cmp %eax,0x126f20 110f50: 76 1a jbe 110f6c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 110f52: 8d 14 40 lea (%eax,%eax,2),%edx 110f55: c1 e2 03 shl $0x3,%edx 110f58: 03 15 24 6f 12 00 add 0x126f24,%edx 110f5e: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110f60: 85 d2 test %edx,%edx 110f62: 74 14 je 110f78 } 110f64: 59 pop %ecx 110f65: 5b pop %ebx 110f66: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110f67: ff e2 jmp *%edx 110f69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 110f6c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110f71: 5a pop %edx 110f72: 5b pop %ebx 110f73: c9 leave 110f74: c3 ret 110f75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110f78: 31 c0 xor %eax,%eax } 110f7a: 5a pop %edx 110f7b: 5b pop %ebx 110f7c: c9 leave 110f7d: c3 ret =============================================================================== 00112ffc : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112ffc: 55 push %ebp 112ffd: 89 e5 mov %esp,%ebp 112fff: 53 push %ebx 113000: 83 ec 04 sub $0x4,%esp 113003: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113006: 39 05 20 6f 12 00 cmp %eax,0x126f20 11300c: 76 1a jbe 113028 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 11300e: 8d 14 40 lea (%eax,%eax,2),%edx 113011: c1 e2 03 shl $0x3,%edx 113014: 03 15 24 6f 12 00 add 0x126f24,%edx 11301a: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11301d: 85 d2 test %edx,%edx 11301f: 74 13 je 113034 } 113021: 59 pop %ecx 113022: 5b pop %ebx 113023: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113024: ff e2 jmp *%edx 113026: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 113028: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11302d: 5a pop %edx 11302e: 5b pop %ebx 11302f: c9 leave 113030: c3 ret 113031: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113034: 31 c0 xor %eax,%eax } 113036: 5a pop %edx 113037: 5b pop %ebx 113038: c9 leave 113039: c3 ret =============================================================================== 0011303c : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11303c: 55 push %ebp 11303d: 89 e5 mov %esp,%ebp 11303f: 53 push %ebx 113040: 83 ec 04 sub $0x4,%esp 113043: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113046: 39 05 20 6f 12 00 cmp %eax,0x126f20 11304c: 76 1a jbe 113068 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 11304e: 8d 14 40 lea (%eax,%eax,2),%edx 113051: c1 e2 03 shl $0x3,%edx 113054: 03 15 24 6f 12 00 add 0x126f24,%edx 11305a: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11305d: 85 d2 test %edx,%edx 11305f: 74 13 je 113074 } 113061: 59 pop %ecx 113062: 5b pop %ebx 113063: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113064: ff e2 jmp *%edx 113066: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 113068: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11306d: 5a pop %edx 11306e: 5b pop %ebx 11306f: c9 leave 113070: c3 ret 113071: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113074: 31 c0 xor %eax,%eax } 113076: 5a pop %edx 113077: 5b pop %ebx 113078: c9 leave 113079: c3 ret =============================================================================== 0010ce8c : 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 ) { 10ce8c: 55 push %ebp 10ce8d: 89 e5 mov %esp,%ebp 10ce8f: 57 push %edi 10ce90: 56 push %esi 10ce91: 53 push %ebx 10ce92: 83 ec 0c sub $0xc,%esp 10ce95: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce98: 8b 75 0c mov 0xc(%ebp),%esi 10ce9b: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10ce9e: a1 a0 bb 12 00 mov 0x12bba0,%eax if ( rtems_interrupt_is_in_progress() ) 10cea3: 8b 0d 14 b7 12 00 mov 0x12b714,%ecx 10cea9: 85 c9 test %ecx,%ecx 10ceab: 0f 85 ab 00 00 00 jne 10cf5c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10ceb1: 85 d2 test %edx,%edx 10ceb3: 0f 84 e7 00 00 00 je 10cfa0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10ceb9: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10cebb: 85 f6 test %esi,%esi 10cebd: 0f 84 dd 00 00 00 je 10cfa0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cec3: 8b 3e mov (%esi),%edi 10cec5: 85 ff test %edi,%edi 10cec7: 0f 84 c7 00 00 00 je 10cf94 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cecd: 39 d8 cmp %ebx,%eax 10cecf: 76 7b jbe 10cf4c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ced1: a1 54 b1 12 00 mov 0x12b154,%eax 10ced6: 40 inc %eax 10ced7: a3 54 b1 12 00 mov %eax,0x12b154 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10cedc: 85 db test %ebx,%ebx 10cede: 0f 85 88 00 00 00 jne 10cf6c static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cee4: 8b 0d a0 bb 12 00 mov 0x12bba0,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10ceea: 85 c9 test %ecx,%ecx 10ceec: 0f 84 bb 00 00 00 je 10cfad <== NEVER TAKEN 10cef2: 8b 3d a4 bb 12 00 mov 0x12bba4,%edi 10cef8: 89 f8 mov %edi,%eax 10cefa: eb 08 jmp 10cf04 10cefc: 43 inc %ebx 10cefd: 83 c0 18 add $0x18,%eax 10cf00: 39 d9 cmp %ebx,%ecx 10cf02: 76 0b jbe 10cf0f static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf04: 83 38 00 cmpl $0x0,(%eax) 10cf07: 75 f3 jne 10cefc 10cf09: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cf0d: 75 ed jne 10cefc if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cf0f: 89 1a mov %ebx,(%edx) if ( m != n ) 10cf11: 39 d9 cmp %ebx,%ecx 10cf13: 0f 84 9b 00 00 00 je 10cfb4 10cf19: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf1c: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cf1f: 01 c7 add %eax,%edi 10cf21: b9 06 00 00 00 mov $0x6,%ecx 10cf26: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cf28: e8 87 1a 00 00 call 10e9b4 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cf2d: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cf34: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cf3b: 89 5d 08 mov %ebx,0x8(%ebp) } 10cf3e: 83 c4 0c add $0xc,%esp 10cf41: 5b pop %ebx 10cf42: 5e pop %esi 10cf43: 5f pop %edi 10cf44: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cf45: e9 7a 7d 00 00 jmp 114cc4 10cf4a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 10cf4c: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cf51: 83 c4 0c add $0xc,%esp 10cf54: 5b pop %ebx 10cf55: 5e pop %esi 10cf56: 5f pop %edi 10cf57: c9 leave 10cf58: c3 ret 10cf59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10cf5c: b8 12 00 00 00 mov $0x12,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cf61: 83 c4 0c add $0xc,%esp 10cf64: 5b pop %ebx 10cf65: 5e pop %esi 10cf66: 5f pop %edi 10cf67: c9 leave 10cf68: c3 ret 10cf69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10cf6c: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf6f: c1 e0 03 shl $0x3,%eax 10cf72: 8b 0d a4 bb 12 00 mov 0x12bba4,%ecx 10cf78: 01 c1 add %eax,%ecx static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf7a: 8b 39 mov (%ecx),%edi 10cf7c: 85 ff test %edi,%edi 10cf7e: 74 40 je 10cfc0 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 10cf80: e8 2f 1a 00 00 call 10e9b4 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10cf85: b8 0c 00 00 00 mov $0xc,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cf8a: 83 c4 0c add $0xc,%esp 10cf8d: 5b pop %ebx 10cf8e: 5e pop %esi 10cf8f: 5f pop %edi 10cf90: c9 leave 10cf91: c3 ret 10cf92: 66 90 xchg %ax,%ax <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf94: 8b 4e 04 mov 0x4(%esi),%ecx 10cf97: 85 c9 test %ecx,%ecx 10cf99: 0f 85 2e ff ff ff jne 10cecd 10cf9f: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10cfa0: b8 09 00 00 00 mov $0x9,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cfa5: 83 c4 0c add $0xc,%esp 10cfa8: 5b pop %ebx 10cfa9: 5e pop %esi 10cfaa: 5f pop %edi 10cfab: c9 leave 10cfac: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cfad: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10cfb3: 90 nop <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10cfb4: e8 fb 19 00 00 call 10e9b4 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10cfb9: b8 05 00 00 00 mov $0x5,%eax if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 10cfbe: eb 91 jmp 10cf51 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cfc0: 8b 49 04 mov 0x4(%ecx),%ecx 10cfc3: 85 c9 test %ecx,%ecx 10cfc5: 75 b9 jne 10cf80 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10cfc7: 89 1a mov %ebx,(%edx) 10cfc9: 8b 3d a4 bb 12 00 mov 0x12bba4,%edi 10cfcf: e9 4b ff ff ff jmp 10cf1f =============================================================================== 0010cfd4 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10cfd4: 55 push %ebp 10cfd5: 89 e5 mov %esp,%ebp 10cfd7: 57 push %edi 10cfd8: 83 ec 04 sub $0x4,%esp 10cfdb: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10cfde: 8b 0d 14 b7 12 00 mov 0x12b714,%ecx 10cfe4: 85 c9 test %ecx,%ecx 10cfe6: 75 44 jne 10d02c return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10cfe8: 39 05 a0 bb 12 00 cmp %eax,0x12bba0 10cfee: 77 0c ja 10cffc _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10cff0: b8 0d 00 00 00 mov $0xd,%eax } 10cff5: 5a pop %edx 10cff6: 5f pop %edi 10cff7: c9 leave 10cff8: c3 ret 10cff9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10cffc: 8b 15 54 b1 12 00 mov 0x12b154,%edx 10d002: 42 inc %edx 10d003: 89 15 54 b1 12 00 mov %edx,0x12b154 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d009: 8d 14 40 lea (%eax,%eax,2),%edx 10d00c: c1 e2 03 shl $0x3,%edx if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d00f: 03 15 a4 bb 12 00 add 0x12bba4,%edx 10d015: b9 18 00 00 00 mov $0x18,%ecx 10d01a: 31 c0 xor %eax,%eax 10d01c: 89 d7 mov %edx,%edi 10d01e: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d020: e8 8f 19 00 00 call 10e9b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d025: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d027: 5a pop %edx 10d028: 5f pop %edi 10d029: c9 leave 10d02a: c3 ret 10d02b: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10d02c: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d031: 5a pop %edx 10d032: 5f pop %edi 10d033: c9 leave 10d034: c3 ret =============================================================================== 0011307c : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11307c: 55 push %ebp 11307d: 89 e5 mov %esp,%ebp 11307f: 53 push %ebx 113080: 83 ec 04 sub $0x4,%esp 113083: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113086: 39 05 20 6f 12 00 cmp %eax,0x126f20 11308c: 76 1a jbe 1130a8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 11308e: 8d 14 40 lea (%eax,%eax,2),%edx 113091: c1 e2 03 shl $0x3,%edx 113094: 03 15 24 6f 12 00 add 0x126f24,%edx 11309a: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11309d: 85 d2 test %edx,%edx 11309f: 74 13 je 1130b4 } 1130a1: 59 pop %ecx 1130a2: 5b pop %ebx 1130a3: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1130a4: ff e2 jmp *%edx 1130a6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1130a8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1130ad: 5a pop %edx 1130ae: 5b pop %ebx 1130af: c9 leave 1130b0: c3 ret 1130b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1130b4: 31 c0 xor %eax,%eax } 1130b6: 5a pop %edx 1130b7: 5b pop %ebx 1130b8: c9 leave 1130b9: c3 ret =============================================================================== 0010df80 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10df80: 55 push %ebp 10df81: 89 e5 mov %esp,%ebp 10df83: 57 push %edi 10df84: 56 push %esi 10df85: 53 push %ebx 10df86: 83 ec 1c sub $0x1c,%esp 10df89: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10df8c: 85 ff test %edi,%edi 10df8e: 74 49 je 10dfd9 <== NEVER TAKEN 10df90: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10df97: 8b 55 e4 mov -0x1c(%ebp),%edx 10df9a: 8b 04 95 2c 23 13 00 mov 0x13232c(,%edx,4),%eax 10dfa1: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10dfa4: 85 f6 test %esi,%esi 10dfa6: 74 28 je 10dfd0 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10dfa8: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10dfad: 74 21 je 10dfd0 10dfaf: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10dfb4: 8b 46 1c mov 0x1c(%esi),%eax 10dfb7: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10dfba: 85 c0 test %eax,%eax 10dfbc: 74 09 je 10dfc7 <== NEVER TAKEN continue; (*routine)(the_thread); 10dfbe: 83 ec 0c sub $0xc,%esp 10dfc1: 50 push %eax 10dfc2: ff d7 call *%edi 10dfc4: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10dfc7: 43 inc %ebx 10dfc8: 0f b7 46 10 movzwl 0x10(%esi),%eax 10dfcc: 39 d8 cmp %ebx,%eax 10dfce: 73 e4 jae 10dfb4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10dfd0: ff 45 e4 incl -0x1c(%ebp) 10dfd3: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10dfd7: 75 be jne 10df97 (*routine)(the_thread); } } } 10dfd9: 8d 65 f4 lea -0xc(%ebp),%esp 10dfdc: 5b pop %ebx 10dfdd: 5e pop %esi 10dfde: 5f pop %edi 10dfdf: c9 leave 10dfe0: c3 ret =============================================================================== 00116398 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116398: 55 push %ebp 116399: 89 e5 mov %esp,%ebp 11639b: 57 push %edi 11639c: 56 push %esi 11639d: 53 push %ebx 11639e: 83 ec 1c sub $0x1c,%esp 1163a1: 8b 7d 08 mov 0x8(%ebp),%edi 1163a4: 8b 5d 0c mov 0xc(%ebp),%ebx 1163a7: 8b 75 14 mov 0x14(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 1163aa: 85 db test %ebx,%ebx 1163ac: 74 62 je 116410 return RTEMS_INVALID_ADDRESS; if ( !count ) 1163ae: 85 f6 test %esi,%esi 1163b0: 74 5e je 116410 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1163b2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1163b3: 8d 45 e4 lea -0x1c(%ebp),%eax 1163b6: 50 push %eax 1163b7: 57 push %edi 1163b8: 68 e0 2a 14 00 push $0x142ae0 1163bd: e8 be 4e 00 00 call 11b280 <_Objects_Get> switch ( location ) { 1163c2: 83 c4 10 add $0x10,%esp 1163c5: 8b 55 e4 mov -0x1c(%ebp),%edx 1163c8: 85 d2 test %edx,%edx 1163ca: 74 10 je 1163dc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1163cc: b8 04 00 00 00 mov $0x4,%eax } 1163d1: 8d 65 f4 lea -0xc(%ebp),%esp 1163d4: 5b pop %ebx 1163d5: 5e pop %esi 1163d6: 5f pop %edi 1163d7: c9 leave 1163d8: c3 ret 1163d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 1163dc: 83 ec 08 sub $0x8,%esp 1163df: 56 push %esi 1163e0: 6a 00 push $0x0 1163e2: 57 push %edi 1163e3: ff 75 10 pushl 0x10(%ebp) 1163e6: 53 push %ebx 1163e7: 83 c0 14 add $0x14,%eax 1163ea: 50 push %eax 1163eb: e8 94 34 00 00 call 119884 <_CORE_message_queue_Broadcast> 1163f0: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 1163f2: 83 c4 20 add $0x20,%esp 1163f5: e8 16 57 00 00 call 11bb10 <_Thread_Enable_dispatch> return 1163fa: 83 ec 0c sub $0xc,%esp 1163fd: 53 push %ebx 1163fe: e8 69 03 00 00 call 11676c <_Message_queue_Translate_core_message_queue_return_code> 116403: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116406: 8d 65 f4 lea -0xc(%ebp),%esp 116409: 5b pop %ebx 11640a: 5e pop %esi 11640b: 5f pop %edi 11640c: c9 leave 11640d: c3 ret 11640e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 116410: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116415: 8d 65 f4 lea -0xc(%ebp),%esp 116418: 5b pop %ebx 116419: 5e pop %esi 11641a: 5f pop %edi 11641b: c9 leave 11641c: c3 ret =============================================================================== 00113824 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113824: 55 push %ebp 113825: 89 e5 mov %esp,%ebp 113827: 57 push %edi 113828: 56 push %esi 113829: 53 push %ebx 11382a: 83 ec 2c sub $0x2c,%esp 11382d: 8b 5d 08 mov 0x8(%ebp),%ebx 113830: 8b 75 0c mov 0xc(%ebp),%esi 113833: 8b 4d 10 mov 0x10(%ebp),%ecx 113836: 8b 7d 18 mov 0x18(%ebp),%edi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113839: 85 db test %ebx,%ebx 11383b: 74 2f je 11386c return RTEMS_INVALID_NAME; if ( !id ) 11383d: 85 ff test %edi,%edi 11383f: 0f 84 a3 00 00 00 je 1138e8 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113845: 85 f6 test %esi,%esi 113847: 74 13 je 11385c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113849: 85 c9 test %ecx,%ecx 11384b: 75 2f jne 11387c return RTEMS_INVALID_SIZE; 11384d: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113852: 8d 65 f4 lea -0xc(%ebp),%esp 113855: 5b pop %ebx 113856: 5e pop %esi 113857: 5f pop %edi 113858: c9 leave 113859: c3 ret 11385a: 66 90 xchg %ax,%ax <== NOT EXECUTED !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 11385c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113861: 8d 65 f4 lea -0xc(%ebp),%esp 113864: 5b pop %ebx 113865: 5e pop %esi 113866: 5f pop %edi 113867: c9 leave 113868: c3 ret 113869: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11386c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113871: 8d 65 f4 lea -0xc(%ebp),%esp 113874: 5b pop %ebx 113875: 5e pop %esi 113876: 5f pop %edi 113877: c9 leave 113878: c3 ret 113879: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11387c: a1 34 0b 13 00 mov 0x130b34,%eax 113881: 40 inc %eax 113882: a3 34 0b 13 00 mov %eax,0x130b34 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113887: 89 4d d4 mov %ecx,-0x2c(%ebp) 11388a: e8 19 5f 00 00 call 1197a8 <_Message_queue_Allocate> 11388f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113891: 85 c0 test %eax,%eax 113893: 8b 4d d4 mov -0x2c(%ebp),%ecx 113896: 74 7c je 113914 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113898: 8b 45 14 mov 0x14(%ebp),%eax 11389b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11389e: a8 04 test $0x4,%al 1138a0: 0f 95 c0 setne %al 1138a3: 0f b6 c0 movzbl %al,%eax 1138a6: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1138a9: 51 push %ecx 1138aa: 56 push %esi 1138ab: 8d 45 e4 lea -0x1c(%ebp),%eax 1138ae: 50 push %eax 1138af: 8d 42 14 lea 0x14(%edx),%eax 1138b2: 50 push %eax 1138b3: 89 55 d4 mov %edx,-0x2c(%ebp) 1138b6: e8 21 11 00 00 call 1149dc <_CORE_message_queue_Initialize> 1138bb: 83 c4 10 add $0x10,%esp 1138be: 84 c0 test %al,%al 1138c0: 8b 55 d4 mov -0x2c(%ebp),%edx 1138c3: 75 2f jne 1138f4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1138c5: 83 ec 08 sub $0x8,%esp 1138c8: 52 push %edx 1138c9: 68 00 15 13 00 push $0x131500 1138ce: e8 b1 1f 00 00 call 115884 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 1138d3: e8 fc 29 00 00 call 1162d4 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 1138d8: 83 c4 10 add $0x10,%esp 1138db: b8 0d 00 00 00 mov $0xd,%eax 1138e0: e9 6d ff ff ff jmp 113852 1138e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 1138e8: b8 09 00 00 00 mov $0x9,%eax 1138ed: e9 60 ff ff ff jmp 113852 1138f2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1138f4: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1138f7: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1138fa: 8b 0d 1c 15 13 00 mov 0x13151c,%ecx 113900: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113903: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113906: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113908: e8 c7 29 00 00 call 1162d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11390d: 31 c0 xor %eax,%eax 11390f: e9 3e ff ff ff jmp 113852 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113914: e8 bb 29 00 00 call 1162d4 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113919: b8 05 00 00 00 mov $0x5,%eax 11391e: e9 2f ff ff ff jmp 113852 =============================================================================== 00116520 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 116520: 55 push %ebp 116521: 89 e5 mov %esp,%ebp 116523: 53 push %ebx 116524: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 116527: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11652a: 50 push %eax 11652b: ff 75 08 pushl 0x8(%ebp) 11652e: 68 e0 2a 14 00 push $0x142ae0 116533: e8 48 4d 00 00 call 11b280 <_Objects_Get> 116538: 89 c3 mov %eax,%ebx switch ( location ) { 11653a: 83 c4 10 add $0x10,%esp 11653d: 8b 4d f4 mov -0xc(%ebp),%ecx 116540: 85 c9 test %ecx,%ecx 116542: 75 3c jne 116580 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116544: 83 ec 08 sub $0x8,%esp 116547: 50 push %eax 116548: 68 e0 2a 14 00 push $0x142ae0 11654d: e8 b6 48 00 00 call 11ae08 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 116552: 83 c4 0c add $0xc,%esp 116555: 6a 05 push $0x5 116557: 6a 00 push $0x0 116559: 8d 43 14 lea 0x14(%ebx),%eax 11655c: 50 push %eax 11655d: e8 a6 33 00 00 call 119908 <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 116562: 58 pop %eax 116563: 5a pop %edx 116564: 53 push %ebx 116565: 68 e0 2a 14 00 push $0x142ae0 11656a: e8 95 4b 00 00 call 11b104 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11656f: e8 9c 55 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116574: 83 c4 10 add $0x10,%esp 116577: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116579: 8b 5d fc mov -0x4(%ebp),%ebx 11657c: c9 leave 11657d: c3 ret 11657e: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116580: b8 04 00 00 00 mov $0x4,%eax } 116585: 8b 5d fc mov -0x4(%ebp),%ebx 116588: c9 leave 116589: c3 ret =============================================================================== 0011658c : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 11658c: 55 push %ebp 11658d: 89 e5 mov %esp,%ebp 11658f: 53 push %ebx 116590: 83 ec 14 sub $0x14,%esp 116593: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116596: 85 db test %ebx,%ebx 116598: 74 46 je 1165e0 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11659a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11659b: 8d 45 f4 lea -0xc(%ebp),%eax 11659e: 50 push %eax 11659f: ff 75 08 pushl 0x8(%ebp) 1165a2: 68 e0 2a 14 00 push $0x142ae0 1165a7: e8 d4 4c 00 00 call 11b280 <_Objects_Get> switch ( location ) { 1165ac: 83 c4 10 add $0x10,%esp 1165af: 8b 55 f4 mov -0xc(%ebp),%edx 1165b2: 85 d2 test %edx,%edx 1165b4: 74 0a je 1165c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1165b6: b8 04 00 00 00 mov $0x4,%eax } 1165bb: 8b 5d fc mov -0x4(%ebp),%ebx 1165be: c9 leave 1165bf: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 1165c0: 83 ec 0c sub $0xc,%esp 1165c3: 83 c0 14 add $0x14,%eax 1165c6: 50 push %eax 1165c7: e8 78 33 00 00 call 119944 <_CORE_message_queue_Flush> 1165cc: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1165ce: e8 3d 55 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1165d3: 83 c4 10 add $0x10,%esp 1165d6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165d8: 8b 5d fc mov -0x4(%ebp),%ebx 1165db: c9 leave 1165dc: c3 ret 1165dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 1165e0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165e5: 8b 5d fc mov -0x4(%ebp),%ebx 1165e8: c9 leave 1165e9: c3 ret =============================================================================== 001165ec : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 1165ec: 55 push %ebp 1165ed: 89 e5 mov %esp,%ebp 1165ef: 53 push %ebx 1165f0: 83 ec 14 sub $0x14,%esp 1165f3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1165f6: 85 db test %ebx,%ebx 1165f8: 74 3a je 116634 1165fa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1165fb: 8d 45 f4 lea -0xc(%ebp),%eax 1165fe: 50 push %eax 1165ff: ff 75 08 pushl 0x8(%ebp) 116602: 68 e0 2a 14 00 push $0x142ae0 116607: e8 74 4c 00 00 call 11b280 <_Objects_Get> switch ( location ) { 11660c: 83 c4 10 add $0x10,%esp 11660f: 8b 55 f4 mov -0xc(%ebp),%edx 116612: 85 d2 test %edx,%edx 116614: 74 0a je 116620 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116616: b8 04 00 00 00 mov $0x4,%eax } 11661b: 8b 5d fc mov -0x4(%ebp),%ebx 11661e: c9 leave 11661f: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 116620: 8b 40 5c mov 0x5c(%eax),%eax 116623: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116625: e8 e6 54 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11662a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11662c: 8b 5d fc mov -0x4(%ebp),%ebx 11662f: c9 leave 116630: c3 ret 116631: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 116634: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116639: 8b 5d fc mov -0x4(%ebp),%ebx 11663c: c9 leave 11663d: c3 ret =============================================================================== 00113948 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113948: 55 push %ebp 113949: 89 e5 mov %esp,%ebp 11394b: 56 push %esi 11394c: 53 push %ebx 11394d: 83 ec 10 sub $0x10,%esp 113950: 8b 5d 0c mov 0xc(%ebp),%ebx 113953: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113956: 85 db test %ebx,%ebx 113958: 74 6e je 1139c8 return RTEMS_INVALID_ADDRESS; if ( !size ) 11395a: 85 f6 test %esi,%esi 11395c: 74 6a je 1139c8 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11395e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11395f: 8d 45 f4 lea -0xc(%ebp),%eax 113962: 50 push %eax 113963: ff 75 08 pushl 0x8(%ebp) 113966: 68 00 15 13 00 push $0x131500 11396b: e8 54 20 00 00 call 1159c4 <_Objects_Get> switch ( location ) { 113970: 83 c4 10 add $0x10,%esp 113973: 8b 55 f4 mov -0xc(%ebp),%edx 113976: 85 d2 test %edx,%edx 113978: 75 42 jne 1139bc if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 11397a: 83 ec 08 sub $0x8,%esp 11397d: ff 75 18 pushl 0x18(%ebp) */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 113980: 8b 55 14 mov 0x14(%ebp),%edx 113983: 83 e2 01 and $0x1,%edx 113986: 83 f2 01 xor $0x1,%edx 113989: 52 push %edx 11398a: 56 push %esi 11398b: 53 push %ebx 11398c: ff 70 08 pushl 0x8(%eax) 11398f: 83 c0 14 add $0x14,%eax 113992: 50 push %eax 113993: e8 f4 10 00 00 call 114a8c <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113998: 83 c4 20 add $0x20,%esp 11399b: e8 34 29 00 00 call 1162d4 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 1139a0: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 1139a3: a1 f8 10 13 00 mov 0x1310f8,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 1139a8: ff 70 34 pushl 0x34(%eax) 1139ab: e8 a0 00 00 00 call 113a50 <_Message_queue_Translate_core_message_queue_return_code> 1139b0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139b3: 8d 65 f8 lea -0x8(%ebp),%esp 1139b6: 5b pop %ebx 1139b7: 5e pop %esi 1139b8: c9 leave 1139b9: c3 ret 1139ba: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1139bc: b8 04 00 00 00 mov $0x4,%eax } 1139c1: 8d 65 f8 lea -0x8(%ebp),%esp 1139c4: 5b pop %ebx 1139c5: 5e pop %esi 1139c6: c9 leave 1139c7: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 1139c8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139cd: 8d 65 f8 lea -0x8(%ebp),%esp 1139d0: 5b pop %ebx 1139d1: 5e pop %esi 1139d2: c9 leave 1139d3: c3 ret =============================================================================== 0010b388 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b388: 55 push %ebp 10b389: 89 e5 mov %esp,%ebp 10b38b: 56 push %esi 10b38c: 53 push %ebx 10b38d: 83 ec 10 sub $0x10,%esp 10b390: 8b 75 08 mov 0x8(%ebp),%esi 10b393: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b396: 85 db test %ebx,%ebx 10b398: 74 5e je 10b3f8 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b39a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b39b: 8d 45 f4 lea -0xc(%ebp),%eax 10b39e: 50 push %eax 10b39f: 56 push %esi 10b3a0: 68 a0 6e 12 00 push $0x126ea0 10b3a5: e8 6e 1a 00 00 call 10ce18 <_Objects_Get> switch ( location ) { 10b3aa: 83 c4 10 add $0x10,%esp 10b3ad: 8b 55 f4 mov -0xc(%ebp),%edx 10b3b0: 85 d2 test %edx,%edx 10b3b2: 74 0c je 10b3c0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b3b4: b8 04 00 00 00 mov $0x4,%eax } 10b3b9: 8d 65 f8 lea -0x8(%ebp),%esp 10b3bc: 5b pop %ebx 10b3bd: 5e pop %esi 10b3be: c9 leave 10b3bf: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b3c0: 6a 00 push $0x0 10b3c2: 6a 00 push $0x0 10b3c4: 68 ff ff ff 7f push $0x7fffffff 10b3c9: 6a 00 push $0x0 10b3cb: 56 push %esi 10b3cc: ff 75 10 pushl 0x10(%ebp) 10b3cf: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b3d0: 83 c0 14 add $0x14,%eax 10b3d3: 50 push %eax 10b3d4: e8 33 0c 00 00 call 10c00c <_CORE_message_queue_Submit> 10b3d9: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b3db: 83 c4 20 add $0x20,%esp 10b3de: e8 c5 22 00 00 call 10d6a8 <_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); 10b3e3: 83 ec 0c sub $0xc,%esp 10b3e6: 53 push %ebx 10b3e7: e8 18 00 00 00 call 10b404 <_Message_queue_Translate_core_message_queue_return_code> 10b3ec: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b3ef: 8d 65 f8 lea -0x8(%ebp),%esp 10b3f2: 5b pop %ebx 10b3f3: 5e pop %esi 10b3f4: c9 leave 10b3f5: c3 ret 10b3f6: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 10b3f8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b3fd: 8d 65 f8 lea -0x8(%ebp),%esp 10b400: 5b pop %ebx 10b401: 5e pop %esi 10b402: c9 leave 10b403: c3 ret =============================================================================== 0011677c : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 11677c: 55 push %ebp 11677d: 89 e5 mov %esp,%ebp 11677f: 56 push %esi 116780: 53 push %ebx 116781: 83 ec 10 sub $0x10,%esp 116784: 8b 75 08 mov 0x8(%ebp),%esi 116787: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11678a: 85 db test %ebx,%ebx 11678c: 74 5e je 1167ec 11678e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11678f: 8d 45 f4 lea -0xc(%ebp),%eax 116792: 50 push %eax 116793: 56 push %esi 116794: 68 e0 2a 14 00 push $0x142ae0 116799: e8 e2 4a 00 00 call 11b280 <_Objects_Get> switch ( location ) { 11679e: 83 c4 10 add $0x10,%esp 1167a1: 8b 55 f4 mov -0xc(%ebp),%edx 1167a4: 85 d2 test %edx,%edx 1167a6: 74 0c je 1167b4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1167a8: b8 04 00 00 00 mov $0x4,%eax } 1167ad: 8d 65 f8 lea -0x8(%ebp),%esp 1167b0: 5b pop %ebx 1167b1: 5e pop %esi 1167b2: c9 leave 1167b3: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1167b4: 6a 00 push $0x0 1167b6: 6a 00 push $0x0 1167b8: 68 00 00 00 80 push $0x80000000 1167bd: 6a 00 push $0x0 1167bf: 56 push %esi 1167c0: ff 75 10 pushl 0x10(%ebp) 1167c3: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 1167c4: 83 c0 14 add $0x14,%eax 1167c7: 50 push %eax 1167c8: e8 b7 33 00 00 call 119b84 <_CORE_message_queue_Submit> 1167cd: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1167cf: 83 c4 20 add $0x20,%esp 1167d2: e8 39 53 00 00 call 11bb10 <_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); 1167d7: 83 ec 0c sub $0xc,%esp 1167da: 53 push %ebx 1167db: e8 8c ff ff ff call 11676c <_Message_queue_Translate_core_message_queue_return_code> 1167e0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167e3: 8d 65 f8 lea -0x8(%ebp),%esp 1167e6: 5b pop %ebx 1167e7: 5e pop %esi 1167e8: c9 leave 1167e9: c3 ret 1167ea: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1167ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167f1: 8d 65 f8 lea -0x8(%ebp),%esp 1167f4: 5b pop %ebx 1167f5: 5e pop %esi 1167f6: c9 leave 1167f7: c3 ret =============================================================================== 0010b900 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10b900: 55 push %ebp 10b901: 89 e5 mov %esp,%ebp 10b903: 83 ec 08 sub $0x8,%esp 10b906: 8b 45 08 mov 0x8(%ebp),%eax const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10b909: 83 f8 01 cmp $0x1,%eax 10b90c: 74 36 je 10b944 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b90e: 83 f8 02 cmp $0x2,%eax 10b911: 74 29 je 10b93c api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b913: 83 f8 03 cmp $0x3,%eax 10b916: 74 08 je 10b920 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10b918: b8 7b 23 12 00 mov $0x12237b,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10b91d: c9 leave 10b91e: c3 ret 10b91f: 90 nop <== NOT EXECUTED api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; 10b920: b8 e0 72 12 00 mov $0x1272e0,%eax #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10b925: 83 ec 08 sub $0x8,%esp 10b928: ff 75 0c pushl 0xc(%ebp) 10b92b: 50 push %eax 10b92c: e8 2f 49 00 00 call 110260 if ( class_assoc ) 10b931: 83 c4 10 add $0x10,%esp 10b934: 85 c0 test %eax,%eax 10b936: 74 14 je 10b94c return class_assoc->name; 10b938: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b93a: c9 leave 10b93b: c3 ret const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; 10b93c: b8 60 72 12 00 mov $0x127260,%eax 10b941: eb e2 jmp 10b925 10b943: 90 nop <== NOT EXECUTED { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; 10b944: b8 40 72 12 00 mov $0x127240,%eax 10b949: eb da jmp 10b925 10b94b: 90 nop <== NOT EXECUTED else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; 10b94c: b8 83 23 12 00 mov $0x122383,%eax } 10b951: c9 leave 10b952: c3 ret =============================================================================== 0010b954 : }; const char *rtems_object_get_api_name( int api ) { 10b954: 55 push %ebp 10b955: 89 e5 mov %esp,%ebp 10b957: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10b95a: ff 75 08 pushl 0x8(%ebp) 10b95d: 68 80 73 12 00 push $0x127380 10b962: e8 f9 48 00 00 call 110260 if ( api_assoc ) 10b967: 83 c4 10 add $0x10,%esp 10b96a: 85 c0 test %eax,%eax 10b96c: 74 06 je 10b974 return api_assoc->name; 10b96e: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b970: c9 leave 10b971: c3 ret 10b972: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) return api_assoc->name; return "BAD CLASS"; 10b974: b8 83 23 12 00 mov $0x122383,%eax } 10b979: c9 leave 10b97a: c3 ret =============================================================================== 0010cf3c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cf3c: 55 push %ebp 10cf3d: 89 e5 mov %esp,%ebp 10cf3f: 57 push %edi 10cf40: 56 push %esi 10cf41: 53 push %ebx 10cf42: 83 ec 0c sub $0xc,%esp 10cf45: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cf48: 85 db test %ebx,%ebx 10cf4a: 74 60 je 10cfac return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cf4c: 83 ec 08 sub $0x8,%esp 10cf4f: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10cf53: 50 push %eax 10cf54: ff 75 08 pushl 0x8(%ebp) 10cf57: e8 4c 1b 00 00 call 10eaa8 <_Objects_Get_information> if ( !obj_info ) 10cf5c: 83 c4 10 add $0x10,%esp 10cf5f: 85 c0 test %eax,%eax 10cf61: 74 59 je 10cfbc return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cf63: 8b 50 08 mov 0x8(%eax),%edx 10cf66: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cf68: 8b 50 0c mov 0xc(%eax),%edx 10cf6b: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cf6e: 8a 50 12 mov 0x12(%eax),%dl 10cf71: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cf74: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf78: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf7b: 85 f6 test %esi,%esi 10cf7d: 74 44 je 10cfc3 <== NEVER TAKEN 10cf7f: 8b 78 1c mov 0x1c(%eax),%edi 10cf82: b9 01 00 00 00 mov $0x1,%ecx 10cf87: b8 01 00 00 00 mov $0x1,%eax 10cf8c: 31 d2 xor %edx,%edx 10cf8e: 66 90 xchg %ax,%ax if ( !obj_info->local_table[i] ) unallocated++; 10cf90: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cf94: 83 d2 00 adc $0x0,%edx info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf97: 40 inc %eax 10cf98: 89 c1 mov %eax,%ecx 10cf9a: 39 c6 cmp %eax,%esi 10cf9c: 73 f2 jae 10cf90 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cf9e: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10cfa1: 31 c0 xor %eax,%eax } 10cfa3: 8d 65 f4 lea -0xc(%ebp),%esp 10cfa6: 5b pop %ebx 10cfa7: 5e pop %esi 10cfa8: 5f pop %edi 10cfa9: c9 leave 10cfaa: c3 ret 10cfab: 90 nop <== NOT EXECUTED /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10cfac: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cfb1: 8d 65 f4 lea -0xc(%ebp),%esp 10cfb4: 5b pop %ebx 10cfb5: 5e pop %esi 10cfb6: 5f pop %edi 10cfb7: c9 leave 10cfb8: c3 ret 10cfb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; 10cfbc: b8 0a 00 00 00 mov $0xa,%eax 10cfc1: eb e0 jmp 10cfa3 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cfc3: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfc5: eb d7 jmp 10cf9e <== NOT EXECUTED =============================================================================== 0010c4fc : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 53 push %ebx 10c500: 83 ec 14 sub $0x14,%esp 10c503: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c506: 85 db test %ebx,%ebx 10c508: 74 26 je 10c530 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c50a: 83 ec 08 sub $0x8,%esp 10c50d: 8d 45 f4 lea -0xc(%ebp),%eax 10c510: 50 push %eax 10c511: ff 75 08 pushl 0x8(%ebp) 10c514: e8 a7 1b 00 00 call 10e0c0 <_Objects_Id_to_name> *name = name_u.name_u32; 10c519: 8b 55 f4 mov -0xc(%ebp),%edx 10c51c: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c51e: 8b 04 85 6c 2f 12 00 mov 0x122f6c(,%eax,4),%eax 10c525: 83 c4 10 add $0x10,%esp } 10c528: 8b 5d fc mov -0x4(%ebp),%ebx 10c52b: c9 leave 10c52c: c3 ret 10c52d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10c530: b8 09 00 00 00 mov $0x9,%eax status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 10c535: 8b 5d fc mov -0x4(%ebp),%ebx 10c538: c9 leave 10c539: c3 ret =============================================================================== 0010b988 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10b988: 55 push %ebp 10b989: 89 e5 mov %esp,%ebp 10b98b: 57 push %edi 10b98c: 56 push %esi 10b98d: 53 push %ebx 10b98e: 83 ec 1c sub $0x1c,%esp 10b991: 8b 75 08 mov 0x8(%ebp),%esi 10b994: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b997: 85 ff test %edi,%edi 10b999: 74 61 je 10b9fc return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b99b: 85 f6 test %esi,%esi 10b99d: 74 35 je 10b9d4 information = _Objects_Get_information_id( tmpId ); 10b99f: 83 ec 0c sub $0xc,%esp 10b9a2: 56 push %esi 10b9a3: e8 24 19 00 00 call 10d2cc <_Objects_Get_information_id> 10b9a8: 89 c3 mov %eax,%ebx if ( !information ) 10b9aa: 83 c4 10 add $0x10,%esp 10b9ad: 85 c0 test %eax,%eax 10b9af: 74 16 je 10b9c7 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10b9b1: 50 push %eax 10b9b2: 8d 45 e4 lea -0x1c(%ebp),%eax 10b9b5: 50 push %eax 10b9b6: 56 push %esi 10b9b7: 53 push %ebx 10b9b8: e8 c7 1a 00 00 call 10d484 <_Objects_Get> switch ( location ) { 10b9bd: 83 c4 10 add $0x10,%esp 10b9c0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b9c3: 85 c9 test %ecx,%ecx 10b9c5: 74 19 je 10b9e0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b9c7: b8 04 00 00 00 mov $0x4,%eax } 10b9cc: 8d 65 f4 lea -0xc(%ebp),%esp 10b9cf: 5b pop %ebx 10b9d0: 5e pop %esi 10b9d1: 5f pop %edi 10b9d2: c9 leave 10b9d3: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b9d4: a1 f8 9c 12 00 mov 0x129cf8,%eax 10b9d9: 8b 70 08 mov 0x8(%eax),%esi 10b9dc: eb c1 jmp 10b99f 10b9de: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10b9e0: 52 push %edx 10b9e1: 57 push %edi 10b9e2: 50 push %eax 10b9e3: 53 push %ebx 10b9e4: e8 97 1c 00 00 call 10d680 <_Objects_Set_name> _Thread_Enable_dispatch(); 10b9e9: e8 0a 24 00 00 call 10ddf8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b9ee: 83 c4 10 add $0x10,%esp 10b9f1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9f3: 8d 65 f4 lea -0xc(%ebp),%esp 10b9f6: 5b pop %ebx 10b9f7: 5e pop %esi 10b9f8: 5f pop %edi 10b9f9: c9 leave 10b9fa: c3 ret 10b9fb: 90 nop <== NOT EXECUTED Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10b9fc: b8 09 00 00 00 mov $0x9,%eax 10ba01: eb c9 jmp 10b9cc =============================================================================== 001167f8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1167f8: 55 push %ebp 1167f9: 89 e5 mov %esp,%ebp 1167fb: 57 push %edi 1167fc: 56 push %esi 1167fd: 53 push %ebx 1167fe: 83 ec 1c sub $0x1c,%esp 116801: 8b 5d 08 mov 0x8(%ebp),%ebx 116804: 8b 75 0c mov 0xc(%ebp),%esi 116807: 8b 55 10 mov 0x10(%ebp),%edx 11680a: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 11680d: 85 db test %ebx,%ebx 11680f: 74 47 je 116858 return RTEMS_INVALID_NAME; if ( !starting_address ) 116811: 85 f6 test %esi,%esi 116813: 74 23 je 116838 return RTEMS_INVALID_ADDRESS; if ( !id ) 116815: 8b 45 1c mov 0x1c(%ebp),%eax 116818: 85 c0 test %eax,%eax 11681a: 74 1c je 116838 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 11681c: 85 d2 test %edx,%edx 11681e: 74 28 je 116848 116820: 85 ff test %edi,%edi 116822: 74 24 je 116848 116824: 39 fa cmp %edi,%edx 116826: 72 20 jb 116848 116828: f7 c7 03 00 00 00 test $0x3,%edi 11682e: 75 18 jne 116848 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 116830: f7 c6 03 00 00 00 test $0x3,%esi 116836: 74 30 je 116868 return RTEMS_INVALID_ADDRESS; 116838: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11683d: 8d 65 f4 lea -0xc(%ebp),%esp 116840: 5b pop %ebx 116841: 5e pop %esi 116842: 5f pop %edi 116843: c9 leave 116844: c3 ret 116845: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 116848: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11684d: 8d 65 f4 lea -0xc(%ebp),%esp 116850: 5b pop %ebx 116851: 5e pop %esi 116852: 5f pop %edi 116853: c9 leave 116854: c3 ret 116855: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 116858: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11685d: 8d 65 f4 lea -0xc(%ebp),%esp 116860: 5b pop %ebx 116861: 5e pop %esi 116862: 5f pop %edi 116863: c9 leave 116864: c3 ret 116865: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116868: a1 14 21 14 00 mov 0x142114,%eax 11686d: 40 inc %eax 11686e: a3 14 21 14 00 mov %eax,0x142114 * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 116873: 83 ec 0c sub $0xc,%esp 116876: 68 a0 1f 14 00 push $0x141fa0 11687b: 89 55 e0 mov %edx,-0x20(%ebp) 11687e: e8 09 45 00 00 call 11ad8c <_Objects_Allocate> 116883: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 116886: 83 c4 10 add $0x10,%esp 116889: 85 c0 test %eax,%eax 11688b: 8b 55 e0 mov -0x20(%ebp),%edx 11688e: 74 58 je 1168e8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116890: 8b 45 e4 mov -0x1c(%ebp),%eax 116893: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 116896: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116899: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 11689c: 8b 4d 18 mov 0x18(%ebp),%ecx 11689f: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 1168a2: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 1168a9: 57 push %edi 1168aa: 89 d0 mov %edx,%eax 1168ac: 31 d2 xor %edx,%edx 1168ae: f7 f7 div %edi 1168b0: 50 push %eax 1168b1: 56 push %esi 1168b2: 8b 45 e4 mov -0x1c(%ebp),%eax 1168b5: 83 c0 24 add $0x24,%eax 1168b8: 50 push %eax 1168b9: e8 76 2f 00 00 call 119834 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1168be: 8b 7d e4 mov -0x1c(%ebp),%edi 1168c1: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1168c4: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1168c7: 8b 15 bc 1f 14 00 mov 0x141fbc,%edx 1168cd: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1168d0: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1168d3: 8b 55 1c mov 0x1c(%ebp),%edx 1168d6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1168d8: e8 33 52 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1168dd: 83 c4 10 add $0x10,%esp 1168e0: 31 c0 xor %eax,%eax 1168e2: e9 66 ff ff ff jmp 11684d 1168e7: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1168e8: e8 23 52 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1168ed: b8 05 00 00 00 mov $0x5,%eax 1168f2: e9 56 ff ff ff jmp 11684d =============================================================================== 001168f8 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 1168f8: 55 push %ebp 1168f9: 89 e5 mov %esp,%ebp 1168fb: 83 ec 2c sub $0x2c,%esp register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 1168fe: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116901: 50 push %eax 116902: ff 75 08 pushl 0x8(%ebp) 116905: 68 a0 1f 14 00 push $0x141fa0 11690a: e8 71 49 00 00 call 11b280 <_Objects_Get> switch ( location ) { 11690f: 83 c4 10 add $0x10,%esp 116912: 8b 55 f4 mov -0xc(%ebp),%edx 116915: 85 d2 test %edx,%edx 116917: 74 07 je 116920 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116919: b8 04 00 00 00 mov $0x4,%eax } 11691e: c9 leave 11691f: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116920: 8b 48 20 mov 0x20(%eax),%ecx 116923: 85 c9 test %ecx,%ecx 116925: 74 0d je 116934 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116927: e8 e4 51 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 11692c: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116931: c9 leave 116932: c3 ret 116933: 90 nop <== NOT EXECUTED the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); 116934: 83 ec 08 sub $0x8,%esp 116937: 50 push %eax 116938: 68 a0 1f 14 00 push $0x141fa0 11693d: 89 45 e4 mov %eax,-0x1c(%ebp) 116940: e8 c3 44 00 00 call 11ae08 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 116945: 58 pop %eax 116946: 5a pop %edx 116947: 8b 45 e4 mov -0x1c(%ebp),%eax 11694a: 50 push %eax 11694b: 68 a0 1f 14 00 push $0x141fa0 116950: e8 af 47 00 00 call 11b104 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 116955: e8 b6 51 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11695a: 83 c4 10 add $0x10,%esp 11695d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11695f: c9 leave 116960: c3 ret =============================================================================== 00116964 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116964: 55 push %ebp 116965: 89 e5 mov %esp,%ebp 116967: 56 push %esi 116968: 53 push %ebx 116969: 83 ec 20 sub $0x20,%esp 11696c: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11696f: 85 db test %ebx,%ebx 116971: 74 59 je 1169cc Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116973: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 116974: 8d 45 f4 lea -0xc(%ebp),%eax 116977: 50 push %eax 116978: ff 75 08 pushl 0x8(%ebp) 11697b: 68 a0 1f 14 00 push $0x141fa0 116980: e8 fb 48 00 00 call 11b280 <_Objects_Get> 116985: 89 c6 mov %eax,%esi switch ( location ) { 116987: 83 c4 10 add $0x10,%esp 11698a: 8b 45 f4 mov -0xc(%ebp),%eax 11698d: 85 c0 test %eax,%eax 11698f: 75 2f jne 1169c0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116991: 83 ec 0c sub $0xc,%esp 116994: 8d 46 24 lea 0x24(%esi),%eax 116997: 50 push %eax 116998: e8 73 2e 00 00 call 119810 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 11699d: 83 c4 10 add $0x10,%esp 1169a0: 85 c0 test %eax,%eax 1169a2: 74 34 je 1169d8 the_partition->number_of_used_blocks += 1; 1169a4: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 1169a7: 89 45 e4 mov %eax,-0x1c(%ebp) 1169aa: e8 61 51 00 00 call 11bb10 <_Thread_Enable_dispatch> *buffer = the_buffer; 1169af: 8b 45 e4 mov -0x1c(%ebp),%eax 1169b2: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1169b4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169b6: 8d 65 f8 lea -0x8(%ebp),%esp 1169b9: 5b pop %ebx 1169ba: 5e pop %esi 1169bb: c9 leave 1169bc: c3 ret 1169bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1169c0: b8 04 00 00 00 mov $0x4,%eax } 1169c5: 8d 65 f8 lea -0x8(%ebp),%esp 1169c8: 5b pop %ebx 1169c9: 5e pop %esi 1169ca: c9 leave 1169cb: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1169cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169d1: 8d 65 f8 lea -0x8(%ebp),%esp 1169d4: 5b pop %ebx 1169d5: 5e pop %esi 1169d6: c9 leave 1169d7: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1169d8: e8 33 51 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 1169dd: b8 0d 00 00 00 mov $0xd,%eax 1169e2: eb e1 jmp 1169c5 =============================================================================== 00116a08 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116a08: 55 push %ebp 116a09: 89 e5 mov %esp,%ebp 116a0b: 56 push %esi 116a0c: 53 push %ebx 116a0d: 83 ec 14 sub $0x14,%esp 116a10: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a13: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a16: 50 push %eax 116a17: ff 75 08 pushl 0x8(%ebp) 116a1a: 68 a0 1f 14 00 push $0x141fa0 116a1f: e8 5c 48 00 00 call 11b280 <_Objects_Get> 116a24: 89 c3 mov %eax,%ebx switch ( location ) { 116a26: 83 c4 10 add $0x10,%esp 116a29: 8b 45 f4 mov -0xc(%ebp),%eax 116a2c: 85 c0 test %eax,%eax 116a2e: 74 0c je 116a3c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a30: b8 04 00 00 00 mov $0x4,%eax } 116a35: 8d 65 f8 lea -0x8(%ebp),%esp 116a38: 5b pop %ebx 116a39: 5e pop %esi 116a3a: c9 leave 116a3b: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116a3c: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116a3f: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a42: 39 c6 cmp %eax,%esi 116a44: 72 3a jb 116a80 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116a46: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a49: 39 d6 cmp %edx,%esi 116a4b: 77 33 ja 116a80 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116a4d: 89 f2 mov %esi,%edx 116a4f: 29 c2 sub %eax,%edx 116a51: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116a53: 31 d2 xor %edx,%edx 116a55: f7 73 18 divl 0x18(%ebx) starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && 116a58: 85 d2 test %edx,%edx 116a5a: 75 24 jne 116a80 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116a5c: 83 ec 08 sub $0x8,%esp 116a5f: 56 push %esi 116a60: 8d 43 24 lea 0x24(%ebx),%eax 116a63: 50 push %eax 116a64: e8 6b 2d 00 00 call 1197d4 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 116a69: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116a6c: e8 9f 50 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a71: 83 c4 10 add $0x10,%esp 116a74: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a76: 8d 65 f8 lea -0x8(%ebp),%esp 116a79: 5b pop %ebx 116a7a: 5e pop %esi 116a7b: c9 leave 116a7c: c3 ret 116a7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116a80: e8 8b 50 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116a85: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a8a: 8d 65 f8 lea -0x8(%ebp),%esp 116a8d: 5b pop %ebx 116a8e: 5e pop %esi 116a8f: c9 leave 116a90: c3 ret =============================================================================== 00115e2c : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115e2c: 55 push %ebp 115e2d: 89 e5 mov %esp,%ebp 115e2f: 57 push %edi 115e30: 56 push %esi 115e31: 53 push %ebx 115e32: 83 ec 1c sub $0x1c,%esp 115e35: 8b 5d 08 mov 0x8(%ebp),%ebx 115e38: 8b 55 0c mov 0xc(%ebp),%edx 115e3b: 8b 7d 10 mov 0x10(%ebp),%edi 115e3e: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115e41: 85 db test %ebx,%ebx 115e43: 74 1b je 115e60 return RTEMS_INVALID_NAME; if ( !id ) 115e45: 85 f6 test %esi,%esi 115e47: 74 08 je 115e51 * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115e49: 89 f8 mov %edi,%eax 115e4b: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115e4d: a8 03 test $0x3,%al 115e4f: 74 1f je 115e70 !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115e51: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e56: 8d 65 f4 lea -0xc(%ebp),%esp 115e59: 5b pop %ebx 115e5a: 5e pop %esi 115e5b: 5f pop %edi 115e5c: c9 leave 115e5d: c3 ret 115e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115e60: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e65: 8d 65 f4 lea -0xc(%ebp),%esp 115e68: 5b pop %ebx 115e69: 5e pop %esi 115e6a: 5f pop %edi 115e6b: c9 leave 115e6c: c3 ret 115e6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115e70: a1 14 21 14 00 mov 0x142114,%eax 115e75: 40 inc %eax 115e76: a3 14 21 14 00 mov %eax,0x142114 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 115e7b: 83 ec 0c sub $0xc,%esp 115e7e: 68 60 1f 14 00 push $0x141f60 115e83: 89 55 e4 mov %edx,-0x1c(%ebp) 115e86: e8 01 4f 00 00 call 11ad8c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115e8b: 83 c4 10 add $0x10,%esp 115e8e: 85 c0 test %eax,%eax 115e90: 8b 55 e4 mov -0x1c(%ebp),%edx 115e93: 74 33 je 115ec8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115e95: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115e98: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115e9b: 8b 55 14 mov 0x14(%ebp),%edx 115e9e: 4a dec %edx 115e9f: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115ea2: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115ea5: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115ea8: 8b 0d 7c 1f 14 00 mov 0x141f7c,%ecx 115eae: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115eb1: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115eb4: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115eb6: e8 55 5c 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115ebb: 31 c0 xor %eax,%eax } 115ebd: 8d 65 f4 lea -0xc(%ebp),%esp 115ec0: 5b pop %ebx 115ec1: 5e pop %esi 115ec2: 5f pop %edi 115ec3: c9 leave 115ec4: c3 ret 115ec5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115ec8: e8 43 5c 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115ecd: b8 05 00 00 00 mov $0x5,%eax 115ed2: eb 82 jmp 115e56 =============================================================================== 00115ed4 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115ed4: 55 push %ebp 115ed5: 89 e5 mov %esp,%ebp 115ed7: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 115eda: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115edd: 50 push %eax 115ede: ff 75 08 pushl 0x8(%ebp) 115ee1: 68 60 1f 14 00 push $0x141f60 115ee6: e8 95 53 00 00 call 11b280 <_Objects_Get> switch ( location ) { 115eeb: 83 c4 10 add $0x10,%esp 115eee: 8b 4d f4 mov -0xc(%ebp),%ecx 115ef1: 85 c9 test %ecx,%ecx 115ef3: 75 2f jne 115f24 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115ef5: 83 ec 08 sub $0x8,%esp 115ef8: 50 push %eax 115ef9: 68 60 1f 14 00 push $0x141f60 115efe: 89 45 e4 mov %eax,-0x1c(%ebp) 115f01: e8 02 4f 00 00 call 11ae08 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 115f06: 58 pop %eax 115f07: 5a pop %edx 115f08: 8b 45 e4 mov -0x1c(%ebp),%eax 115f0b: 50 push %eax 115f0c: 68 60 1f 14 00 push $0x141f60 115f11: e8 ee 51 00 00 call 11b104 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115f16: e8 f5 5b 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f1b: 83 c4 10 add $0x10,%esp 115f1e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f20: c9 leave 115f21: c3 ret 115f22: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f24: b8 04 00 00 00 mov $0x4,%eax } 115f29: c9 leave 115f2a: c3 ret =============================================================================== 00115f2c : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115f2c: 55 push %ebp 115f2d: 89 e5 mov %esp,%ebp 115f2f: 56 push %esi 115f30: 53 push %ebx 115f31: 83 ec 10 sub $0x10,%esp 115f34: 8b 75 0c mov 0xc(%ebp),%esi 115f37: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115f3a: 85 db test %ebx,%ebx 115f3c: 74 4e je 115f8c Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115f3e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115f3f: 8d 45 f4 lea -0xc(%ebp),%eax 115f42: 50 push %eax 115f43: ff 75 08 pushl 0x8(%ebp) 115f46: 68 60 1f 14 00 push $0x141f60 115f4b: e8 30 53 00 00 call 11b280 <_Objects_Get> switch ( location ) { 115f50: 83 c4 10 add $0x10,%esp 115f53: 8b 55 f4 mov -0xc(%ebp),%edx 115f56: 85 d2 test %edx,%edx 115f58: 74 0e je 115f68 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f5a: b8 04 00 00 00 mov $0x4,%eax } 115f5f: 8d 65 f8 lea -0x8(%ebp),%esp 115f62: 5b pop %ebx 115f63: 5e pop %esi 115f64: c9 leave 115f65: c3 ret 115f66: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115f68: 89 f2 mov %esi,%edx 115f6a: 2b 50 14 sub 0x14(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 115f6d: 3b 50 18 cmp 0x18(%eax),%edx 115f70: 77 16 ja 115f88 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 115f72: 03 50 10 add 0x10(%eax),%edx 115f75: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 115f77: e8 94 5b 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f7c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f7e: 8d 65 f8 lea -0x8(%ebp),%esp 115f81: 5b pop %ebx 115f82: 5e pop %esi 115f83: c9 leave 115f84: c3 ret 115f85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; 115f88: 89 33 mov %esi,(%ebx) 115f8a: eb eb jmp 115f77 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 115f8c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f91: 8d 65 f8 lea -0x8(%ebp),%esp 115f94: 5b pop %ebx 115f95: 5e pop %esi 115f96: c9 leave 115f97: c3 ret =============================================================================== 00115fbc : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115fbc: 55 push %ebp 115fbd: 89 e5 mov %esp,%ebp 115fbf: 56 push %esi 115fc0: 53 push %ebx 115fc1: 83 ec 10 sub $0x10,%esp 115fc4: 8b 75 0c mov 0xc(%ebp),%esi 115fc7: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115fca: 85 db test %ebx,%ebx 115fcc: 74 4e je 11601c <== NEVER TAKEN 115fce: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115fcf: 8d 45 f4 lea -0xc(%ebp),%eax 115fd2: 50 push %eax 115fd3: ff 75 08 pushl 0x8(%ebp) 115fd6: 68 60 1f 14 00 push $0x141f60 115fdb: e8 a0 52 00 00 call 11b280 <_Objects_Get> switch ( location ) { 115fe0: 83 c4 10 add $0x10,%esp 115fe3: 8b 55 f4 mov -0xc(%ebp),%edx 115fe6: 85 d2 test %edx,%edx 115fe8: 74 0e je 115ff8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115fea: b8 04 00 00 00 mov $0x4,%eax } 115fef: 8d 65 f8 lea -0x8(%ebp),%esp 115ff2: 5b pop %ebx 115ff3: 5e pop %esi 115ff4: c9 leave 115ff5: c3 ret 115ff6: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115ff8: 89 f2 mov %esi,%edx 115ffa: 2b 50 10 sub 0x10(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 115ffd: 3b 50 18 cmp 0x18(%eax),%edx 116000: 77 16 ja 116018 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116002: 03 50 14 add 0x14(%eax),%edx 116005: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 116007: e8 04 5b 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11600c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11600e: 8d 65 f8 lea -0x8(%ebp),%esp 116011: 5b pop %ebx 116012: 5e pop %esi 116013: c9 leave 116014: c3 ret 116015: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 116018: 89 33 mov %esi,(%ebx) 11601a: eb eb jmp 116007 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 11601c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116021: 8d 65 f8 lea -0x8(%ebp),%esp 116024: 5b pop %ebx 116025: 5e pop %esi 116026: c9 leave 116027: c3 ret =============================================================================== 00116a94 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116a94: 55 push %ebp 116a95: 89 e5 mov %esp,%ebp 116a97: 53 push %ebx 116a98: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116a9b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116a9e: 50 push %eax 116a9f: ff 75 08 pushl 0x8(%ebp) 116aa2: 68 e0 1f 14 00 push $0x141fe0 116aa7: e8 d4 47 00 00 call 11b280 <_Objects_Get> 116aac: 89 c3 mov %eax,%ebx switch ( location ) { 116aae: 83 c4 10 add $0x10,%esp 116ab1: 8b 45 f4 mov -0xc(%ebp),%eax 116ab4: 85 c0 test %eax,%eax 116ab6: 74 0c je 116ac4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116ab8: b8 04 00 00 00 mov $0x4,%eax } 116abd: 8b 5d fc mov -0x4(%ebp),%ebx 116ac0: c9 leave 116ac1: c3 ret 116ac2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 116ac4: a1 d8 26 14 00 mov 0x1426d8,%eax 116ac9: 39 43 40 cmp %eax,0x40(%ebx) 116acc: 74 12 je 116ae0 _Thread_Enable_dispatch(); 116ace: e8 3d 50 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116ad3: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ad8: 8b 5d fc mov -0x4(%ebp),%ebx 116adb: c9 leave 116adc: c3 ret 116add: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); 116ae0: 83 ec 0c sub $0xc,%esp 116ae3: 8d 43 10 lea 0x10(%ebx),%eax 116ae6: 50 push %eax 116ae7: e8 60 64 00 00 call 11cf4c <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116aec: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116af3: e8 18 50 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116af8: 83 c4 10 add $0x10,%esp 116afb: 31 c0 xor %eax,%eax 116afd: eb be jmp 116abd =============================================================================== 0010c30c : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c30c: 55 push %ebp 10c30d: 89 e5 mov %esp,%ebp 10c30f: 57 push %edi 10c310: 56 push %esi 10c311: 53 push %ebx 10c312: 83 ec 1c sub $0x1c,%esp 10c315: 8b 5d 08 mov 0x8(%ebp),%ebx 10c318: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c31b: 85 db test %ebx,%ebx 10c31d: 0f 84 a9 00 00 00 je 10c3cc return RTEMS_INVALID_NAME; if ( !id ) 10c323: 85 f6 test %esi,%esi 10c325: 0f 84 c5 00 00 00 je 10c3f0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c32b: a1 f4 a7 12 00 mov 0x12a7f4,%eax 10c330: 40 inc %eax 10c331: a3 f4 a7 12 00 mov %eax,0x12a7f4 * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) _Objects_Allocate( &_Rate_monotonic_Information ); 10c336: 83 ec 0c sub $0xc,%esp 10c339: 68 00 a7 12 00 push $0x12a700 10c33e: e8 25 1f 00 00 call 10e268 <_Objects_Allocate> 10c343: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c345: 83 c4 10 add $0x10,%esp 10c348: 85 c0 test %eax,%eax 10c34a: 0f 84 8c 00 00 00 je 10c3dc _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c350: a1 b8 ad 12 00 mov 0x12adb8,%eax 10c355: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c358: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c35f: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c366: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c36d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c374: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 10c37b: 8d 42 54 lea 0x54(%edx),%eax 10c37e: 89 45 e4 mov %eax,-0x1c(%ebp) 10c381: b9 38 00 00 00 mov $0x38,%ecx 10c386: 31 c0 xor %eax,%eax 10c388: 8b 7d e4 mov -0x1c(%ebp),%edi 10c38b: f3 aa rep stos %al,%es:(%edi) 10c38d: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c394: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c39b: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c3a2: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c3a9: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c3ac: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c3af: 8b 0d 1c a7 12 00 mov 0x12a71c,%ecx 10c3b5: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c3b8: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c3bb: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c3bd: e8 d6 2c 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c3c2: 31 c0 xor %eax,%eax } 10c3c4: 8d 65 f4 lea -0xc(%ebp),%esp 10c3c7: 5b pop %ebx 10c3c8: 5e pop %esi 10c3c9: 5f pop %edi 10c3ca: c9 leave 10c3cb: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c3cc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c3d4: 5b pop %ebx 10c3d5: 5e pop %esi 10c3d6: 5f pop %edi 10c3d7: c9 leave 10c3d8: c3 ret 10c3d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c3dc: e8 b7 2c 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c3e1: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3e6: 8d 65 f4 lea -0xc(%ebp),%esp 10c3e9: 5b pop %ebx 10c3ea: 5e pop %esi 10c3eb: 5f pop %edi 10c3ec: c9 leave 10c3ed: c3 ret 10c3ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c3f0: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c3f8: 5b pop %ebx 10c3f9: 5e pop %esi 10c3fa: 5f pop %edi 10c3fb: c9 leave 10c3fc: c3 ret =============================================================================== 0011288c : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 11288c: 55 push %ebp 11288d: 89 e5 mov %esp,%ebp 11288f: 53 push %ebx 112890: 83 ec 24 sub $0x24,%esp 112893: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 112896: 85 db test %ebx,%ebx 112898: 0f 84 92 00 00 00 je 112930 11289e: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 11289f: 8d 45 f4 lea -0xc(%ebp),%eax 1128a2: 50 push %eax 1128a3: ff 75 08 pushl 0x8(%ebp) 1128a6: 68 00 a7 12 00 push $0x12a700 1128ab: e8 58 bf ff ff call 10e808 <_Objects_Get> switch ( location ) { 1128b0: 83 c4 10 add $0x10,%esp 1128b3: 8b 4d f4 mov -0xc(%ebp),%ecx 1128b6: 85 c9 test %ecx,%ecx 1128b8: 74 0a je 1128c4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1128ba: b8 04 00 00 00 mov $0x4,%eax } 1128bf: 8b 5d fc mov -0x4(%ebp),%ebx 1128c2: c9 leave 1128c3: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 1128c4: 8b 50 40 mov 0x40(%eax),%edx 1128c7: 8b 52 08 mov 0x8(%edx),%edx 1128ca: 89 13 mov %edx,(%ebx) status->state = the_period->state; 1128cc: 8b 50 38 mov 0x38(%eax),%edx 1128cf: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 1128d2: 85 d2 test %edx,%edx 1128d4: 75 2a jne 112900 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 1128d6: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1128dd: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 1128e4: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 1128eb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 1128f2: e8 a1 c7 ff ff call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1128f7: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1128f9: 8b 5d fc mov -0x4(%ebp),%ebx 1128fc: c9 leave 1128fd: c3 ret 1128fe: 66 90 xchg %ax,%ax <== NOT EXECUTED } else { /* * Grab the current status. */ valid_status = 112900: 52 push %edx _Rate_monotonic_Get_status( 112901: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 112904: 52 push %edx _Rate_monotonic_Get_status( 112905: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 112908: 52 push %edx 112909: 50 push %eax 11290a: e8 15 9b ff ff call 10c424 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 11290f: 83 c4 10 add $0x10,%esp 112912: 84 c0 test %al,%al 112914: 74 26 je 11293c _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 112916: 8b 45 e4 mov -0x1c(%ebp),%eax 112919: 8b 55 e8 mov -0x18(%ebp),%edx 11291c: 89 43 08 mov %eax,0x8(%ebx) 11291f: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 112922: 8b 45 ec mov -0x14(%ebp),%eax 112925: 8b 55 f0 mov -0x10(%ebp),%edx 112928: 89 43 10 mov %eax,0x10(%ebx) 11292b: 89 53 14 mov %edx,0x14(%ebx) 11292e: eb c2 jmp 1128f2 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 112930: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112935: 8b 5d fc mov -0x4(%ebp),%ebx 112938: c9 leave 112939: c3 ret 11293a: 66 90 xchg %ax,%ax <== NOT EXECUTED valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 11293c: e8 57 c7 ff ff call 10f098 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 112941: b8 0b 00 00 00 mov $0xb,%eax 112946: e9 74 ff ff ff jmp 1128bf =============================================================================== 0010c620 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c620: 55 push %ebp 10c621: 89 e5 mov %esp,%ebp 10c623: 57 push %edi 10c624: 56 push %esi 10c625: 53 push %ebx 10c626: 83 ec 30 sub $0x30,%esp 10c629: 8b 5d 08 mov 0x8(%ebp),%ebx 10c62c: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); 10c62f: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c632: 50 push %eax 10c633: 53 push %ebx 10c634: 68 00 a7 12 00 push $0x12a700 10c639: e8 ca 21 00 00 call 10e808 <_Objects_Get> switch ( location ) { 10c63e: 83 c4 10 add $0x10,%esp 10c641: 8b 55 e4 mov -0x1c(%ebp),%edx 10c644: 85 d2 test %edx,%edx 10c646: 74 10 je 10c658 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c648: b8 04 00 00 00 mov $0x4,%eax } 10c64d: 8d 65 f4 lea -0xc(%ebp),%esp 10c650: 5b pop %ebx 10c651: 5e pop %esi 10c652: 5f pop %edi 10c653: c9 leave 10c654: c3 ret 10c655: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10c658: 8b 15 b8 ad 12 00 mov 0x12adb8,%edx 10c65e: 39 50 40 cmp %edx,0x40(%eax) 10c661: 74 15 je 10c678 _Thread_Enable_dispatch(); 10c663: e8 30 2a 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c668: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c66d: 8d 65 f4 lea -0xc(%ebp),%esp 10c670: 5b pop %ebx 10c671: 5e pop %esi 10c672: 5f pop %edi 10c673: c9 leave 10c674: c3 ret 10c675: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 10c678: 85 f6 test %esi,%esi 10c67a: 75 1c jne 10c698 switch ( the_period->state ) { 10c67c: 8b 40 38 mov 0x38(%eax),%eax 10c67f: 83 f8 04 cmp $0x4,%eax 10c682: 77 6c ja 10c6f0 <== NEVER TAKEN 10c684: 8b 04 85 1c 34 12 00 mov 0x12341c(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c68b: 89 45 d4 mov %eax,-0x2c(%ebp) 10c68e: e8 05 2a 00 00 call 10f098 <_Thread_Enable_dispatch> return( return_value ); 10c693: 8b 45 d4 mov -0x2c(%ebp),%eax 10c696: eb b5 jmp 10c64d } _ISR_Disable( level ); 10c698: 9c pushf 10c699: fa cli 10c69a: 5f pop %edi if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10c69b: 8b 50 38 mov 0x38(%eax),%edx 10c69e: 85 d2 test %edx,%edx 10c6a0: 74 52 je 10c6f4 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10c6a2: 83 fa 02 cmp $0x2,%edx 10c6a5: 0f 84 9e 00 00 00 je 10c749 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10c6ab: 83 fa 04 cmp $0x4,%edx 10c6ae: 75 98 jne 10c648 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c6b0: 83 ec 0c sub $0xc,%esp 10c6b3: 50 push %eax 10c6b4: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6b7: e8 74 fe ff ff call 10c530 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c6bc: 57 push %edi 10c6bd: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c6be: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6c1: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c6c8: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c6cb: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c6ce: 5b pop %ebx 10c6cf: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c6d0: 83 c0 10 add $0x10,%eax 10c6d3: 50 push %eax 10c6d4: 68 c4 a8 12 00 push $0x12a8c4 10c6d9: e8 da 3a 00 00 call 1101b8 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c6de: e8 b5 29 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c6e3: 83 c4 10 add $0x10,%esp 10c6e6: b8 06 00 00 00 mov $0x6,%eax 10c6eb: e9 5d ff ff ff jmp 10c64d _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c6f0: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c6f2: eb 97 jmp 10c68b <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 10c6f4: 57 push %edi 10c6f5: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c6f6: 83 ec 0c sub $0xc,%esp 10c6f9: 50 push %eax 10c6fa: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6fd: e8 ba fd ff ff call 10c4bc <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c702: 8b 45 d4 mov -0x2c(%ebp),%eax 10c705: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c70c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c713: c7 40 2c 78 ca 10 00 movl $0x10ca78,0x2c(%eax) the_watchdog->id = id; 10c71a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c71d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c724: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c727: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c72a: 5e pop %esi 10c72b: 5f pop %edi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c72c: 83 c0 10 add $0x10,%eax 10c72f: 50 push %eax 10c730: 68 c4 a8 12 00 push $0x12a8c4 10c735: e8 7e 3a 00 00 call 1101b8 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c73a: e8 59 29 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c73f: 83 c4 10 add $0x10,%esp 10c742: 31 c0 xor %eax,%eax 10c744: e9 04 ff ff ff jmp 10c64d if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c749: 83 ec 0c sub $0xc,%esp 10c74c: 50 push %eax 10c74d: 89 45 d4 mov %eax,-0x2c(%ebp) 10c750: e8 db fd ff ff call 10c530 <_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; 10c755: 8b 45 d4 mov -0x2c(%ebp),%eax 10c758: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c75f: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c762: 57 push %edi 10c763: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c764: 8b 15 b8 ad 12 00 mov 0x12adb8,%edx 10c76a: 8b 48 08 mov 0x8(%eax),%ecx 10c76d: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c770: 59 pop %ecx 10c771: 5b pop %ebx 10c772: 68 00 40 00 00 push $0x4000 10c777: 52 push %edx 10c778: 89 45 d4 mov %eax,-0x2c(%ebp) 10c77b: e8 f4 31 00 00 call 10f974 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c780: 9c pushf 10c781: fa cli 10c782: 59 pop %ecx local_state = the_period->state; 10c783: 8b 45 d4 mov -0x2c(%ebp),%eax 10c786: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c789: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c790: 51 push %ecx 10c791: 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 ) 10c792: 83 c4 10 add $0x10,%esp 10c795: 83 fa 03 cmp $0x3,%edx 10c798: 74 0c je 10c7a6 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c79a: e8 f9 28 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c79f: 31 c0 xor %eax,%eax 10c7a1: e9 a7 fe ff ff jmp 10c64d /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c7a6: 57 push %edi 10c7a7: 57 push %edi 10c7a8: 68 00 40 00 00 push $0x4000 10c7ad: ff 35 b8 ad 12 00 pushl 0x12adb8 10c7b3: e8 1c 25 00 00 call 10ecd4 <_Thread_Clear_state> 10c7b8: 83 c4 10 add $0x10,%esp 10c7bb: eb dd jmp 10c79a =============================================================================== 0010c7c0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c7c0: 55 push %ebp 10c7c1: 89 e5 mov %esp,%ebp 10c7c3: 57 push %edi 10c7c4: 56 push %esi 10c7c5: 53 push %ebx 10c7c6: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c7cc: 8b 75 08 mov 0x8(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10c7cf: 8b 7d 0c mov 0xc(%ebp),%edi 10c7d2: 85 ff test %edi,%edi 10c7d4: 0f 84 be 00 00 00 je 10c898 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c7da: 83 ec 08 sub $0x8,%esp 10c7dd: 68 30 34 12 00 push $0x123430 10c7e2: 56 push %esi 10c7e3: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c7e6: 59 pop %ecx 10c7e7: 5b pop %ebx 10c7e8: 68 68 34 12 00 push $0x123468 10c7ed: 56 push %esi 10c7ee: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c7f1: 58 pop %eax 10c7f2: 5a pop %edx 10c7f3: 68 8c 34 12 00 push $0x12348c 10c7f8: 56 push %esi 10c7f9: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c7fc: 5b pop %ebx 10c7fd: 5f pop %edi 10c7fe: 68 b0 34 12 00 push $0x1234b0 10c803: 56 push %esi 10c804: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c807: 5a pop %edx 10c808: 59 pop %ecx 10c809: 68 fc 34 12 00 push $0x1234fc 10c80e: 56 push %esi 10c80f: ff 55 0c call *0xc(%ebp) /* * 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 ; 10c812: 8b 1d 08 a7 12 00 mov 0x12a708,%ebx 10c818: 83 c4 10 add $0x10,%esp 10c81b: 3b 1d 0c a7 12 00 cmp 0x12a70c,%ebx 10c821: 77 75 ja 10c898 <== NEVER TAKEN 10c823: 8d 7d 88 lea -0x78(%ebp),%edi 10c826: eb 09 jmp 10c831 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c828: 43 inc %ebx /* * 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 ; 10c829: 39 1d 0c a7 12 00 cmp %ebx,0x12a70c 10c82f: 72 67 jb 10c898 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c831: 83 ec 08 sub $0x8,%esp 10c834: 57 push %edi 10c835: 53 push %ebx 10c836: e8 a5 5f 00 00 call 1127e0 if ( status != RTEMS_SUCCESSFUL ) 10c83b: 83 c4 10 add $0x10,%esp 10c83e: 85 c0 test %eax,%eax 10c840: 75 e6 jne 10c828 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10c842: 83 ec 08 sub $0x8,%esp 10c845: 8d 45 c0 lea -0x40(%ebp),%eax 10c848: 50 push %eax 10c849: 53 push %ebx 10c84a: e8 3d 60 00 00 call 11288c #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c84f: 83 c4 0c add $0xc,%esp 10c852: 8d 55 e3 lea -0x1d(%ebp),%edx 10c855: 52 push %edx 10c856: 6a 05 push $0x5 10c858: ff 75 c0 pushl -0x40(%ebp) 10c85b: e8 b4 02 00 00 call 10cb14 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c860: 59 pop %ecx 10c861: 58 pop %eax 10c862: ff 75 8c pushl -0x74(%ebp) 10c865: ff 75 88 pushl -0x78(%ebp) 10c868: 8d 45 e3 lea -0x1d(%ebp),%eax 10c86b: 50 push %eax 10c86c: 53 push %ebx 10c86d: 68 4e 34 12 00 push $0x12344e 10c872: 56 push %esi 10c873: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c876: 8b 45 88 mov -0x78(%ebp),%eax 10c879: 83 c4 20 add $0x20,%esp 10c87c: 85 c0 test %eax,%eax 10c87e: 75 20 jne 10c8a0 (*print)( context, "\n" ); 10c880: 83 ec 08 sub $0x8,%esp 10c883: 68 51 15 12 00 push $0x121551 10c888: 56 push %esi 10c889: ff 55 0c call *0xc(%ebp) continue; 10c88c: 83 c4 10 add $0x10,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c88f: 43 inc %ebx /* * 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 ; 10c890: 39 1d 0c a7 12 00 cmp %ebx,0x12a70c 10c896: 73 99 jae 10c831 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c898: 8d 65 f4 lea -0xc(%ebp),%esp 10c89b: 5b pop %ebx 10c89c: 5e pop %esi 10c89d: 5f pop %edi 10c89e: c9 leave 10c89f: c3 ret struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 10c8a0: 52 push %edx 10c8a1: 8d 55 d8 lea -0x28(%ebp),%edx 10c8a4: 52 push %edx 10c8a5: 50 push %eax 10c8a6: 8d 45 a0 lea -0x60(%ebp),%eax 10c8a9: 50 push %eax 10c8aa: e8 69 35 00 00 call 10fe18 <_Timespec_Divide_by_integer> (*print)( context, 10c8af: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c8b4: 8b 45 dc mov -0x24(%ebp),%eax 10c8b7: f7 e9 imul %ecx 10c8b9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8bf: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8c5: c1 f8 06 sar $0x6,%eax 10c8c8: 8b 55 dc mov -0x24(%ebp),%edx 10c8cb: c1 fa 1f sar $0x1f,%edx 10c8ce: 29 d0 sub %edx,%eax 10c8d0: 50 push %eax 10c8d1: ff 75 d8 pushl -0x28(%ebp) 10c8d4: 8b 45 9c mov -0x64(%ebp),%eax 10c8d7: f7 e9 imul %ecx 10c8d9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8df: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8e5: c1 f8 06 sar $0x6,%eax 10c8e8: 8b 55 9c mov -0x64(%ebp),%edx 10c8eb: c1 fa 1f sar $0x1f,%edx 10c8ee: 29 d0 sub %edx,%eax 10c8f0: 50 push %eax 10c8f1: ff 75 98 pushl -0x68(%ebp) 10c8f4: 8b 45 94 mov -0x6c(%ebp),%eax 10c8f7: f7 e9 imul %ecx 10c8f9: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c8ff: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c905: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c90b: c1 f8 06 sar $0x6,%eax 10c90e: 8b 55 94 mov -0x6c(%ebp),%edx 10c911: c1 fa 1f sar $0x1f,%edx 10c914: 29 d0 sub %edx,%eax 10c916: 50 push %eax 10c917: ff 75 90 pushl -0x70(%ebp) 10c91a: 68 48 35 12 00 push $0x123548 10c91f: 56 push %esi 10c920: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c923: ff 55 0c call *0xc(%ebp) struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10c926: 83 c4 2c add $0x2c,%esp 10c929: 8d 55 d8 lea -0x28(%ebp),%edx 10c92c: 52 push %edx 10c92d: ff 75 88 pushl -0x78(%ebp) 10c930: 8d 45 b8 lea -0x48(%ebp),%eax 10c933: 50 push %eax 10c934: e8 df 34 00 00 call 10fe18 <_Timespec_Divide_by_integer> (*print)( context, 10c939: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c93c: 8b 45 dc mov -0x24(%ebp),%eax 10c93f: f7 e9 imul %ecx 10c941: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c947: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c94d: c1 f8 06 sar $0x6,%eax 10c950: 8b 55 dc mov -0x24(%ebp),%edx 10c953: c1 fa 1f sar $0x1f,%edx 10c956: 29 d0 sub %edx,%eax 10c958: 50 push %eax 10c959: ff 75 d8 pushl -0x28(%ebp) 10c95c: 8b 45 b4 mov -0x4c(%ebp),%eax 10c95f: f7 e9 imul %ecx 10c961: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c967: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c96d: c1 f8 06 sar $0x6,%eax 10c970: 8b 55 b4 mov -0x4c(%ebp),%edx 10c973: c1 fa 1f sar $0x1f,%edx 10c976: 29 d0 sub %edx,%eax 10c978: 50 push %eax 10c979: ff 75 b0 pushl -0x50(%ebp) 10c97c: 8b 45 ac mov -0x54(%ebp),%eax 10c97f: f7 e9 imul %ecx 10c981: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c987: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c98d: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c993: c1 f8 06 sar $0x6,%eax 10c996: 8b 55 ac mov -0x54(%ebp),%edx 10c999: c1 fa 1f sar $0x1f,%edx 10c99c: 29 d0 sub %edx,%eax 10c99e: 50 push %eax 10c99f: ff 75 a8 pushl -0x58(%ebp) 10c9a2: 68 68 35 12 00 push $0x123568 10c9a7: 56 push %esi 10c9a8: ff 55 0c call *0xc(%ebp) 10c9ab: 83 c4 30 add $0x30,%esp 10c9ae: e9 75 fe ff ff jmp 10c828 =============================================================================== 0010c9cc : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10c9cc: 55 push %ebp 10c9cd: 89 e5 mov %esp,%ebp 10c9cf: 53 push %ebx 10c9d0: 83 ec 04 sub $0x4,%esp 10c9d3: a1 f4 a7 12 00 mov 0x12a7f4,%eax 10c9d8: 40 inc %eax 10c9d9: a3 f4 a7 12 00 mov %eax,0x12a7f4 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c9de: 8b 1d 08 a7 12 00 mov 0x12a708,%ebx 10c9e4: 3b 1d 0c a7 12 00 cmp 0x12a70c,%ebx 10c9ea: 77 15 ja 10ca01 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10c9ec: 83 ec 0c sub $0xc,%esp 10c9ef: 53 push %ebx 10c9f0: e8 17 00 00 00 call 10ca0c * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c9f5: 43 inc %ebx /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c9f6: 83 c4 10 add $0x10,%esp 10c9f9: 39 1d 0c a7 12 00 cmp %ebx,0x12a70c 10c9ff: 73 eb jae 10c9ec /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10ca01: 8b 5d fc mov -0x4(%ebp),%ebx 10ca04: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10ca05: e9 8e 26 00 00 jmp 10f098 <_Thread_Enable_dispatch> =============================================================================== 0010ca0c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10ca0c: 55 push %ebp 10ca0d: 89 e5 mov %esp,%ebp 10ca0f: 57 push %edi 10ca10: 53 push %ebx 10ca11: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10ca14: 8d 45 f4 lea -0xc(%ebp),%eax 10ca17: 50 push %eax 10ca18: ff 75 08 pushl 0x8(%ebp) 10ca1b: 68 00 a7 12 00 push $0x12a700 10ca20: e8 e3 1d 00 00 call 10e808 <_Objects_Get> 10ca25: 89 c2 mov %eax,%edx switch ( location ) { 10ca27: 83 c4 10 add $0x10,%esp 10ca2a: 8b 45 f4 mov -0xc(%ebp),%eax 10ca2d: 85 c0 test %eax,%eax 10ca2f: 75 3b jne 10ca6c case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10ca31: 8d 5a 54 lea 0x54(%edx),%ebx 10ca34: b9 38 00 00 00 mov $0x38,%ecx 10ca39: 31 c0 xor %eax,%eax 10ca3b: 89 df mov %ebx,%edi 10ca3d: f3 aa rep stos %al,%es:(%edi) 10ca3f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ca46: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ca4d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ca54: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10ca5b: e8 38 26 00 00 call 10f098 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca60: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca62: 8d 65 f8 lea -0x8(%ebp),%esp 10ca65: 5b pop %ebx 10ca66: 5f pop %edi 10ca67: c9 leave 10ca68: c3 ret 10ca69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ca6c: b8 04 00 00 00 mov $0x4,%eax } 10ca71: 8d 65 f8 lea -0x8(%ebp),%esp 10ca74: 5b pop %ebx 10ca75: 5f pop %edi 10ca76: c9 leave 10ca77: c3 ret =============================================================================== 00117228 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117228: 55 push %ebp 117229: 89 e5 mov %esp,%ebp 11722b: 57 push %edi 11722c: 56 push %esi 11722d: 53 push %ebx 11722e: 83 ec 1c sub $0x1c,%esp 117231: 8b 7d 08 mov 0x8(%ebp),%edi 117234: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117237: 85 ff test %edi,%edi 117239: 0f 84 c1 00 00 00 je 117300 return RTEMS_INVALID_NAME; if ( !starting_address ) 11723f: 85 f6 test %esi,%esi 117241: 0f 84 e1 00 00 00 je 117328 return RTEMS_INVALID_ADDRESS; if ( !id ) 117247: 8b 45 1c mov 0x1c(%ebp),%eax 11724a: 85 c0 test %eax,%eax 11724c: 0f 84 d6 00 00 00 je 117328 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117252: 83 ec 0c sub $0xc,%esp 117255: ff 35 c4 21 14 00 pushl 0x1421c4 11725b: e8 fc 24 00 00 call 11975c <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 117260: c7 04 24 20 20 14 00 movl $0x142020,(%esp) 117267: e8 20 3b 00 00 call 11ad8c <_Objects_Allocate> 11726c: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 11726e: 83 c4 10 add $0x10,%esp 117271: 85 c0 test %eax,%eax 117273: 0f 84 bf 00 00 00 je 117338 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 117279: ff 75 14 pushl 0x14(%ebp) 11727c: ff 75 10 pushl 0x10(%ebp) 11727f: 56 push %esi 117280: 8d 40 68 lea 0x68(%eax),%eax 117283: 50 push %eax 117284: e8 0f 37 00 00 call 11a998 <_Heap_Initialize> 117289: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 11728c: 83 c4 10 add $0x10,%esp 11728f: 85 c0 test %eax,%eax 117291: 74 7d je 117310 return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117293: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 117296: 8b 45 10 mov 0x10(%ebp),%eax 117299: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 11729c: 8b 55 14 mov 0x14(%ebp),%edx 11729f: 89 53 58 mov %edx,0x58(%ebx) the_region->attribute_set = attribute_set; 1172a2: 8b 45 18 mov 0x18(%ebp),%eax 1172a5: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 1172a8: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 1172af: 6a 06 push $0x6 1172b1: 6a 40 push $0x40 1172b3: a8 04 test $0x4,%al 1172b5: 0f 95 c0 setne %al 1172b8: 0f b6 c0 movzbl %al,%eax 1172bb: 50 push %eax 1172bc: 8d 43 10 lea 0x10(%ebx),%eax 1172bf: 50 push %eax 1172c0: e8 bf 4f 00 00 call 11c284 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1172c5: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1172c8: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1172cb: 8b 15 3c 20 14 00 mov 0x14203c,%edx 1172d1: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1172d4: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 1172d7: 8b 55 1c mov 0x1c(%ebp),%edx 1172da: 89 02 mov %eax,(%edx) 1172dc: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 1172df: 31 c0 xor %eax,%eax } } _RTEMS_Unlock_allocator(); 1172e1: 83 ec 0c sub $0xc,%esp 1172e4: ff 35 c4 21 14 00 pushl 0x1421c4 1172ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1172ed: e8 b2 24 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1172f2: 83 c4 10 add $0x10,%esp 1172f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1172f8: 8d 65 f4 lea -0xc(%ebp),%esp 1172fb: 5b pop %ebx 1172fc: 5e pop %esi 1172fd: 5f pop %edi 1172fe: c9 leave 1172ff: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 117300: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117305: 8d 65 f4 lea -0xc(%ebp),%esp 117308: 5b pop %ebx 117309: 5e pop %esi 11730a: 5f pop %edi 11730b: c9 leave 11730c: c3 ret 11730d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117310: 83 ec 08 sub $0x8,%esp 117313: 53 push %ebx 117314: 68 20 20 14 00 push $0x142020 117319: e8 e6 3d 00 00 call 11b104 <_Objects_Free> 11731e: 83 c4 10 add $0x10,%esp &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 117321: b8 08 00 00 00 mov $0x8,%eax 117326: eb b9 jmp 1172e1 if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 117328: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 11732d: 8d 65 f4 lea -0xc(%ebp),%esp 117330: 5b pop %ebx 117331: 5e pop %esi 117332: 5f pop %edi 117333: c9 leave 117334: c3 ret 117335: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 117338: b8 05 00 00 00 mov $0x5,%eax 11733d: eb a2 jmp 1172e1 =============================================================================== 00117340 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117340: 55 push %ebp 117341: 89 e5 mov %esp,%ebp 117343: 53 push %ebx 117344: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117347: ff 35 c4 21 14 00 pushl 0x1421c4 11734d: e8 0a 24 00 00 call 11975c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 117352: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117355: 8d 45 f4 lea -0xc(%ebp),%eax 117358: 50 push %eax 117359: ff 75 08 pushl 0x8(%ebp) 11735c: 68 20 20 14 00 push $0x142020 117361: e8 de 3e 00 00 call 11b244 <_Objects_Get_no_protection> switch ( location ) { 117366: 83 c4 10 add $0x10,%esp 117369: 8b 5d f4 mov -0xc(%ebp),%ebx 11736c: 85 db test %ebx,%ebx 11736e: 74 1c je 11738c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117370: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117375: 83 ec 0c sub $0xc,%esp 117378: ff 35 c4 21 14 00 pushl 0x1421c4 11737e: e8 21 24 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; } 117383: 89 d8 mov %ebx,%eax 117385: 8b 5d fc mov -0x4(%ebp),%ebx 117388: c9 leave 117389: c3 ret 11738a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 11738c: 8b 48 64 mov 0x64(%eax),%ecx 11738f: 85 c9 test %ecx,%ecx 117391: 74 09 je 11739c return_status = RTEMS_RESOURCE_IN_USE; 117393: bb 0c 00 00 00 mov $0xc,%ebx 117398: eb db jmp 117375 11739a: 66 90 xchg %ax,%ax <== NOT EXECUTED else { _Objects_Close( &_Region_Information, &the_region->Object ); 11739c: 83 ec 08 sub $0x8,%esp 11739f: 50 push %eax 1173a0: 68 20 20 14 00 push $0x142020 1173a5: 89 45 e4 mov %eax,-0x1c(%ebp) 1173a8: e8 5b 3a 00 00 call 11ae08 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1173ad: 58 pop %eax 1173ae: 5a pop %edx 1173af: 8b 45 e4 mov -0x1c(%ebp),%eax 1173b2: 50 push %eax 1173b3: 68 20 20 14 00 push $0x142020 1173b8: e8 47 3d 00 00 call 11b104 <_Objects_Free> 1173bd: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 1173c0: 31 db xor %ebx,%ebx 1173c2: eb b1 jmp 117375 =============================================================================== 001173c4 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 1173c4: 55 push %ebp 1173c5: 89 e5 mov %esp,%ebp 1173c7: 56 push %esi 1173c8: 53 push %ebx 1173c9: 83 ec 10 sub $0x10,%esp 1173cc: 8b 5d 0c mov 0xc(%ebp),%ebx bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 1173cf: 85 db test %ebx,%ebx 1173d1: 74 75 je 117448 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 1173d3: 83 ec 0c sub $0xc,%esp 1173d6: ff 35 c4 21 14 00 pushl 0x1421c4 1173dc: e8 7b 23 00 00 call 11975c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1173e1: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1173e4: 8d 45 f0 lea -0x10(%ebp),%eax 1173e7: 50 push %eax 1173e8: ff 75 08 pushl 0x8(%ebp) 1173eb: 68 20 20 14 00 push $0x142020 1173f0: e8 4f 3e 00 00 call 11b244 <_Objects_Get_no_protection> 1173f5: 89 c6 mov %eax,%esi switch ( location ) { 1173f7: 83 c4 10 add $0x10,%esp 1173fa: 8b 45 f0 mov -0x10(%ebp),%eax 1173fd: 85 c0 test %eax,%eax 1173ff: 74 1f je 117420 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117401: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117406: 83 ec 0c sub $0xc,%esp 117409: ff 35 c4 21 14 00 pushl 0x1421c4 11740f: e8 90 23 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 117414: 83 c4 10 add $0x10,%esp } 117417: 89 d8 mov %ebx,%eax 117419: 8d 65 f8 lea -0x8(%ebp),%esp 11741c: 5b pop %ebx 11741d: 5e pop %esi 11741e: c9 leave 11741f: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 117420: 8d 45 f4 lea -0xc(%ebp),%eax 117423: 50 push %eax 117424: ff 75 10 pushl 0x10(%ebp) 117427: 53 push %ebx 117428: 8d 46 68 lea 0x68(%esi),%eax 11742b: 50 push %eax 11742c: e8 73 2f 00 00 call 11a3a4 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 117431: 83 c4 10 add $0x10,%esp 117434: 84 c0 test %al,%al 117436: 74 20 je 117458 the_region->length += amount_extended; 117438: 8b 45 f4 mov -0xc(%ebp),%eax 11743b: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 11743e: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 117441: 31 db xor %ebx,%ebx 117443: eb c1 jmp 117406 117445: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 117448: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11744d: 89 d8 mov %ebx,%eax 11744f: 8d 65 f8 lea -0x8(%ebp),%esp 117452: 5b pop %ebx 117453: 5e pop %esi 117454: c9 leave 117455: c3 ret 117456: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else { return_status = RTEMS_INVALID_ADDRESS; 117458: bb 09 00 00 00 mov $0x9,%ebx 11745d: eb a7 jmp 117406 =============================================================================== 00117460 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117460: 55 push %ebp 117461: 89 e5 mov %esp,%ebp 117463: 53 push %ebx 117464: 83 ec 14 sub $0x14,%esp 117467: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11746a: 85 db test %ebx,%ebx 11746c: 74 76 je 1174e4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11746e: 83 ec 0c sub $0xc,%esp 117471: ff 35 c4 21 14 00 pushl 0x1421c4 117477: e8 e0 22 00 00 call 11975c <_API_Mutex_Lock> 11747c: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11747f: 8d 45 f4 lea -0xc(%ebp),%eax 117482: 50 push %eax 117483: ff 75 08 pushl 0x8(%ebp) 117486: 68 20 20 14 00 push $0x142020 11748b: e8 b4 3d 00 00 call 11b244 <_Objects_Get_no_protection> switch ( location ) { 117490: 83 c4 10 add $0x10,%esp 117493: 8b 55 f4 mov -0xc(%ebp),%edx 117496: 85 d2 test %edx,%edx 117498: 74 1e je 1174b8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11749a: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11749f: 83 ec 0c sub $0xc,%esp 1174a2: ff 35 c4 21 14 00 pushl 0x1421c4 1174a8: e8 f7 22 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1174ad: 83 c4 10 add $0x10,%esp } 1174b0: 89 d8 mov %ebx,%eax 1174b2: 8b 5d fc mov -0x4(%ebp),%ebx 1174b5: c9 leave 1174b6: c3 ret 1174b7: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1174b8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1174bf: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 1174c6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 1174cd: 83 ec 08 sub $0x8,%esp 1174d0: 53 push %ebx 1174d1: 83 c0 68 add $0x68,%eax 1174d4: 50 push %eax 1174d5: e8 a6 32 00 00 call 11a780 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 1174da: 83 c4 10 add $0x10,%esp the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); return_status = RTEMS_SUCCESSFUL; 1174dd: 31 db xor %ebx,%ebx break; 1174df: eb be jmp 11749f 1174e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 1174e4: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1174e9: 89 d8 mov %ebx,%eax 1174eb: 8b 5d fc mov -0x4(%ebp),%ebx 1174ee: c9 leave 1174ef: c3 ret =============================================================================== 001174f0 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 1174f0: 55 push %ebp 1174f1: 89 e5 mov %esp,%ebp 1174f3: 53 push %ebx 1174f4: 83 ec 14 sub $0x14,%esp 1174f7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1174fa: 85 db test %ebx,%ebx 1174fc: 74 5e je 11755c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1174fe: 83 ec 0c sub $0xc,%esp 117501: ff 35 c4 21 14 00 pushl 0x1421c4 117507: e8 50 22 00 00 call 11975c <_API_Mutex_Lock> 11750c: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11750f: 8d 45 f4 lea -0xc(%ebp),%eax 117512: 50 push %eax 117513: ff 75 08 pushl 0x8(%ebp) 117516: 68 20 20 14 00 push $0x142020 11751b: e8 24 3d 00 00 call 11b244 <_Objects_Get_no_protection> switch ( location ) { 117520: 83 c4 10 add $0x10,%esp 117523: 8b 55 f4 mov -0xc(%ebp),%edx 117526: 85 d2 test %edx,%edx 117528: 74 1e je 117548 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11752a: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11752f: 83 ec 0c sub $0xc,%esp 117532: ff 35 c4 21 14 00 pushl 0x1421c4 117538: e8 67 22 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 11753d: 83 c4 10 add $0x10,%esp } 117540: 89 d8 mov %ebx,%eax 117542: 8b 5d fc mov -0x4(%ebp),%ebx 117545: c9 leave 117546: c3 ret 117547: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 117548: 83 ec 08 sub $0x8,%esp 11754b: 53 push %ebx 11754c: 83 c0 68 add $0x68,%eax 11754f: 50 push %eax 117550: e8 8b 32 00 00 call 11a7e0 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 117555: 83 c4 10 add $0x10,%esp the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); return_status = RTEMS_SUCCESSFUL; 117558: 31 db xor %ebx,%ebx break; 11755a: eb d3 jmp 11752f Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 11755c: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117561: 89 d8 mov %ebx,%eax 117563: 8b 5d fc mov -0x4(%ebp),%ebx 117566: c9 leave 117567: c3 ret =============================================================================== 00117568 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 117568: 55 push %ebp 117569: 89 e5 mov %esp,%ebp 11756b: 57 push %edi 11756c: 56 push %esi 11756d: 53 push %ebx 11756e: 83 ec 2c sub $0x2c,%esp 117571: 8b 75 0c mov 0xc(%ebp),%esi 117574: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117577: 85 db test %ebx,%ebx 117579: 0f 84 a1 00 00 00 je 117620 return RTEMS_INVALID_ADDRESS; *segment = NULL; 11757f: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117585: 85 f6 test %esi,%esi 117587: 75 0f jne 117598 return RTEMS_INVALID_SIZE; 117589: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11758e: 8d 65 f4 lea -0xc(%ebp),%esp 117591: 5b pop %ebx 117592: 5e pop %esi 117593: 5f pop %edi 117594: c9 leave 117595: c3 ret 117596: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117598: 83 ec 0c sub $0xc,%esp 11759b: ff 35 c4 21 14 00 pushl 0x1421c4 1175a1: e8 b6 21 00 00 call 11975c <_API_Mutex_Lock> executing = _Thread_Executing; 1175a6: a1 d8 26 14 00 mov 0x1426d8,%eax 1175ab: 89 45 d4 mov %eax,-0x2c(%ebp) 1175ae: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1175b1: 8d 45 e4 lea -0x1c(%ebp),%eax 1175b4: 50 push %eax 1175b5: ff 75 08 pushl 0x8(%ebp) 1175b8: 68 20 20 14 00 push $0x142020 1175bd: e8 82 3c 00 00 call 11b244 <_Objects_Get_no_protection> 1175c2: 89 c7 mov %eax,%edi switch ( location ) { 1175c4: 83 c4 10 add $0x10,%esp 1175c7: 8b 45 e4 mov -0x1c(%ebp),%eax 1175ca: 85 c0 test %eax,%eax 1175cc: 75 2a jne 1175f8 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 1175ce: 3b 77 5c cmp 0x5c(%edi),%esi 1175d1: 76 2d jbe 117600 return_status = RTEMS_INVALID_SIZE; 1175d3: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1175d8: 83 ec 0c sub $0xc,%esp 1175db: ff 35 c4 21 14 00 pushl 0x1421c4 1175e1: 89 45 d0 mov %eax,-0x30(%ebp) 1175e4: e8 bb 21 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1175e9: 83 c4 10 add $0x10,%esp 1175ec: 8b 45 d0 mov -0x30(%ebp),%eax } 1175ef: 8d 65 f4 lea -0xc(%ebp),%esp 1175f2: 5b pop %ebx 1175f3: 5e pop %esi 1175f4: 5f pop %edi 1175f5: c9 leave 1175f6: c3 ret 1175f7: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1175f8: b8 04 00 00 00 mov $0x4,%eax 1175fd: eb d9 jmp 1175d8 1175ff: 90 nop <== NOT EXECUTED * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 117600: 6a 00 push $0x0 117602: 6a 00 push $0x0 117604: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117605: 8d 47 68 lea 0x68(%edi),%eax 117608: 50 push %eax 117609: e8 c2 2b 00 00 call 11a1d0 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 11760e: 83 c4 10 add $0x10,%esp 117611: 85 c0 test %eax,%eax 117613: 74 17 je 11762c the_region->number_of_used_blocks += 1; 117615: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117618: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 11761a: 31 c0 xor %eax,%eax 11761c: eb ba jmp 1175d8 11761e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 117620: b8 09 00 00 00 mov $0x9,%eax 117625: e9 64 ff ff ff jmp 11758e 11762a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 11762c: f6 45 10 01 testb $0x1,0x10(%ebp) 117630: 74 07 je 117639 return_status = RTEMS_UNSATISFIED; 117632: b8 0d 00 00 00 mov $0xd,%eax 117637: eb 9f jmp 1175d8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117639: a1 14 21 14 00 mov 0x142114,%eax 11763e: 40 inc %eax 11763f: a3 14 21 14 00 mov %eax,0x142114 * 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(); 117644: 83 ec 0c sub $0xc,%esp 117647: ff 35 c4 21 14 00 pushl 0x1421c4 11764d: e8 52 21 00 00 call 1197a4 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117652: 8d 47 10 lea 0x10(%edi),%eax 117655: 8b 55 d4 mov -0x2c(%ebp),%edx 117658: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11765b: 8b 4d 08 mov 0x8(%ebp),%ecx 11765e: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117661: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117664: 89 5a 28 mov %ebx,0x28(%edx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 117667: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 11766e: 83 c4 0c add $0xc,%esp 117671: 68 48 c3 11 00 push $0x11c348 117676: ff 75 14 pushl 0x14(%ebp) 117679: 50 push %eax 11767a: e8 79 49 00 00 call 11bff8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 11767f: e8 8c 44 00 00 call 11bb10 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117684: 8b 55 d4 mov -0x2c(%ebp),%edx 117687: 8b 42 34 mov 0x34(%edx),%eax 11768a: 83 c4 10 add $0x10,%esp 11768d: e9 fc fe ff ff jmp 11758e =============================================================================== 00117694 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117694: 55 push %ebp 117695: 89 e5 mov %esp,%ebp 117697: 56 push %esi 117698: 53 push %ebx 117699: 83 ec 20 sub $0x20,%esp 11769c: 8b 5d 0c mov 0xc(%ebp),%ebx 11769f: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 1176a2: 85 db test %ebx,%ebx 1176a4: 74 72 je 117718 return RTEMS_INVALID_ADDRESS; if ( !size ) 1176a6: 85 f6 test %esi,%esi 1176a8: 74 6e je 117718 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1176aa: 83 ec 0c sub $0xc,%esp 1176ad: ff 35 c4 21 14 00 pushl 0x1421c4 1176b3: e8 a4 20 00 00 call 11975c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1176b8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1176bb: 8d 45 f4 lea -0xc(%ebp),%eax 1176be: 50 push %eax 1176bf: ff 75 08 pushl 0x8(%ebp) 1176c2: 68 20 20 14 00 push $0x142020 1176c7: e8 78 3b 00 00 call 11b244 <_Objects_Get_no_protection> switch ( location ) { 1176cc: 83 c4 10 add $0x10,%esp 1176cf: 8b 55 f4 mov -0xc(%ebp),%edx 1176d2: 85 d2 test %edx,%edx 1176d4: 74 2a je 117700 void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 1176d6: 31 c0 xor %eax,%eax 1176d8: 83 fa 01 cmp $0x1,%edx 1176db: 0f 94 c0 sete %al 1176de: c1 e0 02 shl $0x2,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1176e1: 83 ec 0c sub $0xc,%esp 1176e4: ff 35 c4 21 14 00 pushl 0x1421c4 1176ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1176ed: e8 b2 20 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1176f2: 83 c4 10 add $0x10,%esp 1176f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1176f8: 8d 65 f8 lea -0x8(%ebp),%esp 1176fb: 5b pop %ebx 1176fc: 5e pop %esi 1176fd: c9 leave 1176fe: c3 ret 1176ff: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117700: 52 push %edx 117701: 56 push %esi 117702: 53 push %ebx 117703: 83 c0 68 add $0x68,%eax 117706: 50 push %eax 117707: e8 9c 35 00 00 call 11aca8 <_Heap_Size_of_alloc_area> 11770c: 83 c4 10 add $0x10,%esp void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 11770f: 3c 01 cmp $0x1,%al 117711: 19 c0 sbb %eax,%eax 117713: 83 e0 09 and $0x9,%eax 117716: eb c9 jmp 1176e1 if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 117718: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11771d: 8d 65 f8 lea -0x8(%ebp),%esp 117720: 5b pop %ebx 117721: 5e pop %esi 117722: c9 leave 117723: c3 ret =============================================================================== 00117748 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117748: 55 push %ebp 117749: 89 e5 mov %esp,%ebp 11774b: 56 push %esi 11774c: 53 push %ebx 11774d: 83 ec 20 sub $0x20,%esp 117750: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 117753: 85 db test %ebx,%ebx 117755: 0f 84 89 00 00 00 je 1177e4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11775b: 83 ec 0c sub $0xc,%esp 11775e: ff 35 c4 21 14 00 pushl 0x1421c4 117764: e8 f3 1f 00 00 call 11975c <_API_Mutex_Lock> 117769: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11776c: 8d 45 f0 lea -0x10(%ebp),%eax 11776f: 50 push %eax 117770: ff 75 08 pushl 0x8(%ebp) 117773: 68 20 20 14 00 push $0x142020 117778: e8 c7 3a 00 00 call 11b244 <_Objects_Get_no_protection> 11777d: 89 c6 mov %eax,%esi switch ( location ) { 11777f: 83 c4 10 add $0x10,%esp 117782: 8b 45 f0 mov -0x10(%ebp),%eax 117785: 85 c0 test %eax,%eax 117787: 74 1f je 1177a8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117789: 83 ec 0c sub $0xc,%esp 11778c: ff 35 c4 21 14 00 pushl 0x1421c4 117792: e8 0d 20 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 117797: 83 c4 10 add $0x10,%esp 11779a: b8 04 00 00 00 mov $0x4,%eax } 11779f: 8d 65 f8 lea -0x8(%ebp),%esp 1177a2: 5b pop %ebx 1177a3: 5e pop %esi 1177a4: c9 leave 1177a5: c3 ret 1177a6: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1177a8: 83 ec 0c sub $0xc,%esp 1177ab: 8d 45 f4 lea -0xc(%ebp),%eax 1177ae: 50 push %eax 1177af: 8d 45 ec lea -0x14(%ebp),%eax 1177b2: 50 push %eax 1177b3: ff 75 10 pushl 0x10(%ebp) 1177b6: ff 75 0c pushl 0xc(%ebp) 1177b9: 8d 46 68 lea 0x68(%esi),%eax 1177bc: 50 push %eax 1177bd: e8 de 33 00 00 call 11aba0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1177c2: 8b 55 ec mov -0x14(%ebp),%edx 1177c5: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1177c7: 83 c4 20 add $0x20,%esp 1177ca: 85 c0 test %eax,%eax 1177cc: 75 22 jne 1177f0 _Region_Process_queue( the_region ); /* unlocks allocator */ 1177ce: 83 ec 0c sub $0xc,%esp 1177d1: 56 push %esi 1177d2: e8 b5 7c 00 00 call 11f48c <_Region_Process_queue> 1177d7: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 1177da: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177dc: 8d 65 f8 lea -0x8(%ebp),%esp 1177df: 5b pop %ebx 1177e0: 5e pop %esi 1177e1: c9 leave 1177e2: c3 ret 1177e3: 90 nop <== NOT EXECUTED rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 1177e4: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177e9: 8d 65 f8 lea -0x8(%ebp),%esp 1177ec: 5b pop %ebx 1177ed: 5e pop %esi 1177ee: c9 leave 1177ef: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1177f0: 83 ec 0c sub $0xc,%esp 1177f3: ff 35 c4 21 14 00 pushl 0x1421c4 1177f9: 89 45 e4 mov %eax,-0x1c(%ebp) 1177fc: e8 a3 1f 00 00 call 1197a4 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117801: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117804: 8b 45 e4 mov -0x1c(%ebp),%eax 117807: 48 dec %eax 117808: 0f 94 c0 sete %al 11780b: 0f b6 c0 movzbl %al,%eax 11780e: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117815: 8d 65 f8 lea -0x8(%ebp),%esp 117818: 5b pop %ebx 117819: 5e pop %esi 11781a: c9 leave 11781b: c3 ret =============================================================================== 0011781c : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 11781c: 55 push %ebp 11781d: 89 e5 mov %esp,%ebp 11781f: 53 push %ebx 117820: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 117823: ff 35 c4 21 14 00 pushl 0x1421c4 117829: e8 2e 1f 00 00 call 11975c <_API_Mutex_Lock> 11782e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117831: 8d 45 f4 lea -0xc(%ebp),%eax 117834: 50 push %eax 117835: ff 75 08 pushl 0x8(%ebp) 117838: 68 20 20 14 00 push $0x142020 11783d: e8 02 3a 00 00 call 11b244 <_Objects_Get_no_protection> 117842: 89 c3 mov %eax,%ebx switch ( location ) { 117844: 83 c4 10 add $0x10,%esp 117847: 8b 45 f4 mov -0xc(%ebp),%eax 11784a: 85 c0 test %eax,%eax 11784c: 75 1e jne 11786c RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11784e: 83 ec 08 sub $0x8,%esp 117851: ff 75 0c pushl 0xc(%ebp) 117854: 8d 43 68 lea 0x68(%ebx),%eax 117857: 50 push %eax 117858: e8 d3 2d 00 00 call 11a630 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11785d: 83 c4 10 add $0x10,%esp 117860: 84 c0 test %al,%al 117862: 75 28 jne 11788c return_status = RTEMS_INVALID_ADDRESS; 117864: bb 09 00 00 00 mov $0x9,%ebx 117869: eb 06 jmp 117871 11786b: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11786c: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117871: 83 ec 0c sub $0xc,%esp 117874: ff 35 c4 21 14 00 pushl 0x1421c4 11787a: e8 25 1f 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 11787f: 83 c4 10 add $0x10,%esp } 117882: 89 d8 mov %ebx,%eax 117884: 8b 5d fc mov -0x4(%ebp),%ebx 117887: c9 leave 117888: c3 ret 117889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 11788c: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 11788f: 83 ec 0c sub $0xc,%esp 117892: 53 push %ebx 117893: e8 f4 7b 00 00 call 11f48c <_Region_Process_queue> return RTEMS_SUCCESSFUL; 117898: 83 c4 10 add $0x10,%esp 11789b: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11789d: 89 d8 mov %ebx,%eax 11789f: 8b 5d fc mov -0x4(%ebp),%ebx 1178a2: c9 leave 1178a3: c3 ret =============================================================================== 0010b414 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b414: 55 push %ebp 10b415: 89 e5 mov %esp,%ebp 10b417: 57 push %edi 10b418: 56 push %esi 10b419: 53 push %ebx 10b41a: 83 ec 3c sub $0x3c,%esp 10b41d: 8b 75 08 mov 0x8(%ebp),%esi 10b420: 8b 5d 10 mov 0x10(%ebp),%ebx 10b423: 8b 7d 18 mov 0x18(%ebp),%edi register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 10b426: 85 f6 test %esi,%esi 10b428: 74 4a je 10b474 return RTEMS_INVALID_NAME; if ( !id ) 10b42a: 85 ff test %edi,%edi 10b42c: 0f 84 f6 00 00 00 je 10b528 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b432: 89 da mov %ebx,%edx 10b434: 81 e2 c0 00 00 00 and $0xc0,%edx 10b43a: 74 48 je 10b484 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b43c: 89 d8 mov %ebx,%eax 10b43e: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b441: 83 f8 10 cmp $0x10,%eax 10b444: 74 0e je 10b454 } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b446: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b44b: 8d 65 f4 lea -0xc(%ebp),%esp 10b44e: 5b pop %ebx 10b44f: 5e pop %esi 10b450: 5f pop %edi 10b451: c9 leave 10b452: c3 ret 10b453: 90 nop <== NOT EXECUTED #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b454: f6 c3 04 test $0x4,%bl 10b457: 74 ed je 10b446 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b459: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b45f: 74 e5 je 10b446 10b461: b9 10 00 00 00 mov $0x10,%ecx _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b466: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b46a: 76 1f jbe 10b48b return RTEMS_INVALID_NUMBER; 10b46c: b8 0a 00 00 00 mov $0xa,%eax 10b471: eb d8 jmp 10b44b 10b473: 90 nop <== NOT EXECUTED CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b474: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b479: 8d 65 f4 lea -0xc(%ebp),%esp 10b47c: 5b pop %ebx 10b47d: 5e pop %esi 10b47e: 5f pop %edi 10b47f: c9 leave 10b480: c3 ret 10b481: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b484: 89 d9 mov %ebx,%ecx 10b486: 83 e1 30 and $0x30,%ecx 10b489: 75 db jne 10b466 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b48b: a1 d4 64 12 00 mov 0x1264d4,%eax 10b490: 40 inc %eax 10b491: a3 d4 64 12 00 mov %eax,0x1264d4 * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 10b496: 83 ec 0c sub $0xc,%esp 10b499: 68 20 64 12 00 push $0x126420 10b49e: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b4a1: e8 ba 14 00 00 call 10c960 <_Objects_Allocate> 10b4a6: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b4a8: 83 c4 10 add $0x10,%esp 10b4ab: 85 c0 test %eax,%eax 10b4ad: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b4b0: 0f 84 ba 00 00 00 je 10b570 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b4b6: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b4b9: 85 c9 test %ecx,%ecx 10b4bb: 74 77 je 10b534 /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 10b4bd: 31 c0 xor %eax,%eax 10b4bf: f6 c3 04 test $0x4,%bl 10b4c2: 0f 95 c0 setne %al 10b4c5: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b4c8: 83 f9 10 cmp $0x10,%ecx 10b4cb: 0f 84 ae 00 00 00 je 10b57f the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10b4d1: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b4d8: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b4dc: 50 push %eax 10b4dd: 31 c0 xor %eax,%eax 10b4df: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b4e3: 0f 94 c0 sete %al 10b4e6: 50 push %eax 10b4e7: 8d 45 d0 lea -0x30(%ebp),%eax 10b4ea: 50 push %eax 10b4eb: 8d 42 14 lea 0x14(%edx),%eax 10b4ee: 50 push %eax 10b4ef: 89 55 c4 mov %edx,-0x3c(%ebp) 10b4f2: e8 59 0c 00 00 call 10c150 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 10b4f7: 83 c4 10 add $0x10,%esp 10b4fa: 83 f8 06 cmp $0x6,%eax 10b4fd: 8b 55 c4 mov -0x3c(%ebp),%edx 10b500: 0f 84 a9 00 00 00 je 10b5af Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b506: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b509: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b50c: 8b 0d 3c 64 12 00 mov 0x12643c,%ecx 10b512: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b515: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b518: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b51a: e8 89 21 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b51f: 31 c0 xor %eax,%eax 10b521: e9 25 ff ff ff jmp 10b44b 10b526: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b528: b8 09 00 00 00 mov $0x9,%eax 10b52d: e9 19 ff ff ff jmp 10b44b 10b532: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b534: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10b53b: 31 c0 xor %eax,%eax 10b53d: f6 c3 04 test $0x4,%bl 10b540: 0f 95 c0 setne %al 10b543: 89 45 e4 mov %eax,-0x1c(%ebp) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b546: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b54d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b554: 51 push %ecx 10b555: ff 75 0c pushl 0xc(%ebp) 10b558: 8d 45 e0 lea -0x20(%ebp),%eax 10b55b: 50 push %eax 10b55c: 8d 42 14 lea 0x14(%edx),%eax 10b55f: 50 push %eax 10b560: 89 55 c4 mov %edx,-0x3c(%ebp) 10b563: e8 78 0e 00 00 call 10c3e0 <_CORE_semaphore_Initialize> 10b568: 83 c4 10 add $0x10,%esp 10b56b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b56e: eb 96 jmp 10b506 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b570: e8 33 21 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b575: b8 05 00 00 00 mov $0x5,%eax 10b57a: e9 cc fe ff ff jmp 10b44b the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 10b57f: 8b 45 14 mov 0x14(%ebp),%eax 10b582: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b585: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b58c: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b590: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b594: 0f 85 42 ff ff ff jne 10b4dc if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b59a: f6 c3 40 test $0x40,%bl 10b59d: 74 30 je 10b5cf the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b59f: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5a6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5aa: e9 2d ff ff ff jmp 10b4dc */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b5af: 83 ec 08 sub $0x8,%esp 10b5b2: 52 push %edx 10b5b3: 68 20 64 12 00 push $0x126420 10b5b8: e8 1b 17 00 00 call 10ccd8 <_Objects_Free> (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10b5bd: e8 e6 20 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b5c2: 83 c4 10 add $0x10,%esp 10b5c5: b8 13 00 00 00 mov $0x13,%eax 10b5ca: e9 7c fe ff ff jmp 10b44b if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10b5cf: 81 e3 80 00 00 00 and $0x80,%ebx 10b5d5: 0f 84 01 ff ff ff je 10b4dc the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b5db: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5e2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5e6: e9 f1 fe ff ff jmp 10b4dc =============================================================================== 0010b5ec : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b5ec: 55 push %ebp 10b5ed: 89 e5 mov %esp,%ebp 10b5ef: 53 push %ebx 10b5f0: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b5f3: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b5f6: 50 push %eax 10b5f7: ff 75 08 pushl 0x8(%ebp) 10b5fa: 68 20 64 12 00 push $0x126420 10b5ff: e8 14 18 00 00 call 10ce18 <_Objects_Get> 10b604: 89 c3 mov %eax,%ebx switch ( location ) { 10b606: 83 c4 10 add $0x10,%esp 10b609: 8b 4d f4 mov -0xc(%ebp),%ecx 10b60c: 85 c9 test %ecx,%ecx 10b60e: 74 0c je 10b61c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b610: b8 04 00 00 00 mov $0x4,%eax } 10b615: 8b 5d fc mov -0x4(%ebp),%ebx 10b618: c9 leave 10b619: c3 ret 10b61a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10b61c: 8b 40 10 mov 0x10(%eax),%eax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b61f: 83 e0 30 and $0x30,%eax 10b622: 74 58 je 10b67c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b624: 8b 53 64 mov 0x64(%ebx),%edx 10b627: 85 d2 test %edx,%edx 10b629: 75 15 jne 10b640 10b62b: 83 f8 20 cmp $0x20,%eax 10b62e: 74 10 je 10b640 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b630: e8 73 20 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b635: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b63a: 8b 5d fc mov -0x4(%ebp),%ebx 10b63d: c9 leave 10b63e: c3 ret 10b63f: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b640: 50 push %eax 10b641: 6a 04 push $0x4 10b643: 6a 00 push $0x0 10b645: 8d 43 14 lea 0x14(%ebx),%eax 10b648: 50 push %eax 10b649: e8 f6 0a 00 00 call 10c144 <_CORE_mutex_Flush> 10b64e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b651: 83 ec 08 sub $0x8,%esp 10b654: 53 push %ebx 10b655: 68 20 64 12 00 push $0x126420 10b65a: e8 7d 13 00 00 call 10c9dc <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b65f: 58 pop %eax 10b660: 5a pop %edx 10b661: 53 push %ebx 10b662: 68 20 64 12 00 push $0x126420 10b667: e8 6c 16 00 00 call 10ccd8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b66c: e8 37 20 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b671: 83 c4 10 add $0x10,%esp 10b674: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b676: 8b 5d fc mov -0x4(%ebp),%ebx 10b679: c9 leave 10b67a: c3 ret 10b67b: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b67c: 51 push %ecx 10b67d: 6a 02 push $0x2 10b67f: 6a 00 push $0x0 10b681: 8d 43 14 lea 0x14(%ebx),%eax 10b684: 50 push %eax 10b685: e8 4a 0d 00 00 call 10c3d4 <_CORE_semaphore_Flush> 10b68a: 83 c4 10 add $0x10,%esp 10b68d: eb c2 jmp 10b651 =============================================================================== 0010b690 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b690: 55 push %ebp 10b691: 89 e5 mov %esp,%ebp 10b693: 57 push %edi 10b694: 56 push %esi 10b695: 53 push %ebx 10b696: 83 ec 1c sub $0x1c,%esp 10b699: 8b 5d 08 mov 0x8(%ebp),%ebx 10b69c: 8b 75 0c mov 0xc(%ebp),%esi 10b69f: 8b 7d 10 mov 0x10(%ebp),%edi register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); 10b6a2: 8d 45 e0 lea -0x20(%ebp),%eax Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level ); 10b6a5: 50 push %eax 10b6a6: 8d 45 e4 lea -0x1c(%ebp),%eax 10b6a9: 50 push %eax 10b6aa: 53 push %ebx 10b6ab: 68 20 64 12 00 push $0x126420 10b6b0: e8 0b 17 00 00 call 10cdc0 <_Objects_Get_isr_disable> switch ( location ) { 10b6b5: 83 c4 10 add $0x10,%esp 10b6b8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b6bb: 85 c9 test %ecx,%ecx 10b6bd: 74 0d je 10b6cc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b6bf: b8 04 00 00 00 mov $0x4,%eax } 10b6c4: 8d 65 f4 lea -0xc(%ebp),%esp 10b6c7: 5b pop %ebx 10b6c8: 5e pop %esi 10b6c9: 5f pop %edi 10b6ca: c9 leave 10b6cb: c3 ret the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b6cc: f6 40 10 30 testb $0x30,0x10(%eax) 10b6d0: 74 36 je 10b708 _CORE_mutex_Seize( 10b6d2: 83 ec 0c sub $0xc,%esp 10b6d5: ff 75 e0 pushl -0x20(%ebp) 10b6d8: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b6d9: 83 e6 01 and $0x1,%esi 10b6dc: 83 f6 01 xor $0x1,%esi 10b6df: 56 push %esi 10b6e0: 53 push %ebx 10b6e1: 83 c0 14 add $0x14,%eax 10b6e4: 50 push %eax 10b6e5: e8 5e 0b 00 00 call 10c248 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b6ea: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b6ed: a1 98 6a 12 00 mov 0x126a98,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b6f2: ff 70 34 pushl 0x34(%eax) 10b6f5: e8 12 01 00 00 call 10b80c <_Semaphore_Translate_core_mutex_return_code> 10b6fa: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b6fd: 8d 65 f4 lea -0xc(%ebp),%esp 10b700: 5b pop %ebx 10b701: 5e pop %esi 10b702: 5f pop %edi 10b703: c9 leave 10b704: c3 ret 10b705: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b708: 8b 15 98 6a 12 00 mov 0x126a98,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b70e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b715: 8b 48 5c mov 0x5c(%eax),%ecx 10b718: 85 c9 test %ecx,%ecx 10b71a: 75 2c jne 10b748 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b71c: 83 e6 01 and $0x1,%esi 10b71f: 74 33 je 10b754 _ISR_Enable( *level_p ); 10b721: ff 75 e0 pushl -0x20(%ebp) 10b724: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b725: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b72c: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b72f: a1 98 6a 12 00 mov 0x126a98,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b734: ff 70 34 pushl 0x34(%eax) 10b737: e8 e0 00 00 00 call 10b81c <_Semaphore_Translate_core_semaphore_return_code> 10b73c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b73f: 8d 65 f4 lea -0xc(%ebp),%esp 10b742: 5b pop %ebx 10b743: 5e pop %esi 10b744: 5f pop %edi 10b745: c9 leave 10b746: c3 ret 10b747: 90 nop <== NOT EXECUTED /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 10b748: 49 dec %ecx 10b749: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b74c: ff 75 e0 pushl -0x20(%ebp) 10b74f: 9d popf 10b750: eb da jmp 10b72c 10b752: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b754: 8b 0d d4 64 12 00 mov 0x1264d4,%ecx 10b75a: 41 inc %ecx 10b75b: 89 0d d4 64 12 00 mov %ecx,0x1264d4 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b761: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 10b768: 83 c0 14 add $0x14,%eax 10b76b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b76e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b771: ff 75 e0 pushl -0x20(%ebp) 10b774: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b775: 52 push %edx 10b776: 68 e0 de 10 00 push $0x10dee0 10b77b: 57 push %edi 10b77c: 50 push %eax 10b77d: e8 0e 24 00 00 call 10db90 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b782: e8 21 1f 00 00 call 10d6a8 <_Thread_Enable_dispatch> 10b787: 83 c4 10 add $0x10,%esp 10b78a: eb a0 jmp 10b72c =============================================================================== 0010b78c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b78c: 55 push %ebp 10b78d: 89 e5 mov %esp,%ebp 10b78f: 53 push %ebx 10b790: 83 ec 18 sub $0x18,%esp 10b793: 8b 5d 08 mov 0x8(%ebp),%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); 10b796: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b799: 50 push %eax 10b79a: 53 push %ebx 10b79b: 68 20 64 12 00 push $0x126420 10b7a0: e8 73 16 00 00 call 10ce18 <_Objects_Get> switch ( location ) { 10b7a5: 83 c4 10 add $0x10,%esp 10b7a8: 8b 55 f4 mov -0xc(%ebp),%edx 10b7ab: 85 d2 test %edx,%edx 10b7ad: 74 0d je 10b7bc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b7af: b8 04 00 00 00 mov $0x4,%eax } 10b7b4: 8b 5d fc mov -0x4(%ebp),%ebx 10b7b7: c9 leave 10b7b8: c3 ret 10b7b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b7bc: f6 40 10 30 testb $0x30,0x10(%eax) 10b7c0: 75 26 jne 10b7e8 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b7c2: 52 push %edx 10b7c3: 6a 00 push $0x0 10b7c5: 53 push %ebx 10b7c6: 83 c0 14 add $0x14,%eax 10b7c9: 50 push %eax 10b7ca: e8 51 0c 00 00 call 10c420 <_CORE_semaphore_Surrender> 10b7cf: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7d1: e8 d2 1e 00 00 call 10d6a8 <_Thread_Enable_dispatch> return 10b7d6: 89 1c 24 mov %ebx,(%esp) 10b7d9: e8 3e 00 00 00 call 10b81c <_Semaphore_Translate_core_semaphore_return_code> 10b7de: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7e1: 8b 5d fc mov -0x4(%ebp),%ebx 10b7e4: c9 leave 10b7e5: c3 ret 10b7e6: 66 90 xchg %ax,%ax <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( 10b7e8: 51 push %ecx 10b7e9: 6a 00 push $0x0 10b7eb: 53 push %ebx 10b7ec: 83 c0 14 add $0x14,%eax 10b7ef: 50 push %eax 10b7f0: e8 f3 0a 00 00 call 10c2e8 <_CORE_mutex_Surrender> 10b7f5: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7f7: e8 ac 1e 00 00 call 10d6a8 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b7fc: 89 1c 24 mov %ebx,(%esp) 10b7ff: e8 08 00 00 00 call 10b80c <_Semaphore_Translate_core_mutex_return_code> 10b804: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b807: 8b 5d fc mov -0x4(%ebp),%ebx 10b80a: c9 leave 10b80b: c3 ret =============================================================================== 0011ea50 : */ void rtems_shutdown_executive( uint32_t result ) { 11ea50: 55 push %ebp 11ea51: 89 e5 mov %esp,%ebp 11ea53: 83 ec 08 sub $0x8,%esp if ( _System_state_Is_up( _System_state_Get() ) ) { 11ea56: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 11ea5d: 74 0d je 11ea6c _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } _Internal_error_Occurred( 11ea5f: 50 push %eax 11ea60: 6a 14 push $0x14 11ea62: 6a 01 push $0x1 11ea64: 6a 00 push $0x0 11ea66: e8 65 de fe ff call 10c8d0 <_Internal_error_Occurred> 11ea6b: 90 nop <== NOT EXECUTED 11ea6c: c7 05 80 66 12 00 04 movl $0x4,0x126680 11ea73: 00 00 00 * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 11ea76: 83 ec 0c sub $0xc,%esp 11ea79: 68 bc 64 12 00 push $0x1264bc 11ea7e: e8 9a fe fe ff call 10e91d <_CPU_Context_restore> =============================================================================== 0010c7a4 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c7a4: 55 push %ebp 10c7a5: 89 e5 mov %esp,%ebp 10c7a7: 83 ec 08 sub $0x8,%esp 10c7aa: 8b 55 08 mov 0x8(%ebp),%edx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 10c7ad: a1 78 a5 12 00 mov 0x12a578,%eax 10c7b2: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c7b8: 8b 0d b4 9f 12 00 mov 0x129fb4,%ecx 10c7be: 41 inc %ecx 10c7bf: 89 0d b4 9f 12 00 mov %ecx,0x129fb4 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c7c5: 85 d2 test %edx,%edx 10c7c7: 74 13 je 10c7dc asr->mode_set = mode_set; 10c7c9: 8b 4d 0c mov 0xc(%ebp),%ecx 10c7cc: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c7cf: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c7d2: e8 2d 22 00 00 call 10ea04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c7d7: 31 c0 xor %eax,%eax 10c7d9: c9 leave 10c7da: c3 ret 10c7db: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c7dc: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c7e0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c7e7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c7ee: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c7f5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c7fc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c803: e8 fc 21 00 00 call 10ea04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c808: 31 c0 xor %eax,%eax 10c80a: c9 leave 10c80b: c3 ret =============================================================================== 00117d3c : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117d3c: 55 push %ebp 117d3d: 89 e5 mov %esp,%ebp 117d3f: 53 push %ebx 117d40: 83 ec 14 sub $0x14,%esp 117d43: 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 ) 117d46: 85 db test %ebx,%ebx 117d48: 75 0a jne 117d54 return RTEMS_INVALID_NUMBER; 117d4a: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d4f: 8b 5d fc mov -0x4(%ebp),%ebx 117d52: c9 leave 117d53: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117d54: 83 ec 08 sub $0x8,%esp 117d57: 8d 45 f4 lea -0xc(%ebp),%eax 117d5a: 50 push %eax 117d5b: ff 75 08 pushl 0x8(%ebp) 117d5e: e8 d1 3d 00 00 call 11bb34 <_Thread_Get> switch ( location ) { 117d63: 83 c4 10 add $0x10,%esp 117d66: 8b 55 f4 mov -0xc(%ebp),%edx 117d69: 85 d2 test %edx,%edx 117d6b: 74 0b je 117d78 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117d6d: b8 04 00 00 00 mov $0x4,%eax } 117d72: 8b 5d fc mov -0x4(%ebp),%ebx 117d75: c9 leave 117d76: c3 ret 117d77: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117d78: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117d7e: 8b 4a 0c mov 0xc(%edx),%ecx 117d81: 85 c9 test %ecx,%ecx 117d83: 74 3f je 117dc4 if ( asr->is_enabled ) { 117d85: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117d89: 74 25 je 117db0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117d8b: 9c pushf 117d8c: fa cli 117d8d: 59 pop %ecx *signal_set |= signals; 117d8e: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117d91: 51 push %ecx 117d92: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117d93: 8b 15 d4 26 14 00 mov 0x1426d4,%edx 117d99: 85 d2 test %edx,%edx 117d9b: 74 1b je 117db8 117d9d: 3b 05 d8 26 14 00 cmp 0x1426d8,%eax 117da3: 75 13 jne 117db8 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 117da5: c6 05 e4 26 14 00 01 movb $0x1,0x1426e4 117dac: eb 0a jmp 117db8 117dae: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117db0: 9c pushf 117db1: fa cli 117db2: 58 pop %eax *signal_set |= signals; 117db3: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117db6: 50 push %eax 117db7: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117db8: e8 53 3d 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117dbd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117dbf: 8b 5d fc mov -0x4(%ebp),%ebx 117dc2: c9 leave 117dc3: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117dc4: e8 47 3d 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117dc9: b8 0b 00 00 00 mov $0xb,%eax 117dce: e9 7c ff ff ff jmp 117d4f =============================================================================== 0010b82c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b82c: 55 push %ebp 10b82d: 89 e5 mov %esp,%ebp 10b82f: 57 push %edi 10b830: 56 push %esi 10b831: 53 push %ebx 10b832: 83 ec 1c sub $0x1c,%esp 10b835: 8b 5d 08 mov 0x8(%ebp),%ebx 10b838: 8b 7d 0c mov 0xc(%ebp),%edi 10b83b: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b83e: 85 f6 test %esi,%esi 10b840: 0f 84 3e 01 00 00 je 10b984 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b846: 85 db test %ebx,%ebx 10b848: 0f 84 d2 00 00 00 je 10b920 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b84e: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b855: 75 17 jne 10b86e */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b857: 85 ff test %edi,%edi 10b859: 0f 84 b1 00 00 00 je 10b910 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b85f: 0f b6 05 14 22 12 00 movzbl 0x122214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b866: 39 c7 cmp %eax,%edi 10b868: 0f 87 a2 00 00 00 ja 10b910 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b86e: 83 ec 0c sub $0xc,%esp 10b871: ff 35 84 65 12 00 pushl 0x126584 10b877: e8 b8 06 00 00 call 10bf34 <_API_Mutex_Lock> * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 10b87c: c7 04 24 60 64 12 00 movl $0x126460,(%esp) 10b883: e8 d8 10 00 00 call 10c960 <_Objects_Allocate> 10b888: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b88a: 83 c4 10 add $0x10,%esp 10b88d: 85 c0 test %eax,%eax 10b88f: 0f 84 cf 00 00 00 je 10b964 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b895: 50 push %eax 10b896: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b897: 8b 45 14 mov 0x14(%ebp),%eax 10b89a: 83 e0 01 and $0x1,%eax 10b89d: 50 push %eax 10b89e: 6a 00 push $0x0 10b8a0: 31 c0 xor %eax,%eax 10b8a2: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b8a9: 0f 95 c0 setne %al 10b8ac: 50 push %eax 10b8ad: 31 c0 xor %eax,%eax 10b8af: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b8b6: 0f 94 c0 sete %al 10b8b9: 50 push %eax 10b8ba: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b8bb: 8b 45 18 mov 0x18(%ebp),%eax 10b8be: 83 e0 01 and $0x1,%eax 10b8c1: 50 push %eax 10b8c2: ff 75 10 pushl 0x10(%ebp) 10b8c5: 6a 00 push $0x0 10b8c7: 52 push %edx 10b8c8: 68 60 64 12 00 push $0x126460 10b8cd: 89 55 e4 mov %edx,-0x1c(%ebp) 10b8d0: e8 6b 1e 00 00 call 10d740 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b8d5: 83 c4 30 add $0x30,%esp 10b8d8: 84 c0 test %al,%al 10b8da: 8b 55 e4 mov -0x1c(%ebp),%edx 10b8dd: 74 51 je 10b930 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b8df: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax * id - thread id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_task_create( 10b8e5: f7 45 14 00 04 00 00 testl $0x400,0x14(%ebp) } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b8ec: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b8f0: 8b 42 08 mov 0x8(%edx),%eax 10b8f3: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b8f5: 83 ec 0c sub $0xc,%esp 10b8f8: ff 35 84 65 12 00 pushl 0x126584 10b8fe: e8 79 06 00 00 call 10bf7c <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b903: 83 c4 10 add $0x10,%esp 10b906: 31 c0 xor %eax,%eax } 10b908: 8d 65 f4 lea -0xc(%ebp),%esp 10b90b: 5b pop %ebx 10b90c: 5e pop %esi 10b90d: 5f pop %edi 10b90e: c9 leave 10b90f: c3 ret * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) return RTEMS_INVALID_PRIORITY; 10b910: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b915: 8d 65 f4 lea -0xc(%ebp),%esp 10b918: 5b pop %ebx 10b919: 5e pop %esi 10b91a: 5f pop %edi 10b91b: c9 leave 10b91c: c3 ret 10b91d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b920: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b925: 8d 65 f4 lea -0xc(%ebp),%esp 10b928: 5b pop %ebx 10b929: 5e pop %esi 10b92a: 5f pop %edi 10b92b: c9 leave 10b92c: c3 ret 10b92d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b930: 83 ec 0c sub $0xc,%esp 10b933: ff 72 08 pushl 0x8(%edx) 10b936: e8 0d 14 00 00 call 10cd48 <_Objects_Get_information_id> 10b93b: 5a pop %edx 10b93c: 59 pop %ecx 10b93d: 8b 55 e4 mov -0x1c(%ebp),%edx 10b940: 52 push %edx 10b941: 50 push %eax 10b942: e8 91 13 00 00 call 10ccd8 <_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(); 10b947: 58 pop %eax 10b948: ff 35 84 65 12 00 pushl 0x126584 10b94e: e8 29 06 00 00 call 10bf7c <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b953: 83 c4 10 add $0x10,%esp 10b956: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b95b: 8d 65 f4 lea -0xc(%ebp),%esp 10b95e: 5b pop %ebx 10b95f: 5e pop %esi 10b960: 5f pop %edi 10b961: c9 leave 10b962: c3 ret 10b963: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b964: 83 ec 0c sub $0xc,%esp 10b967: ff 35 84 65 12 00 pushl 0x126584 10b96d: e8 0a 06 00 00 call 10bf7c <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10b972: 83 c4 10 add $0x10,%esp 10b975: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b97a: 8d 65 f4 lea -0xc(%ebp),%esp 10b97d: 5b pop %ebx 10b97e: 5e pop %esi 10b97f: 5f pop %edi 10b980: c9 leave 10b981: c3 ret 10b982: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b984: b8 09 00 00 00 mov $0x9,%eax 10b989: eb 8a jmp 10b915 =============================================================================== 0010b98c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b98c: 55 push %ebp 10b98d: 89 e5 mov %esp,%ebp 10b98f: 53 push %ebx 10b990: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b993: ff 35 84 65 12 00 pushl 0x126584 10b999: e8 96 05 00 00 call 10bf34 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10b99e: 5a pop %edx 10b99f: 59 pop %ecx 10b9a0: 8d 45 f4 lea -0xc(%ebp),%eax 10b9a3: 50 push %eax 10b9a4: ff 75 08 pushl 0x8(%ebp) 10b9a7: e8 20 1d 00 00 call 10d6cc <_Thread_Get> 10b9ac: 89 c3 mov %eax,%ebx switch ( location ) { 10b9ae: 83 c4 10 add $0x10,%esp 10b9b1: 8b 45 f4 mov -0xc(%ebp),%eax 10b9b4: 85 c0 test %eax,%eax 10b9b6: 75 44 jne 10b9fc case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b9b8: 83 ec 0c sub $0xc,%esp 10b9bb: ff 73 08 pushl 0x8(%ebx) 10b9be: e8 85 13 00 00 call 10cd48 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b9c3: 5a pop %edx 10b9c4: 59 pop %ecx 10b9c5: 53 push %ebx 10b9c6: 50 push %eax 10b9c7: e8 ac 19 00 00 call 10d378 <_Thread_Close> 10b9cc: 58 pop %eax 10b9cd: ff 73 08 pushl 0x8(%ebx) 10b9d0: e8 73 13 00 00 call 10cd48 <_Objects_Get_information_id> 10b9d5: 5a pop %edx 10b9d6: 59 pop %ecx 10b9d7: 53 push %ebx 10b9d8: 50 push %eax 10b9d9: e8 fa 12 00 00 call 10ccd8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b9de: 58 pop %eax 10b9df: ff 35 84 65 12 00 pushl 0x126584 10b9e5: e8 92 05 00 00 call 10bf7c <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10b9ea: e8 b9 1c 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b9ef: 83 c4 10 add $0x10,%esp 10b9f2: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b9f4: 8b 5d fc mov -0x4(%ebp),%ebx 10b9f7: c9 leave 10b9f8: c3 ret 10b9f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b9fc: 83 ec 0c sub $0xc,%esp 10b9ff: ff 35 84 65 12 00 pushl 0x126584 10ba05: e8 72 05 00 00 call 10bf7c <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10ba0a: 83 c4 10 add $0x10,%esp 10ba0d: b8 04 00 00 00 mov $0x4,%eax } 10ba12: 8b 5d fc mov -0x4(%ebp),%ebx 10ba15: c9 leave 10ba16: c3 ret =============================================================================== 0010d4b0 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d4b0: 55 push %ebp 10d4b1: 89 e5 mov %esp,%ebp 10d4b3: 56 push %esi 10d4b4: 53 push %ebx 10d4b5: 83 ec 10 sub $0x10,%esp 10d4b8: 8b 45 08 mov 0x8(%ebp),%eax 10d4bb: 8b 75 0c mov 0xc(%ebp),%esi 10d4be: 8b 5d 10 mov 0x10(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d4c1: 80 3d e4 61 12 00 00 cmpb $0x0,0x1261e4 10d4c8: 74 6e je 10d538 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d4ca: 85 db test %ebx,%ebx 10d4cc: 74 7e je 10d54c <== 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 ) 10d4ce: 83 fe 0f cmp $0xf,%esi 10d4d1: 77 3d ja 10d510 <== NEVER TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4d3: 85 c0 test %eax,%eax 10d4d5: 74 45 je 10d51c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d4d7: 8b 15 d8 ad 12 00 mov 0x12add8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4dd: 3b 42 08 cmp 0x8(%edx),%eax 10d4e0: 74 40 je 10d522 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d4e2: 83 ec 08 sub $0x8,%esp 10d4e5: 8d 55 f4 lea -0xc(%ebp),%edx 10d4e8: 52 push %edx 10d4e9: 50 push %eax 10d4ea: e8 11 20 00 00 call 10f500 <_Thread_Get> switch ( location ) { 10d4ef: 83 c4 10 add $0x10,%esp 10d4f2: 8b 55 f4 mov -0xc(%ebp),%edx 10d4f5: 85 d2 test %edx,%edx 10d4f7: 75 4b jne 10d544 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d4f9: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d4ff: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d503: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d505: e8 d2 1f 00 00 call 10f4dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d50a: 31 c0 xor %eax,%eax 10d50c: eb 07 jmp 10d515 10d50e: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) return RTEMS_INVALID_NUMBER; 10d510: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d515: 8d 65 f8 lea -0x8(%ebp),%esp 10d518: 5b pop %ebx 10d519: 5e pop %esi 10d51a: c9 leave 10d51b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d51c: 8b 15 d8 ad 12 00 mov 0x12add8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d522: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d528: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d52c: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d52e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d530: 8d 65 f8 lea -0x8(%ebp),%esp 10d533: 5b pop %ebx 10d534: 5e pop %esi 10d535: c9 leave 10d536: c3 ret 10d537: 90 nop <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d538: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d53d: 8d 65 f8 lea -0x8(%ebp),%esp 10d540: 5b pop %ebx 10d541: 5e pop %esi 10d542: c9 leave 10d543: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d544: b8 04 00 00 00 mov $0x4,%eax 10d549: eb ca jmp 10d515 10d54b: 90 nop <== NOT EXECUTED if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d54c: b8 09 00 00 00 mov $0x9,%eax 10d551: eb c2 jmp 10d515 =============================================================================== 0010ba18 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 83 ec 08 sub $0x8,%esp 10ba1e: 8b 55 08 mov 0x8(%ebp),%edx 10ba21: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10ba24: 85 c0 test %eax,%eax 10ba26: 74 30 je 10ba58 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10ba28: 85 d2 test %edx,%edx 10ba2a: 75 10 jne 10ba3c *id = _Thread_Executing->Object.id; 10ba2c: 8b 15 98 6a 12 00 mov 0x126a98,%edx 10ba32: 8b 52 08 mov 0x8(%edx),%edx 10ba35: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10ba37: 31 c0 xor %eax,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10ba39: c9 leave 10ba3a: c3 ret 10ba3b: 90 nop <== NOT EXECUTED if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10ba3c: 50 push %eax 10ba3d: ff 75 0c pushl 0xc(%ebp) 10ba40: 52 push %edx 10ba41: 68 60 64 12 00 push $0x126460 10ba46: e8 51 15 00 00 call 10cf9c <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10ba4b: 8b 04 85 cc 0b 12 00 mov 0x120bcc(,%eax,4),%eax 10ba52: 83 c4 10 add $0x10,%esp } 10ba55: c9 leave 10ba56: c3 ret 10ba57: 90 nop <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ba58: b8 09 00 00 00 mov $0x9,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10ba5d: c9 leave 10ba5e: c3 ret =============================================================================== 00118120 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118120: 55 push %ebp 118121: 89 e5 mov %esp,%ebp 118123: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118126: 8d 45 f4 lea -0xc(%ebp),%eax 118129: 50 push %eax 11812a: ff 75 08 pushl 0x8(%ebp) 11812d: e8 02 3a 00 00 call 11bb34 <_Thread_Get> switch ( location ) { 118132: 83 c4 10 add $0x10,%esp 118135: 8b 55 f4 mov -0xc(%ebp),%edx 118138: 85 d2 test %edx,%edx 11813a: 74 08 je 118144 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11813c: b8 04 00 00 00 mov $0x4,%eax } 118141: c9 leave 118142: c3 ret 118143: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118144: f6 40 10 02 testb $0x2,0x10(%eax) 118148: 74 0e je 118158 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11814a: e8 c1 39 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11814f: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118154: c9 leave 118155: c3 ret 118156: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 118158: e8 b3 39 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11815d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11815f: c9 leave 118160: c3 ret =============================================================================== 00112e18 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 112e18: 55 push %ebp 112e19: 89 e5 mov %esp,%ebp 112e1b: 57 push %edi 112e1c: 56 push %esi 112e1d: 53 push %ebx 112e1e: 83 ec 1c sub $0x1c,%esp 112e21: 8b 4d 10 mov 0x10(%ebp),%ecx ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 112e24: 85 c9 test %ecx,%ecx 112e26: 0f 84 40 01 00 00 je 112f6c return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 112e2c: 8b 1d 98 6a 12 00 mov 0x126a98,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 112e32: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 112e38: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 112e3c: 19 f6 sbb %esi,%esi 112e3e: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 112e44: 8b 53 7c mov 0x7c(%ebx),%edx 112e47: 85 d2 test %edx,%edx 112e49: 0f 85 f1 00 00 00 jne 112f40 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 112e4f: 80 7f 08 01 cmpb $0x1,0x8(%edi) 112e53: 19 d2 sbb %edx,%edx 112e55: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 112e5b: 89 55 e4 mov %edx,-0x1c(%ebp) 112e5e: 89 4d e0 mov %ecx,-0x20(%ebp) 112e61: e8 26 be ff ff call 10ec8c <_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; 112e66: 8b 55 e4 mov -0x1c(%ebp),%edx 112e69: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 112e6b: 09 f0 or %esi,%eax 112e6d: 8b 4d e0 mov -0x20(%ebp),%ecx 112e70: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 112e72: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 112e79: 74 0b je 112e86 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 112e7b: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 112e82: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 112e86: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 112e8d: 74 1c je 112eab if ( _Modes_Is_timeslice(mode_set) ) { 112e8f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 112e96: 0f 84 b8 00 00 00 je 112f54 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 112e9c: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 112ea3: a1 a4 64 12 00 mov 0x1264a4,%eax 112ea8: 89 43 78 mov %eax,0x78(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112eab: f6 45 0c 01 testb $0x1,0xc(%ebp) 112eaf: 74 0b je 112ebc */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 112eb1: f6 45 08 01 testb $0x1,0x8(%ebp) 112eb5: 0f 84 91 00 00 00 je 112f4c 112ebb: fa cli * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 112ebc: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 112ec3: 74 3f je 112f04 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 112ec5: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 112ecc: 0f 94 c0 sete %al is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 112ecf: 38 47 08 cmp %al,0x8(%edi) 112ed2: 74 30 je 112f04 asr->is_enabled = is_asr_enabled; 112ed4: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112ed7: 9c pushf 112ed8: fa cli 112ed9: 58 pop %eax _signals = information->signals_pending; 112eda: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 112edd: 8b 4f 14 mov 0x14(%edi),%ecx 112ee0: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 112ee3: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 112ee6: 50 push %eax 112ee7: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 112ee8: 8b 47 14 mov 0x14(%edi),%eax 112eeb: 85 c0 test %eax,%eax 112eed: 0f 95 c0 setne %al needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 112ef0: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 112ef7: 74 16 je 112f0f <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 112ef9: 31 c0 xor %eax,%eax } 112efb: 83 c4 1c add $0x1c,%esp 112efe: 5b pop %ebx 112eff: 5e pop %esi 112f00: 5f pop %edi 112f01: c9 leave 112f02: c3 ret 112f03: 90 nop <== NOT EXECUTED /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 112f04: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 112f06: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 112f0d: 75 ea jne 112ef9 <== NEVER TAKEN bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 112f0f: 8b 15 98 6a 12 00 mov 0x126a98,%edx if ( are_signals_pending || 112f15: 84 c0 test %al,%al 112f17: 75 0e jne 112f27 112f19: 3b 15 9c 6a 12 00 cmp 0x126a9c,%edx 112f1f: 74 d8 je 112ef9 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 112f21: 80 7a 74 00 cmpb $0x0,0x74(%edx) 112f25: 74 d2 je 112ef9 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 112f27: c6 05 a4 6a 12 00 01 movb $0x1,0x126aa4 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 112f2e: e8 fd a5 ff ff call 10d530 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 112f33: 31 c0 xor %eax,%eax } 112f35: 83 c4 1c add $0x1c,%esp 112f38: 5b pop %ebx 112f39: 5e pop %esi 112f3a: 5f pop %edi 112f3b: c9 leave 112f3c: c3 ret 112f3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 112f40: 81 ce 00 02 00 00 or $0x200,%esi 112f46: e9 04 ff ff ff jmp 112e4f 112f4b: 90 nop <== NOT EXECUTED 112f4c: fb sti 112f4d: e9 6a ff ff ff jmp 112ebc 112f52: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 112f54: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112f5b: f6 45 0c 01 testb $0x1,0xc(%ebp) 112f5f: 0f 84 57 ff ff ff je 112ebc 112f65: e9 47 ff ff ff jmp 112eb1 112f6a: 66 90 xchg %ax,%ax <== NOT EXECUTED bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 112f6c: b8 09 00 00 00 mov $0x9,%eax if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 112f71: 83 c4 1c add $0x1c,%esp 112f74: 5b pop %ebx 112f75: 5e pop %esi 112f76: 5f pop %edi 112f77: c9 leave 112f78: c3 ret =============================================================================== 0010c4f4 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c4f4: 55 push %ebp 10c4f5: 89 e5 mov %esp,%ebp 10c4f7: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c4fa: 8d 45 f4 lea -0xc(%ebp),%eax 10c4fd: 50 push %eax 10c4fe: ff 75 08 pushl 0x8(%ebp) 10c501: e8 fe 1c 00 00 call 10e204 <_Thread_Get> switch ( location ) { 10c506: 83 c4 10 add $0x10,%esp 10c509: 8b 4d f4 mov -0xc(%ebp),%ecx 10c50c: 85 c9 test %ecx,%ecx 10c50e: 75 20 jne 10c530 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c510: 52 push %edx 10c511: ff 75 0c pushl 0xc(%ebp) 10c514: 6a 00 push $0x0 10c516: 50 push %eax 10c517: e8 34 25 00 00 call 10ea50 <_Thread_Restart> 10c51c: 83 c4 10 add $0x10,%esp 10c51f: 84 c0 test %al,%al 10c521: 75 15 jne 10c538 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c523: e8 b8 1c 00 00 call 10e1e0 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10c528: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c52d: c9 leave 10c52e: c3 ret 10c52f: 90 nop <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c530: b8 04 00 00 00 mov $0x4,%eax } 10c535: c9 leave 10c536: c3 ret 10c537: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 10c538: e8 a3 1c 00 00 call 10e1e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c53d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c53f: c9 leave 10c540: c3 ret =============================================================================== 0010ec98 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ec98: 55 push %ebp 10ec99: 89 e5 mov %esp,%ebp 10ec9b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ec9e: 8d 45 f4 lea -0xc(%ebp),%eax 10eca1: 50 push %eax 10eca2: ff 75 08 pushl 0x8(%ebp) 10eca5: e8 36 1d 00 00 call 1109e0 <_Thread_Get> switch ( location ) { 10ecaa: 83 c4 10 add $0x10,%esp 10ecad: 8b 55 f4 mov -0xc(%ebp),%edx 10ecb0: 85 d2 test %edx,%edx 10ecb2: 74 08 je 10ecbc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ecb4: b8 04 00 00 00 mov $0x4,%eax } 10ecb9: c9 leave 10ecba: c3 ret 10ecbb: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ecbc: f6 40 10 02 testb $0x2,0x10(%eax) 10ecc0: 75 0e jne 10ecd0 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ecc2: e8 f5 1c 00 00 call 1109bc <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ecc7: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10eccc: c9 leave 10eccd: c3 ret 10ecce: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10ecd0: 83 ec 08 sub $0x8,%esp 10ecd3: 6a 01 push $0x1 10ecd5: 50 push %eax 10ecd6: e8 51 25 00 00 call 11122c <_Thread_Resume> _Thread_Enable_dispatch(); 10ecdb: e8 dc 1c 00 00 call 1109bc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ece0: 83 c4 10 add $0x10,%esp 10ece3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ece5: c9 leave 10ece6: c3 ret =============================================================================== 0010d628 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d628: 55 push %ebp 10d629: 89 e5 mov %esp,%ebp 10d62b: 56 push %esi 10d62c: 53 push %ebx 10d62d: 83 ec 10 sub $0x10,%esp 10d630: 8b 45 08 mov 0x8(%ebp),%eax 10d633: 8b 5d 0c mov 0xc(%ebp),%ebx 10d636: 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() ) 10d639: 80 3d e4 61 12 00 00 cmpb $0x0,0x1261e4 10d640: 74 66 je 10d6a8 /* * 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 ) 10d642: 83 fb 0f cmp $0xf,%ebx 10d645: 77 39 ja 10d680 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d647: 85 c0 test %eax,%eax 10d649: 74 41 je 10d68c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d64b: 8b 15 d8 ad 12 00 mov 0x12add8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d651: 3b 42 08 cmp 0x8(%edx),%eax 10d654: 74 3c je 10d692 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d656: 83 ec 08 sub $0x8,%esp 10d659: 8d 55 f4 lea -0xc(%ebp),%edx 10d65c: 52 push %edx 10d65d: 50 push %eax 10d65e: e8 9d 1e 00 00 call 10f500 <_Thread_Get> switch ( location ) { 10d663: 83 c4 10 add $0x10,%esp 10d666: 8b 55 f4 mov -0xc(%ebp),%edx 10d669: 85 d2 test %edx,%edx 10d66b: 75 47 jne 10d6b4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d66d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d673: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d677: e8 60 1e 00 00 call 10f4dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d67c: 31 c0 xor %eax,%eax 10d67e: eb 05 jmp 10d685 * 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 ) return RTEMS_INVALID_NUMBER; 10d680: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d685: 8d 65 f8 lea -0x8(%ebp),%esp 10d688: 5b pop %ebx 10d689: 5e pop %esi 10d68a: c9 leave 10d68b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d68c: 8b 15 d8 ad 12 00 mov 0x12add8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d692: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d698: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d69c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d69e: 8d 65 f8 lea -0x8(%ebp),%esp 10d6a1: 5b pop %ebx 10d6a2: 5e pop %esi 10d6a3: c9 leave 10d6a4: c3 ret 10d6a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d6a8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d6ad: 8d 65 f8 lea -0x8(%ebp),%esp 10d6b0: 5b pop %ebx 10d6b1: 5e pop %esi 10d6b2: c9 leave 10d6b3: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d6b4: b8 04 00 00 00 mov $0x4,%eax } 10d6b9: 8d 65 f8 lea -0x8(%ebp),%esp 10d6bc: 5b pop %ebx 10d6bd: 5e pop %esi 10d6be: c9 leave 10d6bf: c3 ret =============================================================================== 0010f96c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10f96c: 55 push %ebp 10f96d: 89 e5 mov %esp,%ebp 10f96f: 56 push %esi 10f970: 53 push %ebx 10f971: 83 ec 10 sub $0x10,%esp 10f974: 8b 5d 0c mov 0xc(%ebp),%ebx 10f977: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10f97a: 85 db test %ebx,%ebx 10f97c: 74 0b je 10f989 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10f97e: 0f b6 05 14 62 12 00 movzbl 0x126214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10f985: 39 c3 cmp %eax,%ebx 10f987: 77 5f ja 10f9e8 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10f989: 85 f6 test %esi,%esi 10f98b: 74 67 je 10f9f4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10f98d: 83 ec 08 sub $0x8,%esp 10f990: 8d 45 f4 lea -0xc(%ebp),%eax 10f993: 50 push %eax 10f994: ff 75 08 pushl 0x8(%ebp) 10f997: e8 94 1e 00 00 call 111830 <_Thread_Get> switch ( location ) { 10f99c: 83 c4 10 add $0x10,%esp 10f99f: 8b 55 f4 mov -0xc(%ebp),%edx 10f9a2: 85 d2 test %edx,%edx 10f9a4: 75 36 jne 10f9dc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10f9a6: 8b 50 14 mov 0x14(%eax),%edx 10f9a9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10f9ab: 85 db test %ebx,%ebx 10f9ad: 74 1c je 10f9cb the_thread->real_priority = new_priority; 10f9af: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10f9b2: 8b 48 1c mov 0x1c(%eax),%ecx 10f9b5: 85 c9 test %ecx,%ecx 10f9b7: 74 05 je 10f9be 10f9b9: 3b 58 14 cmp 0x14(%eax),%ebx 10f9bc: 73 0d jae 10f9cb <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10f9be: 52 push %edx 10f9bf: 6a 00 push $0x0 10f9c1: 53 push %ebx 10f9c2: 50 push %eax 10f9c3: e8 40 19 00 00 call 111308 <_Thread_Change_priority> 10f9c8: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10f9cb: e8 3c 1e 00 00 call 11180c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10f9d0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9d2: 8d 65 f8 lea -0x8(%ebp),%esp 10f9d5: 5b pop %ebx 10f9d6: 5e pop %esi 10f9d7: c9 leave 10f9d8: c3 ret 10f9d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10f9dc: b8 04 00 00 00 mov $0x4,%eax } 10f9e1: 8d 65 f8 lea -0x8(%ebp),%esp 10f9e4: 5b pop %ebx 10f9e5: 5e pop %esi 10f9e6: c9 leave 10f9e7: c3 ret register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10f9e8: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9ed: 8d 65 f8 lea -0x8(%ebp),%esp 10f9f0: 5b pop %ebx 10f9f1: 5e pop %esi 10f9f2: c9 leave 10f9f3: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10f9f4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9f9: 8d 65 f8 lea -0x8(%ebp),%esp 10f9fc: 5b pop %ebx 10f9fd: 5e pop %esi 10f9fe: c9 leave 10f9ff: c3 ret =============================================================================== 0010bad4 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10bad4: 55 push %ebp 10bad5: 89 e5 mov %esp,%ebp 10bad7: 53 push %ebx 10bad8: 83 ec 14 sub $0x14,%esp 10badb: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bade: 85 db test %ebx,%ebx 10bae0: 74 4e je 10bb30 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bae2: 83 ec 08 sub $0x8,%esp 10bae5: 8d 45 f4 lea -0xc(%ebp),%eax 10bae8: 50 push %eax 10bae9: ff 75 08 pushl 0x8(%ebp) 10baec: e8 db 1b 00 00 call 10d6cc <_Thread_Get> switch ( location ) { 10baf1: 83 c4 10 add $0x10,%esp 10baf4: 8b 55 f4 mov -0xc(%ebp),%edx 10baf7: 85 d2 test %edx,%edx 10baf9: 75 29 jne 10bb24 case OBJECTS_LOCAL: if ( _Thread_Start( 10bafb: 83 ec 0c sub $0xc,%esp 10bafe: ff 75 10 pushl 0x10(%ebp) 10bb01: 6a 00 push $0x0 10bb03: 53 push %ebx 10bb04: 6a 00 push $0x0 10bb06: 50 push %eax 10bb07: e8 cc 26 00 00 call 10e1d8 <_Thread_Start> 10bb0c: 83 c4 20 add $0x20,%esp 10bb0f: 84 c0 test %al,%al 10bb11: 75 29 jne 10bb3c the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bb13: e8 90 1b 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bb18: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb1d: 8b 5d fc mov -0x4(%ebp),%ebx 10bb20: c9 leave 10bb21: c3 ret 10bb22: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb24: b8 04 00 00 00 mov $0x4,%eax } 10bb29: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2c: c9 leave 10bb2d: c3 ret 10bb2e: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bb30: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb35: 8b 5d fc mov -0x4(%ebp),%ebx 10bb38: c9 leave 10bb39: c3 ret 10bb3a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10bb3c: e8 67 1b 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bb41: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb43: 8b 5d fc mov -0x4(%ebp),%ebx 10bb46: c9 leave 10bb47: c3 ret =============================================================================== 00110e6c : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110e6c: 55 push %ebp 110e6d: 89 e5 mov %esp,%ebp 110e6f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 110e72: 8d 45 f4 lea -0xc(%ebp),%eax 110e75: 50 push %eax 110e76: ff 75 08 pushl 0x8(%ebp) 110e79: e8 4e c8 ff ff call 10d6cc <_Thread_Get> switch ( location ) { 110e7e: 83 c4 10 add $0x10,%esp 110e81: 8b 55 f4 mov -0xc(%ebp),%edx 110e84: 85 d2 test %edx,%edx 110e86: 74 08 je 110e90 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 110e88: b8 04 00 00 00 mov $0x4,%eax } 110e8d: c9 leave 110e8e: c3 ret 110e8f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110e90: f6 40 10 02 testb $0x2,0x10(%eax) 110e94: 74 0e je 110ea4 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 110e96: e8 0d c8 ff ff call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 110e9b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110ea0: c9 leave 110ea1: c3 ret 110ea2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 110ea4: 83 ec 0c sub $0xc,%esp 110ea7: 50 push %eax 110ea8: e8 9b 09 00 00 call 111848 <_Thread_Suspend> _Thread_Enable_dispatch(); 110ead: e8 f6 c7 ff ff call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 110eb2: 83 c4 10 add $0x10,%esp 110eb5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110eb7: c9 leave 110eb8: c3 ret =============================================================================== 0010c618 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c618: 55 push %ebp 10c619: 89 e5 mov %esp,%ebp 10c61b: 57 push %edi 10c61c: 56 push %esi 10c61d: 53 push %ebx 10c61e: 83 ec 1c sub $0x1c,%esp 10c621: 8b 5d 0c mov 0xc(%ebp),%ebx 10c624: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c627: 85 db test %ebx,%ebx 10c629: 0f 84 9d 00 00 00 je 10c6cc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c62f: 83 ec 08 sub $0x8,%esp 10c632: 8d 45 e4 lea -0x1c(%ebp),%eax 10c635: 50 push %eax 10c636: ff 75 08 pushl 0x8(%ebp) 10c639: e8 86 1d 00 00 call 10e3c4 <_Thread_Get> 10c63e: 89 c6 mov %eax,%esi switch (location) { 10c640: 83 c4 10 add $0x10,%esp 10c643: 8b 45 e4 mov -0x1c(%ebp),%eax 10c646: 85 c0 test %eax,%eax 10c648: 74 0e je 10c658 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c64a: b8 04 00 00 00 mov $0x4,%eax } 10c64f: 8d 65 f4 lea -0xc(%ebp),%esp 10c652: 5b pop %ebx 10c653: 5e pop %esi 10c654: 5f pop %edi 10c655: c9 leave 10c656: c3 ret 10c657: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c658: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 10c65e: 85 c0 test %eax,%eax 10c660: 75 44 jne 10c6a6 10c662: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c664: 83 ec 0c sub $0xc,%esp 10c667: 6a 14 push $0x14 10c669: e8 0e 2f 00 00 call 10f57c <_Workspace_Allocate> if (new == NULL) { 10c66e: 83 c4 10 add $0x10,%esp 10c671: 85 c0 test %eax,%eax 10c673: 74 4b je 10c6c0 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c675: 8b 13 mov (%ebx),%edx 10c677: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c67a: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c67d: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c680: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 10c686: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c688: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 10c68e: e8 0d 1d 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c693: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c695: 8d 65 f4 lea -0xc(%ebp),%esp 10c698: 5b pop %ebx 10c699: 5e pop %esi 10c69a: 5f pop %edi 10c69b: c9 leave 10c69c: c3 ret 10c69d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c6a0: 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) { 10c6a2: 85 c0 test %eax,%eax 10c6a4: 74 be je 10c664 if (tvp->ptr == ptr) { 10c6a6: 39 58 04 cmp %ebx,0x4(%eax) 10c6a9: 75 f5 jne 10c6a0 tvp->dtor = dtor; 10c6ab: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c6ae: e8 ed 1c 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c6b3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6b5: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b8: 5b pop %ebx 10c6b9: 5e pop %esi 10c6ba: 5f pop %edi 10c6bb: c9 leave 10c6bc: c3 ret 10c6bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 10c6c0: e8 db 1c 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c6c5: b8 1a 00 00 00 mov $0x1a,%eax 10c6ca: eb 83 jmp 10c64f Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c6cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c6d4: 5b pop %ebx 10c6d5: 5e pop %esi 10c6d6: 5f pop %edi 10c6d7: c9 leave 10c6d8: c3 ret =============================================================================== 0010c6dc : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c6dc: 55 push %ebp 10c6dd: 89 e5 mov %esp,%ebp 10c6df: 53 push %ebx 10c6e0: 83 ec 14 sub $0x14,%esp 10c6e3: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c6e6: 85 db test %ebx,%ebx 10c6e8: 74 76 je 10c760 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c6ea: 83 ec 08 sub $0x8,%esp 10c6ed: 8d 45 f4 lea -0xc(%ebp),%eax 10c6f0: 50 push %eax 10c6f1: ff 75 08 pushl 0x8(%ebp) 10c6f4: e8 cb 1c 00 00 call 10e3c4 <_Thread_Get> switch (location) { 10c6f9: 83 c4 10 add $0x10,%esp 10c6fc: 8b 55 f4 mov -0xc(%ebp),%edx 10c6ff: 85 d2 test %edx,%edx 10c701: 74 0d je 10c710 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c703: b8 04 00 00 00 mov $0x4,%eax } 10c708: 8b 5d fc mov -0x4(%ebp),%ebx 10c70b: c9 leave 10c70c: c3 ret 10c70d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10c710: 8b 88 00 01 00 00 mov 0x100(%eax),%ecx while (tvp) { 10c716: 85 c9 test %ecx,%ecx 10c718: 74 17 je 10c731 if (tvp->ptr == ptr) { 10c71a: 39 59 04 cmp %ebx,0x4(%ecx) 10c71d: 75 0c jne 10c72b 10c71f: eb 49 jmp 10c76a 10c721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c724: 39 5a 04 cmp %ebx,0x4(%edx) 10c727: 74 17 je 10c740 10c729: 89 d1 mov %edx,%ecx _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10c72b: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c72d: 85 d2 test %edx,%edx 10c72f: 75 f3 jne 10c724 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c731: e8 6a 1c 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c736: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c73b: 8b 5d fc mov -0x4(%ebp),%ebx 10c73e: c9 leave 10c73f: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c740: 8b 1a mov (%edx),%ebx 10c742: 89 19 mov %ebx,(%ecx) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 10c744: 83 ec 08 sub $0x8,%esp 10c747: 52 push %edx 10c748: 50 push %eax 10c749: e8 b2 00 00 00 call 10c800 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c74e: e8 4d 1c 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c753: 83 c4 10 add $0x10,%esp 10c756: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c758: 8b 5d fc mov -0x4(%ebp),%ebx 10c75b: c9 leave 10c75c: c3 ret 10c75d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c760: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c765: 8b 5d fc mov -0x4(%ebp),%ebx 10c768: c9 leave 10c769: c3 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 10c76a: 8b 11 mov (%ecx),%edx 10c76c: 89 90 00 01 00 00 mov %edx,0x100(%eax) 10c772: 89 ca mov %ecx,%edx 10c774: eb ce jmp 10c744 =============================================================================== 0010c778 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c778: 55 push %ebp 10c779: 89 e5 mov %esp,%ebp 10c77b: 56 push %esi 10c77c: 53 push %ebx 10c77d: 83 ec 10 sub $0x10,%esp 10c780: 8b 5d 0c mov 0xc(%ebp),%ebx 10c783: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c786: 85 db test %ebx,%ebx 10c788: 74 56 je 10c7e0 return RTEMS_INVALID_ADDRESS; if ( !result ) 10c78a: 85 f6 test %esi,%esi 10c78c: 74 52 je 10c7e0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c78e: 83 ec 08 sub $0x8,%esp 10c791: 8d 45 f4 lea -0xc(%ebp),%eax 10c794: 50 push %eax 10c795: ff 75 08 pushl 0x8(%ebp) 10c798: e8 27 1c 00 00 call 10e3c4 <_Thread_Get> switch (location) { 10c79d: 83 c4 10 add $0x10,%esp 10c7a0: 8b 55 f4 mov -0xc(%ebp),%edx 10c7a3: 85 d2 test %edx,%edx 10c7a5: 75 2d jne 10c7d4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c7a7: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10c7ad: 85 c0 test %eax,%eax 10c7af: 75 09 jne 10c7ba 10c7b1: eb 39 jmp 10c7ec 10c7b3: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c7b4: 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) { 10c7b6: 85 c0 test %eax,%eax 10c7b8: 74 32 je 10c7ec <== NEVER TAKEN if (tvp->ptr == ptr) { 10c7ba: 39 58 04 cmp %ebx,0x4(%eax) 10c7bd: 75 f5 jne 10c7b4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c7bf: 8b 40 0c mov 0xc(%eax),%eax 10c7c2: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c7c4: e8 d7 1b 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c7c9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7cb: 8d 65 f8 lea -0x8(%ebp),%esp 10c7ce: 5b pop %ebx 10c7cf: 5e pop %esi 10c7d0: c9 leave 10c7d1: c3 ret 10c7d2: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c7d4: b8 04 00 00 00 mov $0x4,%eax } 10c7d9: 8d 65 f8 lea -0x8(%ebp),%esp 10c7dc: 5b pop %ebx 10c7dd: 5e pop %esi 10c7de: c9 leave 10c7df: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c7e0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7e5: 8d 65 f8 lea -0x8(%ebp),%esp 10c7e8: 5b pop %ebx 10c7e9: 5e pop %esi 10c7ea: c9 leave 10c7eb: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c7ec: e8 af 1b 00 00 call 10e3a0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c7f1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7f6: 8d 65 f8 lea -0x8(%ebp),%esp 10c7f9: 5b pop %ebx 10c7fa: 5e pop %esi 10c7fb: c9 leave 10c7fc: c3 ret =============================================================================== 0010bb48 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10bb48: 55 push %ebp 10bb49: 89 e5 mov %esp,%ebp 10bb4b: 53 push %ebx 10bb4c: 83 ec 04 sub $0x4,%esp 10bb4f: 8b 5d 08 mov 0x8(%ebp),%ebx 10bb52: a1 d4 64 12 00 mov 0x1264d4,%eax 10bb57: 40 inc %eax 10bb58: a3 d4 64 12 00 mov %eax,0x1264d4 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10bb5d: 85 db test %ebx,%ebx 10bb5f: 74 53 je 10bbb4 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10bb61: 83 ec 08 sub $0x8,%esp 10bb64: 6a 08 push $0x8 10bb66: ff 35 98 6a 12 00 pushl 0x126a98 10bb6c: e8 13 24 00 00 call 10df84 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bb71: a1 98 6a 12 00 mov 0x126a98,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10bb76: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bb79: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10bb80: c7 40 64 f4 d4 10 00 movl $0x10d4f4,0x64(%eax) the_watchdog->id = id; 10bb87: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10bb8a: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bb91: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bb94: 5a pop %edx 10bb95: 59 pop %ecx &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); 10bb96: 83 c0 48 add $0x48,%eax 10bb99: 50 push %eax 10bb9a: 68 a4 65 12 00 push $0x1265a4 10bb9f: e8 80 2a 00 00 call 10e624 <_Watchdog_Insert> 10bba4: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10bba7: e8 fc 1a 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bbac: 31 c0 xor %eax,%eax 10bbae: 8b 5d fc mov -0x4(%ebp),%ebx 10bbb1: c9 leave 10bbb2: c3 ret 10bbb3: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bbb4: e8 eb 26 00 00 call 10e2a4 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bbb9: e8 ea 1a 00 00 call 10d6a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bbbe: 31 c0 xor %eax,%eax 10bbc0: 8b 5d fc mov -0x4(%ebp),%ebx 10bbc3: c9 leave 10bbc4: c3 ret =============================================================================== 0010c98c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c98c: 55 push %ebp 10c98d: 89 e5 mov %esp,%ebp 10c98f: 53 push %ebx 10c990: 83 ec 14 sub $0x14,%esp 10c993: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c996: 80 3d 68 a1 12 00 00 cmpb $0x0,0x12a168 10c99d: 0f 84 a9 00 00 00 je 10ca4c return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c9a3: 85 db test %ebx,%ebx 10c9a5: 0f 84 ad 00 00 00 je 10ca58 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c9ab: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c9b2: 83 ec 0c sub $0xc,%esp 10c9b5: 53 push %ebx 10c9b6: e8 d1 f3 ff ff call 10bd8c <_TOD_Validate> 10c9bb: 83 c4 10 add $0x10,%esp 10c9be: 84 c0 test %al,%al 10c9c0: 75 0a jne 10c9cc return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10c9c2: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9c7: 8b 5d fc mov -0x4(%ebp),%ebx 10c9ca: c9 leave 10c9cb: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c9cc: 83 ec 0c sub $0xc,%esp 10c9cf: 53 push %ebx 10c9d0: e8 2b f3 ff ff call 10bd00 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c9d5: 83 c4 10 add $0x10,%esp 10c9d8: 3b 05 e8 a1 12 00 cmp 0x12a1e8,%eax 10c9de: 76 e2 jbe 10c9c2 10c9e0: 8b 15 54 a1 12 00 mov 0x12a154,%edx 10c9e6: 42 inc %edx 10c9e7: 89 15 54 a1 12 00 mov %edx,0x12a154 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c9ed: 83 ec 08 sub $0x8,%esp 10c9f0: 6a 10 push $0x10 10c9f2: ff 35 18 a7 12 00 pushl 0x12a718 10c9f8: 89 45 f4 mov %eax,-0xc(%ebp) 10c9fb: e8 c0 24 00 00 call 10eec0 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ca00: 8b 15 18 a7 12 00 mov 0x12a718,%edx if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 10ca06: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ca09: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10ca10: c7 42 64 30 e4 10 00 movl $0x10e430,0x64(%edx) the_watchdog->id = id; 10ca17: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10ca1a: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_seconds( 10ca21: 8b 45 f4 mov -0xc(%ebp),%eax 10ca24: 2b 05 e8 a1 12 00 sub 0x12a1e8,%eax 10ca2a: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10ca2d: 58 pop %eax 10ca2e: 59 pop %ecx 10ca2f: 83 c2 48 add $0x48,%edx 10ca32: 52 push %edx 10ca33: 68 18 a2 12 00 push $0x12a218 10ca38: e8 9b 2b 00 00 call 10f5d8 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10ca3d: e8 a2 1b 00 00 call 10e5e4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca42: 83 c4 10 add $0x10,%esp 10ca45: 31 c0 xor %eax,%eax 10ca47: e9 7b ff ff ff jmp 10c9c7 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10ca4c: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca51: 8b 5d fc mov -0x4(%ebp),%ebx 10ca54: c9 leave 10ca55: c3 ret 10ca56: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10ca58: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca5d: 8b 5d fc mov -0x4(%ebp),%ebx 10ca60: c9 leave 10ca61: c3 ret =============================================================================== 001186b0 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1186b0: 55 push %ebp 1186b1: 89 e5 mov %esp,%ebp 1186b3: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1186b6: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1186b9: 50 push %eax 1186ba: ff 75 08 pushl 0x8(%ebp) 1186bd: 68 20 2b 14 00 push $0x142b20 1186c2: e8 b9 2b 00 00 call 11b280 <_Objects_Get> switch ( location ) { 1186c7: 83 c4 10 add $0x10,%esp 1186ca: 8b 55 f4 mov -0xc(%ebp),%edx 1186cd: 85 d2 test %edx,%edx 1186cf: 74 07 je 1186d8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1186d1: b8 04 00 00 00 mov $0x4,%eax } 1186d6: c9 leave 1186d7: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 1186d8: 83 78 38 04 cmpl $0x4,0x38(%eax) 1186dc: 74 0f je 1186ed <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 1186de: 83 ec 0c sub $0xc,%esp 1186e1: 83 c0 10 add $0x10,%eax 1186e4: 50 push %eax 1186e5: e8 62 48 00 00 call 11cf4c <_Watchdog_Remove> 1186ea: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 1186ed: e8 1e 34 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1186f2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186f4: c9 leave 1186f5: c3 ret =============================================================================== 0010bfbc : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10bfbc: 55 push %ebp 10bfbd: 89 e5 mov %esp,%ebp 10bfbf: 57 push %edi 10bfc0: 56 push %esi 10bfc1: 53 push %ebx 10bfc2: 83 ec 0c sub $0xc,%esp 10bfc5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfc8: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bfcb: 85 db test %ebx,%ebx 10bfcd: 74 6d je 10c03c return RTEMS_INVALID_NAME; if ( !id ) 10bfcf: 85 f6 test %esi,%esi 10bfd1: 0f 84 89 00 00 00 je 10c060 10bfd7: a1 b4 8e 12 00 mov 0x128eb4,%eax 10bfdc: 40 inc %eax 10bfdd: a3 b4 8e 12 00 mov %eax,0x128eb4 * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 10bfe2: 83 ec 0c sub $0xc,%esp 10bfe5: 68 c0 98 12 00 push $0x1298c0 10bfea: e8 2d 0f 00 00 call 10cf1c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10bfef: 83 c4 10 add $0x10,%esp 10bff2: 85 c0 test %eax,%eax 10bff4: 74 56 je 10c04c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10bff6: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bffd: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c004: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c00b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c012: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c019: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c01c: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c01f: 8b 0d dc 98 12 00 mov 0x1298dc,%ecx 10c025: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c028: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c02b: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c02d: e8 32 1c 00 00 call 10dc64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c032: 31 c0 xor %eax,%eax } 10c034: 8d 65 f4 lea -0xc(%ebp),%esp 10c037: 5b pop %ebx 10c038: 5e pop %esi 10c039: 5f pop %edi 10c03a: c9 leave 10c03b: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c03c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c041: 8d 65 f4 lea -0xc(%ebp),%esp 10c044: 5b pop %ebx 10c045: 5e pop %esi 10c046: 5f pop %edi 10c047: c9 leave 10c048: c3 ret 10c049: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10c04c: e8 13 1c 00 00 call 10dc64 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c051: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c056: 8d 65 f4 lea -0xc(%ebp),%esp 10c059: 5b pop %ebx 10c05a: 5e pop %esi 10c05b: 5f pop %edi 10c05c: c9 leave 10c05d: c3 ret 10c05e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c060: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c065: 8d 65 f4 lea -0xc(%ebp),%esp 10c068: 5b pop %ebx 10c069: 5e pop %esi 10c06a: 5f pop %edi 10c06b: c9 leave 10c06c: c3 ret =============================================================================== 001187ac : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1187ac: 55 push %ebp 1187ad: 89 e5 mov %esp,%ebp 1187af: 53 push %ebx 1187b0: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1187b3: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1187b6: 50 push %eax 1187b7: ff 75 08 pushl 0x8(%ebp) 1187ba: 68 20 2b 14 00 push $0x142b20 1187bf: e8 bc 2a 00 00 call 11b280 <_Objects_Get> 1187c4: 89 c3 mov %eax,%ebx switch ( location ) { 1187c6: 83 c4 10 add $0x10,%esp 1187c9: 8b 4d f4 mov -0xc(%ebp),%ecx 1187cc: 85 c9 test %ecx,%ecx 1187ce: 75 38 jne 118808 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1187d0: 83 ec 08 sub $0x8,%esp 1187d3: 50 push %eax 1187d4: 68 20 2b 14 00 push $0x142b20 1187d9: e8 2a 26 00 00 call 11ae08 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1187de: 8d 43 10 lea 0x10(%ebx),%eax 1187e1: 89 04 24 mov %eax,(%esp) 1187e4: e8 63 47 00 00 call 11cf4c <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1187e9: 58 pop %eax 1187ea: 5a pop %edx 1187eb: 53 push %ebx 1187ec: 68 20 2b 14 00 push $0x142b20 1187f1: e8 0e 29 00 00 call 11b104 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 1187f6: e8 15 33 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1187fb: 83 c4 10 add $0x10,%esp 1187fe: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118800: 8b 5d fc mov -0x4(%ebp),%ebx 118803: c9 leave 118804: c3 ret 118805: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118808: b8 04 00 00 00 mov $0x4,%eax } 11880d: 8b 5d fc mov -0x4(%ebp),%ebx 118810: c9 leave 118811: c3 ret =============================================================================== 0010c070 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c070: 55 push %ebp 10c071: 89 e5 mov %esp,%ebp 10c073: 57 push %edi 10c074: 56 push %esi 10c075: 53 push %ebx 10c076: 83 ec 2c sub $0x2c,%esp 10c079: 8b 5d 0c mov 0xc(%ebp),%ebx 10c07c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c07f: 85 db test %ebx,%ebx 10c081: 0f 84 99 00 00 00 je 10c120 return RTEMS_INVALID_NUMBER; if ( !routine ) 10c087: 85 f6 test %esi,%esi 10c089: 0f 84 b1 00 00 00 je 10c140 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c08f: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c090: 8d 45 e4 lea -0x1c(%ebp),%eax 10c093: 50 push %eax 10c094: ff 75 08 pushl 0x8(%ebp) 10c097: 68 c0 98 12 00 push $0x1298c0 10c09c: e8 33 13 00 00 call 10d3d4 <_Objects_Get> 10c0a1: 89 c7 mov %eax,%edi switch ( location ) { 10c0a3: 83 c4 10 add $0x10,%esp 10c0a6: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c0a9: 85 c9 test %ecx,%ecx 10c0ab: 74 0f je 10c0bc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c0ad: b8 04 00 00 00 mov $0x4,%eax } 10c0b2: 8d 65 f4 lea -0xc(%ebp),%esp 10c0b5: 5b pop %ebx 10c0b6: 5e pop %esi 10c0b7: 5f pop %edi 10c0b8: c9 leave 10c0b9: c3 ret 10c0ba: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c0bc: 8d 50 10 lea 0x10(%eax),%edx 10c0bf: 83 ec 0c sub $0xc,%esp 10c0c2: 52 push %edx 10c0c3: 89 55 d4 mov %edx,-0x2c(%ebp) 10c0c6: e8 4d 2c 00 00 call 10ed18 <_Watchdog_Remove> _ISR_Disable( level ); 10c0cb: 9c pushf 10c0cc: fa cli 10c0cd: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 10c0ce: 83 c4 10 add $0x10,%esp 10c0d1: 8b 57 18 mov 0x18(%edi),%edx 10c0d4: 85 d2 test %edx,%edx 10c0d6: 8b 55 d4 mov -0x2c(%ebp),%edx 10c0d9: 75 55 jne 10c130 /* * 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; 10c0db: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c0e2: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c0e9: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c0ec: 8b 4d 08 mov 0x8(%ebp),%ecx 10c0ef: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c0f2: 8b 4d 14 mov 0x14(%ebp),%ecx 10c0f5: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c0f8: 50 push %eax 10c0f9: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c0fa: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c0fd: 83 ec 08 sub $0x8,%esp 10c100: 52 push %edx 10c101: 68 84 8f 12 00 push $0x128f84 10c106: e8 d5 2a 00 00 call 10ebe0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c10b: e8 54 1b 00 00 call 10dc64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c110: 83 c4 10 add $0x10,%esp 10c113: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c115: 8d 65 f4 lea -0xc(%ebp),%esp 10c118: 5b pop %ebx 10c119: 5e pop %esi 10c11a: 5f pop %edi 10c11b: c9 leave 10c11c: c3 ret 10c11d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10c120: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c125: 8d 65 f4 lea -0xc(%ebp),%esp 10c128: 5b pop %ebx 10c129: 5e pop %esi 10c12a: 5f pop %edi 10c12b: c9 leave 10c12c: c3 ret 10c12d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10c130: 50 push %eax 10c131: 9d popf _Thread_Enable_dispatch(); 10c132: e8 2d 1b 00 00 call 10dc64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c137: 31 c0 xor %eax,%eax 10c139: e9 74 ff ff ff jmp 10c0b2 10c13e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c140: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c145: 8d 65 f4 lea -0xc(%ebp),%esp 10c148: 5b pop %ebx 10c149: 5e pop %esi 10c14a: 5f pop %edi 10c14b: c9 leave 10c14c: c3 ret =============================================================================== 001188f4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1188f4: 55 push %ebp 1188f5: 89 e5 mov %esp,%ebp 1188f7: 57 push %edi 1188f8: 56 push %esi 1188f9: 53 push %ebx 1188fa: 83 ec 2c sub $0x2c,%esp 1188fd: 8b 75 08 mov 0x8(%ebp),%esi 118900: 8b 7d 0c mov 0xc(%ebp),%edi 118903: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118906: 80 3d 28 21 14 00 00 cmpb $0x0,0x142128 11890d: 75 0d jne 11891c return RTEMS_NOT_DEFINED; 11890f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118914: 8d 65 f4 lea -0xc(%ebp),%esp 118917: 5b pop %ebx 118918: 5e pop %esi 118919: 5f pop %edi 11891a: c9 leave 11891b: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11891c: 83 ec 0c sub $0xc,%esp 11891f: 57 push %edi 118920: e8 93 d4 ff ff call 115db8 <_TOD_Validate> 118925: 83 c4 10 add $0x10,%esp 118928: 84 c0 test %al,%al 11892a: 74 1e je 11894a return RTEMS_INVALID_CLOCK; if ( !routine ) 11892c: 85 db test %ebx,%ebx 11892e: 0f 84 a4 00 00 00 je 1189d8 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118934: 83 ec 0c sub $0xc,%esp 118937: 57 push %edi 118938: e8 ef d3 ff ff call 115d2c <_TOD_To_seconds> 11893d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11893f: 83 c4 10 add $0x10,%esp 118942: 3b 05 a8 21 14 00 cmp 0x1421a8,%eax 118948: 77 0e ja 118958 return RTEMS_INVALID_CLOCK; 11894a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11894f: 8d 65 f4 lea -0xc(%ebp),%esp 118952: 5b pop %ebx 118953: 5e pop %esi 118954: 5f pop %edi 118955: c9 leave 118956: c3 ret 118957: 90 nop <== NOT EXECUTED 118958: 50 push %eax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118959: 8d 45 e4 lea -0x1c(%ebp),%eax 11895c: 50 push %eax 11895d: 56 push %esi 11895e: 68 20 2b 14 00 push $0x142b20 118963: e8 18 29 00 00 call 11b280 <_Objects_Get> switch ( location ) { 118968: 83 c4 10 add $0x10,%esp 11896b: 8b 4d e4 mov -0x1c(%ebp),%ecx 11896e: 85 c9 test %ecx,%ecx 118970: 75 5a jne 1189cc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118972: 8d 48 10 lea 0x10(%eax),%ecx 118975: 83 ec 0c sub $0xc,%esp 118978: 51 push %ecx 118979: 89 45 d0 mov %eax,-0x30(%ebp) 11897c: 89 4d d4 mov %ecx,-0x2c(%ebp) 11897f: e8 c8 45 00 00 call 11cf4c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 118984: 8b 55 d0 mov -0x30(%ebp),%edx 118987: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11898e: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118995: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118998: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 11899b: 8b 45 14 mov 0x14(%ebp),%eax 11899e: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 1189a1: 2b 3d a8 21 14 00 sub 0x1421a8,%edi 1189a7: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1189aa: 58 pop %eax 1189ab: 5a pop %edx 1189ac: 8b 4d d4 mov -0x2c(%ebp),%ecx 1189af: 51 push %ecx 1189b0: 68 d8 21 14 00 push $0x1421d8 1189b5: e8 5a 44 00 00 call 11ce14 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1189ba: e8 51 31 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1189bf: 83 c4 10 add $0x10,%esp 1189c2: 31 c0 xor %eax,%eax 1189c4: e9 4b ff ff ff jmp 118914 1189c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1189cc: b8 04 00 00 00 mov $0x4,%eax 1189d1: e9 3e ff ff ff jmp 118914 1189d6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 1189d8: b8 09 00 00 00 mov $0x9,%eax 1189dd: e9 32 ff ff ff jmp 118914 =============================================================================== 001189e4 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 1189e4: 55 push %ebp 1189e5: 89 e5 mov %esp,%ebp 1189e7: 53 push %ebx 1189e8: 83 ec 14 sub $0x14,%esp 1189eb: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1189ee: 85 db test %ebx,%ebx 1189f0: 74 4a je 118a3c 1189f2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 1189f3: 8d 45 f4 lea -0xc(%ebp),%eax 1189f6: 50 push %eax 1189f7: ff 75 08 pushl 0x8(%ebp) 1189fa: 68 20 2b 14 00 push $0x142b20 1189ff: e8 7c 28 00 00 call 11b280 <_Objects_Get> switch ( location ) { 118a04: 83 c4 10 add $0x10,%esp 118a07: 8b 55 f4 mov -0xc(%ebp),%edx 118a0a: 85 d2 test %edx,%edx 118a0c: 74 0a je 118a18 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a0e: b8 04 00 00 00 mov $0x4,%eax } 118a13: 8b 5d fc mov -0x4(%ebp),%ebx 118a16: c9 leave 118a17: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118a18: 8b 50 38 mov 0x38(%eax),%edx 118a1b: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118a1d: 8b 50 1c mov 0x1c(%eax),%edx 118a20: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 118a23: 8b 50 24 mov 0x24(%eax),%edx 118a26: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118a29: 8b 40 28 mov 0x28(%eax),%eax 118a2c: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118a2f: e8 dc 30 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118a34: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a36: 8b 5d fc mov -0x4(%ebp),%ebx 118a39: c9 leave 118a3a: c3 ret 118a3b: 90 nop <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 118a3c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a41: 8b 5d fc mov -0x4(%ebp),%ebx 118a44: c9 leave 118a45: c3 ret =============================================================================== 00119070 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 119070: 55 push %ebp 119071: 89 e5 mov %esp,%ebp 119073: 56 push %esi 119074: 53 push %ebx 119075: 83 ec 10 sub $0x10,%esp 119078: 8b 45 08 mov 0x8(%ebp),%eax 11907b: 85 c0 test %eax,%eax 11907d: 74 41 je 1190c0 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 11907f: 0f b6 15 14 9a 13 00 movzbl 0x139a14,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 119086: 39 d0 cmp %edx,%eax 119088: 76 42 jbe 1190cc * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 11908a: 40 inc %eax 11908b: 75 33 jne 1190c0 return RTEMS_INVALID_PRIORITY; _priority = 0; 11908d: 31 f6 xor %esi,%esi 11908f: 8b 15 14 21 14 00 mov 0x142114,%edx 119095: 42 inc %edx 119096: 89 15 14 21 14 00 mov %edx,0x142114 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11909c: 8a 1d 40 da 13 00 mov 0x13da40,%bl initialized = true; 1190a2: c6 05 40 da 13 00 01 movb $0x1,0x13da40 _Thread_Enable_dispatch(); 1190a9: e8 62 2a 00 00 call 11bb10 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1190ae: 84 db test %bl,%bl 1190b0: 74 1e je 1190d0 return RTEMS_INCORRECT_STATE; 1190b2: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1190b7: 8d 65 f8 lea -0x8(%ebp),%esp 1190ba: 5b pop %ebx 1190bb: 5e pop %esi 1190bc: c9 leave 1190bd: c3 ret 1190be: 66 90 xchg %ax,%ax <== NOT EXECUTED * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) return RTEMS_INVALID_PRIORITY; 1190c0: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 1190c5: 8d 65 f8 lea -0x8(%ebp),%esp 1190c8: 5b pop %ebx 1190c9: 5e pop %esi 1190ca: c9 leave 1190cb: c3 ret 1190cc: 89 c6 mov %eax,%esi 1190ce: eb bf jmp 11908f * 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( 1190d0: 83 ec 08 sub $0x8,%esp 1190d3: 8d 45 f4 lea -0xc(%ebp),%eax 1190d6: 50 push %eax 1190d7: 8b 45 10 mov 0x10(%ebp),%eax 1190da: 80 cc 80 or $0x80,%ah 1190dd: 50 push %eax 1190de: 68 00 01 00 00 push $0x100 1190e3: ff 75 0c pushl 0xc(%ebp) 1190e6: 56 push %esi 1190e7: 68 45 4d 49 54 push $0x54494d45 1190ec: e8 e3 ec ff ff call 117dd4 /* 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) { 1190f1: 83 c4 20 add $0x20,%esp 1190f4: 85 c0 test %eax,%eax 1190f6: 74 10 je 119108 initialized = false; 1190f8: c6 05 40 da 13 00 00 movb $0x0,0x13da40 initialized = false; } #endif return status; } 1190ff: 8d 65 f8 lea -0x8(%ebp),%esp 119102: 5b pop %ebx 119103: 5e pop %esi 119104: c9 leave 119105: c3 ret 119106: 66 90 xchg %ax,%ax <== NOT EXECUTED * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 119108: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 11910b: 0f b7 c8 movzwl %ax,%ecx 11910e: 8b 15 bc 20 14 00 mov 0x1420bc,%edx /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 119114: 8b 14 8a mov (%edx,%ecx,4),%edx 119117: 89 15 c0 d9 13 00 mov %edx,0x13d9c0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11911d: c7 05 f0 d9 13 00 f4 movl $0x13d9f4,0x13d9f0 119124: d9 13 00 the_chain->permanent_null = NULL; 119127: c7 05 f4 d9 13 00 00 movl $0x0,0x13d9f4 11912e: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119131: c7 05 f8 d9 13 00 f0 movl $0x13d9f0,0x13d9f8 119138: d9 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11913b: c7 05 28 da 13 00 2c movl $0x13da2c,0x13da28 119142: da 13 00 the_chain->permanent_null = NULL; 119145: c7 05 2c da 13 00 00 movl $0x0,0x13da2c 11914c: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11914f: c7 05 30 da 13 00 28 movl $0x13da28,0x13da30 119156: da 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119159: c7 05 d0 d9 13 00 00 movl $0x0,0x13d9d0 119160: 00 00 00 the_watchdog->routine = routine; 119163: c7 05 e4 d9 13 00 5c movl $0x11b95c,0x13d9e4 11916a: b9 11 00 the_watchdog->id = id; 11916d: a3 e8 d9 13 00 mov %eax,0x13d9e8 the_watchdog->user_data = user_data; 119172: c7 05 ec d9 13 00 00 movl $0x0,0x13d9ec 119179: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11917c: c7 05 08 da 13 00 00 movl $0x0,0x13da08 119183: 00 00 00 the_watchdog->routine = routine; 119186: c7 05 1c da 13 00 5c movl $0x11b95c,0x13da1c 11918d: b9 11 00 the_watchdog->id = id; 119190: a3 20 da 13 00 mov %eax,0x13da20 the_watchdog->user_data = user_data; 119195: c7 05 24 da 13 00 00 movl $0x0,0x13da24 11919c: 00 00 00 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 11919f: c7 05 c4 d9 13 00 40 movl $0x118f40,0x13d9c4 1191a6: 8f 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1191a9: 8b 15 64 22 14 00 mov 0x142264,%edx 1191af: 89 15 fc d9 13 00 mov %edx,0x13d9fc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1191b5: 8b 15 a8 21 14 00 mov 0x1421a8,%edx 1191bb: 89 15 34 da 13 00 mov %edx,0x13da34 ts->insert_chain = NULL; 1191c1: c7 05 38 da 13 00 00 movl $0x0,0x13da38 1191c8: 00 00 00 ts->active = false; 1191cb: c6 05 3c da 13 00 00 movb $0x0,0x13da3c /* * The default timer server is now available. */ _Timer_server = ts; 1191d2: c7 05 60 2b 14 00 c0 movl $0x13d9c0,0x142b60 1191d9: d9 13 00 /* * Start the timer server */ status = rtems_task_start( 1191dc: 53 push %ebx 1191dd: 68 c0 d9 13 00 push $0x13d9c0 1191e2: 68 94 8d 11 00 push $0x118d94 1191e7: 50 push %eax 1191e8: e8 a7 f2 ff ff call 118494 if (status) { initialized = false; } #endif return status; 1191ed: 83 c4 10 add $0x10,%esp 1191f0: e9 d0 fe ff ff jmp 1190c5 =============================================================================== 00118a6c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118a6c: 55 push %ebp 118a6d: 89 e5 mov %esp,%ebp 118a6f: 56 push %esi 118a70: 53 push %ebx 118a71: 83 ec 24 sub $0x24,%esp Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); 118a74: 8d 45 f4 lea -0xc(%ebp),%eax 118a77: 50 push %eax 118a78: ff 75 08 pushl 0x8(%ebp) 118a7b: 68 20 2b 14 00 push $0x142b20 118a80: e8 fb 27 00 00 call 11b280 <_Objects_Get> 118a85: 89 c3 mov %eax,%ebx switch ( location ) { 118a87: 83 c4 10 add $0x10,%esp 118a8a: 8b 45 f4 mov -0xc(%ebp),%eax 118a8d: 85 c0 test %eax,%eax 118a8f: 74 0f je 118aa0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a91: b8 04 00 00 00 mov $0x4,%eax } 118a96: 8d 65 f8 lea -0x8(%ebp),%esp 118a99: 5b pop %ebx 118a9a: 5e pop %esi 118a9b: c9 leave 118a9c: c3 ret 118a9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 118aa0: 8b 43 38 mov 0x38(%ebx),%eax 118aa3: 85 c0 test %eax,%eax 118aa5: 74 1d je 118ac4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118aa7: 48 dec %eax 118aa8: 74 3a je 118ae4 /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; 118aaa: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118aaf: 89 45 e4 mov %eax,-0x1c(%ebp) 118ab2: e8 59 30 00 00 call 11bb10 <_Thread_Enable_dispatch> return status; 118ab7: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118aba: 8d 65 f8 lea -0x8(%ebp),%esp 118abd: 5b pop %ebx 118abe: 5e pop %esi 118abf: c9 leave 118ac0: c3 ret 118ac1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 118ac4: 83 c3 10 add $0x10,%ebx 118ac7: 83 ec 0c sub $0xc,%esp 118aca: 53 push %ebx 118acb: e8 7c 44 00 00 call 11cf4c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118ad0: 59 pop %ecx 118ad1: 5e pop %esi 118ad2: 53 push %ebx 118ad3: 68 e4 21 14 00 push $0x1421e4 118ad8: e8 37 43 00 00 call 11ce14 <_Watchdog_Insert> 118add: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118ae0: 31 c0 xor %eax,%eax 118ae2: eb cb jmp 118aaf case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 118ae4: 8b 35 60 2b 14 00 mov 0x142b60,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118aea: 83 ec 0c sub $0xc,%esp 118aed: 8d 43 10 lea 0x10(%ebx),%eax 118af0: 50 push %eax 118af1: e8 56 44 00 00 call 11cf4c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118af6: 58 pop %eax 118af7: 5a pop %edx 118af8: 53 push %ebx 118af9: 56 push %esi 118afa: ff 56 04 call *0x4(%esi) 118afd: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118b00: 31 c0 xor %eax,%eax 118b02: eb ab jmp 118aaf =============================================================================== 00118b04 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118b04: 55 push %ebp 118b05: 89 e5 mov %esp,%ebp 118b07: 57 push %edi 118b08: 56 push %esi 118b09: 53 push %ebx 118b0a: 83 ec 2c sub $0x2c,%esp 118b0d: 8b 7d 0c mov 0xc(%ebp),%edi 118b10: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118b13: 8b 1d 60 2b 14 00 mov 0x142b60,%ebx if ( !timer_server ) 118b19: 85 db test %ebx,%ebx 118b1b: 0f 84 9f 00 00 00 je 118bc0 return RTEMS_INCORRECT_STATE; if ( !routine ) 118b21: 85 f6 test %esi,%esi 118b23: 0f 84 a3 00 00 00 je 118bcc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118b29: 85 ff test %edi,%edi 118b2b: 75 0f jne 118b3c return RTEMS_INVALID_NUMBER; 118b2d: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b32: 8d 65 f4 lea -0xc(%ebp),%esp 118b35: 5b pop %ebx 118b36: 5e pop %esi 118b37: 5f pop %edi 118b38: c9 leave 118b39: c3 ret 118b3a: 66 90 xchg %ax,%ax <== NOT EXECUTED 118b3c: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118b3d: 8d 45 e4 lea -0x1c(%ebp),%eax 118b40: 50 push %eax 118b41: ff 75 08 pushl 0x8(%ebp) 118b44: 68 20 2b 14 00 push $0x142b20 118b49: e8 32 27 00 00 call 11b280 <_Objects_Get> 118b4e: 89 c2 mov %eax,%edx switch ( location ) { 118b50: 83 c4 10 add $0x10,%esp 118b53: 8b 45 e4 mov -0x1c(%ebp),%eax 118b56: 85 c0 test %eax,%eax 118b58: 75 56 jne 118bb0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118b5a: 83 ec 0c sub $0xc,%esp 118b5d: 8d 42 10 lea 0x10(%edx),%eax 118b60: 50 push %eax 118b61: 89 55 d4 mov %edx,-0x2c(%ebp) 118b64: e8 e3 43 00 00 call 11cf4c <_Watchdog_Remove> _ISR_Disable( level ); 118b69: 9c pushf 118b6a: fa cli 118b6b: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 118b6c: 83 c4 10 add $0x10,%esp 118b6f: 8b 55 d4 mov -0x2c(%ebp),%edx 118b72: 8b 4a 18 mov 0x18(%edx),%ecx 118b75: 85 c9 test %ecx,%ecx 118b77: 75 5f jne 118bd8 /* * 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; 118b79: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118b80: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118b87: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118b8a: 8b 4d 08 mov 0x8(%ebp),%ecx 118b8d: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118b90: 8b 4d 14 mov 0x14(%ebp),%ecx 118b93: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118b96: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118b99: 50 push %eax 118b9a: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118b9b: 83 ec 08 sub $0x8,%esp 118b9e: 52 push %edx 118b9f: 53 push %ebx 118ba0: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118ba3: e8 68 2f 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118ba8: 83 c4 10 add $0x10,%esp 118bab: 31 c0 xor %eax,%eax 118bad: eb 83 jmp 118b32 118baf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118bb0: b8 04 00 00 00 mov $0x4,%eax } 118bb5: 8d 65 f4 lea -0xc(%ebp),%esp 118bb8: 5b pop %ebx 118bb9: 5e pop %esi 118bba: 5f pop %edi 118bbb: c9 leave 118bbc: c3 ret 118bbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118bc0: b8 0e 00 00 00 mov $0xe,%eax 118bc5: e9 68 ff ff ff jmp 118b32 118bca: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 118bcc: b8 09 00 00 00 mov $0x9,%eax 118bd1: e9 5c ff ff ff jmp 118b32 118bd6: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 118bd8: 50 push %eax 118bd9: 9d popf _Thread_Enable_dispatch(); 118bda: e8 31 2f 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118bdf: 31 c0 xor %eax,%eax 118be1: e9 4c ff ff ff jmp 118b32 =============================================================================== 00118be8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118be8: 55 push %ebp 118be9: 89 e5 mov %esp,%ebp 118beb: 57 push %edi 118bec: 56 push %esi 118bed: 53 push %ebx 118bee: 83 ec 2c sub $0x2c,%esp 118bf1: 8b 7d 0c mov 0xc(%ebp),%edi 118bf4: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118bf7: 8b 1d 60 2b 14 00 mov 0x142b60,%ebx if ( !timer_server ) 118bfd: 85 db test %ebx,%ebx 118bff: 0f 84 d7 00 00 00 je 118cdc return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118c05: 80 3d 28 21 14 00 00 cmpb $0x0,0x142128 118c0c: 0f 84 aa 00 00 00 je 118cbc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118c12: 85 f6 test %esi,%esi 118c14: 0f 84 b2 00 00 00 je 118ccc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118c1a: 83 ec 0c sub $0xc,%esp 118c1d: 57 push %edi 118c1e: e8 95 d1 ff ff call 115db8 <_TOD_Validate> 118c23: 83 c4 10 add $0x10,%esp 118c26: 84 c0 test %al,%al 118c28: 75 0e jne 118c38 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118c2a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c2f: 8d 65 f4 lea -0xc(%ebp),%esp 118c32: 5b pop %ebx 118c33: 5e pop %esi 118c34: 5f pop %edi 118c35: c9 leave 118c36: c3 ret 118c37: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118c38: 83 ec 0c sub $0xc,%esp 118c3b: 57 push %edi 118c3c: e8 eb d0 ff ff call 115d2c <_TOD_To_seconds> 118c41: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118c43: 83 c4 10 add $0x10,%esp 118c46: 3b 05 a8 21 14 00 cmp 0x1421a8,%eax 118c4c: 76 dc jbe 118c2a 118c4e: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118c4f: 8d 45 e4 lea -0x1c(%ebp),%eax 118c52: 50 push %eax 118c53: ff 75 08 pushl 0x8(%ebp) 118c56: 68 20 2b 14 00 push $0x142b20 118c5b: e8 20 26 00 00 call 11b280 <_Objects_Get> 118c60: 89 c2 mov %eax,%edx switch ( location ) { 118c62: 83 c4 10 add $0x10,%esp 118c65: 8b 45 e4 mov -0x1c(%ebp),%eax 118c68: 85 c0 test %eax,%eax 118c6a: 75 7c jne 118ce8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118c6c: 83 ec 0c sub $0xc,%esp 118c6f: 8d 42 10 lea 0x10(%edx),%eax 118c72: 50 push %eax 118c73: 89 55 d4 mov %edx,-0x2c(%ebp) 118c76: e8 d1 42 00 00 call 11cf4c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118c7b: 8b 55 d4 mov -0x2c(%ebp),%edx 118c7e: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118c85: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118c8c: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118c8f: 8b 45 08 mov 0x8(%ebp),%eax 118c92: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118c95: 8b 45 14 mov 0x14(%ebp),%eax 118c98: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 118c9b: 2b 3d a8 21 14 00 sub 0x1421a8,%edi 118ca1: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118ca4: 58 pop %eax 118ca5: 59 pop %ecx 118ca6: 52 push %edx 118ca7: 53 push %ebx 118ca8: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118cab: e8 60 2e 00 00 call 11bb10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118cb0: 83 c4 10 add $0x10,%esp 118cb3: 31 c0 xor %eax,%eax 118cb5: e9 75 ff ff ff jmp 118c2f 118cba: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118cbc: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cc1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118cc4: 5b pop %ebx <== NOT EXECUTED 118cc5: 5e pop %esi <== NOT EXECUTED 118cc6: 5f pop %edi <== NOT EXECUTED 118cc7: c9 leave <== NOT EXECUTED 118cc8: c3 ret <== NOT EXECUTED 118cc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118ccc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cd1: 8d 65 f4 lea -0xc(%ebp),%esp 118cd4: 5b pop %ebx 118cd5: 5e pop %esi 118cd6: 5f pop %edi 118cd7: c9 leave 118cd8: c3 ret 118cd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118cdc: b8 0e 00 00 00 mov $0xe,%eax 118ce1: e9 49 ff ff ff jmp 118c2f 118ce6: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118ce8: b8 04 00 00 00 mov $0x4,%eax 118ced: e9 3d ff ff ff jmp 118c2f =============================================================================== 0010be14 : #include int sched_get_priority_max( int policy ) { 10be14: 55 push %ebp 10be15: 89 e5 mov %esp,%ebp 10be17: 83 ec 08 sub $0x8,%esp 10be1a: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10be1d: 85 c0 test %eax,%eax 10be1f: 78 0a js 10be2b 10be21: 83 f8 02 cmp $0x2,%eax 10be24: 7e 1a jle 10be40 10be26: 83 f8 04 cmp $0x4,%eax 10be29: 74 15 je 10be40 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10be2b: e8 58 81 00 00 call 113f88 <__errno> 10be30: c7 00 16 00 00 00 movl $0x16,(%eax) 10be36: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10be3b: c9 leave 10be3c: c3 ret 10be3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10be40: 0f b6 05 bc 44 12 00 movzbl 0x1244bc,%eax 10be47: 48 dec %eax } 10be48: c9 leave 10be49: c3 ret =============================================================================== 0010be4c : #include int sched_get_priority_min( int policy ) { 10be4c: 55 push %ebp 10be4d: 89 e5 mov %esp,%ebp 10be4f: 83 ec 08 sub $0x8,%esp 10be52: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10be55: 85 c0 test %eax,%eax 10be57: 78 0a js 10be63 10be59: 83 f8 02 cmp $0x2,%eax 10be5c: 7e 1a jle 10be78 <== ALWAYS TAKEN 10be5e: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10be61: 74 15 je 10be78 <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10be63: e8 20 81 00 00 call 113f88 <__errno> 10be68: c7 00 16 00 00 00 movl $0x16,(%eax) 10be6e: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10be73: c9 leave 10be74: c3 ret 10be75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; 10be78: b8 01 00 00 00 mov $0x1,%eax } 10be7d: c9 leave 10be7e: c3 ret =============================================================================== 0010be80 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10be80: 55 push %ebp 10be81: 89 e5 mov %esp,%ebp 10be83: 56 push %esi 10be84: 53 push %ebx 10be85: 8b 75 08 mov 0x8(%ebp),%esi 10be88: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10be8b: 85 f6 test %esi,%esi 10be8d: 75 21 jne 10beb0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10be8f: 85 db test %ebx,%ebx 10be91: 74 38 je 10becb rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10be93: 83 ec 08 sub $0x8,%esp 10be96: 53 push %ebx 10be97: ff 35 24 87 12 00 pushl 0x128724 10be9d: e8 d6 34 00 00 call 10f378 <_Timespec_From_ticks> return 0; 10bea2: 83 c4 10 add $0x10,%esp 10bea5: 31 c0 xor %eax,%eax } 10bea7: 8d 65 f8 lea -0x8(%ebp),%esp 10beaa: 5b pop %ebx 10beab: 5e pop %esi 10beac: c9 leave 10bead: c3 ret 10beae: 66 90 xchg %ax,%ax <== NOT EXECUTED { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10beb0: e8 fb c8 ff ff call 1087b0 10beb5: 39 f0 cmp %esi,%eax 10beb7: 74 d6 je 10be8f rtems_set_errno_and_return_minus_one( ESRCH ); 10beb9: e8 ca 80 00 00 call 113f88 <__errno> 10bebe: c7 00 03 00 00 00 movl $0x3,(%eax) 10bec4: b8 ff ff ff ff mov $0xffffffff,%eax 10bec9: eb dc jmp 10bea7 if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10becb: e8 b8 80 00 00 call 113f88 <__errno> 10bed0: c7 00 16 00 00 00 movl $0x16,(%eax) 10bed6: b8 ff ff ff ff mov $0xffffffff,%eax 10bedb: eb ca jmp 10bea7 =============================================================================== 0010e5d4 : */ int sem_close( sem_t *sem ) { 10e5d4: 55 push %ebp 10e5d5: 89 e5 mov %esp,%ebp 10e5d7: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e5da: 8d 45 f4 lea -0xc(%ebp),%eax sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) _Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location ); 10e5dd: 50 push %eax 10e5de: 8b 45 08 mov 0x8(%ebp),%eax 10e5e1: ff 30 pushl (%eax) 10e5e3: 68 e0 d4 12 00 push $0x12d4e0 10e5e8: e8 bf 21 00 00 call 1107ac <_Objects_Get> switch ( location ) { 10e5ed: 83 c4 10 add $0x10,%esp 10e5f0: 8b 55 f4 mov -0xc(%ebp),%edx 10e5f3: 85 d2 test %edx,%edx 10e5f5: 74 15 je 10e60c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e5f7: e8 b8 8f 00 00 call 1175b4 <__errno> 10e5fc: c7 00 16 00 00 00 movl $0x16,(%eax) 10e602: b8 ff ff ff ff mov $0xffffffff,%eax } 10e607: c9 leave 10e608: c3 ret 10e609: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 10e60c: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10e60f: 83 ec 0c sub $0xc,%esp 10e612: 50 push %eax 10e613: e8 58 63 00 00 call 114970 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e618: e8 9f 2a 00 00 call 1110bc <_Thread_Enable_dispatch> return 0; 10e61d: 83 c4 10 add $0x10,%esp 10e620: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e622: c9 leave 10e623: c3 ret =============================================================================== 0010e624 : */ int sem_destroy( sem_t *sem ) { 10e624: 55 push %ebp 10e625: 89 e5 mov %esp,%ebp 10e627: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e62a: 8d 45 f4 lea -0xc(%ebp),%eax 10e62d: 50 push %eax 10e62e: 8b 45 08 mov 0x8(%ebp),%eax 10e631: ff 30 pushl (%eax) 10e633: 68 e0 d4 12 00 push $0x12d4e0 10e638: e8 6f 21 00 00 call 1107ac <_Objects_Get> switch ( location ) { 10e63d: 83 c4 10 add $0x10,%esp 10e640: 8b 55 f4 mov -0xc(%ebp),%edx 10e643: 85 d2 test %edx,%edx 10e645: 74 15 je 10e65c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e647: e8 68 8f 00 00 call 1175b4 <__errno> 10e64c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e652: b8 ff ff ff ff mov $0xffffffff,%eax } 10e657: c9 leave 10e658: c3 ret 10e659: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10e65c: 80 78 14 00 cmpb $0x0,0x14(%eax) 10e660: 75 16 jne 10e678 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10e662: 83 ec 0c sub $0xc,%esp 10e665: 50 push %eax 10e666: e8 05 63 00 00 call 114970 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e66b: e8 4c 2a 00 00 call 1110bc <_Thread_Enable_dispatch> return 0; 10e670: 83 c4 10 add $0x10,%esp 10e673: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e675: c9 leave 10e676: c3 ret 10e677: 90 nop <== NOT EXECUTED /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10e678: e8 3f 2a 00 00 call 1110bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10e67d: e8 32 8f 00 00 call 1175b4 <__errno> 10e682: c7 00 16 00 00 00 movl $0x16,(%eax) 10e688: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e68d: c9 leave 10e68e: c3 ret =============================================================================== 0010e690 : int sem_getvalue( sem_t *sem, int *sval ) { 10e690: 55 push %ebp 10e691: 89 e5 mov %esp,%ebp 10e693: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e696: 8d 45 f4 lea -0xc(%ebp),%eax 10e699: 50 push %eax 10e69a: 8b 45 08 mov 0x8(%ebp),%eax 10e69d: ff 30 pushl (%eax) 10e69f: 68 e0 d4 12 00 push $0x12d4e0 10e6a4: e8 03 21 00 00 call 1107ac <_Objects_Get> switch ( location ) { 10e6a9: 83 c4 10 add $0x10,%esp 10e6ac: 8b 55 f4 mov -0xc(%ebp),%edx 10e6af: 85 d2 test %edx,%edx 10e6b1: 74 15 je 10e6c8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e6b3: e8 fc 8e 00 00 call 1175b4 <__errno> 10e6b8: c7 00 16 00 00 00 movl $0x16,(%eax) 10e6be: b8 ff ff ff ff mov $0xffffffff,%eax } 10e6c3: c9 leave 10e6c4: c3 ret 10e6c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 10e6c8: 8b 50 64 mov 0x64(%eax),%edx 10e6cb: 8b 45 0c mov 0xc(%ebp),%eax 10e6ce: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e6d0: e8 e7 29 00 00 call 1110bc <_Thread_Enable_dispatch> return 0; 10e6d5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e6d7: c9 leave 10e6d8: c3 ret =============================================================================== 0010e724 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10e724: 55 push %ebp 10e725: 89 e5 mov %esp,%ebp 10e727: 57 push %edi 10e728: 56 push %esi 10e729: 53 push %ebx 10e72a: 83 ec 2c sub $0x2c,%esp 10e72d: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e730: a1 b4 d1 12 00 mov 0x12d1b4,%eax 10e735: 40 inc %eax 10e736: a3 b4 d1 12 00 mov %eax,0x12d1b4 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10e73b: 8b 7d 0c mov 0xc(%ebp),%edi 10e73e: 81 e7 00 02 00 00 and $0x200,%edi 10e744: 0f 85 86 00 00 00 jne 10e7d0 /* unsigned int value */ ) { va_list arg; mode_t mode; unsigned int value = 0; 10e74a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10e751: 83 ec 08 sub $0x8,%esp 10e754: 8d 45 e4 lea -0x1c(%ebp),%eax 10e757: 50 push %eax 10e758: 56 push %esi 10e759: e8 62 62 00 00 call 1149c0 <_POSIX_Semaphore_Name_to_id> 10e75e: 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 ) { 10e760: 83 c4 10 add $0x10,%esp 10e763: 85 c0 test %eax,%eax 10e765: 74 25 je 10e78c /* * 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) ) ) { 10e767: 83 f8 02 cmp $0x2,%eax 10e76a: 75 04 jne 10e770 <== NEVER TAKEN 10e76c: 85 ff test %edi,%edi 10e76e: 75 6c jne 10e7dc _Thread_Enable_dispatch(); 10e770: e8 47 29 00 00 call 1110bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10e775: e8 3a 8e 00 00 call 1175b4 <__errno> 10e77a: 89 18 mov %ebx,(%eax) 10e77c: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10e781: 8d 65 f4 lea -0xc(%ebp),%esp 10e784: 5b pop %ebx 10e785: 5e pop %esi 10e786: 5f pop %edi 10e787: c9 leave 10e788: c3 ret 10e789: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10e78c: 8b 45 0c mov 0xc(%ebp),%eax 10e78f: 25 00 0a 00 00 and $0xa00,%eax 10e794: 3d 00 0a 00 00 cmp $0xa00,%eax 10e799: 74 65 je 10e800 10e79b: 50 push %eax _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10e79c: 8d 45 dc lea -0x24(%ebp),%eax 10e79f: 50 push %eax 10e7a0: ff 75 e4 pushl -0x1c(%ebp) 10e7a3: 68 e0 d4 12 00 push $0x12d4e0 10e7a8: e8 ff 1f 00 00 call 1107ac <_Objects_Get> 10e7ad: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10e7b0: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10e7b3: e8 04 29 00 00 call 1110bc <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10e7b8: e8 ff 28 00 00 call 1110bc <_Thread_Enable_dispatch> goto return_id; 10e7bd: 83 c4 10 add $0x10,%esp return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 10e7c0: 8b 45 e0 mov -0x20(%ebp),%eax 10e7c3: 83 c0 08 add $0x8,%eax #endif return id; } 10e7c6: 8d 65 f4 lea -0xc(%ebp),%esp 10e7c9: 5b pop %ebx 10e7ca: 5e pop %esi 10e7cb: 5f pop %edi 10e7cc: c9 leave 10e7cd: c3 ret 10e7ce: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10e7d0: 8b 45 14 mov 0x14(%ebp),%eax 10e7d3: 89 45 d4 mov %eax,-0x2c(%ebp) 10e7d6: e9 76 ff ff ff jmp 10e751 10e7db: 90 nop <== NOT EXECUTED /* * 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( 10e7dc: 8d 45 e0 lea -0x20(%ebp),%eax 10e7df: 50 push %eax 10e7e0: ff 75 d4 pushl -0x2c(%ebp) 10e7e3: 6a 00 push $0x0 10e7e5: 56 push %esi 10e7e6: e8 79 60 00 00 call 114864 <_POSIX_Semaphore_Create_support> 10e7eb: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10e7ed: e8 ca 28 00 00 call 1110bc <_Thread_Enable_dispatch> if ( status == -1 ) 10e7f2: 83 c4 10 add $0x10,%esp 10e7f5: 43 inc %ebx 10e7f6: 75 c8 jne 10e7c0 return SEM_FAILED; 10e7f8: b8 ff ff ff ff mov $0xffffffff,%eax 10e7fd: eb c7 jmp 10e7c6 10e7ff: 90 nop <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10e800: e8 b7 28 00 00 call 1110bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10e805: e8 aa 8d 00 00 call 1175b4 <__errno> 10e80a: c7 00 11 00 00 00 movl $0x11,(%eax) 10e810: b8 ff ff ff ff mov $0xffffffff,%eax 10e815: eb af jmp 10e7c6 =============================================================================== 0010e818 : */ int sem_post( sem_t *sem ) { 10e818: 55 push %ebp 10e819: 89 e5 mov %esp,%ebp 10e81b: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e81e: 8d 45 f4 lea -0xc(%ebp),%eax 10e821: 50 push %eax 10e822: 8b 45 08 mov 0x8(%ebp),%eax 10e825: ff 30 pushl (%eax) 10e827: 68 e0 d4 12 00 push $0x12d4e0 10e82c: e8 7b 1f 00 00 call 1107ac <_Objects_Get> switch ( location ) { 10e831: 83 c4 10 add $0x10,%esp 10e834: 8b 4d f4 mov -0xc(%ebp),%ecx 10e837: 85 c9 test %ecx,%ecx 10e839: 74 15 je 10e850 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e83b: e8 74 8d 00 00 call 1175b4 <__errno> 10e840: c7 00 16 00 00 00 movl $0x16,(%eax) 10e846: b8 ff ff ff ff mov $0xffffffff,%eax } 10e84b: c9 leave 10e84c: c3 ret 10e84d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10e850: 52 push %edx 10e851: 6a 00 push $0x0 10e853: ff 70 08 pushl 0x8(%eax) 10e856: 83 c0 1c add $0x1c,%eax 10e859: 50 push %eax 10e85a: e8 55 15 00 00 call 10fdb4 <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10e85f: e8 58 28 00 00 call 1110bc <_Thread_Enable_dispatch> return 0; 10e864: 83 c4 10 add $0x10,%esp 10e867: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e869: c9 leave 10e86a: c3 ret =============================================================================== 0010e86c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10e86c: 55 push %ebp 10e86d: 89 e5 mov %esp,%ebp 10e86f: 53 push %ebx 10e870: 83 ec 1c sub $0x1c,%esp 10e873: 8b 5d 08 mov 0x8(%ebp),%ebx * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10e876: 8d 45 f4 lea -0xc(%ebp),%eax 10e879: 50 push %eax 10e87a: ff 75 0c pushl 0xc(%ebp) 10e87d: e8 72 54 00 00 call 113cf4 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10e882: 83 c4 10 add $0x10,%esp 10e885: 83 f8 03 cmp $0x3,%eax 10e888: 74 16 je 10e8a0 <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e88a: 50 push %eax <== NOT EXECUTED 10e88b: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10e88e: 6a 00 push $0x0 <== NOT EXECUTED 10e890: 53 push %ebx <== NOT EXECUTED 10e891: e8 96 61 00 00 call 114a2c <_POSIX_Semaphore_Wait_support><== NOT EXECUTED 10e896: 83 c4 10 add $0x10,%esp <== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 10e899: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e89c: c9 leave <== NOT EXECUTED 10e89d: c3 ret <== NOT EXECUTED 10e89e: 66 90 xchg %ax,%ax <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e8a0: 52 push %edx 10e8a1: ff 75 f4 pushl -0xc(%ebp) 10e8a4: 6a 01 push $0x1 10e8a6: 53 push %ebx 10e8a7: e8 80 61 00 00 call 114a2c <_POSIX_Semaphore_Wait_support> 10e8ac: 83 c4 10 add $0x10,%esp lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 10e8af: 8b 5d fc mov -0x4(%ebp),%ebx 10e8b2: c9 leave 10e8b3: c3 ret =============================================================================== 0010b2d4 : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10b2d4: 55 push %ebp 10b2d5: 89 e5 mov %esp,%ebp 10b2d7: 83 ec 08 sub $0x8,%esp if ( !value ) 10b2da: 8b 55 0c mov 0xc(%ebp),%edx 10b2dd: 85 d2 test %edx,%edx 10b2df: 74 33 je 10b314 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10b2e1: 8b 45 10 mov 0x10(%ebp),%eax 10b2e4: 85 c0 test %eax,%eax 10b2e6: 74 2c je 10b314 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b2e8: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b2ec: 76 12 jbe 10b300 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b2ee: e8 b5 86 00 00 call 1139a8 <__errno> 10b2f3: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b2f9: b8 ff ff ff ff mov $0xffffffff,%eax 10b2fe: c9 leave 10b2ff: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b300: e8 a3 86 00 00 call 1139a8 <__errno> 10b305: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b30b: b8 ff ff ff ff mov $0xffffffff,%eax 10b310: c9 leave 10b311: c3 ret 10b312: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b314: e8 8f 86 00 00 call 1139a8 <__errno> 10b319: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b31f: eb d8 jmp 10b2f9 =============================================================================== 0010bd14 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10bd14: 55 push %ebp 10bd15: 89 e5 mov %esp,%ebp 10bd17: 57 push %edi 10bd18: 56 push %esi 10bd19: 53 push %ebx 10bd1a: 83 ec 1c sub $0x1c,%esp 10bd1d: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd20: 8b 45 0c mov 0xc(%ebp),%eax 10bd23: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10bd26: 85 d2 test %edx,%edx 10bd28: 74 13 je 10bd3d *oact = _POSIX_signals_Vectors[ sig ]; 10bd2a: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10bd2d: 8d 34 8d 40 8b 12 00 lea 0x128b40(,%ecx,4),%esi 10bd34: b9 03 00 00 00 mov $0x3,%ecx 10bd39: 89 d7 mov %edx,%edi 10bd3b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10bd3d: 85 db test %ebx,%ebx 10bd3f: 74 77 je 10bdb8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10bd41: 8d 53 ff lea -0x1(%ebx),%edx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10bd44: 83 fa 1f cmp $0x1f,%edx 10bd47: 77 6f ja 10bdb8 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10bd49: 83 fb 09 cmp $0x9,%ebx 10bd4c: 74 6a je 10bdb8 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10bd4e: 85 c0 test %eax,%eax 10bd50: 74 62 je 10bdb4 <== 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 ); 10bd52: 9c pushf 10bd53: fa cli 10bd54: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10bd57: 8b 50 08 mov 0x8(%eax),%edx 10bd5a: 85 d2 test %edx,%edx 10bd5c: 74 36 je 10bd94 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10bd5e: 83 ec 0c sub $0xc,%esp 10bd61: 53 push %ebx 10bd62: 89 45 e0 mov %eax,-0x20(%ebp) 10bd65: e8 da 56 00 00 call 111444 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10bd6a: 8d 14 5b lea (%ebx,%ebx,2),%edx 10bd6d: 8d 14 95 40 8b 12 00 lea 0x128b40(,%edx,4),%edx 10bd74: b9 03 00 00 00 mov $0x3,%ecx 10bd79: 8b 45 e0 mov -0x20(%ebp),%eax 10bd7c: 89 d7 mov %edx,%edi 10bd7e: 89 c6 mov %eax,%esi 10bd80: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bd82: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10bd85: ff 75 e4 pushl -0x1c(%ebp) 10bd88: 9d popf * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 10bd89: 31 c0 xor %eax,%eax } 10bd8b: 8d 65 f4 lea -0xc(%ebp),%esp 10bd8e: 5b pop %ebx 10bd8f: 5e pop %esi 10bd90: 5f pop %edi 10bd91: c9 leave 10bd92: c3 ret 10bd93: 90 nop <== NOT EXECUTED * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10bd94: 8d 34 5b lea (%ebx,%ebx,2),%esi 10bd97: c1 e6 02 shl $0x2,%esi 10bd9a: 8d 86 40 8b 12 00 lea 0x128b40(%esi),%eax 10bda0: 81 c6 60 2f 12 00 add $0x122f60,%esi 10bda6: b9 03 00 00 00 mov $0x3,%ecx 10bdab: 89 c7 mov %eax,%edi 10bdad: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bdaf: eb d4 jmp 10bd85 10bdb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 10bdb4: 31 c0 xor %eax,%eax <== NOT EXECUTED 10bdb6: eb d3 jmp 10bd8b <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bdb8: e8 c7 84 00 00 call 114284 <__errno> 10bdbd: c7 00 16 00 00 00 movl $0x16,(%eax) 10bdc3: b8 ff ff ff ff mov $0xffffffff,%eax 10bdc8: eb c1 jmp 10bd8b =============================================================================== 0010bdcc : int sigaddset( sigset_t *set, int signo ) { 10bdcc: 55 push %ebp 10bdcd: 89 e5 mov %esp,%ebp 10bdcf: 83 ec 08 sub $0x8,%esp 10bdd2: 8b 45 08 mov 0x8(%ebp),%eax 10bdd5: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10bdd8: 85 c0 test %eax,%eax 10bdda: 74 18 je 10bdf4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10bddc: 85 c9 test %ecx,%ecx 10bdde: 74 14 je 10bdf4 10bde0: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10bde1: 83 f9 1f cmp $0x1f,%ecx 10bde4: 77 0e ja 10bdf4 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10bde6: ba 01 00 00 00 mov $0x1,%edx 10bdeb: d3 e2 shl %cl,%edx rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 10bded: 09 10 or %edx,(%eax) return 0; 10bdef: 31 c0 xor %eax,%eax } 10bdf1: c9 leave 10bdf2: c3 ret 10bdf3: 90 nop <== NOT EXECUTED if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bdf4: e8 8b 84 00 00 call 114284 <__errno> 10bdf9: c7 00 16 00 00 00 movl $0x16,(%eax) 10bdff: b8 ff ff ff ff mov $0xffffffff,%eax *set |= signo_to_mask(signo); return 0; } 10be04: c9 leave 10be05: c3 ret =============================================================================== 0010dba0 : int sigdelset( sigset_t *set, int signo ) { 10dba0: 55 push %ebp 10dba1: 89 e5 mov %esp,%ebp 10dba3: 83 ec 08 sub $0x8,%esp 10dba6: 8b 45 08 mov 0x8(%ebp),%eax 10dba9: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10dbac: 85 c0 test %eax,%eax 10dbae: 74 1c je 10dbcc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10dbb0: 85 c9 test %ecx,%ecx 10dbb2: 74 14 je 10dbc8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10dbb4: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10dbb5: 83 f9 1f cmp $0x1f,%ecx 10dbb8: 77 12 ja 10dbcc static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10dbba: ba fe ff ff ff mov $0xfffffffe,%edx rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); 10dbbf: d3 c2 rol %cl,%edx 10dbc1: 21 10 and %edx,(%eax) return 0; 10dbc3: 31 c0 xor %eax,%eax } 10dbc5: c9 leave 10dbc6: c3 ret 10dbc7: 90 nop <== NOT EXECUTED { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) return 0; 10dbc8: 31 c0 xor %eax,%eax if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); return 0; } 10dbca: c9 leave 10dbcb: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dbcc: e8 c3 84 00 00 call 116094 <__errno> 10dbd1: c7 00 16 00 00 00 movl $0x16,(%eax) 10dbd7: b8 ff ff ff ff mov $0xffffffff,%eax *set &= ~signo_to_mask(signo); return 0; } 10dbdc: c9 leave 10dbdd: c3 ret =============================================================================== 0010dc38 : int sigismember( const sigset_t *set, int signo ) { 10dc38: 55 push %ebp 10dc39: 89 e5 mov %esp,%ebp 10dc3b: 83 ec 08 sub $0x8,%esp 10dc3e: 8b 45 08 mov 0x8(%ebp),%eax 10dc41: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10dc44: 85 c0 test %eax,%eax 10dc46: 74 20 je 10dc68 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10dc48: 85 c9 test %ecx,%ecx 10dc4a: 74 18 je 10dc64 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10dc4c: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10dc4d: 83 f9 1f cmp $0x1f,%ecx 10dc50: 77 16 ja 10dc68 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10dc52: ba 01 00 00 00 mov $0x1,%edx 10dc57: d3 e2 shl %cl,%edx const sigset_t *set, int signo ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dc59: 85 10 test %edx,(%eax) 10dc5b: 0f 95 c0 setne %al 10dc5e: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dc61: c9 leave 10dc62: c3 ret 10dc63: 90 nop <== NOT EXECUTED { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) return 0; 10dc64: 31 c0 xor %eax,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dc66: c9 leave 10dc67: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dc68: e8 27 84 00 00 call 116094 <__errno> 10dc6d: c7 00 16 00 00 00 movl $0x16,(%eax) 10dc73: b8 ff ff ff ff mov $0xffffffff,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dc78: c9 leave 10dc79: c3 ret =============================================================================== 0010c0f0 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10c0f0: 55 push %ebp 10c0f1: 89 e5 mov %esp,%ebp 10c0f3: 57 push %edi 10c0f4: 56 push %esi 10c0f5: 53 push %ebx 10c0f6: 83 ec 2c sub $0x2c,%esp 10c0f9: 8b 5d 08 mov 0x8(%ebp),%ebx 10c0fc: 8b 7d 0c mov 0xc(%ebp),%edi 10c0ff: 8b 75 10 mov 0x10(%ebp),%esi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10c102: 85 db test %ebx,%ebx 10c104: 0f 84 9e 01 00 00 je 10c2a8 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10c10a: 85 f6 test %esi,%esi 10c10c: 0f 84 3e 01 00 00 je 10c250 if ( !_Timespec_Is_valid( timeout ) ) 10c112: 83 ec 0c sub $0xc,%esp 10c115: 56 push %esi 10c116: e8 65 35 00 00 call 10f680 <_Timespec_Is_valid> 10c11b: 83 c4 10 add $0x10,%esp 10c11e: 84 c0 test %al,%al 10c120: 0f 84 82 01 00 00 je 10c2a8 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10c126: 83 ec 0c sub $0xc,%esp 10c129: 56 push %esi 10c12a: e8 b9 35 00 00 call 10f6e8 <_Timespec_To_ticks> if ( !interval ) 10c12f: 83 c4 10 add $0x10,%esp 10c132: 85 c0 test %eax,%eax 10c134: 0f 84 6e 01 00 00 je 10c2a8 <== NEVER TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c13a: 85 ff test %edi,%edi 10c13c: 0f 84 18 01 00 00 je 10c25a <== NEVER TAKEN the_thread = _Thread_Executing; 10c142: 8b 0d 18 a1 12 00 mov 0x12a118,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c148: 8b 91 f8 00 00 00 mov 0xf8(%ecx),%edx * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10c14e: 9c pushf 10c14f: fa cli 10c150: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10c153: 8b 33 mov (%ebx),%esi 10c155: 89 75 d4 mov %esi,-0x2c(%ebp) 10c158: 8b b2 d4 00 00 00 mov 0xd4(%edx),%esi 10c15e: 85 75 d4 test %esi,-0x2c(%ebp) 10c161: 0f 85 fd 00 00 00 jne 10c264 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10c167: 8b 35 48 a3 12 00 mov 0x12a348,%esi 10c16d: 85 75 d4 test %esi,-0x2c(%ebp) 10c170: 0f 85 96 00 00 00 jne 10c20c the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10c176: c7 07 ff ff ff ff movl $0xffffffff,(%edi) 10c17c: 8b 35 54 9b 12 00 mov 0x129b54,%esi 10c182: 46 inc %esi 10c183: 89 35 54 9b 12 00 mov %esi,0x129b54 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10c189: c7 41 44 e0 a2 12 00 movl $0x12a2e0,0x44(%ecx) the_thread->Wait.return_code = EINTR; 10c190: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) the_thread->Wait.option = *set; 10c197: 8b 33 mov (%ebx),%esi 10c199: 89 71 30 mov %esi,0x30(%ecx) the_thread->Wait.return_argument = the_info; 10c19c: 89 79 28 mov %edi,0x28(%ecx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c19f: c7 05 10 a3 12 00 01 movl $0x1,0x12a310 10c1a6: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10c1a9: ff 75 d0 pushl -0x30(%ebp) 10c1ac: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10c1ad: 51 push %ecx 10c1ae: 68 1c f2 10 00 push $0x10f21c 10c1b3: 50 push %eax 10c1b4: 68 e0 a2 12 00 push $0x12a2e0 10c1b9: 89 55 cc mov %edx,-0x34(%ebp) 10c1bc: e8 0b 2d 00 00 call 10eecc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c1c1: e8 1e 28 00 00 call 10e9e4 <_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 ); 10c1c6: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c1cd: 6a 00 push $0x0 10c1cf: 57 push %edi 10c1d0: ff 37 pushl (%edi) 10c1d2: 8b 55 cc mov -0x34(%ebp),%edx 10c1d5: 52 push %edx 10c1d6: e8 55 59 00 00 call 111b30 <_POSIX_signals_Clear_signals> /* Set errno only if return code is not EINTR or * if EINTR was caused by a signal being caught, which * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) 10c1db: 83 c4 20 add $0x20,%esp 10c1de: a1 18 a1 12 00 mov 0x12a118,%eax 10c1e3: 83 78 34 04 cmpl $0x4,0x34(%eax) 10c1e7: 0f 85 d3 00 00 00 jne 10c2c0 || !(*set & signo_to_mask( the_info->si_signo )) ) { 10c1ed: 8b 37 mov (%edi),%esi 10c1ef: 8d 4e ff lea -0x1(%esi),%ecx 10c1f2: b8 01 00 00 00 mov $0x1,%eax 10c1f7: d3 e0 shl %cl,%eax 10c1f9: 85 03 test %eax,(%ebx) 10c1fb: 0f 84 bf 00 00 00 je 10c2c0 errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10c201: 89 f0 mov %esi,%eax 10c203: 8d 65 f4 lea -0xc(%ebp),%esp 10c206: 5b pop %ebx 10c207: 5e pop %esi 10c208: 5f pop %edi 10c209: c9 leave 10c20a: c3 ret 10c20b: 90 nop <== NOT EXECUTED } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); 10c20c: 83 ec 0c sub $0xc,%esp 10c20f: 56 push %esi 10c210: 89 55 cc mov %edx,-0x34(%ebp) 10c213: e8 94 fe ff ff call 10c0ac <_POSIX_signals_Get_lowest> 10c218: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10c21a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c221: 6a 01 push $0x1 10c223: 57 push %edi 10c224: 50 push %eax 10c225: 8b 55 cc mov -0x34(%ebp),%edx 10c228: 52 push %edx 10c229: e8 02 59 00 00 call 111b30 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10c22e: ff 75 d0 pushl -0x30(%ebp) 10c231: 9d popf the_info->si_signo = signo; 10c232: 89 37 mov %esi,(%edi) the_info->si_code = SI_USER; 10c234: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 10c23b: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) return signo; 10c242: 83 c4 20 add $0x20,%esp errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10c245: 89 f0 mov %esi,%eax 10c247: 8d 65 f4 lea -0xc(%ebp),%esp 10c24a: 5b pop %ebx 10c24b: 5e pop %esi 10c24c: 5f pop %edi 10c24d: c9 leave 10c24e: c3 ret 10c24f: 90 nop <== NOT EXECUTED /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; 10c250: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c252: 85 ff test %edi,%edi 10c254: 0f 85 e8 fe ff ff jne 10c142 10c25a: 8d 7d dc lea -0x24(%ebp),%edi 10c25d: e9 e0 fe ff ff jmp 10c142 10c262: 66 90 xchg %ax,%ax <== NOT EXECUTED /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending ); 10c264: 83 ec 0c sub $0xc,%esp 10c267: 56 push %esi 10c268: 89 55 cc mov %edx,-0x34(%ebp) 10c26b: e8 3c fe ff ff call 10c0ac <_POSIX_signals_Get_lowest> 10c270: 89 07 mov %eax,(%edi) _POSIX_signals_Clear_signals( 10c272: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c279: 6a 00 push $0x0 10c27b: 57 push %edi 10c27c: 50 push %eax 10c27d: 8b 55 cc mov -0x34(%ebp),%edx 10c280: 52 push %edx 10c281: e8 aa 58 00 00 call 111b30 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10c286: ff 75 d0 pushl -0x30(%ebp) 10c289: 9d popf the_info->si_code = SI_USER; 10c28a: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 10c291: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) return the_info->si_signo; 10c298: 8b 37 mov (%edi),%esi 10c29a: 83 c4 20 add $0x20,%esp errno = _Thread_Executing->Wait.return_code; return -1; } return the_info->si_signo; } 10c29d: 89 f0 mov %esi,%eax 10c29f: 8d 65 f4 lea -0xc(%ebp),%esp 10c2a2: 5b pop %ebx 10c2a3: 5e pop %esi 10c2a4: 5f pop %edi 10c2a5: c9 leave 10c2a6: c3 ret 10c2a7: 90 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c2a8: e8 1b 86 00 00 call 1148c8 <__errno> 10c2ad: c7 00 16 00 00 00 movl $0x16,(%eax) 10c2b3: be ff ff ff ff mov $0xffffffff,%esi 10c2b8: e9 44 ff ff ff jmp 10c201 10c2bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) || !(*set & signo_to_mask( the_info->si_signo )) ) { errno = _Thread_Executing->Wait.return_code; 10c2c0: e8 03 86 00 00 call 1148c8 <__errno> 10c2c5: 8b 15 18 a1 12 00 mov 0x12a118,%edx 10c2cb: 8b 52 34 mov 0x34(%edx),%edx 10c2ce: 89 10 mov %edx,(%eax) return -1; 10c2d0: be ff ff ff ff mov $0xffffffff,%esi 10c2d5: e9 27 ff ff ff jmp 10c201 =============================================================================== 0010df78 : int sigwait( const sigset_t *set, int *sig ) { 10df78: 55 push %ebp 10df79: 89 e5 mov %esp,%ebp 10df7b: 53 push %ebx 10df7c: 83 ec 08 sub $0x8,%esp 10df7f: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10df82: 6a 00 push $0x0 10df84: 6a 00 push $0x0 10df86: ff 75 08 pushl 0x8(%ebp) 10df89: e8 e6 fd ff ff call 10dd74 if ( status != -1 ) { 10df8e: 83 c4 10 add $0x10,%esp 10df91: 83 f8 ff cmp $0xffffffff,%eax 10df94: 74 0e je 10dfa4 if ( sig ) 10df96: 85 db test %ebx,%ebx 10df98: 74 16 je 10dfb0 <== NEVER TAKEN *sig = status; 10df9a: 89 03 mov %eax,(%ebx) return 0; 10df9c: 31 c0 xor %eax,%eax } return errno; } 10df9e: 8b 5d fc mov -0x4(%ebp),%ebx 10dfa1: c9 leave 10dfa2: c3 ret 10dfa3: 90 nop <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 10dfa4: e8 eb 80 00 00 call 116094 <__errno> 10dfa9: 8b 00 mov (%eax),%eax } 10dfab: 8b 5d fc mov -0x4(%ebp),%ebx 10dfae: c9 leave 10dfaf: c3 ret status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 10dfb0: 31 c0 xor %eax,%eax <== NOT EXECUTED } return errno; } 10dfb2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10dfb5: c9 leave <== NOT EXECUTED 10dfb6: c3 ret <== NOT EXECUTED =============================================================================== 0010b194 : */ long sysconf( int name ) { 10b194: 55 push %ebp 10b195: 89 e5 mov %esp,%ebp 10b197: 83 ec 08 sub $0x8,%esp 10b19a: 8b 45 08 mov 0x8(%ebp),%eax if ( name == _SC_CLK_TCK ) 10b19d: 83 f8 02 cmp $0x2,%eax 10b1a0: 74 16 je 10b1b8 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 10b1a2: 83 f8 04 cmp $0x4,%eax 10b1a5: 74 21 je 10b1c8 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b1a7: 83 f8 33 cmp $0x33,%eax 10b1aa: 74 24 je 10b1d0 return 1024; if ( name == _SC_PAGESIZE ) 10b1ac: 83 f8 08 cmp $0x8,%eax 10b1af: 75 27 jne 10b1d8 return PAGE_SIZE; 10b1b1: b8 00 10 00 00 mov $0x1000,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1b6: c9 leave 10b1b7: c3 ret long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 10b1b8: b8 40 42 0f 00 mov $0xf4240,%eax 10b1bd: 31 d2 xor %edx,%edx 10b1bf: f7 35 cc 42 12 00 divl 0x1242cc if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1c5: c9 leave 10b1c6: c3 ret 10b1c7: 90 nop <== NOT EXECUTED if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; 10b1c8: a1 ac 41 12 00 mov 0x1241ac,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1cd: c9 leave 10b1ce: c3 ret 10b1cf: 90 nop <== NOT EXECUTED if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) return 1024; 10b1d0: b8 00 04 00 00 mov $0x400,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1d5: c9 leave 10b1d6: c3 ret 10b1d7: 90 nop <== NOT EXECUTED #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b1d8: e8 8b 86 00 00 call 113868 <__errno> 10b1dd: c7 00 16 00 00 00 movl $0x16,(%eax) 10b1e3: b8 ff ff ff ff mov $0xffffffff,%eax } 10b1e8: c9 leave 10b1e9: c3 ret =============================================================================== 0010b4cc : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10b4cc: 55 push %ebp 10b4cd: 89 e5 mov %esp,%ebp 10b4cf: 56 push %esi 10b4d0: 53 push %ebx 10b4d1: 8b 5d 0c mov 0xc(%ebp),%ebx 10b4d4: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10b4d7: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10b4db: 0f 85 db 00 00 00 jne 10b5bc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10b4e1: 85 f6 test %esi,%esi 10b4e3: 0f 84 d3 00 00 00 je 10b5bc /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10b4e9: 85 db test %ebx,%ebx 10b4eb: 74 21 je 10b50e /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10b4ed: 8b 03 mov (%ebx),%eax 10b4ef: 48 dec %eax 10b4f0: 83 f8 01 cmp $0x1,%eax 10b4f3: 0f 87 c3 00 00 00 ja 10b5bc <== 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 ) 10b4f9: 8b 43 04 mov 0x4(%ebx),%eax 10b4fc: 85 c0 test %eax,%eax 10b4fe: 0f 84 b8 00 00 00 je 10b5bc <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10b504: 48 dec %eax rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10b505: 83 f8 1f cmp $0x1f,%eax 10b508: 0f 87 ae 00 00 00 ja 10b5bc <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b50e: a1 94 97 12 00 mov 0x129794,%eax 10b513: 40 inc %eax 10b514: a3 94 97 12 00 mov %eax,0x129794 * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 10b519: 83 ec 0c sub $0xc,%esp 10b51c: 68 00 9b 12 00 push $0x129b00 10b521: e8 96 1e 00 00 call 10d3bc <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10b526: 83 c4 10 add $0x10,%esp 10b529: 85 c0 test %eax,%eax 10b52b: 0f 84 a2 00 00 00 je 10b5d3 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 10b531: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10b535: 8b 15 58 9d 12 00 mov 0x129d58,%edx 10b53b: 8b 52 08 mov 0x8(%edx),%edx 10b53e: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10b541: 85 db test %ebx,%ebx 10b543: 74 11 je 10b556 ptimer->inf.sigev_notify = evp->sigev_notify; 10b545: 8b 13 mov (%ebx),%edx 10b547: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10b54a: 8b 53 04 mov 0x4(%ebx),%edx 10b54d: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10b550: 8b 53 08 mov 0x8(%ebx),%edx 10b553: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10b556: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10b55d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10b564: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10b56b: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10b572: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b579: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b580: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b587: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b58e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b595: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b598: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b59b: 8b 0d 1c 9b 12 00 mov 0x129b1c,%ecx 10b5a1: 89 04 99 mov %eax,(%ecx,%ebx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b5a4: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 10b5ab: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b5ad: e8 52 2b 00 00 call 10e104 <_Thread_Enable_dispatch> return 0; 10b5b2: 31 c0 xor %eax,%eax } 10b5b4: 8d 65 f8 lea -0x8(%ebp),%esp 10b5b7: 5b pop %ebx 10b5b8: 5e pop %esi 10b5b9: c9 leave 10b5ba: c3 ret 10b5bb: 90 nop <== NOT EXECUTED if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b5bc: e8 6b 8a 00 00 call 11402c <__errno> 10b5c1: c7 00 16 00 00 00 movl $0x16,(%eax) 10b5c7: b8 ff ff ff ff mov $0xffffffff,%eax _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 10b5cc: 8d 65 f8 lea -0x8(%ebp),%esp 10b5cf: 5b pop %ebx 10b5d0: 5e pop %esi 10b5d1: c9 leave 10b5d2: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10b5d3: e8 2c 2b 00 00 call 10e104 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10b5d8: e8 4f 8a 00 00 call 11402c <__errno> 10b5dd: c7 00 0b 00 00 00 movl $0xb,(%eax) 10b5e3: b8 ff ff ff ff mov $0xffffffff,%eax 10b5e8: eb ca jmp 10b5b4 =============================================================================== 0010ba14 : int timer_delete( timer_t timerid ) { 10ba14: 55 push %ebp 10ba15: 89 e5 mov %esp,%ebp 10ba17: 53 push %ebx 10ba18: 83 ec 18 sub $0x18,%esp * because rtems_timer_delete stops the timer before deleting it. */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); 10ba1b: 8d 45 f4 lea -0xc(%ebp),%eax timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); 10ba1e: 50 push %eax 10ba1f: ff 75 08 pushl 0x8(%ebp) 10ba22: 68 c0 99 12 00 push $0x1299c0 10ba27: e8 9c 21 00 00 call 10dbc8 <_Objects_Get> 10ba2c: 89 c3 mov %eax,%ebx switch ( location ) { 10ba2e: 83 c4 10 add $0x10,%esp 10ba31: 8b 4d f4 mov -0xc(%ebp),%ecx 10ba34: 85 c9 test %ecx,%ecx 10ba36: 74 18 je 10ba50 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10ba38: e8 ff 8c 00 00 call 11473c <__errno> 10ba3d: c7 00 16 00 00 00 movl $0x16,(%eax) 10ba43: b8 ff ff ff ff mov $0xffffffff,%eax } 10ba48: 8b 5d fc mov -0x4(%ebp),%ebx 10ba4b: c9 leave 10ba4c: c3 ret 10ba4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 10ba50: 83 ec 08 sub $0x8,%esp 10ba53: 50 push %eax 10ba54: 68 c0 99 12 00 push $0x1299c0 10ba59: e8 2e 1d 00 00 call 10d78c <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10ba5e: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10ba62: 8d 43 10 lea 0x10(%ebx),%eax 10ba65: 89 04 24 mov %eax,(%esp) 10ba68: e8 87 3b 00 00 call 10f5f4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10ba6d: 58 pop %eax 10ba6e: 5a pop %edx 10ba6f: 53 push %ebx 10ba70: 68 c0 99 12 00 push $0x1299c0 10ba75: e8 0e 20 00 00 call 10da88 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10ba7a: e8 d9 29 00 00 call 10e458 <_Thread_Enable_dispatch> return 0; 10ba7f: 83 c4 10 add $0x10,%esp 10ba82: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ba84: 8b 5d fc mov -0x4(%ebp),%ebx 10ba87: c9 leave 10ba88: c3 ret =============================================================================== 0010c8d0 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10c8d0: 55 push %ebp 10c8d1: 89 e5 mov %esp,%ebp 10c8d3: 53 push %ebx 10c8d4: 83 ec 18 sub $0x18,%esp int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); 10c8d7: 8d 45 f4 lea -0xc(%ebp),%eax timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); 10c8da: 50 push %eax 10c8db: ff 75 08 pushl 0x8(%ebp) 10c8de: 68 a0 b0 12 00 push $0x12b0a0 10c8e3: e8 24 21 00 00 call 10ea0c <_Objects_Get> switch ( location ) { 10c8e8: 83 c4 10 add $0x10,%esp 10c8eb: 8b 55 f4 mov -0xc(%ebp),%edx 10c8ee: 85 d2 test %edx,%edx 10c8f0: 74 1a je 10c90c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c8f2: e8 c5 88 00 00 call 1151bc <__errno> 10c8f7: c7 00 16 00 00 00 movl $0x16,(%eax) 10c8fd: bb ff ff ff ff mov $0xffffffff,%ebx } 10c902: 89 d8 mov %ebx,%eax 10c904: 8b 5d fc mov -0x4(%ebp),%ebx 10c907: c9 leave 10c908: c3 ret 10c909: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10c90c: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10c90f: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10c916: e8 81 29 00 00 call 10f29c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c91b: 89 d8 mov %ebx,%eax 10c91d: 8b 5d fc mov -0x4(%ebp),%ebx 10c920: c9 leave 10c921: c3 ret =============================================================================== 0010c924 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10c924: 55 push %ebp 10c925: 89 e5 mov %esp,%ebp 10c927: 56 push %esi 10c928: 53 push %ebx 10c929: 83 ec 10 sub $0x10,%esp 10c92c: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10c92f: 85 db test %ebx,%ebx 10c931: 74 65 je 10c998 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10c933: 83 ec 0c sub $0xc,%esp 10c936: 8d 45 ec lea -0x14(%ebp),%eax 10c939: 50 push %eax 10c93a: e8 f1 16 00 00 call 10e030 <_TOD_Get> 10c93f: 83 c4 0c add $0xc,%esp ptimer = _POSIX_Timer_Get( timerid, &location ); 10c942: 8d 45 f4 lea -0xc(%ebp),%eax 10c945: 50 push %eax 10c946: ff 75 08 pushl 0x8(%ebp) 10c949: 68 a0 b0 12 00 push $0x12b0a0 10c94e: e8 b9 20 00 00 call 10ea0c <_Objects_Get> 10c953: 89 c6 mov %eax,%esi switch ( location ) { 10c955: 83 c4 10 add $0x10,%esp 10c958: 8b 45 f4 mov -0xc(%ebp),%eax 10c95b: 85 c0 test %eax,%eax 10c95d: 75 39 jne 10c998 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10c95f: a1 84 ae 12 00 mov 0x12ae84,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10c964: 83 ec 08 sub $0x8,%esp 10c967: 8d 53 08 lea 0x8(%ebx),%edx 10c96a: 52 push %edx case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10c96b: 8b 56 1c mov 0x1c(%esi),%edx 10c96e: 03 56 24 add 0x24(%esi),%edx case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = 10c971: 29 c2 sub %eax,%edx (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10c973: 52 push %edx 10c974: e8 bf 35 00 00 call 10ff38 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10c979: 8b 46 54 mov 0x54(%esi),%eax 10c97c: 8b 56 58 mov 0x58(%esi),%edx 10c97f: 89 03 mov %eax,(%ebx) 10c981: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10c984: e8 13 29 00 00 call 10f29c <_Thread_Enable_dispatch> return 0; 10c989: 83 c4 10 add $0x10,%esp 10c98c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c98e: 8d 65 f8 lea -0x8(%ebp),%esp 10c991: 5b pop %ebx 10c992: 5e pop %esi 10c993: c9 leave 10c994: c3 ret 10c995: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c998: e8 1f 88 00 00 call 1151bc <__errno> 10c99d: c7 00 16 00 00 00 movl $0x16,(%eax) 10c9a3: b8 ff ff ff ff mov $0xffffffff,%eax 10c9a8: eb e4 jmp 10c98e =============================================================================== 0010b5ec : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10b5ec: 55 push %ebp 10b5ed: 89 e5 mov %esp,%ebp 10b5ef: 57 push %edi 10b5f0: 56 push %esi 10b5f1: 53 push %ebx 10b5f2: 83 ec 3c sub $0x3c,%esp 10b5f5: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10b5f8: 85 db test %ebx,%ebx 10b5fa: 0f 84 50 01 00 00 je 10b750 <== NEVER TAKEN /* * First, it verifies if the structure "value" is correct * if the number of nanoseconds is not correct return EINVAL */ if ( !_Timespec_Is_valid( &(value->it_value) ) ) { 10b600: 83 ec 0c sub $0xc,%esp 10b603: 8d 43 08 lea 0x8(%ebx),%eax 10b606: 50 push %eax 10b607: e8 b8 37 00 00 call 10edc4 <_Timespec_Is_valid> 10b60c: 83 c4 10 add $0x10,%esp 10b60f: 84 c0 test %al,%al 10b611: 0f 84 39 01 00 00 je 10b750 rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !_Timespec_Is_valid( &(value->it_interval) ) ) { 10b617: 83 ec 0c sub $0xc,%esp 10b61a: 53 push %ebx 10b61b: e8 a4 37 00 00 call 10edc4 <_Timespec_Is_valid> 10b620: 83 c4 10 add $0x10,%esp 10b623: 84 c0 test %al,%al 10b625: 0f 84 25 01 00 00 je 10b750 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10b62b: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10b62f: 0f 84 db 00 00 00 je 10b710 10b635: 8b 45 0c mov 0xc(%ebp),%eax 10b638: 85 c0 test %eax,%eax 10b63a: 0f 85 10 01 00 00 jne 10b750 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b640: 8d 45 cc lea -0x34(%ebp),%eax 10b643: 89 45 c4 mov %eax,-0x3c(%ebp) 10b646: b9 04 00 00 00 mov $0x4,%ecx 10b64b: 89 c7 mov %eax,%edi 10b64d: 89 de mov %ebx,%esi 10b64f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); 10b651: 50 push %eax /* If the function reaches this point, then it will be necessary to do * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); 10b652: 8d 45 e4 lea -0x1c(%ebp),%eax 10b655: 50 push %eax 10b656: ff 75 08 pushl 0x8(%ebp) 10b659: 68 00 9b 12 00 push $0x129b00 10b65e: e8 11 22 00 00 call 10d874 <_Objects_Get> 10b663: 89 c2 mov %eax,%edx switch ( location ) { 10b665: 83 c4 10 add $0x10,%esp 10b668: 8b 7d e4 mov -0x1c(%ebp),%edi 10b66b: 85 ff test %edi,%edi 10b66d: 0f 85 dd 00 00 00 jne 10b750 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 ) { 10b673: 8b 75 d4 mov -0x2c(%ebp),%esi 10b676: 85 f6 test %esi,%esi 10b678: 75 0b jne 10b685 10b67a: 8b 4d d8 mov -0x28(%ebp),%ecx 10b67d: 85 c9 test %ecx,%ecx 10b67f: 0f 84 df 00 00 00 je 10b764 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10b685: 83 ec 0c sub $0xc,%esp 10b688: 53 push %ebx 10b689: 89 55 c0 mov %edx,-0x40(%ebp) 10b68c: e8 9b 37 00 00 call 10ee2c <_Timespec_To_ticks> 10b691: 8b 55 c0 mov -0x40(%ebp),%edx 10b694: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10b697: 8d 45 d4 lea -0x2c(%ebp),%eax 10b69a: 89 04 24 mov %eax,(%esp) 10b69d: e8 8a 37 00 00 call 10ee2c <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10b6a2: 8b 55 c0 mov -0x40(%ebp),%edx 10b6a5: 89 14 24 mov %edx,(%esp) 10b6a8: 68 d0 b7 10 00 push $0x10b7d0 10b6ad: ff 72 08 pushl 0x8(%edx) 10b6b0: 50 push %eax 10b6b1: 8d 42 10 lea 0x10(%edx),%eax 10b6b4: 50 push %eax 10b6b5: e8 7e 60 00 00 call 111738 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10b6ba: 83 c4 20 add $0x20,%esp 10b6bd: 84 c0 test %al,%al 10b6bf: 8b 55 c0 mov -0x40(%ebp),%edx 10b6c2: 0f 84 e8 00 00 00 je 10b7b0 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10b6c8: 8b 45 14 mov 0x14(%ebp),%eax 10b6cb: 85 c0 test %eax,%eax 10b6cd: 0f 84 ed 00 00 00 je 10b7c0 *ovalue = ptimer->timer_data; 10b6d3: 8d 42 54 lea 0x54(%edx),%eax 10b6d6: b9 04 00 00 00 mov $0x4,%ecx 10b6db: 8b 7d 14 mov 0x14(%ebp),%edi 10b6de: 89 c6 mov %eax,%esi 10b6e0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10b6e2: b9 04 00 00 00 mov $0x4,%ecx 10b6e7: 89 c7 mov %eax,%edi 10b6e9: 8b 75 c4 mov -0x3c(%ebp),%esi 10b6ec: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b6ee: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10b6f2: 83 ec 0c sub $0xc,%esp 10b6f5: 83 c2 6c add $0x6c,%edx 10b6f8: 52 push %edx 10b6f9: e8 be 17 00 00 call 10cebc <_TOD_Get> _Thread_Enable_dispatch(); 10b6fe: e8 01 2a 00 00 call 10e104 <_Thread_Enable_dispatch> return 0; 10b703: 83 c4 10 add $0x10,%esp 10b706: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b708: 8d 65 f4 lea -0xc(%ebp),%esp 10b70b: 5b pop %ebx 10b70c: 5e pop %esi 10b70d: 5f pop %edi 10b70e: c9 leave 10b70f: c3 ret if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b710: 8d 45 cc lea -0x34(%ebp),%eax 10b713: 89 45 c4 mov %eax,-0x3c(%ebp) 10b716: 89 c7 mov %eax,%edi 10b718: 89 de mov %ebx,%esi 10b71a: 8b 4d 0c mov 0xc(%ebp),%ecx 10b71d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10b71f: 83 ec 0c sub $0xc,%esp 10b722: 8d 75 dc lea -0x24(%ebp),%esi 10b725: 56 push %esi 10b726: e8 91 17 00 00 call 10cebc <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10b72b: 59 pop %ecx 10b72c: 5f pop %edi 10b72d: 8d 7d d4 lea -0x2c(%ebp),%edi 10b730: 57 push %edi 10b731: 56 push %esi 10b732: e8 69 36 00 00 call 10eda0 <_Timespec_Greater_than> 10b737: 83 c4 10 add $0x10,%esp 10b73a: 84 c0 test %al,%al 10b73c: 75 12 jne 10b750 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10b73e: 52 push %edx 10b73f: 57 push %edi 10b740: 57 push %edi 10b741: 56 push %esi 10b742: e8 a5 36 00 00 call 10edec <_Timespec_Subtract> 10b747: 83 c4 10 add $0x10,%esp 10b74a: e9 02 ff ff ff jmp 10b651 10b74f: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b750: e8 d7 88 00 00 call 11402c <__errno> 10b755: c7 00 16 00 00 00 movl $0x16,(%eax) 10b75b: b8 ff ff ff ff mov $0xffffffff,%eax 10b760: eb a6 jmp 10b708 10b762: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10b764: 83 ec 0c sub $0xc,%esp 10b767: 8d 40 10 lea 0x10(%eax),%eax 10b76a: 50 push %eax 10b76b: 89 55 c0 mov %edx,-0x40(%ebp) 10b76e: e8 e5 3a 00 00 call 10f258 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10b773: 83 c4 10 add $0x10,%esp 10b776: 8b 55 14 mov 0x14(%ebp),%edx 10b779: 85 d2 test %edx,%edx 10b77b: 8b 55 c0 mov -0x40(%ebp),%edx 10b77e: 74 48 je 10b7c8 *ovalue = ptimer->timer_data; 10b780: 8d 42 54 lea 0x54(%edx),%eax 10b783: b9 04 00 00 00 mov $0x4,%ecx 10b788: 8b 7d 14 mov 0x14(%ebp),%edi 10b78b: 89 c6 mov %eax,%esi 10b78d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10b78f: b9 04 00 00 00 mov $0x4,%ecx 10b794: 89 c7 mov %eax,%edi 10b796: 8b 75 c4 mov -0x3c(%ebp),%esi 10b799: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b79b: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10b79f: e8 60 29 00 00 call 10e104 <_Thread_Enable_dispatch> return 0; 10b7a4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7a6: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a9: 5b pop %ebx 10b7aa: 5e pop %esi 10b7ab: 5f pop %edi 10b7ac: c9 leave 10b7ad: c3 ret 10b7ae: 66 90 xchg %ax,%ax <== NOT EXECUTED ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10b7b0: e8 4f 29 00 00 call 10e104 <_Thread_Enable_dispatch> return 0; 10b7b5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7b7: 8d 65 f4 lea -0xc(%ebp),%esp 10b7ba: 5b pop %ebx 10b7bb: 5e pop %esi 10b7bc: 5f pop %edi 10b7bd: c9 leave 10b7be: c3 ret 10b7bf: 90 nop <== NOT EXECUTED 10b7c0: 8d 42 54 lea 0x54(%edx),%eax 10b7c3: e9 1a ff ff ff jmp 10b6e2 10b7c8: 8d 42 54 lea 0x54(%edx),%eax 10b7cb: eb c2 jmp 10b78f =============================================================================== 0010b3f0 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10b3f0: 55 push %ebp 10b3f1: 89 e5 mov %esp,%ebp 10b3f3: 56 push %esi 10b3f4: 53 push %ebx 10b3f5: 83 ec 10 sub $0x10,%esp 10b3f8: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10b3fb: 8b 0d fc 9c 12 00 mov 0x129cfc,%ecx 10b401: 85 c9 test %ecx,%ecx 10b403: 0f 84 8f 00 00 00 je 10b498 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10b409: 83 ec 0c sub $0xc,%esp 10b40c: 68 e0 9c 12 00 push $0x129ce0 10b411: e8 b6 39 00 00 call 10edcc <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10b416: 83 e8 02 sub $0x2,%eax 10b419: 83 c4 10 add $0x10,%esp 10b41c: 83 f8 01 cmp $0x1,%eax 10b41f: 0f 86 a3 00 00 00 jbe 10b4c8 <== ALWAYS TAKEN useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 10b425: 31 f6 xor %esi,%esi <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 10b427: 85 db test %ebx,%ebx 10b429: 74 62 je 10b48d Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10b42b: ba 83 de 1b 43 mov $0x431bde83,%edx 10b430: 89 d8 mov %ebx,%eax 10b432: f7 e2 mul %edx 10b434: c1 ea 12 shr $0x12,%edx 10b437: 89 55 f0 mov %edx,-0x10(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10b43a: 8d 04 92 lea (%edx,%edx,4),%eax 10b43d: 8d 04 80 lea (%eax,%eax,4),%eax 10b440: 8d 04 80 lea (%eax,%eax,4),%eax 10b443: 8d 04 80 lea (%eax,%eax,4),%eax 10b446: 8d 04 80 lea (%eax,%eax,4),%eax 10b449: 8d 04 80 lea (%eax,%eax,4),%eax 10b44c: c1 e0 06 shl $0x6,%eax 10b44f: 29 c3 sub %eax,%ebx 10b451: 8d 04 9b lea (%ebx,%ebx,4),%eax 10b454: 8d 04 80 lea (%eax,%eax,4),%eax 10b457: 8d 04 80 lea (%eax,%eax,4),%eax 10b45a: c1 e0 03 shl $0x3,%eax 10b45d: 89 45 f4 mov %eax,-0xc(%ebp) ticks = _Timespec_To_ticks( &tp ); 10b460: 83 ec 0c sub $0xc,%esp 10b463: 8d 5d f0 lea -0x10(%ebp),%ebx 10b466: 53 push %ebx 10b467: e8 bc 34 00 00 call 10e928 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10b46c: 89 1c 24 mov %ebx,(%esp) 10b46f: e8 b4 34 00 00 call 10e928 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b474: a3 ec 9c 12 00 mov %eax,0x129cec _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b479: 58 pop %eax 10b47a: 5a pop %edx 10b47b: 68 e0 9c 12 00 push $0x129ce0 10b480: 68 24 94 12 00 push $0x129424 10b485: e8 0a 38 00 00 call 10ec94 <_Watchdog_Insert> 10b48a: 83 c4 10 add $0x10,%esp } return remaining; } 10b48d: 89 f0 mov %esi,%eax 10b48f: 8d 65 f8 lea -0x8(%ebp),%esp 10b492: 5b pop %ebx 10b493: 5e pop %esi 10b494: c9 leave 10b495: c3 ret 10b496: 66 90 xchg %ax,%ax <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b498: c7 05 e8 9c 12 00 00 movl $0x0,0x129ce8 10b49f: 00 00 00 the_watchdog->routine = routine; 10b4a2: c7 05 fc 9c 12 00 b4 movl $0x10b3b4,0x129cfc 10b4a9: b3 10 00 the_watchdog->id = id; 10b4ac: c7 05 00 9d 12 00 00 movl $0x0,0x129d00 10b4b3: 00 00 00 the_watchdog->user_data = user_data; 10b4b6: c7 05 04 9d 12 00 00 movl $0x0,0x129d04 10b4bd: 00 00 00 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 10b4c0: 31 f6 xor %esi,%esi 10b4c2: e9 60 ff ff ff jmp 10b427 10b4c7: 90 nop <== NOT EXECUTED * 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); 10b4c8: a1 f4 9c 12 00 mov 0x129cf4,%eax 10b4cd: 03 05 ec 9c 12 00 add 0x129cec,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10b4d3: 83 ec 08 sub $0x8,%esp 10b4d6: 8d 55 f0 lea -0x10(%ebp),%edx 10b4d9: 52 push %edx * 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); 10b4da: 2b 05 f8 9c 12 00 sub 0x129cf8,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10b4e0: 50 push %eax 10b4e1: e8 ba 33 00 00 call 10e8a0 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10b4e6: 8b 45 f0 mov -0x10(%ebp),%eax 10b4e9: 8d 04 80 lea (%eax,%eax,4),%eax 10b4ec: 8d 04 80 lea (%eax,%eax,4),%eax 10b4ef: 8d 04 80 lea (%eax,%eax,4),%eax 10b4f2: 8d 04 80 lea (%eax,%eax,4),%eax 10b4f5: 8d 04 80 lea (%eax,%eax,4),%eax 10b4f8: 8d 0c 80 lea (%eax,%eax,4),%ecx 10b4fb: c1 e1 06 shl $0x6,%ecx remaining += tp.tv_nsec / 1000; 10b4fe: 8b 75 f4 mov -0xc(%ebp),%esi 10b501: b8 d3 4d 62 10 mov $0x10624dd3,%eax 10b506: f7 ee imul %esi 10b508: 89 d0 mov %edx,%eax 10b50a: c1 f8 06 sar $0x6,%eax 10b50d: c1 fe 1f sar $0x1f,%esi 10b510: 29 f0 sub %esi,%eax 10b512: 8d 34 08 lea (%eax,%ecx,1),%esi 10b515: 83 c4 10 add $0x10,%esp 10b518: e9 0a ff ff ff jmp 10b427