=============================================================================== 0010bf20 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10bf20: 55 push %ebp 10bf21: 89 e5 mov %esp,%ebp 10bf23: 53 push %ebx 10bf24: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bf27: 8b 1d 18 76 12 00 mov 0x127618,%ebx 10bf2d: 81 fb 1c 76 12 00 cmp $0x12761c,%ebx 10bf33: 74 10 je 10bf45 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10bf35: 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)(); 10bf38: 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 ) { 10bf3b: 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 ; 10bf3d: 81 fb 1c 76 12 00 cmp $0x12761c,%ebx 10bf43: 75 f3 jne 10bf38 <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10bf45: 58 pop %eax 10bf46: 5b pop %ebx 10bf47: c9 leave 10bf48: c3 ret =============================================================================== 0010bf4c <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bf4c: 55 push %ebp 10bf4d: 89 e5 mov %esp,%ebp 10bf4f: 53 push %ebx 10bf50: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bf53: 8b 1d 18 76 12 00 mov 0x127618,%ebx 10bf59: 81 fb 1c 76 12 00 cmp $0x12761c,%ebx 10bf5f: 74 1c je 10bf7d <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10bf61: 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 ); 10bf64: 83 ec 0c sub $0xc,%esp 10bf67: ff 35 98 79 12 00 pushl 0x127998 10bf6d: 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 ) { 10bf70: 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 ; 10bf72: 83 c4 10 add $0x10,%esp 10bf75: 81 fb 1c 76 12 00 cmp $0x12761c,%ebx 10bf7b: 75 e7 jne 10bf64 <_API_extensions_Run_postswitch+0x18> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bf7d: 8b 5d fc mov -0x4(%ebp),%ebx 10bf80: c9 leave 10bf81: c3 ret =============================================================================== 0010e27c <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e27c: 55 push %ebp 10e27d: 89 e5 mov %esp,%ebp 10e27f: 57 push %edi 10e280: 56 push %esi 10e281: 53 push %ebx 10e282: 83 ec 1c sub $0x1c,%esp 10e285: 8b 5d 08 mov 0x8(%ebp),%ebx 10e288: 8b 7d 0c mov 0xc(%ebp),%edi 10e28b: 8b 4d 14 mov 0x14(%ebp),%ecx 10e28e: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e291: 8b 35 b8 99 12 00 mov 0x1299b8,%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 ); 10e297: 9c pushf 10e298: fa cli 10e299: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10e29c: 8b 43 44 mov 0x44(%ebx),%eax 10e29f: 85 c0 test %eax,%eax 10e2a1: 75 1d jne 10e2c0 <_CORE_RWLock_Obtain_for_reading+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e2a3: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10e2aa: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e2ad: ff 75 e4 pushl -0x1c(%ebp) 10e2b0: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e2b1: 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 */ } 10e2b8: 8d 65 f4 lea -0xc(%ebp),%esp 10e2bb: 5b pop %ebx 10e2bc: 5e pop %esi 10e2bd: 5f pop %edi 10e2be: c9 leave 10e2bf: 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 ) { 10e2c0: 48 dec %eax 10e2c1: 74 51 je 10e314 <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e2c3: 84 d2 test %dl,%dl 10e2c5: 75 15 jne 10e2dc <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e2c7: ff 75 e4 pushl -0x1c(%ebp) 10e2ca: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e2cb: 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 */ } 10e2d2: 8d 65 f4 lea -0xc(%ebp),%esp 10e2d5: 5b pop %ebx 10e2d6: 5e pop %esi 10e2d7: 5f pop %edi 10e2d8: c9 leave 10e2d9: c3 ret 10e2da: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e2dc: 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; 10e2e3: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e2e6: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e2e9: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e2f0: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e2f7: ff 75 e4 pushl -0x1c(%ebp) 10e2fa: 9d popf _Thread_queue_Enqueue_with_handler( 10e2fb: c7 45 10 80 e4 10 00 movl $0x10e480,0x10(%ebp) 10e302: 89 4d 0c mov %ecx,0xc(%ebp) 10e305: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e308: 8d 65 f4 lea -0xc(%ebp),%esp 10e30b: 5b pop %ebx 10e30c: 5e pop %esi 10e30d: 5f pop %edi 10e30e: 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( 10e30f: e9 74 19 00 00 jmp 10fc88 <_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 ); 10e314: 83 ec 0c sub $0xc,%esp 10e317: 53 push %ebx 10e318: 88 55 e0 mov %dl,-0x20(%ebp) 10e31b: 89 4d dc mov %ecx,-0x24(%ebp) 10e31e: e8 ad 1c 00 00 call 10ffd0 <_Thread_queue_First> if ( !waiter ) { 10e323: 83 c4 10 add $0x10,%esp 10e326: 85 c0 test %eax,%eax 10e328: 8a 55 e0 mov -0x20(%ebp),%dl 10e32b: 8b 4d dc mov -0x24(%ebp),%ecx 10e32e: 75 93 jne 10e2c3 <_CORE_RWLock_Obtain_for_reading+0x47><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10e330: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e333: ff 75 e4 pushl -0x1c(%ebp) 10e336: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e337: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e33e: e9 75 ff ff ff jmp 10e2b8 <_CORE_RWLock_Obtain_for_reading+0x3c> =============================================================================== 0010e344 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e344: 55 push %ebp 10e345: 89 e5 mov %esp,%ebp 10e347: 57 push %edi 10e348: 56 push %esi 10e349: 53 push %ebx 10e34a: 83 ec 0c sub $0xc,%esp 10e34d: 8b 45 08 mov 0x8(%ebp),%eax 10e350: 8b 7d 0c mov 0xc(%ebp),%edi 10e353: 8b 75 14 mov 0x14(%ebp),%esi 10e356: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e359: 8b 15 b8 99 12 00 mov 0x1299b8,%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 ); 10e35f: 9c pushf 10e360: fa cli 10e361: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e362: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e366: 75 18 jne 10e380 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e368: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e36f: 51 push %ecx 10e370: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e371: 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 */ } 10e378: 83 c4 0c add $0xc,%esp 10e37b: 5b pop %ebx 10e37c: 5e pop %esi 10e37d: 5f pop %edi 10e37e: c9 leave 10e37f: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e380: 84 db test %bl,%bl 10e382: 75 14 jne 10e398 <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e384: 51 push %ecx 10e385: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e386: 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 */ } 10e38d: 83 c4 0c add $0xc,%esp 10e390: 5b pop %ebx 10e391: 5e pop %esi 10e392: 5f pop %edi 10e393: c9 leave 10e394: c3 ret 10e395: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10e398: 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; 10e39f: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e3a2: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e3a5: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e3ac: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e3b3: 51 push %ecx 10e3b4: 9d popf _Thread_queue_Enqueue_with_handler( 10e3b5: c7 45 10 80 e4 10 00 movl $0x10e480,0x10(%ebp) 10e3bc: 89 75 0c mov %esi,0xc(%ebp) 10e3bf: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e3c2: 83 c4 0c add $0xc,%esp 10e3c5: 5b pop %ebx 10e3c6: 5e pop %esi 10e3c7: 5f pop %edi 10e3c8: 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( 10e3c9: e9 ba 18 00 00 jmp 10fc88 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010e3d0 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e3d0: 55 push %ebp 10e3d1: 89 e5 mov %esp,%ebp 10e3d3: 53 push %ebx 10e3d4: 83 ec 04 sub $0x4,%esp 10e3d7: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e3da: 8b 0d b8 99 12 00 mov 0x1299b8,%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 ); 10e3e0: 9c pushf 10e3e1: fa cli 10e3e2: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e3e3: 8b 43 44 mov 0x44(%ebx),%eax 10e3e6: 85 c0 test %eax,%eax 10e3e8: 74 7a je 10e464 <_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 ) { 10e3ea: 48 dec %eax 10e3eb: 74 63 je 10e450 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e3ed: 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; 10e3f4: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e3fb: 52 push %edx 10e3fc: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e3fd: 83 ec 0c sub $0xc,%esp 10e400: 53 push %ebx 10e401: e8 5e 17 00 00 call 10fb64 <_Thread_queue_Dequeue> if ( next ) { 10e406: 83 c4 10 add $0x10,%esp 10e409: 85 c0 test %eax,%eax 10e40b: 74 39 je 10e446 <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e40d: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e411: 74 61 je 10e474 <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e413: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e416: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e41d: eb 17 jmp 10e436 <_CORE_RWLock_Release+0x66> 10e41f: 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 || 10e420: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e424: 74 20 je 10e446 <_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; 10e426: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e429: 83 ec 08 sub $0x8,%esp 10e42c: 50 push %eax 10e42d: 53 push %ebx 10e42e: e8 89 1a 00 00 call 10febc <_Thread_queue_Extract> } 10e433: 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 ); 10e436: 83 ec 0c sub $0xc,%esp 10e439: 53 push %ebx 10e43a: e8 91 1b 00 00 call 10ffd0 <_Thread_queue_First> if ( !next || 10e43f: 83 c4 10 add $0x10,%esp 10e442: 85 c0 test %eax,%eax 10e444: 75 da jne 10e420 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e446: 31 c0 xor %eax,%eax 10e448: 8b 5d fc mov -0x4(%ebp),%ebx 10e44b: c9 leave 10e44c: c3 ret 10e44d: 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; 10e450: 8b 43 48 mov 0x48(%ebx),%eax 10e453: 48 dec %eax 10e454: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e457: 85 c0 test %eax,%eax 10e459: 74 92 je 10e3ed <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e45b: 52 push %edx 10e45c: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e45d: 31 c0 xor %eax,%eax 10e45f: 8b 5d fc mov -0x4(%ebp),%ebx 10e462: c9 leave 10e463: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e464: 52 push %edx 10e465: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e466: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e46d: 31 c0 xor %eax,%eax 10e46f: 8b 5d fc mov -0x4(%ebp),%ebx 10e472: c9 leave 10e473: 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; 10e474: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e47b: eb c9 jmp 10e446 <_CORE_RWLock_Release+0x76> =============================================================================== 0010e480 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10e480: 55 push %ebp 10e481: 89 e5 mov %esp,%ebp 10e483: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e486: 8d 45 f4 lea -0xc(%ebp),%eax 10e489: 50 push %eax 10e48a: ff 75 08 pushl 0x8(%ebp) 10e48d: e8 2e 13 00 00 call 10f7c0 <_Thread_Get> switch ( location ) { 10e492: 83 c4 10 add $0x10,%esp 10e495: 8b 55 f4 mov -0xc(%ebp),%edx 10e498: 85 d2 test %edx,%edx 10e49a: 75 17 jne 10e4b3 <_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 ); 10e49c: 83 ec 0c sub $0xc,%esp 10e49f: 50 push %eax 10e4a0: e8 0b 1c 00 00 call 1100b0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e4a5: a1 f4 93 12 00 mov 0x1293f4,%eax 10e4aa: 48 dec %eax 10e4ab: a3 f4 93 12 00 mov %eax,0x1293f4 10e4b0: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e4b3: c9 leave 10e4b4: c3 ret =============================================================================== 0010d184 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 10d184: 55 push %ebp 10d185: 89 e5 mov %esp,%ebp 10d187: 57 push %edi 10d188: 56 push %esi 10d189: 53 push %ebx 10d18a: 83 ec 1c sub $0x1c,%esp 10d18d: 8b 45 08 mov 0x8(%ebp),%eax 10d190: 8b 5d 0c mov 0xc(%ebp),%ebx 10d193: 8b 75 14 mov 0x14(%ebp),%esi 10d196: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 10d199: 8b 15 b8 89 12 00 mov 0x1289b8,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 10d19f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 10d1a6: 9c pushf 10d1a7: fa cli 10d1a8: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 10d1ab: 8b 48 48 mov 0x48(%eax),%ecx 10d1ae: 41 inc %ecx 10d1af: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 10d1b2: 83 78 40 00 cmpl $0x0,0x40(%eax) 10d1b6: 75 05 jne 10d1bd <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == 10d1b8: 3b 48 44 cmp 0x44(%eax),%ecx 10d1bb: 74 2b je 10d1e8 <_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; 10d1bd: 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; 10d1c4: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10d1c7: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 10d1ca: ff 75 e4 pushl -0x1c(%ebp) 10d1cd: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10d1ce: c7 45 10 cc f0 10 00 movl $0x10f0cc,0x10(%ebp) 10d1d5: 89 75 0c mov %esi,0xc(%ebp) 10d1d8: 89 45 08 mov %eax,0x8(%ebp) } 10d1db: 83 c4 1c add $0x1c,%esp 10d1de: 5b pop %ebx 10d1df: 5e pop %esi 10d1e0: 5f pop %edi 10d1e1: 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 ); 10d1e2: e9 95 1b 00 00 jmp 10ed7c <_Thread_queue_Enqueue_with_handler> 10d1e7: 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; 10d1e8: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 10d1ef: ff 75 e4 pushl -0x1c(%ebp) 10d1f2: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10d1f3: 89 7d 10 mov %edi,0x10(%ebp) 10d1f6: 89 5d 0c mov %ebx,0xc(%ebp) 10d1f9: 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 ); } 10d1fc: 83 c4 1c add $0x1c,%esp 10d1ff: 5b pop %ebx 10d200: 5e pop %esi 10d201: 5f pop %edi 10d202: 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 ); 10d203: e9 48 4f 00 00 jmp 112150 <_CORE_barrier_Release> =============================================================================== 001199b8 <_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 ) { 1199b8: 55 push %ebp 1199b9: 89 e5 mov %esp,%ebp 1199bb: 57 push %edi 1199bc: 56 push %esi 1199bd: 53 push %ebx 1199be: 83 ec 1c sub $0x1c,%esp 1199c1: 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 ) { 1199c4: 8b 45 10 mov 0x10(%ebp),%eax 1199c7: 39 43 4c cmp %eax,0x4c(%ebx) 1199ca: 72 60 jb 119a2c <_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 ) { 1199cc: 8b 43 48 mov 0x48(%ebx),%eax 1199cf: 85 c0 test %eax,%eax 1199d1: 75 45 jne 119a18 <_CORE_message_queue_Broadcast+0x60> 1199d3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1199da: eb 18 jmp 1199f4 <_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; 1199dc: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1199df: 8b 42 2c mov 0x2c(%edx),%eax 1199e2: 89 c7 mov %eax,%edi 1199e4: 8b 75 0c mov 0xc(%ebp),%esi 1199e7: 8b 4d 10 mov 0x10(%ebp),%ecx 1199ea: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1199ec: 8b 42 28 mov 0x28(%edx),%eax 1199ef: 8b 55 10 mov 0x10(%ebp),%edx 1199f2: 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 = 1199f4: 83 ec 0c sub $0xc,%esp 1199f7: 53 push %ebx 1199f8: e8 ef 25 00 00 call 11bfec <_Thread_queue_Dequeue> 1199fd: 89 c2 mov %eax,%edx 1199ff: 83 c4 10 add $0x10,%esp 119a02: 85 c0 test %eax,%eax 119a04: 75 d6 jne 1199dc <_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; 119a06: 8b 55 e4 mov -0x1c(%ebp),%edx 119a09: 8b 45 1c mov 0x1c(%ebp),%eax 119a0c: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 119a0e: 31 c0 xor %eax,%eax } 119a10: 8d 65 f4 lea -0xc(%ebp),%esp 119a13: 5b pop %ebx 119a14: 5e pop %esi 119a15: 5f pop %edi 119a16: c9 leave 119a17: 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; 119a18: 8b 55 1c mov 0x1c(%ebp),%edx 119a1b: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 119a21: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119a23: 8d 65 f4 lea -0xc(%ebp),%esp 119a26: 5b pop %ebx 119a27: 5e pop %esi 119a28: 5f pop %edi 119a29: c9 leave 119a2a: c3 ret 119a2b: 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; 119a2c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119a31: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 119a34: 5b pop %ebx <== NOT EXECUTED 119a35: 5e pop %esi <== NOT EXECUTED 119a36: 5f pop %edi <== NOT EXECUTED 119a37: c9 leave <== NOT EXECUTED 119a38: c3 ret <== NOT EXECUTED =============================================================================== 00114a94 <_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 ) { 114a94: 55 push %ebp 114a95: 89 e5 mov %esp,%ebp 114a97: 57 push %edi 114a98: 56 push %esi 114a99: 53 push %ebx 114a9a: 83 ec 0c sub $0xc,%esp 114a9d: 8b 5d 08 mov 0x8(%ebp),%ebx 114aa0: 8b 75 10 mov 0x10(%ebp),%esi 114aa3: 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; 114aa6: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114aa9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114ab0: 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; 114ab3: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 114aba: 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)) { 114ac1: a8 03 test $0x3,%al 114ac3: 74 17 je 114adc <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); 114ac5: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114ac8: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114acb: 39 d0 cmp %edx,%eax 114acd: 76 0f jbe 114ade <_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; 114acf: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 114ad1: 8d 65 f4 lea -0xc(%ebp),%esp 114ad4: 5b pop %ebx 114ad5: 5e pop %esi 114ad6: 5f pop %edi 114ad7: c9 leave 114ad8: c3 ret 114ad9: 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)) { 114adc: 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)); 114ade: 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 * 114ae1: 89 f8 mov %edi,%eax 114ae3: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114ae6: 39 d0 cmp %edx,%eax 114ae8: 72 e5 jb 114acf <_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 ); 114aea: 83 ec 0c sub $0xc,%esp 114aed: 50 push %eax 114aee: e8 65 2a 00 00 call 117558 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114af3: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114af6: 83 c4 10 add $0x10,%esp 114af9: 85 c0 test %eax,%eax 114afb: 74 d2 je 114acf <_CORE_message_queue_Initialize+0x3b> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114afd: 57 push %edi 114afe: 56 push %esi 114aff: 50 push %eax 114b00: 8d 43 68 lea 0x68(%ebx),%eax 114b03: 50 push %eax 114b04: e8 ff 50 00 00 call 119c08 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114b09: 8d 43 54 lea 0x54(%ebx),%eax 114b0c: 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; 114b0f: 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 ); 114b16: 8d 43 50 lea 0x50(%ebx),%eax 114b19: 89 43 58 mov %eax,0x58(%ebx) _Thread_queue_Initialize( 114b1c: 6a 06 push $0x6 114b1e: 68 80 00 00 00 push $0x80 114b23: 8b 45 0c mov 0xc(%ebp),%eax 114b26: 83 38 01 cmpl $0x1,(%eax) 114b29: 0f 94 c0 sete %al 114b2c: 0f b6 c0 movzbl %al,%eax 114b2f: 50 push %eax 114b30: 53 push %ebx 114b31: e8 ba 1f 00 00 call 116af0 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114b36: 83 c4 20 add $0x20,%esp 114b39: b0 01 mov $0x1,%al } 114b3b: 8d 65 f4 lea -0xc(%ebp),%esp 114b3e: 5b pop %ebx 114b3f: 5e pop %esi 114b40: 5f pop %edi 114b41: c9 leave 114b42: c3 ret =============================================================================== 00111000 <_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 ) { 111000: 55 push %ebp 111001: 89 e5 mov %esp,%ebp 111003: 56 push %esi 111004: 53 push %ebx 111005: 8b 45 08 mov 0x8(%ebp),%eax 111008: 8b 55 0c mov 0xc(%ebp),%edx 11100b: 8b 4d 10 mov 0x10(%ebp),%ecx 11100e: 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 ) { 111011: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 111017: 74 53 je 11106c <_CORE_message_queue_Insert_message+0x6c> _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 ) { 111019: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 11101f: 74 6f je 111090 <_CORE_message_queue_Insert_message+0x90> 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; 111021: 8b 58 50 mov 0x50(%eax),%ebx 111024: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 111027: 39 f3 cmp %esi,%ebx 111029: 74 05 je 111030 <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 11102b: 3b 4b 08 cmp 0x8(%ebx),%ecx 11102e: 7d 2c jge 11105c <_CORE_message_queue_Insert_message+0x5c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 111030: 9c pushf 111031: fa cli 111032: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 111033: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 111036: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 111039: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 11103c: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 11103e: 89 11 mov %edx,(%ecx) the_node->next = before_node; 111040: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 111042: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 111045: 56 push %esi 111046: 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 ) 111047: 8b 50 60 mov 0x60(%eax),%edx 11104a: 85 d2 test %edx,%edx 11104c: 74 3d je 11108b <_CORE_message_queue_Insert_message+0x8b> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 11104e: 8b 40 64 mov 0x64(%eax),%eax 111051: 89 45 08 mov %eax,0x8(%ebp) #endif } 111054: 5b pop %ebx 111055: 5e pop %esi 111056: 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); 111057: ff e2 jmp *%edx 111059: 8d 76 00 lea 0x0(%esi),%esi <== 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; 11105c: 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 ) ) { 11105e: 39 f3 cmp %esi,%ebx 111060: 74 ce je 111030 <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 111062: 3b 4b 08 cmp 0x8(%ebx),%ecx 111065: 7c c9 jl 111030 <_CORE_message_queue_Insert_message+0x30> 111067: eb f3 jmp 11105c <_CORE_message_queue_Insert_message+0x5c> 111069: 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 ); 11106c: 9c pushf 11106d: fa cli 11106e: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 11106f: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111072: 8d 48 54 lea 0x54(%eax),%ecx 111075: 89 0a mov %ecx,(%edx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 111077: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 11107a: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 11107d: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 11107f: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 111082: 53 push %ebx 111083: 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 ) 111084: 8b 50 60 mov 0x60(%eax),%edx 111087: 85 d2 test %edx,%edx 111089: 75 c3 jne 11104e <_CORE_message_queue_Insert_message+0x4e><== NEVER TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 11108b: 5b pop %ebx 11108c: 5e pop %esi 11108d: c9 leave 11108e: c3 ret 11108f: 90 nop <== NOT EXECUTED SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 111090: 9c pushf 111091: fa cli 111092: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 111093: ff 40 48 incl 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( 111096: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 111099: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 11109c: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 11109f: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 1110a2: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 1110a4: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 1110a7: 53 push %ebx 1110a8: 9d popf 1110a9: eb 9c jmp 111047 <_CORE_message_queue_Insert_message+0x47> =============================================================================== 00114b44 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114b44: 55 push %ebp 114b45: 89 e5 mov %esp,%ebp 114b47: 57 push %edi 114b48: 56 push %esi 114b49: 53 push %ebx 114b4a: 83 ec 2c sub $0x2c,%esp 114b4d: 8b 55 08 mov 0x8(%ebp),%edx 114b50: 8b 45 0c mov 0xc(%ebp),%eax 114b53: 89 45 dc mov %eax,-0x24(%ebp) 114b56: 8b 4d 10 mov 0x10(%ebp),%ecx 114b59: 89 4d e0 mov %ecx,-0x20(%ebp) 114b5c: 8b 45 14 mov 0x14(%ebp),%eax 114b5f: 8b 5d 1c mov 0x1c(%ebp),%ebx 114b62: 89 5d d8 mov %ebx,-0x28(%ebp) 114b65: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114b69: 8b 0d 98 12 13 00 mov 0x131298,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114b6f: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114b76: 9c pushf 114b77: fa cli 114b78: 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)); 114b7b: 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; 114b7e: 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)) 114b81: 39 f3 cmp %esi,%ebx 114b83: 74 7b je 114c00 <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114b85: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 114b87: 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 ); 114b8a: 8d 72 50 lea 0x50(%edx),%esi 114b8d: 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; 114b90: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 114b93: ff 75 e4 pushl -0x1c(%ebp) 114b96: 9d popf *size_p = the_message->Contents.size; 114b97: 8b 4b 0c mov 0xc(%ebx),%ecx 114b9a: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 114b9c: 8b 73 08 mov 0x8(%ebx),%esi 114b9f: 8b 0d 98 12 13 00 mov 0x131298,%ecx 114ba5: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114ba8: 8d 4b 10 lea 0x10(%ebx),%ecx 114bab: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114bae: 8b 08 mov (%eax),%ecx 114bb0: 8b 7d e0 mov -0x20(%ebp),%edi 114bb3: 8b 75 e4 mov -0x1c(%ebp),%esi 114bb6: 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 ); 114bb8: 83 ec 0c sub $0xc,%esp 114bbb: 52 push %edx 114bbc: 89 55 d4 mov %edx,-0x2c(%ebp) 114bbf: e8 7c 1b 00 00 call 116740 <_Thread_queue_Dequeue> if ( !the_thread ) { 114bc4: 83 c4 10 add $0x10,%esp 114bc7: 85 c0 test %eax,%eax 114bc9: 8b 55 d4 mov -0x2c(%ebp),%edx 114bcc: 0f 84 86 00 00 00 je 114c58 <_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; 114bd2: 8b 48 24 mov 0x24(%eax),%ecx 114bd5: 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; 114bd8: 8b 48 30 mov 0x30(%eax),%ecx 114bdb: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114bde: 8b 70 2c mov 0x2c(%eax),%esi 114be1: 8b 7d e4 mov -0x1c(%ebp),%edi 114be4: 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( 114be6: 8b 43 08 mov 0x8(%ebx),%eax 114be9: 89 45 10 mov %eax,0x10(%ebp) 114bec: 89 5d 0c mov %ebx,0xc(%ebp) 114bef: 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 ); } 114bf2: 8d 65 f4 lea -0xc(%ebp),%esp 114bf5: 5b pop %ebx 114bf6: 5e pop %esi 114bf7: 5f pop %edi 114bf8: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 114bf9: e9 56 50 00 00 jmp 119c54 <_CORE_message_queue_Insert_message> 114bfe: 66 90 xchg %ax,%ax <== NOT EXECUTED return; } #endif } if ( !wait ) { 114c00: 89 fb mov %edi,%ebx 114c02: 84 db test %bl,%bl 114c04: 75 16 jne 114c1c <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 114c06: ff 75 e4 pushl -0x1c(%ebp) 114c09: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114c0a: 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 ); } 114c11: 8d 65 f4 lea -0xc(%ebp),%esp 114c14: 5b pop %ebx 114c15: 5e pop %esi 114c16: 5f pop %edi 114c17: c9 leave 114c18: c3 ret 114c19: 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; 114c1c: 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; 114c23: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 114c26: 8b 5d dc mov -0x24(%ebp),%ebx 114c29: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114c2c: 8b 5d e0 mov -0x20(%ebp),%ebx 114c2f: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114c32: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114c35: ff 75 e4 pushl -0x1c(%ebp) 114c38: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114c39: c7 45 10 b4 6b 11 00 movl $0x116bb4,0x10(%ebp) 114c40: 8b 45 d8 mov -0x28(%ebp),%eax 114c43: 89 45 0c mov %eax,0xc(%ebp) 114c46: 89 55 08 mov %edx,0x8(%ebp) } 114c49: 8d 65 f4 lea -0xc(%ebp),%esp 114c4c: 5b pop %ebx 114c4d: 5e pop %esi 114c4e: 5f pop %edi 114c4f: 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 ); 114c50: e9 0f 1c 00 00 jmp 116864 <_Thread_queue_Enqueue_with_handler> 114c55: 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 ); 114c58: 89 5d 0c mov %ebx,0xc(%ebp) 114c5b: 83 c2 68 add $0x68,%edx 114c5e: 89 55 08 mov %edx,0x8(%ebp) } 114c61: 8d 65 f4 lea -0xc(%ebp),%esp 114c64: 5b pop %ebx 114c65: 5e pop %esi 114c66: 5f pop %edi 114c67: c9 leave 114c68: e9 a7 fd ff ff jmp 114a14 <_Chain_Append> =============================================================================== 0010c0b4 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c0b4: 55 push %ebp 10c0b5: 89 e5 mov %esp,%ebp 10c0b7: 57 push %edi 10c0b8: 56 push %esi 10c0b9: 53 push %ebx 10c0ba: 83 ec 1c sub $0x1c,%esp 10c0bd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c0c0: 8b 75 0c mov 0xc(%ebp),%esi 10c0c3: 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 ) { 10c0c6: 8b 45 10 mov 0x10(%ebp),%eax 10c0c9: 39 43 4c cmp %eax,0x4c(%ebx) 10c0cc: 72 32 jb 10c100 <_CORE_message_queue_Submit+0x4c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c0ce: 8b 43 48 mov 0x48(%ebx),%eax 10c0d1: 85 c0 test %eax,%eax 10c0d3: 74 3b je 10c110 <_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 < 10c0d5: 39 43 44 cmp %eax,0x44(%ebx) 10c0d8: 0f 87 ba 00 00 00 ja 10c198 <_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 ) { 10c0de: 84 c9 test %cl,%cl 10c0e0: 0f 84 ee 00 00 00 je 10c1d4 <_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() ) { 10c0e6: 8b 15 94 79 12 00 mov 0x127994,%edx 10c0ec: 85 d2 test %edx,%edx 10c0ee: 74 60 je 10c150 <_CORE_message_queue_Submit+0x9c> return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; 10c0f0: 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 } 10c0f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c0f8: 5b pop %ebx 10c0f9: 5e pop %esi 10c0fa: 5f pop %edi 10c0fb: c9 leave 10c0fc: c3 ret 10c0fd: 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; 10c100: 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 } 10c105: 8d 65 f4 lea -0xc(%ebp),%esp 10c108: 5b pop %ebx 10c109: 5e pop %esi 10c10a: 5f pop %edi 10c10b: c9 leave 10c10c: c3 ret 10c10d: 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 ); 10c110: 83 ec 0c sub $0xc,%esp 10c113: 53 push %ebx 10c114: 88 4d e4 mov %cl,-0x1c(%ebp) 10c117: e8 e8 19 00 00 call 10db04 <_Thread_queue_Dequeue> 10c11c: 89 c2 mov %eax,%edx if ( the_thread ) { 10c11e: 83 c4 10 add $0x10,%esp 10c121: 85 c0 test %eax,%eax 10c123: 8a 4d e4 mov -0x1c(%ebp),%cl 10c126: 0f 84 b8 00 00 00 je 10c1e4 <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c12c: 8b 40 2c mov 0x2c(%eax),%eax 10c12f: 89 c7 mov %eax,%edi 10c131: 8b 4d 10 mov 0x10(%ebp),%ecx 10c134: 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; 10c136: 8b 42 28 mov 0x28(%edx),%eax 10c139: 8b 4d 10 mov 0x10(%ebp),%ecx 10c13c: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c13e: 8b 45 1c mov 0x1c(%ebp),%eax 10c141: 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; 10c144: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c146: 8d 65 f4 lea -0xc(%ebp),%esp 10c149: 5b pop %ebx 10c14a: 5e pop %esi 10c14b: 5f pop %edi 10c14c: c9 leave 10c14d: c3 ret 10c14e: 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; 10c150: a1 98 79 12 00 mov 0x127998,%eax ISR_Level level; _ISR_Disable( level ); 10c155: 9c pushf 10c156: fa cli 10c157: 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; 10c158: 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; 10c15f: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10c162: 8b 55 14 mov 0x14(%ebp),%edx 10c165: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10c168: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10c16b: 8b 55 10 mov 0x10(%ebp),%edx 10c16e: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10c171: 8b 55 1c mov 0x1c(%ebp),%edx 10c174: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10c177: 51 push %ecx 10c178: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10c179: 50 push %eax 10c17a: 68 78 df 10 00 push $0x10df78 10c17f: ff 75 24 pushl 0x24(%ebp) 10c182: 53 push %ebx 10c183: e8 a0 1a 00 00 call 10dc28 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10c188: 83 c4 10 add $0x10,%esp 10c18b: b8 07 00 00 00 mov $0x7,%eax #endif } 10c190: 8d 65 f4 lea -0xc(%ebp),%esp 10c193: 5b pop %ebx 10c194: 5e pop %esi 10c195: 5f pop %edi 10c196: c9 leave 10c197: 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 ); 10c198: 83 ec 0c sub $0xc,%esp 10c19b: 8d 43 68 lea 0x68(%ebx),%eax 10c19e: 50 push %eax 10c19f: e8 ec fe ff ff call 10c090 <_Chain_Get> 10c1a4: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10c1a6: 8d 40 10 lea 0x10(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c1a9: 89 c7 mov %eax,%edi 10c1ab: 8b 4d 10 mov 0x10(%ebp),%ecx 10c1ae: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c1b0: 8b 4d 10 mov 0x10(%ebp),%ecx 10c1b3: 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; 10c1b6: 8b 45 1c mov 0x1c(%ebp),%eax 10c1b9: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c1bc: 83 c4 0c add $0xc,%esp 10c1bf: 50 push %eax 10c1c0: 52 push %edx 10c1c1: 53 push %ebx 10c1c2: e8 39 4e 00 00 call 111000 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c1c7: 83 c4 10 add $0x10,%esp 10c1ca: 31 c0 xor %eax,%eax 10c1cc: e9 34 ff ff ff jmp 10c105 <_CORE_message_queue_Submit+0x51> 10c1d1: 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; 10c1d4: 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 } 10c1d9: 8d 65 f4 lea -0xc(%ebp),%esp 10c1dc: 5b pop %ebx 10c1dd: 5e pop %esi 10c1de: 5f pop %edi 10c1df: c9 leave 10c1e0: c3 ret 10c1e1: 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 ) { 10c1e4: 8b 43 48 mov 0x48(%ebx),%eax 10c1e7: e9 e9 fe ff ff jmp 10c0d5 <_CORE_message_queue_Submit+0x21> =============================================================================== 0010c1f8 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c1f8: 55 push %ebp 10c1f9: 89 e5 mov %esp,%ebp 10c1fb: 57 push %edi 10c1fc: 56 push %esi 10c1fd: 53 push %ebx 10c1fe: 83 ec 0c sub $0xc,%esp 10c201: 8b 45 08 mov 0x8(%ebp),%eax 10c204: 8b 5d 0c mov 0xc(%ebp),%ebx 10c207: 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; 10c20a: 8d 78 40 lea 0x40(%eax),%edi 10c20d: b9 04 00 00 00 mov $0x4,%ecx 10c212: 89 de mov %ebx,%esi 10c214: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c216: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c219: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c220: 85 d2 test %edx,%edx 10c222: 75 30 jne 10c254 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c224: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c22b: 8b 15 98 79 12 00 mov 0x127998,%edx 10c231: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c234: 8b 4a 08 mov 0x8(%edx),%ecx 10c237: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c23a: 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 ) || 10c23d: 83 f9 02 cmp $0x2,%ecx 10c240: 74 05 je 10c247 <_CORE_mutex_Initialize+0x4f> 10c242: 83 f9 03 cmp $0x3,%ecx 10c245: 75 22 jne 10c269 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c247: 8b 48 4c mov 0x4c(%eax),%ecx 10c24a: 39 4a 14 cmp %ecx,0x14(%edx) 10c24d: 72 41 jb 10c290 <_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++; 10c24f: ff 42 1c incl 0x1c(%edx) 10c252: eb 15 jmp 10c269 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c254: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c25b: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c262: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c269: 6a 05 push $0x5 10c26b: 68 00 04 00 00 push $0x400 10c270: 31 d2 xor %edx,%edx 10c272: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c276: 0f 95 c2 setne %dl 10c279: 52 push %edx 10c27a: 50 push %eax 10c27b: e8 34 1c 00 00 call 10deb4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c280: 83 c4 10 add $0x10,%esp 10c283: 31 c0 xor %eax,%eax } 10c285: 8d 65 f4 lea -0xc(%ebp),%esp 10c288: 5b pop %ebx 10c289: 5e pop %esi 10c28a: 5f pop %edi 10c28b: c9 leave 10c28c: c3 ret 10c28d: 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; 10c290: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c295: 8d 65 f4 lea -0xc(%ebp),%esp 10c298: 5b pop %ebx 10c299: 5e pop %esi 10c29a: 5f pop %edi 10c29b: c9 leave 10c29c: c3 ret =============================================================================== 0010c2f0 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c2f0: 55 push %ebp 10c2f1: 89 e5 mov %esp,%ebp 10c2f3: 53 push %ebx 10c2f4: 83 ec 14 sub $0x14,%esp 10c2f7: 8b 5d 08 mov 0x8(%ebp),%ebx 10c2fa: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c2fd: a1 d4 73 12 00 mov 0x1273d4,%eax 10c302: 85 c0 test %eax,%eax 10c304: 74 04 je 10c30a <_CORE_mutex_Seize+0x1a> 10c306: 84 d2 test %dl,%dl 10c308: 75 36 jne 10c340 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c30a: 83 ec 08 sub $0x8,%esp 10c30d: 8d 45 18 lea 0x18(%ebp),%eax 10c310: 50 push %eax 10c311: 53 push %ebx 10c312: 88 55 f4 mov %dl,-0xc(%ebp) 10c315: e8 92 4d 00 00 call 1110ac <_CORE_mutex_Seize_interrupt_trylock> 10c31a: 83 c4 10 add $0x10,%esp 10c31d: 85 c0 test %eax,%eax 10c31f: 8a 55 f4 mov -0xc(%ebp),%dl 10c322: 74 14 je 10c338 <_CORE_mutex_Seize+0x48> 10c324: 84 d2 test %dl,%dl 10c326: 75 30 jne 10c358 <_CORE_mutex_Seize+0x68> 10c328: ff 75 18 pushl 0x18(%ebp) 10c32b: 9d popf 10c32c: a1 98 79 12 00 mov 0x127998,%eax 10c331: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c338: 8b 5d fc mov -0x4(%ebp),%ebx 10c33b: c9 leave 10c33c: c3 ret 10c33d: 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 ); 10c340: 83 3d 80 75 12 00 01 cmpl $0x1,0x127580 10c347: 76 c1 jbe 10c30a <_CORE_mutex_Seize+0x1a> 10c349: 53 push %ebx 10c34a: 6a 12 push $0x12 10c34c: 6a 00 push $0x0 10c34e: 6a 00 push $0x0 10c350: e8 17 06 00 00 call 10c96c <_Internal_error_Occurred> 10c355: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c358: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c35f: a1 98 79 12 00 mov 0x127998,%eax 10c364: 89 58 44 mov %ebx,0x44(%eax) 10c367: 8b 55 0c mov 0xc(%ebp),%edx 10c36a: 89 50 20 mov %edx,0x20(%eax) 10c36d: a1 d4 73 12 00 mov 0x1273d4,%eax 10c372: 40 inc %eax 10c373: a3 d4 73 12 00 mov %eax,0x1273d4 10c378: ff 75 18 pushl 0x18(%ebp) 10c37b: 9d popf 10c37c: 83 ec 08 sub $0x8,%esp 10c37f: ff 75 14 pushl 0x14(%ebp) 10c382: 53 push %ebx 10c383: e8 18 ff ff ff call 10c2a0 <_CORE_mutex_Seize_interrupt_blocking> 10c388: 83 c4 10 add $0x10,%esp } 10c38b: 8b 5d fc mov -0x4(%ebp),%ebx 10c38e: c9 leave 10c38f: c3 ret =============================================================================== 001110ac <_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 ) { 1110ac: 55 push %ebp 1110ad: 89 e5 mov %esp,%ebp 1110af: 56 push %esi 1110b0: 53 push %ebx 1110b1: 8b 45 08 mov 0x8(%ebp),%eax 1110b4: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 1110b7: 8b 15 98 79 12 00 mov 0x127998,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1110bd: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 1110c4: 8b 58 50 mov 0x50(%eax),%ebx 1110c7: 85 db test %ebx,%ebx 1110c9: 74 31 je 1110fc <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 1110cb: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 1110d2: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 1110d5: 8b 5a 08 mov 0x8(%edx),%ebx 1110d8: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 1110db: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 1110e2: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 1110e5: 83 fb 02 cmp $0x2,%ebx 1110e8: 74 26 je 111110 <_CORE_mutex_Seize_interrupt_trylock+0x64> 1110ea: 83 fb 03 cmp $0x3,%ebx 1110ed: 74 3d je 11112c <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 1110ef: ff 31 pushl (%ecx) 1110f1: 9d popf return 0; 1110f2: 31 c0 xor %eax,%eax 1110f4: 8d 65 f8 lea -0x8(%ebp),%esp 1110f7: 5b pop %ebx 1110f8: 5e pop %esi 1110f9: c9 leave 1110fa: c3 ret 1110fb: 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 ) ) { 1110fc: 3b 50 5c cmp 0x5c(%eax),%edx 1110ff: 74 17 je 111118 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 111101: b8 01 00 00 00 mov $0x1,%eax 111106: 8d 65 f8 lea -0x8(%ebp),%esp 111109: 5b pop %ebx 11110a: 5e pop %esi 11110b: c9 leave 11110c: c3 ret 11110d: 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++; 111110: ff 42 1c incl 0x1c(%edx) 111113: eb da jmp 1110ef <_CORE_mutex_Seize_interrupt_trylock+0x43> 111115: 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 ) { 111118: 8b 58 40 mov 0x40(%eax),%ebx 11111b: 85 db test %ebx,%ebx 11111d: 75 45 jne 111164 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11111f: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 111122: ff 31 pushl (%ecx) 111124: 9d popf return 0; 111125: 31 c0 xor %eax,%eax 111127: eb dd jmp 111106 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 111129: 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++; 11112c: 8b 5a 1c mov 0x1c(%edx),%ebx 11112f: 8d 73 01 lea 0x1(%ebx),%esi 111132: 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 ) { 111135: 8b 72 14 mov 0x14(%edx),%esi 111138: 39 70 4c cmp %esi,0x4c(%eax) 11113b: 74 6b je 1111a8 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 11113d: 72 39 jb 111178 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 11113f: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 111146: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 11114d: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 111154: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 111157: ff 31 pushl (%ecx) 111159: 9d popf return 0; 11115a: 31 c0 xor %eax,%eax 11115c: 8d 65 f8 lea -0x8(%ebp),%esp 11115f: 5b pop %ebx 111160: 5e pop %esi 111161: c9 leave 111162: c3 ret 111163: 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 ) { 111164: 4b dec %ebx 111165: 75 9a jne 111101 <_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; 111167: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 11116e: ff 31 pushl (%ecx) 111170: 9d popf return 0; 111171: 31 c0 xor %eax,%eax 111173: eb 91 jmp 111106 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 111175: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 111178: 8b 15 d4 73 12 00 mov 0x1273d4,%edx 11117e: 42 inc %edx 11117f: 89 15 d4 73 12 00 mov %edx,0x1273d4 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 111185: ff 31 pushl (%ecx) 111187: 9d popf _Thread_Change_priority( 111188: 52 push %edx 111189: 6a 00 push $0x0 11118b: ff 70 4c pushl 0x4c(%eax) 11118e: ff 70 5c pushl 0x5c(%eax) 111191: e8 a2 c0 ff ff call 10d238 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 111196: e8 a1 c5 ff ff call 10d73c <_Thread_Enable_dispatch> 11119b: 83 c4 10 add $0x10,%esp return 0; 11119e: 31 c0 xor %eax,%eax 1111a0: e9 61 ff ff ff jmp 111106 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1111a5: 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 ); 1111a8: ff 31 pushl (%ecx) 1111aa: 9d popf return 0; 1111ab: 31 c0 xor %eax,%eax 1111ad: e9 54 ff ff ff jmp 111106 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c390 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c390: 55 push %ebp 10c391: 89 e5 mov %esp,%ebp 10c393: 53 push %ebx 10c394: 83 ec 04 sub $0x4,%esp 10c397: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c39a: 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 ) { 10c39d: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c3a1: 74 15 je 10c3b8 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c3a3: 3b 05 98 79 12 00 cmp 0x127998,%eax 10c3a9: 74 0d je 10c3b8 <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c3ab: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c3b0: 8b 5d fc mov -0x4(%ebp),%ebx 10c3b3: c9 leave 10c3b4: c3 ret 10c3b5: 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 ) 10c3b8: 8b 53 54 mov 0x54(%ebx),%edx 10c3bb: 85 d2 test %edx,%edx 10c3bd: 74 51 je 10c410 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c3bf: 4a dec %edx 10c3c0: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c3c3: 85 d2 test %edx,%edx 10c3c5: 75 49 jne 10c410 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c3c7: 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 ) || 10c3ca: 83 fa 02 cmp $0x2,%edx 10c3cd: 74 69 je 10c438 <_CORE_mutex_Surrender+0xa8> 10c3cf: 83 fa 03 cmp $0x3,%edx 10c3d2: 74 64 je 10c438 <_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; 10c3d4: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c3db: 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 ) ) ) { 10c3e2: 83 ec 0c sub $0xc,%esp 10c3e5: 53 push %ebx 10c3e6: e8 19 17 00 00 call 10db04 <_Thread_queue_Dequeue> 10c3eb: 83 c4 10 add $0x10,%esp 10c3ee: 85 c0 test %eax,%eax 10c3f0: 74 7a je 10c46c <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c3f2: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c3f5: 8b 50 08 mov 0x8(%eax),%edx 10c3f8: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c3fb: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c402: 8b 53 48 mov 0x48(%ebx),%edx 10c405: 83 fa 02 cmp $0x2,%edx 10c408: 74 56 je 10c460 <_CORE_mutex_Surrender+0xd0> 10c40a: 83 fa 03 cmp $0x3,%edx 10c40d: 74 09 je 10c418 <_CORE_mutex_Surrender+0x88> 10c40f: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c410: 31 c0 xor %eax,%eax } 10c412: 8b 5d fc mov -0x4(%ebp),%ebx 10c415: c9 leave 10c416: c3 ret 10c417: 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++; 10c418: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c41b: 8b 53 4c mov 0x4c(%ebx),%edx 10c41e: 3b 50 14 cmp 0x14(%eax),%edx 10c421: 73 ed jae 10c410 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c423: 51 push %ecx 10c424: 6a 00 push $0x0 10c426: 52 push %edx 10c427: 50 push %eax 10c428: e8 0b 0e 00 00 call 10d238 <_Thread_Change_priority> 10c42d: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c430: 31 c0 xor %eax,%eax 10c432: e9 79 ff ff ff jmp 10c3b0 <_CORE_mutex_Surrender+0x20> 10c437: 90 nop <== NOT EXECUTED _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c438: 8b 50 1c mov 0x1c(%eax),%edx 10c43b: 4a dec %edx 10c43c: 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 && 10c43f: 85 d2 test %edx,%edx 10c441: 75 91 jne 10c3d4 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c443: 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 && 10c446: 3b 50 14 cmp 0x14(%eax),%edx 10c449: 74 89 je 10c3d4 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c44b: 51 push %ecx 10c44c: 6a 01 push $0x1 10c44e: 52 push %edx 10c44f: 50 push %eax 10c450: e8 e3 0d 00 00 call 10d238 <_Thread_Change_priority> 10c455: 83 c4 10 add $0x10,%esp 10c458: e9 77 ff ff ff jmp 10c3d4 <_CORE_mutex_Surrender+0x44> 10c45d: 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++; 10c460: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c463: 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; 10c465: e9 46 ff ff ff jmp 10c3b0 <_CORE_mutex_Surrender+0x20> 10c46a: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c46c: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c473: 31 c0 xor %eax,%eax 10c475: e9 36 ff ff ff jmp 10c3b0 <_CORE_mutex_Surrender+0x20> =============================================================================== 0011519c <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 11519c: 55 push %ebp 11519d: 89 e5 mov %esp,%ebp 11519f: 57 push %edi 1151a0: 56 push %esi 1151a1: 53 push %ebx 1151a2: 83 ec 1c sub $0x1c,%esp 1151a5: 8b 45 08 mov 0x8(%ebp),%eax 1151a8: 8b 7d 0c mov 0xc(%ebp),%edi 1151ab: 8b 75 14 mov 0x14(%ebp),%esi 1151ae: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 1151b1: 8b 15 58 d9 12 00 mov 0x12d958,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 1151b7: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 1151be: 9c pushf 1151bf: fa cli 1151c0: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 1151c3: 8b 48 48 mov 0x48(%eax),%ecx 1151c6: 85 c9 test %ecx,%ecx 1151c8: 75 46 jne 115210 <_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 ) { 1151ca: 84 db test %bl,%bl 1151cc: 75 16 jne 1151e4 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 1151ce: ff 75 e4 pushl -0x1c(%ebp) 1151d1: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 1151d2: 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 ); } 1151d9: 83 c4 1c add $0x1c,%esp 1151dc: 5b pop %ebx 1151dd: 5e pop %esi 1151de: 5f pop %edi 1151df: c9 leave 1151e0: c3 ret 1151e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1151e4: 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; 1151eb: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1151ee: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 1151f1: ff 75 e4 pushl -0x1c(%ebp) 1151f4: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 1151f5: c7 45 10 8c 19 11 00 movl $0x11198c,0x10(%ebp) 1151fc: 89 75 0c mov %esi,0xc(%ebp) 1151ff: 89 45 08 mov %eax,0x8(%ebp) } 115202: 83 c4 1c add $0x1c,%esp 115205: 5b pop %ebx 115206: 5e pop %esi 115207: 5f pop %edi 115208: 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 ); 115209: e9 2e c4 ff ff jmp 11163c <_Thread_queue_Enqueue_with_handler> 11520e: 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; 115210: 49 dec %ecx 115211: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 115214: ff 75 e4 pushl -0x1c(%ebp) 115217: 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 ); } 115218: 83 c4 1c add $0x1c,%esp 11521b: 5b pop %ebx 11521c: 5e pop %esi 11521d: 5f pop %edi 11521e: c9 leave 11521f: c3 ret =============================================================================== 0010c4c8 <_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 ) { 10c4c8: 55 push %ebp 10c4c9: 89 e5 mov %esp,%ebp 10c4cb: 53 push %ebx 10c4cc: 83 ec 10 sub $0x10,%esp 10c4cf: 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)) ) { 10c4d2: 53 push %ebx 10c4d3: e8 2c 16 00 00 call 10db04 <_Thread_queue_Dequeue> 10c4d8: 83 c4 10 add $0x10,%esp 10c4db: 85 c0 test %eax,%eax 10c4dd: 74 09 je 10c4e8 <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c4df: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c4e1: 8b 5d fc mov -0x4(%ebp),%ebx 10c4e4: c9 leave 10c4e5: c3 ret 10c4e6: 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 ); 10c4e8: 9c pushf 10c4e9: fa cli 10c4ea: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c4eb: 8b 43 48 mov 0x48(%ebx),%eax 10c4ee: 3b 43 40 cmp 0x40(%ebx),%eax 10c4f1: 72 0d jb 10c500 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c4f3: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c4f8: 52 push %edx 10c4f9: 9d popf } return status; } 10c4fa: 8b 5d fc mov -0x4(%ebp),%ebx 10c4fd: c9 leave 10c4fe: c3 ret 10c4ff: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c500: 40 inc %eax 10c501: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c504: 31 c0 xor %eax,%eax 10c506: eb f0 jmp 10c4f8 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010ce64 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10ce64: 55 push %ebp 10ce65: 89 e5 mov %esp,%ebp 10ce67: 53 push %ebx 10ce68: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10ce6b: 9c pushf 10ce6c: fa cli 10ce6d: 59 pop %ecx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ce6e: 8b 50 04 mov 0x4(%eax),%edx 10ce71: 85 d2 test %edx,%edx 10ce73: 75 0b jne 10ce80 <_CORE_spinlock_Release+0x1c> _ISR_Enable( level ); 10ce75: 51 push %ecx 10ce76: 9d popf return CORE_SPINLOCK_NOT_LOCKED; 10ce77: 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; } 10ce7c: 5b pop %ebx 10ce7d: c9 leave 10ce7e: c3 ret 10ce7f: 90 nop <== NOT EXECUTED } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10ce80: 8b 58 0c mov 0xc(%eax),%ebx 10ce83: 8b 15 b8 89 12 00 mov 0x1289b8,%edx 10ce89: 3b 5a 08 cmp 0x8(%edx),%ebx 10ce8c: 74 0a je 10ce98 <_CORE_spinlock_Release+0x34> _ISR_Enable( level ); 10ce8e: 51 push %ecx 10ce8f: 9d popf return CORE_SPINLOCK_NOT_HOLDER; 10ce90: 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; } 10ce95: 5b pop %ebx 10ce96: c9 leave 10ce97: c3 ret } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10ce98: 8b 50 08 mov 0x8(%eax),%edx 10ce9b: 4a dec %edx 10ce9c: 89 50 08 mov %edx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10ce9f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10cea6: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10cead: 51 push %ecx 10ceae: 9d popf return CORE_SPINLOCK_SUCCESSFUL; 10ceaf: 31 c0 xor %eax,%eax 10ceb1: eb c9 jmp 10ce7c <_CORE_spinlock_Release+0x18> =============================================================================== 0010ceb4 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10ceb4: 55 push %ebp 10ceb5: 89 e5 mov %esp,%ebp 10ceb7: 56 push %esi 10ceb8: 53 push %ebx 10ceb9: 83 ec 10 sub $0x10,%esp 10cebc: 8b 5d 08 mov 0x8(%ebp),%ebx 10cebf: 8a 45 0c mov 0xc(%ebp),%al 10cec2: 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 ); 10cec5: 9c pushf 10cec6: fa cli 10cec7: 5a pop %edx 10cec8: 89 d0 mov %edx,%eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10ceca: 8b 4b 04 mov 0x4(%ebx),%ecx 10cecd: 49 dec %ecx 10cece: 74 64 je 10cf34 <_CORE_spinlock_Wait+0x80> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10ced0: 8b 4b 08 mov 0x8(%ebx),%ecx 10ced3: 41 inc %ecx 10ced4: 89 4b 08 mov %ecx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ced7: 8b 4b 04 mov 0x4(%ebx),%ecx 10ceda: 85 c9 test %ecx,%ecx 10cedc: 74 22 je 10cf00 <_CORE_spinlock_Wait+0x4c> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10cede: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 10cee2: 74 3a je 10cf1e <_CORE_spinlock_Wait+0x6a> * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10cee4: 50 push %eax 10cee5: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10cee6: e8 95 12 00 00 call 10e180 <_Thread_Enable_dispatch> 10ceeb: a1 f4 83 12 00 mov 0x1283f4,%eax 10cef0: 40 inc %eax 10cef1: a3 f4 83 12 00 mov %eax,0x1283f4 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10cef6: 9c pushf 10cef7: fa cli 10cef8: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cef9: 8b 53 04 mov 0x4(%ebx),%edx 10cefc: 85 d2 test %edx,%edx 10cefe: 75 e4 jne 10cee4 <_CORE_spinlock_Wait+0x30> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10cf00: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10cf07: 8b 15 b8 89 12 00 mov 0x1289b8,%edx 10cf0d: 8b 52 08 mov 0x8(%edx),%edx 10cf10: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10cf13: 50 push %eax 10cf14: 9d popf return CORE_SPINLOCK_SUCCESSFUL; 10cf15: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cf17: 83 c4 10 add $0x10,%esp 10cf1a: 5b pop %ebx 10cf1b: 5e pop %esi 10cf1c: c9 leave 10cf1d: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10cf1e: 8b 43 08 mov 0x8(%ebx),%eax 10cf21: 48 dec %eax 10cf22: 89 43 08 mov %eax,0x8(%ebx) _ISR_Enable( level ); 10cf25: 52 push %edx 10cf26: 9d popf return CORE_SPINLOCK_UNAVAILABLE; 10cf27: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cf2c: 83 c4 10 add $0x10,%esp 10cf2f: 5b pop %ebx 10cf30: 5e pop %esi 10cf31: c9 leave 10cf32: c3 ret 10cf33: 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) ) { 10cf34: 8b 73 0c mov 0xc(%ebx),%esi 10cf37: 8b 0d b8 89 12 00 mov 0x1289b8,%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) && 10cf3d: 3b 71 08 cmp 0x8(%ecx),%esi 10cf40: 75 8e jne 10ced0 <_CORE_spinlock_Wait+0x1c> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 10cf42: 52 push %edx 10cf43: 9d popf return CORE_SPINLOCK_HOLDER_RELOCKING; 10cf44: b8 01 00 00 00 mov $0x1,%eax 10cf49: eb cc jmp 10cf17 <_CORE_spinlock_Wait+0x63> =============================================================================== 0010c090 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10c090: 55 push %ebp 10c091: 89 e5 mov %esp,%ebp 10c093: 53 push %ebx 10c094: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10c097: 9c pushf 10c098: fa cli 10c099: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10c09a: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c09c: 8d 4a 04 lea 0x4(%edx),%ecx if ( !_Chain_Is_empty( the_chain ) ) 10c09f: 39 c8 cmp %ecx,%eax 10c0a1: 74 0d je 10c0b0 <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10c0a3: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10c0a5: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10c0a7: 89 51 04 mov %edx,0x4(%ecx) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10c0aa: 53 push %ebx 10c0ab: 9d popf return return_node; } 10c0ac: 5b pop %ebx 10c0ad: c9 leave 10c0ae: c3 ret 10c0af: 90 nop <== NOT EXECUTED ) { ISR_Level level; Chain_Node *return_node; return_node = NULL; 10c0b0: 31 c0 xor %eax,%eax 10c0b2: eb f6 jmp 10c0aa <_Chain_Get+0x1a> =============================================================================== 00110fb4 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110fb4: 55 push %ebp 110fb5: 89 e5 mov %esp,%ebp 110fb7: 57 push %edi 110fb8: 56 push %esi 110fb9: 53 push %ebx 110fba: 8b 7d 08 mov 0x8(%ebp),%edi 110fbd: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110fc0: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 110fc2: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 110fc9: 8b 45 10 mov 0x10(%ebp),%eax 110fcc: 85 c0 test %eax,%eax 110fce: 74 21 je 110ff1 <_Chain_Initialize+0x3d><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 110fd0: 8b 4d 10 mov 0x10(%ebp),%ecx 110fd3: 8b 45 0c mov 0xc(%ebp),%eax 110fd6: eb 04 jmp 110fdc <_Chain_Initialize+0x28> while ( count-- ) { 110fd8: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 110fda: 89 d8 mov %ebx,%eax count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 110fdc: 89 02 mov %eax,(%edx) next->previous = current; 110fde: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110fe1: 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-- ) { 110fe4: 49 dec %ecx 110fe5: 75 f1 jne 110fd8 <_Chain_Initialize+0x24> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110fe7: 8b 55 10 mov 0x10(%ebp),%edx 110fea: 4a dec %edx 110feb: 0f af d6 imul %esi,%edx 110fee: 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; 110ff1: 8d 47 04 lea 0x4(%edi),%eax 110ff4: 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; 110ff6: 89 57 08 mov %edx,0x8(%edi) } 110ff9: 5b pop %ebx 110ffa: 5e pop %esi 110ffb: 5f pop %edi 110ffc: c9 leave 110ffd: c3 ret =============================================================================== 0010b0f8 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b0f8: 55 push %ebp 10b0f9: 89 e5 mov %esp,%ebp 10b0fb: 57 push %edi 10b0fc: 56 push %esi 10b0fd: 53 push %ebx 10b0fe: 83 ec 2c sub $0x2c,%esp 10b101: 8b 45 08 mov 0x8(%ebp),%eax 10b104: 8b 4d 0c mov 0xc(%ebp),%ecx 10b107: 8b 55 10 mov 0x10(%ebp),%edx 10b10a: 89 55 dc mov %edx,-0x24(%ebp) 10b10d: 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; 10b110: 8b 1d 98 79 12 00 mov 0x127998,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b116: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b11d: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi _ISR_Disable( level ); 10b123: 9c pushf 10b124: fa cli 10b125: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b128: 8b 16 mov (%esi),%edx 10b12a: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b12d: 21 c2 and %eax,%edx 10b12f: 89 55 e4 mov %edx,-0x1c(%ebp) 10b132: 74 0d je 10b141 <_Event_Seize+0x49> 10b134: 39 d0 cmp %edx,%eax 10b136: 0f 84 84 00 00 00 je 10b1c0 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b13c: f6 c1 02 test $0x2,%cl 10b13f: 75 7f jne 10b1c0 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b141: f6 c1 01 test $0x1,%cl 10b144: 75 62 jne 10b1a8 <_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; 10b146: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b149: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b14c: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b14f: c7 05 88 7d 12 00 01 movl $0x1,0x127d88 10b156: 00 00 00 _ISR_Enable( level ); 10b159: ff 75 e0 pushl -0x20(%ebp) 10b15c: 9d popf if ( ticks ) { 10b15d: 8b 45 dc mov -0x24(%ebp),%eax 10b160: 85 c0 test %eax,%eax 10b162: 0f 85 80 00 00 00 jne 10b1e8 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b168: 83 ec 08 sub $0x8,%esp 10b16b: 68 00 01 00 00 push $0x100 10b170: 53 push %ebx 10b171: e8 a6 2e 00 00 call 10e01c <_Thread_Set_state> _ISR_Disable( level ); 10b176: 9c pushf 10b177: fa cli 10b178: 5a pop %edx sync_state = _Event_Sync_state; 10b179: a1 88 7d 12 00 mov 0x127d88,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b17e: c7 05 88 7d 12 00 00 movl $0x0,0x127d88 10b185: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b188: 83 c4 10 add $0x10,%esp 10b18b: 83 f8 01 cmp $0x1,%eax 10b18e: 74 4c je 10b1dc <_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 ); 10b190: 89 55 10 mov %edx,0x10(%ebp) 10b193: 89 5d 0c mov %ebx,0xc(%ebp) 10b196: 89 45 08 mov %eax,0x8(%ebp) } 10b199: 8d 65 f4 lea -0xc(%ebp),%esp 10b19c: 5b pop %ebx 10b19d: 5e pop %esi 10b19e: 5f pop %edi 10b19f: 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 ); 10b1a0: e9 47 20 00 00 jmp 10d1ec <_Thread_blocking_operation_Cancel> 10b1a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b1a8: ff 75 e0 pushl -0x20(%ebp) 10b1ab: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b1ac: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b1b3: 8b 55 e4 mov -0x1c(%ebp),%edx 10b1b6: 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 ); } 10b1b8: 8d 65 f4 lea -0xc(%ebp),%esp 10b1bb: 5b pop %ebx 10b1bc: 5e pop %esi 10b1bd: 5f pop %edi 10b1be: c9 leave 10b1bf: 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) ); 10b1c0: 8b 45 e4 mov -0x1c(%ebp),%eax 10b1c3: f7 d0 not %eax 10b1c5: 23 45 d4 and -0x2c(%ebp),%eax 10b1c8: 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 ); 10b1ca: ff 75 e0 pushl -0x20(%ebp) 10b1cd: 9d popf *event_out = seized_events; 10b1ce: 8b 45 e4 mov -0x1c(%ebp),%eax 10b1d1: 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 ); } 10b1d3: 8d 65 f4 lea -0xc(%ebp),%esp 10b1d6: 5b pop %ebx 10b1d7: 5e pop %esi 10b1d8: 5f pop %edi 10b1d9: c9 leave 10b1da: c3 ret 10b1db: 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 ); 10b1dc: 52 push %edx 10b1dd: 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 ); } 10b1de: 8d 65 f4 lea -0xc(%ebp),%esp 10b1e1: 5b pop %ebx 10b1e2: 5e pop %esi 10b1e3: 5f pop %edi 10b1e4: c9 leave 10b1e5: c3 ret 10b1e6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b1e8: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b1eb: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b1f2: c7 43 64 9c b3 10 00 movl $0x10b39c,0x64(%ebx) the_watchdog->id = id; 10b1f9: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b1fc: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b203: 8b 45 dc mov -0x24(%ebp),%eax 10b206: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b209: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b20c: 8d 43 48 lea 0x48(%ebx),%eax 10b20f: 50 push %eax 10b210: 68 a4 74 12 00 push $0x1274a4 10b215: e8 a2 34 00 00 call 10e6bc <_Watchdog_Insert> 10b21a: 83 c4 10 add $0x10,%esp 10b21d: e9 46 ff ff ff jmp 10b168 <_Event_Seize+0x70> =============================================================================== 0010b278 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b278: 55 push %ebp 10b279: 89 e5 mov %esp,%ebp 10b27b: 57 push %edi 10b27c: 56 push %esi 10b27d: 53 push %ebx 10b27e: 83 ec 2c sub $0x2c,%esp 10b281: 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 ]; 10b284: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b28a: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b28d: 9c pushf 10b28e: fa cli 10b28f: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b292: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b294: 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 ) ) { 10b297: 89 c6 mov %eax,%esi 10b299: 21 d6 and %edx,%esi 10b29b: 89 75 e4 mov %esi,-0x1c(%ebp) 10b29e: 74 74 je 10b314 <_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() && 10b2a0: 8b 35 94 79 12 00 mov 0x127994,%esi 10b2a6: 85 f6 test %esi,%esi 10b2a8: 74 0c je 10b2b6 <_Event_Surrender+0x3e> 10b2aa: 3b 1d 98 79 12 00 cmp 0x127998,%ebx 10b2b0: 0f 84 96 00 00 00 je 10b34c <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b2b6: f6 43 11 01 testb $0x1,0x11(%ebx) 10b2ba: 74 4c je 10b308 <_Event_Surrender+0x90> 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+0x4e> 10b2c1: 83 e7 02 and $0x2,%edi 10b2c4: 74 42 je 10b308 <_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) ); 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 75 e4 mov -0x1c(%ebp),%esi 10b2dc: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b2de: ff 75 d4 pushl -0x2c(%ebp) 10b2e1: 9d popf 10b2e2: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b2e3: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b2e7: 74 37 je 10b320 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b2e9: ff 75 d4 pushl -0x2c(%ebp) 10b2ec: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b2ed: 83 ec 08 sub $0x8,%esp 10b2f0: 68 f8 ff 03 10 push $0x1003fff8 10b2f5: 53 push %ebx 10b2f6: e8 7d 20 00 00 call 10d378 <_Thread_Clear_state> 10b2fb: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b2fe: 8d 65 f4 lea -0xc(%ebp),%esp 10b301: 5b pop %ebx 10b302: 5e pop %esi 10b303: 5f pop %edi 10b304: c9 leave 10b305: c3 ret 10b306: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b308: ff 75 d4 pushl -0x2c(%ebp) 10b30b: 9d popf } 10b30c: 8d 65 f4 lea -0xc(%ebp),%esp 10b30f: 5b pop %ebx 10b310: 5e pop %esi 10b311: 5f pop %edi 10b312: c9 leave 10b313: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b314: ff 75 d4 pushl -0x2c(%ebp) 10b317: 9d popf } return; } } _ISR_Enable( level ); } 10b318: 8d 65 f4 lea -0xc(%ebp),%esp 10b31b: 5b pop %ebx 10b31c: 5e pop %esi 10b31d: 5f pop %edi 10b31e: c9 leave 10b31f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b320: 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 ); 10b327: ff 75 d4 pushl -0x2c(%ebp) 10b32a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b32b: 83 ec 0c sub $0xc,%esp 10b32e: 8d 43 48 lea 0x48(%ebx),%eax 10b331: 50 push %eax 10b332: e8 bd 34 00 00 call 10e7f4 <_Watchdog_Remove> 10b337: 58 pop %eax 10b338: 5a pop %edx 10b339: 68 f8 ff 03 10 push $0x1003fff8 10b33e: 53 push %ebx 10b33f: e8 34 20 00 00 call 10d378 <_Thread_Clear_state> 10b344: 83 c4 10 add $0x10,%esp 10b347: eb c3 jmp 10b30c <_Event_Surrender+0x94> 10b349: 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) || 10b34c: 8b 35 88 7d 12 00 mov 0x127d88,%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 ) && 10b352: 83 fe 02 cmp $0x2,%esi 10b355: 74 0d je 10b364 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b357: 8b 35 88 7d 12 00 mov 0x127d88,%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) || 10b35d: 4e dec %esi 10b35e: 0f 85 52 ff ff ff jne 10b2b6 <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b364: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b367: 74 05 je 10b36e <_Event_Surrender+0xf6> 10b369: 83 e7 02 and $0x2,%edi 10b36c: 74 22 je 10b390 <_Event_Surrender+0x118><== NEVER TAKEN 10b36e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b371: f7 d0 not %eax 10b373: 21 d0 and %edx,%eax 10b375: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b377: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b37e: 8b 43 28 mov 0x28(%ebx),%eax 10b381: 8b 55 e4 mov -0x1c(%ebp),%edx 10b384: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b386: c7 05 88 7d 12 00 03 movl $0x3,0x127d88 10b38d: 00 00 00 } _ISR_Enable( level ); 10b390: ff 75 d4 pushl -0x2c(%ebp) 10b393: 9d popf return; 10b394: e9 73 ff ff ff jmp 10b30c <_Event_Surrender+0x94> =============================================================================== 0010b39c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b39c: 55 push %ebp 10b39d: 89 e5 mov %esp,%ebp 10b39f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b3a2: 8d 45 f4 lea -0xc(%ebp),%eax 10b3a5: 50 push %eax 10b3a6: ff 75 08 pushl 0x8(%ebp) 10b3a9: e8 b2 23 00 00 call 10d760 <_Thread_Get> switch ( location ) { 10b3ae: 83 c4 10 add $0x10,%esp 10b3b1: 8b 55 f4 mov -0xc(%ebp),%edx 10b3b4: 85 d2 test %edx,%edx 10b3b6: 75 37 jne 10b3ef <_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 ); 10b3b8: 9c pushf 10b3b9: fa cli 10b3ba: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b3bb: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b3c2: 3b 05 98 79 12 00 cmp 0x127998,%eax 10b3c8: 74 2a je 10b3f4 <_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; 10b3ca: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b3d1: 52 push %edx 10b3d2: 9d popf 10b3d3: 83 ec 08 sub $0x8,%esp 10b3d6: 68 f8 ff 03 10 push $0x1003fff8 10b3db: 50 push %eax 10b3dc: e8 97 1f 00 00 call 10d378 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b3e1: a1 d4 73 12 00 mov 0x1273d4,%eax 10b3e6: 48 dec %eax 10b3e7: a3 d4 73 12 00 mov %eax,0x1273d4 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b3ec: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b3ef: c9 leave 10b3f0: c3 ret 10b3f1: 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 ) 10b3f4: 8b 0d 88 7d 12 00 mov 0x127d88,%ecx 10b3fa: 49 dec %ecx 10b3fb: 75 cd jne 10b3ca <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b3fd: c7 05 88 7d 12 00 02 movl $0x2,0x127d88 10b404: 00 00 00 10b407: eb c1 jmp 10b3ca <_Event_Timeout+0x2e> =============================================================================== 00111210 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 111210: 55 push %ebp 111211: 89 e5 mov %esp,%ebp 111213: 57 push %edi 111214: 56 push %esi 111215: 53 push %ebx 111216: 83 ec 2c sub $0x2c,%esp 111219: 8b 7d 0c mov 0xc(%ebp),%edi if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 11121c: 8b 45 08 mov 0x8(%ebp),%eax 11121f: 8b 48 08 mov 0x8(%eax),%ecx ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 111222: 8d 57 04 lea 0x4(%edi),%edx 111225: 89 55 dc mov %edx,-0x24(%ebp) - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 111228: 8b 40 10 mov 0x10(%eax),%eax 11122b: 89 45 cc mov %eax,-0x34(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 11122e: 39 d7 cmp %edx,%edi 111230: 0f 87 5a 01 00 00 ja 111390 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 111236: 8b 75 14 mov 0x14(%ebp),%esi 111239: 85 f6 test %esi,%esi 11123b: 0f 85 48 01 00 00 jne 111389 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111241: 39 4d 08 cmp %ecx,0x8(%ebp) 111244: 0f 84 46 01 00 00 je 111390 <_Heap_Allocate_aligned_with_boundary+0x180> 11124a: c7 45 e4 00 00 00 00 movl $0x0,-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 111251: 8b 45 cc mov -0x34(%ebp),%eax 111254: 83 c0 07 add $0x7,%eax 111257: 89 45 c8 mov %eax,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 11125a: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 111261: 29 7d d0 sub %edi,-0x30(%ebp) 111264: eb 19 jmp 11127f <_Heap_Allocate_aligned_with_boundary+0x6f> 111266: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 111268: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 11126b: 85 db test %ebx,%ebx 11126d: 0f 85 e9 00 00 00 jne 11135c <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 111273: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111276: 39 4d 08 cmp %ecx,0x8(%ebp) 111279: 0f 84 1d 01 00 00 je 11139c <_Heap_Allocate_aligned_with_boundary+0x18c> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 11127f: ff 45 e4 incl -0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 111282: 8b 59 04 mov 0x4(%ecx),%ebx 111285: 39 5d dc cmp %ebx,-0x24(%ebp) 111288: 73 e9 jae 111273 <_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 d7 je 111268 <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 111291: 8b 55 08 mov 0x8(%ebp),%edx 111294: 8b 52 14 mov 0x14(%edx),%edx 111297: 89 55 d8 mov %edx,-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 41 08 lea 0x8(%ecx),%eax 1112a3: 89 45 d4 mov %eax,-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 d6 sub %edx,%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_BLOCK_SIZE_OFFSET; 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+0xb8> 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 57 je 111326 <_Heap_Allocate_aligned_with_boundary+0x116> /* 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 45 jae 111326 <_Heap_Allocate_aligned_with_boundary+0x116> 1112e1: 39 c6 cmp %eax,%esi 1112e3: 76 41 jbe 111326 <_Heap_Allocate_aligned_with_boundary+0x116> 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: 77 82 ja 111273 <_Heap_Allocate_aligned_with_boundary+0x63> 1112f1: 89 ce mov %ecx,%esi 1112f3: eb 10 jmp 111305 <_Heap_Allocate_aligned_with_boundary+0xf5> 1112f5: 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 ) { 1112f8: 39 c1 cmp %eax,%ecx 1112fa: 76 28 jbe 111324 <_Heap_Allocate_aligned_with_boundary+0x114> if ( boundary_line < boundary_floor ) { 1112fc: 39 45 e0 cmp %eax,-0x20(%ebp) 1112ff: 0f 87 9b 00 00 00 ja 1113a0 <_Heap_Allocate_aligned_with_boundary+0x190><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 111305: 89 c3 mov %eax,%ebx 111307: 29 fb sub %edi,%ebx 111309: 89 d8 mov %ebx,%eax 11130b: 31 d2 xor %edx,%edx 11130d: f7 75 10 divl 0x10(%ebp) 111310: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 111312: 8d 0c 3b lea (%ebx,%edi,1),%ecx 111315: 89 c8 mov %ecx,%eax 111317: 31 d2 xor %edx,%edx 111319: f7 75 14 divl 0x14(%ebp) 11131c: 89 c8 mov %ecx,%eax 11131e: 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 ) { 111320: 39 c3 cmp %eax,%ebx 111322: 72 d4 jb 1112f8 <_Heap_Allocate_aligned_with_boundary+0xe8> 111324: 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 ) { 111326: 39 5d d4 cmp %ebx,-0x2c(%ebp) 111329: 0f 87 44 ff ff ff ja 111273 <_Heap_Allocate_aligned_with_boundary+0x63> 11132f: be f8 ff ff ff mov $0xfffffff8,%esi 111334: 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); 111336: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 111338: 89 d8 mov %ebx,%eax 11133a: 31 d2 xor %edx,%edx 11133c: 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; 11133f: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 111341: 39 75 d8 cmp %esi,-0x28(%ebp) 111344: 0f 86 21 ff ff ff jbe 11126b <_Heap_Allocate_aligned_with_boundary+0x5b> 11134a: 85 f6 test %esi,%esi 11134c: 0f 85 21 ff ff ff jne 111273 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 111352: 85 db test %ebx,%ebx 111354: 0f 84 19 ff ff ff je 111273 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 11135a: 66 90 xchg %ax,%ax block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 11135c: 8b 55 e4 mov -0x1c(%ebp),%edx 11135f: 8b 45 08 mov 0x8(%ebp),%eax 111362: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 111365: 57 push %edi 111366: 53 push %ebx 111367: 51 push %ecx 111368: 50 push %eax 111369: e8 0a b5 ff ff call 10c878 <_Heap_Block_allocate> 11136e: 89 d8 mov %ebx,%eax 111370: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 111373: 8b 55 e4 mov -0x1c(%ebp),%edx 111376: 8b 4d 08 mov 0x8(%ebp),%ecx 111379: 39 51 44 cmp %edx,0x44(%ecx) 11137c: 73 14 jae 111392 <_Heap_Allocate_aligned_with_boundary+0x182> stats->max_search = search_count; 11137e: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 111381: 8d 65 f4 lea -0xc(%ebp),%esp 111384: 5b pop %ebx 111385: 5e pop %esi 111386: 5f pop %edi 111387: c9 leave 111388: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 111389: 3b 7d 14 cmp 0x14(%ebp),%edi 11138c: 76 19 jbe 1113a7 <_Heap_Allocate_aligned_with_boundary+0x197> 11138e: 66 90 xchg %ax,%ax if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111390: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 111392: 8d 65 f4 lea -0xc(%ebp),%esp 111395: 5b pop %ebx 111396: 5e pop %esi 111397: 5f pop %edi 111398: c9 leave 111399: c3 ret 11139a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 11139c: 31 c0 xor %eax,%eax 11139e: eb d3 jmp 111373 <_Heap_Allocate_aligned_with_boundary+0x163> 1113a0: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1113a2: e9 cc fe ff ff jmp 111273 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 1113a7: 8b 5d 10 mov 0x10(%ebp),%ebx 1113aa: 85 db test %ebx,%ebx 1113ac: 0f 85 8f fe ff ff jne 111241 <_Heap_Allocate_aligned_with_boundary+0x31> alignment = page_size; 1113b2: 89 45 10 mov %eax,0x10(%ebp) 1113b5: e9 87 fe ff ff jmp 111241 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010c798 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c798: 55 push %ebp 10c799: 89 e5 mov %esp,%ebp 10c79b: 57 push %edi 10c79c: 56 push %esi 10c79d: 53 push %ebx 10c79e: 83 ec 14 sub $0x14,%esp 10c7a1: 8b 4d 08 mov 0x8(%ebp),%ecx 10c7a4: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c7a7: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c7aa: 8b 41 14 mov 0x14(%ecx),%eax 10c7ad: 89 45 e8 mov %eax,-0x18(%ebp) if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; } return block; } 10c7b0: 8b 43 04 mov 0x4(%ebx),%eax 10c7b3: 89 45 e4 mov %eax,-0x1c(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c7b6: 89 c6 mov %eax,%esi 10c7b8: 83 e6 fe and $0xfffffffe,%esi { 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; 10c7bb: 8b 55 e8 mov -0x18(%ebp),%edx 10c7be: 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; 10c7c1: 8b 45 14 mov 0x14(%ebp),%eax 10c7c4: 39 d0 cmp %edx,%eax 10c7c6: 73 02 jae 10c7ca <_Heap_Block_split+0x32> 10c7c8: 89 d0 mov %edx,%eax uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = 10c7ca: 83 c0 08 add $0x8,%eax 10c7cd: 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; 10c7d0: 31 d2 xor %edx,%edx 10c7d2: f7 f7 div %edi if ( remainder != 0 ) { 10c7d4: 85 d2 test %edx,%edx 10c7d6: 74 70 je 10c848 <_Heap_Block_split+0xb0> return value - remainder + alignment; 10c7d8: 03 7d f0 add -0x10(%ebp),%edi 10c7db: 29 d7 sub %edx,%edi 10c7dd: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c7e0: 8d 04 33 lea (%ebx,%esi,1),%eax 10c7e3: 89 45 e0 mov %eax,-0x20(%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_BLOCK_SIZE_OFFSET - used_size; 10c7e6: 8d 56 04 lea 0x4(%esi),%edx 10c7e9: 2b 55 f0 sub -0x10(%ebp),%edx uintptr_t const free_size_limit = min_block_size + HEAP_BLOCK_SIZE_OFFSET; 10c7ec: 8b 7d e8 mov -0x18(%ebp),%edi 10c7ef: 83 c7 04 add $0x4,%edi Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10c7f2: 39 fa cmp %edi,%edx 10c7f4: 72 5a jb 10c850 <_Heap_Block_split+0xb8> 10c7f6: 8b 55 ec mov -0x14(%ebp),%edx 10c7f9: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c7fb: 2b 75 ec sub -0x14(%ebp),%esi 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; 10c7fe: 8b 7d e4 mov -0x1c(%ebp),%edi 10c801: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 10c804: 0b 7d ec or -0x14(%ebp),%edi 10c807: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c80a: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c80d: 8b 58 04 mov 0x4(%eax),%ebx 10c810: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c813: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c818: 75 46 jne 10c860 <_Heap_Block_split+0xc8> if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; } return block; } 10c81a: 8b 48 08 mov 0x8(%eax),%ecx 10c81d: 8b 40 0c mov 0xc(%eax),%eax ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 10c820: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c823: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c826: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c829: 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; 10c82c: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c82e: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c831: 89 f1 mov %esi,%ecx 10c833: 83 c9 01 or $0x1,%ecx 10c836: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c839: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c83b: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c83f: 83 c4 14 add $0x14,%esp 10c842: 5b pop %ebx 10c843: 5e pop %esi 10c844: 5f pop %edi 10c845: c9 leave 10c846: c3 ret 10c847: 90 nop <== NOT EXECUTED uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c848: 8b 7d f0 mov -0x10(%ebp),%edi 10c84b: 89 7d ec mov %edi,-0x14(%ebp) 10c84e: eb 90 jmp 10c7e0 <_Heap_Block_split+0x48> free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c850: 8b 45 e0 mov -0x20(%ebp),%eax 10c853: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c857: 83 c4 14 add $0x14,%esp 10c85a: 5b pop %ebx 10c85b: 5e pop %esi 10c85c: 5f pop %edi 10c85d: c9 leave 10c85e: c3 ret 10c85f: 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; 10c860: 8b 7d 10 mov 0x10(%ebp),%edi 10c863: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c866: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c869: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c86c: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c86f: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c872: ff 41 38 incl 0x38(%ecx) 10c875: eb ba jmp 10c831 <_Heap_Block_split+0x99> =============================================================================== 00111778 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 111778: 55 push %ebp 111779: 89 e5 mov %esp,%ebp 11177b: 57 push %edi 11177c: 56 push %esi 11177d: 53 push %ebx 11177e: 83 ec 4c sub $0x4c,%esp 111781: 8b 5d 08 mov 0x8(%ebp),%ebx 111784: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 111787: 8b 43 20 mov 0x20(%ebx),%eax 11178a: 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; 11178d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 111794: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 11179b: 8b 53 10 mov 0x10(%ebx),%edx 11179e: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 1117a1: 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; 1117a4: 8b 73 30 mov 0x30(%ebx),%esi 1117a7: 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 ) { 1117aa: 8b 55 0c mov 0xc(%ebp),%edx 1117ad: 01 ca add %ecx,%edx 1117af: 89 55 cc mov %edx,-0x34(%ebp) 1117b2: 73 0c jae 1117c0 <_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; 1117b4: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 1117b6: 8d 65 f4 lea -0xc(%ebp),%esp 1117b9: 5b pop %ebx 1117ba: 5e pop %esi 1117bb: 5f pop %edi 1117bc: c9 leave 1117bd: c3 ret 1117be: 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( 1117c0: 83 ec 08 sub $0x8,%esp 1117c3: 8d 55 e0 lea -0x20(%ebp),%edx 1117c6: 52 push %edx 1117c7: 8d 55 e4 lea -0x1c(%ebp),%edx 1117ca: 52 push %edx 1117cb: 50 push %eax 1117cc: ff 75 d4 pushl -0x2c(%ebp) 1117cf: 51 push %ecx 1117d0: ff 75 0c pushl 0xc(%ebp) 1117d3: e8 9c b1 ff ff call 10c974 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 1117d8: 83 c4 20 add $0x20,%esp 1117db: 84 c0 test %al,%al 1117dd: 74 d5 je 1117b4 <_Heap_Extend+0x3c> 1117df: 8b 7d d0 mov -0x30(%ebp),%edi 1117e2: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 1117e9: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 1117f0: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 1117f7: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 1117fe: 8b 75 cc mov -0x34(%ebp),%esi 111801: 89 5d b4 mov %ebx,-0x4c(%ebp) 111804: eb 30 jmp 111836 <_Heap_Extend+0xbe> 111806: 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 ) { 111808: 39 ce cmp %ecx,%esi 11180a: 73 03 jae 11180f <_Heap_Extend+0x97> 11180c: 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); 11180f: 8d 59 f8 lea -0x8(%ecx),%ebx 111812: 89 c8 mov %ecx,%eax 111814: 31 d2 xor %edx,%edx 111816: 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); 111819: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 11181b: 3b 4d 0c cmp 0xc(%ebp),%ecx 11181e: 74 3c je 11185c <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 111820: 39 4d 0c cmp %ecx,0xc(%ebp) 111823: 76 03 jbe 111828 <_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 ) 111825: 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; 111828: 8b 7b 04 mov 0x4(%ebx),%edi 11182b: 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); 11182e: 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 ); 111831: 39 7d d0 cmp %edi,-0x30(%ebp) 111834: 74 39 je 11186f <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 111836: 3b 7d d0 cmp -0x30(%ebp),%edi 111839: 0f 84 35 01 00 00 je 111974 <_Heap_Extend+0x1fc> 11183f: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 111841: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 111843: 39 4d 0c cmp %ecx,0xc(%ebp) 111846: 73 08 jae 111850 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 111848: 39 f0 cmp %esi,%eax 11184a: 0f 82 64 ff ff ff jb 1117b4 <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 111850: 39 f0 cmp %esi,%eax 111852: 75 b4 jne 111808 <_Heap_Extend+0x90> 111854: 89 7d c4 mov %edi,-0x3c(%ebp) 111857: eb b6 jmp 11180f <_Heap_Extend+0x97> 111859: 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; 11185c: 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 ) 11185e: 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; 111861: 8b 7b 04 mov 0x4(%ebx),%edi 111864: 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); 111867: 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 ); 11186a: 39 7d d0 cmp %edi,-0x30(%ebp) 11186d: 75 c7 jne 111836 <_Heap_Extend+0xbe> <== NEVER TAKEN 11186f: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 111872: 8b 75 0c mov 0xc(%ebp),%esi 111875: 3b 73 18 cmp 0x18(%ebx),%esi 111878: 0f 82 02 01 00 00 jb 111980 <_Heap_Extend+0x208> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 11187e: 8b 45 cc mov -0x34(%ebp),%eax 111881: 3b 43 1c cmp 0x1c(%ebx),%eax 111884: 76 03 jbe 111889 <_Heap_Extend+0x111> heap->area_end = extend_area_end; 111886: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 111889: 8b 55 e0 mov -0x20(%ebp),%edx 11188c: 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 = 11188f: 89 d1 mov %edx,%ecx 111891: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 111893: 8b 75 cc mov -0x34(%ebp),%esi 111896: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 111898: 89 ce mov %ecx,%esi 11189a: 83 ce 01 or $0x1,%esi 11189d: 89 70 04 mov %esi,0x4(%eax) extend_last_block->prev_size = extend_first_block_size; 1118a0: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 1118a2: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 1118a9: 39 43 20 cmp %eax,0x20(%ebx) 1118ac: 0f 86 d6 00 00 00 jbe 111988 <_Heap_Extend+0x210> heap->first_block = extend_first_block; 1118b2: 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 ) { 1118b5: 8b 75 c4 mov -0x3c(%ebp),%esi 1118b8: 85 f6 test %esi,%esi 1118ba: 0f 84 04 01 00 00 je 1119c4 <_Heap_Extend+0x24c> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 1118c0: 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 ); 1118c3: 8b 4d 0c mov 0xc(%ebp),%ecx 1118c6: 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; 1118c9: 89 c8 mov %ecx,%eax 1118cb: 31 d2 xor %edx,%edx 1118cd: f7 f6 div %esi if ( remainder != 0 ) { 1118cf: 85 d2 test %edx,%edx 1118d1: 74 04 je 1118d7 <_Heap_Extend+0x15f> <== ALWAYS TAKEN return value - remainder + alignment; 1118d3: 01 f1 add %esi,%ecx <== NOT EXECUTED 1118d5: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 1118d7: 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; 1118da: 8b 75 c4 mov -0x3c(%ebp),%esi 1118dd: 8b 06 mov (%esi),%eax 1118df: 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 = 1118e2: 89 f0 mov %esi,%eax 1118e4: 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; 1118e6: 83 c8 01 or $0x1,%eax 1118e9: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 1118ec: 89 d8 mov %ebx,%eax 1118ee: e8 69 fe ff ff call 11175c <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 1118f3: 8b 45 c8 mov -0x38(%ebp),%eax 1118f6: 85 c0 test %eax,%eax 1118f8: 0f 84 9e 00 00 00 je 11199c <_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, 1118fe: 8b 4d cc mov -0x34(%ebp),%ecx 111901: 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( 111904: 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); 111907: 89 c8 mov %ecx,%eax 111909: 31 d2 xor %edx,%edx 11190b: f7 73 10 divl 0x10(%ebx) 11190e: 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) 111910: 8b 55 c8 mov -0x38(%ebp),%edx 111913: 8b 42 04 mov 0x4(%edx),%eax 111916: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 111918: 83 c8 01 or $0x1,%eax 11191b: 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; 11191f: 8b 42 04 mov 0x4(%edx),%eax 111922: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 111925: 09 c8 or %ecx,%eax 111927: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 11192a: 89 d8 mov %ebx,%eax 11192c: e8 2b fe ff ff call 11175c <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 111931: 8b 75 c4 mov -0x3c(%ebp),%esi 111934: 85 f6 test %esi,%esi 111936: 0f 84 a4 00 00 00 je 1119e0 <_Heap_Extend+0x268> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 11193c: 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( 11193f: 8b 43 20 mov 0x20(%ebx),%eax 111942: 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; 111944: 8b 4a 04 mov 0x4(%edx),%ecx 111947: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 11194a: 09 c8 or %ecx,%eax 11194c: 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; 11194f: 8b 43 30 mov 0x30(%ebx),%eax 111952: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 111955: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 111958: 8b 55 14 mov 0x14(%ebp),%edx 11195b: 85 d2 test %edx,%edx 11195d: 0f 84 99 00 00 00 je 1119fc <_Heap_Extend+0x284> <== NEVER TAKEN *extended_size_ptr = extended_size; 111963: 8b 55 14 mov 0x14(%ebp),%edx 111966: 89 02 mov %eax,(%edx) return true; 111968: b0 01 mov $0x1,%al } 11196a: 8d 65 f4 lea -0xc(%ebp),%esp 11196d: 5b pop %ebx 11196e: 5e pop %esi 11196f: 5f pop %edi 111970: c9 leave 111971: c3 ret 111972: 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; 111974: 8b 55 b4 mov -0x4c(%ebp),%edx 111977: 8b 42 18 mov 0x18(%edx),%eax 11197a: e9 c2 fe ff ff jmp 111841 <_Heap_Extend+0xc9> 11197f: 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; 111980: 89 73 18 mov %esi,0x18(%ebx) 111983: e9 01 ff ff ff jmp 111889 <_Heap_Extend+0x111> extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; 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 ) { 111988: 39 53 24 cmp %edx,0x24(%ebx) 11198b: 0f 83 24 ff ff ff jae 1118b5 <_Heap_Extend+0x13d> <== NEVER TAKEN heap->last_block = extend_last_block; 111991: 89 53 24 mov %edx,0x24(%ebx) 111994: e9 1c ff ff ff jmp 1118b5 <_Heap_Extend+0x13d> 111999: 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 ) { 11199c: 8b 7d bc mov -0x44(%ebp),%edi 11199f: 85 ff test %edi,%edi 1119a1: 74 8e je 111931 <_Heap_Extend+0x1b9> _Heap_Link_above( 1119a3: 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 ); 1119a6: 8b 45 e4 mov -0x1c(%ebp),%eax 1119a9: 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; 1119ac: 8b 75 bc mov -0x44(%ebp),%esi 1119af: 8b 56 04 mov 0x4(%esi),%edx 1119b2: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 1119b5: 09 d0 or %edx,%eax 1119b7: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 1119ba: 83 49 04 01 orl $0x1,0x4(%ecx) 1119be: e9 6e ff ff ff jmp 111931 <_Heap_Extend+0x1b9> 1119c3: 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 ) { 1119c4: 8b 4d b8 mov -0x48(%ebp),%ecx 1119c7: 85 c9 test %ecx,%ecx 1119c9: 0f 84 24 ff ff ff je 1118f3 <_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; 1119cf: 8b 45 b8 mov -0x48(%ebp),%eax 1119d2: 29 d0 sub %edx,%eax 1119d4: 83 c8 01 or $0x1,%eax 1119d7: 89 42 04 mov %eax,0x4(%edx) 1119da: e9 14 ff ff ff jmp 1118f3 <_Heap_Extend+0x17b> 1119df: 90 nop <== NOT EXECUTED extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 1119e0: 8b 4d c8 mov -0x38(%ebp),%ecx 1119e3: 85 c9 test %ecx,%ecx 1119e5: 0f 85 51 ff ff ff jne 11193c <_Heap_Extend+0x1c4> <== NEVER TAKEN _Heap_Free_block( heap, extend_first_block ); 1119eb: 8b 55 e4 mov -0x1c(%ebp),%edx 1119ee: 89 d8 mov %ebx,%eax 1119f0: e8 67 fd ff ff call 11175c <_Heap_Free_block> 1119f5: e9 42 ff ff ff jmp 11193c <_Heap_Extend+0x1c4> 1119fa: 66 90 xchg %ax,%ax <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 1119fc: b0 01 mov $0x1,%al <== NOT EXECUTED 1119fe: e9 b3 fd ff ff jmp 1117b6 <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 001113bc <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 1113bc: 55 push %ebp 1113bd: 89 e5 mov %esp,%ebp 1113bf: 57 push %edi 1113c0: 56 push %esi 1113c1: 53 push %ebx 1113c2: 83 ec 10 sub $0x10,%esp 1113c5: 8b 5d 08 mov 0x8(%ebp),%ebx 1113c8: 8b 45 0c mov 0xc(%ebp),%eax 1113cb: 8d 48 f8 lea -0x8(%eax),%ecx 1113ce: 31 d2 xor %edx,%edx 1113d0: 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); 1113d3: 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 1113d5: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 1113d8: 39 c1 cmp %eax,%ecx 1113da: 72 07 jb 1113e3 <_Heap_Free+0x27> 1113dc: 8b 73 24 mov 0x24(%ebx),%esi 1113df: 39 f1 cmp %esi,%ecx 1113e1: 76 0d jbe 1113f0 <_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 ); 1113e3: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1113e5: 83 c4 10 add $0x10,%esp 1113e8: 5b pop %ebx 1113e9: 5e pop %esi 1113ea: 5f pop %edi 1113eb: c9 leave 1113ec: c3 ret 1113ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1113f0: 8b 51 04 mov 0x4(%ecx),%edx 1113f3: 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; 1113f6: 83 e2 fe and $0xfffffffe,%edx 1113f9: 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); 1113fc: 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; 1113ff: 39 d0 cmp %edx,%eax 111401: 77 e0 ja 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN 111403: 39 d6 cmp %edx,%esi 111405: 72 dc jb 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN 111407: 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 ) ) { 11140a: f7 c7 01 00 00 00 test $0x1,%edi 111410: 74 d1 je 1113e3 <_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; 111412: 83 e7 fe and $0xfffffffe,%edi 111415: 89 7d e4 mov %edi,-0x1c(%ebp) return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 111418: 39 d6 cmp %edx,%esi 11141a: 0f 84 c8 00 00 00 je 1114e8 <_Heap_Free+0x12c> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 111420: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 111425: 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 ) ) { 111429: f6 45 f0 01 testb $0x1,-0x10(%ebp) 11142d: 75 45 jne 111474 <_Heap_Free+0xb8> uintptr_t const prev_size = block->prev_size; 11142f: 8b 39 mov (%ecx),%edi 111431: 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); 111434: 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; 111436: 39 c8 cmp %ecx,%eax 111438: 77 a9 ja 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN 11143a: 39 ce cmp %ecx,%esi 11143c: 72 a5 jb 1113e3 <_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) ) { 11143e: f6 41 04 01 testb $0x1,0x4(%ecx) 111442: 74 9f je 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 111444: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 111448: 0f 84 a6 00 00 00 je 1114f4 <_Heap_Free+0x138> uintptr_t const size = block_size + prev_size + next_block_size; 11144e: 8b 7d e4 mov -0x1c(%ebp),%edi 111451: 03 7d ec add -0x14(%ebp),%edi 111454: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 111457: 8b 42 08 mov 0x8(%edx),%eax 11145a: 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; 11145d: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 111460: 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; 111463: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111466: 89 f8 mov %edi,%eax 111468: 83 c8 01 or $0x1,%eax 11146b: 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; 11146e: 89 3c 39 mov %edi,(%ecx,%edi,1) 111471: eb 2a jmp 11149d <_Heap_Free+0xe1> 111473: 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 */ 111474: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 111478: 74 3a je 1114b4 <_Heap_Free+0xf8> uintptr_t const size = block_size + next_block_size; 11147a: 8b 7d e4 mov -0x1c(%ebp),%edi 11147d: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 111480: 8b 42 08 mov 0x8(%edx),%eax 111483: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 111486: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 111489: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 11148c: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 11148f: 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; 111492: 89 f8 mov %edi,%eax 111494: 83 c8 01 or $0x1,%eax 111497: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 11149a: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 11149d: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 1114a0: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 1114a3: 8b 55 ec mov -0x14(%ebp),%edx 1114a6: 01 53 30 add %edx,0x30(%ebx) return( true ); 1114a9: b0 01 mov $0x1,%al } 1114ab: 83 c4 10 add $0x10,%esp 1114ae: 5b pop %ebx 1114af: 5e pop %esi 1114b0: 5f pop %edi 1114b1: c9 leave 1114b2: c3 ret 1114b3: 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; 1114b4: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 1114b7: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 1114ba: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 1114bd: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 1114c0: 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; 1114c3: 8b 45 ec mov -0x14(%ebp),%eax 1114c6: 83 c8 01 or $0x1,%eax 1114c9: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1114cc: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 1114d0: 8b 45 ec mov -0x14(%ebp),%eax 1114d3: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 1114d5: 8b 43 38 mov 0x38(%ebx),%eax 1114d8: 40 inc %eax 1114d9: 89 43 38 mov %eax,0x38(%ebx) if ( stats->max_free_blocks < stats->free_blocks ) { 1114dc: 3b 43 3c cmp 0x3c(%ebx),%eax 1114df: 76 bc jbe 11149d <_Heap_Free+0xe1> stats->max_free_blocks = stats->free_blocks; 1114e1: 89 43 3c mov %eax,0x3c(%ebx) 1114e4: eb b7 jmp 11149d <_Heap_Free+0xe1> 1114e6: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 1114e8: c6 45 eb 00 movb $0x0,-0x15(%ebp) 1114ec: e9 38 ff ff ff jmp 111429 <_Heap_Free+0x6d> 1114f1: 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; 1114f4: 8b 45 ec mov -0x14(%ebp),%eax 1114f7: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1114fa: 89 c6 mov %eax,%esi 1114fc: 83 ce 01 or $0x1,%esi 1114ff: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111502: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 111506: 89 02 mov %eax,(%edx) 111508: eb 93 jmp 11149d <_Heap_Free+0xe1> =============================================================================== 0010c614 <_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 ) { 10c614: 55 push %ebp 10c615: 89 e5 mov %esp,%ebp 10c617: 57 push %edi 10c618: 56 push %esi 10c619: 53 push %ebx 10c61a: 8b 5d 08 mov 0x8(%ebp),%ebx 10c61d: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c620: 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 ); 10c623: 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; 10c626: 89 c8 mov %ecx,%eax 10c628: 31 d2 xor %edx,%edx 10c62a: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c62d: 85 d2 test %edx,%edx 10c62f: 74 05 je 10c636 <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c631: 03 4d 10 add 0x10(%ebp),%ecx 10c634: 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 ( 10c636: 39 f3 cmp %esi,%ebx 10c638: 77 2e ja 10c668 <_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); 10c63a: 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 = 10c63d: 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 10c63f: 39 cf cmp %ecx,%edi 10c641: 76 25 jbe 10c668 <_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 ); 10c643: 29 cf sub %ecx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c645: 89 f8 mov %edi,%eax 10c647: 31 d2 xor %edx,%edx 10c649: f7 75 10 divl 0x10(%ebp) 10c64c: 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 10c64e: 39 7d 14 cmp %edi,0x14(%ebp) 10c651: 77 15 ja 10c668 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c653: 8b 45 18 mov 0x18(%ebp),%eax 10c656: 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); 10c658: 01 f7 add %esi,%edi 10c65a: 8b 45 1c mov 0x1c(%ebp),%eax 10c65d: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c65f: b0 01 mov $0x1,%al } 10c661: 5b pop %ebx 10c662: 5e pop %esi 10c663: 5f pop %edi 10c664: c9 leave 10c665: c3 ret 10c666: 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; 10c668: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c66a: 5b pop %ebx 10c66b: 5e pop %esi 10c66c: 5f pop %edi 10c66d: c9 leave 10c66e: c3 ret =============================================================================== 00115080 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 115080: 55 push %ebp 115081: 89 e5 mov %esp,%ebp 115083: 57 push %edi 115084: 56 push %esi 115085: 53 push %ebx 115086: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 115089: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 11508f: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 115096: 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; } } 11509d: 8b 45 08 mov 0x8(%ebp),%eax 1150a0: 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); 1150a3: 39 d0 cmp %edx,%eax 1150a5: 74 31 je 1150d8 <_Heap_Get_free_information+0x58> 1150a7: bb 01 00 00 00 mov $0x1,%ebx 1150ac: 31 f6 xor %esi,%esi 1150ae: 31 c9 xor %ecx,%ecx 1150b0: eb 07 jmp 1150b9 <_Heap_Get_free_information+0x39> 1150b2: 66 90 xchg %ax,%ax <== NOT EXECUTED 1150b4: 8b 77 04 mov 0x4(%edi),%esi 1150b7: 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; 1150b9: 8b 42 04 mov 0x4(%edx),%eax 1150bc: 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; 1150bf: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 1150c1: 39 f0 cmp %esi,%eax 1150c3: 76 03 jbe 1150c8 <_Heap_Get_free_information+0x48> info->largest = the_size; 1150c5: 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) 1150c8: 8b 52 08 mov 0x8(%edx),%edx 1150cb: 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); 1150ce: 39 55 08 cmp %edx,0x8(%ebp) 1150d1: 75 e1 jne 1150b4 <_Heap_Get_free_information+0x34> 1150d3: 89 1f mov %ebx,(%edi) 1150d5: 89 4f 08 mov %ecx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1150d8: 5b pop %ebx 1150d9: 5e pop %esi 1150da: 5f pop %edi 1150db: c9 leave 1150dc: c3 ret =============================================================================== 001150e0 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 1150e0: 55 push %ebp 1150e1: 89 e5 mov %esp,%ebp 1150e3: 57 push %edi 1150e4: 56 push %esi 1150e5: 53 push %ebx 1150e6: 8b 45 08 mov 0x8(%ebp),%eax 1150e9: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 1150ec: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 1150ef: 8b 70 24 mov 0x24(%eax),%esi memset(the_info, 0, sizeof(*the_info)); 1150f2: b9 18 00 00 00 mov $0x18,%ecx 1150f7: 31 c0 xor %eax,%eax 1150f9: 89 df mov %ebx,%edi 1150fb: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 1150fd: 39 f2 cmp %esi,%edx 1150ff: 74 33 je 115134 <_Heap_Get_information+0x54><== NEVER TAKEN 115101: 8b 7a 04 mov 0x4(%edx),%edi 115104: eb 16 jmp 11511c <_Heap_Get_information+0x3c> 115106: 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; 115108: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 11510b: ff 00 incl (%eax) info->total += the_size; 11510d: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 115110: 39 48 04 cmp %ecx,0x4(%eax) 115113: 73 03 jae 115118 <_Heap_Get_information+0x38> info->largest = the_size; 115115: 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 ) { 115118: 39 d6 cmp %edx,%esi 11511a: 74 18 je 115134 <_Heap_Get_information+0x54> 11511c: 89 f9 mov %edi,%ecx 11511e: 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); 115121: 01 ca add %ecx,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 115123: 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) ) 115126: f7 c7 01 00 00 00 test $0x1,%edi 11512c: 75 da jne 115108 <_Heap_Get_information+0x28> info = &the_info->Used; else info = &the_info->Free; 11512e: 89 d8 mov %ebx,%eax 115130: eb d9 jmp 11510b <_Heap_Get_information+0x2b> 115132: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 115134: 5b pop %ebx 115135: 5e pop %esi 115136: 5f pop %edi 115137: c9 leave 115138: c3 ret =============================================================================== 0010c670 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c670: 55 push %ebp 10c671: 89 e5 mov %esp,%ebp 10c673: 57 push %edi 10c674: 56 push %esi 10c675: 53 push %ebx 10c676: 83 ec 10 sub $0x10,%esp 10c679: 8b 5d 08 mov 0x8(%ebp),%ebx 10c67c: 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; 10c67f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) Heap_Block *last_block = NULL; 10c686: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) if ( page_size == 0 ) { 10c68d: 85 f6 test %esi,%esi 10c68f: 74 2b je 10c6bc <_Heap_Initialize+0x4c> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c691: 89 f0 mov %esi,%eax 10c693: 83 e0 03 and $0x3,%eax 10c696: 74 05 je 10c69d <_Heap_Initialize+0x2d> return value - remainder + alignment; 10c698: 83 c6 04 add $0x4,%esi 10c69b: 29 c6 sub %eax,%esi page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c69d: 83 fe 03 cmp $0x3,%esi 10c6a0: 76 40 jbe 10c6e2 <_Heap_Initialize+0x72> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c6a2: b8 10 00 00 00 mov $0x10,%eax 10c6a7: 31 d2 xor %edx,%edx 10c6a9: f7 f6 div %esi if ( remainder != 0 ) { 10c6ab: 85 d2 test %edx,%edx 10c6ad: 0f 84 d8 00 00 00 je 10c78b <_Heap_Initialize+0x11b> return value - remainder + alignment; 10c6b3: 8d 7e 10 lea 0x10(%esi),%edi 10c6b6: 29 d7 sub %edx,%edi 10c6b8: eb 0c jmp 10c6c6 <_Heap_Initialize+0x56> 10c6ba: 66 90 xchg %ax,%ax <== NOT EXECUTED bool area_ok = false; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; 10c6bc: be 04 00 00 00 mov $0x4,%esi } else { return value; 10c6c1: bf 10 00 00 00 mov $0x10,%edi return 0; } } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); area_ok = _Heap_Get_first_and_last_block( 10c6c6: 8d 45 ec lea -0x14(%ebp),%eax 10c6c9: 50 push %eax 10c6ca: 8d 45 f0 lea -0x10(%ebp),%eax 10c6cd: 50 push %eax 10c6ce: 57 push %edi 10c6cf: 56 push %esi 10c6d0: ff 75 10 pushl 0x10(%ebp) 10c6d3: ff 75 0c pushl 0xc(%ebp) 10c6d6: e8 39 ff ff ff call 10c614 <_Heap_Get_first_and_last_block> page_size, min_block_size, &first_block, &last_block ); if ( !area_ok ) { 10c6db: 83 c4 18 add $0x18,%esp 10c6de: 84 c0 test %al,%al 10c6e0: 75 0a jne 10c6ec <_Heap_Initialize+0x7c> return 0; 10c6e2: 31 c0 xor %eax,%eax _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c6e4: 8d 65 f4 lea -0xc(%ebp),%esp 10c6e7: 5b pop %ebx 10c6e8: 5e pop %esi 10c6e9: 5f pop %edi 10c6ea: c9 leave 10c6eb: 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; 10c6ec: 8b 45 10 mov 0x10(%ebp),%eax 10c6ef: 03 45 0c add 0xc(%ebp),%eax 10c6f2: 89 43 1c mov %eax,0x1c(%ebx) ); if ( !area_ok ) { return 0; } first_block_begin = (uintptr_t) first_block; 10c6f5: 8b 55 f0 mov -0x10(%ebp),%edx last_block_begin = (uintptr_t) last_block; first_block_size = last_block_begin - first_block_begin; 10c6f8: 8b 45 ec mov -0x14(%ebp),%eax 10c6fb: 29 d0 sub %edx,%eax /* First block */ first_block->prev_size = heap_area_end; 10c6fd: 8b 4b 1c mov 0x1c(%ebx),%ecx 10c700: 89 0a mov %ecx,(%edx) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c702: 89 c1 mov %eax,%ecx 10c704: 83 c9 01 or $0x1,%ecx 10c707: 89 4a 04 mov %ecx,0x4(%edx) first_block->next = _Heap_Free_list_tail( heap ); 10c70a: 89 5a 08 mov %ebx,0x8(%edx) first_block->prev = _Heap_Free_list_head( heap ); 10c70d: 89 5a 0c mov %ebx,0xc(%edx) /* Heap control */ heap->page_size = page_size; 10c710: 89 73 10 mov %esi,0x10(%ebx) heap->min_block_size = min_block_size; 10c713: 89 7b 14 mov %edi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c716: 8b 4d 0c mov 0xc(%ebp),%ecx 10c719: 89 4b 18 mov %ecx,0x18(%ebx) heap->area_end = heap_area_end; heap->first_block = first_block; 10c71c: 89 53 20 mov %edx,0x20(%ebx) heap->last_block = last_block; 10c71f: 8b 4d ec mov -0x14(%ebp),%ecx 10c722: 89 4b 24 mov %ecx,0x24(%ebx) _Heap_Free_list_head( heap )->next = first_block; 10c725: 89 53 08 mov %edx,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c728: 89 53 0c mov %edx,0xc(%ebx) /* Last block */ last_block->prev_size = first_block_size; 10c72b: 89 01 mov %eax,(%ecx) * 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( 10c72d: 29 ca sub %ecx,%edx 10c72f: 89 51 04 mov %edx,0x4(%ecx) last_block->size_and_flag = 0; _Heap_Set_last_block_size( heap ); /* Statistics */ stats->size = first_block_size; 10c732: 89 43 2c mov %eax,0x2c(%ebx) stats->free_size = first_block_size; 10c735: 89 43 30 mov %eax,0x30(%ebx) stats->min_free_size = first_block_size; 10c738: 89 43 34 mov %eax,0x34(%ebx) stats->free_blocks = 1; 10c73b: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c742: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c749: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c750: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c757: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c75e: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c765: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c76c: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c773: 8b 15 40 70 12 00 mov 0x127040,%edx 10c779: 89 53 28 mov %edx,0x28(%ebx) 10c77c: 42 inc %edx 10c77d: 89 15 40 70 12 00 mov %edx,0x127040 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c783: 8d 65 f4 lea -0xc(%ebp),%esp 10c786: 5b pop %ebx 10c787: 5e pop %esi 10c788: 5f pop %edi 10c789: c9 leave 10c78a: c3 ret uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c78b: bf 10 00 00 00 mov $0x10,%edi 10c790: e9 31 ff ff ff jmp 10c6c6 <_Heap_Initialize+0x56> =============================================================================== 0011ef90 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11ef90: 55 push %ebp 11ef91: 89 e5 mov %esp,%ebp 11ef93: 57 push %edi 11ef94: 56 push %esi 11ef95: 53 push %ebx 11ef96: 83 ec 2c sub $0x2c,%esp 11ef99: 8b 5d 08 mov 0x8(%ebp),%ebx 11ef9c: 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); 11ef9f: 8d 4e f8 lea -0x8(%esi),%ecx 11efa2: 89 f0 mov %esi,%eax 11efa4: 31 d2 xor %edx,%edx 11efa6: 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); 11efa9: 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; 11efab: 8b 45 14 mov 0x14(%ebp),%eax 11efae: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11efb4: 8b 55 18 mov 0x18(%ebp),%edx 11efb7: 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; 11efbd: 39 4b 20 cmp %ecx,0x20(%ebx) 11efc0: 77 05 ja 11efc7 <_Heap_Resize_block+0x37> 11efc2: 39 4b 24 cmp %ecx,0x24(%ebx) 11efc5: 73 0d jae 11efd4 <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; 11efc7: b8 02 00 00 00 mov $0x2,%eax } } 11efcc: 8d 65 f4 lea -0xc(%ebp),%esp 11efcf: 5b pop %ebx 11efd0: 5e pop %esi 11efd1: 5f pop %edi 11efd2: c9 leave 11efd3: 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; 11efd4: 8b 41 04 mov 0x4(%ecx),%eax 11efd7: 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; 11efda: 8d 3c 01 lea (%ecx,%eax,1),%edi 11efdd: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11efe0: 89 fa mov %edi,%edx 11efe2: 29 f2 sub %esi,%edx 11efe4: 83 c2 04 add $0x4,%edx 11efe7: 89 55 e0 mov %edx,-0x20(%ebp) 11efea: 8b 57 04 mov 0x4(%edi),%edx 11efed: 83 e2 fe and $0xfffffffe,%edx 11eff0: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11eff3: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11eff8: 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; 11effc: 8b 55 e0 mov -0x20(%ebp),%edx 11efff: 8b 7d 14 mov 0x14(%ebp),%edi 11f002: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f004: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11f008: 75 6e jne 11f078 <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f00a: 8b 55 e0 mov -0x20(%ebp),%edx 11f00d: 39 55 10 cmp %edx,0x10(%ebp) 11f010: 77 79 ja 11f08b <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f012: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11f016: 74 31 je 11f049 <_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; 11f018: 8b 79 04 mov 0x4(%ecx),%edi 11f01b: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11f01e: 09 c7 or %eax,%edi 11f020: 89 79 04 mov %edi,0x4(%ecx) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f023: 8b 7d d4 mov -0x2c(%ebp),%edi 11f026: 8b 7f 08 mov 0x8(%edi),%edi 11f029: 89 7d e4 mov %edi,-0x1c(%ebp) 11f02c: 8b 55 d4 mov -0x2c(%ebp),%edx 11f02f: 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; 11f032: 8b 55 e4 mov -0x1c(%ebp),%edx 11f035: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11f038: 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; 11f03b: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11f040: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11f043: 8b 7d d0 mov -0x30(%ebp),%edi 11f046: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11f049: ff 75 10 pushl 0x10(%ebp) 11f04c: 56 push %esi 11f04d: 51 push %ecx 11f04e: 53 push %ebx 11f04f: e8 24 d8 fe ff call 10c878 <_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; 11f054: 8b 50 04 mov 0x4(%eax),%edx 11f057: 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_BLOCK_SIZE_OFFSET; 11f05a: 29 f0 sub %esi,%eax 11f05c: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11f060: 8b 55 18 mov 0x18(%ebp),%edx 11f063: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11f065: ff 43 54 incl 0x54(%ebx) 11f068: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11f06b: 31 c0 xor %eax,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f06d: 8d 65 f4 lea -0xc(%ebp),%esp 11f070: 5b pop %ebx 11f071: 5e pop %esi 11f072: 5f pop %edi 11f073: c9 leave 11f074: c3 ret 11f075: 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; 11f078: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f07b: 8b 7d d0 mov -0x30(%ebp),%edi 11f07e: 01 fa add %edi,%edx 11f080: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11f083: 8b 55 e0 mov -0x20(%ebp),%edx 11f086: 39 55 10 cmp %edx,0x10(%ebp) 11f089: 76 87 jbe 11f012 <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11f08b: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f090: 8d 65 f4 lea -0xc(%ebp),%esp 11f093: 5b pop %ebx 11f094: 5e pop %esi 11f095: 5f pop %edi 11f096: c9 leave 11f097: c3 ret =============================================================================== 0011f098 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11f098: 55 push %ebp 11f099: 89 e5 mov %esp,%ebp 11f09b: 56 push %esi 11f09c: 53 push %ebx 11f09d: 8b 5d 08 mov 0x8(%ebp),%ebx 11f0a0: 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); 11f0a3: 8d 4e f8 lea -0x8(%esi),%ecx 11f0a6: 89 f0 mov %esi,%eax 11f0a8: 31 d2 xor %edx,%edx 11f0aa: 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); 11f0ad: 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 11f0af: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11f0b2: 39 c1 cmp %eax,%ecx 11f0b4: 72 07 jb 11f0bd <_Heap_Size_of_alloc_area+0x25> 11f0b6: 8b 53 24 mov 0x24(%ebx),%edx 11f0b9: 39 d1 cmp %edx,%ecx 11f0bb: 76 07 jbe 11f0c4 <_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; 11f0bd: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; } 11f0bf: 5b pop %ebx 11f0c0: 5e pop %esi 11f0c1: c9 leave 11f0c2: c3 ret 11f0c3: 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; 11f0c4: 8b 59 04 mov 0x4(%ecx),%ebx 11f0c7: 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); 11f0ca: 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; 11f0cc: 39 c8 cmp %ecx,%eax 11f0ce: 77 ed ja 11f0bd <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11f0d0: 39 ca cmp %ecx,%edx 11f0d2: 72 e9 jb 11f0bd <_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 ) 11f0d4: f6 41 04 01 testb $0x1,0x4(%ecx) 11f0d8: 74 e3 je 11f0bd <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11f0da: 29 f1 sub %esi,%ecx 11f0dc: 8d 51 04 lea 0x4(%ecx),%edx 11f0df: 8b 45 10 mov 0x10(%ebp),%eax 11f0e2: 89 10 mov %edx,(%eax) return true; 11f0e4: b0 01 mov $0x1,%al } 11f0e6: 5b pop %ebx 11f0e7: 5e pop %esi 11f0e8: c9 leave 11f0e9: c3 ret =============================================================================== 0010d390 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d390: 55 push %ebp 10d391: 89 e5 mov %esp,%ebp 10d393: 57 push %edi 10d394: 56 push %esi 10d395: 53 push %ebx 10d396: 83 ec 4c sub $0x4c,%esp 10d399: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d39c: 8b 43 10 mov 0x10(%ebx),%eax 10d39f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d3a2: 8b 53 14 mov 0x14(%ebx),%edx 10d3a5: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d3a8: 8b 43 20 mov 0x20(%ebx),%eax 10d3ab: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d3ae: 8b 53 24 mov 0x24(%ebx),%edx 10d3b1: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d3b4: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d3b8: 74 1a je 10d3d4 <_Heap_Walk+0x44> 10d3ba: c7 45 d8 48 d3 10 00 movl $0x10d348,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d3c1: 83 3d 80 9c 12 00 03 cmpl $0x3,0x129c80 10d3c8: 74 1a je 10d3e4 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d3ca: b0 01 mov $0x1,%al } 10d3cc: 8d 65 f4 lea -0xc(%ebp),%esp 10d3cf: 5b pop %ebx 10d3d0: 5e pop %esi 10d3d1: 5f pop %edi 10d3d2: c9 leave 10d3d3: 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; 10d3d4: c7 45 d8 40 d3 10 00 movl $0x10d340,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d3db: 83 3d 80 9c 12 00 03 cmpl $0x3,0x129c80 10d3e2: 75 e6 jne 10d3ca <_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)( 10d3e4: 52 push %edx 10d3e5: ff 73 0c pushl 0xc(%ebx) 10d3e8: ff 73 08 pushl 0x8(%ebx) 10d3eb: ff 75 cc pushl -0x34(%ebp) 10d3ee: ff 75 dc pushl -0x24(%ebp) 10d3f1: ff 73 1c pushl 0x1c(%ebx) 10d3f4: ff 73 18 pushl 0x18(%ebx) 10d3f7: ff 75 d0 pushl -0x30(%ebp) 10d3fa: ff 75 e0 pushl -0x20(%ebp) 10d3fd: 68 34 1f 12 00 push $0x121f34 10d402: 6a 00 push $0x0 10d404: ff 75 0c pushl 0xc(%ebp) 10d407: 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 ) { 10d40a: 83 c4 30 add $0x30,%esp 10d40d: 8b 45 e0 mov -0x20(%ebp),%eax 10d410: 85 c0 test %eax,%eax 10d412: 74 70 je 10d484 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d414: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d418: 75 72 jne 10d48c <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d41a: 8b 45 d0 mov -0x30(%ebp),%eax 10d41d: 31 d2 xor %edx,%edx 10d41f: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d422: 85 d2 test %edx,%edx 10d424: 75 72 jne 10d498 <_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; 10d426: 8b 45 dc mov -0x24(%ebp),%eax 10d429: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d42c: 31 d2 xor %edx,%edx 10d42e: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d431: 85 d2 test %edx,%edx 10d433: 75 6f jne 10d4a4 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d435: 8b 45 dc mov -0x24(%ebp),%eax 10d438: 8b 40 04 mov 0x4(%eax),%eax 10d43b: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d43e: a8 01 test $0x1,%al 10d440: 0f 84 8e 00 00 00 je 10d4d4 <_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; 10d446: 8b 55 cc mov -0x34(%ebp),%edx 10d449: 8b 42 04 mov 0x4(%edx),%eax 10d44c: 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); 10d44f: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d451: f6 40 04 01 testb $0x1,0x4(%eax) 10d455: 74 25 je 10d47c <_Heap_Walk+0xec> ); return false; } if ( 10d457: 39 45 dc cmp %eax,-0x24(%ebp) 10d45a: 74 54 je 10d4b0 <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d45c: 51 push %ecx <== NOT EXECUTED 10d45d: 68 50 20 12 00 push $0x122050 <== NOT EXECUTED 10d462: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d464: 6a 01 push $0x1 10d466: ff 75 0c pushl 0xc(%ebp) 10d469: ff 55 d8 call *-0x28(%ebp) 10d46c: 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; 10d46f: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d471: 8d 65 f4 lea -0xc(%ebp),%esp 10d474: 5b pop %ebx 10d475: 5e pop %esi 10d476: 5f pop %edi 10d477: c9 leave 10d478: c3 ret 10d479: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d47c: 53 push %ebx 10d47d: 68 ea 1e 12 00 push $0x121eea 10d482: eb e0 jmp 10d464 <_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" ); 10d484: 57 push %edi 10d485: 68 b9 1e 12 00 push $0x121eb9 10d48a: eb d8 jmp 10d464 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d48c: ff 75 e0 pushl -0x20(%ebp) 10d48f: 68 cc 1e 12 00 push $0x121ecc 10d494: eb ce jmp 10d464 <_Heap_Walk+0xd4> 10d496: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d498: ff 75 d0 pushl -0x30(%ebp) 10d49b: 68 c8 1f 12 00 push $0x121fc8 10d4a0: eb c2 jmp 10d464 <_Heap_Walk+0xd4> 10d4a2: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d4a4: ff 75 dc pushl -0x24(%ebp) 10d4a7: 68 ec 1f 12 00 push $0x121fec 10d4ac: eb b6 jmp 10d464 <_Heap_Walk+0xd4> 10d4ae: 66 90 xchg %ax,%ax <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d4b0: 8b 43 10 mov 0x10(%ebx),%eax 10d4b3: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d4b6: 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 ) { 10d4b9: 39 cb cmp %ecx,%ebx 10d4bb: 0f 84 a8 00 00 00 je 10d569 <_Heap_Walk+0x1d9> block = next_block; } while ( block != first_block ); return true; } 10d4c1: 8b 43 20 mov 0x20(%ebx),%eax 10d4c4: 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; 10d4c7: 39 c8 cmp %ecx,%eax 10d4c9: 76 11 jbe 10d4dc <_Heap_Walk+0x14c> <== ALWAYS TAKEN 10d4cb: 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)( 10d4cc: 51 push %ecx 10d4cd: 68 80 20 12 00 push $0x122080 10d4d2: eb 90 jmp 10d464 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d4d4: 56 push %esi 10d4d5: 68 20 20 12 00 push $0x122020 10d4da: eb 88 jmp 10d464 <_Heap_Walk+0xd4> 10d4dc: 8b 7b 24 mov 0x24(%ebx),%edi 10d4df: 39 cf cmp %ecx,%edi 10d4e1: 72 e9 jb 10d4cc <_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; 10d4e3: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d4e6: 31 d2 xor %edx,%edx 10d4e8: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d4eb: 85 d2 test %edx,%edx 10d4ed: 0f 85 44 02 00 00 jne 10d737 <_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; 10d4f3: 8b 41 04 mov 0x4(%ecx),%eax 10d4f6: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d4f9: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d4fe: 0f 85 3e 02 00 00 jne 10d742 <_Heap_Walk+0x3b2> <== NEVER TAKEN 10d504: 89 da mov %ebx,%edx 10d506: 89 ce mov %ecx,%esi 10d508: eb 37 jmp 10d541 <_Heap_Walk+0x1b1> 10d50a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; 10d50c: 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 ) { 10d50f: 39 cb cmp %ecx,%ebx 10d511: 74 5c je 10d56f <_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; 10d513: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d516: 77 b4 ja 10d4cc <_Heap_Walk+0x13c> 10d518: 39 f9 cmp %edi,%ecx 10d51a: 77 b0 ja 10d4cc <_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; 10d51c: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d51f: 31 d2 xor %edx,%edx 10d521: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d524: 85 d2 test %edx,%edx 10d526: 0f 85 0b 02 00 00 jne 10d737 <_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; 10d52c: 8b 41 04 mov 0x4(%ecx),%eax 10d52f: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d532: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d537: 0f 85 05 02 00 00 jne 10d742 <_Heap_Walk+0x3b2> 10d53d: 89 f2 mov %esi,%edx 10d53f: 89 ce mov %ecx,%esi ); return false; } if ( free_block->prev != prev_block ) { 10d541: 8b 41 0c mov 0xc(%ecx),%eax 10d544: 39 d0 cmp %edx,%eax 10d546: 74 c4 je 10d50c <_Heap_Walk+0x17c> (*printer)( 10d548: 83 ec 0c sub $0xc,%esp 10d54b: 50 push %eax 10d54c: 51 push %ecx 10d54d: 68 d0 20 12 00 push $0x1220d0 10d552: 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)( 10d554: 6a 01 push $0x1 10d556: ff 75 0c pushl 0xc(%ebp) 10d559: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d55c: 83 c4 20 add $0x20,%esp 10d55f: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d561: 8d 65 f4 lea -0xc(%ebp),%esp 10d564: 5b pop %ebx 10d565: 5e pop %esi 10d566: 5f pop %edi 10d567: c9 leave 10d568: 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 ) { 10d569: 8b 53 20 mov 0x20(%ebx),%edx 10d56c: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d56f: 8b 7d dc mov -0x24(%ebp),%edi 10d572: 8b 45 d4 mov -0x2c(%ebp),%eax 10d575: 8d 76 00 lea 0x0(%esi),%esi 10d578: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d57b: 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); 10d57e: 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; 10d581: 39 f0 cmp %esi,%eax 10d583: 76 0f jbe 10d594 <_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)( 10d585: 83 ec 0c sub $0xc,%esp 10d588: 56 push %esi 10d589: 57 push %edi 10d58a: 68 04 21 12 00 push $0x122104 10d58f: eb c3 jmp 10d554 <_Heap_Walk+0x1c4> 10d591: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d594: 39 73 24 cmp %esi,0x24(%ebx) 10d597: 72 ec jb 10d585 <_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; 10d599: 3b 7d cc cmp -0x34(%ebp),%edi 10d59c: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d5a0: 89 c8 mov %ecx,%eax 10d5a2: 31 d2 xor %edx,%edx 10d5a4: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d5a7: 85 d2 test %edx,%edx 10d5a9: 74 0a je 10d5b5 <_Heap_Walk+0x225> 10d5ab: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d5af: 0f 85 52 01 00 00 jne 10d707 <_Heap_Walk+0x377> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d5b5: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d5b8: 76 0a jbe 10d5c4 <_Heap_Walk+0x234> 10d5ba: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d5be: 0f 85 52 01 00 00 jne 10d716 <_Heap_Walk+0x386> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d5c4: 39 f7 cmp %esi,%edi 10d5c6: 72 0a jb 10d5d2 <_Heap_Walk+0x242> 10d5c8: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d5cc: 0f 85 56 01 00 00 jne 10d728 <_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; 10d5d2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d5d5: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d5d8: f6 46 04 01 testb $0x1,0x4(%esi) 10d5dc: 74 4e je 10d62c <_Heap_Walk+0x29c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d5de: 85 d2 test %edx,%edx 10d5e0: 74 2e je 10d610 <_Heap_Walk+0x280> (*printer)( 10d5e2: 83 ec 0c sub $0xc,%esp 10d5e5: 51 push %ecx 10d5e6: 57 push %edi 10d5e7: 68 1b 1f 12 00 push $0x121f1b 10d5ec: 6a 00 push $0x0 10d5ee: ff 75 0c pushl 0xc(%ebp) 10d5f1: ff 55 d8 call *-0x28(%ebp) 10d5f4: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d5f7: 39 75 dc cmp %esi,-0x24(%ebp) 10d5fa: 0f 84 ca fd ff ff je 10d3ca <_Heap_Walk+0x3a> 10d600: 8b 56 04 mov 0x4(%esi),%edx 10d603: 89 55 e4 mov %edx,-0x1c(%ebp) 10d606: 8b 43 20 mov 0x20(%ebx),%eax 10d609: 89 f7 mov %esi,%edi 10d60b: e9 68 ff ff ff jmp 10d578 <_Heap_Walk+0x1e8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d610: 83 ec 08 sub $0x8,%esp 10d613: ff 37 pushl (%edi) 10d615: 51 push %ecx 10d616: 57 push %edi 10d617: 68 68 22 12 00 push $0x122268 10d61c: 6a 00 push $0x0 10d61e: ff 75 0c pushl 0xc(%ebp) 10d621: ff 55 d8 call *-0x28(%ebp) 10d624: 83 c4 20 add $0x20,%esp 10d627: eb ce jmp 10d5f7 <_Heap_Walk+0x267> 10d629: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block = next_block; } while ( block != first_block ); return true; } 10d62c: 8b 43 08 mov 0x8(%ebx),%eax 10d62f: 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 ? 10d632: 8b 47 08 mov 0x8(%edi),%eax 10d635: 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)( 10d638: 39 43 0c cmp %eax,0xc(%ebx) 10d63b: 0f 84 97 00 00 00 je 10d6d8 <_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)" : "") 10d641: 39 c3 cmp %eax,%ebx 10d643: 0f 84 9b 00 00 00 je 10d6e4 <_Heap_Walk+0x354> 10d649: c7 45 c8 b5 1d 12 00 movl $0x121db5,-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 ? 10d650: 8b 47 0c mov 0xc(%edi),%eax 10d653: 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)( 10d656: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d659: 74 75 je 10d6d0 <_Heap_Walk+0x340> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d65b: 39 c3 cmp %eax,%ebx 10d65d: 0f 84 8d 00 00 00 je 10d6f0 <_Heap_Walk+0x360> 10d663: b8 b5 1d 12 00 mov $0x121db5,%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)( 10d668: 83 ec 0c sub $0xc,%esp 10d66b: ff 75 c8 pushl -0x38(%ebp) 10d66e: ff 75 e4 pushl -0x1c(%ebp) 10d671: 50 push %eax 10d672: ff 75 d4 pushl -0x2c(%ebp) 10d675: 51 push %ecx 10d676: 57 push %edi 10d677: 68 c4 21 12 00 push $0x1221c4 10d67c: 6a 00 push $0x0 10d67e: ff 75 0c pushl 0xc(%ebp) 10d681: 89 55 c4 mov %edx,-0x3c(%ebp) 10d684: 89 4d c0 mov %ecx,-0x40(%ebp) 10d687: 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 ) { 10d68a: 8b 06 mov (%esi),%eax 10d68c: 83 c4 30 add $0x30,%esp 10d68f: 8b 4d c0 mov -0x40(%ebp),%ecx 10d692: 39 c1 cmp %eax,%ecx 10d694: 8b 55 c4 mov -0x3c(%ebp),%edx 10d697: 75 27 jne 10d6c0 <_Heap_Walk+0x330> ); return false; } if ( !prev_used ) { 10d699: 85 d2 test %edx,%edx 10d69b: 74 5f je 10d6fc <_Heap_Walk+0x36c> block = next_block; } while ( block != first_block ); return true; } 10d69d: 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 ) { 10d6a0: 39 c3 cmp %eax,%ebx 10d6a2: 74 0f je 10d6b3 <_Heap_Walk+0x323> <== NEVER TAKEN if ( free_block == block ) { 10d6a4: 39 c7 cmp %eax,%edi 10d6a6: 0f 84 4b ff ff ff je 10d5f7 <_Heap_Walk+0x267> return true; } free_block = free_block->next; 10d6ac: 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 ) { 10d6af: 39 c3 cmp %eax,%ebx 10d6b1: 75 f1 jne 10d6a4 <_Heap_Walk+0x314> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d6b3: 57 push %edi 10d6b4: 68 90 22 12 00 push $0x122290 10d6b9: e9 a6 fd ff ff jmp 10d464 <_Heap_Walk+0xd4> 10d6be: 66 90 xchg %ax,%ax <== NOT EXECUTED " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d6c0: 52 push %edx 10d6c1: 56 push %esi 10d6c2: 50 push %eax 10d6c3: 51 push %ecx 10d6c4: 57 push %edi 10d6c5: 68 fc 21 12 00 push $0x1221fc 10d6ca: e9 85 fe ff ff jmp 10d554 <_Heap_Walk+0x1c4> 10d6cf: 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)( 10d6d0: b8 9f 1e 12 00 mov $0x121e9f,%eax 10d6d5: eb 91 jmp 10d668 <_Heap_Walk+0x2d8> 10d6d7: 90 nop <== NOT EXECUTED 10d6d8: c7 45 c8 86 1e 12 00 movl $0x121e86,-0x38(%ebp) 10d6df: e9 6c ff ff ff jmp 10d650 <_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)" : "") 10d6e4: c7 45 c8 95 1e 12 00 movl $0x121e95,-0x38(%ebp) 10d6eb: e9 60 ff ff ff jmp 10d650 <_Heap_Walk+0x2c0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d6f0: b8 af 1e 12 00 mov $0x121eaf,%eax 10d6f5: e9 6e ff ff ff jmp 10d668 <_Heap_Walk+0x2d8> 10d6fa: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !prev_used ) { (*printer)( 10d6fc: 57 push %edi 10d6fd: 68 38 22 12 00 push $0x122238 10d702: e9 5d fd ff ff jmp 10d464 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d707: 83 ec 0c sub $0xc,%esp 10d70a: 51 push %ecx 10d70b: 57 push %edi 10d70c: 68 34 21 12 00 push $0x122134 10d711: e9 3e fe ff ff jmp 10d554 <_Heap_Walk+0x1c4> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d716: 83 ec 08 sub $0x8,%esp 10d719: ff 75 d0 pushl -0x30(%ebp) 10d71c: 51 push %ecx 10d71d: 57 push %edi 10d71e: 68 64 21 12 00 push $0x122164 10d723: e9 2c fe ff ff jmp 10d554 <_Heap_Walk+0x1c4> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d728: 83 ec 0c sub $0xc,%esp 10d72b: 56 push %esi 10d72c: 57 push %edi 10d72d: 68 90 21 12 00 push $0x122190 10d732: e9 1d fe ff ff jmp 10d554 <_Heap_Walk+0x1c4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d737: 51 push %ecx 10d738: 68 a0 20 12 00 push $0x1220a0 10d73d: e9 22 fd ff ff jmp 10d464 <_Heap_Walk+0xd4> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d742: 51 push %ecx 10d743: 68 ff 1e 12 00 push $0x121eff 10d748: e9 17 fd ff ff jmp 10d464 <_Heap_Walk+0xd4> =============================================================================== 0010be24 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10be24: 55 push %ebp 10be25: 89 e5 mov %esp,%ebp 10be27: 53 push %ebx 10be28: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10be2b: 8b 0d 20 7e 12 00 mov 0x127e20,%ecx 10be31: 85 c9 test %ecx,%ecx 10be33: 74 1a je 10be4f <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10be35: 31 db xor %ebx,%ebx 10be37: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10be38: 52 push %edx 10be39: 6a 00 push $0x0 10be3b: 6a 00 push $0x0 10be3d: 53 push %ebx 10be3e: e8 31 51 00 00 call 110f74 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10be43: 43 inc %ebx 10be44: 83 c4 10 add $0x10,%esp 10be47: 39 1d 20 7e 12 00 cmp %ebx,0x127e20 10be4d: 77 e9 ja 10be38 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10be4f: 8b 5d fc mov -0x4(%ebp),%ebx 10be52: c9 leave 10be53: c3 ret =============================================================================== 0010bd8c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bd8c: 55 push %ebp 10bd8d: 89 e5 mov %esp,%ebp 10bd8f: 57 push %edi 10bd90: 56 push %esi 10bd91: 53 push %ebx 10bd92: 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; 10bd95: 8b 1d 54 32 12 00 mov 0x123254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bd9b: a1 50 32 12 00 mov 0x123250,%eax 10bda0: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bda3: 8b 35 4c 32 12 00 mov 0x12324c,%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 ) 10bda9: 39 f0 cmp %esi,%eax 10bdab: 73 5f jae 10be0c <_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( 10bdad: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bdb0: c1 e1 03 shl $0x3,%ecx 10bdb3: 83 ec 0c sub $0xc,%esp 10bdb6: 51 push %ecx 10bdb7: 89 4d dc mov %ecx,-0x24(%ebp) 10bdba: e8 91 2b 00 00 call 10e950 <_Workspace_Allocate_or_fatal_error> 10bdbf: 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 *) 10bdc1: a3 24 7e 12 00 mov %eax,0x127e24 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bdc6: 89 35 20 7e 12 00 mov %esi,0x127e20 memset( 10bdcc: 31 c0 xor %eax,%eax 10bdce: 8b 4d dc mov -0x24(%ebp),%ecx 10bdd1: 89 d7 mov %edx,%edi 10bdd3: 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++ ) 10bdd5: 83 c4 10 add $0x10,%esp 10bdd8: 8b 45 e4 mov -0x1c(%ebp),%eax 10bddb: 85 c0 test %eax,%eax 10bddd: 74 25 je 10be04 <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bddf: a1 24 7e 12 00 mov 0x127e24,%eax 10bde4: 89 45 e0 mov %eax,-0x20(%ebp) 10bde7: 31 c0 xor %eax,%eax 10bde9: 31 d2 xor %edx,%edx 10bdeb: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bdec: 8b 7d e0 mov -0x20(%ebp),%edi 10bdef: 01 c7 add %eax,%edi 10bdf1: 8d 34 03 lea (%ebx,%eax,1),%esi 10bdf4: b9 06 00 00 00 mov $0x6,%ecx 10bdf9: 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++ ) 10bdfb: 42 inc %edx 10bdfc: 83 c0 18 add $0x18,%eax 10bdff: 39 55 e4 cmp %edx,-0x1c(%ebp) 10be02: 77 e8 ja 10bdec <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10be04: 8d 65 f4 lea -0xc(%ebp),%esp 10be07: 5b pop %ebx 10be08: 5e pop %esi 10be09: 5f pop %edi 10be0a: c9 leave 10be0b: 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; 10be0c: 89 1d 24 7e 12 00 mov %ebx,0x127e24 _IO_Number_of_drivers = number_of_drivers; 10be12: 8b 45 e4 mov -0x1c(%ebp),%eax 10be15: a3 20 7e 12 00 mov %eax,0x127e20 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10be1a: 8d 65 f4 lea -0xc(%ebp),%esp 10be1d: 5b pop %ebx 10be1e: 5e pop %esi 10be1f: 5f pop %edi 10be20: c9 leave 10be21: c3 ret =============================================================================== 0010c96c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c96c: 55 push %ebp 10c96d: 89 e5 mov %esp,%ebp 10c96f: 53 push %ebx 10c970: 83 ec 08 sub $0x8,%esp 10c973: 8b 45 08 mov 0x8(%ebp),%eax 10c976: 8b 55 0c mov 0xc(%ebp),%edx 10c979: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c97c: a3 74 74 12 00 mov %eax,0x127474 _Internal_errors_What_happened.is_internal = is_internal; 10c981: 88 15 78 74 12 00 mov %dl,0x127478 _Internal_errors_What_happened.the_error = the_error; 10c987: 89 1d 7c 74 12 00 mov %ebx,0x12747c _User_extensions_Fatal( the_source, is_internal, the_error ); 10c98d: 53 push %ebx 10c98e: 0f b6 d2 movzbl %dl,%edx 10c991: 52 push %edx 10c992: 50 push %eax 10c993: e8 c0 1b 00 00 call 10e558 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c998: c7 05 80 75 12 00 05 movl $0x5,0x127580 <== NOT EXECUTED 10c99f: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c9a2: fa cli <== NOT EXECUTED 10c9a3: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c9a5: f4 hlt <== NOT EXECUTED 10c9a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c9a9: eb fe jmp 10c9a9 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0011150c <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 11150c: 55 push %ebp 11150d: 89 e5 mov %esp,%ebp 11150f: 8b 45 08 mov 0x8(%ebp),%eax 111512: 48 dec %eax 111513: 83 f8 02 cmp $0x2,%eax 111516: 77 0c ja 111524 <_Objects_API_maximum_class+0x18> 111518: 8b 04 85 3c 15 12 00 mov 0x12153c(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 11151f: c9 leave 111520: c3 ret 111521: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 111524: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 111526: c9 leave 111527: c3 ret =============================================================================== 0010c9fc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c9fc: 55 push %ebp 10c9fd: 89 e5 mov %esp,%ebp 10c9ff: 56 push %esi 10ca00: 53 push %ebx 10ca01: 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 ) 10ca04: 8b 43 18 mov 0x18(%ebx),%eax 10ca07: 85 c0 test %eax,%eax 10ca09: 75 0d jne 10ca18 <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10ca0b: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10ca0d: 89 c8 mov %ecx,%eax 10ca0f: 8d 65 f8 lea -0x8(%ebp),%esp 10ca12: 5b pop %ebx 10ca13: 5e pop %esi 10ca14: c9 leave 10ca15: c3 ret 10ca16: 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 ); 10ca18: 8d 73 20 lea 0x20(%ebx),%esi 10ca1b: 83 ec 0c sub $0xc,%esp 10ca1e: 56 push %esi 10ca1f: e8 6c f6 ff ff call 10c090 <_Chain_Get> 10ca24: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10ca26: 83 c4 10 add $0x10,%esp 10ca29: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ca2d: 74 de je 10ca0d <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10ca2f: 85 c0 test %eax,%eax 10ca31: 74 29 je 10ca5c <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10ca33: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10ca37: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10ca3b: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10ca3d: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ca41: 31 d2 xor %edx,%edx 10ca43: f7 f6 div %esi information->inactive_per_block[ block ]--; 10ca45: c1 e0 02 shl $0x2,%eax 10ca48: 03 43 30 add 0x30(%ebx),%eax 10ca4b: ff 08 decl (%eax) information->inactive--; 10ca4d: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10ca51: 89 c8 mov %ecx,%eax 10ca53: 8d 65 f8 lea -0x8(%ebp),%esp 10ca56: 5b pop %ebx 10ca57: 5e pop %esi 10ca58: c9 leave 10ca59: c3 ret 10ca5a: 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 ); 10ca5c: 83 ec 0c sub $0xc,%esp 10ca5f: 53 push %ebx 10ca60: e8 3b 00 00 00 call 10caa0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10ca65: 89 34 24 mov %esi,(%esp) 10ca68: e8 23 f6 ff ff call 10c090 <_Chain_Get> 10ca6d: 89 c1 mov %eax,%ecx } if ( the_object ) { 10ca6f: 83 c4 10 add $0x10,%esp 10ca72: 85 c0 test %eax,%eax 10ca74: 74 97 je 10ca0d <_Objects_Allocate+0x11> 10ca76: eb bb jmp 10ca33 <_Objects_Allocate+0x37> =============================================================================== 0010caa0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10caa0: 55 push %ebp 10caa1: 89 e5 mov %esp,%ebp 10caa3: 57 push %edi 10caa4: 56 push %esi 10caa5: 53 push %ebx 10caa6: 83 ec 4c sub $0x4c,%esp 10caa9: 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 ); 10caac: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10cab0: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cab3: 8b 4b 34 mov 0x34(%ebx),%ecx 10cab6: 85 c9 test %ecx,%ecx 10cab8: 0f 84 66 02 00 00 je 10cd24 <_Objects_Extend_information+0x284> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10cabe: 8b 73 10 mov 0x10(%ebx),%esi 10cac1: 66 89 75 d0 mov %si,-0x30(%ebp) 10cac5: 8b 7b 14 mov 0x14(%ebx),%edi 10cac8: 89 f0 mov %esi,%eax 10caca: 31 d2 xor %edx,%edx 10cacc: 66 f7 f7 div %di 10cacf: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10cad2: 85 f6 test %esi,%esi 10cad4: 0f 84 63 02 00 00 je 10cd3d <_Objects_Extend_information+0x29d><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10cada: 8b 01 mov (%ecx),%eax 10cadc: 85 c0 test %eax,%eax 10cade: 0f 84 6b 02 00 00 je 10cd4f <_Objects_Extend_information+0x2af><== NEVER TAKEN 10cae4: 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 ); 10cae7: 8b 55 cc mov -0x34(%ebp),%edx 10caea: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10caed: 31 d2 xor %edx,%edx 10caef: 8b 45 d4 mov -0x2c(%ebp),%eax 10caf2: eb 0a jmp 10cafe <_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 ) { 10caf4: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10caf8: 0f 84 c6 01 00 00 je 10ccc4 <_Objects_Extend_information+0x224> do_extend = false; break; } else index_base += information->allocation_size; 10cafe: 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++ ) { 10cb00: 42 inc %edx 10cb01: 39 d6 cmp %edx,%esi 10cb03: 77 ef ja 10caf4 <_Objects_Extend_information+0x54> 10cb05: 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; 10cb08: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10cb0a: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10cb0e: 01 f8 add %edi,%eax 10cb10: 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 ) { 10cb13: 3d ff ff 00 00 cmp $0xffff,%eax 10cb18: 0f 87 9e 01 00 00 ja 10ccbc <_Objects_Extend_information+0x21c><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10cb1e: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10cb22: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cb26: 0f 84 a4 01 00 00 je 10ccd0 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); 10cb2c: 83 ec 0c sub $0xc,%esp 10cb2f: 57 push %edi 10cb30: 89 55 b8 mov %edx,-0x48(%ebp) 10cb33: 88 4d b4 mov %cl,-0x4c(%ebp) 10cb36: e8 e1 1d 00 00 call 10e91c <_Workspace_Allocate> 10cb3b: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10cb3e: 83 c4 10 add $0x10,%esp 10cb41: 85 c0 test %eax,%eax 10cb43: 8b 55 b8 mov -0x48(%ebp),%edx 10cb46: 8a 4d b4 mov -0x4c(%ebp),%cl 10cb49: 0f 84 6d 01 00 00 je 10ccbc <_Objects_Extend_information+0x21c> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10cb4f: 84 c9 test %cl,%cl 10cb51: 0f 84 ea 00 00 00 je 10cc41 <_Objects_Extend_information+0x1a1> */ /* * Up the block count and maximum */ block_count++; 10cb57: 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 ); 10cb5a: 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 *)) + 10cb5d: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10cb60: 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 *)) + 10cb63: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10cb66: 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 ); 10cb69: 50 push %eax 10cb6a: 89 55 b8 mov %edx,-0x48(%ebp) 10cb6d: e8 aa 1d 00 00 call 10e91c <_Workspace_Allocate> 10cb72: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10cb75: 83 c4 10 add $0x10,%esp 10cb78: 85 c0 test %eax,%eax 10cb7a: 8b 55 b8 mov -0x48(%ebp),%edx 10cb7d: 0f 84 de 01 00 00 je 10cd61 <_Objects_Extend_information+0x2c1> 10cb83: 8b 45 c4 mov -0x3c(%ebp),%eax 10cb86: 8d 04 b8 lea (%eax,%edi,4),%eax 10cb89: 89 45 bc mov %eax,-0x44(%ebp) 10cb8c: 8b 4d c4 mov -0x3c(%ebp),%ecx 10cb8f: 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 ) { 10cb92: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cb96: 39 4d cc cmp %ecx,-0x34(%ebp) 10cb99: 0f 82 51 01 00 00 jb 10ccf0 <_Objects_Extend_information+0x250> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10cb9f: 8b 4d cc mov -0x34(%ebp),%ecx 10cba2: 85 c9 test %ecx,%ecx 10cba4: 74 12 je 10cbb8 <_Objects_Extend_information+0x118><== NEVER TAKEN 10cba6: 31 c9 xor %ecx,%ecx 10cba8: 8b 7d cc mov -0x34(%ebp),%edi 10cbab: 90 nop local_table[ index ] = NULL; 10cbac: 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++ ) { 10cbb3: 41 inc %ecx 10cbb4: 39 cf cmp %ecx,%edi 10cbb6: 77 f4 ja 10cbac <_Objects_Extend_information+0x10c><== NEVER TAKEN 10cbb8: c1 e6 02 shl $0x2,%esi 10cbbb: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10cbbe: 8b 4d c4 mov -0x3c(%ebp),%ecx 10cbc1: 8b 75 c0 mov -0x40(%ebp),%esi 10cbc4: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10cbcb: 8b 4d bc mov -0x44(%ebp),%ecx 10cbce: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10cbd5: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cbd9: 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 ; 10cbdc: 39 75 d4 cmp %esi,-0x2c(%ebp) 10cbdf: 73 0f jae 10cbf0 <_Objects_Extend_information+0x150><== NEVER TAKEN 10cbe1: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10cbe4: 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++ ) { 10cbeb: 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 ; 10cbec: 39 f1 cmp %esi,%ecx 10cbee: 72 f4 jb 10cbe4 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10cbf0: 9c pushf 10cbf1: fa cli 10cbf2: 5f pop %edi old_tables = information->object_blocks; 10cbf3: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10cbf6: 8b 75 c4 mov -0x3c(%ebp),%esi 10cbf9: 89 73 34 mov %esi,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10cbfc: 8b 75 bc mov -0x44(%ebp),%esi 10cbff: 89 73 30 mov %esi,0x30(%ebx) information->local_table = local_table; 10cc02: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10cc05: 8b 45 d0 mov -0x30(%ebp),%eax 10cc08: 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) | 10cc0c: 8b 33 mov (%ebx),%esi 10cc0e: c1 e6 18 shl $0x18,%esi 10cc11: 81 ce 00 00 01 00 or $0x10000,%esi information->maximum_id = _Objects_Build_id( 10cc17: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cc1b: c1 e0 1b shl $0x1b,%eax 10cc1e: 09 c6 or %eax,%esi 10cc20: 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) | 10cc24: 09 c6 or %eax,%esi 10cc26: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cc29: 57 push %edi 10cc2a: 9d popf if ( old_tables ) 10cc2b: 85 c9 test %ecx,%ecx 10cc2d: 74 12 je 10cc41 <_Objects_Extend_information+0x1a1> _Workspace_Free( old_tables ); 10cc2f: 83 ec 0c sub $0xc,%esp 10cc32: 51 push %ecx 10cc33: 89 55 b8 mov %edx,-0x48(%ebp) 10cc36: e8 fd 1c 00 00 call 10e938 <_Workspace_Free> 10cc3b: 83 c4 10 add $0x10,%esp 10cc3e: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10cc41: c1 e2 02 shl $0x2,%edx 10cc44: 89 55 d0 mov %edx,-0x30(%ebp) 10cc47: 8b 43 34 mov 0x34(%ebx),%eax 10cc4a: 8b 4d c8 mov -0x38(%ebp),%ecx 10cc4d: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cc50: ff 73 18 pushl 0x18(%ebx) 10cc53: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cc57: 50 push %eax 10cc58: 51 push %ecx 10cc59: 8d 7d dc lea -0x24(%ebp),%edi 10cc5c: 57 push %edi 10cc5d: e8 52 43 00 00 call 110fb4 <_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 ) { 10cc62: 83 c4 10 add $0x10,%esp 10cc65: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cc68: 8d 43 20 lea 0x20(%ebx),%eax 10cc6b: 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 ) { 10cc6e: eb 29 jmp 10cc99 <_Objects_Extend_information+0x1f9> 10cc70: 8b 13 mov (%ebx),%edx 10cc72: c1 e2 18 shl $0x18,%edx 10cc75: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cc7b: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cc7f: c1 e1 1b shl $0x1b,%ecx 10cc82: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cc84: 09 f2 or %esi,%edx 10cc86: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cc89: 83 ec 08 sub $0x8,%esp 10cc8c: 50 push %eax 10cc8d: ff 75 d4 pushl -0x2c(%ebp) 10cc90: e8 bf f3 ff ff call 10c054 <_Chain_Append> index++; 10cc95: 46 inc %esi 10cc96: 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 ) { 10cc99: 83 ec 0c sub $0xc,%esp 10cc9c: 57 push %edi 10cc9d: e8 ee f3 ff ff call 10c090 <_Chain_Get> 10cca2: 83 c4 10 add $0x10,%esp 10cca5: 85 c0 test %eax,%eax 10cca7: 75 c7 jne 10cc70 <_Objects_Extend_information+0x1d0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cca9: 8b 43 14 mov 0x14(%ebx),%eax 10ccac: 8b 53 30 mov 0x30(%ebx),%edx 10ccaf: 0f b7 c8 movzwl %ax,%ecx 10ccb2: 8b 75 d0 mov -0x30(%ebp),%esi 10ccb5: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10ccb8: 66 01 43 2c add %ax,0x2c(%ebx) } 10ccbc: 8d 65 f4 lea -0xc(%ebp),%esp 10ccbf: 5b pop %ebx 10ccc0: 5e pop %esi 10ccc1: 5f pop %edi 10ccc2: c9 leave 10ccc3: c3 ret 10ccc4: 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; 10ccc7: 31 c9 xor %ecx,%ecx 10ccc9: e9 3c fe ff ff jmp 10cb0a <_Objects_Extend_information+0x6a> 10ccce: 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 ); 10ccd0: 83 ec 0c sub $0xc,%esp 10ccd3: 57 push %edi 10ccd4: 89 55 b8 mov %edx,-0x48(%ebp) 10ccd7: 88 4d b4 mov %cl,-0x4c(%ebp) 10ccda: e8 71 1c 00 00 call 10e950 <_Workspace_Allocate_or_fatal_error> 10ccdf: 89 45 c8 mov %eax,-0x38(%ebp) 10cce2: 83 c4 10 add $0x10,%esp 10cce5: 8a 4d b4 mov -0x4c(%ebp),%cl 10cce8: 8b 55 b8 mov -0x48(%ebp),%edx 10cceb: e9 5f fe ff ff jmp 10cb4f <_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, 10ccf0: c1 e6 02 shl $0x2,%esi 10ccf3: 89 75 c0 mov %esi,-0x40(%ebp) 10ccf6: 8b 73 34 mov 0x34(%ebx),%esi 10ccf9: 8b 7d c4 mov -0x3c(%ebp),%edi 10ccfc: 8b 4d c0 mov -0x40(%ebp),%ecx 10ccff: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cd01: 8b 73 30 mov 0x30(%ebx),%esi 10cd04: 8b 7d bc mov -0x44(%ebp),%edi 10cd07: 8b 4d c0 mov -0x40(%ebp),%ecx 10cd0a: 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 *) ); 10cd0c: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cd10: 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, 10cd13: c1 e1 02 shl $0x2,%ecx 10cd16: 8b 73 1c mov 0x1c(%ebx),%esi 10cd19: 89 c7 mov %eax,%edi 10cd1b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cd1d: e9 9c fe ff ff jmp 10cbbe <_Objects_Extend_information+0x11e> 10cd22: 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 ) 10cd24: 8b 53 10 mov 0x10(%ebx),%edx 10cd27: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cd2b: 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 ); 10cd2f: 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; 10cd32: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cd34: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cd36: 31 f6 xor %esi,%esi 10cd38: e9 cd fd ff ff jmp 10cb0a <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cd3d: 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 ); 10cd40: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cd43: 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; 10cd46: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cd48: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cd4a: e9 bb fd ff ff jmp 10cb0a <_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 ) { 10cd4f: 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 ); 10cd52: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10cd55: 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; 10cd58: 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; 10cd5a: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cd5c: e9 a9 fd ff ff jmp 10cb0a <_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 ); 10cd61: 83 ec 0c sub $0xc,%esp 10cd64: ff 75 c8 pushl -0x38(%ebp) 10cd67: e8 cc 1b 00 00 call 10e938 <_Workspace_Free> return; 10cd6c: 83 c4 10 add $0x10,%esp 10cd6f: e9 48 ff ff ff jmp 10ccbc <_Objects_Extend_information+0x21c> =============================================================================== 0010ceac <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10ceac: 55 push %ebp 10cead: 89 e5 mov %esp,%ebp 10ceaf: 53 push %ebx 10ceb0: 83 ec 14 sub $0x14,%esp 10ceb3: 8b 55 08 mov 0x8(%ebp),%edx 10ceb6: 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; 10ceb9: b8 01 00 00 00 mov $0x1,%eax 10cebe: 2b 42 08 sub 0x8(%edx),%eax 10cec1: 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 ) { 10cec4: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cec8: 39 c8 cmp %ecx,%eax 10ceca: 77 24 ja 10cef0 <_Objects_Get+0x44> 10cecc: 8b 0d d4 73 12 00 mov 0x1273d4,%ecx 10ced2: 41 inc %ecx 10ced3: 89 0d d4 73 12 00 mov %ecx,0x1273d4 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10ced9: 8b 52 1c mov 0x1c(%edx),%edx 10cedc: 8b 04 82 mov (%edx,%eax,4),%eax 10cedf: 85 c0 test %eax,%eax 10cee1: 74 1b je 10cefe <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10cee3: 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 } 10cee9: 83 c4 14 add $0x14,%esp 10ceec: 5b pop %ebx 10ceed: c9 leave 10ceee: c3 ret 10ceef: 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; 10cef0: 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; 10cef6: 31 c0 xor %eax,%eax #endif } 10cef8: 83 c4 14 add $0x14,%esp 10cefb: 5b pop %ebx 10cefc: c9 leave 10cefd: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10cefe: 89 45 f4 mov %eax,-0xc(%ebp) 10cf01: e8 36 08 00 00 call 10d73c <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10cf06: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cf0c: 8b 45 f4 mov -0xc(%ebp),%eax 10cf0f: eb d8 jmp 10cee9 <_Objects_Get+0x3d> =============================================================================== 0010ce04 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10ce04: 55 push %ebp 10ce05: 89 e5 mov %esp,%ebp 10ce07: 56 push %esi 10ce08: 53 push %ebx 10ce09: 8b 75 08 mov 0x8(%ebp),%esi 10ce0c: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10ce0f: 85 db test %ebx,%ebx 10ce11: 75 09 jne 10ce1c <_Objects_Get_information+0x18> 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; 10ce13: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10ce15: 8d 65 f8 lea -0x8(%ebp),%esp 10ce18: 5b pop %ebx 10ce19: 5e pop %esi 10ce1a: c9 leave 10ce1b: c3 ret /* * 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 ); 10ce1c: 83 ec 0c sub $0xc,%esp 10ce1f: 56 push %esi 10ce20: e8 e7 46 00 00 call 11150c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10ce25: 83 c4 10 add $0x10,%esp 10ce28: 85 c0 test %eax,%eax 10ce2a: 74 e7 je 10ce13 <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10ce2c: 39 c3 cmp %eax,%ebx 10ce2e: 77 e3 ja 10ce13 <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ce30: 8b 14 b5 ac 73 12 00 mov 0x1273ac(,%esi,4),%edx return NULL; 10ce37: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ce39: 85 d2 test %edx,%edx 10ce3b: 74 d8 je 10ce15 <_Objects_Get_information+0x11><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10ce3d: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10ce40: 85 c0 test %eax,%eax 10ce42: 74 d1 je 10ce15 <_Objects_Get_information+0x11><== 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; 10ce44: 31 d2 xor %edx,%edx 10ce46: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10ce4b: 0f 95 c2 setne %dl 10ce4e: f7 da neg %edx 10ce50: 21 d0 and %edx,%eax 10ce52: eb c1 jmp 10ce15 <_Objects_Get_information+0x11> =============================================================================== 0010ce54 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10ce54: 55 push %ebp 10ce55: 89 e5 mov %esp,%ebp 10ce57: 56 push %esi 10ce58: 53 push %ebx 10ce59: 8b 55 08 mov 0x8(%ebp),%edx 10ce5c: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10ce5f: b8 01 00 00 00 mov $0x1,%eax 10ce64: 2b 42 08 sub 0x8(%edx),%eax 10ce67: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10ce6a: 9c pushf 10ce6b: fa cli 10ce6c: 5e pop %esi if ( information->maximum >= index ) { 10ce6d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10ce71: 39 c8 cmp %ecx,%eax 10ce73: 77 1b ja 10ce90 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10ce75: 8b 52 1c mov 0x1c(%edx),%edx 10ce78: 8b 04 82 mov (%edx,%eax,4),%eax 10ce7b: 85 c0 test %eax,%eax 10ce7d: 74 21 je 10cea0 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10ce7f: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10ce85: 8b 55 14 mov 0x14(%ebp),%edx 10ce88: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10ce8a: 5b pop %ebx 10ce8b: 5e pop %esi 10ce8c: c9 leave 10ce8d: c3 ret 10ce8e: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10ce90: 56 push %esi 10ce91: 9d popf *location = OBJECTS_ERROR; 10ce92: 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; 10ce98: 31 c0 xor %eax,%eax #endif } 10ce9a: 5b pop %ebx 10ce9b: 5e pop %esi 10ce9c: c9 leave 10ce9d: c3 ret 10ce9e: 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 ); 10cea0: 56 push %esi 10cea1: 9d popf *location = OBJECTS_ERROR; 10cea2: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cea8: eb e0 jmp 10ce8a <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e52c <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e52c: 55 push %ebp 10e52d: 89 e5 mov %esp,%ebp 10e52f: 57 push %edi 10e530: 56 push %esi 10e531: 53 push %ebx 10e532: 83 ec 2c sub $0x2c,%esp 10e535: 8b 55 08 mov 0x8(%ebp),%edx 10e538: 8b 75 0c mov 0xc(%ebp),%esi 10e53b: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e53e: 85 f6 test %esi,%esi 10e540: 75 0e jne 10e550 <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e542: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e544: 89 d8 mov %ebx,%eax 10e546: 8d 65 f4 lea -0xc(%ebp),%esp 10e549: 5b pop %ebx 10e54a: 5e pop %esi 10e54b: 5f pop %edi 10e54c: c9 leave 10e54d: c3 ret 10e54e: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e550: 85 db test %ebx,%ebx 10e552: 74 f0 je 10e544 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e554: 85 d2 test %edx,%edx 10e556: 75 08 jne 10e560 <_Objects_Get_name_as_string+0x34> 10e558: a1 58 28 13 00 mov 0x132858,%eax 10e55d: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 10e560: 83 ec 0c sub $0xc,%esp 10e563: 52 push %edx 10e564: 89 55 cc mov %edx,-0x34(%ebp) 10e567: e8 f8 fe ff ff call 10e464 <_Objects_Get_information_id> 10e56c: 89 c7 mov %eax,%edi if ( !information ) 10e56e: 83 c4 10 add $0x10,%esp 10e571: 85 c0 test %eax,%eax 10e573: 8b 55 cc mov -0x34(%ebp),%edx 10e576: 74 ca je 10e542 <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e578: 51 push %ecx 10e579: 8d 45 e4 lea -0x1c(%ebp),%eax 10e57c: 50 push %eax 10e57d: 52 push %edx 10e57e: 57 push %edi 10e57f: e8 90 00 00 00 call 10e614 <_Objects_Get> switch ( location ) { 10e584: 83 c4 10 add $0x10,%esp 10e587: 8b 55 e4 mov -0x1c(%ebp),%edx 10e58a: 85 d2 test %edx,%edx 10e58c: 75 b4 jne 10e542 <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10e58e: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10e592: 74 54 je 10e5e8 <_Objects_Get_name_as_string+0xbc> s = the_object->name.name_p; 10e594: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 10e597: 85 ff test %edi,%edi 10e599: 74 74 je 10e60f <_Objects_Get_name_as_string+0xe3> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e59b: 4e dec %esi 10e59c: 89 75 d4 mov %esi,-0x2c(%ebp) 10e59f: 74 6e je 10e60f <_Objects_Get_name_as_string+0xe3><== NEVER TAKEN 10e5a1: 8a 07 mov (%edi),%al 10e5a3: 84 c0 test %al,%al 10e5a5: 74 68 je 10e60f <_Objects_Get_name_as_string+0xe3> 10e5a7: 89 d9 mov %ebx,%ecx 10e5a9: 31 d2 xor %edx,%edx 10e5ab: 89 5d d0 mov %ebx,-0x30(%ebp) 10e5ae: eb 07 jmp 10e5b7 <_Objects_Get_name_as_string+0x8b> 10e5b0: 8a 04 17 mov (%edi,%edx,1),%al 10e5b3: 84 c0 test %al,%al 10e5b5: 74 21 je 10e5d8 <_Objects_Get_name_as_string+0xac> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e5b7: 0f b6 d8 movzbl %al,%ebx 10e5ba: 8b 35 88 81 12 00 mov 0x128188,%esi 10e5c0: 0f be 5c 1e 01 movsbl 0x1(%esi,%ebx,1),%ebx 10e5c5: 81 e3 97 00 00 00 and $0x97,%ebx 10e5cb: 75 02 jne 10e5cf <_Objects_Get_name_as_string+0xa3> 10e5cd: b0 2a mov $0x2a,%al 10e5cf: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e5d1: 42 inc %edx 10e5d2: 41 inc %ecx 10e5d3: 3b 55 d4 cmp -0x2c(%ebp),%edx 10e5d6: 72 d8 jb 10e5b0 <_Objects_Get_name_as_string+0x84> 10e5d8: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e5db: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e5de: e8 c1 08 00 00 call 10eea4 <_Thread_Enable_dispatch> return name; 10e5e3: e9 5c ff ff ff jmp 10e544 <_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; 10e5e8: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10e5eb: 89 c2 mov %eax,%edx 10e5ed: c1 ea 18 shr $0x18,%edx 10e5f0: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e5f3: 89 c2 mov %eax,%edx 10e5f5: c1 ea 10 shr $0x10,%edx 10e5f8: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e5fb: 89 c2 mov %eax,%edx 10e5fd: c1 ea 08 shr $0x8,%edx 10e600: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e603: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e606: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; 10e60a: 8d 7d df lea -0x21(%ebp),%edi 10e60d: eb 8c jmp 10e59b <_Objects_Get_name_as_string+0x6f> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e60f: 89 d9 mov %ebx,%ecx 10e611: eb c8 jmp 10e5db <_Objects_Get_name_as_string+0xaf> =============================================================================== 0010cff4 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10cff4: 55 push %ebp 10cff5: 89 e5 mov %esp,%ebp 10cff7: 57 push %edi 10cff8: 56 push %esi 10cff9: 53 push %ebx 10cffa: 83 ec 0c sub $0xc,%esp 10cffd: 8b 5d 08 mov 0x8(%ebp),%ebx 10d000: 8b 75 0c mov 0xc(%ebp),%esi 10d003: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10d006: 85 db test %ebx,%ebx 10d008: 75 0a jne 10d014 <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10d00a: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10d00c: 8d 65 f4 lea -0xc(%ebp),%esp 10d00f: 5b pop %ebx 10d010: 5e pop %esi 10d011: 5f pop %edi 10d012: c9 leave 10d013: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10d014: 85 ff test %edi,%edi 10d016: 74 f2 je 10d00a <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10d018: 8b 45 14 mov 0x14(%ebp),%eax 10d01b: 85 c0 test %eax,%eax 10d01d: 74 eb je 10d00a <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10d01f: 66 85 f6 test %si,%si 10d022: 75 04 jne 10d028 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10d024: 8b 73 08 mov 0x8(%ebx),%esi 10d027: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10d028: 66 39 73 10 cmp %si,0x10(%ebx) 10d02c: 72 22 jb 10d050 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10d02e: 51 push %ecx 10d02f: 57 push %edi 10d030: 56 push %esi 10d031: 53 push %ebx 10d032: e8 2d 00 00 00 call 10d064 <_Objects_Get> next_id++; 10d037: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10d038: 83 c4 10 add $0x10,%esp 10d03b: 8b 17 mov (%edi),%edx 10d03d: 85 d2 test %edx,%edx 10d03f: 75 e7 jne 10d028 <_Objects_Get_next+0x34> *next_id_p = next_id; 10d041: 8b 55 14 mov 0x14(%ebp),%edx 10d044: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10d046: 8d 65 f4 lea -0xc(%ebp),%esp 10d049: 5b pop %ebx 10d04a: 5e pop %esi 10d04b: 5f pop %edi 10d04c: c9 leave 10d04d: c3 ret 10d04e: 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; 10d050: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10d056: 8b 45 14 mov 0x14(%ebp),%eax 10d059: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10d05f: 31 c0 xor %eax,%eax 10d061: eb a9 jmp 10d00c <_Objects_Get_next+0x18> =============================================================================== 0011b358 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b358: 55 push %ebp 11b359: 89 e5 mov %esp,%ebp 11b35b: 53 push %ebx 11b35c: 8b 55 08 mov 0x8(%ebp),%edx 11b35f: 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; 11b362: b8 01 00 00 00 mov $0x1,%eax 11b367: 2b 42 08 sub 0x8(%edx),%eax 11b36a: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b36d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b371: 39 c8 cmp %ecx,%eax 11b373: 77 13 ja 11b388 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b375: 8b 52 1c mov 0x1c(%edx),%edx 11b378: 8b 04 82 mov (%edx,%eax,4),%eax 11b37b: 85 c0 test %eax,%eax 11b37d: 74 09 je 11b388 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b37f: 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; } 11b385: 5b pop %ebx 11b386: c9 leave 11b387: 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; 11b388: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b38e: 31 c0 xor %eax,%eax } 11b390: 5b pop %ebx 11b391: c9 leave 11b392: c3 ret =============================================================================== 0010e13c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e13c: 55 push %ebp 10e13d: 89 e5 mov %esp,%ebp 10e13f: 83 ec 18 sub $0x18,%esp 10e142: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e145: 85 d2 test %edx,%edx 10e147: 75 08 jne 10e151 <_Objects_Id_to_name+0x15> 10e149: a1 d8 a7 12 00 mov 0x12a7d8,%eax 10e14e: 8b 50 08 mov 0x8(%eax),%edx 10e151: 89 d0 mov %edx,%eax 10e153: c1 e8 18 shr $0x18,%eax 10e156: 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 ) 10e159: 8d 48 ff lea -0x1(%eax),%ecx 10e15c: 83 f9 02 cmp $0x2,%ecx 10e15f: 77 1d ja 10e17e <_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 ] ) 10e161: 8b 04 85 ec a1 12 00 mov 0x12a1ec(,%eax,4),%eax 10e168: 85 c0 test %eax,%eax 10e16a: 74 12 je 10e17e <_Objects_Id_to_name+0x42><== NEVER TAKEN */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e16c: 89 d1 mov %edx,%ecx 10e16e: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e171: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e174: 85 c0 test %eax,%eax 10e176: 74 06 je 10e17e <_Objects_Id_to_name+0x42><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10e178: 80 78 38 00 cmpb $0x0,0x38(%eax) 10e17c: 74 0a je 10e188 <_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; 10e17e: 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; } 10e183: c9 leave 10e184: c3 ret 10e185: 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 ); 10e188: 51 push %ecx 10e189: 8d 4d f4 lea -0xc(%ebp),%ecx 10e18c: 51 push %ecx 10e18d: 52 push %edx 10e18e: 50 push %eax 10e18f: e8 40 ff ff ff call 10e0d4 <_Objects_Get> if ( !the_object ) 10e194: 83 c4 10 add $0x10,%esp 10e197: 85 c0 test %eax,%eax 10e199: 74 e3 je 10e17e <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 10e19b: 8b 50 0c mov 0xc(%eax),%edx 10e19e: 8b 45 0c mov 0xc(%ebp),%eax 10e1a1: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e1a3: e8 2c 08 00 00 call 10e9d4 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e1a8: 31 c0 xor %eax,%eax } 10e1aa: c9 leave 10e1ab: c3 ret =============================================================================== 0010cf14 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cf14: 55 push %ebp 10cf15: 89 e5 mov %esp,%ebp 10cf17: 57 push %edi 10cf18: 56 push %esi 10cf19: 53 push %ebx 10cf1a: 83 ec 0c sub $0xc,%esp 10cf1d: 8b 45 08 mov 0x8(%ebp),%eax 10cf20: 8b 55 0c mov 0xc(%ebp),%edx 10cf23: 8b 5d 10 mov 0x10(%ebp),%ebx 10cf26: 8b 75 20 mov 0x20(%ebp),%esi 10cf29: 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; 10cf2d: 89 10 mov %edx,(%eax) information->the_class = the_class; 10cf2f: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10cf33: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cf36: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cf3d: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10cf44: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10cf4b: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10cf51: 8b 7d 1c mov 0x1c(%ebp),%edi 10cf54: 89 f9 mov %edi,%ecx 10cf56: 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; 10cf59: 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; 10cf5f: 8b 3c 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%edi 10cf66: 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; 10cf69: 8b 7d 14 mov 0x14(%ebp),%edi 10cf6c: 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 = 10cf6f: 89 f9 mov %edi,%ecx 10cf71: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cf74: 8b 4d 14 mov 0x14(%ebp),%ecx 10cf77: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cf7d: 85 ff test %edi,%edi 10cf7f: 74 04 je 10cf85 <_Objects_Initialize_information+0x71> 10cf81: 85 c9 test %ecx,%ecx 10cf83: 74 6a je 10cfef <_Objects_Initialize_information+0xdb> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cf85: 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; 10cf89: c7 40 1c 44 70 12 00 movl $0x127044,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cf90: c1 e2 18 shl $0x18,%edx 10cf93: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cf99: c1 e3 1b shl $0x1b,%ebx 10cf9c: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10cf9e: 31 db xor %ebx,%ebx 10cfa0: 85 c9 test %ecx,%ecx 10cfa2: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cfa5: 09 da or %ebx,%edx 10cfa7: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cfaa: f7 c6 03 00 00 00 test $0x3,%esi 10cfb0: 75 26 jne 10cfd8 <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10cfb2: 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; 10cfb6: 8d 50 24 lea 0x24(%eax),%edx 10cfb9: 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; 10cfbc: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) _Chain_Initialize_empty( &information->Inactive ); 10cfc3: 8d 50 20 lea 0x20(%eax),%edx 10cfc6: 89 50 28 mov %edx,0x28(%eax) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10cfc9: 85 c9 test %ecx,%ecx 10cfcb: 75 13 jne 10cfe0 <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cfcd: 8d 65 f4 lea -0xc(%ebp),%esp 10cfd0: 5b pop %ebx 10cfd1: 5e pop %esi 10cfd2: 5f pop %edi 10cfd3: c9 leave 10cfd4: c3 ret 10cfd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10cfd8: 83 c6 04 add $0x4,%esi 10cfdb: 83 e6 fc and $0xfffffffc,%esi 10cfde: eb d2 jmp 10cfb2 <_Objects_Initialize_information+0x9e> /* * 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 ); 10cfe0: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cfe3: 8d 65 f4 lea -0xc(%ebp),%esp 10cfe6: 5b pop %ebx 10cfe7: 5e pop %esi 10cfe8: 5f pop %edi 10cfe9: 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 ); 10cfea: e9 b1 fa ff ff jmp 10caa0 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cfef: 50 push %eax 10cff0: 6a 13 push $0x13 10cff2: 6a 01 push $0x1 10cff4: 6a 00 push $0x0 10cff6: e8 71 f9 ff ff call 10c96c <_Internal_error_Occurred> =============================================================================== 00117850 <_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 ) { 117850: 55 push %ebp 117851: 89 e5 mov %esp,%ebp 117853: 57 push %edi 117854: 56 push %esi 117855: 53 push %ebx 117856: 83 ec 1c sub $0x1c,%esp 117859: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 11785c: 8b 5d 10 mov 0x10(%ebp),%ebx 11785f: 85 db test %ebx,%ebx 117861: 74 75 je 1178d8 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 117863: 8b 4d 0c mov 0xc(%ebp),%ecx 117866: 85 c9 test %ecx,%ecx 117868: 74 4b je 1178b5 <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 11786a: 8b 47 10 mov 0x10(%edi),%eax 11786d: 66 85 c0 test %ax,%ax 117870: 74 43 je 1178b5 <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 117872: 0f b7 c0 movzwl %ax,%eax 117875: 89 45 e4 mov %eax,-0x1c(%ebp) 117878: 8b 47 1c mov 0x1c(%edi),%eax 11787b: bb 01 00 00 00 mov $0x1,%ebx 117880: 89 7d e0 mov %edi,-0x20(%ebp) 117883: 89 c7 mov %eax,%edi 117885: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 117888: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 11788b: 85 f6 test %esi,%esi 11788d: 74 20 je 1178af <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 11788f: 8b 46 0c mov 0xc(%esi),%eax 117892: 85 c0 test %eax,%eax 117894: 74 19 je 1178af <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 117896: 52 push %edx 117897: 8b 4d e0 mov -0x20(%ebp),%ecx 11789a: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 11789e: 52 push %edx 11789f: 50 push %eax 1178a0: ff 75 0c pushl 0xc(%ebp) 1178a3: e8 94 35 00 00 call 11ae3c 1178a8: 83 c4 10 add $0x10,%esp 1178ab: 85 c0 test %eax,%eax 1178ad: 74 15 je 1178c4 <_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++ ) { 1178af: 43 inc %ebx 1178b0: 3b 5d e4 cmp -0x1c(%ebp),%ebx 1178b3: 76 d3 jbe 117888 <_Objects_Name_to_id_string+0x38> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } } } return OBJECTS_INVALID_NAME; 1178b5: b8 01 00 00 00 mov $0x1,%eax } 1178ba: 8d 65 f4 lea -0xc(%ebp),%esp 1178bd: 5b pop %ebx 1178be: 5e pop %esi 1178bf: 5f pop %edi 1178c0: c9 leave 1178c1: c3 ret 1178c2: 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; 1178c4: 8b 46 08 mov 0x8(%esi),%eax 1178c7: 8b 55 10 mov 0x10(%ebp),%edx 1178ca: 89 02 mov %eax,(%edx) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 1178cc: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 1178ce: 8d 65 f4 lea -0xc(%ebp),%esp 1178d1: 5b pop %ebx 1178d2: 5e pop %esi 1178d3: 5f pop %edi 1178d4: c9 leave 1178d5: c3 ret 1178d6: 66 90 xchg %ax,%ax <== NOT EXECUTED uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 1178d8: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 1178dd: 8d 65 f4 lea -0xc(%ebp),%esp 1178e0: 5b pop %ebx 1178e1: 5e pop %esi 1178e2: 5f pop %edi 1178e3: c9 leave 1178e4: c3 ret =============================================================================== 0010d030 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10d030: 55 push %ebp 10d031: 89 e5 mov %esp,%ebp 10d033: 57 push %edi 10d034: 56 push %esi 10d035: 53 push %ebx 10d036: 8b 45 08 mov 0x8(%ebp),%eax 10d039: 8b 4d 0c mov 0xc(%ebp),%ecx 10d03c: 8b 55 10 mov 0x10(%ebp),%edx 10d03f: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d042: 85 ff test %edi,%edi 10d044: 74 56 je 10d09c <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10d046: 85 c9 test %ecx,%ecx 10d048: 74 08 je 10d052 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d04a: 8b 70 10 mov 0x10(%eax),%esi 10d04d: 66 85 f6 test %si,%si 10d050: 75 0a jne 10d05c <_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; 10d052: b8 01 00 00 00 mov $0x1,%eax #endif } 10d057: 5b pop %ebx 10d058: 5e pop %esi 10d059: 5f pop %edi 10d05a: c9 leave 10d05b: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d05c: 85 d2 test %edx,%edx 10d05e: 75 20 jne 10d080 <_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++ ) { 10d060: 0f b7 f6 movzwl %si,%esi 10d063: 8b 58 1c mov 0x1c(%eax),%ebx 10d066: b8 01 00 00 00 mov $0x1,%eax 10d06b: 90 nop the_object = information->local_table[ index ]; 10d06c: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10d06f: 85 d2 test %edx,%edx 10d071: 74 05 je 10d078 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10d073: 39 4a 0c cmp %ecx,0xc(%edx) 10d076: 74 18 je 10d090 <_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++ ) { 10d078: 40 inc %eax 10d079: 39 c6 cmp %eax,%esi 10d07b: 73 ef jae 10d06c <_Objects_Name_to_id_u32+0x3c> 10d07d: eb d3 jmp 10d052 <_Objects_Name_to_id_u32+0x22> 10d07f: 90 nop <== NOT EXECUTED return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10d080: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10d086: 74 d8 je 10d060 <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10d088: 4a dec %edx 10d089: 75 c7 jne 10d052 <_Objects_Name_to_id_u32+0x22> 10d08b: eb d3 jmp 10d060 <_Objects_Name_to_id_u32+0x30> 10d08d: 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; 10d090: 8b 42 08 mov 0x8(%edx),%eax 10d093: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10d095: 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 } 10d097: 5b pop %ebx 10d098: 5e pop %esi 10d099: 5f pop %edi 10d09a: c9 leave 10d09b: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10d09c: 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 } 10d0a1: 5b pop %ebx 10d0a2: 5e pop %esi 10d0a3: 5f pop %edi 10d0a4: c9 leave 10d0a5: c3 ret =============================================================================== 0010d70c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d70c: 55 push %ebp 10d70d: 89 e5 mov %esp,%ebp 10d70f: 57 push %edi 10d710: 56 push %esi 10d711: 53 push %ebx 10d712: 83 ec 14 sub $0x14,%esp 10d715: 8b 7d 08 mov 0x8(%ebp),%edi 10d718: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d71b: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10d71f: 50 push %eax 10d720: 53 push %ebx 10d721: e8 22 79 00 00 call 115048 10d726: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10d728: 83 c4 10 add $0x10,%esp 10d72b: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10d72f: 75 57 jne 10d788 <_Objects_Set_name+0x7c> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d731: 0f be 13 movsbl (%ebx),%edx 10d734: c1 e2 18 shl $0x18,%edx 10d737: 83 f8 01 cmp $0x1,%eax 10d73a: 76 38 jbe 10d774 <_Objects_Set_name+0x68> 10d73c: 0f be 43 01 movsbl 0x1(%ebx),%eax 10d740: c1 e0 10 shl $0x10,%eax 10d743: 09 d0 or %edx,%eax 10d745: 83 fe 02 cmp $0x2,%esi 10d748: 74 31 je 10d77b <_Objects_Set_name+0x6f> 10d74a: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d74e: c1 e2 08 shl $0x8,%edx 10d751: 09 c2 or %eax,%edx 10d753: 83 fe 03 cmp $0x3,%esi 10d756: 0f 84 88 00 00 00 je 10d7e4 <_Objects_Set_name+0xd8> 10d75c: 0f be 43 03 movsbl 0x3(%ebx),%eax 10d760: 09 c2 or %eax,%edx 10d762: 8b 45 0c mov 0xc(%ebp),%eax 10d765: 89 50 0c mov %edx,0xc(%eax) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 10d768: b0 01 mov $0x1,%al } 10d76a: 8d 65 f4 lea -0xc(%ebp),%esp 10d76d: 5b pop %ebx 10d76e: 5e pop %esi 10d76f: 5f pop %edi 10d770: c9 leave 10d771: c3 ret 10d772: 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( 10d774: 89 d0 mov %edx,%eax 10d776: 0d 00 00 20 00 or $0x200000,%eax 10d77b: 89 c2 mov %eax,%edx 10d77d: 80 ce 20 or $0x20,%dh 10d780: b8 20 00 00 00 mov $0x20,%eax 10d785: eb d9 jmp 10d760 <_Objects_Set_name+0x54> 10d787: 90 nop <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10d788: 83 ec 0c sub $0xc,%esp 10d78b: 8d 40 01 lea 0x1(%eax),%eax 10d78e: 50 push %eax 10d78f: e8 d0 18 00 00 call 10f064 <_Workspace_Allocate> 10d794: 89 c7 mov %eax,%edi if ( !d ) 10d796: 83 c4 10 add $0x10,%esp 10d799: 85 c0 test %eax,%eax 10d79b: 74 43 je 10d7e0 <_Objects_Set_name+0xd4><== NEVER TAKEN return false; if ( the_object->name.name_p ) { 10d79d: 8b 55 0c mov 0xc(%ebp),%edx 10d7a0: 8b 42 0c mov 0xc(%edx),%eax 10d7a3: 85 c0 test %eax,%eax 10d7a5: 74 16 je 10d7bd <_Objects_Set_name+0xb1> _Workspace_Free( (void *)the_object->name.name_p ); 10d7a7: 83 ec 0c sub $0xc,%esp 10d7aa: 50 push %eax 10d7ab: e8 d0 18 00 00 call 10f080 <_Workspace_Free> the_object->name.name_p = NULL; 10d7b0: 8b 45 0c mov 0xc(%ebp),%eax 10d7b3: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10d7ba: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10d7bd: 50 push %eax 10d7be: 56 push %esi 10d7bf: 53 push %ebx 10d7c0: 57 push %edi 10d7c1: e8 06 78 00 00 call 114fcc d[length] = '\0'; 10d7c6: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10d7ca: 8b 55 0c mov 0xc(%ebp),%edx 10d7cd: 89 7a 0c mov %edi,0xc(%edx) 10d7d0: 83 c4 10 add $0x10,%esp ((3 < length) ? s[ 3 ] : ' ') ); } return true; 10d7d3: b0 01 mov $0x1,%al } 10d7d5: 8d 65 f4 lea -0xc(%ebp),%esp 10d7d8: 5b pop %ebx 10d7d9: 5e pop %esi 10d7da: 5f pop %edi 10d7db: c9 leave 10d7dc: c3 ret 10d7dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 10d7e0: 31 c0 xor %eax,%eax <== NOT EXECUTED 10d7e2: eb 86 jmp 10d76a <_Objects_Set_name+0x5e><== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d7e4: b8 20 00 00 00 mov $0x20,%eax 10d7e9: e9 72 ff ff ff jmp 10d760 <_Objects_Set_name+0x54> =============================================================================== 0010d0a8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d0a8: 55 push %ebp 10d0a9: 89 e5 mov %esp,%ebp 10d0ab: 57 push %edi 10d0ac: 56 push %esi 10d0ad: 53 push %ebx 10d0ae: 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 ); 10d0b1: 8b 45 08 mov 0x8(%ebp),%eax 10d0b4: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d0b8: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d0bc: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d0c0: 29 d8 sub %ebx,%eax 10d0c2: 31 d2 xor %edx,%edx 10d0c4: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d0c6: 85 c0 test %eax,%eax 10d0c8: 74 21 je 10d0eb <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d0ca: 8b 55 08 mov 0x8(%ebp),%edx 10d0cd: 8b 7a 30 mov 0x30(%edx),%edi 10d0d0: 3b 0f cmp (%edi),%ecx 10d0d2: 74 1f je 10d0f3 <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10d0d4: 31 d2 xor %edx,%edx 10d0d6: eb 0e jmp 10d0e6 <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10d0d8: 01 cb add %ecx,%ebx 10d0da: 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 ] == 10d0e1: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d0e4: 74 12 je 10d0f8 <_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++ ) { 10d0e6: 42 inc %edx 10d0e7: 39 d0 cmp %edx,%eax 10d0e9: 77 ed ja 10d0d8 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d0eb: 8d 65 f4 lea -0xc(%ebp),%esp 10d0ee: 5b pop %ebx 10d0ef: 5e pop %esi 10d0f0: 5f pop %edi 10d0f1: c9 leave 10d0f2: 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 ] == 10d0f3: 31 f6 xor %esi,%esi <== NOT EXECUTED 10d0f5: 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; 10d0f8: 8b 55 08 mov 0x8(%ebp),%edx 10d0fb: 8b 42 20 mov 0x20(%edx),%eax 10d0fe: 89 75 e4 mov %esi,-0x1c(%ebp) 10d101: eb 07 jmp 10d10a <_Objects_Shrink_information+0x62> 10d103: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d104: 85 ff test %edi,%edi 10d106: 74 2c je 10d134 <_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; 10d108: 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 ); 10d10a: 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; 10d10e: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d110: 39 da cmp %ebx,%edx 10d112: 72 f0 jb 10d104 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d114: 8b 75 08 mov 0x8(%ebp),%esi 10d117: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d11b: 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) && 10d11e: 39 ca cmp %ecx,%edx 10d120: 73 e2 jae 10d104 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10d122: 83 ec 0c sub $0xc,%esp 10d125: 50 push %eax 10d126: e8 4d ef ff ff call 10c078 <_Chain_Extract> 10d12b: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d12e: 85 ff test %edi,%edi 10d130: 75 d6 jne 10d108 <_Objects_Shrink_information+0x60> 10d132: 66 90 xchg %ax,%ax 10d134: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d137: 83 ec 0c sub $0xc,%esp 10d13a: 8b 55 08 mov 0x8(%ebp),%edx 10d13d: 8b 42 34 mov 0x34(%edx),%eax 10d140: ff 34 30 pushl (%eax,%esi,1) 10d143: e8 f0 17 00 00 call 10e938 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d148: 8b 55 08 mov 0x8(%ebp),%edx 10d14b: 8b 42 34 mov 0x34(%edx),%eax 10d14e: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d155: 8b 42 30 mov 0x30(%edx),%eax 10d158: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d15f: 8b 42 14 mov 0x14(%edx),%eax 10d162: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d166: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d169: 8d 65 f4 lea -0xc(%ebp),%esp 10d16c: 5b pop %ebx 10d16d: 5e pop %esi 10d16e: 5f pop %edi 10d16f: c9 leave 10d170: c3 ret =============================================================================== 0010d574 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10d574: 55 push %ebp 10d575: 89 e5 mov %esp,%ebp 10d577: 57 push %edi 10d578: 56 push %esi 10d579: 53 push %ebx 10d57a: 83 ec 38 sub $0x38,%esp 10d57d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d580: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10d583: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10d589: 53 push %ebx 10d58a: e8 d5 3c 00 00 call 111264 <_Timespec_Is_valid> 10d58f: 83 c4 10 add $0x10,%esp 10d592: 84 c0 test %al,%al 10d594: 75 0a jne 10d5a0 <_POSIX_Absolute_timeout_to_ticks+0x2c> return POSIX_ABSOLUTE_TIMEOUT_INVALID; 10d596: 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; } 10d598: 8d 65 f4 lea -0xc(%ebp),%esp 10d59b: 5b pop %ebx 10d59c: 5e pop %esi 10d59d: 5f pop %edi 10d59e: c9 leave 10d59f: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10d5a0: 83 ec 0c sub $0xc,%esp 10d5a3: 8d 7d e0 lea -0x20(%ebp),%edi 10d5a6: 57 push %edi 10d5a7: e8 78 1d 00 00 call 10f324 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10d5ac: 5a pop %edx 10d5ad: 59 pop %ecx 10d5ae: 57 push %edi 10d5af: 53 push %ebx 10d5b0: e8 d7 3c 00 00 call 11128c <_Timespec_Less_than> 10d5b5: 83 c4 10 add $0x10,%esp 10d5b8: 84 c0 test %al,%al 10d5ba: 74 10 je 10d5cc <_POSIX_Absolute_timeout_to_ticks+0x58> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; 10d5bc: 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; } 10d5c1: 8d 65 f4 lea -0xc(%ebp),%esp 10d5c4: 5b pop %ebx 10d5c5: 5e pop %esi 10d5c6: 5f pop %edi 10d5c7: c9 leave 10d5c8: c3 ret 10d5c9: 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 ); 10d5cc: 50 push %eax 10d5cd: 8d 45 d8 lea -0x28(%ebp),%eax 10d5d0: 50 push %eax 10d5d1: 53 push %ebx 10d5d2: 57 push %edi 10d5d3: 89 45 d4 mov %eax,-0x2c(%ebp) 10d5d6: e8 d5 3c 00 00 call 1112b0 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10d5db: 8b 45 d4 mov -0x2c(%ebp),%eax 10d5de: 89 04 24 mov %eax,(%esp) 10d5e1: e8 0a 3d 00 00 call 1112f0 <_Timespec_To_ticks> 10d5e6: 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 ) 10d5e8: 83 c4 10 add $0x10,%esp return POSIX_ABSOLUTE_TIMEOUT_IS_NOW; 10d5eb: 83 f8 01 cmp $0x1,%eax 10d5ee: 19 c0 sbb %eax,%eax 10d5f0: 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; } 10d5f3: 8d 65 f4 lea -0xc(%ebp),%esp 10d5f6: 5b pop %ebx 10d5f7: 5e pop %esi 10d5f8: 5f pop %edi 10d5f9: c9 leave 10d5fa: c3 ret =============================================================================== 0010c154 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10c154: 55 push %ebp 10c155: 89 e5 mov %esp,%ebp 10c157: 56 push %esi 10c158: 53 push %ebx 10c159: 8b 5d 08 mov 0x8(%ebp),%ebx 10c15c: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10c15f: 85 db test %ebx,%ebx 10c161: 74 39 je 10c19c <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10c163: 8b 03 mov (%ebx),%eax 10c165: 83 f8 ff cmp $0xffffffff,%eax 10c168: 74 1a je 10c184 <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10c16a: 52 push %edx 10c16b: 56 push %esi 10c16c: 50 push %eax 10c16d: 68 c0 98 12 00 push $0x1298c0 10c172: e8 65 2b 00 00 call 10ecdc <_Objects_Get> 10c177: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10c17a: 8d 65 f8 lea -0x8(%ebp),%esp 10c17d: 5b pop %ebx 10c17e: 5e pop %esi 10c17f: c9 leave 10c180: c3 ret 10c181: 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 ); 10c184: 83 ec 08 sub $0x8,%esp 10c187: 6a 00 push $0x0 10c189: 53 push %ebx 10c18a: e8 19 00 00 00 call 10c1a8 if ( status ) { 10c18f: 83 c4 10 add $0x10,%esp 10c192: 85 c0 test %eax,%eax 10c194: 75 06 jne 10c19c <_POSIX_Condition_variables_Get+0x48> 10c196: 8b 03 mov (%ebx),%eax 10c198: eb d0 jmp 10c16a <_POSIX_Condition_variables_Get+0x16> 10c19a: 66 90 xchg %ax,%ax <== NOT EXECUTED *location = OBJECTS_ERROR; 10c19c: c7 06 01 00 00 00 movl $0x1,(%esi) return (POSIX_Condition_variables_Control *) 0; 10c1a2: 31 c0 xor %eax,%eax 10c1a4: eb d4 jmp 10c17a <_POSIX_Condition_variables_Get+0x26> =============================================================================== 0010c270 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c270: 55 push %ebp 10c271: 89 e5 mov %esp,%ebp 10c273: 57 push %edi 10c274: 56 push %esi 10c275: 53 push %ebx 10c276: 83 ec 24 sub $0x24,%esp 10c279: 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 ); 10c27c: 8d 45 e4 lea -0x1c(%ebp),%eax 10c27f: 50 push %eax 10c280: ff 75 08 pushl 0x8(%ebp) 10c283: e8 cc fe ff ff call 10c154 <_POSIX_Condition_variables_Get> 10c288: 89 c7 mov %eax,%edi switch ( location ) { 10c28a: 83 c4 10 add $0x10,%esp 10c28d: 8b 45 e4 mov -0x1c(%ebp),%eax 10c290: 85 c0 test %eax,%eax 10c292: 74 10 je 10c2a4 <_POSIX_Condition_variables_Signal_support+0x34> #endif case OBJECTS_ERROR: break; } return EINVAL; 10c294: b8 16 00 00 00 mov $0x16,%eax } 10c299: 8d 65 f4 lea -0xc(%ebp),%esp 10c29c: 5b pop %ebx 10c29d: 5e pop %esi 10c29e: 5f pop %edi 10c29f: c9 leave 10c2a0: c3 ret 10c2a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c2a4: 8d 77 18 lea 0x18(%edi),%esi 10c2a7: eb 0b jmp 10c2b4 <_POSIX_Condition_variables_Signal_support+0x44> 10c2a9: 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 ); 10c2ac: 84 db test %bl,%bl 10c2ae: 74 20 je 10c2d0 <_POSIX_Condition_variables_Signal_support+0x60> 10c2b0: 85 c0 test %eax,%eax 10c2b2: 74 1c je 10c2d0 <_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 ); 10c2b4: 83 ec 0c sub $0xc,%esp 10c2b7: 56 push %esi 10c2b8: e8 77 36 00 00 call 10f934 <_Thread_queue_Dequeue> if ( !the_thread ) 10c2bd: 83 c4 10 add $0x10,%esp 10c2c0: 85 c0 test %eax,%eax 10c2c2: 75 e8 jne 10c2ac <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c2c4: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c2cb: 84 db test %bl,%bl 10c2cd: 75 e1 jne 10c2b0 <_POSIX_Condition_variables_Signal_support+0x40> 10c2cf: 90 nop _Thread_Enable_dispatch(); 10c2d0: e8 97 32 00 00 call 10f56c <_Thread_Enable_dispatch> return 0; 10c2d5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c2d7: 8d 65 f4 lea -0xc(%ebp),%esp 10c2da: 5b pop %ebx 10c2db: 5e pop %esi 10c2dc: 5f pop %edi 10c2dd: c9 leave 10c2de: c3 ret =============================================================================== 0010c338 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c338: 55 push %ebp 10c339: 89 e5 mov %esp,%ebp 10c33b: 57 push %edi 10c33c: 56 push %esi 10c33d: 53 push %ebx 10c33e: 83 ec 34 sub $0x34,%esp 10c341: 8b 7d 08 mov 0x8(%ebp),%edi 10c344: 8b 5d 0c mov 0xc(%ebp),%ebx 10c347: 8a 45 14 mov 0x14(%ebp),%al 10c34a: 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 ) ) { 10c34d: 8d 75 e4 lea -0x1c(%ebp),%esi 10c350: 56 push %esi 10c351: 53 push %ebx 10c352: e8 5d 01 00 00 call 10c4b4 <_POSIX_Mutex_Get> 10c357: 83 c4 10 add $0x10,%esp 10c35a: 85 c0 test %eax,%eax 10c35c: 74 21 je 10c37f <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c35e: a1 f4 93 12 00 mov 0x1293f4,%eax 10c363: 48 dec %eax 10c364: a3 f4 93 12 00 mov %eax,0x1293f4 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c369: 83 ec 08 sub $0x8,%esp 10c36c: 56 push %esi 10c36d: 57 push %edi 10c36e: e8 e1 fd ff ff call 10c154 <_POSIX_Condition_variables_Get> 10c373: 89 c6 mov %eax,%esi switch ( location ) { 10c375: 83 c4 10 add $0x10,%esp 10c378: 8b 55 e4 mov -0x1c(%ebp),%edx 10c37b: 85 d2 test %edx,%edx 10c37d: 74 11 je 10c390 <_POSIX_Condition_variables_Wait_support+0x58> #endif case OBJECTS_ERROR: break; } return EINVAL; 10c37f: be 16 00 00 00 mov $0x16,%esi } 10c384: 89 f0 mov %esi,%eax 10c386: 8d 65 f4 lea -0xc(%ebp),%esp 10c389: 5b pop %ebx 10c38a: 5e pop %esi 10c38b: 5f pop %edi 10c38c: c9 leave 10c38d: c3 ret 10c38e: 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 ) ) { 10c390: 8b 40 14 mov 0x14(%eax),%eax 10c393: 85 c0 test %eax,%eax 10c395: 74 19 je 10c3b0 <_POSIX_Condition_variables_Wait_support+0x78> 10c397: 3b 03 cmp (%ebx),%eax 10c399: 74 15 je 10c3b0 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c39b: e8 cc 31 00 00 call 10f56c <_Thread_Enable_dispatch> return EINVAL; 10c3a0: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c3a5: 89 f0 mov %esi,%eax 10c3a7: 8d 65 f4 lea -0xc(%ebp),%esp 10c3aa: 5b pop %ebx 10c3ab: 5e pop %esi 10c3ac: 5f pop %edi 10c3ad: c9 leave 10c3ae: c3 ret 10c3af: 90 nop <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c3b0: 83 ec 0c sub $0xc,%esp 10c3b3: 53 push %ebx 10c3b4: e8 77 03 00 00 call 10c730 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c3b9: 83 c4 10 add $0x10,%esp 10c3bc: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c3c0: 74 26 je 10c3e8 <_POSIX_Condition_variables_Wait_support+0xb0> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 10c3c2: e8 a5 31 00 00 call 10f56c <_Thread_Enable_dispatch> status = ETIMEDOUT; 10c3c7: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c3cc: 83 ec 0c sub $0xc,%esp 10c3cf: 53 push %ebx 10c3d0: e8 d3 02 00 00 call 10c6a8 if ( mutex_status ) 10c3d5: 83 c4 10 add $0x10,%esp 10c3d8: 85 c0 test %eax,%eax 10c3da: 75 a3 jne 10c37f <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c3dc: 89 f0 mov %esi,%eax 10c3de: 8d 65 f4 lea -0xc(%ebp),%esp 10c3e1: 5b pop %ebx 10c3e2: 5e pop %esi 10c3e3: 5f pop %edi 10c3e4: c9 leave 10c3e5: c3 ret 10c3e6: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 10c3e8: 8b 03 mov (%ebx),%eax 10c3ea: 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; 10c3ed: 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; 10c3f4: a1 b8 99 12 00 mov 0x1299b8,%eax 10c3f9: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c400: 83 c6 18 add $0x18,%esi 10c403: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c406: 8b 17 mov (%edi),%edx 10c408: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c40b: 50 push %eax 10c40c: 68 f8 fd 10 00 push $0x10fdf8 10c411: ff 75 10 pushl 0x10(%ebp) 10c414: 56 push %esi 10c415: e8 3e 36 00 00 call 10fa58 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c41a: e8 4d 31 00 00 call 10f56c <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10c41f: a1 b8 99 12 00 mov 0x1299b8,%eax 10c424: 8b 70 34 mov 0x34(%eax),%esi if ( status && status != ETIMEDOUT ) 10c427: 83 c4 10 add $0x10,%esp 10c42a: 85 f6 test %esi,%esi 10c42c: 74 9e je 10c3cc <_POSIX_Condition_variables_Wait_support+0x94> 10c42e: 83 fe 74 cmp $0x74,%esi 10c431: 0f 85 4d ff ff ff jne 10c384 <_POSIX_Condition_variables_Wait_support+0x4c><== NEVER TAKEN 10c437: eb 93 jmp 10c3cc <_POSIX_Condition_variables_Wait_support+0x94> =============================================================================== 001162b4 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 1162b4: 55 push %ebp 1162b5: 89 e5 mov %esp,%ebp 1162b7: 57 push %edi 1162b8: 56 push %esi 1162b9: 53 push %ebx 1162ba: 83 ec 24 sub $0x24,%esp 1162bd: 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 ); 1162c0: 68 ff 00 00 00 push $0xff 1162c5: ff 75 08 pushl 0x8(%ebp) 1162c8: e8 7b 4c 00 00 call 11af48 1162cd: 89 c6 mov %eax,%esi 1162cf: a1 94 f9 12 00 mov 0x12f994,%eax 1162d4: 40 inc %eax 1162d5: a3 94 f9 12 00 mov %eax,0x12f994 * 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 ) { 1162da: 83 c4 10 add $0x10,%esp 1162dd: 85 db test %ebx,%ebx 1162df: 0f 84 b7 00 00 00 je 11639c <_POSIX_Message_queue_Create_support+0xe8> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 1162e5: 8b 7b 04 mov 0x4(%ebx),%edi 1162e8: 85 ff test %edi,%edi 1162ea: 0f 8e f0 00 00 00 jle 1163e0 <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 1162f0: 8b 5b 08 mov 0x8(%ebx),%ebx 1162f3: 89 5d e4 mov %ebx,-0x1c(%ebp) 1162f6: 85 db test %ebx,%ebx 1162f8: 0f 8e e2 00 00 00 jle 1163e0 <_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 ); 1162fe: 83 ec 0c sub $0xc,%esp 116301: 68 40 fd 12 00 push $0x12fd40 116306: e8 c1 c4 ff ff call 1127cc <_Objects_Allocate> 11630b: 89 c3 mov %eax,%ebx attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 11630d: 83 c4 10 add $0x10,%esp 116310: 85 c0 test %eax,%eax 116312: 0f 84 0a 01 00 00 je 116422 <_POSIX_Message_queue_Create_support+0x16e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 116318: 8b 45 0c mov 0xc(%ebp),%eax 11631b: 89 43 10 mov %eax,0x10(%ebx) the_mq->named = true; 11631e: c6 43 14 01 movb $0x1,0x14(%ebx) the_mq->open_count = 1; 116322: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx) the_mq->linked = true; 116329: 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); 11632d: 8d 56 01 lea 0x1(%esi),%edx 116330: 83 ec 0c sub $0xc,%esp 116333: 52 push %edx 116334: 89 55 e0 mov %edx,-0x20(%ebp) 116337: e8 0c e5 ff ff call 114848 <_Workspace_Allocate> 11633c: 89 c6 mov %eax,%esi if (!name) { 11633e: 83 c4 10 add $0x10,%esp 116341: 85 c0 test %eax,%eax 116343: 8b 55 e0 mov -0x20(%ebp),%edx 116346: 0f 84 ab 00 00 00 je 1163f7 <_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 ); 11634c: 50 push %eax 11634d: 52 push %edx 11634e: ff 75 08 pushl 0x8(%ebp) 116351: 56 push %esi 116352: e8 75 4b 00 00 call 11aecc * * 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; 116357: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) if ( !_CORE_message_queue_Initialize( 11635e: ff 75 e4 pushl -0x1c(%ebp) 116361: 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; 116362: 8d 43 5c lea 0x5c(%ebx),%eax the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( !_CORE_message_queue_Initialize( 116365: 50 push %eax 116366: 8d 43 1c lea 0x1c(%ebx),%eax 116369: 50 push %eax 11636a: e8 e5 0e 00 00 call 117254 <_CORE_message_queue_Initialize> 11636f: 83 c4 20 add $0x20,%esp 116372: 84 c0 test %al,%al 116374: 74 3a je 1163b0 <_POSIX_Message_queue_Create_support+0xfc> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 116376: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11637a: a1 5c fd 12 00 mov 0x12fd5c,%eax 11637f: 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; 116382: 89 73 0c mov %esi,0xc(%ebx) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 116385: 8b 45 14 mov 0x14(%ebp),%eax 116388: 89 18 mov %ebx,(%eax) _Thread_Enable_dispatch(); 11638a: e8 fd d1 ff ff call 11358c <_Thread_Enable_dispatch> return 0; 11638f: 31 c0 xor %eax,%eax } 116391: 8d 65 f4 lea -0xc(%ebp),%esp 116394: 5b pop %ebx 116395: 5e pop %esi 116396: 5f pop %edi 116397: c9 leave 116398: c3 ret 116399: 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; 11639c: 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; 1163a3: bf 0a 00 00 00 mov $0xa,%edi 1163a8: e9 51 ff ff ff jmp 1162fe <_POSIX_Message_queue_Create_support+0x4a> 1163ad: 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 ); 1163b0: 83 ec 08 sub $0x8,%esp 1163b3: 53 push %ebx 1163b4: 68 40 fd 12 00 push $0x12fd40 1163b9: e8 86 c7 ff ff call 112b44 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 1163be: 89 34 24 mov %esi,(%esp) 1163c1: e8 9e e4 ff ff call 114864 <_Workspace_Free> _Thread_Enable_dispatch(); 1163c6: e8 c1 d1 ff ff call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 1163cb: e8 e0 34 00 00 call 1198b0 <__errno> 1163d0: c7 00 1c 00 00 00 movl $0x1c,(%eax) 1163d6: 83 c4 10 add $0x10,%esp 1163d9: b8 ff ff ff ff mov $0xffffffff,%eax 1163de: eb b1 jmp 116391 <_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(); 1163e0: e8 a7 d1 ff ff call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 1163e5: e8 c6 34 00 00 call 1198b0 <__errno> 1163ea: c7 00 16 00 00 00 movl $0x16,(%eax) 1163f0: b8 ff ff ff ff mov $0xffffffff,%eax 1163f5: eb 9a jmp 116391 <_POSIX_Message_queue_Create_support+0xdd> 1163f7: 83 ec 08 sub $0x8,%esp 1163fa: 53 push %ebx 1163fb: 68 40 fd 12 00 push $0x12fd40 116400: e8 3f c7 ff ff call 112b44 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 116405: e8 82 d1 ff ff call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 11640a: e8 a1 34 00 00 call 1198b0 <__errno> 11640f: c7 00 0c 00 00 00 movl $0xc,(%eax) 116415: 83 c4 10 add $0x10,%esp 116418: b8 ff ff ff ff mov $0xffffffff,%eax 11641d: e9 6f ff ff ff jmp 116391 <_POSIX_Message_queue_Create_support+0xdd> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 116422: e8 65 d1 ff ff call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 116427: e8 84 34 00 00 call 1198b0 <__errno> 11642c: c7 00 17 00 00 00 movl $0x17,(%eax) 116432: b8 ff ff ff ff mov $0xffffffff,%eax 116437: e9 55 ff ff ff jmp 116391 <_POSIX_Message_queue_Create_support+0xdd> =============================================================================== 0011643c <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 11643c: 55 push %ebp 11643d: 89 e5 mov %esp,%ebp 11643f: 53 push %ebx 116440: 83 ec 14 sub $0x14,%esp 116443: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 116446: 85 db test %ebx,%ebx 116448: 74 05 je 11644f <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 11644a: 80 3b 00 cmpb $0x0,(%ebx) 11644d: 75 0d jne 11645c <_POSIX_Message_queue_Name_to_id+0x20> return EINVAL; 11644f: b8 16 00 00 00 mov $0x16,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 116454: 8b 5d fc mov -0x4(%ebp),%ebx 116457: c9 leave 116458: c3 ret 116459: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 11645c: 83 ec 08 sub $0x8,%esp 11645f: 68 ff 00 00 00 push $0xff 116464: 53 push %ebx 116465: e8 de 4a 00 00 call 11af48 11646a: 83 c4 10 add $0x10,%esp 11646d: 3d fe 00 00 00 cmp $0xfe,%eax 116472: 76 0c jbe 116480 <_POSIX_Message_queue_Name_to_id+0x44> return ENAMETOOLONG; 116474: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 116479: 8b 5d fc mov -0x4(%ebp),%ebx 11647c: c9 leave 11647d: c3 ret 11647e: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 116480: 50 push %eax 116481: 8d 45 f4 lea -0xc(%ebp),%eax 116484: 50 push %eax 116485: 53 push %ebx 116486: 68 40 fd 12 00 push $0x12fd40 11648b: e8 c0 13 00 00 call 117850 <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 116490: 8b 4d f4 mov -0xc(%ebp),%ecx 116493: 8b 55 0c mov 0xc(%ebp),%edx 116496: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 116498: 83 c4 10 add $0x10,%esp return 0; 11649b: 83 f8 01 cmp $0x1,%eax 11649e: 19 c0 sbb %eax,%eax 1164a0: f7 d0 not %eax 1164a2: 83 e0 02 and $0x2,%eax return ENOENT; } 1164a5: 8b 5d fc mov -0x4(%ebp),%ebx 1164a8: c9 leave 1164a9: c3 ret =============================================================================== 0010fd60 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10fd60: 55 push %ebp 10fd61: 89 e5 mov %esp,%ebp 10fd63: 53 push %ebx 10fd64: 83 ec 28 sub $0x28,%esp 10fd67: 8b 5d 08 mov 0x8(%ebp),%ebx 10fd6a: 8a 45 18 mov 0x18(%ebp),%al 10fd6d: 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 ); 10fd70: 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( 10fd73: 50 push %eax 10fd74: 53 push %ebx 10fd75: 68 e0 fe 12 00 push $0x12fee0 10fd7a: e8 fd 2e 00 00 call 112c7c <_Objects_Get> switch ( location ) { 10fd7f: 83 c4 10 add $0x10,%esp 10fd82: 8b 55 f4 mov -0xc(%ebp),%edx 10fd85: 85 d2 test %edx,%edx 10fd87: 74 17 je 10fda0 <_POSIX_Message_queue_Receive_support+0x40> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fd89: e8 22 9b 00 00 call 1198b0 <__errno> 10fd8e: c7 00 09 00 00 00 movl $0x9,(%eax) 10fd94: b8 ff ff ff ff mov $0xffffffff,%eax } 10fd99: 8b 5d fc mov -0x4(%ebp),%ebx 10fd9c: c9 leave 10fd9d: c3 ret 10fd9e: 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 ) { 10fda0: 8b 50 14 mov 0x14(%eax),%edx 10fda3: 89 d1 mov %edx,%ecx 10fda5: 83 e1 03 and $0x3,%ecx 10fda8: 49 dec %ecx 10fda9: 0f 84 af 00 00 00 je 10fe5e <_POSIX_Message_queue_Receive_support+0xfe> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fdaf: 8b 40 10 mov 0x10(%eax),%eax if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10fdb2: 8b 4d 10 mov 0x10(%ebp),%ecx 10fdb5: 39 48 68 cmp %ecx,0x68(%eax) 10fdb8: 77 62 ja 10fe1c <_POSIX_Message_queue_Receive_support+0xbc> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10fdba: 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 ) 10fdc1: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10fdc5: 75 45 jne 10fe0c <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN 10fdc7: 31 d2 xor %edx,%edx <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10fdc9: 83 ec 08 sub $0x8,%esp 10fdcc: ff 75 1c pushl 0x1c(%ebp) 10fdcf: 52 push %edx 10fdd0: 8d 55 f0 lea -0x10(%ebp),%edx 10fdd3: 52 push %edx 10fdd4: ff 75 0c pushl 0xc(%ebp) 10fdd7: 53 push %ebx 10fdd8: 83 c0 1c add $0x1c,%eax 10fddb: 50 push %eax 10fddc: e8 53 1f 00 00 call 111d34 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10fde1: 83 c4 20 add $0x20,%esp 10fde4: e8 a3 37 00 00 call 11358c <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10fde9: 8b 15 58 ff 12 00 mov 0x12ff58,%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); 10fdef: 8b 42 24 mov 0x24(%edx),%eax 10fdf2: 85 c0 test %eax,%eax 10fdf4: 78 22 js 10fe18 <_POSIX_Message_queue_Receive_support+0xb8> do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fdf6: 8b 4d 14 mov 0x14(%ebp),%ecx 10fdf9: 89 01 mov %eax,(%ecx) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10fdfb: 8b 42 34 mov 0x34(%edx),%eax 10fdfe: 85 c0 test %eax,%eax 10fe00: 75 36 jne 10fe38 <_POSIX_Message_queue_Receive_support+0xd8> return length_out; 10fe02: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fe05: 8b 5d fc mov -0x4(%ebp),%ebx 10fe08: c9 leave 10fe09: c3 ret 10fe0a: 66 90 xchg %ax,%ax <== NOT EXECUTED length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fe0c: 80 e6 40 and $0x40,%dh 10fe0f: 0f 94 c2 sete %dl 10fe12: 0f b6 d2 movzbl %dl,%edx 10fe15: eb b2 jmp 10fdc9 <_POSIX_Message_queue_Receive_support+0x69> 10fe17: 90 nop <== NOT EXECUTED 10fe18: f7 d8 neg %eax 10fe1a: eb da jmp 10fdf6 <_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(); 10fe1c: e8 6b 37 00 00 call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10fe21: e8 8a 9a 00 00 call 1198b0 <__errno> 10fe26: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10fe2c: b8 ff ff ff ff mov $0xffffffff,%eax 10fe31: e9 63 ff ff ff jmp 10fd99 <_POSIX_Message_queue_Receive_support+0x39> 10fe36: 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( 10fe38: e8 73 9a 00 00 call 1198b0 <__errno> 10fe3d: 89 c3 mov %eax,%ebx 10fe3f: 83 ec 0c sub $0xc,%esp 10fe42: a1 58 ff 12 00 mov 0x12ff58,%eax 10fe47: ff 70 34 pushl 0x34(%eax) 10fe4a: e8 29 02 00 00 call 110078 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fe4f: 89 03 mov %eax,(%ebx) 10fe51: 83 c4 10 add $0x10,%esp 10fe54: b8 ff ff ff ff mov $0xffffffff,%eax 10fe59: e9 3b ff ff ff jmp 10fd99 <_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(); 10fe5e: e8 29 37 00 00 call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fe63: e8 48 9a 00 00 call 1198b0 <__errno> 10fe68: c7 00 09 00 00 00 movl $0x9,(%eax) 10fe6e: b8 ff ff ff ff mov $0xffffffff,%eax 10fe73: e9 21 ff ff ff jmp 10fd99 <_POSIX_Message_queue_Receive_support+0x39> =============================================================================== 0010fe98 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10fe98: 55 push %ebp 10fe99: 89 e5 mov %esp,%ebp 10fe9b: 56 push %esi 10fe9c: 53 push %ebx 10fe9d: 83 ec 20 sub $0x20,%esp 10fea0: 8b 75 08 mov 0x8(%ebp),%esi 10fea3: 8b 5d 14 mov 0x14(%ebp),%ebx 10fea6: 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 ) 10fea9: 83 fb 20 cmp $0x20,%ebx 10feac: 0f 87 92 00 00 00 ja 10ff44 <_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( 10feb2: 51 push %ecx rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10feb3: 8d 45 f4 lea -0xc(%ebp),%eax 10feb6: 50 push %eax 10feb7: 56 push %esi 10feb8: 68 e0 fe 12 00 push $0x12fee0 10febd: 88 55 e4 mov %dl,-0x1c(%ebp) 10fec0: e8 b7 2d 00 00 call 112c7c <_Objects_Get> switch ( location ) { 10fec5: 83 c4 10 add $0x10,%esp 10fec8: 8b 55 f4 mov -0xc(%ebp),%edx 10fecb: 85 d2 test %edx,%edx 10fecd: 8a 55 e4 mov -0x1c(%ebp),%dl 10fed0: 75 5e jne 10ff30 <_POSIX_Message_queue_Send_support+0x98> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10fed2: 8b 48 14 mov 0x14(%eax),%ecx 10fed5: f6 c1 03 test $0x3,%cl 10fed8: 74 7e je 10ff58 <_POSIX_Message_queue_Send_support+0xc0> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10feda: 8b 40 10 mov 0x10(%eax),%eax /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fedd: 84 d2 test %dl,%dl 10fedf: 75 37 jne 10ff18 <_POSIX_Message_queue_Send_support+0x80> 10fee1: 31 d2 xor %edx,%edx do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10fee3: ff 75 1c pushl 0x1c(%ebp) 10fee6: 52 push %edx RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core( unsigned int priority ) { return priority * -1; 10fee7: f7 db neg %ebx 10fee9: 53 push %ebx 10feea: 6a 00 push $0x0 10feec: 56 push %esi 10feed: ff 75 10 pushl 0x10(%ebp) 10fef0: ff 75 0c pushl 0xc(%ebp) 10fef3: 83 c0 1c add $0x1c,%eax 10fef6: 50 push %eax 10fef7: e8 64 1f 00 00 call 111e60 <_CORE_message_queue_Submit> 10fefc: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10fefe: 83 c4 20 add $0x20,%esp 10ff01: e8 86 36 00 00 call 11358c <_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 ) 10ff06: 83 fb 07 cmp $0x7,%ebx 10ff09: 74 19 je 10ff24 <_POSIX_Message_queue_Send_support+0x8c> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10ff0b: 85 db test %ebx,%ebx 10ff0d: 75 61 jne 10ff70 <_POSIX_Message_queue_Send_support+0xd8> return msg_status; 10ff0f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10ff11: 8d 65 f8 lea -0x8(%ebp),%esp 10ff14: 5b pop %ebx 10ff15: 5e pop %esi 10ff16: c9 leave 10ff17: c3 ret the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10ff18: 31 d2 xor %edx,%edx 10ff1a: f6 c5 40 test $0x40,%ch 10ff1d: 0f 94 c2 sete %dl 10ff20: eb c1 jmp 10fee3 <_POSIX_Message_queue_Send_support+0x4b> 10ff22: 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; 10ff24: a1 58 ff 12 00 mov 0x12ff58,%eax 10ff29: 8b 58 34 mov 0x34(%eax),%ebx 10ff2c: eb dd jmp 10ff0b <_POSIX_Message_queue_Send_support+0x73> 10ff2e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10ff30: e8 7b 99 00 00 call 1198b0 <__errno> 10ff35: c7 00 09 00 00 00 movl $0x9,(%eax) 10ff3b: b8 ff ff ff ff mov $0xffffffff,%eax 10ff40: eb cf jmp 10ff11 <_POSIX_Message_queue_Send_support+0x79> 10ff42: 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 ); 10ff44: e8 67 99 00 00 call 1198b0 <__errno> 10ff49: c7 00 16 00 00 00 movl $0x16,(%eax) 10ff4f: b8 ff ff ff ff mov $0xffffffff,%eax 10ff54: eb bb jmp 10ff11 <_POSIX_Message_queue_Send_support+0x79> 10ff56: 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(); 10ff58: e8 2f 36 00 00 call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10ff5d: e8 4e 99 00 00 call 1198b0 <__errno> 10ff62: c7 00 09 00 00 00 movl $0x9,(%eax) 10ff68: b8 ff ff ff ff mov $0xffffffff,%eax 10ff6d: eb a2 jmp 10ff11 <_POSIX_Message_queue_Send_support+0x79> 10ff6f: 90 nop <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10ff70: e8 3b 99 00 00 call 1198b0 <__errno> 10ff75: 89 c6 mov %eax,%esi 10ff77: 83 ec 0c sub $0xc,%esp 10ff7a: 53 push %ebx 10ff7b: e8 f8 00 00 00 call 110078 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10ff80: 89 06 mov %eax,(%esi) 10ff82: 83 c4 10 add $0x10,%esp 10ff85: b8 ff ff ff ff mov $0xffffffff,%eax 10ff8a: eb 85 jmp 10ff11 <_POSIX_Message_queue_Send_support+0x79> =============================================================================== 0010d16c <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10d16c: 55 push %ebp 10d16d: 89 e5 mov %esp,%ebp 10d16f: 56 push %esi 10d170: 53 push %ebx 10d171: 8b 5d 08 mov 0x8(%ebp),%ebx 10d174: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d177: 85 db test %ebx,%ebx 10d179: 74 39 je 10d1b4 <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d17b: 8b 03 mov (%ebx),%eax 10d17d: 83 f8 ff cmp $0xffffffff,%eax 10d180: 74 1a je 10d19c <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); 10d182: 52 push %edx 10d183: 56 push %esi 10d184: 50 push %eax 10d185: 68 20 c9 12 00 push $0x12c920 10d18a: e8 a5 2b 00 00 call 10fd34 <_Objects_Get> { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); return (POSIX_Mutex_Control *) 10d18f: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d192: 8d 65 f8 lea -0x8(%ebp),%esp 10d195: 5b pop %ebx 10d196: 5e pop %esi 10d197: c9 leave 10d198: c3 ret 10d199: 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 ); 10d19c: 83 ec 08 sub $0x8,%esp 10d19f: 6a 00 push $0x0 10d1a1: 53 push %ebx 10d1a2: e8 b9 00 00 00 call 10d260 10d1a7: 83 c4 10 add $0x10,%esp 10d1aa: 85 c0 test %eax,%eax 10d1ac: 75 06 jne 10d1b4 <_POSIX_Mutex_Get+0x48> 10d1ae: 8b 03 mov (%ebx),%eax 10d1b0: eb d0 jmp 10d182 <_POSIX_Mutex_Get+0x16> 10d1b2: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d1b4: c7 06 01 00 00 00 movl $0x1,(%esi) 10d1ba: 31 c0 xor %eax,%eax 10d1bc: eb d4 jmp 10d192 <_POSIX_Mutex_Get+0x26> =============================================================================== 0010d1c0 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10d1c0: 55 push %ebp 10d1c1: 89 e5 mov %esp,%ebp 10d1c3: 56 push %esi 10d1c4: 53 push %ebx 10d1c5: 8b 5d 08 mov 0x8(%ebp),%ebx 10d1c8: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d1cb: 85 db test %ebx,%ebx 10d1cd: 74 39 je 10d208 <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d1cf: 8b 03 mov (%ebx),%eax 10d1d1: 83 f8 ff cmp $0xffffffff,%eax 10d1d4: 74 1a je 10d1f0 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d1d6: ff 75 10 pushl 0x10(%ebp) 10d1d9: 56 push %esi 10d1da: 50 push %eax 10d1db: 68 20 c9 12 00 push $0x12c920 10d1e0: e8 f7 2a 00 00 call 10fcdc <_Objects_Get_isr_disable> 10d1e5: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d1e8: 8d 65 f8 lea -0x8(%ebp),%esp 10d1eb: 5b pop %ebx 10d1ec: 5e pop %esi 10d1ed: c9 leave 10d1ee: c3 ret 10d1ef: 90 nop <== NOT EXECUTED ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d1f0: 83 ec 08 sub $0x8,%esp 10d1f3: 6a 00 push $0x0 10d1f5: 53 push %ebx 10d1f6: e8 65 00 00 00 call 10d260 10d1fb: 83 c4 10 add $0x10,%esp 10d1fe: 85 c0 test %eax,%eax 10d200: 75 06 jne 10d208 <_POSIX_Mutex_Get_interrupt_disable+0x48> 10d202: 8b 03 mov (%ebx),%eax 10d204: eb d0 jmp 10d1d6 <_POSIX_Mutex_Get_interrupt_disable+0x16> 10d206: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d208: c7 06 01 00 00 00 movl $0x1,(%esi) 10d20e: 31 c0 xor %eax,%eax 10d210: eb d6 jmp 10d1e8 <_POSIX_Mutex_Get_interrupt_disable+0x28> =============================================================================== 0010d3c0 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d3c0: 55 push %ebp 10d3c1: 89 e5 mov %esp,%ebp 10d3c3: 53 push %ebx 10d3c4: 83 ec 18 sub $0x18,%esp 10d3c7: 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 ); 10d3ca: 8d 45 f0 lea -0x10(%ebp),%eax 10d3cd: 50 push %eax 10d3ce: 8d 45 f4 lea -0xc(%ebp),%eax 10d3d1: 50 push %eax 10d3d2: ff 75 08 pushl 0x8(%ebp) 10d3d5: e8 e6 fd ff ff call 10d1c0 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 10d3da: 83 c4 10 add $0x10,%esp 10d3dd: 8b 55 f4 mov -0xc(%ebp),%edx 10d3e0: 85 d2 test %edx,%edx 10d3e2: 75 34 jne 10d418 <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d3e4: 83 ec 0c sub $0xc,%esp 10d3e7: ff 75 f0 pushl -0x10(%ebp) 10d3ea: ff 75 10 pushl 0x10(%ebp) 10d3ed: 0f b6 db movzbl %bl,%ebx 10d3f0: 53 push %ebx 10d3f1: ff 70 08 pushl 0x8(%eax) 10d3f4: 83 c0 14 add $0x14,%eax 10d3f7: 50 push %eax 10d3f8: e8 0f 1d 00 00 call 10f10c <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d3fd: 83 c4 14 add $0x14,%esp (CORE_mutex_Status) _Thread_Executing->Wait.return_code 10d400: a1 f8 ca 12 00 mov 0x12caf8,%eax the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d405: ff 70 34 pushl 0x34(%eax) 10d408: e8 f3 00 00 00 call 10d500 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d40d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d410: 8b 5d fc mov -0x4(%ebp),%ebx 10d413: c9 leave 10d414: c3 ret 10d415: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10d418: b8 16 00 00 00 mov $0x16,%eax } 10d41d: 8b 5d fc mov -0x4(%ebp),%ebx 10d420: c9 leave 10d421: c3 ret =============================================================================== 00114898 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 114898: 55 push %ebp 114899: 89 e5 mov %esp,%ebp 11489b: 56 push %esi 11489c: 53 push %ebx 11489d: 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) 1148a0: 8b 55 0c mov 0xc(%ebp),%edx 1148a3: 85 d2 test %edx,%edx 1148a5: 0f 85 b9 00 00 00 jne 114964 <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 1148ab: 85 db test %ebx,%ebx 1148ad: 74 1c je 1148cb <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 1148af: 83 ec 08 sub $0x8,%esp 1148b2: 68 ff 00 00 00 push $0xff 1148b7: 53 push %ebx 1148b8: e8 1b 3e 00 00 call 1186d8 1148bd: 83 c4 10 add $0x10,%esp 1148c0: 3d fe 00 00 00 cmp $0xfe,%eax 1148c5: 0f 87 ad 00 00 00 ja 114978 <_POSIX_Semaphore_Create_support+0xe0> 1148cb: a1 94 d3 12 00 mov 0x12d394,%eax 1148d0: 40 inc %eax 1148d1: a3 94 d3 12 00 mov %eax,0x12d394 */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) _Objects_Allocate( &_POSIX_Semaphore_Information ); 1148d6: 83 ec 0c sub $0xc,%esp 1148d9: 68 c0 d6 12 00 push $0x12d6c0 1148de: e8 ad ba ff ff call 110390 <_Objects_Allocate> 1148e3: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 1148e5: 83 c4 10 add $0x10,%esp 1148e8: 85 c0 test %eax,%eax 1148ea: 0f 84 9a 00 00 00 je 11498a <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 1148f0: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 1148f7: 85 db test %ebx,%ebx 1148f9: 74 55 je 114950 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 1148fb: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 1148ff: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 114906: 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; 11490a: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 114911: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 114918: 50 push %eax 114919: 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; 11491c: 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 ); 11491f: 50 push %eax 114920: 8d 46 1c lea 0x1c(%esi),%eax 114923: 50 push %eax 114924: e8 f3 b4 ff ff call 10fe1c <_CORE_semaphore_Initialize> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 114929: 0f b7 56 08 movzwl 0x8(%esi),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11492d: a1 dc d6 12 00 mov 0x12d6dc,%eax 114932: 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; 114935: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 114938: 8b 45 14 mov 0x14(%ebp),%eax 11493b: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 11493d: e8 0e c8 ff ff call 111150 <_Thread_Enable_dispatch> return 0; 114942: 83 c4 10 add $0x10,%esp 114945: 31 c0 xor %eax,%eax } 114947: 8d 65 f8 lea -0x8(%ebp),%esp 11494a: 5b pop %ebx 11494b: 5e pop %esi 11494c: c9 leave 11494d: c3 ret 11494e: 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; 114950: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 114954: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 11495b: c6 40 15 00 movb $0x0,0x15(%eax) 11495f: eb a9 jmp 11490a <_POSIX_Semaphore_Create_support+0x72> 114961: 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 ); 114964: e8 3f 2d 00 00 call 1176a8 <__errno> 114969: c7 00 58 00 00 00 movl $0x58,(%eax) 11496f: b8 ff ff ff ff mov $0xffffffff,%eax 114974: eb d1 jmp 114947 <_POSIX_Semaphore_Create_support+0xaf> 114976: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 114978: e8 2b 2d 00 00 call 1176a8 <__errno> 11497d: c7 00 5b 00 00 00 movl $0x5b,(%eax) 114983: b8 ff ff ff ff mov $0xffffffff,%eax 114988: eb bd jmp 114947 <_POSIX_Semaphore_Create_support+0xaf> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 11498a: e8 c1 c7 ff ff call 111150 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 11498f: e8 14 2d 00 00 call 1176a8 <__errno> 114994: c7 00 1c 00 00 00 movl $0x1c,(%eax) 11499a: b8 ff ff ff ff mov $0xffffffff,%eax 11499f: eb a6 jmp 114947 <_POSIX_Semaphore_Create_support+0xaf> =============================================================================== 001149f4 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 1149f4: 55 push %ebp 1149f5: 89 e5 mov %esp,%ebp 1149f7: 83 ec 18 sub $0x18,%esp 1149fa: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 1149fd: 85 c0 test %eax,%eax 1149ff: 74 05 je 114a06 <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 114a01: 80 38 00 cmpb $0x0,(%eax) 114a04: 75 0a jne 114a10 <_POSIX_Semaphore_Name_to_id+0x1c> return EINVAL; 114a06: b8 16 00 00 00 mov $0x16,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 114a0b: c9 leave 114a0c: c3 ret 114a0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 114a10: 52 push %edx 114a11: 8d 55 f4 lea -0xc(%ebp),%edx 114a14: 52 push %edx 114a15: 50 push %eax 114a16: 68 c0 d6 12 00 push $0x12d6c0 114a1b: e8 30 0c 00 00 call 115650 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 114a20: 8b 4d f4 mov -0xc(%ebp),%ecx 114a23: 8b 55 0c mov 0xc(%ebp),%edx 114a26: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 114a28: 83 c4 10 add $0x10,%esp return 0; 114a2b: 83 f8 01 cmp $0x1,%eax 114a2e: 19 c0 sbb %eax,%eax 114a30: f7 d0 not %eax 114a32: 83 e0 02 and $0x2,%eax return ENOENT; } 114a35: c9 leave 114a36: c3 ret =============================================================================== 00114a60 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 114a60: 55 push %ebp 114a61: 89 e5 mov %esp,%ebp 114a63: 53 push %ebx 114a64: 83 ec 18 sub $0x18,%esp 114a67: 8a 5d 0c mov 0xc(%ebp),%bl POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 114a6a: 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 ); 114a6d: 50 push %eax 114a6e: 8b 45 08 mov 0x8(%ebp),%eax 114a71: ff 30 pushl (%eax) 114a73: 68 c0 d6 12 00 push $0x12d6c0 114a78: e8 c3 bd ff ff call 110840 <_Objects_Get> switch ( location ) { 114a7d: 83 c4 10 add $0x10,%esp 114a80: 8b 55 f4 mov -0xc(%ebp),%edx 114a83: 85 d2 test %edx,%edx 114a85: 74 15 je 114a9c <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 114a87: e8 1c 2c 00 00 call 1176a8 <__errno> 114a8c: c7 00 16 00 00 00 movl $0x16,(%eax) 114a92: b8 ff ff ff ff mov $0xffffffff,%eax } 114a97: 8b 5d fc mov -0x4(%ebp),%ebx 114a9a: c9 leave 114a9b: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 114a9c: ff 75 10 pushl 0x10(%ebp) 114a9f: 0f b6 db movzbl %bl,%ebx 114aa2: 53 push %ebx 114aa3: ff 70 08 pushl 0x8(%eax) 114aa6: 83 c0 1c add $0x1c,%eax 114aa9: 50 push %eax 114aaa: e8 ed 06 00 00 call 11519c <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 114aaf: e8 9c c6 ff ff call 111150 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 114ab4: 83 c4 10 add $0x10,%esp 114ab7: a1 58 d9 12 00 mov 0x12d958,%eax 114abc: 8b 40 34 mov 0x34(%eax),%eax 114abf: 85 c0 test %eax,%eax 114ac1: 75 09 jne 114acc <_POSIX_Semaphore_Wait_support+0x6c> return 0; 114ac3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 114ac5: 8b 5d fc mov -0x4(%ebp),%ebx 114ac8: c9 leave 114ac9: c3 ret 114aca: 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( 114acc: e8 d7 2b 00 00 call 1176a8 <__errno> 114ad1: 89 c3 mov %eax,%ebx 114ad3: 83 ec 0c sub $0xc,%esp 114ad6: a1 58 d9 12 00 mov 0x12d958,%eax 114adb: ff 70 34 pushl 0x34(%eax) 114ade: e8 2d 27 00 00 call 117210 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 114ae3: 89 03 mov %eax,(%ebx) 114ae5: 83 c4 10 add $0x10,%esp 114ae8: b8 ff ff ff ff mov $0xffffffff,%eax 114aed: eb a8 jmp 114a97 <_POSIX_Semaphore_Wait_support+0x37> =============================================================================== 00110640 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 110640: 55 push %ebp 110641: 89 e5 mov %esp,%ebp 110643: 83 ec 08 sub $0x8,%esp 110646: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110649: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 11064f: 8b 88 d4 00 00 00 mov 0xd4(%eax),%ecx 110655: 85 c9 test %ecx,%ecx 110657: 75 09 jne 110662 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN 110659: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax) 110660: 74 06 je 110668 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 110662: 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(); 110663: e9 1c d5 ff ff jmp 10db84 <_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 && 110668: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax 11066e: 85 c0 test %eax,%eax 110670: 74 f0 je 110662 <_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; 110672: a1 f4 83 12 00 mov 0x1283f4,%eax 110677: 48 dec %eax 110678: a3 f4 83 12 00 mov %eax,0x1283f4 thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 11067d: 83 ec 08 sub $0x8,%esp 110680: 6a ff push $0xffffffff 110682: 52 push %edx 110683: e8 bc 08 00 00 call 110f44 <_POSIX_Thread_Exit> 110688: 83 c4 10 add $0x10,%esp } else _Thread_Enable_dispatch(); } 11068b: c9 leave 11068c: c3 ret =============================================================================== 001119a4 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 1119a4: 55 push %ebp 1119a5: 89 e5 mov %esp,%ebp 1119a7: 57 push %edi 1119a8: 56 push %esi 1119a9: 53 push %ebx 1119aa: 83 ec 18 sub $0x18,%esp 1119ad: 8b 5d 08 mov 0x8(%ebp),%ebx 1119b0: 8b 75 0c mov 0xc(%ebp),%esi 1119b3: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 1119b6: ff 36 pushl (%esi) 1119b8: e8 cb ff ff ff call 111988 <_POSIX_Priority_Is_valid> 1119bd: 83 c4 10 add $0x10,%esp 1119c0: 84 c0 test %al,%al 1119c2: 74 2a je 1119ee <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1119c4: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 1119ca: 8b 45 14 mov 0x14(%ebp),%eax 1119cd: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 1119d3: 85 db test %ebx,%ebx 1119d5: 74 25 je 1119fc <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 1119d7: 83 fb 01 cmp $0x1,%ebx 1119da: 0f 84 90 00 00 00 je 111a70 <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 1119e0: 83 fb 02 cmp $0x2,%ebx 1119e3: 0f 84 8f 00 00 00 je 111a78 <_POSIX_Thread_Translate_sched_param+0xd4> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 1119e9: 83 fb 04 cmp $0x4,%ebx 1119ec: 74 1e je 111a0c <_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; 1119ee: b8 16 00 00 00 mov $0x16,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 1119f3: 8d 65 f4 lea -0xc(%ebp),%esp 1119f6: 5b pop %ebx 1119f7: 5e pop %esi 1119f8: 5f pop %edi 1119f9: c9 leave 1119fa: c3 ret 1119fb: 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; 1119fc: c7 07 01 00 00 00 movl $0x1,(%edi) return 0; 111a02: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 111a04: 8d 65 f4 lea -0xc(%ebp),%esp 111a07: 5b pop %ebx 111a08: 5e pop %esi 111a09: 5f pop %edi 111a0a: c9 leave 111a0b: 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) && 111a0c: 8b 5e 08 mov 0x8(%esi),%ebx 111a0f: 85 db test %ebx,%ebx 111a11: 75 07 jne 111a1a <_POSIX_Thread_Translate_sched_param+0x76> 111a13: 8b 4e 0c mov 0xc(%esi),%ecx 111a16: 85 c9 test %ecx,%ecx 111a18: 74 d4 je 1119ee <_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) && 111a1a: 8b 56 10 mov 0x10(%esi),%edx 111a1d: 85 d2 test %edx,%edx 111a1f: 75 07 jne 111a28 <_POSIX_Thread_Translate_sched_param+0x84> 111a21: 8b 46 14 mov 0x14(%esi),%eax 111a24: 85 c0 test %eax,%eax 111a26: 74 c6 je 1119ee <_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 ) < 111a28: 83 ec 0c sub $0xc,%esp 111a2b: 8d 46 08 lea 0x8(%esi),%eax 111a2e: 50 push %eax 111a2f: e8 4c da ff ff call 10f480 <_Timespec_To_ticks> 111a34: 89 c3 mov %eax,%ebx _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 111a36: 8d 46 10 lea 0x10(%esi),%eax 111a39: 89 04 24 mov %eax,(%esp) 111a3c: e8 3f da ff ff call 10f480 <_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 ) < 111a41: 83 c4 10 add $0x10,%esp 111a44: 39 c3 cmp %eax,%ebx 111a46: 72 a6 jb 1119ee <_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 ) ) 111a48: 83 ec 0c sub $0xc,%esp 111a4b: ff 76 04 pushl 0x4(%esi) 111a4e: e8 35 ff ff ff call 111988 <_POSIX_Priority_Is_valid> 111a53: 83 c4 10 add $0x10,%esp 111a56: 84 c0 test %al,%al 111a58: 74 94 je 1119ee <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 111a5a: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 111a60: 8b 45 14 mov 0x14(%ebp),%eax 111a63: c7 00 7c bd 10 00 movl $0x10bd7c,(%eax) return 0; 111a69: 31 c0 xor %eax,%eax 111a6b: eb 86 jmp 1119f3 <_POSIX_Thread_Translate_sched_param+0x4f> 111a6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 111a70: 31 c0 xor %eax,%eax 111a72: e9 7c ff ff ff jmp 1119f3 <_POSIX_Thread_Translate_sched_param+0x4f> 111a77: 90 nop <== NOT EXECUTED } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 111a78: c7 07 02 00 00 00 movl $0x2,(%edi) return 0; 111a7e: 31 c0 xor %eax,%eax 111a80: e9 6e ff ff ff jmp 1119f3 <_POSIX_Thread_Translate_sched_param+0x4f> =============================================================================== 00110848 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 110848: 55 push %ebp 110849: 89 e5 mov %esp,%ebp 11084b: 57 push %edi 11084c: 56 push %esi 11084d: 53 push %ebx 11084e: 83 ec 28 sub $0x28,%esp 110851: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 110854: 68 ec 00 00 00 push $0xec 110859: 89 55 e4 mov %edx,-0x1c(%ebp) 11085c: e8 bb e0 ff ff call 10e91c <_Workspace_Allocate> 110861: 89 c3 mov %eax,%ebx if ( !api ) 110863: 83 c4 10 add $0x10,%esp 110866: 85 c0 test %eax,%eax 110868: 8b 55 e4 mov -0x1c(%ebp),%edx 11086b: 0f 84 2f 01 00 00 je 1109a0 <_POSIX_Threads_Create_extension+0x158> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 110871: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 110877: b9 3c 00 00 00 mov $0x3c,%ecx 11087c: 31 c0 xor %eax,%eax 11087e: 89 df mov %ebx,%edi 110880: f3 aa rep stos %al,%es:(%edi) 110882: c7 03 01 00 00 00 movl $0x1,(%ebx) 110888: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) 11088f: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx) 110896: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx) 11089d: c7 43 34 01 00 00 00 movl $0x1,0x34(%ebx) 1108a4: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 1108ab: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 1108b2: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx) 1108b9: 00 00 00 api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 1108bc: be 18 15 12 00 mov $0x121518,%esi 1108c1: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi 1108c7: b1 07 mov $0x7,%cl 1108c9: 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); 1108cb: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 1108d2: 2b 42 14 sub 0x14(%edx),%eax 1108d5: 89 83 84 00 00 00 mov %eax,0x84(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 1108db: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 1108e2: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 1108e5: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 1108ec: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 1108ef: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx) 1108f6: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1108f9: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax 1108ff: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 110905: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 11090c: 00 00 00 _Chain_Initialize_empty (&api->Cancellation_Handlers); 11090f: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax 110915: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 11091b: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 110922: 00 00 00 110925: 0f b6 42 0b movzbl 0xb(%edx),%eax 110929: 83 e0 07 and $0x7,%eax if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 11092c: 83 f8 03 cmp $0x3,%eax 11092f: 74 53 je 110984 <_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; 110931: c7 83 cc 00 00 00 ff movl $0xffffffff,0xcc(%ebx) 110938: ff ff ff } _Thread_queue_Initialize( 11093b: 6a 00 push $0x0 11093d: 68 00 10 00 00 push $0x1000 110942: 6a 00 push $0x0 110944: 8d 43 40 lea 0x40(%ebx),%eax 110947: 50 push %eax 110948: 89 55 e4 mov %edx,-0x1c(%ebp) 11094b: e8 64 d5 ff ff call 10deb4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 110950: 8b 55 e4 mov -0x1c(%ebp),%edx 110953: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 110956: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx) 11095d: 00 00 00 the_watchdog->routine = routine; 110960: c7 83 c0 00 00 00 ac movl $0x1109ac,0xc0(%ebx) 110967: 09 11 00 the_watchdog->id = id; 11096a: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) the_watchdog->user_data = user_data; 110970: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx) _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 110976: 83 c4 10 add $0x10,%esp 110979: b0 01 mov $0x1,%al } 11097b: 8d 65 f4 lea -0xc(%ebp),%esp 11097e: 5b pop %ebx 11097f: 5e pop %esi 110980: 5f pop %edi 110981: c9 leave 110982: c3 ret 110983: 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 ]; 110984: a1 98 79 12 00 mov 0x127998,%eax api->signals_blocked = executing_api->signals_blocked; 110989: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 11098f: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 110995: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 11099b: eb 9e jmp 11093b <_POSIX_Threads_Create_extension+0xf3> 11099d: 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; 1109a0: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 1109a2: 8d 65 f4 lea -0xc(%ebp),%esp 1109a5: 5b pop %ebx 1109a6: 5e pop %esi 1109a7: 5f pop %edi 1109a8: c9 leave 1109a9: c3 ret =============================================================================== 001107c0 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 1107c0: 55 push %ebp 1107c1: 89 e5 mov %esp,%ebp 1107c3: 57 push %edi 1107c4: 56 push %esi 1107c5: 53 push %ebx 1107c6: 83 ec 28 sub $0x28,%esp 1107c9: 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 ]; 1107cc: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 1107d2: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 1107d5: 57 push %edi 1107d6: e8 05 24 00 00 call 112be0 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 1107db: 89 3c 24 mov %edi,(%esp) 1107de: e8 61 24 00 00 call 112c44 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 1107e3: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1107e6: 83 c4 10 add $0x10,%esp 1107e9: 8b 45 e4 mov -0x1c(%ebp),%eax 1107ec: 8d 58 40 lea 0x40(%eax),%ebx 1107ef: eb 08 jmp 1107f9 <_POSIX_Threads_Delete_extension+0x39> 1107f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; 1107f4: 8b 40 28 mov 0x28(%eax),%eax 1107f7: 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 )) ) 1107f9: 83 ec 0c sub $0xc,%esp 1107fc: 53 push %ebx 1107fd: e8 02 d3 ff ff call 10db04 <_Thread_queue_Dequeue> 110802: 83 c4 10 add $0x10,%esp 110805: 85 c0 test %eax,%eax 110807: 75 eb jne 1107f4 <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 110809: 8b 45 e4 mov -0x1c(%ebp),%eax 11080c: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 110813: 74 1f je 110834 <_POSIX_Threads_Delete_extension+0x74> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 110815: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 11081c: 00 00 00 (void) _Workspace_Free( api ); 11081f: 8b 45 e4 mov -0x1c(%ebp),%eax 110822: 89 45 08 mov %eax,0x8(%ebp) } 110825: 8d 65 f4 lea -0xc(%ebp),%esp 110828: 5b pop %ebx 110829: 5e pop %esi 11082a: 5f pop %edi 11082b: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 11082c: e9 07 e1 ff ff jmp 10e938 <_Workspace_Free> 110831: 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 ); 110834: 83 ec 0c sub $0xc,%esp 110837: 05 a4 00 00 00 add $0xa4,%eax 11083c: 50 push %eax 11083d: e8 b2 df ff ff call 10e7f4 <_Watchdog_Remove> 110842: 83 c4 10 add $0x10,%esp 110845: eb ce jmp 110815 <_POSIX_Threads_Delete_extension+0x55> =============================================================================== 0011079c <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 11079c: 55 push %ebp 11079d: 89 e5 mov %esp,%ebp 11079f: 83 ec 08 sub $0x8,%esp 1107a2: 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); 1107a5: 0f b6 42 0b movzbl 0xb(%edx),%eax 1107a9: 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 ) 1107ac: 83 f8 03 cmp $0x3,%eax 1107af: 74 03 je 1107b4 <_POSIX_Threads_Exitted_extension+0x18> pthread_exit( executing->Wait.return_argument ); } 1107b1: c9 leave 1107b2: c3 ret 1107b3: 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 ); 1107b4: 8b 42 28 mov 0x28(%edx),%eax 1107b7: 89 45 08 mov %eax,0x8(%ebp) } 1107ba: 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 ); 1107bb: e9 28 27 00 00 jmp 112ee8 =============================================================================== 00110784 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 110784: 55 push %ebp 110785: 89 e5 mov %esp,%ebp 110787: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 11078a: a1 78 56 12 00 mov 0x125678,%eax 11078f: 85 c0 test %eax,%eax 110791: 74 05 je 110798 <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 110793: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 110794: ff e0 jmp *%eax 110796: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110798: c9 leave 110799: c3 ret =============================================================================== 0010ba5c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10ba5c: 55 push %ebp 10ba5d: 89 e5 mov %esp,%ebp 10ba5f: 57 push %edi 10ba60: 56 push %esi 10ba61: 53 push %ebx 10ba62: 83 ec 5c sub $0x5c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10ba65: 8b 3d 54 42 12 00 mov 0x124254,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10ba6b: a1 50 42 12 00 mov 0x124250,%eax 10ba70: 89 45 a4 mov %eax,-0x5c(%ebp) if ( !user_threads || maximum == 0 ) 10ba73: 85 ff test %edi,%edi 10ba75: 74 44 je 10babb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10ba77: 85 c0 test %eax,%eax 10ba79: 74 40 je 10babb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10ba7b: 31 db xor %ebx,%ebx 10ba7d: 8d 75 a8 lea -0x58(%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 ); 10ba80: 83 ec 0c sub $0xc,%esp 10ba83: 56 push %esi 10ba84: e8 ff 5f 00 00 call 111a88 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10ba89: 5a pop %edx 10ba8a: 59 pop %ecx 10ba8b: 6a 02 push $0x2 10ba8d: 56 push %esi 10ba8e: e8 21 60 00 00 call 111ab4 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10ba93: 59 pop %ecx 10ba94: 58 pop %eax 10ba95: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10ba99: 56 push %esi 10ba9a: e8 49 60 00 00 call 111ae8 status = pthread_create( 10ba9f: 6a 00 push $0x0 10baa1: ff 34 df pushl (%edi,%ebx,8) 10baa4: 56 push %esi 10baa5: 8d 45 e4 lea -0x1c(%ebp),%eax 10baa8: 50 push %eax 10baa9: e8 92 fc ff ff call 10b740 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10baae: 83 c4 20 add $0x20,%esp 10bab1: 85 c0 test %eax,%eax 10bab3: 75 0e jne 10bac3 <_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++ ) { 10bab5: 43 inc %ebx 10bab6: 39 5d a4 cmp %ebx,-0x5c(%ebp) 10bab9: 77 c5 ja 10ba80 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10babb: 8d 65 f4 lea -0xc(%ebp),%esp 10babe: 5b pop %ebx 10babf: 5e pop %esi 10bac0: 5f pop %edi 10bac1: c9 leave 10bac2: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10bac3: 52 push %edx 10bac4: 50 push %eax 10bac5: 6a 01 push $0x1 10bac7: 6a 02 push $0x2 10bac9: e8 ba 1e 00 00 call 10d988 <_Internal_error_Occurred> =============================================================================== 001109ac <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 1109ac: 55 push %ebp 1109ad: 89 e5 mov %esp,%ebp 1109af: 56 push %esi 1109b0: 53 push %ebx 1109b1: 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 ]; 1109b4: 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 ); 1109ba: 83 ec 0c sub $0xc,%esp 1109bd: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 1109c3: 50 push %eax 1109c4: e8 5b 0f 00 00 call 111924 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 1109c9: 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); 1109cc: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 1109d3: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 1109d9: 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 ) { 1109dc: 83 c4 10 add $0x10,%esp 1109df: 8b 4e 1c mov 0x1c(%esi),%ecx 1109e2: 85 c9 test %ecx,%ecx 1109e4: 75 05 jne 1109eb <_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 ) { 1109e6: 39 46 14 cmp %eax,0x14(%esi) 1109e9: 77 35 ja 110a20 <_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 ); 1109eb: 83 ec 0c sub $0xc,%esp 1109ee: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 1109f4: 50 push %eax 1109f5: e8 2a 0f 00 00 call 111924 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1109fa: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 110a00: 83 c4 10 add $0x10,%esp _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 110a03: 81 c3 a4 00 00 00 add $0xa4,%ebx 110a09: 89 5d 0c mov %ebx,0xc(%ebp) 110a0c: c7 45 08 a4 74 12 00 movl $0x1274a4,0x8(%ebp) } 110a13: 8d 65 f8 lea -0x8(%ebp),%esp 110a16: 5b pop %ebx 110a17: 5e pop %esi 110a18: c9 leave 110a19: e9 9e dc ff ff jmp 10e6bc <_Watchdog_Insert> 110a1e: 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 ); 110a20: 52 push %edx 110a21: 6a 01 push $0x1 110a23: 50 push %eax 110a24: 56 push %esi 110a25: e8 0e c8 ff ff call 10d238 <_Thread_Change_priority> 110a2a: 83 c4 10 add $0x10,%esp 110a2d: eb bc jmp 1109eb <_POSIX_Threads_Sporadic_budget_TSR+0x3f> =============================================================================== 00110a30 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 110a30: 55 push %ebp 110a31: 89 e5 mov %esp,%ebp 110a33: 83 ec 08 sub $0x8,%esp 110a36: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110a39: 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 */ 110a3f: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) 110a46: 0f b6 15 14 32 12 00 movzbl 0x123214,%edx 110a4d: 2b 91 88 00 00 00 sub 0x88(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 110a53: 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 ) { 110a56: 8b 48 1c mov 0x1c(%eax),%ecx 110a59: 85 c9 test %ecx,%ecx 110a5b: 75 05 jne 110a62 <_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 ) { 110a5d: 39 50 14 cmp %edx,0x14(%eax) 110a60: 72 02 jb 110a64 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 110a62: c9 leave <== NOT EXECUTED 110a63: 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 ); 110a64: 51 push %ecx 110a65: 6a 01 push $0x1 110a67: 52 push %edx 110a68: 50 push %eax 110a69: e8 ca c7 ff ff call 10d238 <_Thread_Change_priority> 110a6e: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 110a71: c9 leave 110a72: c3 ret =============================================================================== 00112be0 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 112be0: 55 push %ebp 112be1: 89 e5 mov %esp,%ebp 112be3: 57 push %edi 112be4: 56 push %esi 112be5: 53 push %ebx 112be6: 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 ]; 112be9: 8b 45 08 mov 0x8(%ebp),%eax 112bec: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 112bf2: c7 86 d4 00 00 00 01 movl $0x1,0xd4(%esi) 112bf9: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112bfc: 8d 9e e4 00 00 00 lea 0xe4(%esi),%ebx while ( !_Chain_Is_empty( handler_stack ) ) { 112c02: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi) 112c08: 74 30 je 112c3a <_POSIX_Threads_cancel_run+0x5a> 112c0a: 66 90 xchg %ax,%ax _ISR_Disable( level ); 112c0c: 9c pushf 112c0d: fa cli 112c0e: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 112c0f: 8b 7b 04 mov 0x4(%ebx),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112c12: 8b 17 mov (%edi),%edx previous = the_node->previous; 112c14: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 112c17: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 112c1a: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 112c1c: 51 push %ecx 112c1d: 9d popf (*handler->routine)( handler->arg ); 112c1e: 83 ec 0c sub $0xc,%esp 112c21: ff 77 0c pushl 0xc(%edi) 112c24: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 112c27: 89 3c 24 mov %edi,(%esp) 112c2a: e8 09 bd ff ff call 10e938 <_Workspace_Free> handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 112c2f: 83 c4 10 add $0x10,%esp 112c32: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi) 112c38: 75 d2 jne 112c0c <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 112c3a: 8d 65 f4 lea -0xc(%ebp),%esp 112c3d: 5b pop %ebx 112c3e: 5e pop %esi 112c3f: 5f pop %edi 112c40: c9 leave 112c41: c3 ret =============================================================================== 0011176c <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 11176c: 55 push %ebp 11176d: 89 e5 mov %esp,%ebp 11176f: 56 push %esi 111770: 53 push %ebx 111771: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 111774: 83 ec 0c sub $0xc,%esp 111777: 53 push %ebx 111778: e8 6b db ff ff call 10f2e8 <_Watchdog_Remove> _ISR_Disable( level ); 11177d: 9c pushf 11177e: fa cli 11177f: 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 ) { 111780: 83 c4 10 add $0x10,%esp 111783: 8b 43 08 mov 0x8(%ebx),%eax 111786: 85 c0 test %eax,%eax 111788: 74 0e je 111798 <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 11178a: 56 push %esi 11178b: 9d popf return false; 11178c: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 11178e: 8d 65 f8 lea -0x8(%ebp),%esp 111791: 5b pop %ebx 111792: 5e pop %esi 111793: c9 leave 111794: c3 ret 111795: 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; 111798: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 11179f: 8b 45 14 mov 0x14(%ebp),%eax 1117a2: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 1117a5: 8b 45 10 mov 0x10(%ebp),%eax 1117a8: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 1117ab: 8b 45 18 mov 0x18(%ebp),%eax 1117ae: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1117b1: 8b 45 0c mov 0xc(%ebp),%eax 1117b4: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1117b7: 83 ec 08 sub $0x8,%esp 1117ba: 53 push %ebx 1117bb: 68 e4 99 12 00 push $0x1299e4 1117c0: e8 eb d9 ff ff call 10f1b0 <_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 ); 1117c5: 56 push %esi 1117c6: 9d popf return true; 1117c7: 83 c4 10 add $0x10,%esp 1117ca: b0 01 mov $0x1,%al } 1117cc: 8d 65 f8 lea -0x8(%ebp),%esp 1117cf: 5b pop %ebx 1117d0: 5e pop %esi 1117d1: c9 leave 1117d2: c3 ret =============================================================================== 0010b87c <_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) { 10b87c: 55 push %ebp 10b87d: 89 e5 mov %esp,%ebp 10b87f: 53 push %ebx 10b880: 83 ec 04 sub $0x4,%esp 10b883: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10b886: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b889: 8b 53 54 mov 0x54(%ebx),%edx 10b88c: 85 d2 test %edx,%edx 10b88e: 75 28 jne 10b8b8 <_POSIX_Timer_TSR+0x3c> 10b890: 8b 43 58 mov 0x58(%ebx),%eax 10b893: 85 c0 test %eax,%eax 10b895: 75 21 jne 10b8b8 <_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; 10b897: 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 ) ) { 10b89b: 83 ec 08 sub $0x8,%esp 10b89e: ff 73 44 pushl 0x44(%ebx) 10b8a1: ff 73 38 pushl 0x38(%ebx) 10b8a4: e8 53 5a 00 00 call 1112fc } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10b8a9: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10b8b0: 83 c4 10 add $0x10,%esp } 10b8b3: 8b 5d fc mov -0x4(%ebp),%ebx 10b8b6: c9 leave 10b8b7: 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( 10b8b8: 83 ec 0c sub $0xc,%esp 10b8bb: 53 push %ebx 10b8bc: 68 7c b8 10 00 push $0x10b87c 10b8c1: ff 73 08 pushl 0x8(%ebx) 10b8c4: ff 73 64 pushl 0x64(%ebx) 10b8c7: 8d 43 10 lea 0x10(%ebx),%eax 10b8ca: 50 push %eax 10b8cb: e8 9c 5e 00 00 call 11176c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10b8d0: 83 c4 20 add $0x20,%esp 10b8d3: 84 c0 test %al,%al 10b8d5: 74 dc je 10b8b3 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10b8d7: 83 ec 0c sub $0xc,%esp 10b8da: 8d 43 6c lea 0x6c(%ebx),%eax 10b8dd: 50 push %eax 10b8de: e8 79 16 00 00 call 10cf5c <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b8e3: c6 43 3c 03 movb $0x3,0x3c(%ebx) 10b8e7: 83 c4 10 add $0x10,%esp 10b8ea: eb af jmp 10b89b <_POSIX_Timer_TSR+0x1f> =============================================================================== 00112cf4 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 112cf4: 55 push %ebp 112cf5: 89 e5 mov %esp,%ebp 112cf7: 57 push %edi 112cf8: 56 push %esi 112cf9: 53 push %ebx 112cfa: 83 ec 48 sub $0x48,%esp 112cfd: 8b 75 08 mov 0x8(%ebp),%esi 112d00: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 112d03: 6a 01 push $0x1 112d05: 0f b6 45 10 movzbl 0x10(%ebp),%eax 112d09: 50 push %eax 112d0a: 8d 7d dc lea -0x24(%ebp),%edi 112d0d: 57 push %edi 112d0e: 53 push %ebx 112d0f: 56 push %esi 112d10: e8 6b 00 00 00 call 112d80 <_POSIX_signals_Clear_signals> 112d15: 83 c4 20 add $0x20,%esp 112d18: 84 c0 test %al,%al 112d1a: 74 58 je 112d74 <_POSIX_signals_Check_signal+0x80> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 112d1c: 8d 04 5b lea (%ebx,%ebx,2),%eax 112d1f: c1 e0 02 shl $0x2,%eax 112d22: 8b 90 c8 79 12 00 mov 0x1279c8(%eax),%edx 112d28: 89 55 c4 mov %edx,-0x3c(%ebp) 112d2b: 4a dec %edx 112d2c: 74 46 je 112d74 <_POSIX_signals_Check_signal+0x80><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 112d2e: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 112d34: 8b 90 c4 79 12 00 mov 0x1279c4(%eax),%edx 112d3a: 09 ca or %ecx,%edx 112d3c: 89 96 cc 00 00 00 mov %edx,0xcc(%esi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 112d42: 83 b8 c0 79 12 00 02 cmpl $0x2,0x1279c0(%eax) 112d49: 74 21 je 112d6c <_POSIX_signals_Check_signal+0x78> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 112d4b: 83 ec 0c sub $0xc,%esp 112d4e: 53 push %ebx 112d4f: 89 4d d4 mov %ecx,-0x2c(%ebp) 112d52: ff 55 c4 call *-0x3c(%ebp) break; 112d55: 83 c4 10 add $0x10,%esp 112d58: 8b 4d d4 mov -0x2c(%ebp),%ecx } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 112d5b: 89 8e cc 00 00 00 mov %ecx,0xcc(%esi) return true; 112d61: b0 01 mov $0x1,%al } 112d63: 8d 65 f4 lea -0xc(%ebp),%esp 112d66: 5b pop %ebx 112d67: 5e pop %esi 112d68: 5f pop %edi 112d69: c9 leave 112d6a: c3 ret 112d6b: 90 nop <== NOT EXECUTED /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 112d6c: 50 push %eax 112d6d: 6a 00 push $0x0 112d6f: 57 push %edi 112d70: eb dc jmp 112d4e <_POSIX_signals_Check_signal+0x5a> 112d72: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) return false; 112d74: 31 c0 xor %eax,%eax * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } 112d76: 8d 65 f4 lea -0xc(%ebp),%esp 112d79: 5b pop %ebx 112d7a: 5e pop %esi 112d7b: 5f pop %edi 112d7c: c9 leave 112d7d: c3 ret =============================================================================== 00113338 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 113338: 55 push %ebp 113339: 89 e5 mov %esp,%ebp 11333b: 53 push %ebx 11333c: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 11333f: 9c pushf 113340: fa cli 113341: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 113342: 8d 04 49 lea (%ecx,%ecx,2),%eax 113345: c1 e0 02 shl $0x2,%eax 113348: 83 b8 c0 79 12 00 02 cmpl $0x2,0x1279c0(%eax) 11334f: 74 13 je 113364 <_POSIX_signals_Clear_process_signals+0x2c> 113351: 49 dec %ecx 113352: 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; 113357: d3 c0 rol %cl,%eax 113359: 21 05 c8 7b 12 00 and %eax,0x127bc8 } _ISR_Enable( level ); 11335f: 52 push %edx 113360: 9d popf } 113361: 5b pop %ebx 113362: c9 leave 113363: c3 ret */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113364: 8d 98 e4 7b 12 00 lea 0x127be4(%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 ] ) ) 11336a: 39 98 e0 7b 12 00 cmp %ebx,0x127be0(%eax) 113370: 75 ed jne 11335f <_POSIX_signals_Clear_process_signals+0x27><== NEVER TAKEN 113372: eb dd jmp 113351 <_POSIX_signals_Clear_process_signals+0x19> =============================================================================== 00112d80 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 112d80: 55 push %ebp 112d81: 89 e5 mov %esp,%ebp 112d83: 57 push %edi 112d84: 56 push %esi 112d85: 53 push %ebx 112d86: 83 ec 1c sub $0x1c,%esp 112d89: 8b 5d 0c mov 0xc(%ebp),%ebx 112d8c: 0f b6 7d 14 movzbl 0x14(%ebp),%edi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 112d90: 8d 4b ff lea -0x1(%ebx),%ecx 112d93: b8 01 00 00 00 mov $0x1,%eax 112d98: 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 ) 112d9a: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 112d9e: 74 40 je 112de0 <_POSIX_signals_Clear_signals+0x60> signals_blocked = ~api->signals_blocked; 112da0: 8b 55 08 mov 0x8(%ebp),%edx 112da3: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx 112da9: 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 ); 112dab: 9c pushf 112dac: fa cli 112dad: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 112db0: 89 fa mov %edi,%edx 112db2: 84 d2 test %dl,%dl 112db4: 74 32 je 112de8 <_POSIX_signals_Clear_signals+0x68> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 112db6: 23 05 c8 7b 12 00 and 0x127bc8,%eax 112dbc: 85 c8 test %ecx,%eax 112dbe: 74 54 je 112e14 <_POSIX_signals_Clear_signals+0x94> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 112dc0: 8d 14 5b lea (%ebx,%ebx,2),%edx 112dc3: c1 e2 02 shl $0x2,%edx 112dc6: 83 ba c0 79 12 00 02 cmpl $0x2,0x1279c0(%edx) 112dcd: 74 49 je 112e18 <_POSIX_signals_Clear_signals+0x98> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 112dcf: 83 ec 0c sub $0xc,%esp 112dd2: 53 push %ebx 112dd3: e8 60 05 00 00 call 113338 <_POSIX_signals_Clear_process_signals> 112dd8: 83 c4 10 add $0x10,%esp do_callout = true; 112ddb: b0 01 mov $0x1,%al 112ddd: eb 26 jmp 112e05 <_POSIX_signals_Clear_signals+0x85> 112ddf: 90 nop <== NOT EXECUTED */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; else signals_blocked = SIGNAL_ALL_MASK; 112de0: b9 ff ff ff ff mov $0xffffffff,%ecx 112de5: eb c4 jmp 112dab <_POSIX_signals_Clear_signals+0x2b> 112de7: 90 nop <== NOT EXECUTED } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 112de8: 8b 55 08 mov 0x8(%ebp),%edx 112deb: 8b 9a d0 00 00 00 mov 0xd0(%edx),%ebx 112df1: 89 c6 mov %eax,%esi 112df3: 21 de and %ebx,%esi 112df5: 85 ce test %ecx,%esi 112df7: 74 1b je 112e14 <_POSIX_signals_Clear_signals+0x94> api->signals_pending &= ~mask; 112df9: f7 d0 not %eax 112dfb: 21 d8 and %ebx,%eax 112dfd: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) do_callout = true; 112e03: b0 01 mov $0x1,%al } } _ISR_Enable( level ); 112e05: ff 75 e4 pushl -0x1c(%ebp) 112e08: 9d popf return do_callout; } 112e09: 8d 65 f4 lea -0xc(%ebp),%esp 112e0c: 5b pop %ebx 112e0d: 5e pop %esi 112e0e: 5f pop %edi 112e0f: c9 leave 112e10: c3 ret 112e11: 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; 112e14: 31 c0 xor %eax,%eax 112e16: eb ed jmp 112e05 <_POSIX_signals_Clear_signals+0x85> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112e18: 8d 8a e0 7b 12 00 lea 0x127be0(%edx),%ecx 112e1e: 8b 82 e0 7b 12 00 mov 0x127be0(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112e24: 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)) 112e27: 39 f0 cmp %esi,%eax 112e29: 74 45 je 112e70 <_POSIX_signals_Clear_signals+0xf0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112e2b: 8b 30 mov (%eax),%esi the_chain->first = new_first; 112e2d: 89 b2 e0 7b 12 00 mov %esi,0x127be0(%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 ] ); 112e33: 89 4e 04 mov %ecx,0x4(%esi) _POSIX_signals_Clear_process_signals( signo ); 112e36: 83 ec 0c sub $0xc,%esp 112e39: 53 push %ebx 112e3a: 89 45 e0 mov %eax,-0x20(%ebp) 112e3d: e8 f6 04 00 00 call 113338 <_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; 112e42: 8b 45 e0 mov -0x20(%ebp),%eax 112e45: 8d 70 08 lea 0x8(%eax),%esi 112e48: b9 03 00 00 00 mov $0x3,%ecx 112e4d: 8b 7d 10 mov 0x10(%ebp),%edi 112e50: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 112e52: c7 00 44 7b 12 00 movl $0x127b44,(%eax) old_last_node = the_chain->last; 112e58: 8b 15 48 7b 12 00 mov 0x127b48,%edx the_chain->last = the_node; 112e5e: a3 48 7b 12 00 mov %eax,0x127b48 old_last_node->next = the_node; 112e63: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 112e65: 89 50 04 mov %edx,0x4(%eax) 112e68: 83 c4 10 add $0x10,%esp 112e6b: e9 5f ff ff ff jmp 112dcf <_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 ); 112e70: 83 ec 0c sub $0xc,%esp 112e73: 53 push %ebx 112e74: e8 bf 04 00 00 call 113338 <_POSIX_signals_Clear_process_signals> 112e79: 83 c4 10 add $0x10,%esp 112e7c: e9 4e ff ff ff jmp 112dcf <_POSIX_signals_Clear_signals+0x4f> =============================================================================== 0010c154 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10c154: 55 push %ebp 10c155: 89 e5 mov %esp,%ebp 10c157: 56 push %esi 10c158: 53 push %ebx 10c159: 8b 55 08 mov 0x8(%ebp),%edx int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c15c: b8 1b 00 00 00 mov $0x1b,%eax 10c161: bb 01 00 00 00 mov $0x1,%ebx #include #include #include #include int _POSIX_signals_Get_highest( 10c166: 8d 48 ff lea -0x1(%eax),%ecx 10c169: 89 de mov %ebx,%esi 10c16b: d3 e6 shl %cl,%esi ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c16d: 85 d6 test %edx,%esi 10c16f: 75 20 jne 10c191 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c171: 40 inc %eax 10c172: 83 f8 20 cmp $0x20,%eax 10c175: 75 ef jne 10c166 <_POSIX_signals_Get_highest+0x12> 10c177: b0 01 mov $0x1,%al 10c179: bb 01 00 00 00 mov $0x1,%ebx 10c17e: eb 06 jmp 10c186 <_POSIX_signals_Get_highest+0x32> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10c180: 40 inc %eax 10c181: 83 f8 1b cmp $0x1b,%eax 10c184: 74 0b je 10c191 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN #include #include #include #include int _POSIX_signals_Get_highest( 10c186: 8d 48 ff lea -0x1(%eax),%ecx 10c189: 89 de mov %ebx,%esi 10c18b: 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 ) ) { 10c18d: 85 d6 test %edx,%esi 10c18f: 74 ef je 10c180 <_POSIX_signals_Get_highest+0x2c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10c191: 5b pop %ebx 10c192: 5e pop %esi 10c193: c9 leave 10c194: c3 ret =============================================================================== 0012467c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 12467c: 55 push %ebp 12467d: 89 e5 mov %esp,%ebp 12467f: 57 push %edi 124680: 56 push %esi 124681: 53 push %ebx 124682: 83 ec 0c sub $0xc,%esp 124685: 8b 5d 08 mov 0x8(%ebp),%ebx 124688: 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 ]; 12468b: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 124691: 8d 4a ff lea -0x1(%edx),%ecx 124694: b8 01 00 00 00 mov $0x1,%eax 124699: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 12469b: 8b 4b 10 mov 0x10(%ebx),%ecx 12469e: 89 cf mov %ecx,%edi 1246a0: 81 e7 00 80 00 10 and $0x10008000,%edi 1246a6: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1246ac: 74 6a je 124718 <_POSIX_signals_Unblock_thread+0x9c> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1246ae: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 1246b4: f7 d2 not %edx 1246b6: 85 d0 test %edx,%eax 1246b8: 74 52 je 12470c <_POSIX_signals_Unblock_thread+0x90> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 1246ba: f7 c1 00 00 00 10 test $0x10000000,%ecx 1246c0: 74 32 je 1246f4 <_POSIX_signals_Unblock_thread+0x78> the_thread->Wait.return_code = EINTR; 1246c2: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 1246c9: 83 e1 08 and $0x8,%ecx 1246cc: 74 3e je 12470c <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1246ce: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1246d2: 0f 84 a8 00 00 00 je 124780 <_POSIX_signals_Unblock_thread+0x104><== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1246d8: 83 ec 08 sub $0x8,%esp 1246db: 68 f8 ff 03 10 push $0x1003fff8 1246e0: 53 push %ebx 1246e1: e8 7a dd fe ff call 112460 <_Thread_Clear_state> 1246e6: 83 c4 10 add $0x10,%esp } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; } } return false; 1246e9: 31 c0 xor %eax,%eax } 1246eb: 8d 65 f4 lea -0xc(%ebp),%esp 1246ee: 5b pop %ebx 1246ef: 5e pop %esi 1246f0: 5f pop %edi 1246f1: c9 leave 1246f2: c3 ret 1246f3: 90 nop <== NOT EXECUTED if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 1246f4: 85 c9 test %ecx,%ecx 1246f6: 75 14 jne 12470c <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1246f8: a1 14 e9 12 00 mov 0x12e914,%eax 1246fd: 85 c0 test %eax,%eax 1246ff: 74 0b je 12470c <_POSIX_signals_Unblock_thread+0x90> 124701: 3b 1d 18 e9 12 00 cmp 0x12e918,%ebx 124707: 74 6b je 124774 <_POSIX_signals_Unblock_thread+0xf8><== ALWAYS TAKEN 124709: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } } return false; 12470c: 31 c0 xor %eax,%eax } 12470e: 8d 65 f4 lea -0xc(%ebp),%esp 124711: 5b pop %ebx 124712: 5e pop %esi 124713: 5f pop %edi 124714: c9 leave 124715: c3 ret 124716: 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) ) { 124718: 85 43 30 test %eax,0x30(%ebx) 12471b: 74 33 je 124750 <_POSIX_signals_Unblock_thread+0xd4> the_thread->Wait.return_code = EINTR; 12471d: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 124724: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 124727: 8b 4d 10 mov 0x10(%ebp),%ecx 12472a: 85 c9 test %ecx,%ecx 12472c: 74 32 je 124760 <_POSIX_signals_Unblock_thread+0xe4> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 12472e: b9 03 00 00 00 mov $0x3,%ecx 124733: 89 c7 mov %eax,%edi 124735: 8b 75 10 mov 0x10(%ebp),%esi 124738: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 12473a: 83 ec 0c sub $0xc,%esp 12473d: 53 push %ebx 12473e: e8 01 e8 fe ff call 112f44 <_Thread_queue_Extract_with_proxy> return true; 124743: 83 c4 10 add $0x10,%esp 124746: b0 01 mov $0x1,%al if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; } } return false; } 124748: 8d 65 f4 lea -0xc(%ebp),%esp 12474b: 5b pop %ebx 12474c: 5e pop %esi 12474d: 5f pop %edi 12474e: c9 leave 12474f: 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) ) { 124750: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 124756: f7 d1 not %ecx 124758: 85 c8 test %ecx,%eax 12475a: 75 c1 jne 12471d <_POSIX_signals_Unblock_thread+0xa1> 12475c: eb ae jmp 12470c <_POSIX_signals_Unblock_thread+0x90> 12475e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 124760: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 124762: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 124769: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 124770: eb c8 jmp 12473a <_POSIX_signals_Unblock_thread+0xbe> 124772: 66 90 xchg %ax,%ax <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 124774: c6 05 24 e9 12 00 01 movb $0x1,0x12e924 } } return false; 12477b: 31 c0 xor %eax,%eax 12477d: eb 8f jmp 12470e <_POSIX_signals_Unblock_thread+0x92> 12477f: 90 nop <== NOT EXECUTED _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 124780: 83 ec 0c sub $0xc,%esp 124783: 8d 43 48 lea 0x48(%ebx),%eax 124786: 50 push %eax 124787: e8 50 f1 fe ff call 1138dc <_Watchdog_Remove> 12478c: 83 c4 10 add $0x10,%esp 12478f: e9 44 ff ff ff jmp 1246d8 <_POSIX_signals_Unblock_thread+0x5c> =============================================================================== 00110ba0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 110ba0: 55 push %ebp 110ba1: 89 e5 mov %esp,%ebp 110ba3: 56 push %esi 110ba4: 53 push %ebx 110ba5: 8b 5d 08 mov 0x8(%ebp),%ebx 110ba8: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 110bab: 85 db test %ebx,%ebx 110bad: 74 35 je 110be4 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 110baf: 85 f6 test %esi,%esi 110bb1: 74 31 je 110be4 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 110bb3: 83 ec 0c sub $0xc,%esp 110bb6: ff 35 c4 dd 12 00 pushl 0x12ddc4 110bbc: e8 b7 e4 ff ff call 10f078 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 110bc1: 5a pop %edx 110bc2: 59 pop %ecx 110bc3: 56 push %esi 110bc4: 53 push %ebx 110bc5: e8 16 45 00 00 call 1150e0 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 110bca: 58 pop %eax 110bcb: ff 35 c4 dd 12 00 pushl 0x12ddc4 110bd1: e8 ea e4 ff ff call 10f0c0 <_API_Mutex_Unlock> return true; 110bd6: 83 c4 10 add $0x10,%esp 110bd9: b0 01 mov $0x1,%al } 110bdb: 8d 65 f8 lea -0x8(%ebp),%esp 110bde: 5b pop %ebx 110bdf: 5e pop %esi 110be0: c9 leave 110be1: c3 ret 110be2: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !the_heap ) return false; if ( !the_info ) return false; 110be4: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 110be6: 8d 65 f8 lea -0x8(%ebp),%esp 110be9: 5b pop %ebx 110bea: 5e pop %esi 110beb: c9 leave 110bec: c3 ret =============================================================================== 00110c44 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110c44: 55 push %ebp 110c45: 89 e5 mov %esp,%ebp 110c47: 56 push %esi 110c48: 53 push %ebx 110c49: 83 ec 10 sub $0x10,%esp 110c4c: 8b 5d 08 mov 0x8(%ebp),%ebx 110c4f: 8b 75 0c mov 0xc(%ebp),%esi 110c52: 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 ) { 110c55: 8b 15 14 dd 12 00 mov 0x12dd14,%edx 110c5b: 85 d2 test %edx,%edx 110c5d: 74 19 je 110c78 <_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 ); 110c5f: 0f b6 c0 movzbl %al,%eax 110c62: 89 45 10 mov %eax,0x10(%ebp) 110c65: 89 75 0c mov %esi,0xc(%ebp) 110c68: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110c6b: 8d 65 f8 lea -0x8(%ebp),%esp 110c6e: 5b pop %ebx 110c6f: 5e pop %esi 110c70: 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 ); 110c71: e9 52 f2 ff ff jmp 10fec8 <_Heap_Walk> 110c76: 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(); 110c78: 83 ec 0c sub $0xc,%esp 110c7b: ff 35 c4 dd 12 00 pushl 0x12ddc4 110c81: 88 45 f4 mov %al,-0xc(%ebp) 110c84: e8 ef e3 ff ff call 10f078 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110c89: 83 c4 0c add $0xc,%esp 110c8c: 8a 45 f4 mov -0xc(%ebp),%al 110c8f: 0f b6 c0 movzbl %al,%eax 110c92: 50 push %eax 110c93: 56 push %esi 110c94: 53 push %ebx 110c95: e8 2e f2 ff ff call 10fec8 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110c9a: 5a pop %edx 110c9b: ff 35 c4 dd 12 00 pushl 0x12ddc4 110ca1: 88 45 f4 mov %al,-0xc(%ebp) 110ca4: e8 17 e4 ff ff call 10f0c0 <_API_Mutex_Unlock> 110ca9: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110cac: 8a 45 f4 mov -0xc(%ebp),%al 110caf: 8d 65 f8 lea -0x8(%ebp),%esp 110cb2: 5b pop %ebx 110cb3: 5e pop %esi 110cb4: c9 leave 110cb5: c3 ret =============================================================================== 00110dc4 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 110dc4: 55 push %ebp 110dc5: 89 e5 mov %esp,%ebp 110dc7: 53 push %ebx 110dc8: 83 ec 10 sub $0x10,%esp 110dcb: 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 ); 110dce: 80 3d e4 31 12 00 01 cmpb $0x1,0x1231e4 110dd5: 19 c0 sbb %eax,%eax 110dd7: 83 e0 c0 and $0xffffffc0,%eax 110dda: 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 ); 110ddd: 50 push %eax 110dde: e8 39 db ff ff call 10e91c <_Workspace_Allocate> if ( !api ) 110de3: 83 c4 10 add $0x10,%esp 110de6: 85 c0 test %eax,%eax 110de8: 74 6a je 110e54 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 110dea: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 110df0: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 110df6: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 110dfd: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 110e01: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 110e08: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 110e0f: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 110e16: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 110e1d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 110e24: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 110e2b: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 110e2e: 80 3d e4 31 12 00 00 cmpb $0x0,0x1231e4 110e35: 74 13 je 110e4a <_RTEMS_tasks_Create_extension+0x86> 110e37: 31 d2 xor %edx,%edx 110e39: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 110e3c: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 110e43: 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++) 110e44: 42 inc %edx 110e45: 83 fa 10 cmp $0x10,%edx 110e48: 75 f2 jne 110e3c <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 110e4a: b0 01 mov $0x1,%al } 110e4c: 8b 5d fc mov -0x4(%ebp),%ebx 110e4f: c9 leave 110e50: c3 ret 110e51: 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; 110e54: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 110e56: 8b 5d fc mov -0x4(%ebp),%ebx 110e59: c9 leave 110e5a: c3 ret =============================================================================== 00110d6c <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 110d6c: 55 push %ebp 110d6d: 89 e5 mov %esp,%ebp 110d6f: 56 push %esi 110d70: 53 push %ebx 110d71: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 110d74: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax deleted->task_variables = NULL; 110d7a: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 110d81: 00 00 00 while (tvp) { 110d84: 85 c0 test %eax,%eax 110d86: 75 06 jne 110d8e <_RTEMS_tasks_Delete_extension+0x22> 110d88: eb 17 jmp 110da1 <_RTEMS_tasks_Delete_extension+0x35> 110d8a: 66 90 xchg %ax,%ax <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 110d8c: 89 f0 mov %esi,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 110d8e: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 110d90: 83 ec 08 sub $0x8,%esp 110d93: 50 push %eax 110d94: 53 push %ebx 110d95: e8 56 01 00 00 call 110ef0 <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 110d9a: 83 c4 10 add $0x10,%esp 110d9d: 85 f6 test %esi,%esi 110d9f: 75 eb jne 110d8c <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 110da1: 83 ec 0c sub $0xc,%esp 110da4: ff b3 f4 00 00 00 pushl 0xf4(%ebx) 110daa: e8 89 db ff ff call 10e938 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 110daf: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 110db6: 00 00 00 110db9: 83 c4 10 add $0x10,%esp } 110dbc: 8d 65 f8 lea -0x8(%ebp),%esp 110dbf: 5b pop %ebx 110dc0: 5e pop %esi 110dc1: c9 leave 110dc2: c3 ret =============================================================================== 00110cf0 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 110cf0: 55 push %ebp 110cf1: 89 e5 mov %esp,%ebp 110cf3: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 110cf6: a1 60 32 12 00 mov 0x123260,%eax 110cfb: 85 c0 test %eax,%eax 110cfd: 74 05 je 110d04 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 110cff: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 110d00: ff e0 jmp *%eax 110d02: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110d04: c9 leave 110d05: c3 ret =============================================================================== 0010bb08 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10bb08: 55 push %ebp 10bb09: 89 e5 mov %esp,%ebp 10bb0b: 57 push %edi 10bb0c: 56 push %esi 10bb0d: 53 push %ebx 10bb0e: 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; 10bb11: 8b 1d 0c 32 12 00 mov 0x12320c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10bb17: 8b 3d 08 32 12 00 mov 0x123208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10bb1d: 85 db test %ebx,%ebx 10bb1f: 74 46 je 10bb67 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bb21: 85 ff test %edi,%edi 10bb23: 74 42 je 10bb67 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10bb25: 31 f6 xor %esi,%esi 10bb27: 90 nop return_value = rtems_task_create( 10bb28: 83 ec 08 sub $0x8,%esp 10bb2b: 8d 45 e4 lea -0x1c(%ebp),%eax 10bb2e: 50 push %eax 10bb2f: ff 73 0c pushl 0xc(%ebx) 10bb32: ff 73 14 pushl 0x14(%ebx) 10bb35: ff 73 04 pushl 0x4(%ebx) 10bb38: ff 73 08 pushl 0x8(%ebx) 10bb3b: ff 33 pushl (%ebx) 10bb3d: e8 92 fd ff ff call 10b8d4 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10bb42: 83 c4 20 add $0x20,%esp 10bb45: 85 c0 test %eax,%eax 10bb47: 75 26 jne 10bb6f <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10bb49: 51 push %ecx 10bb4a: ff 73 18 pushl 0x18(%ebx) 10bb4d: ff 73 10 pushl 0x10(%ebx) 10bb50: ff 75 e4 pushl -0x1c(%ebp) 10bb53: e8 24 00 00 00 call 10bb7c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bb58: 83 c4 10 add $0x10,%esp 10bb5b: 85 c0 test %eax,%eax 10bb5d: 75 10 jne 10bb6f <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bb5f: 46 inc %esi 10bb60: 83 c3 1c add $0x1c,%ebx 10bb63: 39 f7 cmp %esi,%edi 10bb65: 77 c1 ja 10bb28 <_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 ); } } 10bb67: 8d 65 f4 lea -0xc(%ebp),%esp 10bb6a: 5b pop %ebx 10bb6b: 5e pop %esi 10bb6c: 5f pop %edi 10bb6d: c9 leave 10bb6e: 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 ); 10bb6f: 52 push %edx 10bb70: 50 push %eax 10bb71: 6a 01 push $0x1 10bb73: 6a 01 push $0x1 10bb75: e8 f2 0d 00 00 call 10c96c <_Internal_error_Occurred> =============================================================================== 00110d08 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 110d08: 55 push %ebp 110d09: 89 e5 mov %esp,%ebp 110d0b: 57 push %edi 110d0c: 56 push %esi 110d0d: 53 push %ebx 110d0e: 83 ec 1c sub $0x1c,%esp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 110d11: 8b 45 08 mov 0x8(%ebp),%eax 110d14: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 110d1a: 85 db test %ebx,%ebx 110d1c: 74 45 je 110d63 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 110d1e: 9c pushf 110d1f: fa cli 110d20: 58 pop %eax signal_set = asr->signals_posted; 110d21: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 110d24: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 110d2b: 50 push %eax 110d2c: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 110d2d: 85 f6 test %esi,%esi 110d2f: 74 32 je 110d63 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 110d31: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110d34: 50 push %eax 110d35: 8d 7d e4 lea -0x1c(%ebp),%edi 110d38: 57 push %edi 110d39: 68 ff ff 00 00 push $0xffff 110d3e: ff 73 10 pushl 0x10(%ebx) 110d41: e8 be 21 00 00 call 112f04 (*asr->handler)( signal_set ); 110d46: 89 34 24 mov %esi,(%esp) 110d49: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 110d4c: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110d4f: 83 c4 0c add $0xc,%esp 110d52: 57 push %edi 110d53: 68 ff ff 00 00 push $0xffff 110d58: ff 75 e4 pushl -0x1c(%ebp) 110d5b: e8 a4 21 00 00 call 112f04 110d60: 83 c4 10 add $0x10,%esp } 110d63: 8d 65 f4 lea -0xc(%ebp),%esp 110d66: 5b pop %ebx 110d67: 5e pop %esi 110d68: 5f pop %edi 110d69: c9 leave 110d6a: c3 ret =============================================================================== 00110ca8 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110ca8: 55 push %ebp 110ca9: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 110cab: 8b 45 08 mov 0x8(%ebp),%eax 110cae: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 110cb4: 85 c0 test %eax,%eax 110cb6: 74 13 je 110ccb <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110cb8: 8b 50 04 mov 0x4(%eax),%edx 110cbb: 8b 0a mov (%edx),%ecx 110cbd: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 110cc0: 8b 48 08 mov 0x8(%eax),%ecx 110cc3: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110cc5: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 110cc7: 85 c0 test %eax,%eax 110cc9: 75 ed jne 110cb8 <_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; 110ccb: 8b 45 0c mov 0xc(%ebp),%eax 110cce: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 110cd4: 85 c0 test %eax,%eax 110cd6: 74 13 je 110ceb <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 110cd8: 8b 50 04 mov 0x4(%eax),%edx 110cdb: 8b 0a mov (%edx),%ecx 110cdd: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 110ce0: 8b 48 0c mov 0xc(%eax),%ecx 110ce3: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110ce5: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 110ce7: 85 c0 test %eax,%eax 110ce9: 75 ed jne 110cd8 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 110ceb: c9 leave 110cec: c3 ret =============================================================================== 0010c4d0 <_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 ) { 10c4d0: 55 push %ebp 10c4d1: 89 e5 mov %esp,%ebp 10c4d3: 57 push %edi 10c4d4: 56 push %esi 10c4d5: 53 push %ebx 10c4d6: 83 ec 38 sub $0x38,%esp 10c4d9: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 10c4dc: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 10c4df: 8d 75 e0 lea -0x20(%ebp),%esi 10c4e2: 56 push %esi 10c4e3: e8 34 19 00 00 call 10de1c <_TOD_Get_uptime> _Timestamp_Subtract( 10c4e8: 83 c4 0c add $0xc,%esp 10c4eb: ff 75 0c pushl 0xc(%ebp) 10c4ee: 56 push %esi 10c4ef: 8d 43 4c lea 0x4c(%ebx),%eax 10c4f2: 50 push %eax 10c4f3: e8 84 3a 00 00 call 10ff7c <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 10c4f8: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 10c4fe: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 10c504: 89 45 d8 mov %eax,-0x28(%ebp) 10c507: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c50a: 83 c4 10 add $0x10,%esp 10c50d: 39 3d 78 af 12 00 cmp %edi,0x12af78 10c513: 74 0b je 10c520 <_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; 10c515: b0 01 mov $0x1,%al } 10c517: 8d 65 f4 lea -0xc(%ebp),%esp 10c51a: 5b pop %ebx 10c51b: 5e pop %esi 10c51c: 5f pop %edi 10c51d: c9 leave 10c51e: c3 ret 10c51f: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 10c520: 52 push %edx 10c521: 8d 7d d0 lea -0x30(%ebp),%edi 10c524: 57 push %edi 10c525: 56 push %esi 10c526: 68 70 aa 12 00 push $0x12aa70 10c52b: e8 4c 3a 00 00 call 10ff7c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 10c530: 5e pop %esi 10c531: 58 pop %eax 10c532: 57 push %edi 10c533: 8d 75 d8 lea -0x28(%ebp),%esi 10c536: 56 push %esi 10c537: e8 44 39 00 00 call 10fe80 <_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)) 10c53c: 83 c3 44 add $0x44,%ebx 10c53f: 5a pop %edx 10c540: 59 pop %ecx 10c541: 53 push %ebx 10c542: 56 push %esi 10c543: e8 10 3a 00 00 call 10ff58 <_Timespec_Less_than> 10c548: 83 c4 10 add $0x10,%esp 10c54b: 84 c0 test %al,%al 10c54d: 74 05 je 10c554 <_Rate_monotonic_Get_status+0x84> return false; 10c54f: 31 c0 xor %eax,%eax 10c551: eb c4 jmp 10c517 <_Rate_monotonic_Get_status+0x47> 10c553: 90 nop <== NOT EXECUTED /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 10c554: 50 push %eax 10c555: ff 75 10 pushl 0x10(%ebp) 10c558: 56 push %esi 10c559: 53 push %ebx 10c55a: e8 1d 3a 00 00 call 10ff7c <_Timespec_Subtract> 10c55f: 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; 10c562: b0 01 mov $0x1,%al 10c564: eb b1 jmp 10c517 <_Rate_monotonic_Get_status+0x47> =============================================================================== 0010c568 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c568: 55 push %ebp 10c569: 89 e5 mov %esp,%ebp 10c56b: 57 push %edi 10c56c: 56 push %esi 10c56d: 53 push %ebx 10c56e: 83 ec 28 sub $0x28,%esp 10c571: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c574: 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 ); 10c577: 8d 7d e0 lea -0x20(%ebp),%edi 10c57a: 57 push %edi 10c57b: e8 9c 18 00 00 call 10de1c <_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; 10c580: 8b 45 e0 mov -0x20(%ebp),%eax 10c583: 8b 55 e4 mov -0x1c(%ebp),%edx 10c586: 89 43 4c mov %eax,0x4c(%ebx) 10c589: 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; 10c58c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c592: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c598: 89 43 44 mov %eax,0x44(%ebx) 10c59b: 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) { 10c59e: 83 c4 10 add $0x10,%esp 10c5a1: 39 35 78 af 12 00 cmp %esi,0x12af78 10c5a7: 74 0b je 10c5b4 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c5a9: 8d 65 f4 lea -0xc(%ebp),%esp 10c5ac: 5b pop %ebx 10c5ad: 5e pop %esi 10c5ae: 5f pop %edi 10c5af: c9 leave 10c5b0: c3 ret 10c5b1: 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( 10c5b4: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c5b5: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c5b8: 56 push %esi 10c5b9: 57 push %edi 10c5ba: 68 70 aa 12 00 push $0x12aa70 10c5bf: e8 b8 39 00 00 call 10ff7c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c5c4: 59 pop %ecx 10c5c5: 5f pop %edi 10c5c6: 56 push %esi 10c5c7: 83 c3 44 add $0x44,%ebx 10c5ca: 53 push %ebx 10c5cb: e8 b0 38 00 00 call 10fe80 <_Timespec_Add_to> 10c5d0: 83 c4 10 add $0x10,%esp } #endif } 10c5d3: 8d 65 f4 lea -0xc(%ebp),%esp 10c5d6: 5b pop %ebx 10c5d7: 5e pop %esi 10c5d8: 5f pop %edi 10c5d9: c9 leave 10c5da: c3 ret =============================================================================== 0010cb30 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10cb30: 55 push %ebp 10cb31: 89 e5 mov %esp,%ebp 10cb33: 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 ); 10cb36: 8d 45 f4 lea -0xc(%ebp),%eax 10cb39: 50 push %eax 10cb3a: ff 75 08 pushl 0x8(%ebp) 10cb3d: 68 c0 a8 12 00 push $0x12a8c0 10cb42: e8 61 1d 00 00 call 10e8a8 <_Objects_Get> switch ( location ) { 10cb47: 83 c4 10 add $0x10,%esp 10cb4a: 8b 55 f4 mov -0xc(%ebp),%edx 10cb4d: 85 d2 test %edx,%edx 10cb4f: 75 29 jne 10cb7a <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10cb51: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10cb54: f6 42 11 40 testb $0x40,0x11(%edx) 10cb58: 74 08 je 10cb62 <_Rate_monotonic_Timeout+0x32> 10cb5a: 8b 48 08 mov 0x8(%eax),%ecx 10cb5d: 39 4a 20 cmp %ecx,0x20(%edx) 10cb60: 74 4e je 10cbb0 <_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 ) { 10cb62: 83 78 38 01 cmpl $0x1,0x38(%eax) 10cb66: 74 14 je 10cb7c <_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; 10cb68: 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; 10cb6f: a1 b4 a9 12 00 mov 0x12a9b4,%eax 10cb74: 48 dec %eax 10cb75: a3 b4 a9 12 00 mov %eax,0x12a9b4 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10cb7a: c9 leave 10cb7b: 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; 10cb7c: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10cb83: 83 ec 0c sub $0xc,%esp 10cb86: 50 push %eax 10cb87: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb8a: e8 d9 f9 ff ff call 10c568 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cb8f: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb92: 8b 50 3c mov 0x3c(%eax),%edx 10cb95: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cb98: 5a pop %edx 10cb99: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cb9a: 83 c0 10 add $0x10,%eax 10cb9d: 50 push %eax 10cb9e: 68 84 aa 12 00 push $0x12aa84 10cba3: e8 b4 36 00 00 call 11025c <_Watchdog_Insert> 10cba8: 83 c4 10 add $0x10,%esp 10cbab: eb c2 jmp 10cb6f <_Rate_monotonic_Timeout+0x3f> 10cbad: 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 ); 10cbb0: 83 ec 08 sub $0x8,%esp 10cbb3: 68 f8 ff 03 10 push $0x1003fff8 10cbb8: 52 push %edx 10cbb9: 89 45 e4 mov %eax,-0x1c(%ebp) 10cbbc: e8 b3 21 00 00 call 10ed74 <_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 ); 10cbc1: 8b 45 e4 mov -0x1c(%ebp),%eax 10cbc4: 89 04 24 mov %eax,(%esp) 10cbc7: eb c1 jmp 10cb8a <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c5dc <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c5dc: 55 push %ebp 10c5dd: 89 e5 mov %esp,%ebp 10c5df: 57 push %edi 10c5e0: 56 push %esi 10c5e1: 53 push %ebx 10c5e2: 83 ec 1c sub $0x1c,%esp 10c5e5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c5e8: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c5eb: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c5ef: 0f 84 bf 00 00 00 je 10c6b4 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5f5: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c5f6: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5f9: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c5fa: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5fd: 56 push %esi 10c5fe: 53 push %ebx 10c5ff: e8 cc fe ff ff call 10c4d0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c604: 83 c4 10 add $0x10,%esp 10c607: 84 c0 test %al,%al 10c609: 75 09 jne 10c614 <_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 } 10c60b: 8d 65 f4 lea -0xc(%ebp),%esp 10c60e: 5b pop %ebx 10c60f: 5e pop %esi 10c610: 5f pop %edi 10c611: c9 leave 10c612: c3 ret 10c613: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c614: 83 ec 08 sub $0x8,%esp 10c617: 57 push %edi 10c618: 8d 43 6c lea 0x6c(%ebx),%eax 10c61b: 50 push %eax 10c61c: e8 5f 38 00 00 call 10fe80 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c621: 58 pop %eax 10c622: 5a pop %edx 10c623: 8d 43 5c lea 0x5c(%ebx),%eax 10c626: 50 push %eax 10c627: 57 push %edi 10c628: e8 2b 39 00 00 call 10ff58 <_Timespec_Less_than> 10c62d: 83 c4 10 add $0x10,%esp 10c630: 84 c0 test %al,%al 10c632: 74 0c je 10c640 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c634: 8b 45 e0 mov -0x20(%ebp),%eax 10c637: 8b 55 e4 mov -0x1c(%ebp),%edx 10c63a: 89 43 5c mov %eax,0x5c(%ebx) 10c63d: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c640: 83 ec 08 sub $0x8,%esp 10c643: 8d 43 64 lea 0x64(%ebx),%eax 10c646: 50 push %eax 10c647: 57 push %edi 10c648: e8 e7 38 00 00 call 10ff34 <_Timespec_Greater_than> 10c64d: 83 c4 10 add $0x10,%esp 10c650: 84 c0 test %al,%al 10c652: 74 0c je 10c660 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c654: 8b 45 e0 mov -0x20(%ebp),%eax 10c657: 8b 55 e4 mov -0x1c(%ebp),%edx 10c65a: 89 43 64 mov %eax,0x64(%ebx) 10c65d: 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 ); 10c660: 83 ec 08 sub $0x8,%esp 10c663: 56 push %esi 10c664: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c66a: 50 push %eax 10c66b: e8 10 38 00 00 call 10fe80 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c670: 5a pop %edx 10c671: 59 pop %ecx 10c672: 8d 43 74 lea 0x74(%ebx),%eax 10c675: 50 push %eax 10c676: 56 push %esi 10c677: e8 dc 38 00 00 call 10ff58 <_Timespec_Less_than> 10c67c: 83 c4 10 add $0x10,%esp 10c67f: 84 c0 test %al,%al 10c681: 75 39 jne 10c6bc <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c683: 83 ec 08 sub $0x8,%esp 10c686: 8d 43 7c lea 0x7c(%ebx),%eax 10c689: 50 push %eax 10c68a: 56 push %esi 10c68b: e8 a4 38 00 00 call 10ff34 <_Timespec_Greater_than> 10c690: 83 c4 10 add $0x10,%esp 10c693: 84 c0 test %al,%al 10c695: 0f 84 70 ff ff ff je 10c60b <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c69b: 8b 45 d8 mov -0x28(%ebp),%eax 10c69e: 8b 55 dc mov -0x24(%ebp),%edx 10c6a1: 89 43 7c mov %eax,0x7c(%ebx) 10c6a4: 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 } 10c6aa: 8d 65 f4 lea -0xc(%ebp),%esp 10c6ad: 5b pop %ebx 10c6ae: 5e pop %esi 10c6af: 5f pop %edi 10c6b0: c9 leave 10c6b1: c3 ret 10c6b2: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c6b4: ff 43 58 incl 0x58(%ebx) 10c6b7: e9 39 ff ff ff jmp 10c5f5 <_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; 10c6bc: 8b 45 d8 mov -0x28(%ebp),%eax 10c6bf: 8b 55 dc mov -0x24(%ebp),%edx 10c6c2: 89 43 74 mov %eax,0x74(%ebx) 10c6c5: 89 53 78 mov %edx,0x78(%ebx) 10c6c8: eb b9 jmp 10c683 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010db44 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10db44: 55 push %ebp 10db45: 89 e5 mov %esp,%ebp 10db47: 53 push %ebx 10db48: 83 ec 04 sub $0x4,%esp 10db4b: 8b 5d 08 mov 0x8(%ebp),%ebx 10db4e: a1 54 22 13 00 mov 0x132254,%eax 10db53: 40 inc %eax 10db54: a3 54 22 13 00 mov %eax,0x132254 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10db59: a1 e8 22 13 00 mov 0x1322e8,%eax if ( time->tv_sec < seconds ) 10db5e: 8b 13 mov (%ebx),%edx 10db60: 39 d0 cmp %edx,%eax 10db62: 7f 34 jg 10db98 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10db64: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10db65: 29 c2 sub %eax,%edx 10db67: 52 push %edx 10db68: 6a 00 push $0x0 10db6a: 68 18 23 13 00 push $0x132318 10db6f: e8 24 25 00 00 call 110098 <_Watchdog_Adjust> 10db74: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10db77: 8b 03 mov (%ebx),%eax 10db79: a3 e8 22 13 00 mov %eax,0x1322e8 10db7e: 8b 43 04 mov 0x4(%ebx),%eax 10db81: a3 ec 22 13 00 mov %eax,0x1322ec _TOD_Is_set = true; 10db86: c6 05 68 22 13 00 01 movb $0x1,0x132268 _TOD_Activate(); _Thread_Enable_dispatch(); } 10db8d: 8b 5d fc mov -0x4(%ebp),%ebx 10db90: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10db91: e9 0e 13 00 00 jmp 10eea4 <_Thread_Enable_dispatch> 10db96: 66 90 xchg %ax,%ax <== NOT EXECUTED 10db98: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10db99: 29 d0 sub %edx,%eax 10db9b: 50 push %eax 10db9c: 6a 01 push $0x1 10db9e: 68 18 23 13 00 push $0x132318 10dba3: e8 f0 24 00 00 call 110098 <_Watchdog_Adjust> 10dba8: 83 c4 10 add $0x10,%esp 10dbab: eb ca jmp 10db77 <_TOD_Set+0x33> =============================================================================== 0010c250 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c250: 55 push %ebp 10c251: 89 e5 mov %esp,%ebp 10c253: 56 push %esi 10c254: 53 push %ebx 10c255: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c258: 8b 72 08 mov 0x8(%edx),%esi 10c25b: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c25c: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c25e: 89 c3 mov %eax,%ebx 10c260: 83 e3 03 and $0x3,%ebx 10c263: 74 67 je 10c2cc <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c265: 8b 4a 04 mov 0x4(%edx),%ecx 10c268: 0f b7 8c 09 c0 3c 12 movzwl 0x123cc0(%ecx,%ecx,1),%ecx 10c26f: 00 10c270: 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 ]; 10c273: 0f b7 8c 1b f4 3c 12 movzwl 0x123cf4(%ebx,%ebx,1),%ecx 10c27a: 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 ) * 10c27b: 2d c4 07 00 00 sub $0x7c4,%eax 10c280: c1 e8 02 shr $0x2,%eax 10c283: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c286: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c289: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c28c: 8d 04 98 lea (%eax,%ebx,4),%eax 10c28f: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c291: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c293: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c296: 8d 04 81 lea (%ecx,%eax,4),%eax 10c299: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c29c: c1 e0 02 shl $0x2,%eax 10c29f: 29 c8 sub %ecx,%eax 10c2a1: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c2a4: 8b 5a 14 mov 0x14(%edx),%ebx 10c2a7: 8b 4a 0c mov 0xc(%edx),%ecx 10c2aa: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c2ad: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c2b0: c1 e1 02 shl $0x2,%ecx 10c2b3: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c2b6: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c2b9: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c2bc: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c2c3: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c2c6: 5b pop %ebx 10c2c7: 5e pop %esi 10c2c8: c9 leave 10c2c9: c3 ret 10c2ca: 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 ]; 10c2cc: 8b 4a 04 mov 0x4(%edx),%ecx 10c2cf: 0f b7 8c 09 da 3c 12 movzwl 0x123cda(%ecx,%ecx,1),%ecx 10c2d6: 00 10c2d7: 8d 34 31 lea (%ecx,%esi,1),%esi 10c2da: eb 97 jmp 10c273 <_TOD_To_seconds+0x23> =============================================================================== 0010c2dc <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c2dc: 55 push %ebp 10c2dd: 89 e5 mov %esp,%ebp 10c2df: 53 push %ebx 10c2e0: 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(); 10c2e3: 8b 1d 2c 62 12 00 mov 0x12622c,%ebx if ((!the_tod) || 10c2e9: 85 c9 test %ecx,%ecx 10c2eb: 74 53 je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c2ed: b8 40 42 0f 00 mov $0xf4240,%eax 10c2f2: 31 d2 xor %edx,%edx 10c2f4: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c2f6: 3b 41 18 cmp 0x18(%ecx),%eax 10c2f9: 76 45 jbe 10c340 <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c2fb: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c2ff: 77 3f ja 10c340 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c301: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c305: 77 39 ja 10c340 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c307: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c30b: 77 33 ja 10c340 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c30d: 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) || 10c310: 85 c0 test %eax,%eax 10c312: 74 2c je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c314: 83 f8 0c cmp $0xc,%eax 10c317: 77 27 ja 10c340 <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c319: 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) || 10c31b: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c321: 76 1d jbe 10c340 <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c323: 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) || 10c326: 85 c9 test %ecx,%ecx 10c328: 74 16 je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c32a: 83 e2 03 and $0x3,%edx 10c32d: 75 16 jne 10c345 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c32f: 8b 04 85 34 3d 12 00 mov 0x123d34(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c336: 39 c8 cmp %ecx,%eax 10c338: 0f 93 c0 setae %al 10c33b: eb 05 jmp 10c342 <_TOD_Validate+0x66> 10c33d: 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; 10c340: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c342: 5b pop %ebx 10c343: c9 leave 10c344: 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 ]; 10c345: 8b 04 85 00 3d 12 00 mov 0x123d00(,%eax,4),%eax 10c34c: eb e8 jmp 10c336 <_TOD_Validate+0x5a> =============================================================================== 0010d238 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d238: 55 push %ebp 10d239: 89 e5 mov %esp,%ebp 10d23b: 57 push %edi 10d23c: 56 push %esi 10d23d: 53 push %ebx 10d23e: 83 ec 28 sub $0x28,%esp 10d241: 8b 5d 08 mov 0x8(%ebp),%ebx 10d244: 8b 75 0c mov 0xc(%ebp),%esi 10d247: 8a 45 10 mov 0x10(%ebp),%al 10d24a: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d24d: 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 ); 10d250: 53 push %ebx 10d251: e8 a6 0e 00 00 call 10e0fc <_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 ) 10d256: 83 c4 10 add $0x10,%esp 10d259: 39 73 14 cmp %esi,0x14(%ebx) 10d25c: 74 0d je 10d26b <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d25e: 83 ec 08 sub $0x8,%esp 10d261: 56 push %esi 10d262: 53 push %ebx 10d263: e8 48 0d 00 00 call 10dfb0 <_Thread_Set_priority> 10d268: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d26b: 9c pushf 10d26c: fa cli 10d26d: 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; 10d26e: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d271: 83 f8 04 cmp $0x4,%eax 10d274: 74 26 je 10d29c <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d276: 83 e7 04 and $0x4,%edi 10d279: 74 15 je 10d290 <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d27b: 52 push %edx 10d27c: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d27d: a9 e0 be 03 00 test $0x3bee0,%eax 10d282: 0f 85 bc 00 00 00 jne 10d344 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d288: 8d 65 f4 lea -0xc(%ebp),%esp 10d28b: 5b pop %ebx 10d28c: 5e pop %esi 10d28d: 5f pop %edi 10d28e: c9 leave 10d28f: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d290: 89 c1 mov %eax,%ecx 10d292: 83 e1 fb and $0xfffffffb,%ecx 10d295: 89 4b 10 mov %ecx,0x10(%ebx) 10d298: eb e1 jmp 10d27b <_Thread_Change_priority+0x43> 10d29a: 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 ) ) { 10d29c: 83 e7 04 and $0x4,%edi 10d29f: 75 45 jne 10d2e6 <_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 ); 10d2a1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d2a8: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d2ae: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d2b5: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d2b8: 66 a1 80 74 12 00 mov 0x127480,%ax 10d2be: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d2c4: 66 a3 80 74 12 00 mov %ax,0x127480 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d2ca: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d2ce: 0f 84 88 00 00 00 je 10d35c <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d2d4: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d2da: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d2dd: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d2df: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d2e1: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d2e3: 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 ); 10d2e6: 52 push %edx 10d2e7: 9d popf 10d2e8: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d2e9: 66 8b 1d 80 74 12 00 mov 0x127480,%bx 10d2f0: 31 c0 xor %eax,%eax 10d2f2: 89 c1 mov %eax,%ecx 10d2f4: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d2f8: 0f b7 c9 movzwl %cx,%ecx 10d2fb: 66 8b 9c 09 00 75 12 mov 0x127500(%ecx,%ecx,1),%bx 10d302: 00 10d303: 66 0f bc c3 bsf %bx,%ax return (_Priority_Bits_index( major ) << 4) + 10d307: c1 e1 04 shl $0x4,%ecx 10d30a: 0f b7 c0 movzwl %ax,%eax */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 10d30d: 8d 04 01 lea (%ecx,%eax,1),%eax 10d310: 8d 04 40 lea (%eax,%eax,2),%eax 10d313: c1 e0 02 shl $0x2,%eax 10d316: 03 05 a0 73 12 00 add 0x1273a0,%eax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d31c: 8b 00 mov (%eax),%eax 10d31e: a3 9c 79 12 00 mov %eax,0x12799c * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d323: 8b 0d 98 79 12 00 mov 0x127998,%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() && 10d329: 39 c8 cmp %ecx,%eax 10d32b: 74 0d je 10d33a <_Thread_Change_priority+0x102> 10d32d: 80 79 74 00 cmpb $0x0,0x74(%ecx) 10d331: 74 07 je 10d33a <_Thread_Change_priority+0x102> _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; 10d333: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4 _ISR_Enable( level ); 10d33a: 52 push %edx 10d33b: 9d popf } 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 /* 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 ); 10d344: 89 5d 0c mov %ebx,0xc(%ebp) 10d347: 8b 43 44 mov 0x44(%ebx),%eax 10d34a: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d34d: 8d 65 f4 lea -0xc(%ebp),%esp 10d350: 5b pop %ebx 10d351: 5e pop %esi 10d352: 5f pop %edi 10d353: 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 ); 10d354: e9 bf 0b 00 00 jmp 10df18 <_Thread_queue_Requeue> 10d359: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d35c: 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; 10d362: 8d 48 04 lea 0x4(%eax),%ecx 10d365: 89 0b mov %ecx,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d367: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d36a: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d36d: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d36f: 89 4b 04 mov %ecx,0x4(%ebx) 10d372: e9 6f ff ff ff jmp 10d2e6 <_Thread_Change_priority+0xae> =============================================================================== 0010d378 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d378: 55 push %ebp 10d379: 89 e5 mov %esp,%ebp 10d37b: 53 push %ebx 10d37c: 8b 45 08 mov 0x8(%ebp),%eax 10d37f: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d382: 9c pushf 10d383: fa cli 10d384: 5b pop %ebx current_state = the_thread->current_state; 10d385: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d388: 85 ca test %ecx,%edx 10d38a: 74 70 je 10d3fc <_Thread_Clear_state+0x84> 10d38c: f7 d2 not %edx 10d38e: 21 ca and %ecx,%edx current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d390: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10d393: 85 d2 test %edx,%edx 10d395: 75 65 jne 10d3fc <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d397: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d39d: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d3a4: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d3a7: 66 8b 15 80 74 12 00 mov 0x127480,%dx 10d3ae: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d3b4: 66 89 15 80 74 12 00 mov %dx,0x127480 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d3bb: 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; 10d3c1: 8d 4a 04 lea 0x4(%edx),%ecx 10d3c4: 89 08 mov %ecx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d3c6: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d3c9: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d3cc: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d3ce: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d3d1: 53 push %ebx 10d3d2: 9d popf 10d3d3: 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 ) { 10d3d4: 8b 50 14 mov 0x14(%eax),%edx 10d3d7: 8b 0d 9c 79 12 00 mov 0x12799c,%ecx 10d3dd: 3b 51 14 cmp 0x14(%ecx),%edx 10d3e0: 73 1a jae 10d3fc <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d3e2: a3 9c 79 12 00 mov %eax,0x12799c if ( _Thread_Executing->is_preemptible || 10d3e7: a1 98 79 12 00 mov 0x127998,%eax 10d3ec: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d3f0: 74 12 je 10d404 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d3f2: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4 10d3f9: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d3fc: 53 push %ebx 10d3fd: 9d popf } 10d3fe: 5b pop %ebx 10d3ff: c9 leave 10d400: c3 ret 10d401: 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 || 10d404: 85 d2 test %edx,%edx 10d406: 74 ea je 10d3f2 <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d408: eb f2 jmp 10d3fc <_Thread_Clear_state+0x84> =============================================================================== 0010d40c <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d40c: 55 push %ebp 10d40d: 89 e5 mov %esp,%ebp 10d40f: 56 push %esi 10d410: 53 push %ebx 10d411: 8b 75 08 mov 0x8(%ebp),%esi 10d414: 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( 10d417: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d41b: 8b 46 1c mov 0x1c(%esi),%eax 10d41e: 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; 10d425: a1 d4 73 12 00 mov 0x1273d4,%eax 10d42a: 48 dec %eax 10d42b: a3 d4 73 12 00 mov %eax,0x1273d4 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d430: 83 ec 0c sub $0xc,%esp 10d433: 53 push %ebx 10d434: e8 c3 11 00 00 call 10e5fc <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d439: a1 d4 73 12 00 mov 0x1273d4,%eax 10d43e: 40 inc %eax 10d43f: a3 d4 73 12 00 mov %eax,0x1273d4 /* * 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 ); 10d444: 59 pop %ecx 10d445: 58 pop %eax 10d446: 53 push %ebx 10d447: 56 push %esi 10d448: e8 2b f6 ff ff call 10ca78 <_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 ); 10d44d: 58 pop %eax 10d44e: 5a pop %edx 10d44f: 6a 01 push $0x1 10d451: 53 push %ebx 10d452: e8 c5 0b 00 00 call 10e01c <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d457: 89 1c 24 mov %ebx,(%esp) 10d45a: e8 fd 09 00 00 call 10de5c <_Thread_queue_Extract_with_proxy> 10d45f: 83 c4 10 add $0x10,%esp 10d462: 84 c0 test %al,%al 10d464: 75 06 jne 10d46c <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d466: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d46a: 74 68 je 10d4d4 <_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 ) ) 10d46c: 3b 1d 60 74 12 00 cmp 0x127460,%ebx 10d472: 74 74 je 10d4e8 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d474: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d47b: 00 00 00 if ( the_thread->Start.fp_context ) 10d47e: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d484: 85 c0 test %eax,%eax 10d486: 74 0c je 10d494 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d488: 83 ec 0c sub $0xc,%esp 10d48b: 50 push %eax 10d48c: e8 a7 14 00 00 call 10e938 <_Workspace_Free> 10d491: 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 ); 10d494: 83 ec 0c sub $0xc,%esp 10d497: 53 push %ebx 10d498: e8 3b 0d 00 00 call 10e1d8 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d49d: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d4a4: 00 00 00 if ( the_thread->extensions ) 10d4a7: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d4ad: 83 c4 10 add $0x10,%esp 10d4b0: 85 c0 test %eax,%eax 10d4b2: 74 0c je 10d4c0 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d4b4: 83 ec 0c sub $0xc,%esp 10d4b7: 50 push %eax 10d4b8: e8 7b 14 00 00 call 10e938 <_Workspace_Free> 10d4bd: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d4c0: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d4c7: 00 00 00 } 10d4ca: 8d 65 f8 lea -0x8(%ebp),%esp 10d4cd: 5b pop %ebx 10d4ce: 5e pop %esi 10d4cf: c9 leave 10d4d0: c3 ret 10d4d1: 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 ); 10d4d4: 83 ec 0c sub $0xc,%esp 10d4d7: 8d 43 48 lea 0x48(%ebx),%eax 10d4da: 50 push %eax 10d4db: e8 14 13 00 00 call 10e7f4 <_Watchdog_Remove> 10d4e0: 83 c4 10 add $0x10,%esp 10d4e3: eb 87 jmp 10d46c <_Thread_Close+0x60> 10d4e5: 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; 10d4e8: c7 05 60 74 12 00 00 movl $0x0,0x127460 10d4ef: 00 00 00 10d4f2: eb 80 jmp 10d474 <_Thread_Close+0x68> =============================================================================== 0010d588 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d588: 55 push %ebp 10d589: 89 e5 mov %esp,%ebp 10d58b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d58e: 8d 45 f4 lea -0xc(%ebp),%eax 10d591: 50 push %eax 10d592: ff 75 08 pushl 0x8(%ebp) 10d595: e8 c6 01 00 00 call 10d760 <_Thread_Get> switch ( location ) { 10d59a: 83 c4 10 add $0x10,%esp 10d59d: 8b 55 f4 mov -0xc(%ebp),%edx 10d5a0: 85 d2 test %edx,%edx 10d5a2: 75 1c jne 10d5c0 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d5a4: 83 ec 08 sub $0x8,%esp 10d5a7: 68 18 00 00 10 push $0x10000018 10d5ac: 50 push %eax 10d5ad: e8 c6 fd ff ff call 10d378 <_Thread_Clear_state> 10d5b2: a1 d4 73 12 00 mov 0x1273d4,%eax 10d5b7: 48 dec %eax 10d5b8: a3 d4 73 12 00 mov %eax,0x1273d4 10d5bd: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d5c0: c9 leave 10d5c1: c3 ret =============================================================================== 0010d5c4 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d5c4: 55 push %ebp 10d5c5: 89 e5 mov %esp,%ebp 10d5c7: 57 push %edi 10d5c8: 56 push %esi 10d5c9: 53 push %ebx 10d5ca: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d5cd: 8b 1d 98 79 12 00 mov 0x127998,%ebx _ISR_Disable( level ); 10d5d3: 9c pushf 10d5d4: fa cli 10d5d5: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d5d6: 8a 15 a4 79 12 00 mov 0x1279a4,%dl 10d5dc: 84 d2 test %dl,%dl 10d5de: 0f 84 3c 01 00 00 je 10d720 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d5e4: 8b 35 9c 79 12 00 mov 0x12799c,%esi _Thread_Dispatch_disable_level = 1; 10d5ea: c7 05 d4 73 12 00 01 movl $0x1,0x1273d4 10d5f1: 00 00 00 _Context_Switch_necessary = false; 10d5f4: c6 05 a4 79 12 00 00 movb $0x0,0x1279a4 _Thread_Executing = heir; 10d5fb: 89 35 98 79 12 00 mov %esi,0x127998 /* * 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 ) 10d601: 39 f3 cmp %esi,%ebx 10d603: 0f 84 17 01 00 00 je 10d720 <_Thread_Dispatch+0x15c> 10d609: 8d 7d d8 lea -0x28(%ebp),%edi 10d60c: e9 f5 00 00 00 jmp 10d706 <_Thread_Dispatch+0x142> 10d611: 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 ); 10d614: 50 push %eax 10d615: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d616: 83 ec 0c sub $0xc,%esp 10d619: 8d 45 e0 lea -0x20(%ebp),%eax 10d61c: 50 push %eax 10d61d: e8 92 3b 00 00 call 1111b4 <_TOD_Get_uptime> _Timestamp_Subtract( 10d622: 83 c4 0c add $0xc,%esp 10d625: 57 push %edi 10d626: 8d 45 e0 lea -0x20(%ebp),%eax 10d629: 50 push %eax 10d62a: 68 90 74 12 00 push $0x127490 10d62f: e8 a8 0d 00 00 call 10e3dc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d634: 58 pop %eax 10d635: 5a pop %edx 10d636: 57 push %edi 10d637: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d63d: 50 push %eax 10d63e: e8 5d 0d 00 00 call 10e3a0 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d643: 8b 45 e0 mov -0x20(%ebp),%eax 10d646: 8b 55 e4 mov -0x1c(%ebp),%edx 10d649: a3 90 74 12 00 mov %eax,0x127490 10d64e: 89 15 94 74 12 00 mov %edx,0x127494 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d654: a1 64 74 12 00 mov 0x127464,%eax 10d659: 83 c4 10 add $0x10,%esp 10d65c: 85 c0 test %eax,%eax 10d65e: 74 10 je 10d670 <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d660: 8b 10 mov (%eax),%edx 10d662: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d668: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10d66e: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d670: 83 ec 08 sub $0x8,%esp 10d673: 56 push %esi 10d674: 53 push %ebx 10d675: e8 02 10 00 00 call 10e67c <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d67a: 5a pop %edx 10d67b: 59 pop %ecx 10d67c: 81 c6 d4 00 00 00 add $0xd4,%esi 10d682: 56 push %esi 10d683: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10d689: 50 push %eax 10d68a: e8 f1 12 00 00 call 10e980 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d68f: 83 c4 10 add $0x10,%esp 10d692: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d698: 85 c0 test %eax,%eax 10d69a: 74 36 je 10d6d2 <_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 ); 10d69c: a1 60 74 12 00 mov 0x127460,%eax 10d6a1: 39 c3 cmp %eax,%ebx 10d6a3: 74 2d je 10d6d2 <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d6a5: 85 c0 test %eax,%eax 10d6a7: 74 11 je 10d6ba <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d6a9: 83 ec 0c sub $0xc,%esp 10d6ac: 05 ec 00 00 00 add $0xec,%eax 10d6b1: 50 push %eax 10d6b2: e8 fd 12 00 00 call 10e9b4 <_CPU_Context_save_fp> 10d6b7: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d6ba: 83 ec 0c sub $0xc,%esp 10d6bd: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10d6c3: 50 push %eax 10d6c4: e8 f5 12 00 00 call 10e9be <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d6c9: 89 1d 60 74 12 00 mov %ebx,0x127460 10d6cf: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d6d2: 8b 1d 98 79 12 00 mov 0x127998,%ebx _ISR_Disable( level ); 10d6d8: 9c pushf 10d6d9: fa cli 10d6da: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d6db: 8a 15 a4 79 12 00 mov 0x1279a4,%dl 10d6e1: 84 d2 test %dl,%dl 10d6e3: 74 3b je 10d720 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d6e5: 8b 35 9c 79 12 00 mov 0x12799c,%esi _Thread_Dispatch_disable_level = 1; 10d6eb: c7 05 d4 73 12 00 01 movl $0x1,0x1273d4 10d6f2: 00 00 00 _Context_Switch_necessary = false; 10d6f5: c6 05 a4 79 12 00 00 movb $0x0,0x1279a4 _Thread_Executing = heir; 10d6fc: 89 35 98 79 12 00 mov %esi,0x127998 /* * 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 ) 10d702: 39 de cmp %ebx,%esi 10d704: 74 1a je 10d720 <_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 ) 10d706: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d70a: 0f 85 04 ff ff ff jne 10d614 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d710: 8b 15 a4 73 12 00 mov 0x1273a4,%edx 10d716: 89 56 78 mov %edx,0x78(%esi) 10d719: e9 f6 fe ff ff jmp 10d614 <_Thread_Dispatch+0x50> 10d71e: 66 90 xchg %ax,%ax <== NOT EXECUTED _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d720: c7 05 d4 73 12 00 00 movl $0x0,0x1273d4 10d727: 00 00 00 _ISR_Enable( level ); 10d72a: 50 push %eax 10d72b: 9d popf _API_extensions_Run_postswitch(); 10d72c: e8 1b e8 ff ff call 10bf4c <_API_extensions_Run_postswitch> } 10d731: 8d 65 f4 lea -0xc(%ebp),%esp 10d734: 5b pop %ebx 10d735: 5e pop %esi 10d736: 5f pop %edi 10d737: c9 leave 10d738: c3 ret =============================================================================== 0010d760 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d760: 55 push %ebp 10d761: 89 e5 mov %esp,%ebp 10d763: 53 push %ebx 10d764: 83 ec 04 sub $0x4,%esp 10d767: 8b 45 08 mov 0x8(%ebp),%eax 10d76a: 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 ) ) { 10d76d: 85 c0 test %eax,%eax 10d76f: 74 4b je 10d7bc <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10d771: 89 c2 mov %eax,%edx 10d773: c1 ea 18 shr $0x18,%edx 10d776: 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 ) 10d779: 8d 5a ff lea -0x1(%edx),%ebx 10d77c: 83 fb 02 cmp $0x2,%ebx 10d77f: 77 2b ja 10d7ac <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d781: 89 c3 mov %eax,%ebx 10d783: 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 :) */ 10d786: 4b dec %ebx 10d787: 75 23 jne 10d7ac <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d789: 8b 14 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%edx if ( !api_information ) { 10d790: 85 d2 test %edx,%edx 10d792: 74 18 je 10d7ac <_Thread_Get+0x4c> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d794: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d797: 85 d2 test %edx,%edx 10d799: 74 11 je 10d7ac <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d79b: 53 push %ebx 10d79c: 51 push %ecx 10d79d: 50 push %eax 10d79e: 52 push %edx 10d79f: e8 08 f7 ff ff call 10ceac <_Objects_Get> 10d7a4: 83 c4 10 add $0x10,%esp done: return tp; } 10d7a7: 8b 5d fc mov -0x4(%ebp),%ebx 10d7aa: c9 leave 10d7ab: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d7ac: 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; 10d7b2: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d7b4: 8b 5d fc mov -0x4(%ebp),%ebx 10d7b7: c9 leave 10d7b8: c3 ret 10d7b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d7bc: a1 d4 73 12 00 mov 0x1273d4,%eax 10d7c1: 40 inc %eax 10d7c2: a3 d4 73 12 00 mov %eax,0x1273d4 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; 10d7c7: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d7cd: a1 98 79 12 00 mov 0x127998,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d7d2: 8b 5d fc mov -0x4(%ebp),%ebx 10d7d5: c9 leave 10d7d6: c3 ret =============================================================================== 001131c4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 1131c4: 55 push %ebp 1131c5: 89 e5 mov %esp,%ebp 1131c7: 53 push %ebx 1131c8: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 1131cb: 8b 1d 98 79 12 00 mov 0x127998,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 1131d1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 1131d7: 85 c0 test %eax,%eax 1131d9: 74 79 je 113254 <_Thread_Handler+0x90> 1131db: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 1131dc: a0 4c 70 12 00 mov 0x12704c,%al 1131e1: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 1131e4: c6 05 4c 70 12 00 01 movb $0x1,0x12704c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 1131eb: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 1131f1: 85 c0 test %eax,%eax 1131f3: 74 24 je 113219 <_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 ); 1131f5: a1 60 74 12 00 mov 0x127460,%eax 1131fa: 39 c3 cmp %eax,%ebx 1131fc: 74 1b je 113219 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 1131fe: 85 c0 test %eax,%eax 113200: 74 11 je 113213 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 113202: 83 ec 0c sub $0xc,%esp 113205: 05 ec 00 00 00 add $0xec,%eax 11320a: 50 push %eax 11320b: e8 a4 b7 ff ff call 10e9b4 <_CPU_Context_save_fp> 113210: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 113213: 89 1d 60 74 12 00 mov %ebx,0x127460 /* * 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 ); 113219: 83 ec 0c sub $0xc,%esp 11321c: 53 push %ebx 11321d: e8 be b2 ff ff call 10e4e0 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 113222: e8 15 a5 ff ff call 10d73c <_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) */ { 113227: 83 c4 10 add $0x10,%esp 11322a: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11322e: 74 28 je 113258 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113230: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113236: 85 c0 test %eax,%eax 113238: 74 2d je 113267 <_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 ) { 11323a: 48 dec %eax 11323b: 74 43 je 113280 <_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 ); 11323d: 83 ec 0c sub $0xc,%esp 113240: 53 push %ebx 113241: e8 d6 b2 ff ff call 10e51c <_User_extensions_Thread_exitted> _Internal_error_Occurred( 113246: 83 c4 0c add $0xc,%esp 113249: 6a 05 push $0x5 11324b: 6a 01 push $0x1 11324d: 6a 00 push $0x0 11324f: e8 18 97 ff ff call 10c96c <_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); 113254: fb sti 113255: eb 85 jmp 1131dc <_Thread_Handler+0x18> 113257: 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 (); 113258: e8 83 c0 00 00 call 11f2e0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 11325d: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113263: 85 c0 test %eax,%eax 113265: 75 d3 jne 11323a <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 113267: 83 ec 0c sub $0xc,%esp 11326a: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 113270: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 113276: 89 43 28 mov %eax,0x28(%ebx) 113279: 83 c4 10 add $0x10,%esp 11327c: eb bf jmp 11323d <_Thread_Handler+0x79> 11327e: 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)( 113280: 83 ec 0c sub $0xc,%esp 113283: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 113289: 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 = 11328f: 89 43 28 mov %eax,0x28(%ebx) 113292: 83 c4 10 add $0x10,%esp 113295: eb a6 jmp 11323d <_Thread_Handler+0x79> =============================================================================== 0010d7d8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d7d8: 55 push %ebp 10d7d9: 89 e5 mov %esp,%ebp 10d7db: 57 push %edi 10d7dc: 56 push %esi 10d7dd: 53 push %ebx 10d7de: 83 ec 1c sub $0x1c,%esp 10d7e1: 8b 5d 0c mov 0xc(%ebp),%ebx 10d7e4: 8b 4d 10 mov 0x10(%ebp),%ecx 10d7e7: 8b 75 14 mov 0x14(%ebp),%esi 10d7ea: 8b 7d 1c mov 0x1c(%ebp),%edi 10d7ed: 8a 55 18 mov 0x18(%ebp),%dl 10d7f0: 8a 45 20 mov 0x20(%ebp),%al 10d7f3: 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; 10d7f6: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d7fd: 00 00 00 10d800: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d807: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d80a: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d811: 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 ) { 10d814: 85 c9 test %ecx,%ecx 10d816: 0f 84 e3 01 00 00 je 10d9ff <_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; 10d81c: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10d823: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d825: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10d82b: 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 ) { 10d831: 84 d2 test %dl,%dl 10d833: 0f 85 63 01 00 00 jne 10d99c <_Thread_Initialize+0x1c4> 10d839: 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; 10d83b: 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; 10d842: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10d848: 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; 10d84e: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d855: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d85c: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d863: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d86a: a1 70 74 12 00 mov 0x127470,%eax 10d86f: 85 c0 test %eax,%eax 10d871: 0f 85 45 01 00 00 jne 10d9bc <_Thread_Initialize+0x1e4> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d877: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d87e: 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; 10d881: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d883: 8a 45 e3 mov -0x1d(%ebp),%al 10d886: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d88c: 8b 45 24 mov 0x24(%ebp),%eax 10d88f: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d895: 8b 45 28 mov 0x28(%ebp),%eax 10d898: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10d89e: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10d8a2: 75 08 jne 10d8ac <_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; 10d8a4: a1 a4 73 12 00 mov 0x1273a4,%eax 10d8a9: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d8ac: 8b 45 2c mov 0x2c(%ebp),%eax 10d8af: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d8b5: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d8bc: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d8c3: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10d8ca: 89 7b 18 mov %edi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d8cd: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d8d3: 83 ec 08 sub $0x8,%esp 10d8d6: 57 push %edi 10d8d7: 53 push %ebx 10d8d8: e8 d3 06 00 00 call 10dfb0 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d8dd: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d8e4: 00 00 00 10d8e7: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d8ee: 00 00 00 _Thread_Stack_Free( the_thread ); return false; } 10d8f1: 8b 45 08 mov 0x8(%ebp),%eax 10d8f4: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d8f7: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d8fb: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d8fe: 8b 45 30 mov 0x30(%ebp),%eax 10d901: 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 ); 10d904: 89 1c 24 mov %ebx,(%esp) 10d907: e8 9c 0c 00 00 call 10e5a8 <_User_extensions_Thread_create> if ( extension_status ) 10d90c: 83 c4 10 add $0x10,%esp 10d90f: 84 c0 test %al,%al 10d911: 75 7d jne 10d990 <_Thread_Initialize+0x1b8> return true; failed: if ( the_thread->libc_reent ) 10d913: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d919: 85 c0 test %eax,%eax 10d91b: 74 0c je 10d929 <_Thread_Initialize+0x151> _Workspace_Free( the_thread->libc_reent ); 10d91d: 83 ec 0c sub $0xc,%esp 10d920: 50 push %eax 10d921: e8 12 10 00 00 call 10e938 <_Workspace_Free> 10d926: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d929: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10d92f: 85 c0 test %eax,%eax 10d931: 74 0c je 10d93f <_Thread_Initialize+0x167> _Workspace_Free( the_thread->API_Extensions[i] ); 10d933: 83 ec 0c sub $0xc,%esp 10d936: 50 push %eax 10d937: e8 fc 0f 00 00 call 10e938 <_Workspace_Free> 10d93c: 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] ) 10d93f: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10d945: 85 c0 test %eax,%eax 10d947: 74 0c je 10d955 <_Thread_Initialize+0x17d> _Workspace_Free( the_thread->API_Extensions[i] ); 10d949: 83 ec 0c sub $0xc,%esp 10d94c: 50 push %eax 10d94d: e8 e6 0f 00 00 call 10e938 <_Workspace_Free> 10d952: 83 c4 10 add $0x10,%esp if ( extensions_area ) 10d955: 85 f6 test %esi,%esi 10d957: 74 0c je 10d965 <_Thread_Initialize+0x18d> (void) _Workspace_Free( extensions_area ); 10d959: 83 ec 0c sub $0xc,%esp 10d95c: 56 push %esi 10d95d: e8 d6 0f 00 00 call 10e938 <_Workspace_Free> 10d962: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d965: 8b 45 e4 mov -0x1c(%ebp),%eax 10d968: 85 c0 test %eax,%eax 10d96a: 74 0e je 10d97a <_Thread_Initialize+0x1a2> (void) _Workspace_Free( fp_area ); 10d96c: 83 ec 0c sub $0xc,%esp 10d96f: ff 75 e4 pushl -0x1c(%ebp) 10d972: e8 c1 0f 00 00 call 10e938 <_Workspace_Free> 10d977: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d97a: 83 ec 0c sub $0xc,%esp 10d97d: 53 push %ebx 10d97e: e8 55 08 00 00 call 10e1d8 <_Thread_Stack_Free> return false; 10d983: 83 c4 10 add $0x10,%esp 10d986: 31 c0 xor %eax,%eax } 10d988: 8d 65 f4 lea -0xc(%ebp),%esp 10d98b: 5b pop %ebx 10d98c: 5e pop %esi 10d98d: 5f pop %edi 10d98e: c9 leave 10d98f: 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; 10d990: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d992: 8d 65 f4 lea -0xc(%ebp),%esp 10d995: 5b pop %ebx 10d996: 5e pop %esi 10d997: 5f pop %edi 10d998: c9 leave 10d999: c3 ret 10d99a: 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 ); 10d99c: 83 ec 0c sub $0xc,%esp 10d99f: 6a 6c push $0x6c 10d9a1: e8 76 0f 00 00 call 10e91c <_Workspace_Allocate> 10d9a6: 89 45 e4 mov %eax,-0x1c(%ebp) if ( !fp_area ) 10d9a9: 83 c4 10 add $0x10,%esp 10d9ac: 85 c0 test %eax,%eax 10d9ae: 0f 85 8e fe ff ff jne 10d842 <_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; 10d9b4: 31 f6 xor %esi,%esi 10d9b6: e9 58 ff ff ff jmp 10d913 <_Thread_Initialize+0x13b> 10d9bb: 90 nop <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d9bc: 83 ec 0c sub $0xc,%esp 10d9bf: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d9c6: 50 push %eax 10d9c7: e8 50 0f 00 00 call 10e91c <_Workspace_Allocate> 10d9cc: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d9ce: 83 c4 10 add $0x10,%esp 10d9d1: 85 c0 test %eax,%eax 10d9d3: 0f 84 3a ff ff ff je 10d913 <_Thread_Initialize+0x13b> goto failed; } the_thread->extensions = (void **) extensions_area; 10d9d9: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx) 10d9df: 8b 0d 70 74 12 00 mov 0x127470,%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++ ) 10d9e5: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d9e7: 31 c0 xor %eax,%eax 10d9e9: 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; 10d9ec: 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++ ) 10d9f3: 40 inc %eax 10d9f4: 89 c2 mov %eax,%edx 10d9f6: 39 c1 cmp %eax,%ecx 10d9f8: 73 f2 jae 10d9ec <_Thread_Initialize+0x214> 10d9fa: e9 84 fe ff ff jmp 10d883 <_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 ); 10d9ff: 83 ec 08 sub $0x8,%esp 10da02: 56 push %esi 10da03: 53 push %ebx 10da04: 88 55 dc mov %dl,-0x24(%ebp) 10da07: e8 68 07 00 00 call 10e174 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10da0c: 83 c4 10 add $0x10,%esp 10da0f: 85 c0 test %eax,%eax 10da11: 8a 55 dc mov -0x24(%ebp),%dl 10da14: 74 16 je 10da2c <_Thread_Initialize+0x254> 10da16: 39 c6 cmp %eax,%esi 10da18: 77 12 ja 10da2c <_Thread_Initialize+0x254><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10da1a: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10da20: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10da27: e9 f9 fd ff ff jmp 10d825 <_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 */ 10da2c: 31 c0 xor %eax,%eax 10da2e: e9 55 ff ff ff jmp 10d988 <_Thread_Initialize+0x1b0> =============================================================================== 001124b8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 1124b8: 55 push %ebp 1124b9: 89 e5 mov %esp,%ebp 1124bb: 53 push %ebx 1124bc: 83 ec 10 sub $0x10,%esp 1124bf: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 1124c2: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 1124c9: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 1124cf: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 1124d2: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 1124d8: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 1124db: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 1124e1: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 1124e7: 8b 45 0c mov 0xc(%ebp),%eax 1124ea: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 1124f0: 8b 45 10 mov 0x10(%ebp),%eax 1124f3: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 1124f9: 53 push %ebx 1124fa: e8 7d c4 ff ff call 10e97c <_Thread_queue_Extract_with_proxy> 1124ff: 83 c4 10 add $0x10,%esp 112502: 84 c0 test %al,%al 112504: 75 06 jne 11250c <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 112506: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11250a: 74 28 je 112534 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 11250c: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 112512: 39 43 14 cmp %eax,0x14(%ebx) 112515: 74 15 je 11252c <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 112517: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 11251a: 89 45 0c mov %eax,0xc(%ebp) 11251d: 89 5d 08 mov %ebx,0x8(%ebp) } } 112520: 8b 5d fc mov -0x4(%ebp),%ebx 112523: 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 ); 112524: e9 2f c6 ff ff jmp 10eb58 <_Thread_Set_priority> 112529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 11252c: 8b 5d fc mov -0x4(%ebp),%ebx 11252f: c9 leave 112530: c3 ret 112531: 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 ); 112534: 83 ec 0c sub $0xc,%esp 112537: 8d 43 48 lea 0x48(%ebx),%eax 11253a: 50 push %eax 11253b: e8 9c ce ff ff call 10f3dc <_Watchdog_Remove> 112540: 83 c4 10 add $0x10,%esp 112543: eb c7 jmp 11250c <_Thread_Reset+0x54> =============================================================================== 0010ead0 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10ead0: 55 push %ebp 10ead1: 89 e5 mov %esp,%ebp 10ead3: 53 push %ebx 10ead4: 83 ec 04 sub $0x4,%esp 10ead7: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10eada: f6 43 10 01 testb $0x1,0x10(%ebx) 10eade: 74 08 je 10eae8 <_Thread_Restart+0x18> _Thread_Restart_self(); return true; } return false; 10eae0: 31 c0 xor %eax,%eax } 10eae2: 8b 5d fc mov -0x4(%ebp),%ebx 10eae5: c9 leave 10eae6: c3 ret 10eae7: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10eae8: 83 ec 0c sub $0xc,%esp 10eaeb: 53 push %ebx 10eaec: e8 b3 01 00 00 call 10eca4 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10eaf1: 83 c4 0c add $0xc,%esp 10eaf4: ff 75 10 pushl 0x10(%ebp) 10eaf7: ff 75 0c pushl 0xc(%ebp) 10eafa: 53 push %ebx 10eafb: e8 b8 39 00 00 call 1124b8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10eb00: 89 1c 24 mov %ebx,(%esp) 10eb03: e8 98 36 00 00 call 1121a0 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10eb08: 89 1c 24 mov %ebx,(%esp) 10eb0b: e8 04 39 00 00 call 112414 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10eb10: 89 1c 24 mov %ebx,(%esp) 10eb13: e8 cc 06 00 00 call 10f1e4 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10eb18: 83 c4 10 add $0x10,%esp 10eb1b: 3b 1d d8 9e 12 00 cmp 0x129ed8,%ebx 10eb21: 74 07 je 10eb2a <_Thread_Restart+0x5a> _Thread_Restart_self(); return true; 10eb23: b0 01 mov $0x1,%al } return false; } 10eb25: 8b 5d fc mov -0x4(%ebp),%ebx 10eb28: c9 leave 10eb29: 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 ) 10eb2a: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10eb31: 74 12 je 10eb45 <_Thread_Restart+0x75> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10eb33: 83 ec 0c sub $0xc,%esp 10eb36: 81 c3 ec 00 00 00 add $0xec,%ebx 10eb3c: 53 push %ebx 10eb3d: e8 6c 0a 00 00 call 10f5ae <_CPU_Context_restore_fp> 10eb42: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10eb45: 83 ec 0c sub $0xc,%esp 10eb48: a1 d8 9e 12 00 mov 0x129ed8,%eax 10eb4d: 05 d4 00 00 00 add $0xd4,%eax 10eb52: 50 push %eax 10eb53: e8 45 0a 00 00 call 10f59d <_CPU_Context_restore> =============================================================================== 001112d4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 1112d4: 55 push %ebp 1112d5: 89 e5 mov %esp,%ebp 1112d7: 53 push %ebx 1112d8: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 1112db: 9c pushf 1112dc: fa cli 1112dd: 59 pop %ecx current_state = the_thread->current_state; 1112de: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 1112e1: f6 c2 02 test $0x2,%dl 1112e4: 74 6e je 111354 <_Thread_Resume+0x80> <== NEVER TAKEN 1112e6: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 1112e9: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 1112ec: 85 d2 test %edx,%edx 1112ee: 75 64 jne 111354 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 1112f0: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 1112f6: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 1112fd: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111300: 66 8b 15 e0 b0 12 00 mov 0x12b0e0,%dx 111307: 0b 90 94 00 00 00 or 0x94(%eax),%edx 11130d: 66 89 15 e0 b0 12 00 mov %dx,0x12b0e0 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111314: 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; 11131a: 8d 5a 04 lea 0x4(%edx),%ebx 11131d: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 11131f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111322: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111325: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111327: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 11132a: 51 push %ecx 11132b: 9d popf 11132c: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 11132d: 8b 50 14 mov 0x14(%eax),%edx 111330: 8b 1d fc b5 12 00 mov 0x12b5fc,%ebx 111336: 3b 53 14 cmp 0x14(%ebx),%edx 111339: 73 19 jae 111354 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 11133b: a3 fc b5 12 00 mov %eax,0x12b5fc if ( _Thread_Executing->is_preemptible || 111340: a1 f8 b5 12 00 mov 0x12b5f8,%eax 111345: 80 78 74 00 cmpb $0x0,0x74(%eax) 111349: 74 11 je 11135c <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 11134b: c6 05 04 b6 12 00 01 movb $0x1,0x12b604 111352: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 111354: 51 push %ecx 111355: 9d popf } 111356: 5b pop %ebx 111357: c9 leave 111358: c3 ret 111359: 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 || 11135c: 85 d2 test %edx,%edx 11135e: 74 eb je 11134b <_Thread_Resume+0x77> <== NEVER TAKEN 111360: eb f2 jmp 111354 <_Thread_Resume+0x80> =============================================================================== 0010e01c <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10e01c: 55 push %ebp 10e01d: 89 e5 mov %esp,%ebp 10e01f: 56 push %esi 10e020: 53 push %ebx 10e021: 8b 45 08 mov 0x8(%ebp),%eax 10e024: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10e027: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e02d: 9c pushf 10e02e: fa cli 10e02f: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10e030: 8b 58 10 mov 0x10(%eax),%ebx 10e033: 85 db test %ebx,%ebx 10e035: 75 2d jne 10e064 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10e037: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10e03a: 8b 5a 08 mov 0x8(%edx),%ebx 10e03d: 39 1a cmp %ebx,(%edx) 10e03f: 74 3b je 10e07c <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e041: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10e043: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10e046: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10e049: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10e04b: 51 push %ecx 10e04c: 9d popf 10e04d: fa cli if ( _Thread_Is_heir( the_thread ) ) 10e04e: 3b 05 9c 79 12 00 cmp 0x12799c,%eax 10e054: 74 66 je 10e0bc <_Thread_Set_state+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10e056: 3b 05 98 79 12 00 cmp 0x127998,%eax 10e05c: 74 12 je 10e070 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10e05e: 51 push %ecx 10e05f: 9d popf } 10e060: 5b pop %ebx 10e061: 5e pop %esi 10e062: c9 leave 10e063: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Set ( States_Control states_to_set, States_Control current_state ) { return (current_state | states_to_set); 10e064: 09 f3 or %esi,%ebx 10e066: 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 ); 10e069: 51 push %ecx 10e06a: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e06b: 5b pop %ebx 10e06c: 5e pop %esi 10e06d: c9 leave 10e06e: c3 ret 10e06f: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10e070: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4 10e077: eb e5 jmp 10e05e <_Thread_Set_state+0x42> 10e079: 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; 10e07c: 8d 5a 04 lea 0x4(%edx),%ebx 10e07f: 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; 10e081: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10e088: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e08b: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 10e091: 66 8b 13 mov (%ebx),%dx 10e094: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10e09b: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10e09e: 66 85 d2 test %dx,%dx 10e0a1: 75 a8 jne 10e04b <_Thread_Set_state+0x2f> _Priority_Major_bit_map &= the_priority_map->block_major; 10e0a3: 66 8b 15 80 74 12 00 mov 0x127480,%dx 10e0aa: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e0b0: 66 89 15 80 74 12 00 mov %dx,0x127480 10e0b7: eb 92 jmp 10e04b <_Thread_Set_state+0x2f> 10e0b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10e0bc: 66 8b 35 80 74 12 00 mov 0x127480,%si 10e0c3: 31 d2 xor %edx,%edx 10e0c5: 89 d3 mov %edx,%ebx 10e0c7: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e0cb: 0f b7 db movzwl %bx,%ebx 10e0ce: 66 8b b4 1b 00 75 12 mov 0x127500(%ebx,%ebx,1),%si 10e0d5: 00 10e0d6: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 10e0da: c1 e3 04 shl $0x4,%ebx 10e0dd: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 10e0e0: 8d 14 13 lea (%ebx,%edx,1),%edx 10e0e3: 8d 14 52 lea (%edx,%edx,2),%edx 10e0e6: c1 e2 02 shl $0x2,%edx 10e0e9: 03 15 a0 73 12 00 add 0x1273a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e0ef: 8b 12 mov (%edx),%edx 10e0f1: 89 15 9c 79 12 00 mov %edx,0x12799c 10e0f7: e9 5a ff ff ff jmp 10e056 <_Thread_Set_state+0x3a> =============================================================================== 0010e0fc <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10e0fc: 55 push %ebp 10e0fd: 89 e5 mov %esp,%ebp 10e0ff: 56 push %esi 10e100: 53 push %ebx 10e101: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10e104: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10e10a: 9c pushf 10e10b: fa cli 10e10c: 5b pop %ebx old_state = the_thread->current_state; 10e10d: 8b 50 10 mov 0x10(%eax),%edx 10e110: 89 d6 mov %edx,%esi 10e112: 83 ce 04 or $0x4,%esi 10e115: 89 70 10 mov %esi,0x10(%eax) the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { 10e118: 85 d2 test %edx,%edx 10e11a: 75 11 jne 10e12d <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10e11c: 8b 51 08 mov 0x8(%ecx),%edx 10e11f: 39 11 cmp %edx,(%ecx) 10e121: 74 11 je 10e134 <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e123: 8b 10 mov (%eax),%edx previous = the_node->previous; 10e125: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10e128: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10e12b: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10e12d: 53 push %ebx 10e12e: 9d popf } 10e12f: 5b pop %ebx 10e130: 5e pop %esi 10e131: c9 leave 10e132: c3 ret 10e133: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e134: 8d 51 04 lea 0x4(%ecx),%edx 10e137: 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; 10e139: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10e140: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e143: 8b 88 90 00 00 00 mov 0x90(%eax),%ecx 10e149: 66 8b 11 mov (%ecx),%dx 10e14c: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10e153: 66 89 11 mov %dx,(%ecx) if ( *the_priority_map->minor == 0 ) 10e156: 66 85 d2 test %dx,%dx 10e159: 75 d2 jne 10e12d <_Thread_Set_transient+0x31> _Priority_Major_bit_map &= the_priority_map->block_major; 10e15b: 66 8b 15 80 74 12 00 mov 0x127480,%dx 10e162: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e168: 66 89 15 80 74 12 00 mov %dx,0x127480 10e16f: eb bc jmp 10e12d <_Thread_Set_transient+0x31> =============================================================================== 0010e174 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e174: 55 push %ebp 10e175: 89 e5 mov %esp,%ebp 10e177: 53 push %ebx 10e178: 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; 10e17b: a1 10 32 12 00 mov 0x123210,%eax 10e180: 8b 5d 0c mov 0xc(%ebp),%ebx 10e183: 39 c3 cmp %eax,%ebx 10e185: 73 02 jae 10e189 <_Thread_Stack_Allocate+0x15> 10e187: 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 ) { 10e189: a1 40 32 12 00 mov 0x123240,%eax 10e18e: 85 c0 test %eax,%eax 10e190: 74 32 je 10e1c4 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e192: 83 ec 0c sub $0xc,%esp 10e195: 53 push %ebx 10e196: ff d0 call *%eax 10e198: 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 ) 10e19b: 85 c0 test %eax,%eax 10e19d: 74 11 je 10e1b0 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e19f: 8b 55 08 mov 0x8(%ebp),%edx 10e1a2: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e1a8: 89 d8 mov %ebx,%eax 10e1aa: 8b 5d fc mov -0x4(%ebp),%ebx 10e1ad: c9 leave 10e1ae: c3 ret 10e1af: 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; 10e1b0: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10e1b2: 8b 55 08 mov 0x8(%ebp),%edx 10e1b5: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e1bb: 89 d8 mov %ebx,%eax 10e1bd: 8b 5d fc mov -0x4(%ebp),%ebx 10e1c0: c9 leave 10e1c1: c3 ret 10e1c2: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e1c4: 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 ); 10e1c7: 83 ec 0c sub $0xc,%esp 10e1ca: 53 push %ebx 10e1cb: e8 4c 07 00 00 call 10e91c <_Workspace_Allocate> 10e1d0: 83 c4 10 add $0x10,%esp 10e1d3: eb c6 jmp 10e19b <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e1d8 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e1d8: 55 push %ebp 10e1d9: 89 e5 mov %esp,%ebp 10e1db: 83 ec 08 sub $0x8,%esp 10e1de: 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 ) 10e1e1: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10e1e8: 74 16 je 10e200 <_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 ) 10e1ea: 8b 15 44 32 12 00 mov 0x123244,%edx 10e1f0: 85 d2 test %edx,%edx 10e1f2: 74 10 je 10e204 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e1f4: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e1fa: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e1fd: 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 ); 10e1fe: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e200: c9 leave 10e201: c3 ret 10e202: 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 ); 10e204: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e20a: 89 45 08 mov %eax,0x8(%ebp) } 10e20d: 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 ); 10e20e: e9 25 07 00 00 jmp 10e938 <_Workspace_Free> =============================================================================== 0010e270 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e270: 55 push %ebp 10e271: 89 e5 mov %esp,%ebp 10e273: 53 push %ebx 10e274: 83 ec 04 sub $0x4,%esp 10e277: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e27a: f6 43 10 01 testb $0x1,0x10(%ebx) 10e27e: 75 08 jne 10e288 <_Thread_Start+0x18> _User_extensions_Thread_start( the_thread ); return true; } return false; 10e280: 31 c0 xor %eax,%eax } 10e282: 8b 5d fc mov -0x4(%ebp),%ebx 10e285: c9 leave 10e286: c3 ret 10e287: 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; 10e288: 8b 45 10 mov 0x10(%ebp),%eax 10e28b: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e291: 8b 45 0c mov 0xc(%ebp),%eax 10e294: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e29a: 8b 45 14 mov 0x14(%ebp),%eax 10e29d: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e2a3: 8b 45 18 mov 0x18(%ebp),%eax 10e2a6: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e2ac: 83 ec 0c sub $0xc,%esp 10e2af: 53 push %ebx 10e2b0: e8 73 32 00 00 call 111528 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e2b5: 89 1c 24 mov %ebx,(%esp) 10e2b8: e8 df 34 00 00 call 11179c <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e2bd: 89 1c 24 mov %ebx,(%esp) 10e2c0: e8 77 03 00 00 call 10e63c <_User_extensions_Thread_start> return true; 10e2c5: 83 c4 10 add $0x10,%esp 10e2c8: b0 01 mov $0x1,%al } return false; } 10e2ca: 8b 5d fc mov -0x4(%ebp),%ebx 10e2cd: c9 leave 10e2ce: c3 ret =============================================================================== 00111840 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111840: 55 push %ebp 111841: 89 e5 mov %esp,%ebp 111843: 56 push %esi 111844: 53 push %ebx 111845: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111848: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 11184e: 9c pushf 11184f: fa cli 111850: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 111851: 8b 58 10 mov 0x10(%eax),%ebx 111854: 85 db test %ebx,%ebx 111856: 75 34 jne 11188c <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111858: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 11185f: 8b 5a 08 mov 0x8(%edx),%ebx 111862: 39 1a cmp %ebx,(%edx) 111864: 74 3e je 1118a4 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111866: 8b 18 mov (%eax),%ebx previous = the_node->previous; 111868: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11186b: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 11186e: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 111870: 51 push %ecx 111871: 9d popf 111872: fa cli if ( _Thread_Is_heir( the_thread ) ) 111873: 3b 05 9c 79 12 00 cmp 0x12799c,%eax 111879: 74 69 je 1118e4 <_Thread_Suspend+0xa4> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 11187b: 3b 05 98 79 12 00 cmp 0x127998,%eax 111881: 74 15 je 111898 <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 111883: 51 push %ecx 111884: 9d popf } 111885: 5b pop %ebx 111886: 5e pop %esi 111887: c9 leave 111888: c3 ret 111889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 11188c: 83 cb 02 or $0x2,%ebx 11188f: 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 ); 111892: 51 push %ecx 111893: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 111894: 5b pop %ebx 111895: 5e pop %esi 111896: c9 leave 111897: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 111898: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4 11189f: eb e2 jmp 111883 <_Thread_Suspend+0x43> 1118a1: 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; 1118a4: 8d 5a 04 lea 0x4(%edx),%ebx 1118a7: 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; 1118a9: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 1118b0: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 1118b3: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 1118b9: 66 8b 13 mov (%ebx),%dx 1118bc: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 1118c3: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 1118c6: 66 85 d2 test %dx,%dx 1118c9: 75 a5 jne 111870 <_Thread_Suspend+0x30> _Priority_Major_bit_map &= the_priority_map->block_major; 1118cb: 66 8b 15 80 74 12 00 mov 0x127480,%dx 1118d2: 23 90 98 00 00 00 and 0x98(%eax),%edx 1118d8: 66 89 15 80 74 12 00 mov %dx,0x127480 1118df: eb 8f jmp 111870 <_Thread_Suspend+0x30> 1118e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 1118e4: 66 8b 35 80 74 12 00 mov 0x127480,%si 1118eb: 31 d2 xor %edx,%edx 1118ed: 89 d3 mov %edx,%ebx 1118ef: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 1118f3: 0f b7 db movzwl %bx,%ebx 1118f6: 66 8b b4 1b 00 75 12 mov 0x127500(%ebx,%ebx,1),%si 1118fd: 00 1118fe: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 111902: c1 e3 04 shl $0x4,%ebx 111905: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 111908: 8d 14 13 lea (%ebx,%edx,1),%edx 11190b: 8d 14 52 lea (%edx,%edx,2),%edx 11190e: c1 e2 02 shl $0x2,%edx 111911: 03 15 a0 73 12 00 add 0x1273a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 111917: 8b 12 mov (%edx),%edx 111919: 89 15 9c 79 12 00 mov %edx,0x12799c 11191f: e9 57 ff ff ff jmp 11187b <_Thread_Suspend+0x3b> =============================================================================== 0010e2d0 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e2d0: 55 push %ebp 10e2d1: 89 e5 mov %esp,%ebp 10e2d3: 53 push %ebx 10e2d4: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e2d7: 8b 1d 98 79 12 00 mov 0x127998,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e2dd: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10e2e1: 74 19 je 10e2fc <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e2e3: 8b 43 10 mov 0x10(%ebx),%eax 10e2e6: 85 c0 test %eax,%eax 10e2e8: 75 12 jne 10e2fc <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e2ea: 8b 43 7c mov 0x7c(%ebx),%eax 10e2ed: 83 f8 01 cmp $0x1,%eax 10e2f0: 72 0a jb 10e2fc <_Thread_Tickle_timeslice+0x2c> 10e2f2: 83 f8 02 cmp $0x2,%eax 10e2f5: 76 29 jbe 10e320 <_Thread_Tickle_timeslice+0x50> 10e2f7: 83 f8 03 cmp $0x3,%eax 10e2fa: 74 08 je 10e304 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e2fc: 8b 5d fc mov -0x4(%ebp),%ebx 10e2ff: c9 leave 10e300: c3 ret 10e301: 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 ) 10e304: 8b 43 78 mov 0x78(%ebx),%eax 10e307: 48 dec %eax 10e308: 89 43 78 mov %eax,0x78(%ebx) 10e30b: 85 c0 test %eax,%eax 10e30d: 75 ed jne 10e2fc <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e30f: 83 ec 0c sub $0xc,%esp 10e312: 53 push %ebx 10e313: ff 93 80 00 00 00 call *0x80(%ebx) 10e319: 83 c4 10 add $0x10,%esp 10e31c: eb de jmp 10e2fc <_Thread_Tickle_timeslice+0x2c> 10e31e: 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 ) { 10e320: 8b 43 78 mov 0x78(%ebx),%eax 10e323: 48 dec %eax 10e324: 89 43 78 mov %eax,0x78(%ebx) 10e327: 85 c0 test %eax,%eax 10e329: 7f d1 jg 10e2fc <_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(); 10e32b: e8 0c 00 00 00 call 10e33c <_Thread_Yield_processor> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e330: a1 a4 73 12 00 mov 0x1273a4,%eax 10e335: 89 43 78 mov %eax,0x78(%ebx) 10e338: eb c2 jmp 10e2fc <_Thread_Tickle_timeslice+0x2c> =============================================================================== 0010e33c <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e33c: 55 push %ebp 10e33d: 89 e5 mov %esp,%ebp 10e33f: 57 push %edi 10e340: 56 push %esi 10e341: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e342: a1 98 79 12 00 mov 0x127998,%eax ready = executing->ready; 10e347: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e34d: 9c pushf 10e34e: fa cli 10e34f: 5b pop %ebx } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e350: 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 ) ) { 10e353: 39 0a cmp %ecx,(%edx) 10e355: 74 3d je 10e394 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e357: 8b 38 mov (%eax),%edi previous = the_node->previous; 10e359: 8b 70 04 mov 0x4(%eax),%esi next->previous = previous; 10e35c: 89 77 04 mov %esi,0x4(%edi) previous->next = next; 10e35f: 89 3e mov %edi,(%esi) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e361: 8d 72 04 lea 0x4(%edx),%esi 10e364: 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; 10e366: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e369: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e36b: 89 48 04 mov %ecx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e36e: 53 push %ebx 10e36f: 9d popf 10e370: fa cli if ( _Thread_Is_heir( executing ) ) 10e371: 3b 05 9c 79 12 00 cmp 0x12799c,%eax 10e377: 74 0f je 10e388 <_Thread_Yield_processor+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e379: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4 _ISR_Enable( level ); 10e380: 53 push %ebx 10e381: 9d popf } 10e382: 5b pop %ebx 10e383: 5e pop %esi 10e384: 5f pop %edi 10e385: c9 leave 10e386: c3 ret 10e387: 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; 10e388: 8b 02 mov (%edx),%eax 10e38a: a3 9c 79 12 00 mov %eax,0x12799c 10e38f: eb e8 jmp 10e379 <_Thread_Yield_processor+0x3d> 10e391: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e394: 3b 05 9c 79 12 00 cmp 0x12799c,%eax 10e39a: 75 dd jne 10e379 <_Thread_Yield_processor+0x3d> 10e39c: eb e2 jmp 10e380 <_Thread_Yield_processor+0x44> =============================================================================== 0010d1ec <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10d1ec: 55 push %ebp 10d1ed: 89 e5 mov %esp,%ebp 10d1ef: 53 push %ebx 10d1f0: 83 ec 04 sub $0x4,%esp 10d1f3: 8b 5d 0c mov 0xc(%ebp),%ebx 10d1f6: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10d1f9: 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 ) ) { 10d200: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d204: 74 16 je 10d21c <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10d206: 50 push %eax 10d207: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d208: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10d20f: 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 } 10d212: 8b 5d fc mov -0x4(%ebp),%ebx 10d215: c9 leave 10d216: e9 5d 01 00 00 jmp 10d378 <_Thread_Clear_state> 10d21b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d21c: 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 ); 10d223: 50 push %eax 10d224: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d225: 83 ec 0c sub $0xc,%esp 10d228: 8d 43 48 lea 0x48(%ebx),%eax 10d22b: 50 push %eax 10d22c: e8 c3 15 00 00 call 10e7f4 <_Watchdog_Remove> 10d231: 83 c4 10 add $0x10,%esp 10d234: eb d2 jmp 10d208 <_Thread_blocking_operation_Cancel+0x1c> =============================================================================== 0010db04 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10db04: 55 push %ebp 10db05: 89 e5 mov %esp,%ebp 10db07: 53 push %ebx 10db08: 83 ec 04 sub $0x4,%esp 10db0b: 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 ) 10db0e: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10db12: 74 1c je 10db30 <_Thread_queue_Dequeue+0x2c> dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; 10db14: b8 b4 15 11 00 mov $0x1115b4,%eax the_thread = (*dequeue_p)( the_thread_queue ); 10db19: 83 ec 0c sub $0xc,%esp 10db1c: 53 push %ebx 10db1d: ff d0 call *%eax _ISR_Disable( level ); 10db1f: 9c pushf 10db20: fa cli 10db21: 5a pop %edx if ( !the_thread ) { 10db22: 83 c4 10 add $0x10,%esp 10db25: 85 c0 test %eax,%eax 10db27: 74 0f je 10db38 <_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 ); 10db29: 52 push %edx 10db2a: 9d popf return the_thread; } 10db2b: 8b 5d fc mov -0x4(%ebp),%ebx 10db2e: c9 leave 10db2f: 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; 10db30: b8 50 db 10 00 mov $0x10db50,%eax 10db35: eb e2 jmp 10db19 <_Thread_queue_Dequeue+0x15> 10db37: 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) || 10db38: 8b 4b 30 mov 0x30(%ebx),%ecx 10db3b: 49 dec %ecx 10db3c: 83 f9 01 cmp $0x1,%ecx 10db3f: 77 e8 ja 10db29 <_Thread_queue_Dequeue+0x25> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10db41: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10db48: a1 98 79 12 00 mov 0x127998,%eax 10db4d: eb da jmp 10db29 <_Thread_queue_Dequeue+0x25> =============================================================================== 0010db50 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10db50: 55 push %ebp 10db51: 89 e5 mov %esp,%ebp 10db53: 57 push %edi 10db54: 56 push %esi 10db55: 53 push %ebx 10db56: 83 ec 2c sub $0x2c,%esp 10db59: 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 ); 10db5c: 9c pushf 10db5d: fa cli 10db5e: 58 pop %eax 10db5f: 89 f9 mov %edi,%ecx for( index=0 ; 10db61: 31 d2 xor %edx,%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10db63: 8b 19 mov (%ecx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10db65: 8d 34 52 lea (%edx,%edx,2),%esi 10db68: 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 ] ) ) { 10db6c: 39 f3 cmp %esi,%ebx 10db6e: 75 18 jne 10db88 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10db70: 42 inc %edx 10db71: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10db74: 83 fa 04 cmp $0x4,%edx 10db77: 75 ea jne 10db63 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10db79: 50 push %eax 10db7a: 9d popf return NULL; 10db7b: 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 ); } 10db7d: 89 f0 mov %esi,%eax 10db7f: 8d 65 f4 lea -0xc(%ebp),%esp 10db82: 5b pop %ebx 10db83: 5e pop %esi 10db84: 5f pop %edi 10db85: c9 leave 10db86: c3 ret 10db87: 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 *) 10db88: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10db8a: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10db91: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10db94: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10db96: 8b 7b 04 mov 0x4(%ebx),%edi 10db99: 89 7d d4 mov %edi,-0x2c(%ebp) 10db9c: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10db9f: 39 fa cmp %edi,%edx 10dba1: 74 7b je 10dc1e <_Thread_queue_Dequeue_priority+0xce> last_node = the_thread->Wait.Block2n.last; 10dba3: 8b 7b 40 mov 0x40(%ebx),%edi 10dba6: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10dba9: 8b 3a mov (%edx),%edi 10dbab: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10dbae: 8b 7d d4 mov -0x2c(%ebp),%edi 10dbb1: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10dbb3: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10dbb6: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10dbb8: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10dbbb: 3b 55 e4 cmp -0x1c(%ebp),%edx 10dbbe: 74 17 je 10dbd7 <_Thread_queue_Dequeue_priority+0x87> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 10dbc0: 8d 4a 38 lea 0x38(%edx),%ecx 10dbc3: 8b 7d e0 mov -0x20(%ebp),%edi 10dbc6: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 10dbc9: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10dbcc: 8b 4d e4 mov -0x1c(%ebp),%ecx 10dbcf: 89 4a 40 mov %ecx,0x40(%edx) 10dbd2: 83 c2 3c add $0x3c,%edx 10dbd5: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10dbd7: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10dbdb: 74 17 je 10dbf4 <_Thread_queue_Dequeue_priority+0xa4> _ISR_Enable( level ); 10dbdd: 50 push %eax 10dbde: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10dbdf: 83 ec 08 sub $0x8,%esp 10dbe2: 68 f8 ff 03 10 push $0x1003fff8 10dbe7: 53 push %ebx 10dbe8: e8 8b f7 ff ff call 10d378 <_Thread_Clear_state> 10dbed: 83 c4 10 add $0x10,%esp 10dbf0: eb 8b jmp 10db7d <_Thread_queue_Dequeue_priority+0x2d> 10dbf2: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10dbf4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10dbfb: 50 push %eax 10dbfc: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10dbfd: 83 ec 0c sub $0xc,%esp 10dc00: 8d 43 48 lea 0x48(%ebx),%eax 10dc03: 50 push %eax 10dc04: e8 eb 0b 00 00 call 10e7f4 <_Watchdog_Remove> 10dc09: 58 pop %eax 10dc0a: 5a pop %edx 10dc0b: 68 f8 ff 03 10 push $0x1003fff8 10dc10: 53 push %ebx 10dc11: e8 62 f7 ff ff call 10d378 <_Thread_Clear_state> 10dc16: 83 c4 10 add $0x10,%esp 10dc19: e9 5f ff ff ff jmp 10db7d <_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; 10dc1e: 8b 7d d4 mov -0x2c(%ebp),%edi 10dc21: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10dc23: 89 79 04 mov %edi,0x4(%ecx) 10dc26: eb af jmp 10dbd7 <_Thread_queue_Dequeue_priority+0x87> =============================================================================== 0011162c <_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 ) { 11162c: 55 push %ebp 11162d: 89 e5 mov %esp,%ebp 11162f: 56 push %esi 111630: 53 push %ebx 111631: 8b 55 08 mov 0x8(%ebp),%edx 111634: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 111637: 9c pushf 111638: fa cli 111639: 59 pop %ecx sync_state = the_thread_queue->sync_state; 11163a: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 11163d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 111644: 83 f8 01 cmp $0x1,%eax 111647: 74 0b je 111654 <_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; 111649: 8b 55 10 mov 0x10(%ebp),%edx 11164c: 89 0a mov %ecx,(%edx) return sync_state; } 11164e: 5b pop %ebx 11164f: 5e pop %esi 111650: c9 leave 111651: c3 ret 111652: 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; 111654: 8d 72 04 lea 0x4(%edx),%esi 111657: 89 33 mov %esi,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 111659: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 11165c: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 11165f: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 111661: 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; 111664: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 111667: 51 push %ecx 111668: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111669: 5b pop %ebx 11166a: 5e pop %esi 11166b: c9 leave 11166c: c3 ret =============================================================================== 0010dcc0 <_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 ) { 10dcc0: 55 push %ebp 10dcc1: 89 e5 mov %esp,%ebp 10dcc3: 57 push %edi 10dcc4: 56 push %esi 10dcc5: 53 push %ebx 10dcc6: 83 ec 10 sub $0x10,%esp 10dcc9: 8b 7d 0c mov 0xc(%ebp),%edi 10dccc: 8d 47 3c lea 0x3c(%edi),%eax 10dccf: 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; 10dcd2: 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 ); 10dcd9: 8d 47 38 lea 0x38(%edi),%eax 10dcdc: 89 47 40 mov %eax,0x40(%edi) priority = the_thread->current_priority; 10dcdf: 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); 10dce2: 89 d0 mov %edx,%eax 10dce4: 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; 10dce7: 8b 4d 08 mov 0x8(%ebp),%ecx 10dcea: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10dced: f6 c2 20 test $0x20,%dl 10dcf0: 75 66 jne 10dd58 <_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; 10dcf2: 8d 04 40 lea (%eax,%eax,2),%eax 10dcf5: 8d 04 81 lea (%ecx,%eax,4),%eax 10dcf8: 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; 10dcfb: 83 c0 04 add $0x4,%eax 10dcfe: 89 7d e8 mov %edi,-0x18(%ebp) 10dd01: 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 ); 10dd03: 9c pushf 10dd04: fa cli 10dd05: 5e pop %esi 10dd06: 89 75 ec mov %esi,-0x14(%ebp) search_thread = (Thread_Control *) header->first; 10dd09: 8b 4d f0 mov -0x10(%ebp),%ecx 10dd0c: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10dd0e: 39 f8 cmp %edi,%eax 10dd10: 75 18 jne 10dd2a <_Thread_queue_Enqueue_priority+0x6a> 10dd12: e9 32 01 00 00 jmp 10de49 <_Thread_queue_Enqueue_priority+0x189> 10dd17: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10dd18: 56 push %esi 10dd19: 9d popf 10dd1a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dd1b: 85 58 10 test %ebx,0x10(%eax) 10dd1e: 0f 84 d0 00 00 00 je 10ddf4 <_Thread_queue_Enqueue_priority+0x134> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10dd24: 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 ) ) { 10dd26: 39 f8 cmp %edi,%eax 10dd28: 74 07 je 10dd31 <_Thread_queue_Enqueue_priority+0x71> search_priority = search_thread->current_priority; 10dd2a: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10dd2d: 39 ca cmp %ecx,%edx 10dd2f: 77 e7 ja 10dd18 <_Thread_queue_Enqueue_priority+0x58> 10dd31: 8b 7d e8 mov -0x18(%ebp),%edi 10dd34: 89 75 f0 mov %esi,-0x10(%ebp) } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10dd37: 8b 75 08 mov 0x8(%ebp),%esi 10dd3a: 8b 5e 30 mov 0x30(%esi),%ebx 10dd3d: 83 fb 01 cmp $0x1,%ebx 10dd40: 0f 84 b6 00 00 00 je 10ddfc <_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; 10dd46: 8b 45 10 mov 0x10(%ebp),%eax 10dd49: 8b 55 ec mov -0x14(%ebp),%edx 10dd4c: 89 10 mov %edx,(%eax) return the_thread_queue->sync_state; } 10dd4e: 89 d8 mov %ebx,%eax 10dd50: 83 c4 10 add $0x10,%esp 10dd53: 5b pop %ebx 10dd54: 5e pop %esi 10dd55: 5f pop %edi 10dd56: c9 leave 10dd57: 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 ]; 10dd58: 8d 04 40 lea (%eax,%eax,2),%eax 10dd5b: 8b 4d 08 mov 0x8(%ebp),%ecx 10dd5e: 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; 10dd61: 89 75 f0 mov %esi,-0x10(%ebp) 10dd64: 89 75 e4 mov %esi,-0x1c(%ebp) 10dd67: 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; 10dd6a: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx 10dd71: 41 inc %ecx _ISR_Disable( level ); 10dd72: 9c pushf 10dd73: fa cli 10dd74: 5f pop %edi 10dd75: 89 7d ec mov %edi,-0x14(%ebp) search_thread = (Thread_Control *) header->last; 10dd78: 8b 75 f0 mov -0x10(%ebp),%esi 10dd7b: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dd7e: 3b 45 e4 cmp -0x1c(%ebp),%eax 10dd81: 74 2b je 10ddae <_Thread_queue_Enqueue_priority+0xee> search_priority = search_thread->current_priority; 10dd83: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dd86: 39 ca cmp %ecx,%edx 10dd88: 73 24 jae 10ddae <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dd8a: 57 push %edi 10dd8b: 9d popf 10dd8c: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dd8d: 85 58 10 test %ebx,0x10(%eax) 10dd90: 74 59 je 10ddeb <_Thread_queue_Enqueue_priority+0x12b> 10dd92: 8b 75 e4 mov -0x1c(%ebp),%esi 10dd95: eb 10 jmp 10dda7 <_Thread_queue_Enqueue_priority+0xe7> 10dd97: 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; 10dd98: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dd9b: 39 ca cmp %ecx,%edx 10dd9d: 73 0f jae 10ddae <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dd9f: 57 push %edi 10dda0: 9d popf 10dda1: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dda2: 85 58 10 test %ebx,0x10(%eax) 10dda5: 74 41 je 10dde8 <_Thread_queue_Enqueue_priority+0x128><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 10dda7: 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 ) ) { 10ddaa: 39 f0 cmp %esi,%eax 10ddac: 75 ea jne 10dd98 <_Thread_queue_Enqueue_priority+0xd8> 10ddae: 89 7d f0 mov %edi,-0x10(%ebp) 10ddb1: 8b 7d e8 mov -0x18(%ebp),%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10ddb4: 8b 75 08 mov 0x8(%ebp),%esi 10ddb7: 8b 5e 30 mov 0x30(%esi),%ebx 10ddba: 83 fb 01 cmp $0x1,%ebx 10ddbd: 75 87 jne 10dd46 <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10ddbf: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10ddc6: 39 ca cmp %ecx,%edx 10ddc8: 74 5b je 10de25 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10ddca: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10ddcc: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10ddce: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10ddd1: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10ddd3: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10ddd6: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10ddd9: ff 75 f0 pushl -0x10(%ebp) 10dddc: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dddd: 89 d8 mov %ebx,%eax 10dddf: 83 c4 10 add $0x10,%esp 10dde2: 5b pop %ebx 10dde3: 5e pop %esi 10dde4: 5f pop %edi 10dde5: c9 leave 10dde6: c3 ret 10dde7: 90 nop <== NOT EXECUTED 10dde8: 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 ); 10ddeb: 57 push %edi 10ddec: 9d popf goto restart_reverse_search; 10dded: e9 78 ff ff ff jmp 10dd6a <_Thread_queue_Enqueue_priority+0xaa> 10ddf2: 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 ); 10ddf4: 56 push %esi 10ddf5: 9d popf goto restart_forward_search; 10ddf6: e9 08 ff ff ff jmp 10dd03 <_Thread_queue_Enqueue_priority+0x43> 10ddfb: 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; 10ddfc: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10de03: 39 ca cmp %ecx,%edx 10de05: 74 1e je 10de25 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10de07: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10de0a: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10de0c: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10de0f: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10de11: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10de14: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10de17: ff 75 f0 pushl -0x10(%ebp) 10de1a: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10de1b: 89 d8 mov %ebx,%eax 10de1d: 83 c4 10 add $0x10,%esp 10de20: 5b pop %ebx 10de21: 5e pop %esi 10de22: 5f pop %edi 10de23: c9 leave 10de24: c3 ret 10de25: 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; 10de28: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10de2b: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10de2d: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10de30: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10de32: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10de35: 8b 45 08 mov 0x8(%ebp),%eax 10de38: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10de3b: ff 75 ec pushl -0x14(%ebp) 10de3e: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10de3f: bb 01 00 00 00 mov $0x1,%ebx 10de44: e9 05 ff ff ff jmp 10dd4e <_Thread_queue_Enqueue_priority+0x8e> 10de49: 8b 7d e8 mov -0x18(%ebp),%edi 10de4c: 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; 10de4f: b9 ff ff ff ff mov $0xffffffff,%ecx 10de54: e9 de fe ff ff jmp 10dd37 <_Thread_queue_Enqueue_priority+0x77> =============================================================================== 0010dc28 <_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 ) { 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 24 sub $0x24,%esp 10dc31: 8b 75 08 mov 0x8(%ebp),%esi 10dc34: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10dc37: 8b 1d 98 79 12 00 mov 0x127998,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10dc3d: ff 76 38 pushl 0x38(%esi) 10dc40: 53 push %ebx 10dc41: e8 d6 03 00 00 call 10e01c <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10dc46: 83 c4 10 add $0x10,%esp 10dc49: 85 ff test %edi,%edi 10dc4b: 75 33 jne 10dc80 <_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 ) 10dc4d: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dc51: 74 64 je 10dcb7 <_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; 10dc53: b8 2c 16 11 00 mov $0x11162c,%eax sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10dc58: 51 push %ecx 10dc59: 8d 55 e4 lea -0x1c(%ebp),%edx 10dc5c: 52 push %edx 10dc5d: 53 push %ebx 10dc5e: 56 push %esi 10dc5f: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10dc61: 83 c4 10 add $0x10,%esp 10dc64: 83 f8 01 cmp $0x1,%eax 10dc67: 74 0e je 10dc77 <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10dc69: 52 push %edx 10dc6a: ff 75 e4 pushl -0x1c(%ebp) 10dc6d: 53 push %ebx 10dc6e: 50 push %eax 10dc6f: e8 78 f5 ff ff call 10d1ec <_Thread_blocking_operation_Cancel> 10dc74: 83 c4 10 add $0x10,%esp } 10dc77: 8d 65 f4 lea -0xc(%ebp),%esp 10dc7a: 5b pop %ebx 10dc7b: 5e pop %esi 10dc7c: 5f pop %edi 10dc7d: c9 leave 10dc7e: c3 ret 10dc7f: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10dc80: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dc83: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dc8a: 8b 55 10 mov 0x10(%ebp),%edx 10dc8d: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10dc90: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10dc93: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10dc9a: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10dc9d: 83 ec 08 sub $0x8,%esp handler, the_thread->Object.id, NULL ); _Watchdog_Insert_ticks( &the_thread->Timer, timeout ); 10dca0: 8d 43 48 lea 0x48(%ebx),%eax 10dca3: 50 push %eax 10dca4: 68 a4 74 12 00 push $0x1274a4 10dca9: e8 0e 0a 00 00 call 10e6bc <_Watchdog_Insert> 10dcae: 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 ) 10dcb1: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dcb5: 75 9c jne 10dc53 <_Thread_queue_Enqueue_with_handler+0x2b> enqueue_p = _Thread_queue_Enqueue_priority; 10dcb7: b8 c0 dc 10 00 mov $0x10dcc0,%eax 10dcbc: eb 9a jmp 10dc58 <_Thread_queue_Enqueue_with_handler+0x30> =============================================================================== 00111670 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 111670: 55 push %ebp 111671: 89 e5 mov %esp,%ebp 111673: 83 ec 08 sub $0x8,%esp 111676: 8b 45 08 mov 0x8(%ebp),%eax 111679: 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 ) 11167c: 83 78 34 01 cmpl $0x1,0x34(%eax) 111680: 74 0e je 111690 <_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 ); 111682: 89 55 0c mov %edx,0xc(%ebp) 111685: 89 45 08 mov %eax,0x8(%ebp) } 111688: 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 ); 111689: e9 0a 1c 00 00 jmp 113298 <_Thread_queue_Extract_fifo> 11168e: 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 ); 111690: 51 push %ecx 111691: 6a 00 push $0x0 111693: 52 push %edx 111694: 50 push %eax 111695: e8 06 00 00 00 call 1116a0 <_Thread_queue_Extract_priority_helper> 11169a: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 11169d: c9 leave 11169e: c3 ret =============================================================================== 00113298 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 113298: 55 push %ebp 113299: 89 e5 mov %esp,%ebp 11329b: 53 push %ebx 11329c: 83 ec 04 sub $0x4,%esp 11329f: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 1132a2: 9c pushf 1132a3: fa cli 1132a4: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1132a5: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1132ac: 74 2e je 1132dc <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1132ae: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 1132b0: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 1132b3: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 1132b6: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 1132b8: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1132bf: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1132c3: 74 1f je 1132e4 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 1132c5: 50 push %eax 1132c6: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1132c7: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 1132ce: 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 } 1132d1: 8b 5d fc mov -0x4(%ebp),%ebx 1132d4: c9 leave 1132d5: e9 9e a0 ff ff jmp 10d378 <_Thread_Clear_state> 1132da: 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 ); 1132dc: 50 push %eax 1132dd: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1132de: 8b 5d fc mov -0x4(%ebp),%ebx 1132e1: c9 leave 1132e2: c3 ret 1132e3: 90 nop <== NOT EXECUTED 1132e4: 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 ); 1132eb: 50 push %eax 1132ec: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1132ed: 83 ec 0c sub $0xc,%esp 1132f0: 8d 43 48 lea 0x48(%ebx),%eax 1132f3: 50 push %eax 1132f4: e8 fb b4 ff ff call 10e7f4 <_Watchdog_Remove> 1132f9: 83 c4 10 add $0x10,%esp 1132fc: eb c9 jmp 1132c7 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 001116a0 <_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 ) { 1116a0: 55 push %ebp 1116a1: 89 e5 mov %esp,%ebp 1116a3: 57 push %edi 1116a4: 56 push %esi 1116a5: 53 push %ebx 1116a6: 83 ec 1c sub $0x1c,%esp 1116a9: 8b 5d 0c mov 0xc(%ebp),%ebx 1116ac: 8a 45 10 mov 0x10(%ebp),%al 1116af: 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 ); 1116b2: 9c pushf 1116b3: fa cli 1116b4: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1116b7: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1116be: 74 68 je 111728 <_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; 1116c0: 8b 0b mov (%ebx),%ecx previous_node = the_node->previous; 1116c2: 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)); 1116c5: 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; 1116c8: 8d 53 3c lea 0x3c(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 1116cb: 39 d0 cmp %edx,%eax 1116cd: 74 65 je 111734 <_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; 1116cf: 8b 53 40 mov 0x40(%ebx),%edx new_second_node = new_first_node->next; 1116d2: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 1116d4: 89 06 mov %eax,(%esi) next_node->previous = new_first_node; 1116d6: 89 41 04 mov %eax,0x4(%ecx) new_first_node->next = next_node; 1116d9: 89 08 mov %ecx,(%eax) new_first_node->previous = previous_node; 1116db: 89 70 04 mov %esi,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 1116de: 39 c2 cmp %eax,%edx 1116e0: 74 11 je 1116f3 <_Thread_queue_Extract_priority_helper+0x53> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 1116e2: 8d 48 38 lea 0x38(%eax),%ecx 1116e5: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 1116e8: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 1116eb: 89 50 40 mov %edx,0x40(%eax) 1116ee: 83 c0 3c add $0x3c,%eax 1116f1: 89 02 mov %eax,(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 1116f3: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 1116f7: 75 23 jne 11171c <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1116f9: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1116fd: 74 3d je 11173c <_Thread_queue_Extract_priority_helper+0x9c><== NEVER TAKEN _ISR_Enable( level ); 1116ff: ff 75 e4 pushl -0x1c(%ebp) 111702: 9d popf 111703: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 11170a: 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 } 11170d: 8d 65 f4 lea -0xc(%ebp),%esp 111710: 5b pop %ebx 111711: 5e pop %esi 111712: 5f pop %edi 111713: c9 leave 111714: e9 5f bc ff ff jmp 10d378 <_Thread_Clear_state> 111719: 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 ); 11171c: ff 75 e4 pushl -0x1c(%ebp) 11171f: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111720: 8d 65 f4 lea -0xc(%ebp),%esp 111723: 5b pop %ebx 111724: 5e pop %esi 111725: 5f pop %edi 111726: c9 leave 111727: 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 ); 111728: ff 75 e4 pushl -0x1c(%ebp) 11172b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11172c: 8d 65 f4 lea -0xc(%ebp),%esp 11172f: 5b pop %ebx 111730: 5e pop %esi 111731: 5f pop %edi 111732: c9 leave 111733: 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; 111734: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 111736: 89 71 04 mov %esi,0x4(%ecx) 111739: eb b8 jmp 1116f3 <_Thread_queue_Extract_priority_helper+0x53> 11173b: 90 nop <== NOT EXECUTED 11173c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 111743: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 111746: 9d popf <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 111747: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11174a: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED 11174d: 50 push %eax <== NOT EXECUTED 11174e: e8 a1 d0 ff ff call 10e7f4 <_Watchdog_Remove> <== NOT EXECUTED 111753: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111756: eb ab jmp 111703 <_Thread_queue_Extract_priority_helper+0x63><== NOT EXECUTED =============================================================================== 0010de5c <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10de5c: 55 push %ebp 10de5d: 89 e5 mov %esp,%ebp 10de5f: 83 ec 08 sub $0x8,%esp 10de62: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10de65: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10de6c: 75 06 jne 10de74 <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10de6e: 31 c0 xor %eax,%eax } 10de70: c9 leave 10de71: c3 ret 10de72: 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 ); 10de74: 83 ec 08 sub $0x8,%esp 10de77: 50 push %eax 10de78: ff 70 44 pushl 0x44(%eax) 10de7b: e8 f0 37 00 00 call 111670 <_Thread_queue_Extract> return true; 10de80: 83 c4 10 add $0x10,%esp 10de83: b0 01 mov $0x1,%al } return false; } 10de85: c9 leave 10de86: c3 ret =============================================================================== 0010fcb8 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 10fcb8: 55 push %ebp 10fcb9: 89 e5 mov %esp,%ebp 10fcbb: 83 ec 08 sub $0x8,%esp 10fcbe: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10fcc1: 83 78 34 01 cmpl $0x1,0x34(%eax) 10fcc5: 74 0d je 10fcd4 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 10fcc7: ba 28 36 11 00 mov $0x113628,%edx return (*first_p)( the_thread_queue ); 10fccc: 89 45 08 mov %eax,0x8(%ebp) } 10fccf: 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 ); 10fcd0: ff e2 jmp *%edx 10fcd2: 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; 10fcd4: ba e0 fc 10 00 mov $0x10fce0,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fcd9: 89 45 08 mov %eax,0x8(%ebp) } 10fcdc: 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 ); 10fcdd: ff e2 jmp *%edx =============================================================================== 00113628 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 113628: 55 push %ebp 113629: 89 e5 mov %esp,%ebp 11362b: 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)); 11362e: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113630: 83 c2 04 add $0x4,%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 113633: 39 d0 cmp %edx,%eax 113635: 74 05 je 11363c <_Thread_queue_First_fifo+0x14> return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 113637: c9 leave 113638: c3 ret 113639: 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; 11363c: 31 c0 xor %eax,%eax } 11363e: c9 leave 11363f: c3 ret =============================================================================== 0010de88 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10de88: 55 push %ebp 10de89: 89 e5 mov %esp,%ebp 10de8b: 56 push %esi 10de8c: 53 push %ebx 10de8d: 8b 5d 08 mov 0x8(%ebp),%ebx 10de90: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10de93: eb 06 jmp 10de9b <_Thread_queue_Flush+0x13> 10de95: 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; 10de98: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10de9b: 83 ec 0c sub $0xc,%esp 10de9e: 53 push %ebx 10de9f: e8 60 fc ff ff call 10db04 <_Thread_queue_Dequeue> 10dea4: 83 c4 10 add $0x10,%esp 10dea7: 85 c0 test %eax,%eax 10dea9: 75 ed jne 10de98 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10deab: 8d 65 f8 lea -0x8(%ebp),%esp 10deae: 5b pop %ebx 10deaf: 5e pop %esi 10deb0: c9 leave 10deb1: c3 ret =============================================================================== 0010deb4 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10deb4: 55 push %ebp 10deb5: 89 e5 mov %esp,%ebp 10deb7: 56 push %esi 10deb8: 53 push %ebx 10deb9: 8b 45 08 mov 0x8(%ebp),%eax 10debc: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10debf: 8b 4d 10 mov 0x10(%ebp),%ecx 10dec2: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dec5: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dec8: 8b 4d 14 mov 0x14(%ebp),%ecx 10decb: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dece: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10ded5: 83 fa 01 cmp $0x1,%edx 10ded8: 74 16 je 10def0 <_Thread_queue_Initialize+0x3c> 10deda: 8d 50 04 lea 0x4(%eax),%edx 10dedd: 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; 10dedf: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dee6: 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 ); } } 10dee9: 5b pop %ebx 10deea: 5e pop %esi 10deeb: c9 leave 10deec: c3 ret 10deed: 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 ) { 10def0: 89 c1 mov %eax,%ecx 10def2: 30 d2 xor %dl,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10def4: 8d 1c 52 lea (%edx,%edx,2),%ebx 10def7: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10defa: 8d 73 04 lea 0x4(%ebx),%esi 10defd: 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; 10deff: 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] ); 10df06: 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++) 10df09: 42 inc %edx 10df0a: 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 ; 10df0d: 83 fa 04 cmp $0x4,%edx 10df10: 75 e2 jne 10def4 <_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 ); } } 10df12: 5b pop %ebx 10df13: 5e pop %esi 10df14: c9 leave 10df15: c3 ret =============================================================================== 0010df18 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10df18: 55 push %ebp 10df19: 89 e5 mov %esp,%ebp 10df1b: 57 push %edi 10df1c: 56 push %esi 10df1d: 53 push %ebx 10df1e: 83 ec 1c sub $0x1c,%esp 10df21: 8b 75 08 mov 0x8(%ebp),%esi 10df24: 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 ) 10df27: 85 f6 test %esi,%esi 10df29: 74 06 je 10df31 <_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 ) { 10df2b: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10df2f: 74 0b je 10df3c <_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 ); } } 10df31: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10df34: 5b pop %ebx <== NOT EXECUTED 10df35: 5e pop %esi <== NOT EXECUTED 10df36: 5f pop %edi <== NOT EXECUTED 10df37: c9 leave <== NOT EXECUTED 10df38: c3 ret <== NOT EXECUTED 10df39: 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 ); 10df3c: 9c pushf 10df3d: fa cli 10df3e: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10df3f: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10df46: 75 0c jne 10df54 <_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 ); 10df48: 53 push %ebx 10df49: 9d popf } } 10df4a: 8d 65 f4 lea -0xc(%ebp),%esp 10df4d: 5b pop %ebx 10df4e: 5e pop %esi 10df4f: 5f pop %edi 10df50: c9 leave 10df51: c3 ret 10df52: 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; 10df54: 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 ); 10df5b: 50 push %eax 10df5c: 6a 01 push $0x1 10df5e: 57 push %edi 10df5f: 56 push %esi 10df60: e8 3b 37 00 00 call 1116a0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10df65: 83 c4 0c add $0xc,%esp 10df68: 8d 45 e4 lea -0x1c(%ebp),%eax 10df6b: 50 push %eax 10df6c: 57 push %edi 10df6d: 56 push %esi 10df6e: e8 4d fd ff ff call 10dcc0 <_Thread_queue_Enqueue_priority> 10df73: 83 c4 10 add $0x10,%esp 10df76: eb d0 jmp 10df48 <_Thread_queue_Requeue+0x30> =============================================================================== 0010df78 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10df78: 55 push %ebp 10df79: 89 e5 mov %esp,%ebp 10df7b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10df7e: 8d 45 f4 lea -0xc(%ebp),%eax 10df81: 50 push %eax 10df82: ff 75 08 pushl 0x8(%ebp) 10df85: e8 d6 f7 ff ff call 10d760 <_Thread_Get> switch ( location ) { 10df8a: 83 c4 10 add $0x10,%esp 10df8d: 8b 55 f4 mov -0xc(%ebp),%edx 10df90: 85 d2 test %edx,%edx 10df92: 75 17 jne 10dfab <_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 ); 10df94: 83 ec 0c sub $0xc,%esp 10df97: 50 push %eax 10df98: e8 bb 37 00 00 call 111758 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10df9d: a1 d4 73 12 00 mov 0x1273d4,%eax 10dfa2: 48 dec %eax 10dfa3: a3 d4 73 12 00 mov %eax,0x1273d4 10dfa8: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10dfab: c9 leave 10dfac: c3 ret =============================================================================== 00118ed8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118ed8: 55 push %ebp 118ed9: 89 e5 mov %esp,%ebp 118edb: 57 push %edi 118edc: 56 push %esi 118edd: 53 push %ebx 118ede: 83 ec 4c sub $0x4c,%esp 118ee1: 8b 5d 08 mov 0x8(%ebp),%ebx 118ee4: 8d 45 e0 lea -0x20(%ebp),%eax 118ee7: 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); 118eea: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118eed: 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 ); 118ef4: 8d 4d dc lea -0x24(%ebp),%ecx 118ef7: 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; 118efa: 8d 7d d0 lea -0x30(%ebp),%edi 118efd: 8d 45 d4 lea -0x2c(%ebp),%eax 118f00: 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); 118f03: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118f06: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118f0d: 89 7d d8 mov %edi,-0x28(%ebp) 118f10: 8d 73 30 lea 0x30(%ebx),%esi 118f13: 8d 4b 68 lea 0x68(%ebx),%ecx 118f16: 89 4d c4 mov %ecx,-0x3c(%ebp) 118f19: 8d 43 08 lea 0x8(%ebx),%eax 118f1c: 89 45 c0 mov %eax,-0x40(%ebp) 118f1f: 8d 53 40 lea 0x40(%ebx),%edx 118f22: 89 55 bc mov %edx,-0x44(%ebp) 118f25: 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; 118f28: 8d 4d dc lea -0x24(%ebp),%ecx 118f2b: 89 4b 78 mov %ecx,0x78(%ebx) 118f2e: 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; 118f30: a1 e4 24 14 00 mov 0x1424e4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118f35: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118f38: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118f3b: 51 push %ecx 118f3c: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118f3d: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118f3f: 50 push %eax 118f40: 56 push %esi 118f41: e8 5a 3f 00 00 call 11cea0 <_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(); 118f46: a1 28 24 14 00 mov 0x142428,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118f4b: 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 ) { 118f4e: 83 c4 10 add $0x10,%esp 118f51: 39 d0 cmp %edx,%eax 118f53: 77 63 ja 118fb8 <_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 ) { 118f55: 72 7d jb 118fd4 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118f57: 89 43 74 mov %eax,0x74(%ebx) 118f5a: 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 ); 118f5c: 8b 43 78 mov 0x78(%ebx),%eax 118f5f: 83 ec 0c sub $0xc,%esp 118f62: 50 push %eax 118f63: e8 e0 09 00 00 call 119948 <_Chain_Get> if ( timer == NULL ) { 118f68: 83 c4 10 add $0x10,%esp 118f6b: 85 c0 test %eax,%eax 118f6d: 74 35 je 118fa4 <_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 ) { 118f6f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118f72: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118f75: 74 19 je 118f90 <_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 ) { 118f77: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118f7a: 75 e0 jne 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118f7c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118f7f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118f82: 50 push %eax <== NOT EXECUTED 118f83: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118f86: e8 a1 3f 00 00 call 11cf2c <_Watchdog_Insert> <== NOT EXECUTED 118f8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118f8e: eb cc jmp 118f5c <_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 ); 118f90: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118f93: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118f96: 50 push %eax <== NOT EXECUTED 118f97: 56 push %esi <== NOT EXECUTED 118f98: e8 8f 3f 00 00 call 11cf2c <_Watchdog_Insert> <== NOT EXECUTED 118f9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118fa0: eb ba jmp 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED 118fa2: 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 ); 118fa4: 9c pushf 118fa5: fa cli 118fa6: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118fa7: 8b 55 b4 mov -0x4c(%ebp),%edx 118faa: 3b 55 dc cmp -0x24(%ebp),%edx 118fad: 74 41 je 118ff0 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118faf: 50 push %eax <== NOT EXECUTED 118fb0: 9d popf <== NOT EXECUTED 118fb1: e9 7a ff ff ff jmp 118f30 <_Timer_server_Body+0x58><== NOT EXECUTED 118fb6: 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 ); 118fb8: 51 push %ecx 118fb9: 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; 118fba: 89 c1 mov %eax,%ecx 118fbc: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118fbe: 51 push %ecx 118fbf: ff 75 c4 pushl -0x3c(%ebp) 118fc2: 89 45 b8 mov %eax,-0x48(%ebp) 118fc5: e8 d6 3e 00 00 call 11cea0 <_Watchdog_Adjust_to_chain> 118fca: 83 c4 10 add $0x10,%esp 118fcd: 8b 45 b8 mov -0x48(%ebp),%eax 118fd0: eb 85 jmp 118f57 <_Timer_server_Body+0x7f> 118fd2: 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 ); 118fd4: 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; 118fd5: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118fd7: 52 push %edx 118fd8: 6a 01 push $0x1 118fda: ff 75 c4 pushl -0x3c(%ebp) 118fdd: 89 45 b8 mov %eax,-0x48(%ebp) 118fe0: e8 43 3e 00 00 call 11ce28 <_Watchdog_Adjust> 118fe5: 83 c4 10 add $0x10,%esp 118fe8: 8b 45 b8 mov -0x48(%ebp),%eax 118feb: e9 67 ff ff ff jmp 118f57 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118ff0: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118ff7: 50 push %eax 118ff8: 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 ) ) { 118ff9: 8b 4d b0 mov -0x50(%ebp),%ecx 118ffc: 3b 4d d0 cmp -0x30(%ebp),%ecx 118fff: 75 23 jne 119024 <_Timer_server_Body+0x14c> 119001: eb 33 jmp 119036 <_Timer_server_Body+0x15e> 119003: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119004: 8b 10 mov (%eax),%edx the_chain->first = new_first; 119006: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 119009: 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; 11900c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119013: 51 push %ecx 119014: 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 ); 119015: 83 ec 08 sub $0x8,%esp 119018: ff 70 24 pushl 0x24(%eax) 11901b: ff 70 20 pushl 0x20(%eax) 11901e: ff 50 1c call *0x1c(%eax) } 119021: 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 ); 119024: 9c pushf 119025: fa cli 119026: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119027: 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)) 11902a: 39 45 b0 cmp %eax,-0x50(%ebp) 11902d: 75 d5 jne 119004 <_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 ); 11902f: 51 push %ecx 119030: 9d popf 119031: e9 f2 fe ff ff jmp 118f28 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 119036: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11903a: a1 94 23 14 00 mov 0x142394,%eax 11903f: 40 inc %eax 119040: a3 94 23 14 00 mov %eax,0x142394 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119045: 83 ec 08 sub $0x8,%esp 119048: 6a 08 push $0x8 11904a: ff 33 pushl (%ebx) 11904c: e8 cb 35 00 00 call 11c61c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 119051: 89 d8 mov %ebx,%eax 119053: e8 e0 fd ff ff call 118e38 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 119058: 89 d8 mov %ebx,%eax 11905a: e8 29 fe ff ff call 118e88 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 11905f: e8 c0 2b 00 00 call 11bc24 <_Thread_Enable_dispatch> ts->active = true; 119064: 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 ); 119068: 5a pop %edx 119069: ff 75 c0 pushl -0x40(%ebp) 11906c: e8 f3 3f 00 00 call 11d064 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 119071: 58 pop %eax 119072: ff 75 bc pushl -0x44(%ebp) 119075: e8 ea 3f 00 00 call 11d064 <_Watchdog_Remove> 11907a: 83 c4 10 add $0x10,%esp 11907d: e9 a6 fe ff ff jmp 118f28 <_Timer_server_Body+0x50> =============================================================================== 00118e38 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118e38: 55 push %ebp 118e39: 89 e5 mov %esp,%ebp 118e3b: 56 push %esi 118e3c: 53 push %ebx 118e3d: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118e3f: 8d 70 08 lea 0x8(%eax),%esi 118e42: 83 ec 0c sub $0xc,%esp 118e45: 56 push %esi 118e46: e8 19 42 00 00 call 11d064 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118e4b: 9c pushf 118e4c: fa cli 118e4d: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118e4e: 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; 118e51: 8d 53 34 lea 0x34(%ebx),%edx if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 118e54: 83 c4 10 add $0x10,%esp 118e57: 39 d0 cmp %edx,%eax 118e59: 74 21 je 118e7c <_Timer_server_Reset_interval_system_watchdog+0x44> Watchdog_Interval delta_interval = 118e5b: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118e5e: 51 push %ecx 118e5f: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118e60: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118e63: 83 ec 08 sub $0x8,%esp 118e66: 56 push %esi 118e67: 68 64 24 14 00 push $0x142464 118e6c: e8 bb 40 00 00 call 11cf2c <_Watchdog_Insert> 118e71: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118e74: 8d 65 f8 lea -0x8(%ebp),%esp 118e77: 5b pop %ebx 118e78: 5e pop %esi 118e79: c9 leave 118e7a: c3 ret 118e7b: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118e7c: 51 push %ecx 118e7d: 9d popf } } 118e7e: 8d 65 f8 lea -0x8(%ebp),%esp 118e81: 5b pop %ebx 118e82: 5e pop %esi 118e83: c9 leave 118e84: c3 ret =============================================================================== 00118e88 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118e88: 55 push %ebp 118e89: 89 e5 mov %esp,%ebp 118e8b: 56 push %esi 118e8c: 53 push %ebx 118e8d: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118e8f: 8d 70 40 lea 0x40(%eax),%esi 118e92: 83 ec 0c sub $0xc,%esp 118e95: 56 push %esi 118e96: e8 c9 41 00 00 call 11d064 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118e9b: 9c pushf 118e9c: fa cli 118e9d: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118e9e: 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; 118ea1: 8d 53 6c lea 0x6c(%ebx),%edx if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118ea4: 83 c4 10 add $0x10,%esp 118ea7: 39 d0 cmp %edx,%eax 118ea9: 74 21 je 118ecc <_Timer_server_Reset_tod_system_watchdog+0x44> Watchdog_Interval delta_interval = 118eab: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118eae: 51 push %ecx 118eaf: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118eb0: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118eb3: 83 ec 08 sub $0x8,%esp 118eb6: 56 push %esi 118eb7: 68 58 24 14 00 push $0x142458 118ebc: e8 6b 40 00 00 call 11cf2c <_Watchdog_Insert> 118ec1: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118ec4: 8d 65 f8 lea -0x8(%ebp),%esp 118ec7: 5b pop %ebx 118ec8: 5e pop %esi 118ec9: c9 leave 118eca: c3 ret 118ecb: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118ecc: 51 push %ecx 118ecd: 9d popf } } 118ece: 8d 65 f8 lea -0x8(%ebp),%esp 118ed1: 5b pop %ebx 118ed2: 5e pop %esi 118ed3: c9 leave 118ed4: c3 ret =============================================================================== 00119084 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 119084: 55 push %ebp 119085: 89 e5 mov %esp,%ebp 119087: 57 push %edi 119088: 56 push %esi 119089: 53 push %ebx 11908a: 83 ec 2c sub $0x2c,%esp 11908d: 8b 5d 08 mov 0x8(%ebp),%ebx 119090: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 119093: 8b 53 78 mov 0x78(%ebx),%edx 119096: 85 d2 test %edx,%edx 119098: 74 16 je 1190b0 <_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 ); 11909a: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 11909d: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1190a0: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1190a3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1190a6: 5b pop %ebx <== NOT EXECUTED 1190a7: 5e pop %esi <== NOT EXECUTED 1190a8: 5f pop %edi <== NOT EXECUTED 1190a9: 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 ); 1190aa: e9 5d 08 00 00 jmp 11990c <_Chain_Append> <== NOT EXECUTED 1190af: 90 nop <== NOT EXECUTED 1190b0: 8b 15 94 23 14 00 mov 0x142394,%edx 1190b6: 42 inc %edx 1190b7: 89 15 94 23 14 00 mov %edx,0x142394 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1190bd: 8b 50 38 mov 0x38(%eax),%edx 1190c0: 83 fa 01 cmp $0x1,%edx 1190c3: 74 7b je 119140 <_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 ) { 1190c5: 83 fa 03 cmp $0x3,%edx 1190c8: 74 0e je 1190d8 <_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 ); } } 1190ca: 8d 65 f4 lea -0xc(%ebp),%esp 1190cd: 5b pop %ebx 1190ce: 5e pop %esi 1190cf: 5f pop %edi 1190d0: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1190d1: e9 4e 2b 00 00 jmp 11bc24 <_Thread_Enable_dispatch> 1190d6: 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 ); 1190d8: 9c pushf 1190d9: fa cli 1190da: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1190dd: 8b 0d 28 24 14 00 mov 0x142428,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 1190e3: 8b 53 74 mov 0x74(%ebx),%edx 1190e6: 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)); 1190e9: 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; 1190ec: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 1190ef: 39 fa cmp %edi,%edx 1190f1: 74 21 je 119114 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1190f3: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 1190f6: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1190f9: 0f 86 a1 00 00 00 jbe 1191a0 <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1190ff: 89 ce mov %ecx,%esi 119101: 2b 75 d4 sub -0x2c(%ebp),%esi 119104: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 119107: 39 f7 cmp %esi,%edi 119109: 0f 86 9b 00 00 00 jbe 1191aa <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 11910f: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119111: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119114: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119117: ff 75 e4 pushl -0x1c(%ebp) 11911a: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11911b: 83 ec 08 sub $0x8,%esp 11911e: 83 c0 10 add $0x10,%eax 119121: 50 push %eax 119122: 8d 43 68 lea 0x68(%ebx),%eax 119125: 50 push %eax 119126: e8 01 3e 00 00 call 11cf2c <_Watchdog_Insert> if ( !ts->active ) { 11912b: 8a 43 7c mov 0x7c(%ebx),%al 11912e: 83 c4 10 add $0x10,%esp 119131: 84 c0 test %al,%al 119133: 75 95 jne 1190ca <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119135: 89 d8 mov %ebx,%eax 119137: e8 4c fd ff ff call 118e88 <_Timer_server_Reset_tod_system_watchdog> 11913c: eb 8c jmp 1190ca <_Timer_server_Schedule_operation_method+0x46> 11913e: 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 ); 119140: 9c pushf 119141: fa cli 119142: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119145: 8b 0d e4 24 14 00 mov 0x1424e4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 11914b: 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)); 11914e: 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; 119151: 8d 73 34 lea 0x34(%ebx),%esi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 119154: 39 f2 cmp %esi,%edx 119156: 74 10 je 119168 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119158: 89 ce mov %ecx,%esi 11915a: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 11915c: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 11915f: 39 fe cmp %edi,%esi 119161: 73 39 jae 11919c <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 119163: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119165: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119168: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11916b: ff 75 e4 pushl -0x1c(%ebp) 11916e: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11916f: 83 ec 08 sub $0x8,%esp 119172: 83 c0 10 add $0x10,%eax 119175: 50 push %eax 119176: 8d 43 30 lea 0x30(%ebx),%eax 119179: 50 push %eax 11917a: e8 ad 3d 00 00 call 11cf2c <_Watchdog_Insert> if ( !ts->active ) { 11917f: 8a 43 7c mov 0x7c(%ebx),%al 119182: 83 c4 10 add $0x10,%esp 119185: 84 c0 test %al,%al 119187: 0f 85 3d ff ff ff jne 1190ca <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 11918d: 89 d8 mov %ebx,%eax 11918f: e8 a4 fc ff ff call 118e38 <_Timer_server_Reset_interval_system_watchdog> 119194: e9 31 ff ff ff jmp 1190ca <_Timer_server_Schedule_operation_method+0x46> 119199: 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; 11919c: 31 ff xor %edi,%edi 11919e: eb c5 jmp 119165 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1191a0: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 1191a3: 29 cf sub %ecx,%edi 1191a5: e9 67 ff ff ff jmp 119111 <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1191aa: 31 ff xor %edi,%edi <== NOT EXECUTED 1191ac: e9 60 ff ff ff jmp 119111 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010fcb8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fcb8: 55 push %ebp 10fcb9: 89 e5 mov %esp,%ebp 10fcbb: 57 push %edi 10fcbc: 56 push %esi 10fcbd: 53 push %ebx 10fcbe: 83 ec 2c sub $0x2c,%esp 10fcc1: 8b 45 08 mov 0x8(%ebp),%eax 10fcc4: 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; 10fcc7: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10fcc9: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fccc: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10fcd1: 8b 01 mov (%ecx),%eax 10fcd3: f7 eb imul %ebx 10fcd5: 89 45 e0 mov %eax,-0x20(%ebp) 10fcd8: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10fcdb: 8b 41 04 mov 0x4(%ecx),%eax 10fcde: 99 cltd 10fcdf: 01 45 e0 add %eax,-0x20(%ebp) 10fce2: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fce5: 8b 55 e4 mov -0x1c(%ebp),%edx 10fce8: 0b 55 e0 or -0x20(%ebp),%edx 10fceb: 74 73 je 10fd60 <_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; 10fced: 89 f8 mov %edi,%eax 10fcef: f7 eb imul %ebx 10fcf1: 89 45 d0 mov %eax,-0x30(%ebp) 10fcf4: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fcf7: 89 f7 mov %esi,%edi 10fcf9: c1 ff 1f sar $0x1f,%edi 10fcfc: 01 75 d0 add %esi,-0x30(%ebp) 10fcff: 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; 10fd02: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10fd09: bb a0 86 01 00 mov $0x186a0,%ebx 10fd0e: 8b 45 d0 mov -0x30(%ebp),%eax 10fd11: f7 e3 mul %ebx 10fd13: 8d 34 11 lea (%ecx,%edx,1),%esi 10fd16: ff 75 e4 pushl -0x1c(%ebp) 10fd19: ff 75 e0 pushl -0x20(%ebp) 10fd1c: 56 push %esi 10fd1d: 50 push %eax 10fd1e: e8 4d 0c 01 00 call 120970 <__udivdi3> 10fd23: 83 c4 10 add $0x10,%esp 10fd26: 89 c3 mov %eax,%ebx 10fd28: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fd2a: 6a 00 push $0x0 10fd2c: 68 e8 03 00 00 push $0x3e8 10fd31: 52 push %edx 10fd32: 50 push %eax 10fd33: e8 38 0c 01 00 call 120970 <__udivdi3> 10fd38: 83 c4 10 add $0x10,%esp 10fd3b: 8b 55 10 mov 0x10(%ebp),%edx 10fd3e: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fd40: 6a 00 push $0x0 10fd42: 68 e8 03 00 00 push $0x3e8 10fd47: 56 push %esi 10fd48: 53 push %ebx 10fd49: e8 32 0d 01 00 call 120a80 <__umoddi3> 10fd4e: 83 c4 10 add $0x10,%esp 10fd51: 8b 55 14 mov 0x14(%ebp),%edx 10fd54: 89 02 mov %eax,(%edx) } 10fd56: 8d 65 f4 lea -0xc(%ebp),%esp 10fd59: 5b pop %ebx 10fd5a: 5e pop %esi 10fd5b: 5f pop %edi 10fd5c: c9 leave 10fd5d: c3 ret 10fd5e: 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; 10fd60: 8b 45 10 mov 0x10(%ebp),%eax 10fd63: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fd69: 8b 55 14 mov 0x14(%ebp),%edx 10fd6c: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fd72: 8d 65 f4 lea -0xc(%ebp),%esp 10fd75: 5b pop %ebx 10fd76: 5e pop %esi 10fd77: 5f pop %edi 10fd78: c9 leave 10fd79: c3 ret =============================================================================== 0011fa1c <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 11fa1c: 55 push %ebp 11fa1d: 89 e5 mov %esp,%ebp 11fa1f: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 11fa22: 85 c0 test %eax,%eax 11fa24: 74 1a je 11fa40 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 11fa26: 8b 10 mov (%eax),%edx 11fa28: 85 d2 test %edx,%edx 11fa2a: 78 14 js 11fa40 <_Timespec_Is_valid+0x24><== NEVER TAKEN return false; if ( time->tv_nsec < 0 ) 11fa2c: 8b 40 04 mov 0x4(%eax),%eax 11fa2f: 85 c0 test %eax,%eax 11fa31: 78 0d js 11fa40 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 11fa33: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 11fa38: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11fa3b: c9 leave 11fa3c: c3 ret 11fa3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 11fa40: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11fa42: c9 leave 11fa43: c3 ret =============================================================================== 0010e3dc <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10e3dc: 55 push %ebp 10e3dd: 89 e5 mov %esp,%ebp 10e3df: 56 push %esi 10e3e0: 53 push %ebx 10e3e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10e3e4: 8b 75 0c mov 0xc(%ebp),%esi 10e3e7: 8b 45 10 mov 0x10(%ebp),%eax if (end->tv_nsec < start->tv_nsec) { 10e3ea: 8b 4e 04 mov 0x4(%esi),%ecx 10e3ed: 8b 53 04 mov 0x4(%ebx),%edx 10e3f0: 39 d1 cmp %edx,%ecx 10e3f2: 7c 10 jl 10e404 <_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; 10e3f4: 8b 36 mov (%esi),%esi 10e3f6: 2b 33 sub (%ebx),%esi 10e3f8: 89 30 mov %esi,(%eax) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10e3fa: 29 d1 sub %edx,%ecx 10e3fc: 89 48 04 mov %ecx,0x4(%eax) } } 10e3ff: 5b pop %ebx 10e400: 5e pop %esi 10e401: c9 leave 10e402: c3 ret 10e403: 90 nop <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 10e404: 8b 36 mov (%esi),%esi 10e406: 4e dec %esi 10e407: 2b 33 sub (%ebx),%esi 10e409: 89 30 mov %esi,(%eax) result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 10e40b: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10e411: 29 d1 sub %edx,%ecx 10e413: 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; } } 10e416: 5b pop %ebx 10e417: 5e pop %esi 10e418: c9 leave 10e419: c3 ret =============================================================================== 00111924 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 111924: 55 push %ebp 111925: 89 e5 mov %esp,%ebp 111927: 56 push %esi 111928: 53 push %ebx 111929: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 11192c: 8b 33 mov (%ebx),%esi 11192e: 85 f6 test %esi,%esi 111930: 75 07 jne 111939 <_Timespec_To_ticks+0x15> 111932: 8b 43 04 mov 0x4(%ebx),%eax 111935: 85 c0 test %eax,%eax 111937: 74 37 je 111970 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 111939: e8 72 18 00 00 call 1131b0 11193e: 89 c1 mov %eax,%ecx 111940: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 111943: a1 2c 32 12 00 mov 0x12322c,%eax 111948: 8d 04 80 lea (%eax,%eax,4),%eax 11194b: 8d 04 80 lea (%eax,%eax,4),%eax 11194e: 8d 34 80 lea (%eax,%eax,4),%esi 111951: c1 e6 03 shl $0x3,%esi 111954: 8b 43 04 mov 0x4(%ebx),%eax 111957: 31 d2 xor %edx,%edx 111959: f7 f6 div %esi if (ticks) 11195b: 01 c8 add %ecx,%eax 11195d: 74 05 je 111964 <_Timespec_To_ticks+0x40> return ticks; return 1; } 11195f: 5b pop %ebx 111960: 5e pop %esi 111961: c9 leave 111962: c3 ret 111963: 90 nop <== NOT EXECUTED ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 111964: b8 01 00 00 00 mov $0x1,%eax } 111969: 5b pop %ebx 11196a: 5e pop %esi 11196b: c9 leave 11196c: c3 ret 11196d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 111970: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 111972: 5b pop %ebx 111973: 5e pop %esi 111974: c9 leave 111975: c3 ret =============================================================================== 0010e558 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e558: 55 push %ebp 10e559: 89 e5 mov %esp,%ebp 10e55b: 57 push %edi 10e55c: 56 push %esi 10e55d: 53 push %ebx 10e55e: 83 ec 1c sub $0x1c,%esp 10e561: 8b 75 08 mov 0x8(%ebp),%esi 10e564: 8b 7d 10 mov 0x10(%ebp),%edi 10e567: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e56a: 8b 1d 14 76 12 00 mov 0x127614,%ebx 10e570: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx 10e576: 74 25 je 10e59d <_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 ); 10e578: 0f b6 c0 movzbl %al,%eax 10e57b: 89 45 e4 mov %eax,-0x1c(%ebp) 10e57e: 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 ) 10e580: 8b 43 30 mov 0x30(%ebx),%eax 10e583: 85 c0 test %eax,%eax 10e585: 74 0b je 10e592 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e587: 52 push %edx 10e588: 57 push %edi 10e589: ff 75 e4 pushl -0x1c(%ebp) 10e58c: 56 push %esi 10e58d: ff d0 call *%eax 10e58f: 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 ) { 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 76 12 00 cmp $0x12760c,%ebx 10e59b: 75 e3 jne 10e580 <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e59d: 8d 65 f4 lea -0xc(%ebp),%esp 10e5a0: 5b pop %ebx 10e5a1: 5e pop %esi 10e5a2: 5f pop %edi 10e5a3: c9 leave 10e5a4: c3 ret =============================================================================== 0010e41c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e41c: 55 push %ebp 10e41d: 89 e5 mov %esp,%ebp 10e41f: 57 push %edi 10e420: 56 push %esi 10e421: 53 push %ebx 10e422: 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; 10e425: a1 58 32 12 00 mov 0x123258,%eax 10e42a: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e42d: 8b 35 5c 32 12 00 mov 0x12325c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e433: c7 05 0c 76 12 00 10 movl $0x127610,0x12760c 10e43a: 76 12 00 the_chain->permanent_null = NULL; 10e43d: c7 05 10 76 12 00 00 movl $0x0,0x127610 10e444: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e447: c7 05 14 76 12 00 0c movl $0x12760c,0x127614 10e44e: 76 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e451: c7 05 d8 73 12 00 dc movl $0x1273dc,0x1273d8 10e458: 73 12 00 the_chain->permanent_null = NULL; 10e45b: c7 05 dc 73 12 00 00 movl $0x0,0x1273dc 10e462: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e465: c7 05 e0 73 12 00 d8 movl $0x1273d8,0x1273e0 10e46c: 73 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e46f: 85 f6 test %esi,%esi 10e471: 74 64 je 10e4d7 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e473: 89 c2 mov %eax,%edx 10e475: 8d 04 40 lea (%eax,%eax,2),%eax 10e478: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e47b: c1 e1 02 shl $0x2,%ecx 10e47e: 83 ec 0c sub $0xc,%esp 10e481: 51 push %ecx 10e482: 89 4d d8 mov %ecx,-0x28(%ebp) 10e485: e8 c6 04 00 00 call 10e950 <_Workspace_Allocate_or_fatal_error> 10e48a: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e48c: 31 c0 xor %eax,%eax 10e48e: 8b 4d d8 mov -0x28(%ebp),%ecx 10e491: 89 df mov %ebx,%edi 10e493: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e495: 83 c4 10 add $0x10,%esp 10e498: 8b 45 dc mov -0x24(%ebp),%eax 10e49b: 85 c0 test %eax,%eax 10e49d: 74 38 je 10e4d7 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e49f: 89 75 e4 mov %esi,-0x1c(%ebp) 10e4a2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e4a9: 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; 10e4ac: 8d 7b 14 lea 0x14(%ebx),%edi 10e4af: 8b 75 e4 mov -0x1c(%ebp),%esi 10e4b2: b9 08 00 00 00 mov $0x8,%ecx 10e4b7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e4b9: 83 ec 0c sub $0xc,%esp 10e4bc: 53 push %ebx 10e4bd: e8 b6 34 00 00 call 111978 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e4c2: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e4c5: ff 45 e0 incl -0x20(%ebp) 10e4c8: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e4cc: 83 c4 10 add $0x10,%esp 10e4cf: 8b 45 e0 mov -0x20(%ebp),%eax 10e4d2: 39 45 dc cmp %eax,-0x24(%ebp) 10e4d5: 77 d5 ja 10e4ac <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e4d7: 8d 65 f4 lea -0xc(%ebp),%esp 10e4da: 5b pop %ebx 10e4db: 5e pop %esi 10e4dc: 5f pop %edi 10e4dd: c9 leave 10e4de: c3 ret =============================================================================== 0010fa94 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10fa94: 55 push %ebp 10fa95: 89 e5 mov %esp,%ebp 10fa97: 53 push %ebx 10fa98: 83 ec 10 sub $0x10,%esp 10fa9b: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10fa9e: 53 push %ebx 10fa9f: e8 6c d9 ff ff call 10d410 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10faa4: 83 c4 10 add $0x10,%esp 10faa7: 8b 43 24 mov 0x24(%ebx),%eax 10faaa: 85 c0 test %eax,%eax 10faac: 74 12 je 10fac0 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10faae: 83 c3 08 add $0x8,%ebx 10fab1: 89 5d 08 mov %ebx,0x8(%ebp) } 10fab4: 8b 5d fc mov -0x4(%ebp),%ebx 10fab7: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10fab8: e9 53 d9 ff ff jmp 10d410 <_Chain_Extract> 10fabd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 10fac0: 8b 5d fc mov -0x4(%ebp),%ebx 10fac3: c9 leave 10fac4: c3 ret =============================================================================== 0010e4e0 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e4e0: 55 push %ebp 10e4e1: 89 e5 mov %esp,%ebp 10e4e3: 56 push %esi 10e4e4: 53 push %ebx 10e4e5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e4e8: 8b 1d 0c 76 12 00 mov 0x12760c,%ebx 10e4ee: 81 fb 10 76 12 00 cmp $0x127610,%ebx 10e4f4: 74 1c je 10e512 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e4f6: 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 ) 10e4f8: 8b 43 28 mov 0x28(%ebx),%eax 10e4fb: 85 c0 test %eax,%eax 10e4fd: 74 09 je 10e508 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e4ff: 83 ec 0c sub $0xc,%esp 10e502: 56 push %esi 10e503: ff d0 call *%eax 10e505: 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 ) { 10e508: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e50a: 81 fb 10 76 12 00 cmp $0x127610,%ebx 10e510: 75 e6 jne 10e4f8 <_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 ); } } 10e512: 8d 65 f8 lea -0x8(%ebp),%esp 10e515: 5b pop %ebx 10e516: 5e pop %esi 10e517: c9 leave 10e518: c3 ret =============================================================================== 0010e5a8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e5a8: 55 push %ebp 10e5a9: 89 e5 mov %esp,%ebp 10e5ab: 56 push %esi 10e5ac: 53 push %ebx 10e5ad: 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 ; 10e5b0: 8b 1d 0c 76 12 00 mov 0x12760c,%ebx 10e5b6: 81 fb 10 76 12 00 cmp $0x127610,%ebx 10e5bc: 74 26 je 10e5e4 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e5be: 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 ) { 10e5c0: 8b 43 14 mov 0x14(%ebx),%eax 10e5c3: 85 c0 test %eax,%eax 10e5c5: 74 13 je 10e5da <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e5c7: 83 ec 08 sub $0x8,%esp 10e5ca: 56 push %esi 10e5cb: ff 35 98 79 12 00 pushl 0x127998 10e5d1: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e5d3: 83 c4 10 add $0x10,%esp 10e5d6: 84 c0 test %al,%al 10e5d8: 74 16 je 10e5f0 <_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 ) { 10e5da: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e5dc: 81 fb 10 76 12 00 cmp $0x127610,%ebx 10e5e2: 75 dc jne 10e5c0 <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e5e4: b0 01 mov $0x1,%al } 10e5e6: 8d 65 f8 lea -0x8(%ebp),%esp 10e5e9: 5b pop %ebx 10e5ea: 5e pop %esi 10e5eb: c9 leave 10e5ec: c3 ret 10e5ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e5f0: 31 c0 xor %eax,%eax } } return true; } 10e5f2: 8d 65 f8 lea -0x8(%ebp),%esp 10e5f5: 5b pop %ebx 10e5f6: 5e pop %esi 10e5f7: c9 leave 10e5f8: c3 ret =============================================================================== 0010e5fc <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e5fc: 55 push %ebp 10e5fd: 89 e5 mov %esp,%ebp 10e5ff: 56 push %esi 10e600: 53 push %ebx 10e601: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e604: 8b 1d 14 76 12 00 mov 0x127614,%ebx 10e60a: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx 10e610: 74 23 je 10e635 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e612: 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 ) 10e614: 8b 43 20 mov 0x20(%ebx),%eax 10e617: 85 c0 test %eax,%eax 10e619: 74 0f je 10e62a <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e61b: 83 ec 08 sub $0x8,%esp 10e61e: 56 push %esi 10e61f: ff 35 98 79 12 00 pushl 0x127998 10e625: ff d0 call *%eax 10e627: 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 ) { 10e62a: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e62d: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx 10e633: 75 df jne 10e614 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e635: 8d 65 f8 lea -0x8(%ebp),%esp 10e638: 5b pop %ebx 10e639: 5e pop %esi 10e63a: c9 leave 10e63b: c3 ret =============================================================================== 0010e51c <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e51c: 55 push %ebp 10e51d: 89 e5 mov %esp,%ebp 10e51f: 56 push %esi 10e520: 53 push %ebx 10e521: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e524: 8b 1d 14 76 12 00 mov 0x127614,%ebx 10e52a: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx 10e530: 74 1d je 10e54f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e532: 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 ) 10e534: 8b 43 2c mov 0x2c(%ebx),%eax 10e537: 85 c0 test %eax,%eax 10e539: 74 09 je 10e544 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e53b: 83 ec 0c sub $0xc,%esp 10e53e: 56 push %esi 10e53f: ff d0 call *%eax 10e541: 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 ) { 10e544: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e547: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx 10e54d: 75 e5 jne 10e534 <_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 ); } } 10e54f: 8d 65 f8 lea -0x8(%ebp),%esp 10e552: 5b pop %ebx 10e553: 5e pop %esi 10e554: c9 leave 10e555: c3 ret =============================================================================== 0010f1e4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f1e4: 55 push %ebp 10f1e5: 89 e5 mov %esp,%ebp 10f1e7: 56 push %esi 10f1e8: 53 push %ebx 10f1e9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f1ec: 8b 1d 4c 9b 12 00 mov 0x129b4c,%ebx 10f1f2: 81 fb 50 9b 12 00 cmp $0x129b50,%ebx 10f1f8: 74 22 je 10f21c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f1fa: 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 ) 10f1fc: 8b 43 1c mov 0x1c(%ebx),%eax 10f1ff: 85 c0 test %eax,%eax 10f201: 74 0f je 10f212 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f203: 83 ec 08 sub $0x8,%esp 10f206: 56 push %esi 10f207: ff 35 d8 9e 12 00 pushl 0x129ed8 10f20d: ff d0 call *%eax 10f20f: 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 ) { 10f212: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f214: 81 fb 50 9b 12 00 cmp $0x129b50,%ebx 10f21a: 75 e0 jne 10f1fc <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f21c: 8d 65 f8 lea -0x8(%ebp),%esp 10f21f: 5b pop %ebx 10f220: 5e pop %esi 10f221: c9 leave 10f222: c3 ret =============================================================================== 0010e63c <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e63c: 55 push %ebp 10e63d: 89 e5 mov %esp,%ebp 10e63f: 56 push %esi 10e640: 53 push %ebx 10e641: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e644: 8b 1d 0c 76 12 00 mov 0x12760c,%ebx 10e64a: 81 fb 10 76 12 00 cmp $0x127610,%ebx 10e650: 74 22 je 10e674 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e652: 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 ) 10e654: 8b 43 18 mov 0x18(%ebx),%eax 10e657: 85 c0 test %eax,%eax 10e659: 74 0f je 10e66a <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e65b: 83 ec 08 sub $0x8,%esp 10e65e: 56 push %esi 10e65f: ff 35 98 79 12 00 pushl 0x127998 10e665: ff d0 call *%eax 10e667: 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 ) { 10e66a: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e66c: 81 fb 10 76 12 00 cmp $0x127610,%ebx 10e672: 75 e0 jne 10e654 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e674: 8d 65 f8 lea -0x8(%ebp),%esp 10e677: 5b pop %ebx 10e678: 5e pop %esi 10e679: c9 leave 10e67a: c3 ret =============================================================================== 0010e67c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e67c: 55 push %ebp 10e67d: 89 e5 mov %esp,%ebp 10e67f: 57 push %edi 10e680: 56 push %esi 10e681: 53 push %ebx 10e682: 83 ec 0c sub $0xc,%esp 10e685: 8b 7d 08 mov 0x8(%ebp),%edi 10e688: 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 ; 10e68b: 8b 1d d8 73 12 00 mov 0x1273d8,%ebx 10e691: 81 fb dc 73 12 00 cmp $0x1273dc,%ebx 10e697: 74 18 je 10e6b1 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e699: 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 ); 10e69c: 83 ec 08 sub $0x8,%esp 10e69f: 56 push %esi 10e6a0: 57 push %edi 10e6a1: 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 ) { 10e6a4: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e6a6: 83 c4 10 add $0x10,%esp 10e6a9: 81 fb dc 73 12 00 cmp $0x1273dc,%ebx 10e6af: 75 eb jne 10e69c <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e6b1: 8d 65 f4 lea -0xc(%ebp),%esp 10e6b4: 5b pop %ebx 10e6b5: 5e pop %esi 10e6b6: 5f pop %edi 10e6b7: c9 leave 10e6b8: c3 ret =============================================================================== 00110098 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 110098: 55 push %ebp 110099: 89 e5 mov %esp,%ebp 11009b: 57 push %edi 11009c: 56 push %esi 11009d: 53 push %ebx 11009e: 83 ec 1c sub $0x1c,%esp 1100a1: 8b 75 08 mov 0x8(%ebp),%esi 1100a4: 8b 4d 0c mov 0xc(%ebp),%ecx 1100a7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 1100aa: 9c pushf 1100ab: fa cli 1100ac: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1100ad: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1100af: 8d 7e 04 lea 0x4(%esi),%edi 1100b2: 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 ) ) { 1100b5: 39 fa cmp %edi,%edx 1100b7: 74 3d je 1100f6 <_Watchdog_Adjust+0x5e> switch ( direction ) { 1100b9: 85 c9 test %ecx,%ecx 1100bb: 75 43 jne 110100 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 1100bd: 85 db test %ebx,%ebx 1100bf: 74 35 je 1100f6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 1100c1: 8b 7a 10 mov 0x10(%edx),%edi 1100c4: 39 fb cmp %edi,%ebx 1100c6: 73 0f jae 1100d7 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 1100c8: eb 3e jmp 110108 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 1100ca: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 1100cc: 29 fb sub %edi,%ebx 1100ce: 74 26 je 1100f6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 1100d0: 8b 7a 10 mov 0x10(%edx),%edi 1100d3: 39 df cmp %ebx,%edi 1100d5: 77 31 ja 110108 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 1100d7: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 1100de: 50 push %eax 1100df: 9d popf _Watchdog_Tickle( header ); 1100e0: 83 ec 0c sub $0xc,%esp 1100e3: 56 push %esi 1100e4: e8 cb 01 00 00 call 1102b4 <_Watchdog_Tickle> _ISR_Disable( level ); 1100e9: 9c pushf 1100ea: fa cli 1100eb: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1100ec: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 1100ee: 83 c4 10 add $0x10,%esp 1100f1: 39 55 e4 cmp %edx,-0x1c(%ebp) 1100f4: 75 d6 jne 1100cc <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 1100f6: 50 push %eax 1100f7: 9d popf } 1100f8: 8d 65 f4 lea -0xc(%ebp),%esp 1100fb: 5b pop %ebx 1100fc: 5e pop %esi 1100fd: 5f pop %edi 1100fe: c9 leave 1100ff: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 110100: 49 dec %ecx 110101: 75 f3 jne 1100f6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 110103: 01 5a 10 add %ebx,0x10(%edx) break; 110106: eb ee jmp 1100f6 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 110108: 29 df sub %ebx,%edi 11010a: 89 7a 10 mov %edi,0x10(%edx) break; 11010d: eb e7 jmp 1100f6 <_Watchdog_Adjust+0x5e> =============================================================================== 0010e6bc <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e6bc: 55 push %ebp 10e6bd: 89 e5 mov %esp,%ebp 10e6bf: 57 push %edi 10e6c0: 56 push %esi 10e6c1: 53 push %ebx 10e6c2: 83 ec 04 sub $0x4,%esp 10e6c5: 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; 10e6c8: 8b 3d 94 79 12 00 mov 0x127994,%edi _ISR_Disable( level ); 10e6ce: 9c pushf 10e6cf: fa cli 10e6d0: 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 ) { 10e6d3: 8b 43 08 mov 0x8(%ebx),%eax 10e6d6: 85 c0 test %eax,%eax 10e6d8: 0f 85 9e 00 00 00 jne 10e77c <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e6de: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e6e5: a1 20 75 12 00 mov 0x127520,%eax 10e6ea: 40 inc %eax 10e6eb: a3 20 75 12 00 mov %eax,0x127520 restart: delta_interval = the_watchdog->initial; 10e6f0: 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 ; 10e6f3: 8b 4d 08 mov 0x8(%ebp),%ecx 10e6f6: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e6f8: 85 c0 test %eax,%eax 10e6fa: 74 5d je 10e759 <_Watchdog_Insert+0x9d> 10e6fc: 8b 32 mov (%edx),%esi 10e6fe: 85 f6 test %esi,%esi 10e700: 74 57 je 10e759 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e702: 8b 4a 10 mov 0x10(%edx),%ecx 10e705: 39 c8 cmp %ecx,%eax 10e707: 73 22 jae 10e72b <_Watchdog_Insert+0x6f> 10e709: eb 49 jmp 10e754 <_Watchdog_Insert+0x98> 10e70b: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e70c: 8b 35 88 74 12 00 mov 0x127488,%esi 10e712: 39 f7 cmp %esi,%edi 10e714: 72 72 jb 10e788 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e716: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e718: 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 ) ) 10e71a: 85 c0 test %eax,%eax 10e71c: 74 3b je 10e759 <_Watchdog_Insert+0x9d> 10e71e: 8b 0a mov (%edx),%ecx 10e720: 85 c9 test %ecx,%ecx 10e722: 74 35 je 10e759 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e724: 8b 4a 10 mov 0x10(%edx),%ecx 10e727: 39 c1 cmp %eax,%ecx 10e729: 77 29 ja 10e754 <_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 ); 10e72b: ff 75 f0 pushl -0x10(%ebp) 10e72e: 9d popf 10e72f: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e730: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e734: 74 d6 je 10e70c <_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; 10e736: 89 3d 88 74 12 00 mov %edi,0x127488 _Watchdog_Sync_count--; 10e73c: a1 20 75 12 00 mov 0x127520,%eax 10e741: 48 dec %eax 10e742: a3 20 75 12 00 mov %eax,0x127520 _ISR_Enable( level ); 10e747: ff 75 f0 pushl -0x10(%ebp) 10e74a: 9d popf } 10e74b: 58 pop %eax 10e74c: 5b pop %ebx 10e74d: 5e pop %esi 10e74e: 5f pop %edi 10e74f: c9 leave 10e750: c3 ret 10e751: 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; 10e754: 29 c1 sub %eax,%ecx 10e756: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e759: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e760: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e763: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e766: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e769: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e76b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e76d: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e76f: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e772: a1 24 75 12 00 mov 0x127524,%eax 10e777: 89 43 14 mov %eax,0x14(%ebx) 10e77a: eb ba jmp 10e736 <_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 ); 10e77c: ff 75 f0 pushl -0x10(%ebp) 10e77f: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e780: 58 pop %eax 10e781: 5b pop %ebx 10e782: 5e pop %esi 10e783: 5f pop %edi 10e784: c9 leave 10e785: c3 ret 10e786: 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; 10e788: 89 3d 88 74 12 00 mov %edi,0x127488 goto restart; 10e78e: e9 5d ff ff ff jmp 10e6f0 <_Watchdog_Insert+0x34> =============================================================================== 0010e7f4 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e7f4: 55 push %ebp 10e7f5: 89 e5 mov %esp,%ebp 10e7f7: 56 push %esi 10e7f8: 53 push %ebx 10e7f9: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e7fc: 9c pushf 10e7fd: fa cli 10e7fe: 59 pop %ecx previous_state = the_watchdog->state; 10e7ff: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e802: 83 f8 01 cmp $0x1,%eax 10e805: 74 4d je 10e854 <_Watchdog_Remove+0x60> <== NEVER TAKEN 10e807: 73 0f jae 10e818 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e809: 8b 1d 24 75 12 00 mov 0x127524,%ebx 10e80f: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e812: 51 push %ecx 10e813: 9d popf return( previous_state ); } 10e814: 5b pop %ebx 10e815: 5e pop %esi 10e816: c9 leave 10e817: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e818: 83 f8 03 cmp $0x3,%eax 10e81b: 77 ec ja 10e809 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e81d: 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 ); } 10e824: 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) ) 10e826: 8b 33 mov (%ebx),%esi 10e828: 85 f6 test %esi,%esi 10e82a: 74 06 je 10e832 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e82c: 8b 72 10 mov 0x10(%edx),%esi 10e82f: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e832: 8b 35 20 75 12 00 mov 0x127520,%esi 10e838: 85 f6 test %esi,%esi 10e83a: 74 0c je 10e848 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e83c: 8b 35 94 79 12 00 mov 0x127994,%esi 10e842: 89 35 88 74 12 00 mov %esi,0x127488 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e848: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e84b: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e84e: 89 1e mov %ebx,(%esi) 10e850: eb b7 jmp 10e809 <_Watchdog_Remove+0x15> 10e852: 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; 10e854: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e85b: eb ac jmp 10e809 <_Watchdog_Remove+0x15> =============================================================================== 0010fc80 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fc80: 55 push %ebp 10fc81: 89 e5 mov %esp,%ebp 10fc83: 57 push %edi 10fc84: 56 push %esi 10fc85: 53 push %ebx 10fc86: 83 ec 2c sub $0x2c,%esp 10fc89: 8b 55 08 mov 0x8(%ebp),%edx 10fc8c: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fc8f: 8b 78 24 mov 0x24(%eax),%edi 10fc92: 8b 70 20 mov 0x20(%eax),%esi 10fc95: 8b 58 1c mov 0x1c(%eax),%ebx 10fc98: 8b 48 0c mov 0xc(%eax),%ecx 10fc9b: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fc9e: 8b 48 10 mov 0x10(%eax),%ecx 10fca1: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fca4: 85 d2 test %edx,%edx 10fca6: 74 2c je 10fcd4 <_Watchdog_Report+0x54> 10fca8: b9 03 2f 12 00 mov $0x122f03,%ecx 10fcad: 83 ec 0c sub $0xc,%esp 10fcb0: 57 push %edi 10fcb1: 56 push %esi 10fcb2: 53 push %ebx 10fcb3: 50 push %eax 10fcb4: ff 75 d4 pushl -0x2c(%ebp) 10fcb7: ff 75 e4 pushl -0x1c(%ebp) 10fcba: 51 push %ecx 10fcbb: 52 push %edx 10fcbc: 68 06 39 12 00 push $0x123906 10fcc1: e8 4e 9d ff ff call 109a14 10fcc6: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fcc9: 8d 65 f4 lea -0xc(%ebp),%esp 10fccc: 5b pop %ebx 10fccd: 5e pop %esi 10fcce: 5f pop %edi 10fccf: c9 leave 10fcd0: c3 ret 10fcd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fcd4: b9 55 37 12 00 mov $0x123755,%ecx 10fcd9: 89 ca mov %ecx,%edx 10fcdb: eb d0 jmp 10fcad <_Watchdog_Report+0x2d> =============================================================================== 0010fc10 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10fc10: 55 push %ebp 10fc11: 89 e5 mov %esp,%ebp 10fc13: 57 push %edi 10fc14: 56 push %esi 10fc15: 53 push %ebx 10fc16: 83 ec 20 sub $0x20,%esp 10fc19: 8b 7d 08 mov 0x8(%ebp),%edi 10fc1c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fc1f: 9c pushf 10fc20: fa cli 10fc21: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fc24: 56 push %esi 10fc25: 57 push %edi 10fc26: 68 d0 38 12 00 push $0x1238d0 10fc2b: e8 e4 9d ff ff call 109a14 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fc30: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fc32: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10fc35: 83 c4 10 add $0x10,%esp 10fc38: 39 f3 cmp %esi,%ebx 10fc3a: 74 31 je 10fc6d <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fc3c: 83 ec 08 sub $0x8,%esp 10fc3f: 53 push %ebx 10fc40: 6a 00 push $0x0 10fc42: e8 39 00 00 00 call 10fc80 <_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 ) 10fc47: 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 ; 10fc49: 83 c4 10 add $0x10,%esp 10fc4c: 39 f3 cmp %esi,%ebx 10fc4e: 75 ec jne 10fc3c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10fc50: 83 ec 08 sub $0x8,%esp 10fc53: 57 push %edi 10fc54: 68 e7 38 12 00 push $0x1238e7 10fc59: e8 b6 9d ff ff call 109a14 10fc5e: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fc61: ff 75 e4 pushl -0x1c(%ebp) 10fc64: 9d popf } 10fc65: 8d 65 f4 lea -0xc(%ebp),%esp 10fc68: 5b pop %ebx 10fc69: 5e pop %esi 10fc6a: 5f pop %edi 10fc6b: c9 leave 10fc6c: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fc6d: 83 ec 0c sub $0xc,%esp 10fc70: 68 f6 38 12 00 push $0x1238f6 10fc75: e8 9a 9d ff ff call 109a14 10fc7a: 83 c4 10 add $0x10,%esp 10fc7d: eb e2 jmp 10fc61 <_Watchdog_Report_chain+0x51> =============================================================================== 0010e8cc <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e8cc: 55 push %ebp 10e8cd: 89 e5 mov %esp,%ebp 10e8cf: 57 push %edi 10e8d0: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e8d1: 8b 1d 20 32 12 00 mov 0x123220,%ebx uintptr_t size = Configuration.work_space_size; 10e8d7: 8b 15 24 32 12 00 mov 0x123224,%edx if ( Configuration.do_zero_of_workspace ) 10e8dd: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10e8e4: 75 1e jne 10e904 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e8e6: 6a 04 push $0x4 10e8e8: 52 push %edx 10e8e9: 53 push %ebx 10e8ea: 68 00 74 12 00 push $0x127400 10e8ef: e8 7c dd ff ff call 10c670 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e8f4: 83 c4 10 add $0x10,%esp 10e8f7: 85 c0 test %eax,%eax 10e8f9: 74 13 je 10e90e <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e8fb: 8d 65 f8 lea -0x8(%ebp),%esp 10e8fe: 5b pop %ebx 10e8ff: 5f pop %edi 10e900: c9 leave 10e901: c3 ret 10e902: 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 ); 10e904: 31 c0 xor %eax,%eax 10e906: 89 df mov %ebx,%edi 10e908: 89 d1 mov %edx,%ecx 10e90a: f3 aa rep stos %al,%es:(%edi) 10e90c: eb d8 jmp 10e8e6 <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e90e: 50 push %eax 10e90f: 6a 02 push $0x2 10e911: 6a 01 push $0x1 10e913: 6a 00 push $0x0 10e915: e8 52 e0 ff ff call 10c96c <_Internal_error_Occurred> =============================================================================== 0010b65c : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10b65c: 55 push %ebp 10b65d: 89 e5 mov %esp,%ebp 10b65f: 57 push %edi 10b660: 56 push %esi 10b661: 53 push %ebx 10b662: 83 ec 1c sub $0x1c,%esp 10b665: 8b 5d 08 mov 0x8(%ebp),%ebx 10b668: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10b66b: 85 db test %ebx,%ebx 10b66d: 0f 84 f1 00 00 00 je 10b764 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10b673: 8b 53 04 mov 0x4(%ebx),%edx 10b676: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10b67c: 0f 87 e2 00 00 00 ja 10b764 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10b682: 85 f6 test %esi,%esi 10b684: 74 10 je 10b696 olddelta->tv_sec = 0; 10b686: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10b68c: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10b693: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10b696: 8b 03 mov (%ebx),%eax 10b698: 8d 04 80 lea (%eax,%eax,4),%eax 10b69b: 8d 04 80 lea (%eax,%eax,4),%eax 10b69e: 8d 04 80 lea (%eax,%eax,4),%eax 10b6a1: 8d 04 80 lea (%eax,%eax,4),%eax 10b6a4: 8d 04 80 lea (%eax,%eax,4),%eax 10b6a7: 8d 04 80 lea (%eax,%eax,4),%eax 10b6aa: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; 10b6ad: 8d 04 02 lea (%edx,%eax,1),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10b6b0: 3b 05 8c 49 12 00 cmp 0x12498c,%eax 10b6b6: 73 0c jae 10b6c4 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; 10b6b8: 31 c0 xor %eax,%eax } 10b6ba: 8d 65 f4 lea -0xc(%ebp),%esp 10b6bd: 5b pop %ebx 10b6be: 5e pop %esi 10b6bf: 5f pop %edi 10b6c0: c9 leave 10b6c1: c3 ret 10b6c2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b6c4: a1 94 8c 12 00 mov 0x128c94,%eax 10b6c9: 40 inc %eax 10b6ca: a3 94 8c 12 00 mov %eax,0x128c94 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10b6cf: 83 ec 0c sub $0xc,%esp 10b6d2: 8d 7d e0 lea -0x20(%ebp),%edi 10b6d5: 57 push %edi 10b6d6: e8 79 17 00 00 call 10ce54 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10b6db: 8b 03 mov (%ebx),%eax 10b6dd: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10b6e0: 8b 43 04 mov 0x4(%ebx),%eax 10b6e3: 8d 04 80 lea (%eax,%eax,4),%eax 10b6e6: 8d 04 80 lea (%eax,%eax,4),%eax 10b6e9: 8d 04 80 lea (%eax,%eax,4),%eax 10b6ec: c1 e0 03 shl $0x3,%eax 10b6ef: 03 45 e4 add -0x1c(%ebp),%eax 10b6f2: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b6f5: 83 c4 10 add $0x10,%esp 10b6f8: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b6fd: 76 18 jbe 10b717 10b6ff: 8b 55 e0 mov -0x20(%ebp),%edx 10b702: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10b704: 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( 10b709: 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 ) { 10b70a: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b70f: 77 f3 ja 10b704 <== NEVER TAKEN 10b711: 89 45 e4 mov %eax,-0x1c(%ebp) 10b714: 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) ) { 10b717: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b71c: 77 19 ja 10b737 <== NEVER TAKEN 10b71e: 8b 55 e0 mov -0x20(%ebp),%edx 10b721: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10b724: 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( 10b729: 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) ) { 10b72a: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b72f: 76 f3 jbe 10b724 10b731: 89 45 e4 mov %eax,-0x1c(%ebp) 10b734: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10b737: 83 ec 0c sub $0xc,%esp 10b73a: 57 push %edi 10b73b: e8 a4 17 00 00 call 10cee4 <_TOD_Set> _Thread_Enable_dispatch(); 10b740: e8 af 29 00 00 call 10e0f4 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10b745: 83 c4 10 add $0x10,%esp 10b748: 85 f6 test %esi,%esi 10b74a: 0f 84 68 ff ff ff je 10b6b8 *olddelta = *delta; 10b750: 8b 03 mov (%ebx),%eax 10b752: 8b 53 04 mov 0x4(%ebx),%edx 10b755: 89 06 mov %eax,(%esi) 10b757: 89 56 04 mov %edx,0x4(%esi) return 0; 10b75a: 31 c0 xor %eax,%eax } 10b75c: 8d 65 f4 lea -0xc(%ebp),%esp 10b75f: 5b pop %ebx 10b760: 5e pop %esi 10b761: 5f pop %edi 10b762: c9 leave 10b763: 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 ); 10b764: e8 d7 86 00 00 call 113e40 <__errno> 10b769: c7 00 16 00 00 00 movl $0x16,(%eax) 10b76f: b8 ff ff ff ff mov $0xffffffff,%eax 10b774: e9 41 ff ff ff jmp 10b6ba =============================================================================== 0010b4cc : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10b4cc: 55 push %ebp 10b4cd: 89 e5 mov %esp,%ebp 10b4cf: 83 ec 08 sub $0x8,%esp 10b4d2: 8b 45 08 mov 0x8(%ebp),%eax 10b4d5: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b4d8: 85 d2 test %edx,%edx 10b4da: 74 14 je 10b4f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b4dc: 83 f8 01 cmp $0x1,%eax 10b4df: 74 47 je 10b528 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10b4e1: 83 f8 04 cmp $0x4,%eax 10b4e4: 74 32 je 10b518 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10b4e6: 83 f8 02 cmp $0x2,%eax 10b4e9: 74 2d je 10b518 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b4eb: 83 f8 03 cmp $0x3,%eax 10b4ee: 74 14 je 10b504 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b4f0: e8 7b 8e 00 00 call 114370 <__errno> 10b4f5: c7 00 16 00 00 00 movl $0x16,(%eax) 10b4fb: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b500: c9 leave 10b501: c3 ret 10b502: 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 ); 10b504: e8 67 8e 00 00 call 114370 <__errno> 10b509: c7 00 58 00 00 00 movl $0x58,(%eax) 10b50f: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b514: c9 leave 10b515: c3 ret 10b516: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10b518: 83 ec 0c sub $0xc,%esp 10b51b: 52 push %edx 10b51c: e8 8f 1e 00 00 call 10d3b0 <_TOD_Get_uptime_as_timespec> return 0; 10b521: 83 c4 10 add $0x10,%esp 10b524: 31 c0 xor %eax,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b526: c9 leave 10b527: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10b528: 83 ec 0c sub $0xc,%esp 10b52b: 52 push %edx 10b52c: e8 23 1e 00 00 call 10d354 <_TOD_Get> return 0; 10b531: 83 c4 10 add $0x10,%esp 10b534: 31 c0 xor %eax,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b536: c9 leave 10b537: c3 ret =============================================================================== 0010b538 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 10b538: 55 push %ebp 10b539: 89 e5 mov %esp,%ebp 10b53b: 83 ec 08 sub $0x8,%esp 10b53e: 8b 45 08 mov 0x8(%ebp),%eax 10b541: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b544: 85 d2 test %edx,%edx 10b546: 74 0f je 10b557 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b548: 83 f8 01 cmp $0x1,%eax 10b54b: 74 1f je 10b56c _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10b54d: 83 f8 02 cmp $0x2,%eax 10b550: 74 42 je 10b594 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b552: 83 f8 03 cmp $0x3,%eax 10b555: 74 3d je 10b594 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10b557: e8 14 8e 00 00 call 114370 <__errno> 10b55c: c7 00 16 00 00 00 movl $0x16,(%eax) 10b562: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b567: c9 leave 10b568: c3 ret 10b569: 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 ) 10b56c: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 10b572: 76 e3 jbe 10b557 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b574: a1 34 96 12 00 mov 0x129634,%eax 10b579: 40 inc %eax 10b57a: a3 34 96 12 00 mov %eax,0x129634 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 10b57f: 83 ec 0c sub $0xc,%esp 10b582: 52 push %edx 10b583: e8 80 1e 00 00 call 10d408 <_TOD_Set> _Thread_Enable_dispatch(); 10b588: e8 8b 30 00 00 call 10e618 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 10b58d: 83 c4 10 add $0x10,%esp 10b590: 31 c0 xor %eax,%eax } 10b592: c9 leave 10b593: 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 ); 10b594: e8 d7 8d 00 00 call 114370 <__errno> 10b599: c7 00 58 00 00 00 movl $0x58,(%eax) 10b59f: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b5a4: c9 leave 10b5a5: c3 ret =============================================================================== 0010b2bc : int getitimer( int which, struct itimerval *value ) { 10b2bc: 55 push %ebp 10b2bd: 89 e5 mov %esp,%ebp 10b2bf: 83 ec 08 sub $0x8,%esp if ( !value ) 10b2c2: 8b 45 0c mov 0xc(%ebp),%eax 10b2c5: 85 c0 test %eax,%eax 10b2c7: 74 2f je 10b2f8 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b2c9: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b2cd: 76 15 jbe 10b2e4 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b2cf: e8 c8 87 00 00 call 113a9c <__errno> 10b2d4: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b2da: b8 ff ff ff ff mov $0xffffffff,%eax 10b2df: c9 leave 10b2e0: c3 ret 10b2e1: 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 ); 10b2e4: e8 b3 87 00 00 call 113a9c <__errno> 10b2e9: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b2ef: b8 ff ff ff ff mov $0xffffffff,%eax 10b2f4: c9 leave 10b2f5: c3 ret 10b2f6: 66 90 xchg %ax,%ax <== NOT EXECUTED int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b2f8: e8 9f 87 00 00 call 113a9c <__errno> 10b2fd: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b303: eb d5 jmp 10b2da =============================================================================== 001243e4 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 1243e4: 55 push %ebp 1243e5: 89 e5 mov %esp,%ebp 1243e7: 57 push %edi 1243e8: 56 push %esi 1243e9: 53 push %ebx 1243ea: 83 ec 3c sub $0x3c,%esp 1243ed: 8b 75 0c mov 0xc(%ebp),%esi 1243f0: 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() ) 1243f3: e8 00 fd ff ff call 1240f8 1243f8: 3b 45 08 cmp 0x8(%ebp),%eax 1243fb: 0f 85 23 02 00 00 jne 124624 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 124401: 85 f6 test %esi,%esi 124403: 0f 84 30 02 00 00 je 124639 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 124409: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 12440c: 83 f9 1f cmp $0x1f,%ecx 12440f: 0f 87 24 02 00 00 ja 124639 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 ) 124415: 8d 04 76 lea (%esi,%esi,2),%eax 124418: 83 3c 85 48 e9 12 00 cmpl $0x1,0x12e948(,%eax,4) 12441f: 01 124420: 0f 84 ea 01 00 00 je 124610 /* * 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 ) ) 124426: 83 fe 08 cmp $0x8,%esi 124429: 0f 84 c9 00 00 00 je 1244f8 12442f: 83 fe 04 cmp $0x4,%esi 124432: 0f 84 c0 00 00 00 je 1244f8 124438: 83 fe 0b cmp $0xb,%esi 12443b: 0f 84 b7 00 00 00 je 1244f8 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 124441: bb 01 00 00 00 mov $0x1,%ebx 124446: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 124448: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 12444b: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 124452: 85 ff test %edi,%edi 124454: 0f 84 be 01 00 00 je 124618 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 12445a: 8b 07 mov (%edi),%eax 12445c: 89 45 e4 mov %eax,-0x1c(%ebp) 12445f: a1 54 e3 12 00 mov 0x12e354,%eax 124464: 40 inc %eax 124465: a3 54 e3 12 00 mov %eax,0x12e354 /* * 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; 12446a: 8b 0d 18 e9 12 00 mov 0x12e918,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 124470: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 124476: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 12447c: f7 d0 not %eax 12447e: 85 c3 test %eax,%ebx 124480: 75 34 jne 1244b6 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 124482: a1 e0 ea 12 00 mov 0x12eae0,%eax 124487: 3d e4 ea 12 00 cmp $0x12eae4,%eax 12448c: 75 1b jne 1244a9 12448e: e9 81 00 00 00 jmp 124514 124493: 90 nop <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 124494: 8b 92 cc 00 00 00 mov 0xcc(%edx),%edx 12449a: f7 d2 not %edx 12449c: 85 d3 test %edx,%ebx 12449e: 75 16 jne 1244b6 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 ) { 1244a0: 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 ; 1244a2: 3d e4 ea 12 00 cmp $0x12eae4,%eax 1244a7: 74 6b je 124514 <== ALWAYS TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 1244a9: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1244ab: 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) 1244b1: 85 58 30 test %ebx,0x30(%eax) 1244b4: 74 de je 124494 /* * 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 ) ) { 1244b6: 50 push %eax mask = signo_to_mask( sig ); /* * Build up a siginfo structure */ siginfo = &siginfo_struct; 1244b7: 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 ) ) { 1244ba: 50 push %eax 1244bb: 56 push %esi 1244bc: 51 push %ecx 1244bd: e8 ba 01 00 00 call 12467c <_POSIX_signals_Unblock_thread> 1244c2: 83 c4 10 add $0x10,%esp 1244c5: 84 c0 test %al,%al 1244c7: 75 1f jne 1244e8 /* * 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 ); 1244c9: 83 ec 0c sub $0xc,%esp 1244cc: 53 push %ebx 1244cd: e8 96 01 00 00 call 124668 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 1244d2: 8d 1c 76 lea (%esi,%esi,2),%ebx 1244d5: c1 e3 02 shl $0x2,%ebx 1244d8: 83 c4 10 add $0x10,%esp 1244db: 83 bb 40 e9 12 00 02 cmpl $0x2,0x12e940(%ebx) 1244e2: 0f 84 ec 00 00 00 je 1245d4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 1244e8: e8 37 e3 fe ff call 112824 <_Thread_Enable_dispatch> return 0; 1244ed: 31 c0 xor %eax,%eax } 1244ef: 8d 65 f4 lea -0xc(%ebp),%esp 1244f2: 5b pop %ebx 1244f3: 5e pop %esi 1244f4: 5f pop %edi 1244f5: c9 leave 1244f6: c3 ret 1244f7: 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 ); 1244f8: e8 57 03 00 00 call 124854 1244fd: 83 ec 08 sub $0x8,%esp 124500: 56 push %esi 124501: 50 push %eax 124502: e8 8d 02 00 00 call 124794 124507: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 12450a: 8d 65 f4 lea -0xc(%ebp),%esp 12450d: 5b pop %ebx 12450e: 5e pop %esi 12450f: 5f pop %edi 124510: c9 leave 124511: c3 ret 124512: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 124514: 0f b6 05 d4 9f 12 00 movzbl 0x129fd4,%eax 12451b: 40 inc %eax 12451c: 89 45 d4 mov %eax,-0x2c(%ebp) * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 12451f: 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++) { 124526: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) 12452d: 89 5d d0 mov %ebx,-0x30(%ebp) 124530: 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 ] ) 124533: 8b 55 cc mov -0x34(%ebp),%edx 124536: 8b 04 95 2c e3 12 00 mov 0x12e32c(,%edx,4),%eax 12453d: 85 c0 test %eax,%eax 12453f: 74 6c je 1245ad <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 124541: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 124544: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 124548: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 12454b: 85 f6 test %esi,%esi 12454d: 74 5e je 1245ad 12454f: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 124554: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 124557: 85 d2 test %edx,%edx 124559: 74 4d je 1245a8 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 12455b: 8b 4a 14 mov 0x14(%edx),%ecx 12455e: 3b 4d d4 cmp -0x2c(%ebp),%ecx 124561: 77 45 ja 1245a8 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 124563: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 124569: 8b 9b cc 00 00 00 mov 0xcc(%ebx),%ebx 12456f: f7 d3 not %ebx 124571: 85 5d d0 test %ebx,-0x30(%ebp) 124574: 74 32 je 1245a8 * * 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 ) { 124576: 3b 4d d4 cmp -0x2c(%ebp),%ecx 124579: 72 25 jb 1245a0 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 12457b: 8b 5d c8 mov -0x38(%ebp),%ebx 12457e: 8b 5b 10 mov 0x10(%ebx),%ebx 124581: 89 5d c4 mov %ebx,-0x3c(%ebp) 124584: 85 db test %ebx,%ebx 124586: 74 20 je 1245a8 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 124588: 8b 5a 10 mov 0x10(%edx),%ebx 12458b: 85 db test %ebx,%ebx 12458d: 74 11 je 1245a0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 12458f: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 124596: 75 10 jne 1245a8 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 124598: 81 e3 00 00 00 10 and $0x10000000,%ebx 12459e: 74 08 je 1245a8 */ if ( !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 1245a0: 89 4d d4 mov %ecx,-0x2c(%ebp) 1245a3: 89 55 c8 mov %edx,-0x38(%ebp) 1245a6: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1245a8: 40 inc %eax 1245a9: 39 c6 cmp %eax,%esi 1245ab: 73 a7 jae 124554 * + 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++) { 1245ad: ff 45 cc incl -0x34(%ebp) 1245b0: 83 7d cc 04 cmpl $0x4,-0x34(%ebp) 1245b4: 0f 85 79 ff ff ff jne 124533 1245ba: 8b 5d d0 mov -0x30(%ebp),%ebx 1245bd: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 1245c0: 8b 55 c8 mov -0x38(%ebp),%edx 1245c3: 85 d2 test %edx,%edx 1245c5: 0f 84 fe fe ff ff je 1244c9 1245cb: 8b 4d c8 mov -0x38(%ebp),%ecx 1245ce: e9 e3 fe ff ff jmp 1244b6 1245d3: 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 ); 1245d4: 83 ec 0c sub $0xc,%esp 1245d7: 68 c0 ea 12 00 push $0x12eac0 1245dc: e8 f7 ca fe ff call 1110d8 <_Chain_Get> if ( !psiginfo ) { 1245e1: 83 c4 10 add $0x10,%esp 1245e4: 85 c0 test %eax,%eax 1245e6: 74 66 je 12464e _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 1245e8: 8d 78 08 lea 0x8(%eax),%edi 1245eb: 8d 75 dc lea -0x24(%ebp),%esi 1245ee: b9 03 00 00 00 mov $0x3,%ecx 1245f3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 1245f5: 83 ec 08 sub $0x8,%esp 1245f8: 50 push %eax 1245f9: 81 c3 60 eb 12 00 add $0x12eb60,%ebx 1245ff: 53 push %ebx 124600: e8 97 ca fe ff call 11109c <_Chain_Append> 124605: 83 c4 10 add $0x10,%esp 124608: e9 db fe ff ff jmp 1244e8 12460d: 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; 124610: 31 c0 xor %eax,%eax 124612: e9 f3 fe ff ff jmp 12450a 124617: 90 nop <== NOT EXECUTED */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 124618: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 12461f: e9 3b fe ff ff jmp 12445f /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 124624: e8 f3 3e ff ff call 11851c <__errno> 124629: c7 00 03 00 00 00 movl $0x3,(%eax) 12462f: b8 ff ff ff ff mov $0xffffffff,%eax 124634: e9 d1 fe ff ff jmp 12450a */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 124639: e8 de 3e ff ff call 11851c <__errno> 12463e: c7 00 16 00 00 00 movl $0x16,(%eax) 124644: b8 ff ff ff ff mov $0xffffffff,%eax 124649: e9 bc fe ff ff jmp 12450a 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(); 12464e: e8 d1 e1 fe ff call 112824 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 124653: e8 c4 3e ff ff call 11851c <__errno> 124658: c7 00 0b 00 00 00 movl $0xb,(%eax) 12465e: 83 c8 ff or $0xffffffff,%eax 124661: e9 a4 fe ff ff jmp 12450a =============================================================================== 0010fae0 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10fae0: 55 push %ebp 10fae1: 89 e5 mov %esp,%ebp 10fae3: 57 push %edi 10fae4: 56 push %esi 10fae5: 83 ec 14 sub $0x14,%esp 10fae8: 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 ); 10faeb: 8d 45 f4 lea -0xc(%ebp),%eax 10faee: 50 push %eax 10faef: ff 75 08 pushl 0x8(%ebp) 10faf2: 68 e0 fe 12 00 push $0x12fee0 10faf7: e8 80 31 00 00 call 112c7c <_Objects_Get> switch ( location ) { 10fafc: 83 c4 10 add $0x10,%esp 10faff: 8b 4d f4 mov -0xc(%ebp),%ecx 10fb02: 85 c9 test %ecx,%ecx 10fb04: 74 1a je 10fb20 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fb06: e8 a5 9d 00 00 call 1198b0 <__errno> 10fb0b: c7 00 09 00 00 00 movl $0x9,(%eax) 10fb11: b8 ff ff ff ff mov $0xffffffff,%eax 10fb16: 66 90 xchg %ax,%ax } 10fb18: 8d 65 f8 lea -0x8(%ebp),%esp 10fb1b: 5e pop %esi 10fb1c: 5f pop %edi 10fb1d: c9 leave 10fb1e: c3 ret 10fb1f: 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; 10fb20: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10fb23: 85 f6 test %esi,%esi 10fb25: 74 39 je 10fb60 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10fb27: 8b 50 7c mov 0x7c(%eax),%edx 10fb2a: 85 d2 test %edx,%edx 10fb2c: 75 46 jne 10fb74 10fb2e: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10fb35: 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; 10fb38: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10fb3e: b9 05 00 00 00 mov $0x5,%ecx 10fb43: 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; 10fb45: c7 40 7c a8 fa 10 00 movl $0x10faa8,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10fb4c: 89 80 80 00 00 00 mov %eax,0x80(%eax) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10fb52: e8 35 3a 00 00 call 11358c <_Thread_Enable_dispatch> return 0; 10fb57: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fb59: 8d 65 f8 lea -0x8(%ebp),%esp 10fb5c: 5e pop %esi 10fb5d: 5f pop %edi 10fb5e: c9 leave 10fb5f: 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; 10fb60: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10fb67: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10fb6e: 00 00 00 10fb71: eb df jmp 10fb52 10fb73: 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(); 10fb74: e8 13 3a 00 00 call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10fb79: e8 32 9d 00 00 call 1198b0 <__errno> 10fb7e: c7 00 10 00 00 00 movl $0x10,(%eax) 10fb84: b8 ff ff ff ff mov $0xffffffff,%eax 10fb89: eb 8d jmp 10fb18 =============================================================================== 0010fb8c : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10fb8c: 55 push %ebp 10fb8d: 89 e5 mov %esp,%ebp 10fb8f: 57 push %edi 10fb90: 56 push %esi 10fb91: 53 push %ebx 10fb92: 83 ec 2c sub $0x2c,%esp 10fb95: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10fb98: a1 94 f9 12 00 mov 0x12f994,%eax 10fb9d: 40 inc %eax 10fb9e: a3 94 f9 12 00 mov %eax,0x12f994 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10fba3: 89 f0 mov %esi,%eax 10fba5: 25 00 02 00 00 and $0x200,%eax 10fbaa: 89 45 d4 mov %eax,-0x2c(%ebp) 10fbad: 0f 85 c9 00 00 00 jne 10fc7c /* struct mq_attr attr */ ) { va_list arg; mode_t mode; struct mq_attr *attr = NULL; 10fbb3: 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 ); 10fbba: 83 ec 0c sub $0xc,%esp 10fbbd: 68 e0 fe 12 00 push $0x12fee0 10fbc2: e8 05 2c 00 00 call 1127cc <_Objects_Allocate> 10fbc7: 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 ) { 10fbc9: 83 c4 10 add $0x10,%esp 10fbcc: 85 c0 test %eax,%eax 10fbce: 0f 84 b4 00 00 00 je 10fc88 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10fbd4: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10fbd7: 83 ec 08 sub $0x8,%esp 10fbda: 8d 45 e4 lea -0x1c(%ebp),%eax 10fbdd: 50 push %eax 10fbde: ff 75 08 pushl 0x8(%ebp) 10fbe1: e8 56 68 00 00 call 11643c <_POSIX_Message_queue_Name_to_id> 10fbe6: 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 ) { 10fbe8: 83 c4 10 add $0x10,%esp 10fbeb: 85 c0 test %eax,%eax 10fbed: 75 59 jne 10fc48 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10fbef: 81 e6 00 0a 00 00 and $0xa00,%esi 10fbf5: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10fbfb: 0f 84 a7 00 00 00 je 10fca8 Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) _Objects_Get( &_POSIX_Message_queue_Information, id, location ); 10fc01: 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 ); 10fc02: 8d 45 dc lea -0x24(%ebp),%eax 10fc05: 50 push %eax 10fc06: ff 75 e4 pushl -0x1c(%ebp) 10fc09: 68 40 fd 12 00 push $0x12fd40 10fc0e: e8 69 30 00 00 call 112c7c <_Objects_Get> 10fc13: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10fc16: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10fc19: 89 43 10 mov %eax,0x10(%ebx) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 10fc1c: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fc20: a1 fc fe 12 00 mov 0x12fefc,%eax 10fc25: 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; 10fc28: 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(); 10fc2f: e8 58 39 00 00 call 11358c <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10fc34: e8 53 39 00 00 call 11358c <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10fc39: 8b 43 08 mov 0x8(%ebx),%eax 10fc3c: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fc3f: 8d 65 f4 lea -0xc(%ebp),%esp 10fc42: 5b pop %ebx 10fc43: 5e pop %esi 10fc44: 5f pop %edi 10fc45: c9 leave 10fc46: c3 ret 10fc47: 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) ) ) { 10fc48: 83 f8 02 cmp $0x2,%eax 10fc4b: 0f 84 87 00 00 00 je 10fcd8 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 ); 10fc51: 83 ec 08 sub $0x8,%esp 10fc54: 53 push %ebx 10fc55: 68 e0 fe 12 00 push $0x12fee0 10fc5a: e8 e5 2e 00 00 call 112b44 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10fc5f: e8 28 39 00 00 call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10fc64: e8 47 9c 00 00 call 1198b0 <__errno> 10fc69: 89 38 mov %edi,(%eax) 10fc6b: 83 c4 10 add $0x10,%esp 10fc6e: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fc73: 8d 65 f4 lea -0xc(%ebp),%esp 10fc76: 5b pop %ebx 10fc77: 5e pop %esi 10fc78: 5f pop %edi 10fc79: c9 leave 10fc7a: c3 ret 10fc7b: 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 * ); 10fc7c: 8b 45 14 mov 0x14(%ebp),%eax 10fc7f: 89 45 d0 mov %eax,-0x30(%ebp) 10fc82: e9 33 ff ff ff jmp 10fbba 10fc87: 90 nop <== NOT EXECUTED va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10fc88: e8 ff 38 00 00 call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10fc8d: e8 1e 9c 00 00 call 1198b0 <__errno> 10fc92: c7 00 17 00 00 00 movl $0x17,(%eax) 10fc98: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fc9d: 8d 65 f4 lea -0xc(%ebp),%esp 10fca0: 5b pop %ebx 10fca1: 5e pop %esi 10fca2: 5f pop %edi 10fca3: c9 leave 10fca4: c3 ret 10fca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10fca8: 83 ec 08 sub $0x8,%esp 10fcab: 53 push %ebx 10fcac: 68 e0 fe 12 00 push $0x12fee0 10fcb1: e8 8e 2e 00 00 call 112b44 <_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(); 10fcb6: e8 d1 38 00 00 call 11358c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10fcbb: e8 f0 9b 00 00 call 1198b0 <__errno> 10fcc0: c7 00 11 00 00 00 movl $0x11,(%eax) 10fcc6: 83 c4 10 add $0x10,%esp 10fcc9: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10fcce: 8d 65 f4 lea -0xc(%ebp),%esp 10fcd1: 5b pop %ebx 10fcd2: 5e pop %esi 10fcd3: 5f pop %edi 10fcd4: c9 leave 10fcd5: c3 ret 10fcd6: 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) ) ) { 10fcd8: 8b 55 d4 mov -0x2c(%ebp),%edx 10fcdb: 85 d2 test %edx,%edx 10fcdd: 0f 84 6e ff ff ff je 10fc51 /* * 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( 10fce3: 8d 45 e0 lea -0x20(%ebp),%eax 10fce6: 50 push %eax 10fce7: ff 75 d0 pushl -0x30(%ebp) 10fcea: 6a 01 push $0x1 10fcec: ff 75 08 pushl 0x8(%ebp) 10fcef: e8 c0 65 00 00 call 1162b4 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10fcf4: 83 c4 10 add $0x10,%esp 10fcf7: 40 inc %eax 10fcf8: 74 26 je 10fd20 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10fcfa: 8b 45 e0 mov -0x20(%ebp),%eax 10fcfd: 89 43 10 mov %eax,0x10(%ebx) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 10fd00: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fd04: a1 fc fe 12 00 mov 0x12fefc,%eax 10fd09: 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; 10fd0c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10fd13: e8 74 38 00 00 call 11358c <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10fd18: 8b 43 08 mov 0x8(%ebx),%eax 10fd1b: e9 1f ff ff ff jmp 10fc3f 10fd20: 83 ec 08 sub $0x8,%esp 10fd23: 53 push %ebx 10fd24: 68 e0 fe 12 00 push $0x12fee0 10fd29: e8 16 2e 00 00 call 112b44 <_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(); 10fd2e: e8 59 38 00 00 call 11358c <_Thread_Enable_dispatch> return (mqd_t) -1; 10fd33: 83 c4 10 add $0x10,%esp 10fd36: b8 ff ff ff ff mov $0xffffffff,%eax 10fd3b: e9 ff fe ff ff jmp 10fc3f =============================================================================== 0010ff8c : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10ff8c: 55 push %ebp 10ff8d: 89 e5 mov %esp,%ebp 10ff8f: 56 push %esi 10ff90: 53 push %ebx 10ff91: 83 ec 10 sub $0x10,%esp 10ff94: 8b 75 0c mov 0xc(%ebp),%esi 10ff97: 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 ) 10ff9a: 85 f6 test %esi,%esi 10ff9c: 74 60 je 10fffe 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( 10ff9e: 51 push %ecx rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10ff9f: 8d 45 f4 lea -0xc(%ebp),%eax 10ffa2: 50 push %eax 10ffa3: ff 75 08 pushl 0x8(%ebp) 10ffa6: 68 e0 fe 12 00 push $0x12fee0 10ffab: e8 cc 2c 00 00 call 112c7c <_Objects_Get> switch ( location ) { 10ffb0: 83 c4 10 add $0x10,%esp 10ffb3: 8b 55 f4 mov -0xc(%ebp),%edx 10ffb6: 85 d2 test %edx,%edx 10ffb8: 75 32 jne 10ffec case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10ffba: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10ffbd: 85 db test %ebx,%ebx 10ffbf: 74 17 je 10ffd8 omqstat->mq_flags = the_mq_fd->oflag; 10ffc1: 8b 48 14 mov 0x14(%eax),%ecx 10ffc4: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10ffc6: 8b 4a 68 mov 0x68(%edx),%ecx 10ffc9: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10ffcc: 8b 4a 60 mov 0x60(%edx),%ecx 10ffcf: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10ffd2: 8b 52 64 mov 0x64(%edx),%edx 10ffd5: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10ffd8: 8b 16 mov (%esi),%edx 10ffda: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10ffdd: e8 aa 35 00 00 call 11358c <_Thread_Enable_dispatch> return 0; 10ffe2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10ffe4: 8d 65 f8 lea -0x8(%ebp),%esp 10ffe7: 5b pop %ebx 10ffe8: 5e pop %esi 10ffe9: c9 leave 10ffea: c3 ret 10ffeb: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10ffec: e8 bf 98 00 00 call 1198b0 <__errno> 10fff1: c7 00 09 00 00 00 movl $0x9,(%eax) 10fff7: b8 ff ff ff ff mov $0xffffffff,%eax 10fffc: eb e6 jmp 10ffe4 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 ); 10fffe: e8 ad 98 00 00 call 1198b0 <__errno> 110003: c7 00 16 00 00 00 movl $0x16,(%eax) 110009: b8 ff ff ff ff mov $0xffffffff,%eax 11000e: eb d4 jmp 10ffe4 =============================================================================== 0010fe28 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10fe28: 55 push %ebp 10fe29: 89 e5 mov %esp,%ebp 10fe2b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10fe2e: 85 c0 test %eax,%eax 10fe30: 74 12 je 10fe44 10fe32: 8b 10 mov (%eax),%edx 10fe34: 85 d2 test %edx,%edx 10fe36: 74 0c je 10fe44 return EINVAL; attr->is_initialized = false; 10fe38: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10fe3e: 31 c0 xor %eax,%eax } 10fe40: c9 leave 10fe41: c3 ret 10fe42: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_attr_destroy( pthread_attr_t *attr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 10fe44: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10fe49: c9 leave 10fe4a: c3 ret =============================================================================== 0010fe9c : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 10fe9c: 55 push %ebp 10fe9d: 89 e5 mov %esp,%ebp 10fe9f: 57 push %edi 10fea0: 56 push %esi 10fea1: 8b 75 08 mov 0x8(%ebp),%esi 10fea4: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 10fea7: 85 f6 test %esi,%esi 10fea9: 74 1d je 10fec8 10feab: 8b 16 mov (%esi),%edx 10fead: 85 d2 test %edx,%edx 10feaf: 74 17 je 10fec8 10feb1: 85 c0 test %eax,%eax 10feb3: 74 13 je 10fec8 return EINVAL; *param = attr->schedparam; 10feb5: 83 c6 18 add $0x18,%esi 10feb8: b9 07 00 00 00 mov $0x7,%ecx 10febd: 89 c7 mov %eax,%edi 10febf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 10fec1: 31 c0 xor %eax,%eax } 10fec3: 5e pop %esi 10fec4: 5f pop %edi 10fec5: c9 leave 10fec6: c3 ret 10fec7: 90 nop <== NOT EXECUTED const pthread_attr_t *attr, struct sched_param *param ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; 10fec8: b8 16 00 00 00 mov $0x16,%eax *param = attr->schedparam; return 0; } 10fecd: 5e pop %esi 10fece: 5f pop %edi 10fecf: c9 leave 10fed0: c3 ret =============================================================================== 00110914 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 110914: 55 push %ebp 110915: 89 e5 mov %esp,%ebp 110917: 8b 45 08 mov 0x8(%ebp),%eax 11091a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 11091d: 85 c0 test %eax,%eax 11091f: 74 0b je 11092c 110921: 8b 08 mov (%eax),%ecx 110923: 85 c9 test %ecx,%ecx 110925: 74 05 je 11092c return EINVAL; switch ( clock_allowed ) { 110927: 83 fa 01 cmp $0x1,%edx 11092a: 76 08 jbe 110934 case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; default: return EINVAL; 11092c: b8 16 00 00 00 mov $0x16,%eax } } 110931: c9 leave 110932: c3 ret 110933: 90 nop <== NOT EXECUTED return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 110934: 89 50 34 mov %edx,0x34(%eax) return 0; 110937: 31 c0 xor %eax,%eax default: return EINVAL; } } 110939: c9 leave 11093a: c3 ret =============================================================================== 0010ffa0 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 10ffa0: 55 push %ebp 10ffa1: 89 e5 mov %esp,%ebp 10ffa3: 8b 45 08 mov 0x8(%ebp),%eax 10ffa6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10ffa9: 85 c0 test %eax,%eax 10ffab: 74 0b je 10ffb8 10ffad: 8b 08 mov (%eax),%ecx 10ffaf: 85 c9 test %ecx,%ecx 10ffb1: 74 05 je 10ffb8 return EINVAL; switch ( detachstate ) { 10ffb3: 83 fa 01 cmp $0x1,%edx 10ffb6: 76 08 jbe 10ffc0 case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; default: return EINVAL; 10ffb8: b8 16 00 00 00 mov $0x16,%eax } } 10ffbd: c9 leave 10ffbe: c3 ret 10ffbf: 90 nop <== NOT EXECUTED return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 10ffc0: 89 50 38 mov %edx,0x38(%eax) return 0; 10ffc3: 31 c0 xor %eax,%eax default: return EINVAL; } } 10ffc5: c9 leave 10ffc6: c3 ret =============================================================================== 00111ab4 : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 111ab4: 55 push %ebp 111ab5: 89 e5 mov %esp,%ebp 111ab7: 8b 45 08 mov 0x8(%ebp),%eax 111aba: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111abd: 85 c0 test %eax,%eax 111abf: 74 1f je 111ae0 111ac1: 8b 08 mov (%eax),%ecx 111ac3: 85 c9 test %ecx,%ecx 111ac5: 74 19 je 111ae0 return EINVAL; switch ( inheritsched ) { 111ac7: 8d 4a ff lea -0x1(%edx),%ecx 111aca: 83 f9 01 cmp $0x1,%ecx 111acd: 76 09 jbe 111ad8 case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; default: return ENOTSUP; 111acf: b8 86 00 00 00 mov $0x86,%eax } } 111ad4: c9 leave 111ad5: c3 ret 111ad6: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 111ad8: 89 50 10 mov %edx,0x10(%eax) return 0; 111adb: 31 c0 xor %eax,%eax default: return ENOTSUP; } } 111add: c9 leave 111ade: c3 ret 111adf: 90 nop <== NOT EXECUTED pthread_attr_t *attr, int inheritsched ) { if ( !attr || !attr->is_initialized ) return EINVAL; 111ae0: b8 16 00 00 00 mov $0x16,%eax return 0; default: return ENOTSUP; } } 111ae5: c9 leave 111ae6: c3 ret =============================================================================== 0010fffc : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 10fffc: 55 push %ebp 10fffd: 89 e5 mov %esp,%ebp 10ffff: 57 push %edi 110000: 56 push %esi 110001: 8b 7d 08 mov 0x8(%ebp),%edi 110004: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 110007: 85 ff test %edi,%edi 110009: 74 1d je 110028 11000b: 8b 07 mov (%edi),%eax 11000d: 85 c0 test %eax,%eax 11000f: 74 17 je 110028 110011: 85 f6 test %esi,%esi 110013: 74 13 je 110028 return EINVAL; attr->schedparam = *param; 110015: 83 c7 18 add $0x18,%edi 110018: b9 07 00 00 00 mov $0x7,%ecx 11001d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 11001f: 31 c0 xor %eax,%eax } 110021: 5e pop %esi 110022: 5f pop %edi 110023: c9 leave 110024: c3 ret 110025: 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; 110028: b8 16 00 00 00 mov $0x16,%eax attr->schedparam = *param; return 0; } 11002d: 5e pop %esi 11002e: 5f pop %edi 11002f: c9 leave 110030: c3 ret =============================================================================== 00110034 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 110034: 55 push %ebp 110035: 89 e5 mov %esp,%ebp 110037: 8b 45 08 mov 0x8(%ebp),%eax 11003a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 11003d: 85 c0 test %eax,%eax 11003f: 74 23 je 110064 110041: 8b 08 mov (%eax),%ecx 110043: 85 c9 test %ecx,%ecx 110045: 74 1d je 110064 return EINVAL; switch ( policy ) { 110047: 85 d2 test %edx,%edx 110049: 78 0a js 110055 11004b: 83 fa 02 cmp $0x2,%edx 11004e: 7e 0c jle 11005c 110050: 83 fa 04 cmp $0x4,%edx 110053: 74 07 je 11005c <== ALWAYS TAKEN case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 110055: b8 86 00 00 00 mov $0x86,%eax } } 11005a: c9 leave 11005b: c3 ret switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 11005c: 89 50 14 mov %edx,0x14(%eax) return 0; 11005f: 31 c0 xor %eax,%eax default: return ENOTSUP; } } 110061: c9 leave 110062: c3 ret 110063: 90 nop <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 110064: b8 16 00 00 00 mov $0x16,%eax return 0; default: return ENOTSUP; } } 110069: c9 leave 11006a: c3 ret =============================================================================== 0011006c : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 11006c: 55 push %ebp 11006d: 89 e5 mov %esp,%ebp 11006f: 8b 45 08 mov 0x8(%ebp),%eax 110072: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 110075: 85 c0 test %eax,%eax 110077: 74 1a je 110093 110079: 8b 08 mov (%eax),%ecx 11007b: 85 c9 test %ecx,%ecx 11007d: 74 14 je 110093 return EINVAL; switch ( contentionscope ) { 11007f: 85 d2 test %edx,%edx 110081: 75 0d jne 110090 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 110083: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) return 0; 11008a: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 11008c: c9 leave 11008d: c3 ret 11008e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 110090: 4a dec %edx 110091: 74 09 je 11009c case PTHREAD_SCOPE_SYSTEM: return ENOTSUP; default: return EINVAL; 110093: b8 16 00 00 00 mov $0x16,%eax } } 110098: c9 leave 110099: c3 ret 11009a: 66 90 xchg %ax,%ax <== NOT EXECUTED case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; case PTHREAD_SCOPE_SYSTEM: return ENOTSUP; 11009c: b8 86 00 00 00 mov $0x86,%eax default: return EINVAL; } } 1100a1: c9 leave 1100a2: c3 ret =============================================================================== 001100a4 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 1100a4: 55 push %ebp 1100a5: 89 e5 mov %esp,%ebp 1100a7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 1100aa: 85 c0 test %eax,%eax 1100ac: 74 12 je 1100c0 1100ae: 8b 10 mov (%eax),%edx 1100b0: 85 d2 test %edx,%edx 1100b2: 74 0c je 1100c0 return EINVAL; attr->stackaddr = stackaddr; 1100b4: 8b 55 0c mov 0xc(%ebp),%edx 1100b7: 89 50 04 mov %edx,0x4(%eax) return 0; 1100ba: 31 c0 xor %eax,%eax } 1100bc: c9 leave 1100bd: c3 ret 1100be: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_attr_t *attr, void *stackaddr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 1100c0: b8 16 00 00 00 mov $0x16,%eax attr->stackaddr = stackaddr; return 0; } 1100c5: c9 leave 1100c6: c3 ret =============================================================================== 00111ae8 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 111ae8: 55 push %ebp 111ae9: 89 e5 mov %esp,%ebp 111aeb: 8b 45 08 mov 0x8(%ebp),%eax 111aee: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111af1: 85 c0 test %eax,%eax 111af3: 74 23 je 111b18 111af5: 8b 08 mov (%eax),%ecx 111af7: 85 c9 test %ecx,%ecx 111af9: 74 1d je 111b18 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 111afb: 8b 0d 58 42 12 00 mov 0x124258,%ecx 111b01: d1 e1 shl %ecx 111b03: 39 d1 cmp %edx,%ecx 111b05: 77 09 ja 111b10 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 111b07: 89 50 08 mov %edx,0x8(%eax) return 0; 111b0a: 31 c0 xor %eax,%eax } 111b0c: c9 leave 111b0d: c3 ret 111b0e: 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; 111b10: 89 48 08 mov %ecx,0x8(%eax) else attr->stacksize = stacksize; return 0; 111b13: 31 c0 xor %eax,%eax } 111b15: c9 leave 111b16: c3 ret 111b17: 90 nop <== NOT EXECUTED pthread_attr_t *attr, size_t stacksize ) { if ( !attr || !attr->is_initialized ) return EINVAL; 111b18: 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; } 111b1d: c9 leave 111b1e: c3 ret =============================================================================== 0010b9a0 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10b9a0: 55 push %ebp 10b9a1: 89 e5 mov %esp,%ebp 10b9a3: 83 ec 28 sub $0x28,%esp 10b9a6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b9a9: 85 c0 test %eax,%eax 10b9ab: 74 2f je 10b9dc RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b9ad: 51 push %ecx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); 10b9ae: 8d 55 f4 lea -0xc(%ebp),%edx 10b9b1: 52 push %edx 10b9b2: ff 30 pushl (%eax) 10b9b4: 68 20 88 12 00 push $0x128820 10b9b9: e8 42 26 00 00 call 10e000 <_Objects_Get> switch ( location ) { 10b9be: 83 c4 10 add $0x10,%esp 10b9c1: 8b 55 f4 mov -0xc(%ebp),%edx 10b9c4: 85 d2 test %edx,%edx 10b9c6: 75 14 jne 10b9dc case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10b9c8: 8b 48 58 mov 0x58(%eax),%ecx 10b9cb: 85 c9 test %ecx,%ecx 10b9cd: 74 15 je 10b9e4 _Thread_Enable_dispatch(); 10b9cf: e8 bc 2e 00 00 call 10e890 <_Thread_Enable_dispatch> return EBUSY; 10b9d4: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b9d9: c9 leave 10b9da: c3 ret 10b9db: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10b9dc: b8 16 00 00 00 mov $0x16,%eax } 10b9e1: c9 leave 10b9e2: c3 ret 10b9e3: 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 ); 10b9e4: 83 ec 08 sub $0x8,%esp 10b9e7: 50 push %eax 10b9e8: 68 20 88 12 00 push $0x128820 10b9ed: 89 45 e4 mov %eax,-0x1c(%ebp) 10b9f0: e8 d7 21 00 00 call 10dbcc <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b9f5: 58 pop %eax 10b9f6: 5a pop %edx 10b9f7: 8b 45 e4 mov -0x1c(%ebp),%eax 10b9fa: 50 push %eax 10b9fb: 68 20 88 12 00 push $0x128820 10ba00: e8 c3 24 00 00 call 10dec8 <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10ba05: e8 86 2e 00 00 call 10e890 <_Thread_Enable_dispatch> return 0; 10ba0a: 83 c4 10 add $0x10,%esp 10ba0d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ba0f: c9 leave 10ba10: c3 ret =============================================================================== 0010ba14 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10ba14: 55 push %ebp 10ba15: 89 e5 mov %esp,%ebp 10ba17: 57 push %edi 10ba18: 56 push %esi 10ba19: 53 push %ebx 10ba1a: 83 ec 2c sub $0x2c,%esp 10ba1d: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba20: 8b 7d 0c mov 0xc(%ebp),%edi 10ba23: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10ba26: 85 db test %ebx,%ebx 10ba28: 0f 84 82 00 00 00 je 10bab0 return EINVAL; if ( count == 0 ) 10ba2e: 85 f6 test %esi,%esi 10ba30: 74 7e je 10bab0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10ba32: 85 ff test %edi,%edi 10ba34: 0f 84 92 00 00 00 je 10bacc } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10ba3a: 8b 17 mov (%edi),%edx 10ba3c: 85 d2 test %edx,%edx 10ba3e: 74 70 je 10bab0 return EINVAL; switch ( the_attr->process_shared ) { 10ba40: 8b 47 04 mov 0x4(%edi),%eax 10ba43: 85 c0 test %eax,%eax 10ba45: 75 69 jne 10bab0 <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10ba47: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10ba4e: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ba51: a1 f4 83 12 00 mov 0x1283f4,%eax 10ba56: 40 inc %eax 10ba57: a3 f4 83 12 00 mov %eax,0x1283f4 * 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 ); 10ba5c: 83 ec 0c sub $0xc,%esp 10ba5f: 68 20 88 12 00 push $0x128820 10ba64: e8 e7 20 00 00 call 10db50 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10ba69: 83 c4 10 add $0x10,%esp 10ba6c: 85 c0 test %eax,%eax 10ba6e: 74 50 je 10bac0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10ba70: 83 ec 08 sub $0x8,%esp 10ba73: 8d 55 e0 lea -0x20(%ebp),%edx 10ba76: 52 push %edx 10ba77: 8d 50 10 lea 0x10(%eax),%edx 10ba7a: 52 push %edx 10ba7b: 89 45 d4 mov %eax,-0x2c(%ebp) 10ba7e: e8 cd 16 00 00 call 10d150 <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10ba83: 8b 45 d4 mov -0x2c(%ebp),%eax 10ba86: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10ba89: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ba8c: 8b 0d 3c 88 12 00 mov 0x12883c,%ecx 10ba92: 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; 10ba95: 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; 10ba9c: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10ba9e: e8 ed 2d 00 00 call 10e890 <_Thread_Enable_dispatch> return 0; 10baa3: 83 c4 10 add $0x10,%esp 10baa6: 31 c0 xor %eax,%eax } 10baa8: 8d 65 f4 lea -0xc(%ebp),%esp 10baab: 5b pop %ebx 10baac: 5e pop %esi 10baad: 5f pop %edi 10baae: c9 leave 10baaf: c3 ret switch ( the_attr->process_shared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10bab0: 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; } 10bab5: 8d 65 f4 lea -0xc(%ebp),%esp 10bab8: 5b pop %ebx 10bab9: 5e pop %esi 10baba: 5f pop %edi 10babb: c9 leave 10babc: c3 ret 10babd: 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(); 10bac0: e8 cb 2d 00 00 call 10e890 <_Thread_Enable_dispatch> return EAGAIN; 10bac5: b8 0b 00 00 00 mov $0xb,%eax 10baca: eb e9 jmp 10bab5 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10bacc: 83 ec 0c sub $0xc,%esp 10bacf: 8d 7d d8 lea -0x28(%ebp),%edi 10bad2: 57 push %edi 10bad3: e8 7c fe ff ff call 10b954 10bad8: 83 c4 10 add $0x10,%esp 10badb: e9 5a ff ff ff jmp 10ba3a =============================================================================== 0010bae0 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10bae0: 55 push %ebp 10bae1: 89 e5 mov %esp,%ebp 10bae3: 83 ec 18 sub $0x18,%esp 10bae6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10bae9: 85 c0 test %eax,%eax 10baeb: 74 4f je 10bb3c RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10baed: 51 push %ecx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); 10baee: 8d 55 f4 lea -0xc(%ebp),%edx 10baf1: 52 push %edx 10baf2: ff 30 pushl (%eax) 10baf4: 68 20 88 12 00 push $0x128820 10baf9: e8 02 25 00 00 call 10e000 <_Objects_Get> switch ( location ) { 10bafe: 83 c4 10 add $0x10,%esp 10bb01: 8b 55 f4 mov -0xc(%ebp),%edx 10bb04: 85 d2 test %edx,%edx 10bb06: 75 34 jne 10bb3c case OBJECTS_LOCAL: _CORE_barrier_Wait( 10bb08: 83 ec 0c sub $0xc,%esp 10bb0b: 6a 00 push $0x0 10bb0d: 6a 00 push $0x0 10bb0f: 6a 01 push $0x1 10bb11: ff 70 08 pushl 0x8(%eax) 10bb14: 83 c0 10 add $0x10,%eax 10bb17: 50 push %eax 10bb18: e8 67 16 00 00 call 10d184 <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10bb1d: 83 c4 20 add $0x20,%esp 10bb20: e8 6b 2d 00 00 call 10e890 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10bb25: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10bb28: a1 b8 89 12 00 mov 0x1289b8,%eax true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10bb2d: ff 70 34 pushl 0x34(%eax) 10bb30: e8 db 5a 00 00 call 111610 <_POSIX_Barrier_Translate_core_barrier_return_code> 10bb35: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10bb38: c9 leave 10bb39: c3 ret 10bb3a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10bb3c: b8 16 00 00 00 mov $0x16,%eax } 10bb41: c9 leave 10bb42: c3 ret =============================================================================== 0010b90c : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10b90c: 55 push %ebp 10b90d: 89 e5 mov %esp,%ebp 10b90f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b912: 85 c0 test %eax,%eax 10b914: 74 12 je 10b928 10b916: 8b 10 mov (%eax),%edx 10b918: 85 d2 test %edx,%edx 10b91a: 74 0c je 10b928 return EINVAL; attr->is_initialized = false; 10b91c: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10b922: 31 c0 xor %eax,%eax } 10b924: c9 leave 10b925: c3 ret 10b926: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10b928: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10b92d: c9 leave 10b92e: c3 ret =============================================================================== 0010b954 : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 10b954: 55 push %ebp 10b955: 89 e5 mov %esp,%ebp 10b957: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b95a: 85 c0 test %eax,%eax 10b95c: 74 12 je 10b970 return EINVAL; attr->is_initialized = true; 10b95e: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10b964: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) return 0; 10b96b: 31 c0 xor %eax,%eax } 10b96d: c9 leave 10b96e: c3 ret 10b96f: 90 nop <== NOT EXECUTED int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { if ( !attr ) return EINVAL; 10b970: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10b975: c9 leave 10b976: c3 ret =============================================================================== 0010b978 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10b978: 55 push %ebp 10b979: 89 e5 mov %esp,%ebp 10b97b: 8b 45 08 mov 0x8(%ebp),%eax 10b97e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b981: 85 c0 test %eax,%eax 10b983: 74 0b je 10b990 return EINVAL; if ( !attr->is_initialized ) 10b985: 8b 08 mov (%eax),%ecx 10b987: 85 c9 test %ecx,%ecx 10b989: 74 05 je 10b990 return EINVAL; switch ( pshared ) { 10b98b: 83 fa 01 cmp $0x1,%edx 10b98e: 76 08 jbe 10b998 case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10b990: b8 16 00 00 00 mov $0x16,%eax } } 10b995: c9 leave 10b996: c3 ret 10b997: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b998: 89 50 04 mov %edx,0x4(%eax) return 0; 10b99b: 31 c0 xor %eax,%eax default: return EINVAL; } } 10b99d: c9 leave 10b99e: c3 ret =============================================================================== 0010b1bc : */ int pthread_cancel( pthread_t thread ) { 10b1bc: 55 push %ebp 10b1bd: 89 e5 mov %esp,%ebp 10b1bf: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10b1c2: a1 b4 89 12 00 mov 0x1289b4,%eax 10b1c7: 85 c0 test %eax,%eax 10b1c9: 74 09 je 10b1d4 return EPROTO; 10b1cb: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b1d0: c9 leave 10b1d1: c3 ret 10b1d2: 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 ); 10b1d4: 51 push %ecx */ if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); 10b1d5: 8d 45 f4 lea -0xc(%ebp),%eax 10b1d8: 50 push %eax 10b1d9: ff 75 08 pushl 0x8(%ebp) 10b1dc: 68 a0 86 12 00 push $0x1286a0 10b1e1: e8 0e 21 00 00 call 10d2f4 <_Objects_Get> switch ( location ) { 10b1e6: 83 c4 10 add $0x10,%esp 10b1e9: 8b 55 f4 mov -0xc(%ebp),%edx 10b1ec: 85 d2 test %edx,%edx 10b1ee: 75 20 jne 10b210 case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10b1f0: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10b1f6: c7 82 dc 00 00 00 01 movl $0x1,0xdc(%edx) 10b1fd: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10b200: 83 ec 0c sub $0xc,%esp 10b203: 50 push %eax 10b204: e8 37 54 00 00 call 110640 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> return 0; 10b209: 83 c4 10 add $0x10,%esp 10b20c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b20e: c9 leave 10b20f: c3 ret #endif case OBJECTS_ERROR: break; } return EINVAL; 10b210: b8 16 00 00 00 mov $0x16,%eax } 10b215: c9 leave 10b216: c3 ret =============================================================================== 0010b01c : */ void pthread_cleanup_pop( int execute ) { 10b01c: 55 push %ebp 10b01d: 89 e5 mov %esp,%ebp 10b01f: 57 push %edi 10b020: 56 push %esi 10b021: 53 push %ebx 10b022: 83 ec 0c sub $0xc,%esp 10b025: 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 ]; 10b028: a1 98 79 12 00 mov 0x127998,%eax 10b02d: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b033: 8b 15 d4 73 12 00 mov 0x1273d4,%edx 10b039: 42 inc %edx 10b03a: 89 15 d4 73 12 00 mov %edx,0x1273d4 * 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 ); 10b040: 9c pushf 10b041: fa cli 10b042: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10b043: 8d 90 e4 00 00 00 lea 0xe4(%eax),%edx if ( _Chain_Is_empty( handler_stack ) ) { 10b049: 39 90 e0 00 00 00 cmp %edx,0xe0(%eax) 10b04f: 74 43 je 10b094 _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10b051: 8b 42 04 mov 0x4(%edx),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10b054: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10b056: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10b059: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10b05c: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10b05e: 56 push %esi 10b05f: 9d popf 10b060: 8b 70 08 mov 0x8(%eax),%esi 10b063: 8b 78 0c mov 0xc(%eax),%edi tmp_handler = *handler; _Workspace_Free( handler ); 10b066: 83 ec 0c sub $0xc,%esp 10b069: 50 push %eax 10b06a: e8 6d 39 00 00 call 10e9dc <_Workspace_Free> _Thread_Enable_dispatch(); 10b06f: e8 6c 27 00 00 call 10d7e0 <_Thread_Enable_dispatch> if ( execute ) 10b074: 83 c4 10 add $0x10,%esp 10b077: 85 db test %ebx,%ebx 10b079: 75 09 jne 10b084 (*tmp_handler.routine)( tmp_handler.arg ); } 10b07b: 8d 65 f4 lea -0xc(%ebp),%esp 10b07e: 5b pop %ebx 10b07f: 5e pop %esi 10b080: 5f pop %edi 10b081: c9 leave 10b082: c3 ret 10b083: 90 nop <== NOT EXECUTED _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10b084: 89 7d 08 mov %edi,0x8(%ebp) 10b087: 89 f0 mov %esi,%eax } 10b089: 8d 65 f4 lea -0xc(%ebp),%esp 10b08c: 5b pop %ebx 10b08d: 5e pop %esi 10b08e: 5f pop %edi 10b08f: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10b090: ff e0 jmp *%eax 10b092: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10b094: e8 47 27 00 00 call 10d7e0 <_Thread_Enable_dispatch> _ISR_Enable( level ); 10b099: 56 push %esi 10b09a: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10b09b: 8d 65 f4 lea -0xc(%ebp),%esp 10b09e: 5b pop %ebx 10b09f: 5e pop %esi 10b0a0: 5f pop %edi 10b0a1: c9 leave 10b0a2: c3 ret =============================================================================== 0010b3e8 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10b3e8: 55 push %ebp 10b3e9: 89 e5 mov %esp,%ebp 10b3eb: 56 push %esi 10b3ec: 53 push %ebx 10b3ed: 8b 5d 08 mov 0x8(%ebp),%ebx 10b3f0: 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 ) 10b3f3: 85 db test %ebx,%ebx 10b3f5: 74 4d je 10b444 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b3f7: a1 f4 83 12 00 mov 0x1283f4,%eax 10b3fc: 40 inc %eax 10b3fd: a3 f4 83 12 00 mov %eax,0x1283f4 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10b402: 83 ec 0c sub $0xc,%esp 10b405: 6a 10 push $0x10 10b407: e8 34 41 00 00 call 10f540 <_Workspace_Allocate> if ( handler ) { 10b40c: 83 c4 10 add $0x10,%esp 10b40f: 85 c0 test %eax,%eax 10b411: 74 25 je 10b438 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b413: 8b 15 b8 89 12 00 mov 0x1289b8,%edx handler_stack = &thread_support->Cancellation_Handlers; 10b419: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10b41f: 81 c2 e0 00 00 00 add $0xe0,%edx handler->routine = routine; 10b425: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10b428: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10b42b: 83 ec 08 sub $0x8,%esp 10b42e: 50 push %eax 10b42f: 52 push %edx 10b430: e8 b3 17 00 00 call 10cbe8 <_Chain_Append> 10b435: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10b438: 8d 65 f8 lea -0x8(%ebp),%esp 10b43b: 5b pop %ebx 10b43c: 5e pop %esi 10b43d: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10b43e: e9 8d 2e 00 00 jmp 10e2d0 <_Thread_Enable_dispatch> 10b443: 90 nop <== NOT EXECUTED } 10b444: 8d 65 f8 lea -0x8(%ebp),%esp 10b447: 5b pop %ebx 10b448: 5e pop %esi 10b449: c9 leave 10b44a: c3 ret =============================================================================== 0010c0dc : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10c0dc: 55 push %ebp 10c0dd: 89 e5 mov %esp,%ebp 10c0df: 53 push %ebx 10c0e0: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c0e3: 8d 45 f4 lea -0xc(%ebp),%eax 10c0e6: 50 push %eax 10c0e7: ff 75 08 pushl 0x8(%ebp) 10c0ea: e8 65 00 00 00 call 10c154 <_POSIX_Condition_variables_Get> 10c0ef: 89 c3 mov %eax,%ebx switch ( location ) { 10c0f1: 83 c4 10 add $0x10,%esp 10c0f4: 8b 4d f4 mov -0xc(%ebp),%ecx 10c0f7: 85 c9 test %ecx,%ecx 10c0f9: 75 25 jne 10c120 case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10c0fb: 83 ec 0c sub $0xc,%esp 10c0fe: 8d 40 18 lea 0x18(%eax),%eax 10c101: 50 push %eax 10c102: e8 b1 3b 00 00 call 10fcb8 <_Thread_queue_First> 10c107: 83 c4 10 add $0x10,%esp 10c10a: 85 c0 test %eax,%eax 10c10c: 74 1e je 10c12c _Thread_Enable_dispatch(); 10c10e: e8 59 34 00 00 call 10f56c <_Thread_Enable_dispatch> return EBUSY; 10c113: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c118: 8b 5d fc mov -0x4(%ebp),%ebx 10c11b: c9 leave 10c11c: c3 ret 10c11d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10c120: b8 16 00 00 00 mov $0x16,%eax } 10c125: 8b 5d fc mov -0x4(%ebp),%ebx 10c128: c9 leave 10c129: c3 ret 10c12a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10c12c: 83 ec 08 sub $0x8,%esp 10c12f: 53 push %ebx 10c130: 68 c0 98 12 00 push $0x1298c0 10c135: e8 6e 27 00 00 call 10e8a8 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10c13a: 58 pop %eax 10c13b: 5a pop %edx 10c13c: 53 push %ebx 10c13d: 68 c0 98 12 00 push $0x1298c0 10c142: e8 5d 2a 00 00 call 10eba4 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10c147: e8 20 34 00 00 call 10f56c <_Thread_Enable_dispatch> return 0; 10c14c: 83 c4 10 add $0x10,%esp 10c14f: 31 c0 xor %eax,%eax 10c151: eb d2 jmp 10c125 =============================================================================== 0010c1a8 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10c1a8: 55 push %ebp 10c1a9: 89 e5 mov %esp,%ebp 10c1ab: 53 push %ebx 10c1ac: 83 ec 14 sub $0x14,%esp 10c1af: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c1b2: 85 db test %ebx,%ebx 10c1b4: 0f 84 86 00 00 00 je 10c240 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10c1ba: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10c1be: 74 06 je 10c1c6 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10c1c0: 8b 03 mov (%ebx),%eax 10c1c2: 85 c0 test %eax,%eax 10c1c4: 75 0a jne 10c1d0 return EINVAL; 10c1c6: b8 16 00 00 00 mov $0x16,%eax *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 10c1cb: 8b 5d fc mov -0x4(%ebp),%ebx 10c1ce: c9 leave 10c1cf: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c1d0: a1 f4 93 12 00 mov 0x1293f4,%eax 10c1d5: 40 inc %eax 10c1d6: a3 f4 93 12 00 mov %eax,0x1293f4 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); 10c1db: 83 ec 0c sub $0xc,%esp 10c1de: 68 c0 98 12 00 push $0x1298c0 10c1e3: e8 44 26 00 00 call 10e82c <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10c1e8: 83 c4 10 add $0x10,%esp 10c1eb: 85 c0 test %eax,%eax 10c1ed: 74 5d je 10c24c _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10c1ef: 8b 53 04 mov 0x4(%ebx),%edx 10c1f2: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c1f5: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10c1fc: 6a 74 push $0x74 10c1fe: 68 00 08 00 00 push $0x800 10c203: 6a 00 push $0x0 10c205: 8d 50 18 lea 0x18(%eax),%edx 10c208: 52 push %edx 10c209: 89 45 f4 mov %eax,-0xc(%ebp) 10c20c: e8 23 3b 00 00 call 10fd34 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c211: 8b 45 f4 mov -0xc(%ebp),%eax 10c214: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10c217: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c21a: 8b 0d dc 98 12 00 mov 0x1298dc,%ecx 10c220: 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; 10c223: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10c22a: 8b 45 08 mov 0x8(%ebp),%eax 10c22d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c22f: e8 38 33 00 00 call 10f56c <_Thread_Enable_dispatch> return 0; 10c234: 83 c4 10 add $0x10,%esp 10c237: 31 c0 xor %eax,%eax } 10c239: 8b 5d fc mov -0x4(%ebp),%ebx 10c23c: c9 leave 10c23d: c3 ret 10c23e: 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; 10c240: bb 08 35 12 00 mov $0x123508,%ebx 10c245: e9 70 ff ff ff jmp 10c1ba 10c24a: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10c24c: e8 1b 33 00 00 call 10f56c <_Thread_Enable_dispatch> return ENOMEM; 10c251: b8 0c 00 00 00 mov $0xc,%eax 10c256: e9 70 ff ff ff jmp 10c1cb =============================================================================== 0010c038 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10c038: 55 push %ebp 10c039: 89 e5 mov %esp,%ebp 10c03b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10c03e: 85 c0 test %eax,%eax 10c040: 74 12 je 10c054 10c042: 8b 10 mov (%eax),%edx 10c044: 85 d2 test %edx,%edx 10c046: 74 0c je 10c054 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10c048: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10c04e: 31 c0 xor %eax,%eax } 10c050: c9 leave 10c051: c3 ret 10c052: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10c054: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10c059: c9 leave 10c05a: c3 ret =============================================================================== 0010c05c : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10c05c: 55 push %ebp 10c05d: 89 e5 mov %esp,%ebp 10c05f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10c062: 85 c0 test %eax,%eax 10c064: 74 0e je 10c074 return EINVAL; *pshared = attr->process_shared; 10c066: 8b 50 04 mov 0x4(%eax),%edx 10c069: 8b 45 0c mov 0xc(%ebp),%eax 10c06c: 89 10 mov %edx,(%eax) return 0; 10c06e: 31 c0 xor %eax,%eax } 10c070: c9 leave 10c071: c3 ret 10c072: 66 90 xchg %ax,%ax <== NOT EXECUTED const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) return EINVAL; 10c074: b8 16 00 00 00 mov $0x16,%eax *pshared = attr->process_shared; return 0; } 10c079: c9 leave 10c07a: c3 ret =============================================================================== 0010c07c : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 10c07c: 55 push %ebp 10c07d: 89 e5 mov %esp,%ebp 10c07f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10c082: 85 c0 test %eax,%eax 10c084: 74 16 je 10c09c return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 10c086: 8b 15 08 35 12 00 mov 0x123508,%edx 10c08c: 8b 0d 0c 35 12 00 mov 0x12350c,%ecx 10c092: 89 10 mov %edx,(%eax) 10c094: 89 48 04 mov %ecx,0x4(%eax) return 0; 10c097: 31 c0 xor %eax,%eax } 10c099: c9 leave 10c09a: c3 ret 10c09b: 90 nop <== NOT EXECUTED int pthread_condattr_init( pthread_condattr_t *attr ) { if ( !attr ) return EINVAL; 10c09c: b8 16 00 00 00 mov $0x16,%eax *attr = _POSIX_Condition_variables_Default_attributes; return 0; } 10c0a1: c9 leave 10c0a2: c3 ret =============================================================================== 0010c0a4 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10c0a4: 55 push %ebp 10c0a5: 89 e5 mov %esp,%ebp 10c0a7: 8b 45 08 mov 0x8(%ebp),%eax 10c0aa: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10c0ad: 85 c0 test %eax,%eax 10c0af: 74 05 je 10c0b6 return EINVAL; switch ( pshared ) { 10c0b1: 83 fa 01 cmp $0x1,%edx 10c0b4: 76 0a jbe 10c0c0 case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10c0b6: b8 16 00 00 00 mov $0x16,%eax } } 10c0bb: c9 leave 10c0bc: c3 ret 10c0bd: 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; 10c0c0: 89 50 04 mov %edx,0x4(%eax) return 0; 10c0c3: 31 c0 xor %eax,%eax default: return EINVAL; } } 10c0c5: c9 leave 10c0c6: c3 ret =============================================================================== 0010b740 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10b740: 55 push %ebp 10b741: 89 e5 mov %esp,%ebp 10b743: 57 push %edi 10b744: 56 push %esi 10b745: 53 push %ebx 10b746: 83 ec 5c sub $0x5c,%esp 10b749: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b74c: 8b 75 10 mov 0x10(%ebp),%esi 10b74f: 85 f6 test %esi,%esi 10b751: 0f 84 8d 01 00 00 je 10b8e4 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b757: 85 db test %ebx,%ebx 10b759: 74 65 je 10b7c0 if ( !the_attr->is_initialized ) 10b75b: 8b 0b mov (%ebx),%ecx 10b75d: 85 c9 test %ecx,%ecx 10b75f: 74 1e je 10b77f * 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) ) 10b761: 8b 53 04 mov 0x4(%ebx),%edx 10b764: 85 d2 test %edx,%edx 10b766: 74 0a je 10b772 10b768: a1 58 42 12 00 mov 0x124258,%eax 10b76d: 39 43 08 cmp %eax,0x8(%ebx) 10b770: 72 0d jb 10b77f * 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 ) { 10b772: 8b 43 10 mov 0x10(%ebx),%eax 10b775: 83 f8 01 cmp $0x1,%eax 10b778: 74 4e je 10b7c8 10b77a: 83 f8 02 cmp $0x2,%eax 10b77d: 74 11 je 10b790 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; 10b77f: ba 16 00 00 00 mov $0x16,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b784: 89 d0 mov %edx,%eax 10b786: 8d 65 f4 lea -0xc(%ebp),%esp 10b789: 5b pop %ebx 10b78a: 5e pop %esi 10b78b: 5f pop %edi 10b78c: c9 leave 10b78d: c3 ret 10b78e: 66 90 xchg %ax,%ax <== NOT EXECUTED schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10b790: 8b 4b 14 mov 0x14(%ebx),%ecx 10b793: 89 4d b0 mov %ecx,-0x50(%ebp) schedparam = the_attr->schedparam; 10b796: 8d 45 c4 lea -0x3c(%ebp),%eax 10b799: 89 45 b4 mov %eax,-0x4c(%ebp) 10b79c: 8d 73 18 lea 0x18(%ebx),%esi 10b79f: b9 07 00 00 00 mov $0x7,%ecx 10b7a4: 89 c7 mov %eax,%edi 10b7a6: 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 ) 10b7a8: 8b 43 0c mov 0xc(%ebx),%eax 10b7ab: 85 c0 test %eax,%eax 10b7ad: 74 49 je 10b7f8 <== ALWAYS TAKEN return ENOTSUP; 10b7af: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b7b4: 89 d0 mov %edx,%eax 10b7b6: 8d 65 f4 lea -0xc(%ebp),%esp 10b7b9: 5b pop %ebx 10b7ba: 5e pop %esi 10b7bb: 5f pop %edi 10b7bc: c9 leave 10b7bd: c3 ret 10b7be: 66 90 xchg %ax,%ax <== NOT EXECUTED int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b7c0: bb 80 1f 12 00 mov $0x121f80,%ebx 10b7c5: eb 94 jmp 10b75b 10b7c7: 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 ]; 10b7c8: a1 b8 89 12 00 mov 0x1289b8,%eax 10b7cd: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10b7d3: 8b 8e 80 00 00 00 mov 0x80(%esi),%ecx 10b7d9: 89 4d b0 mov %ecx,-0x50(%ebp) schedparam = api->schedparam; 10b7dc: 8d 45 c4 lea -0x3c(%ebp),%eax 10b7df: 89 45 b4 mov %eax,-0x4c(%ebp) 10b7e2: 81 c6 84 00 00 00 add $0x84,%esi 10b7e8: b9 07 00 00 00 mov $0x7,%ecx 10b7ed: 89 c7 mov %eax,%edi 10b7ef: 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 ) 10b7f1: 8b 43 0c mov 0xc(%ebx),%eax 10b7f4: 85 c0 test %eax,%eax 10b7f6: 75 b7 jne 10b7af return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10b7f8: 83 ec 0c sub $0xc,%esp 10b7fb: ff 75 c4 pushl -0x3c(%ebp) 10b7fe: e8 85 61 00 00 call 111988 <_POSIX_Priority_Is_valid> 10b803: 83 c4 10 add $0x10,%esp 10b806: 84 c0 test %al,%al 10b808: 0f 84 71 ff ff ff je 10b77f <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10b80e: 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); 10b811: 0f b6 35 5c 42 12 00 movzbl 0x12425c,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10b818: 8d 45 e0 lea -0x20(%ebp),%eax 10b81b: 50 push %eax 10b81c: 8d 45 e4 lea -0x1c(%ebp),%eax 10b81f: 50 push %eax 10b820: ff 75 b4 pushl -0x4c(%ebp) 10b823: ff 75 b0 pushl -0x50(%ebp) 10b826: e8 79 61 00 00 call 1119a4 <_POSIX_Thread_Translate_sched_param> 10b82b: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10b82d: 83 c4 10 add $0x10,%esp 10b830: 85 c0 test %eax,%eax 10b832: 0f 85 4c ff ff ff jne 10b784 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b838: 83 ec 0c sub $0xc,%esp 10b83b: ff 35 a4 84 12 00 pushl 0x1284a4 10b841: 89 45 a0 mov %eax,-0x60(%ebp) 10b844: e8 af 17 00 00 call 10cff8 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10b849: c7 04 24 a0 86 12 00 movl $0x1286a0,(%esp) 10b850: e8 c3 21 00 00 call 10da18 <_Objects_Allocate> 10b855: 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 ) { 10b858: 83 c4 10 add $0x10,%esp 10b85b: 85 c0 test %eax,%eax 10b85d: 8b 55 a0 mov -0x60(%ebp),%edx 10b860: 0f 84 0f 01 00 00 je 10b975 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10b866: 8b 4d e0 mov -0x20(%ebp),%ecx 10b869: 8b 45 e4 mov -0x1c(%ebp),%eax 10b86c: 89 45 a4 mov %eax,-0x5c(%ebp) 10b86f: 8b 43 08 mov 0x8(%ebx),%eax 10b872: 89 45 a8 mov %eax,-0x58(%ebp) 10b875: a1 58 42 12 00 mov 0x124258,%eax 10b87a: d1 e0 shl %eax 10b87c: 3b 45 a8 cmp -0x58(%ebp),%eax 10b87f: 73 03 jae 10b884 10b881: 8b 45 a8 mov -0x58(%ebp),%eax 10b884: 83 ec 04 sub $0x4,%esp 10b887: 6a 00 push $0x0 10b889: 6a 00 push $0x0 10b88b: 51 push %ecx 10b88c: ff 75 a4 pushl -0x5c(%ebp) 10b88f: 6a 01 push $0x1 10b891: 81 e6 ff 00 00 00 and $0xff,%esi 10b897: 29 fe sub %edi,%esi 10b899: 56 push %esi 10b89a: 6a 01 push $0x1 10b89c: 50 push %eax 10b89d: ff 73 04 pushl 0x4(%ebx) 10b8a0: ff 75 ac pushl -0x54(%ebp) 10b8a3: 68 a0 86 12 00 push $0x1286a0 10b8a8: 89 55 a0 mov %edx,-0x60(%ebp) 10b8ab: e8 44 2f 00 00 call 10e7f4 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10b8b0: 83 c4 30 add $0x30,%esp 10b8b3: 84 c0 test %al,%al 10b8b5: 8b 55 a0 mov -0x60(%ebp),%edx 10b8b8: 75 34 jne 10b8ee RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10b8ba: 83 ec 08 sub $0x8,%esp 10b8bd: ff 75 ac pushl -0x54(%ebp) 10b8c0: 68 a0 86 12 00 push $0x1286a0 10b8c5: e8 c6 24 00 00 call 10dd90 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b8ca: 59 pop %ecx 10b8cb: ff 35 a4 84 12 00 pushl 0x1284a4 10b8d1: e8 6a 17 00 00 call 10d040 <_API_Mutex_Unlock> return EAGAIN; 10b8d6: 83 c4 10 add $0x10,%esp 10b8d9: ba 0b 00 00 00 mov $0xb,%edx 10b8de: e9 a1 fe ff ff jmp 10b784 10b8e3: 90 nop <== NOT EXECUTED struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) return EFAULT; 10b8e4: ba 0e 00 00 00 mov $0xe,%edx 10b8e9: e9 96 fe ff ff jmp 10b784 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b8ee: 8b 4d ac mov -0x54(%ebp),%ecx 10b8f1: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx 10b8f7: 89 4d a8 mov %ecx,-0x58(%ebp) api->Attributes = *the_attr; 10b8fa: b9 0f 00 00 00 mov $0xf,%ecx 10b8ff: 8b 7d a8 mov -0x58(%ebp),%edi 10b902: 89 de mov %ebx,%esi 10b904: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10b906: 8b 43 38 mov 0x38(%ebx),%eax 10b909: 8b 4d a8 mov -0x58(%ebp),%ecx 10b90c: 89 41 3c mov %eax,0x3c(%ecx) api->schedpolicy = schedpolicy; 10b90f: 8b 45 b0 mov -0x50(%ebp),%eax 10b912: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = schedparam; 10b918: 89 cf mov %ecx,%edi 10b91a: 81 c7 84 00 00 00 add $0x84,%edi 10b920: b9 07 00 00 00 mov $0x7,%ecx 10b925: 8b 75 b4 mov -0x4c(%ebp),%esi 10b928: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10b92a: 83 ec 0c sub $0xc,%esp 10b92d: 6a 00 push $0x0 10b92f: ff 75 14 pushl 0x14(%ebp) 10b932: ff 75 10 pushl 0x10(%ebp) 10b935: 6a 01 push $0x1 10b937: ff 75 ac pushl -0x54(%ebp) 10b93a: 89 55 a0 mov %edx,-0x60(%ebp) 10b93d: e8 4a 39 00 00 call 10f28c <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10b942: 83 c4 20 add $0x20,%esp 10b945: 83 7d b0 04 cmpl $0x4,-0x50(%ebp) 10b949: 8b 55 a0 mov -0x60(%ebp),%edx 10b94c: 74 42 je 10b990 } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10b94e: 8b 45 ac mov -0x54(%ebp),%eax 10b951: 8b 48 08 mov 0x8(%eax),%ecx 10b954: 8b 45 08 mov 0x8(%ebp),%eax 10b957: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10b959: 83 ec 0c sub $0xc,%esp 10b95c: ff 35 a4 84 12 00 pushl 0x1284a4 10b962: 89 55 a0 mov %edx,-0x60(%ebp) 10b965: e8 d6 16 00 00 call 10d040 <_API_Mutex_Unlock> return 0; 10b96a: 83 c4 10 add $0x10,%esp 10b96d: 8b 55 a0 mov -0x60(%ebp),%edx 10b970: e9 0f fe ff ff jmp 10b784 * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b975: 83 ec 0c sub $0xc,%esp 10b978: ff 35 a4 84 12 00 pushl 0x1284a4 10b97e: e8 bd 16 00 00 call 10d040 <_API_Mutex_Unlock> return EAGAIN; 10b983: 83 c4 10 add $0x10,%esp 10b986: ba 0b 00 00 00 mov $0xb,%edx 10b98b: e9 f4 fd ff ff jmp 10b784 return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b990: 83 ec 0c sub $0xc,%esp &api->Sporadic_timer, _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ) 10b993: 8b 45 a8 mov -0x58(%ebp),%eax 10b996: 05 8c 00 00 00 add $0x8c,%eax return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b99b: 50 push %eax 10b99c: e8 df 3a 00 00 call 10f480 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b9a1: 8b 4d a8 mov -0x58(%ebp),%ecx 10b9a4: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b9aa: 58 pop %eax 10b9ab: 5a pop %edx 10b9ac: 89 c8 mov %ecx,%eax 10b9ae: 05 a4 00 00 00 add $0xa4,%eax 10b9b3: 50 push %eax 10b9b4: 68 c4 84 12 00 push $0x1284c4 10b9b9: e8 f2 3d 00 00 call 10f7b0 <_Watchdog_Insert> 10b9be: 83 c4 10 add $0x10,%esp 10b9c1: 8b 55 a0 mov -0x60(%ebp),%edx 10b9c4: eb 88 jmp 10b94e =============================================================================== 0010b864 : #include int pthread_detach( pthread_t thread ) { 10b864: 55 push %ebp 10b865: 89 e5 mov %esp,%ebp 10b867: 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 ); 10b86a: 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 ); 10b86d: 50 push %eax 10b86e: ff 75 08 pushl 0x8(%ebp) 10b871: 68 60 97 12 00 push $0x129760 10b876: e8 41 23 00 00 call 10dbbc <_Objects_Get> switch ( location ) { 10b87b: 83 c4 10 add $0x10,%esp 10b87e: 8b 55 f4 mov -0xc(%ebp),%edx 10b881: 85 d2 test %edx,%edx 10b883: 75 17 jne 10b89c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10b885: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b88b: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) _Thread_Enable_dispatch(); 10b892: e8 b5 2b 00 00 call 10e44c <_Thread_Enable_dispatch> return 0; 10b897: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b899: c9 leave 10b89a: c3 ret 10b89b: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10b89c: b8 03 00 00 00 mov $0x3,%eax } 10b8a1: c9 leave 10b8a2: c3 ret =============================================================================== 00112ee8 : } void pthread_exit( void *value_ptr ) { 112ee8: 55 push %ebp 112ee9: 89 e5 mov %esp,%ebp 112eeb: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 112eee: ff 75 08 pushl 0x8(%ebp) 112ef1: ff 35 98 79 12 00 pushl 0x127998 112ef7: e8 88 ff ff ff call 112e84 <_POSIX_Thread_Exit> 112efc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 112eff: c9 leave <== NOT EXECUTED 112f00: c3 ret <== NOT EXECUTED =============================================================================== 0010d920 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10d920: 55 push %ebp 10d921: 89 e5 mov %esp,%ebp 10d923: 57 push %edi 10d924: 56 push %esi 10d925: 53 push %ebx 10d926: 83 ec 1c sub $0x1c,%esp 10d929: 8b 7d 0c mov 0xc(%ebp),%edi 10d92c: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10d92f: 85 ff test %edi,%edi 10d931: 74 69 je 10d99c 10d933: 85 db test %ebx,%ebx 10d935: 74 65 je 10d99c pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 10d937: 51 push %ecx return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); 10d938: 8d 45 e4 lea -0x1c(%ebp),%eax 10d93b: 50 push %eax 10d93c: ff 75 08 pushl 0x8(%ebp) 10d93f: 68 e0 c7 12 00 push $0x12c7e0 10d944: e8 eb 23 00 00 call 10fd34 <_Objects_Get> switch ( location ) { 10d949: 83 c4 10 add $0x10,%esp 10d94c: 8b 55 e4 mov -0x1c(%ebp),%edx 10d94f: 85 d2 test %edx,%edx 10d951: 75 39 jne 10d98c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d953: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10d959: 8b 96 80 00 00 00 mov 0x80(%esi),%edx 10d95f: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10d961: 81 c6 84 00 00 00 add $0x84,%esi 10d967: b9 07 00 00 00 mov $0x7,%ecx 10d96c: 89 df mov %ebx,%edi 10d96e: 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); 10d970: 0f b6 15 3c 83 12 00 movzbl 0x12833c,%edx 10d977: 2b 50 14 sub 0x14(%eax),%edx 10d97a: 89 13 mov %edx,(%ebx) param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10d97c: e8 43 2c 00 00 call 1105c4 <_Thread_Enable_dispatch> return 0; 10d981: 31 c0 xor %eax,%eax break; } return ESRCH; } 10d983: 8d 65 f4 lea -0xc(%ebp),%esp 10d986: 5b pop %ebx 10d987: 5e pop %esi 10d988: 5f pop %edi 10d989: c9 leave 10d98a: c3 ret 10d98b: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10d98c: b8 03 00 00 00 mov $0x3,%eax } 10d991: 8d 65 f4 lea -0xc(%ebp),%esp 10d994: 5b pop %ebx 10d995: 5e pop %esi 10d996: 5f pop %edi 10d997: c9 leave 10d998: c3 ret 10d999: 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; 10d99c: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10d9a1: 8d 65 f4 lea -0xc(%ebp),%esp 10d9a4: 5b pop %ebx 10d9a5: 5e pop %esi 10d9a6: 5f pop %edi 10d9a7: c9 leave 10d9a8: c3 ret =============================================================================== 0010b730 : */ void *pthread_getspecific( pthread_key_t key ) { 10b730: 55 push %ebp 10b731: 89 e5 mov %esp,%ebp 10b733: 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 ); 10b736: 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 ); 10b739: 50 push %eax 10b73a: ff 75 08 pushl 0x8(%ebp) 10b73d: 68 c0 99 12 00 push $0x1299c0 10b742: e8 89 25 00 00 call 10dcd0 <_Objects_Get> switch ( location ) { 10b747: 83 c4 10 add $0x10,%esp 10b74a: 8b 55 f4 mov -0xc(%ebp),%edx 10b74d: 85 d2 test %edx,%edx 10b74f: 75 2b jne 10b77c case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10b751: 8b 15 f8 9a 12 00 mov 0x129af8,%edx 10b757: 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); 10b75a: 89 ca mov %ecx,%edx 10b75c: c1 ea 18 shr $0x18,%edx 10b75f: 83 e2 07 and $0x7,%edx index = _Objects_Get_index( _Thread_Executing->Object.id ); 10b762: 0f b7 c9 movzwl %cx,%ecx key_data = (void *) the_key->Values[ api ][ index ]; 10b765: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10b769: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10b76c: 89 45 e4 mov %eax,-0x1c(%ebp) 10b76f: e8 ec 2d 00 00 call 10e560 <_Thread_Enable_dispatch> return key_data; 10b774: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10b777: c9 leave 10b778: c3 ret 10b779: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return NULL; 10b77c: 31 c0 xor %eax,%eax } 10b77e: c9 leave 10b77f: c3 ret =============================================================================== 00110530 : int pthread_join( pthread_t thread, void **value_ptr ) { 110530: 55 push %ebp 110531: 89 e5 mov %esp,%ebp 110533: 53 push %ebx 110534: 83 ec 18 sub $0x18,%esp 110537: 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 ); 11053a: 8d 45 f4 lea -0xc(%ebp),%eax 11053d: 50 push %eax 11053e: ff 75 08 pushl 0x8(%ebp) 110541: 68 80 12 13 00 push $0x131280 110546: e8 e9 23 00 00 call 112934 <_Objects_Get> switch ( location ) { 11054b: 83 c4 10 add $0x10,%esp 11054e: 8b 55 f4 mov -0xc(%ebp),%edx 110551: 85 d2 test %edx,%edx 110553: 74 0b je 110560 #endif case OBJECTS_ERROR: break; } return ESRCH; 110555: b8 03 00 00 00 mov $0x3,%eax } 11055a: 8b 5d fc mov -0x4(%ebp),%ebx 11055d: c9 leave 11055e: c3 ret 11055f: 90 nop <== NOT EXECUTED the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110560: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 110566: 8b 4a 3c mov 0x3c(%edx),%ecx 110569: 85 c9 test %ecx,%ecx 11056b: 74 43 je 1105b0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 11056d: 8b 0d 98 15 13 00 mov 0x131598,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 110573: 39 c8 cmp %ecx,%eax 110575: 74 49 je 1105c0 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 110577: 8d 45 f0 lea -0x10(%ebp),%eax 11057a: 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; 11057d: c7 42 70 01 00 00 00 movl $0x1,0x70(%edx) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 110584: 50 push %eax 110585: 68 00 3a 11 00 push $0x113a00 11058a: 6a 00 push $0x0 11058c: 83 c2 40 add $0x40,%edx 11058f: 52 push %edx 110590: e8 1b 31 00 00 call 1136b0 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 110595: e8 2a 2c 00 00 call 1131c4 <_Thread_Enable_dispatch> if ( value_ptr ) 11059a: 83 c4 10 add $0x10,%esp 11059d: 85 db test %ebx,%ebx 11059f: 74 2b je 1105cc *value_ptr = return_pointer; 1105a1: 8b 45 f0 mov -0x10(%ebp),%eax 1105a4: 89 03 mov %eax,(%ebx) return 0; 1105a6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 1105a8: 8b 5d fc mov -0x4(%ebp),%ebx 1105ab: c9 leave 1105ac: c3 ret 1105ad: 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(); 1105b0: e8 0f 2c 00 00 call 1131c4 <_Thread_Enable_dispatch> return EINVAL; 1105b5: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 1105ba: 8b 5d fc mov -0x4(%ebp),%ebx 1105bd: c9 leave 1105be: c3 ret 1105bf: 90 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 1105c0: e8 ff 2b 00 00 call 1131c4 <_Thread_Enable_dispatch> return EDEADLK; 1105c5: b8 2d 00 00 00 mov $0x2d,%eax 1105ca: eb 8e jmp 11055a _Thread_Enable_dispatch(); if ( value_ptr ) *value_ptr = return_pointer; return 0; 1105cc: 31 c0 xor %eax,%eax 1105ce: eb 8a jmp 11055a =============================================================================== 0010b5bc : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10b5bc: 55 push %ebp 10b5bd: 89 e5 mov %esp,%ebp 10b5bf: 57 push %edi 10b5c0: 56 push %esi 10b5c1: 53 push %ebx 10b5c2: 83 ec 28 sub $0x28,%esp 10b5c5: a1 34 95 12 00 mov 0x129534,%eax 10b5ca: 40 inc %eax 10b5cb: a3 34 95 12 00 mov %eax,0x129534 * 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 ); 10b5d0: 68 c0 99 12 00 push $0x1299c0 10b5d5: e8 46 22 00 00 call 10d820 <_Objects_Allocate> 10b5da: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10b5dc: 83 c4 10 add $0x10,%esp 10b5df: 85 c0 test %eax,%eax 10b5e1: 0f 84 b5 00 00 00 je 10b69c _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10b5e7: 8b 45 0c mov 0xc(%ebp),%eax 10b5ea: 89 46 10 mov %eax,0x10(%esi) * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 10b5ed: bb 01 00 00 00 mov $0x1,%ebx the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 10b5f2: 8b 04 9d 0c 95 12 00 mov 0x12950c(,%ebx,4),%eax 10b5f9: 85 c0 test %eax,%eax 10b5fb: 74 5f je 10b65c <== NEVER TAKEN true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); 10b5fd: 8b 40 04 mov 0x4(%eax),%eax 10b600: 0f b7 40 10 movzwl 0x10(%eax),%eax INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10b604: 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 ); 10b60b: 83 ec 0c sub $0xc,%esp 10b60e: 51 push %ecx 10b60f: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b612: e8 31 42 00 00 call 10f848 <_Workspace_Allocate> if ( !table ) { 10b617: 83 c4 10 add $0x10,%esp 10b61a: 85 c0 test %eax,%eax 10b61c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b61f: 74 47 je 10b668 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10b621: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10b625: 89 c7 mov %eax,%edi 10b627: 31 c0 xor %eax,%eax 10b629: f3 aa rep stos %al,%es:(%edi) * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10b62b: 43 inc %ebx * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 10b62c: 83 fb 04 cmp $0x4,%ebx 10b62f: 75 c1 jne 10b5f2 uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b631: 8b 46 08 mov 0x8(%esi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b634: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b637: 8b 15 dc 99 12 00 mov 0x1299dc,%edx 10b63d: 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; 10b640: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 10b647: 8b 55 08 mov 0x8(%ebp),%edx 10b64a: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b64c: e8 0f 2f 00 00 call 10e560 <_Thread_Enable_dispatch> return 0; 10b651: 31 c0 xor %eax,%eax } 10b653: 8d 65 f4 lea -0xc(%ebp),%esp 10b656: 5b pop %ebx 10b657: 5e pop %esi 10b658: 5f pop %edi 10b659: c9 leave 10b65a: c3 ret 10b65b: 90 nop <== NOT EXECUTED } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 10b65c: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) <== NOT EXECUTED 10b663: 00 10b664: eb c5 jmp 10b62b <== NOT EXECUTED 10b666: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 10b668: 4b dec %ebx 10b669: 74 12 je 10b67d the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 10b66b: 83 ec 0c sub $0xc,%esp 10b66e: ff 74 9e 14 pushl 0x14(%esi,%ebx,4) 10b672: e8 ed 41 00 00 call 10f864 <_Workspace_Free> #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 10b677: 83 c4 10 add $0x10,%esp 10b67a: 4b dec %ebx 10b67b: 75 ee jne 10b66b */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b67d: 83 ec 08 sub $0x8,%esp 10b680: 56 push %esi 10b681: 68 c0 99 12 00 push $0x1299c0 10b686: e8 0d 25 00 00 call 10db98 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10b68b: e8 d0 2e 00 00 call 10e560 <_Thread_Enable_dispatch> return ENOMEM; 10b690: 83 c4 10 add $0x10,%esp 10b693: b8 0c 00 00 00 mov $0xc,%eax 10b698: eb b9 jmp 10b653 10b69a: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10b69c: e8 bf 2e 00 00 call 10e560 <_Thread_Enable_dispatch> return EAGAIN; 10b6a1: b8 0b 00 00 00 mov $0xb,%eax *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b6a6: 8d 65 f4 lea -0xc(%ebp),%esp 10b6a9: 5b pop %ebx 10b6aa: 5e pop %esi 10b6ab: 5f pop %edi 10b6ac: c9 leave 10b6ad: c3 ret =============================================================================== 0010b6b0 : */ int pthread_key_delete( pthread_key_t key ) { 10b6b0: 55 push %ebp 10b6b1: 89 e5 mov %esp,%ebp 10b6b3: 56 push %esi 10b6b4: 53 push %ebx 10b6b5: 83 ec 14 sub $0x14,%esp register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); 10b6b8: 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 ); 10b6bb: 50 push %eax 10b6bc: ff 75 08 pushl 0x8(%ebp) 10b6bf: 68 c0 99 12 00 push $0x1299c0 10b6c4: e8 07 26 00 00 call 10dcd0 <_Objects_Get> 10b6c9: 89 c6 mov %eax,%esi switch ( location ) { 10b6cb: 83 c4 10 add $0x10,%esp 10b6ce: 8b 45 f4 mov -0xc(%ebp),%eax 10b6d1: 85 c0 test %eax,%eax 10b6d3: 75 4f jne 10b724 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 10b6d5: 83 ec 08 sub $0x8,%esp 10b6d8: 56 push %esi 10b6d9: 68 c0 99 12 00 push $0x1299c0 10b6de: e8 b9 21 00 00 call 10d89c <_Objects_Close> 10b6e3: 83 c4 10 add $0x10,%esp for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) 10b6e6: bb 01 00 00 00 mov $0x1,%ebx if ( the_key->Values[ the_api ] ) 10b6eb: 8b 44 9e 14 mov 0x14(%esi,%ebx,4),%eax 10b6ef: 85 c0 test %eax,%eax 10b6f1: 74 0c je 10b6ff <== NEVER TAKEN _Workspace_Free( the_key->Values[ the_api ] ); 10b6f3: 83 ec 0c sub $0xc,%esp 10b6f6: 50 push %eax 10b6f7: e8 68 41 00 00 call 10f864 <_Workspace_Free> 10b6fc: 83 c4 10 add $0x10,%esp switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) 10b6ff: 43 inc %ebx 10b700: 83 fb 04 cmp $0x4,%ebx 10b703: 75 e6 jne 10b6eb */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b705: 83 ec 08 sub $0x8,%esp 10b708: 56 push %esi 10b709: 68 c0 99 12 00 push $0x1299c0 10b70e: e8 85 24 00 00 call 10db98 <_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(); 10b713: e8 48 2e 00 00 call 10e560 <_Thread_Enable_dispatch> return 0; 10b718: 83 c4 10 add $0x10,%esp 10b71b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b71d: 8d 65 f8 lea -0x8(%ebp),%esp 10b720: 5b pop %ebx 10b721: 5e pop %esi 10b722: c9 leave 10b723: c3 ret #endif case OBJECTS_ERROR: break; } return EINVAL; 10b724: b8 16 00 00 00 mov $0x16,%eax } 10b729: 8d 65 f8 lea -0x8(%ebp),%esp 10b72c: 5b pop %ebx 10b72d: 5e pop %esi 10b72e: c9 leave 10b72f: c3 ret =============================================================================== 00124794 : int pthread_kill( pthread_t thread, int sig ) { 124794: 55 push %ebp 124795: 89 e5 mov %esp,%ebp 124797: 57 push %edi 124798: 56 push %esi 124799: 53 push %ebx 12479a: 83 ec 1c sub $0x1c,%esp 12479d: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1247a0: 85 db test %ebx,%ebx 1247a2: 0f 84 84 00 00 00 je 12482c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1247a8: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1247ab: 83 ff 1f cmp $0x1f,%edi 1247ae: 77 7c ja 12482c pthread_t id, Objects_Locations *location ) { return (Thread_Control *) _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); 1247b0: 56 push %esi rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); 1247b1: 8d 45 e4 lea -0x1c(%ebp),%eax 1247b4: 50 push %eax 1247b5: ff 75 08 pushl 0x8(%ebp) 1247b8: 68 00 e6 12 00 push $0x12e600 1247bd: e8 52 d7 fe ff call 111f14 <_Objects_Get> 1247c2: 89 c6 mov %eax,%esi switch ( location ) { 1247c4: 83 c4 10 add $0x10,%esp 1247c7: 8b 4d e4 mov -0x1c(%ebp),%ecx 1247ca: 85 c9 test %ecx,%ecx 1247cc: 75 72 jne 124840 case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1247ce: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1247d4: 8d 04 5b lea (%ebx,%ebx,2),%eax 1247d7: 83 3c 85 48 e9 12 00 cmpl $0x1,0x12e948(,%eax,4) 1247de: 01 1247df: 74 2d je 12480e static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1247e1: b8 01 00 00 00 mov $0x1,%eax 1247e6: 89 f9 mov %edi,%ecx 1247e8: d3 e0 shl %cl,%eax return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 1247ea: 09 82 d0 00 00 00 or %eax,0xd0(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 1247f0: 52 push %edx 1247f1: 6a 00 push $0x0 1247f3: 53 push %ebx 1247f4: 56 push %esi 1247f5: e8 82 fe ff ff call 12467c <_POSIX_signals_Unblock_thread> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1247fa: 83 c4 10 add $0x10,%esp 1247fd: a1 14 e9 12 00 mov 0x12e914,%eax 124802: 85 c0 test %eax,%eax 124804: 74 08 je 12480e 124806: 3b 35 18 e9 12 00 cmp 0x12e918,%esi 12480c: 74 12 je 124820 _Context_Switch_necessary = true; } _Thread_Enable_dispatch(); 12480e: e8 11 e0 fe ff call 112824 <_Thread_Enable_dispatch> return 0; 124813: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 124815: 8d 65 f4 lea -0xc(%ebp),%esp 124818: 5b pop %ebx 124819: 5e pop %esi 12481a: 5f pop %edi 12481b: c9 leave 12481c: c3 ret 12481d: 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 ) ) _Context_Switch_necessary = true; 124820: c6 05 24 e9 12 00 01 movb $0x1,0x12e924 124827: eb e5 jmp 12480e 124829: 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 ); 12482c: e8 eb 3c ff ff call 11851c <__errno> 124831: c7 00 16 00 00 00 movl $0x16,(%eax) 124837: b8 ff ff ff ff mov $0xffffffff,%eax 12483c: eb d7 jmp 124815 12483e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 124840: e8 d7 3c ff ff call 11851c <__errno> 124845: c7 00 03 00 00 00 movl $0x3,(%eax) 12484b: b8 ff ff ff ff mov $0xffffffff,%eax 124850: eb c3 jmp 124815 =============================================================================== 0010d0f4 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10d0f4: 55 push %ebp 10d0f5: 89 e5 mov %esp,%ebp 10d0f7: 83 ec 30 sub $0x30,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d0fa: 8d 45 f4 lea -0xc(%ebp),%eax 10d0fd: 50 push %eax 10d0fe: ff 75 08 pushl 0x8(%ebp) 10d101: e8 66 00 00 00 call 10d16c <_POSIX_Mutex_Get> switch ( location ) { 10d106: 83 c4 10 add $0x10,%esp 10d109: 8b 55 f4 mov -0xc(%ebp),%edx 10d10c: 85 d2 test %edx,%edx 10d10e: 74 08 je 10d118 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d110: b8 16 00 00 00 mov $0x16,%eax } 10d115: c9 leave 10d116: c3 ret 10d117: 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 ) ) { 10d118: 8b 48 64 mov 0x64(%eax),%ecx 10d11b: 85 c9 test %ecx,%ecx 10d11d: 75 0d jne 10d12c _Thread_Enable_dispatch(); 10d11f: e8 a0 34 00 00 call 1105c4 <_Thread_Enable_dispatch> return EBUSY; 10d124: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d129: c9 leave 10d12a: c3 ret 10d12b: 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 ); 10d12c: 83 ec 08 sub $0x8,%esp 10d12f: 50 push %eax 10d130: 68 20 c9 12 00 push $0x12c920 10d135: 89 45 e4 mov %eax,-0x1c(%ebp) 10d138: e8 c3 27 00 00 call 10f900 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10d13d: 83 c4 0c add $0xc,%esp 10d140: 6a 16 push $0x16 10d142: 6a 00 push $0x0 10d144: 8b 45 e4 mov -0x1c(%ebp),%eax 10d147: 8d 50 14 lea 0x14(%eax),%edx 10d14a: 52 push %edx 10d14b: e8 b8 1e 00 00 call 10f008 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 10d150: 58 pop %eax 10d151: 5a pop %edx 10d152: 8b 45 e4 mov -0x1c(%ebp),%eax 10d155: 50 push %eax 10d156: 68 20 c9 12 00 push $0x12c920 10d15b: e8 9c 2a 00 00 call 10fbfc <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10d160: e8 5f 34 00 00 call 1105c4 <_Thread_Enable_dispatch> return 0; 10d165: 83 c4 10 add $0x10,%esp 10d168: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d16a: c9 leave 10d16b: c3 ret =============================================================================== 0010d214 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10d214: 55 push %ebp 10d215: 89 e5 mov %esp,%ebp 10d217: 53 push %ebx 10d218: 83 ec 14 sub $0x14,%esp 10d21b: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10d21e: 85 db test %ebx,%ebx 10d220: 74 19 je 10d23b return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d222: 83 ec 08 sub $0x8,%esp 10d225: 8d 45 f4 lea -0xc(%ebp),%eax 10d228: 50 push %eax 10d229: ff 75 08 pushl 0x8(%ebp) 10d22c: e8 3b ff ff ff call 10d16c <_POSIX_Mutex_Get> switch ( location ) { 10d231: 83 c4 10 add $0x10,%esp 10d234: 8b 55 f4 mov -0xc(%ebp),%edx 10d237: 85 d2 test %edx,%edx 10d239: 74 0d je 10d248 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d23b: b8 16 00 00 00 mov $0x16,%eax } 10d240: 8b 5d fc mov -0x4(%ebp),%ebx 10d243: c9 leave 10d244: c3 ret 10d245: 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); 10d248: 0f b6 15 3c 83 12 00 movzbl 0x12833c,%edx 10d24f: 2b 50 60 sub 0x60(%eax),%edx 10d252: 89 13 mov %edx,(%ebx) case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10d254: e8 6b 33 00 00 call 1105c4 <_Thread_Enable_dispatch> return 0; 10d259: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d25b: 8b 5d fc mov -0x4(%ebp),%ebx 10d25e: c9 leave 10d25f: c3 ret =============================================================================== 0010d260 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10d260: 55 push %ebp 10d261: 89 e5 mov %esp,%ebp 10d263: 57 push %edi 10d264: 56 push %esi 10d265: 53 push %ebx 10d266: 83 ec 1c sub $0x1c,%esp 10d269: 8b 75 08 mov 0x8(%ebp),%esi 10d26c: 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; 10d26f: 85 db test %ebx,%ebx 10d271: 0f 84 09 01 00 00 je 10d380 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10d277: 85 f6 test %esi,%esi 10d279: 0f 84 e5 00 00 00 je 10d364 } } } #endif if ( !the_attr->is_initialized ) 10d27f: 8b 13 mov (%ebx),%edx 10d281: 85 d2 test %edx,%edx 10d283: 0f 84 db 00 00 00 je 10d364 return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d289: 8b 43 04 mov 0x4(%ebx),%eax 10d28c: 83 f8 01 cmp $0x1,%eax 10d28f: 0f 84 f7 00 00 00 je 10d38c return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10d295: 85 c0 test %eax,%eax 10d297: 0f 85 c7 00 00 00 jne 10d364 return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d29d: 8b 43 0c mov 0xc(%ebx),%eax 10d2a0: 83 f8 01 cmp $0x1,%eax 10d2a3: 0f 84 eb 00 00 00 je 10d394 10d2a9: 83 f8 02 cmp $0x2,%eax 10d2ac: 0f 84 c2 00 00 00 je 10d374 10d2b2: 85 c0 test %eax,%eax 10d2b4: 0f 85 aa 00 00 00 jne 10d364 case PTHREAD_PRIO_NONE: the_discipline = CORE_MUTEX_DISCIPLINES_FIFO; 10d2ba: 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 ) ) 10d2c1: 83 ec 0c sub $0xc,%esp 10d2c4: ff 73 08 pushl 0x8(%ebx) 10d2c7: e8 30 03 00 00 call 10d5fc <_POSIX_Priority_Is_valid> 10d2cc: 83 c4 10 add $0x10,%esp 10d2cf: 84 c0 test %al,%al 10d2d1: 0f 84 8d 00 00 00 je 10d364 #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10d2d7: 83 7b 10 03 cmpl $0x3,0x10(%ebx) 10d2db: 0f 87 83 00 00 00 ja 10d364 10d2e1: a1 34 c5 12 00 mov 0x12c534,%eax 10d2e6: 40 inc %eax 10d2e7: a3 34 c5 12 00 mov %eax,0x12c534 * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10d2ec: 83 ec 0c sub $0xc,%esp 10d2ef: 68 20 c9 12 00 push $0x12c920 10d2f4: e8 8b 25 00 00 call 10f884 <_Objects_Allocate> 10d2f9: 89 c7 mov %eax,%edi */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10d2fb: 83 c4 10 add $0x10,%esp 10d2fe: 85 c0 test %eax,%eax 10d300: 0f 84 9a 00 00 00 je 10d3a0 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10d306: 8b 43 04 mov 0x4(%ebx),%eax 10d309: 89 47 10 mov %eax,0x10(%edi) the_mutex_attr = &the_mutex->Mutex.Attributes; 10d30c: 8d 57 54 lea 0x54(%edi),%edx if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10d30f: 31 c0 xor %eax,%eax 10d311: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10d315: 0f 94 c0 sete %al 10d318: 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; 10d31b: 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); 10d31f: 0f b6 05 3c 83 12 00 movzbl 0x12833c,%eax 10d326: 2b 43 08 sub 0x8(%ebx),%eax 10d329: 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; 10d32c: 8b 45 e4 mov -0x1c(%ebp),%eax 10d32f: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10d332: 50 push %eax 10d333: 6a 01 push $0x1 10d335: 52 push %edx 10d336: 8d 47 14 lea 0x14(%edi),%eax 10d339: 50 push %eax 10d33a: e8 d5 1c 00 00 call 10f014 <_CORE_mutex_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d33f: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10d342: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d345: 8b 15 3c c9 12 00 mov 0x12c93c,%edx 10d34b: 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; 10d34e: 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; 10d355: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10d357: e8 68 32 00 00 call 1105c4 <_Thread_Enable_dispatch> return 0; 10d35c: 83 c4 10 add $0x10,%esp 10d35f: 31 c0 xor %eax,%eax 10d361: eb 06 jmp 10d369 10d363: 90 nop <== NOT EXECUTED case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: break; default: return EINVAL; 10d364: b8 16 00 00 00 mov $0x16,%eax *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 10d369: 8d 65 f4 lea -0xc(%ebp),%esp 10d36c: 5b pop %ebx 10d36d: 5e pop %esi 10d36e: 5f pop %edi 10d36f: c9 leave 10d370: c3 ret 10d371: 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; 10d374: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) break; 10d37b: e9 41 ff ff ff jmp 10d2c1 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; 10d380: bb a0 c9 12 00 mov $0x12c9a0,%ebx 10d385: e9 ed fe ff ff jmp 10d277 10d38a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return ENOSYS; 10d38c: b8 58 00 00 00 mov $0x58,%eax 10d391: eb d6 jmp 10d369 10d393: 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; 10d394: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10d39b: e9 21 ff ff ff jmp 10d2c1 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10d3a0: e8 1f 32 00 00 call 1105c4 <_Thread_Enable_dispatch> return EAGAIN; 10d3a5: b8 0b 00 00 00 mov $0xb,%eax 10d3aa: eb bd jmp 10d369 =============================================================================== 0010d424 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10d424: 55 push %ebp 10d425: 89 e5 mov %esp,%ebp 10d427: 57 push %edi 10d428: 56 push %esi 10d429: 53 push %ebx 10d42a: 83 ec 2c sub $0x2c,%esp 10d42d: 8b 7d 08 mov 0x8(%ebp),%edi 10d430: 8b 75 0c mov 0xc(%ebp),%esi 10d433: 8b 5d 10 mov 0x10(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10d436: 85 db test %ebx,%ebx 10d438: 74 10 je 10d44a return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d43a: 83 ec 0c sub $0xc,%esp 10d43d: 56 push %esi 10d43e: e8 b9 01 00 00 call 10d5fc <_POSIX_Priority_Is_valid> 10d443: 83 c4 10 add $0x10,%esp 10d446: 84 c0 test %al,%al 10d448: 75 0e jne 10d458 #endif case OBJECTS_ERROR: break; } return EINVAL; 10d44a: b8 16 00 00 00 mov $0x16,%eax } 10d44f: 8d 65 f4 lea -0xc(%ebp),%esp 10d452: 5b pop %ebx 10d453: 5e pop %esi 10d454: 5f pop %edi 10d455: c9 leave 10d456: c3 ret 10d457: 90 nop <== NOT EXECUTED 10d458: a0 3c 83 12 00 mov 0x12833c,%al 10d45d: 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 ); 10d460: 83 ec 0c sub $0xc,%esp 10d463: 57 push %edi 10d464: e8 43 ff ff ff call 10d3ac * 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 ); 10d469: 58 pop %eax 10d46a: 5a pop %edx 10d46b: 8d 45 e4 lea -0x1c(%ebp),%eax 10d46e: 50 push %eax 10d46f: 57 push %edi 10d470: e8 f7 fc ff ff call 10d16c <_POSIX_Mutex_Get> switch ( location ) { 10d475: 83 c4 10 add $0x10,%esp 10d478: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d47b: 85 c9 test %ecx,%ecx 10d47d: 75 cb jne 10d44a RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d47f: 0f b6 15 3c 83 12 00 movzbl 0x12833c,%edx 10d486: 2b 50 60 sub 0x60(%eax),%edx 10d489: 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); 10d48b: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10d48f: 29 f2 sub %esi,%edx 10d491: 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( 10d494: 52 push %edx 10d495: 6a 00 push $0x0 10d497: ff 70 08 pushl 0x8(%eax) 10d49a: 83 c0 14 add $0x14,%eax 10d49d: 50 push %eax 10d49e: e8 09 1d 00 00 call 10f1ac <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d4a3: e8 1c 31 00 00 call 1105c4 <_Thread_Enable_dispatch> return 0; 10d4a8: 83 c4 10 add $0x10,%esp 10d4ab: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d4ad: 8d 65 f4 lea -0xc(%ebp),%esp 10d4b0: 5b pop %ebx 10d4b1: 5e pop %esi 10d4b2: 5f pop %edi 10d4b3: c9 leave 10d4b4: c3 ret =============================================================================== 0010d4b8 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10d4b8: 55 push %ebp 10d4b9: 89 e5 mov %esp,%ebp 10d4bb: 53 push %ebx 10d4bc: 83 ec 1c sub $0x1c,%esp 10d4bf: 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 ); 10d4c2: 8d 45 f4 lea -0xc(%ebp),%eax 10d4c5: 50 push %eax 10d4c6: ff 75 0c pushl 0xc(%ebp) 10d4c9: e8 a6 00 00 00 call 10d574 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10d4ce: 83 c4 10 add $0x10,%esp 10d4d1: 83 f8 03 cmp $0x3,%eax 10d4d4: 74 16 je 10d4ec do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d4d6: 50 push %eax 10d4d7: ff 75 f4 pushl -0xc(%ebp) 10d4da: 6a 00 push $0x0 10d4dc: 53 push %ebx 10d4dd: e8 de fe ff ff call 10d3c0 <_POSIX_Mutex_Lock_support> 10d4e2: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d4e5: 8b 5d fc mov -0x4(%ebp),%ebx 10d4e8: c9 leave 10d4e9: c3 ret 10d4ea: 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_Mutex_Lock_support( mutex, do_wait, ticks ); 10d4ec: 52 push %edx 10d4ed: ff 75 f4 pushl -0xc(%ebp) 10d4f0: 6a 01 push $0x1 10d4f2: 53 push %ebx 10d4f3: e8 c8 fe ff ff call 10d3c0 <_POSIX_Mutex_Lock_support> 10d4f8: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d4fb: 8b 5d fc mov -0x4(%ebp),%ebx 10d4fe: c9 leave 10d4ff: c3 ret =============================================================================== 0010d524 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10d524: 55 push %ebp 10d525: 89 e5 mov %esp,%ebp 10d527: 53 push %ebx 10d528: 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 ); 10d52b: 8d 45 f4 lea -0xc(%ebp),%eax 10d52e: 50 push %eax 10d52f: ff 75 08 pushl 0x8(%ebp) 10d532: e8 35 fc ff ff call 10d16c <_POSIX_Mutex_Get> switch ( location ) { 10d537: 83 c4 10 add $0x10,%esp 10d53a: 8b 4d f4 mov -0xc(%ebp),%ecx 10d53d: 85 c9 test %ecx,%ecx 10d53f: 75 27 jne 10d568 case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10d541: 52 push %edx 10d542: 6a 00 push $0x0 10d544: ff 70 08 pushl 0x8(%eax) 10d547: 83 c0 14 add $0x14,%eax 10d54a: 50 push %eax 10d54b: e8 5c 1c 00 00 call 10f1ac <_CORE_mutex_Surrender> 10d550: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d552: e8 6d 30 00 00 call 1105c4 <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10d557: 89 1c 24 mov %ebx,(%esp) 10d55a: e8 a1 ff ff ff call 10d500 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d55f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d562: 8b 5d fc mov -0x4(%ebp),%ebx 10d565: c9 leave 10d566: c3 ret 10d567: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10d568: b8 16 00 00 00 mov $0x16,%eax } 10d56d: 8b 5d fc mov -0x4(%ebp),%ebx 10d570: c9 leave 10d571: c3 ret =============================================================================== 0010cf9c : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10cf9c: 55 push %ebp 10cf9d: 89 e5 mov %esp,%ebp 10cf9f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10cfa2: 85 c0 test %eax,%eax 10cfa4: 74 12 je 10cfb8 10cfa6: 8b 10 mov (%eax),%edx 10cfa8: 85 d2 test %edx,%edx 10cfaa: 74 0c je 10cfb8 return EINVAL; attr->is_initialized = false; 10cfac: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10cfb2: 31 c0 xor %eax,%eax } 10cfb4: c9 leave 10cfb5: c3 ret 10cfb6: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { if ( !attr || !attr->is_initialized ) return EINVAL; 10cfb8: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10cfbd: c9 leave 10cfbe: c3 ret =============================================================================== 0010cfe8 : int pthread_mutexattr_getprotocol( const pthread_mutexattr_t *attr, int *protocol ) { 10cfe8: 55 push %ebp 10cfe9: 89 e5 mov %esp,%ebp 10cfeb: 8b 45 08 mov 0x8(%ebp),%eax 10cfee: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !protocol ) 10cff1: 85 c0 test %eax,%eax 10cff3: 74 13 je 10d008 <== NEVER TAKEN 10cff5: 8b 08 mov (%eax),%ecx 10cff7: 85 c9 test %ecx,%ecx 10cff9: 74 0d je 10d008 <== NEVER TAKEN 10cffb: 85 d2 test %edx,%edx 10cffd: 74 09 je 10d008 <== NEVER TAKEN return EINVAL; *protocol = attr->protocol; 10cfff: 8b 40 0c mov 0xc(%eax),%eax 10d002: 89 02 mov %eax,(%edx) return 0; 10d004: 31 c0 xor %eax,%eax } 10d006: c9 leave 10d007: c3 ret const pthread_mutexattr_t *attr, int *protocol ) { if ( !attr || !attr->is_initialized || !protocol ) return EINVAL; 10d008: b8 16 00 00 00 mov $0x16,%eax *protocol = attr->protocol; return 0; } 10d00d: c9 leave 10d00e: c3 ret =============================================================================== 0010d064 : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10d064: 55 push %ebp 10d065: 89 e5 mov %esp,%ebp 10d067: 56 push %esi 10d068: 53 push %ebx 10d069: 8b 5d 08 mov 0x8(%ebp),%ebx 10d06c: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10d06f: 85 db test %ebx,%ebx 10d071: 74 06 je 10d079 10d073: 8b 03 mov (%ebx),%eax 10d075: 85 c0 test %eax,%eax 10d077: 75 0f jne 10d088 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; 10d079: b8 16 00 00 00 mov $0x16,%eax attr->prio_ceiling = prioceiling; return 0; } 10d07e: 8d 65 f8 lea -0x8(%ebp),%esp 10d081: 5b pop %ebx 10d082: 5e pop %esi 10d083: c9 leave 10d084: c3 ret 10d085: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d088: 83 ec 0c sub $0xc,%esp 10d08b: 56 push %esi 10d08c: e8 6b 05 00 00 call 10d5fc <_POSIX_Priority_Is_valid> 10d091: 83 c4 10 add $0x10,%esp 10d094: 84 c0 test %al,%al 10d096: 74 e1 je 10d079 return EINVAL; attr->prio_ceiling = prioceiling; 10d098: 89 73 08 mov %esi,0x8(%ebx) return 0; 10d09b: 31 c0 xor %eax,%eax } 10d09d: 8d 65 f8 lea -0x8(%ebp),%esp 10d0a0: 5b pop %ebx 10d0a1: 5e pop %esi 10d0a2: c9 leave 10d0a3: c3 ret =============================================================================== 0010d0a4 : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10d0a4: 55 push %ebp 10d0a5: 89 e5 mov %esp,%ebp 10d0a7: 8b 45 08 mov 0x8(%ebp),%eax 10d0aa: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10d0ad: 85 c0 test %eax,%eax 10d0af: 74 0b je 10d0bc 10d0b1: 8b 08 mov (%eax),%ecx 10d0b3: 85 c9 test %ecx,%ecx 10d0b5: 74 05 je 10d0bc return EINVAL; switch ( protocol ) { 10d0b7: 83 fa 02 cmp $0x2,%edx 10d0ba: 76 08 jbe 10d0c4 case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; default: return EINVAL; 10d0bc: b8 16 00 00 00 mov $0x16,%eax } } 10d0c1: c9 leave 10d0c2: c3 ret 10d0c3: 90 nop <== NOT EXECUTED switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10d0c4: 89 50 0c mov %edx,0xc(%eax) return 0; 10d0c7: 31 c0 xor %eax,%eax default: return EINVAL; } } 10d0c9: c9 leave 10d0ca: c3 ret =============================================================================== 0010d0cc : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10d0cc: 55 push %ebp 10d0cd: 89 e5 mov %esp,%ebp 10d0cf: 8b 45 08 mov 0x8(%ebp),%eax 10d0d2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10d0d5: 85 c0 test %eax,%eax 10d0d7: 74 0b je 10d0e4 10d0d9: 8b 08 mov (%eax),%ecx 10d0db: 85 c9 test %ecx,%ecx 10d0dd: 74 05 je 10d0e4 return EINVAL; switch ( pshared ) { 10d0df: 83 fa 01 cmp $0x1,%edx 10d0e2: 76 08 jbe 10d0ec <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10d0e4: b8 16 00 00 00 mov $0x16,%eax } } 10d0e9: c9 leave 10d0ea: c3 ret 10d0eb: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10d0ec: 89 50 04 mov %edx,0x4(%eax) return 0; 10d0ef: 31 c0 xor %eax,%eax default: return EINVAL; } } 10d0f1: c9 leave 10d0f2: c3 ret =============================================================================== 0010b2b0 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10b2b0: 55 push %ebp 10b2b1: 89 e5 mov %esp,%ebp 10b2b3: 8b 45 08 mov 0x8(%ebp),%eax 10b2b6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b2b9: 85 c0 test %eax,%eax 10b2bb: 74 0b je 10b2c8 10b2bd: 8b 08 mov (%eax),%ecx 10b2bf: 85 c9 test %ecx,%ecx 10b2c1: 74 05 je 10b2c8 <== NEVER TAKEN return EINVAL; switch ( type ) { 10b2c3: 83 fa 03 cmp $0x3,%edx 10b2c6: 76 08 jbe 10b2d0 case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; default: return EINVAL; 10b2c8: b8 16 00 00 00 mov $0x16,%eax } } 10b2cd: c9 leave 10b2ce: c3 ret 10b2cf: 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; 10b2d0: 89 50 10 mov %edx,0x10(%eax) return 0; 10b2d3: 31 c0 xor %eax,%eax default: return EINVAL; } } 10b2d5: c9 leave 10b2d6: c3 ret =============================================================================== 0010be04 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10be04: 55 push %ebp 10be05: 89 e5 mov %esp,%ebp 10be07: 57 push %edi 10be08: 56 push %esi 10be09: 53 push %ebx 10be0a: 83 ec 1c sub $0x1c,%esp 10be0d: 8b 5d 08 mov 0x8(%ebp),%ebx 10be10: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10be13: 85 db test %ebx,%ebx 10be15: 74 51 je 10be68 10be17: 85 f6 test %esi,%esi 10be19: 74 4d je 10be68 return EINVAL; if ( !once_control->init_executed ) { 10be1b: 8b 7b 04 mov 0x4(%ebx),%edi 10be1e: 85 ff test %edi,%edi 10be20: 74 0a je 10be2c once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; 10be22: 31 c0 xor %eax,%eax } 10be24: 8d 65 f4 lea -0xc(%ebp),%esp 10be27: 5b pop %ebx 10be28: 5e pop %esi 10be29: 5f pop %edi 10be2a: c9 leave 10be2b: 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); 10be2c: 51 push %ecx 10be2d: 8d 7d e4 lea -0x1c(%ebp),%edi 10be30: 57 push %edi 10be31: 68 00 01 00 00 push $0x100 10be36: 68 00 01 00 00 push $0x100 10be3b: e8 ec 0b 00 00 call 10ca2c if ( !once_control->init_executed ) { 10be40: 83 c4 10 add $0x10,%esp 10be43: 8b 53 04 mov 0x4(%ebx),%edx 10be46: 85 d2 test %edx,%edx 10be48: 74 2e je 10be78 <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10be4a: 50 push %eax 10be4b: 57 push %edi 10be4c: 68 00 01 00 00 push $0x100 10be51: ff 75 e4 pushl -0x1c(%ebp) 10be54: e8 d3 0b 00 00 call 10ca2c 10be59: 83 c4 10 add $0x10,%esp } return 0; 10be5c: 31 c0 xor %eax,%eax } 10be5e: 8d 65 f4 lea -0xc(%ebp),%esp 10be61: 5b pop %ebx 10be62: 5e pop %esi 10be63: 5f pop %edi 10be64: c9 leave 10be65: c3 ret 10be66: 66 90 xchg %ax,%ax <== NOT EXECUTED pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) return EINVAL; 10be68: b8 16 00 00 00 mov $0x16,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10be6d: 8d 65 f4 lea -0xc(%ebp),%esp 10be70: 5b pop %ebx 10be71: 5e pop %esi 10be72: 5f pop %edi 10be73: c9 leave 10be74: c3 ret 10be75: 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; 10be78: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10be7e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10be85: ff d6 call *%esi 10be87: eb c1 jmp 10be4a =============================================================================== 0010c338 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10c338: 55 push %ebp 10c339: 89 e5 mov %esp,%ebp 10c33b: 53 push %ebx 10c33c: 83 ec 14 sub $0x14,%esp 10c33f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10c342: 85 c0 test %eax,%eax 10c344: 74 42 je 10c388 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c346: 53 push %ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c347: 8d 55 f4 lea -0xc(%ebp),%edx 10c34a: 52 push %edx 10c34b: ff 30 pushl (%eax) 10c34d: 68 60 96 12 00 push $0x129660 10c352: e8 b5 2b 00 00 call 10ef0c <_Objects_Get> 10c357: 89 c3 mov %eax,%ebx switch ( location ) { 10c359: 83 c4 10 add $0x10,%esp 10c35c: 8b 4d f4 mov -0xc(%ebp),%ecx 10c35f: 85 c9 test %ecx,%ecx 10c361: 75 25 jne 10c388 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 ) { 10c363: 83 ec 0c sub $0xc,%esp 10c366: 8d 40 10 lea 0x10(%eax),%eax 10c369: 50 push %eax 10c36a: e8 61 3c 00 00 call 10ffd0 <_Thread_queue_First> 10c36f: 83 c4 10 add $0x10,%esp 10c372: 85 c0 test %eax,%eax 10c374: 74 1e je 10c394 _Thread_Enable_dispatch(); 10c376: e8 21 34 00 00 call 10f79c <_Thread_Enable_dispatch> return EBUSY; 10c37b: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c380: 8b 5d fc mov -0x4(%ebp),%ebx 10c383: c9 leave 10c384: c3 ret 10c385: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10c388: b8 16 00 00 00 mov $0x16,%eax } 10c38d: 8b 5d fc mov -0x4(%ebp),%ebx 10c390: c9 leave 10c391: c3 ret 10c392: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10c394: 83 ec 08 sub $0x8,%esp 10c397: 53 push %ebx 10c398: 68 60 96 12 00 push $0x129660 10c39d: e8 36 27 00 00 call 10ead8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10c3a2: 58 pop %eax 10c3a3: 5a pop %edx 10c3a4: 53 push %ebx 10c3a5: 68 60 96 12 00 push $0x129660 10c3aa: e8 25 2a 00 00 call 10edd4 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10c3af: e8 e8 33 00 00 call 10f79c <_Thread_Enable_dispatch> return 0; 10c3b4: 83 c4 10 add $0x10,%esp 10c3b7: 31 c0 xor %eax,%eax 10c3b9: eb d2 jmp 10c38d =============================================================================== 0010c3bc : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10c3bc: 55 push %ebp 10c3bd: 89 e5 mov %esp,%ebp 10c3bf: 56 push %esi 10c3c0: 53 push %ebx 10c3c1: 83 ec 20 sub $0x20,%esp 10c3c4: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3c7: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10c3ca: 85 db test %ebx,%ebx 10c3cc: 74 15 je 10c3e3 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10c3ce: 85 f6 test %esi,%esi 10c3d0: 0f 84 86 00 00 00 je 10c45c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10c3d6: 8b 16 mov (%esi),%edx 10c3d8: 85 d2 test %edx,%edx 10c3da: 74 07 je 10c3e3 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10c3dc: 8b 46 04 mov 0x4(%esi),%eax 10c3df: 85 c0 test %eax,%eax 10c3e1: 74 0d je 10c3f0 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 10c3e3: b8 16 00 00 00 mov $0x16,%eax *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 10c3e8: 8d 65 f8 lea -0x8(%ebp),%esp 10c3eb: 5b pop %ebx 10c3ec: 5e pop %esi 10c3ed: c9 leave 10c3ee: c3 ret 10c3ef: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c3f0: a1 f4 93 12 00 mov 0x1293f4,%eax 10c3f5: 40 inc %eax 10c3f6: a3 f4 93 12 00 mov %eax,0x1293f4 * 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 ); 10c3fb: 83 ec 0c sub $0xc,%esp 10c3fe: 68 60 96 12 00 push $0x129660 10c403: e8 54 26 00 00 call 10ea5c <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10c408: 83 c4 10 add $0x10,%esp 10c40b: 85 c0 test %eax,%eax 10c40d: 74 41 je 10c450 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10c40f: 83 ec 08 sub $0x8,%esp 10c412: 8d 55 f4 lea -0xc(%ebp),%edx 10c415: 52 push %edx 10c416: 8d 50 10 lea 0x10(%eax),%edx 10c419: 52 push %edx 10c41a: 89 45 e4 mov %eax,-0x1c(%ebp) 10c41d: e8 26 1e 00 00 call 10e248 <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c422: 8b 45 e4 mov -0x1c(%ebp),%eax 10c425: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10c428: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c42b: 8b 0d 7c 96 12 00 mov 0x12967c,%ecx 10c431: 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; 10c434: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10c43b: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c43d: e8 5a 33 00 00 call 10f79c <_Thread_Enable_dispatch> return 0; 10c442: 83 c4 10 add $0x10,%esp 10c445: 31 c0 xor %eax,%eax } 10c447: 8d 65 f8 lea -0x8(%ebp),%esp 10c44a: 5b pop %ebx 10c44b: 5e pop %esi 10c44c: c9 leave 10c44d: c3 ret 10c44e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10c450: e8 47 33 00 00 call 10f79c <_Thread_Enable_dispatch> return EAGAIN; 10c455: b8 0b 00 00 00 mov $0xb,%eax 10c45a: eb 8c jmp 10c3e8 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10c45c: 83 ec 0c sub $0xc,%esp 10c45f: 8d 75 ec lea -0x14(%ebp),%esi 10c462: 56 push %esi 10c463: e8 7c 09 00 00 call 10cde4 10c468: 83 c4 10 add $0x10,%esp 10c46b: e9 66 ff ff ff jmp 10c3d6 =============================================================================== 0010c470 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10c470: 55 push %ebp 10c471: 89 e5 mov %esp,%ebp 10c473: 53 push %ebx 10c474: 83 ec 14 sub $0x14,%esp 10c477: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c47a: 85 db test %ebx,%ebx 10c47c: 74 1b je 10c499 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c47e: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c47f: 8d 45 f4 lea -0xc(%ebp),%eax 10c482: 50 push %eax 10c483: ff 33 pushl (%ebx) 10c485: 68 60 96 12 00 push $0x129660 10c48a: e8 7d 2a 00 00 call 10ef0c <_Objects_Get> switch ( location ) { 10c48f: 83 c4 10 add $0x10,%esp 10c492: 8b 55 f4 mov -0xc(%ebp),%edx 10c495: 85 d2 test %edx,%edx 10c497: 74 0b je 10c4a4 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c499: b8 16 00 00 00 mov $0x16,%eax } 10c49e: 8b 5d fc mov -0x4(%ebp),%ebx 10c4a1: c9 leave 10c4a2: c3 ret 10c4a3: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c4a4: 83 ec 0c sub $0xc,%esp 10c4a7: 6a 00 push $0x0 10c4a9: 6a 00 push $0x0 10c4ab: 6a 01 push $0x1 10c4ad: ff 33 pushl (%ebx) 10c4af: 83 c0 10 add $0x10,%eax 10c4b2: 50 push %eax 10c4b3: e8 c4 1d 00 00 call 10e27c <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c4b8: 83 c4 20 add $0x20,%esp 10c4bb: e8 dc 32 00 00 call 10f79c <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4c0: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c4c3: a1 b8 99 12 00 mov 0x1299b8,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4c8: ff 70 34 pushl 0x34(%eax) 10c4cb: e8 70 01 00 00 call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c4d0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c4d3: 8b 5d fc mov -0x4(%ebp),%ebx 10c4d6: c9 leave 10c4d7: c3 ret =============================================================================== 0010c4d8 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c4d8: 55 push %ebp 10c4d9: 89 e5 mov %esp,%ebp 10c4db: 56 push %esi 10c4dc: 53 push %ebx 10c4dd: 83 ec 20 sub $0x20,%esp 10c4e0: 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 ) 10c4e3: 85 db test %ebx,%ebx 10c4e5: 74 7d je 10c564 * * 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 ); 10c4e7: 83 ec 08 sub $0x8,%esp 10c4ea: 8d 45 f0 lea -0x10(%ebp),%eax 10c4ed: 50 push %eax 10c4ee: ff 75 0c pushl 0xc(%ebp) 10c4f1: e8 aa 61 00 00 call 1126a0 <_POSIX_Absolute_timeout_to_ticks> 10c4f6: 89 c6 mov %eax,%esi 10c4f8: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c4fb: 8d 45 f4 lea -0xc(%ebp),%eax 10c4fe: 50 push %eax 10c4ff: ff 33 pushl (%ebx) 10c501: 68 60 96 12 00 push $0x129660 10c506: e8 01 2a 00 00 call 10ef0c <_Objects_Get> switch ( location ) { 10c50b: 83 c4 10 add $0x10,%esp 10c50e: 8b 55 f4 mov -0xc(%ebp),%edx 10c511: 85 d2 test %edx,%edx 10c513: 75 4f jne 10c564 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, 10c515: 83 fe 03 cmp $0x3,%esi 10c518: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c51b: 83 ec 0c sub $0xc,%esp 10c51e: 6a 00 push $0x0 10c520: ff 75 f0 pushl -0x10(%ebp) 10c523: 0f b6 ca movzbl %dl,%ecx 10c526: 51 push %ecx 10c527: ff 33 pushl (%ebx) 10c529: 83 c0 10 add $0x10,%eax 10c52c: 50 push %eax 10c52d: 88 55 e4 mov %dl,-0x1c(%ebp) 10c530: e8 47 1d 00 00 call 10e27c <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c535: 83 c4 20 add $0x20,%esp 10c538: e8 5f 32 00 00 call 10f79c <_Thread_Enable_dispatch> if ( !do_wait ) { 10c53d: 8a 55 e4 mov -0x1c(%ebp),%dl 10c540: 84 d2 test %dl,%dl 10c542: 75 3c jne 10c580 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10c544: a1 b8 99 12 00 mov 0x1299b8,%eax 10c549: 8b 40 34 mov 0x34(%eax),%eax 10c54c: 83 f8 02 cmp $0x2,%eax 10c54f: 74 1f je 10c570 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c551: 83 ec 0c sub $0xc,%esp 10c554: 50 push %eax 10c555: e8 e6 00 00 00 call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c55a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c55d: 8d 65 f8 lea -0x8(%ebp),%esp 10c560: 5b pop %ebx 10c561: 5e pop %esi 10c562: c9 leave 10c563: c3 ret #endif case OBJECTS_ERROR: break; } return EINVAL; 10c564: b8 16 00 00 00 mov $0x16,%eax } 10c569: 8d 65 f8 lea -0x8(%ebp),%esp 10c56c: 5b pop %ebx 10c56d: 5e pop %esi 10c56e: c9 leave 10c56f: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 10c570: 85 f6 test %esi,%esi 10c572: 74 f0 je 10c564 <== NEVER TAKEN 10c574: 83 fe 02 cmp $0x2,%esi 10c577: 77 d8 ja 10c551 <== NEVER TAKEN case POSIX_ABSOLUTE_TIMEOUT_INVALID: return EINVAL; case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST: case POSIX_ABSOLUTE_TIMEOUT_IS_NOW: return ETIMEDOUT; 10c579: b8 74 00 00 00 mov $0x74,%eax 10c57e: eb e9 jmp 10c569 ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 10c580: a1 b8 99 12 00 mov 0x1299b8,%eax 10c585: 8b 40 34 mov 0x34(%eax),%eax 10c588: eb c7 jmp 10c551 =============================================================================== 0010c58c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c58c: 55 push %ebp 10c58d: 89 e5 mov %esp,%ebp 10c58f: 56 push %esi 10c590: 53 push %ebx 10c591: 83 ec 20 sub $0x20,%esp 10c594: 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 ) 10c597: 85 db test %ebx,%ebx 10c599: 74 7d je 10c618 * * 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 ); 10c59b: 83 ec 08 sub $0x8,%esp 10c59e: 8d 45 f0 lea -0x10(%ebp),%eax 10c5a1: 50 push %eax 10c5a2: ff 75 0c pushl 0xc(%ebp) 10c5a5: e8 f6 60 00 00 call 1126a0 <_POSIX_Absolute_timeout_to_ticks> 10c5aa: 89 c6 mov %eax,%esi 10c5ac: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c5af: 8d 45 f4 lea -0xc(%ebp),%eax 10c5b2: 50 push %eax 10c5b3: ff 33 pushl (%ebx) 10c5b5: 68 60 96 12 00 push $0x129660 10c5ba: e8 4d 29 00 00 call 10ef0c <_Objects_Get> switch ( location ) { 10c5bf: 83 c4 10 add $0x10,%esp 10c5c2: 8b 55 f4 mov -0xc(%ebp),%edx 10c5c5: 85 d2 test %edx,%edx 10c5c7: 75 4f jne 10c618 (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, 10c5c9: 83 fe 03 cmp $0x3,%esi 10c5cc: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c5cf: 83 ec 0c sub $0xc,%esp 10c5d2: 6a 00 push $0x0 10c5d4: ff 75 f0 pushl -0x10(%ebp) 10c5d7: 0f b6 ca movzbl %dl,%ecx 10c5da: 51 push %ecx 10c5db: ff 33 pushl (%ebx) 10c5dd: 83 c0 10 add $0x10,%eax 10c5e0: 50 push %eax 10c5e1: 88 55 e4 mov %dl,-0x1c(%ebp) 10c5e4: e8 5b 1d 00 00 call 10e344 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c5e9: 83 c4 20 add $0x20,%esp 10c5ec: e8 ab 31 00 00 call 10f79c <_Thread_Enable_dispatch> if ( !do_wait && 10c5f1: 8a 55 e4 mov -0x1c(%ebp),%dl 10c5f4: 84 d2 test %dl,%dl 10c5f6: 75 3c jne 10c634 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10c5f8: a1 b8 99 12 00 mov 0x1299b8,%eax 10c5fd: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c600: 83 f8 02 cmp $0x2,%eax 10c603: 74 1f je 10c624 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c605: 83 ec 0c sub $0xc,%esp 10c608: 50 push %eax 10c609: e8 32 00 00 00 call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c60e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c611: 8d 65 f8 lea -0x8(%ebp),%esp 10c614: 5b pop %ebx 10c615: 5e pop %esi 10c616: c9 leave 10c617: c3 ret #endif case OBJECTS_ERROR: break; } return EINVAL; 10c618: b8 16 00 00 00 mov $0x16,%eax } 10c61d: 8d 65 f8 lea -0x8(%ebp),%esp 10c620: 5b pop %ebx 10c621: 5e pop %esi 10c622: c9 leave 10c623: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10c624: 85 f6 test %esi,%esi 10c626: 74 f0 je 10c618 <== NEVER TAKEN 10c628: 83 fe 02 cmp $0x2,%esi 10c62b: 77 d8 ja 10c605 <== NEVER TAKEN case POSIX_ABSOLUTE_TIMEOUT_INVALID: return EINVAL; case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST: case POSIX_ABSOLUTE_TIMEOUT_IS_NOW: return ETIMEDOUT; 10c62d: b8 74 00 00 00 mov $0x74,%eax 10c632: eb e9 jmp 10c61d ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10c634: a1 b8 99 12 00 mov 0x1299b8,%eax 10c639: 8b 40 34 mov 0x34(%eax),%eax 10c63c: eb c7 jmp 10c605 =============================================================================== 0010c650 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10c650: 55 push %ebp 10c651: 89 e5 mov %esp,%ebp 10c653: 53 push %ebx 10c654: 83 ec 14 sub $0x14,%esp 10c657: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c65a: 85 db test %ebx,%ebx 10c65c: 74 1b je 10c679 10c65e: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c65f: 8d 45 f4 lea -0xc(%ebp),%eax 10c662: 50 push %eax 10c663: ff 33 pushl (%ebx) 10c665: 68 60 96 12 00 push $0x129660 10c66a: e8 9d 28 00 00 call 10ef0c <_Objects_Get> switch ( location ) { 10c66f: 83 c4 10 add $0x10,%esp 10c672: 8b 55 f4 mov -0xc(%ebp),%edx 10c675: 85 d2 test %edx,%edx 10c677: 74 0b je 10c684 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c679: b8 16 00 00 00 mov $0x16,%eax } 10c67e: 8b 5d fc mov -0x4(%ebp),%ebx 10c681: c9 leave 10c682: c3 ret 10c683: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c684: 83 ec 0c sub $0xc,%esp 10c687: 6a 00 push $0x0 10c689: 6a 00 push $0x0 10c68b: 6a 00 push $0x0 10c68d: ff 33 pushl (%ebx) 10c68f: 83 c0 10 add $0x10,%eax 10c692: 50 push %eax 10c693: e8 e4 1b 00 00 call 10e27c <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10c698: 83 c4 20 add $0x20,%esp 10c69b: e8 fc 30 00 00 call 10f79c <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c6a0: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c6a3: a1 b8 99 12 00 mov 0x1299b8,%eax NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c6a8: ff 70 34 pushl 0x34(%eax) 10c6ab: e8 90 ff ff ff call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c6b0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c6b3: 8b 5d fc mov -0x4(%ebp),%ebx 10c6b6: c9 leave 10c6b7: c3 ret =============================================================================== 0010c6b8 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10c6b8: 55 push %ebp 10c6b9: 89 e5 mov %esp,%ebp 10c6bb: 53 push %ebx 10c6bc: 83 ec 14 sub $0x14,%esp 10c6bf: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c6c2: 85 db test %ebx,%ebx 10c6c4: 74 1b je 10c6e1 10c6c6: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c6c7: 8d 45 f4 lea -0xc(%ebp),%eax 10c6ca: 50 push %eax 10c6cb: ff 33 pushl (%ebx) 10c6cd: 68 60 96 12 00 push $0x129660 10c6d2: e8 35 28 00 00 call 10ef0c <_Objects_Get> switch ( location ) { 10c6d7: 83 c4 10 add $0x10,%esp 10c6da: 8b 55 f4 mov -0xc(%ebp),%edx 10c6dd: 85 d2 test %edx,%edx 10c6df: 74 0b je 10c6ec #endif case OBJECTS_ERROR: break; } return EINVAL; 10c6e1: b8 16 00 00 00 mov $0x16,%eax } 10c6e6: 8b 5d fc mov -0x4(%ebp),%ebx 10c6e9: c9 leave 10c6ea: c3 ret 10c6eb: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c6ec: 83 ec 0c sub $0xc,%esp 10c6ef: 6a 00 push $0x0 10c6f1: 6a 00 push $0x0 10c6f3: 6a 00 push $0x0 10c6f5: ff 33 pushl (%ebx) 10c6f7: 83 c0 10 add $0x10,%eax 10c6fa: 50 push %eax 10c6fb: e8 44 1c 00 00 call 10e344 <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10c700: 83 c4 20 add $0x20,%esp 10c703: e8 94 30 00 00 call 10f79c <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c708: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c70b: a1 b8 99 12 00 mov 0x1299b8,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c710: ff 70 34 pushl 0x34(%eax) 10c713: e8 28 ff ff ff call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c718: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c71b: 8b 5d fc mov -0x4(%ebp),%ebx 10c71e: c9 leave 10c71f: c3 ret =============================================================================== 0010c720 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10c720: 55 push %ebp 10c721: 89 e5 mov %esp,%ebp 10c723: 53 push %ebx 10c724: 83 ec 14 sub $0x14,%esp 10c727: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10c72a: 85 c0 test %eax,%eax 10c72c: 74 1b je 10c749 10c72e: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c72f: 8d 55 f4 lea -0xc(%ebp),%edx 10c732: 52 push %edx 10c733: ff 30 pushl (%eax) 10c735: 68 60 96 12 00 push $0x129660 10c73a: e8 cd 27 00 00 call 10ef0c <_Objects_Get> switch ( location ) { 10c73f: 83 c4 10 add $0x10,%esp 10c742: 8b 55 f4 mov -0xc(%ebp),%edx 10c745: 85 d2 test %edx,%edx 10c747: 74 0b je 10c754 #endif case OBJECTS_ERROR: break; } return EINVAL; 10c749: b8 16 00 00 00 mov $0x16,%eax } 10c74e: 8b 5d fc mov -0x4(%ebp),%ebx 10c751: c9 leave 10c752: c3 ret 10c753: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10c754: 83 ec 0c sub $0xc,%esp 10c757: 83 c0 10 add $0x10,%eax 10c75a: 50 push %eax 10c75b: e8 70 1c 00 00 call 10e3d0 <_CORE_RWLock_Release> 10c760: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10c762: e8 35 30 00 00 call 10f79c <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c767: 89 1c 24 mov %ebx,(%esp) 10c76a: e8 d1 fe ff ff call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c76f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c772: 8b 5d fc mov -0x4(%ebp),%ebx 10c775: c9 leave 10c776: c3 ret =============================================================================== 0010c778 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10c778: 55 push %ebp 10c779: 89 e5 mov %esp,%ebp 10c77b: 53 push %ebx 10c77c: 83 ec 14 sub $0x14,%esp 10c77f: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c782: 85 db test %ebx,%ebx 10c784: 74 1b je 10c7a1 10c786: 51 push %ecx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10c787: 8d 45 f4 lea -0xc(%ebp),%eax 10c78a: 50 push %eax 10c78b: ff 33 pushl (%ebx) 10c78d: 68 60 96 12 00 push $0x129660 10c792: e8 75 27 00 00 call 10ef0c <_Objects_Get> switch ( location ) { 10c797: 83 c4 10 add $0x10,%esp 10c79a: 8b 55 f4 mov -0xc(%ebp),%edx 10c79d: 85 d2 test %edx,%edx 10c79f: 74 0b je 10c7ac #endif case OBJECTS_ERROR: break; } return EINVAL; 10c7a1: b8 16 00 00 00 mov $0x16,%eax } 10c7a6: 8b 5d fc mov -0x4(%ebp),%ebx 10c7a9: c9 leave 10c7aa: c3 ret 10c7ab: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c7ac: 83 ec 0c sub $0xc,%esp 10c7af: 6a 00 push $0x0 10c7b1: 6a 00 push $0x0 10c7b3: 6a 01 push $0x1 10c7b5: ff 33 pushl (%ebx) 10c7b7: 83 c0 10 add $0x10,%eax 10c7ba: 50 push %eax 10c7bb: e8 84 1b 00 00 call 10e344 <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c7c0: 83 c4 20 add $0x20,%esp 10c7c3: e8 d4 2f 00 00 call 10f79c <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c7c8: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10c7cb: a1 b8 99 12 00 mov 0x1299b8,%eax 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c7d0: ff 70 34 pushl 0x34(%eax) 10c7d3: e8 68 fe ff ff call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c7d8: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c7db: 8b 5d fc mov -0x4(%ebp),%ebx 10c7de: c9 leave 10c7df: c3 ret =============================================================================== 0010cd9c : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10cd9c: 55 push %ebp 10cd9d: 89 e5 mov %esp,%ebp 10cd9f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10cda2: 85 c0 test %eax,%eax 10cda4: 74 12 je 10cdb8 10cda6: 8b 10 mov (%eax),%edx 10cda8: 85 d2 test %edx,%edx 10cdaa: 74 0c je 10cdb8 return EINVAL; attr->is_initialized = false; 10cdac: c7 00 00 00 00 00 movl $0x0,(%eax) return 0; 10cdb2: 31 c0 xor %eax,%eax } 10cdb4: c9 leave 10cdb5: c3 ret 10cdb6: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 10cdb8: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = false; return 0; } 10cdbd: c9 leave 10cdbe: c3 ret =============================================================================== 0010cde4 : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 10cde4: 55 push %ebp 10cde5: 89 e5 mov %esp,%ebp 10cde7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10cdea: 85 c0 test %eax,%eax 10cdec: 74 12 je 10ce00 return EINVAL; attr->is_initialized = true; 10cdee: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10cdf4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) return 0; 10cdfb: 31 c0 xor %eax,%eax } 10cdfd: c9 leave 10cdfe: c3 ret 10cdff: 90 nop <== NOT EXECUTED int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { if ( !attr ) return EINVAL; 10ce00: b8 16 00 00 00 mov $0x16,%eax attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10ce05: c9 leave 10ce06: c3 ret =============================================================================== 0010ce08 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10ce08: 55 push %ebp 10ce09: 89 e5 mov %esp,%ebp 10ce0b: 8b 45 08 mov 0x8(%ebp),%eax 10ce0e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10ce11: 85 c0 test %eax,%eax 10ce13: 74 0b je 10ce20 return EINVAL; if ( !attr->is_initialized ) 10ce15: 8b 08 mov (%eax),%ecx 10ce17: 85 c9 test %ecx,%ecx 10ce19: 74 05 je 10ce20 return EINVAL; switch ( pshared ) { 10ce1b: 83 fa 01 cmp $0x1,%edx 10ce1e: 76 08 jbe 10ce28 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 10ce20: b8 16 00 00 00 mov $0x16,%eax } } 10ce25: c9 leave 10ce26: c3 ret 10ce27: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10ce28: 89 50 04 mov %edx,0x4(%eax) return 0; 10ce2b: 31 c0 xor %eax,%eax default: return EINVAL; } } 10ce2d: c9 leave 10ce2e: c3 ret =============================================================================== 0010b29c : int pthread_setcancelstate( int state, int *oldstate ) { 10b29c: 55 push %ebp 10b29d: 89 e5 mov %esp,%ebp 10b29f: 53 push %ebx 10b2a0: 83 ec 04 sub $0x4,%esp 10b2a3: 8b 55 08 mov 0x8(%ebp),%edx 10b2a6: 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() ) 10b2a9: 8b 0d b4 89 12 00 mov 0x1289b4,%ecx 10b2af: 85 c9 test %ecx,%ecx 10b2b1: 75 15 jne 10b2c8 return EPROTO; if ( !oldstate ) 10b2b3: 85 c0 test %eax,%eax 10b2b5: 74 05 je 10b2bc return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10b2b7: 83 fa 01 cmp $0x1,%edx 10b2ba: 76 18 jbe 10b2d4 return EINVAL; 10b2bc: b8 16 00 00 00 mov $0x16,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b2c1: 8b 5d fc mov -0x4(%ebp),%ebx 10b2c4: c9 leave 10b2c5: c3 ret 10b2c6: 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; 10b2c8: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b2cd: 8b 5d fc mov -0x4(%ebp),%ebx 10b2d0: c9 leave 10b2d1: c3 ret 10b2d2: 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 ]; 10b2d4: 8b 0d b8 89 12 00 mov 0x1289b8,%ecx 10b2da: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b2e0: 8b 1d f4 83 12 00 mov 0x1283f4,%ebx 10b2e6: 43 inc %ebx 10b2e7: 89 1d f4 83 12 00 mov %ebx,0x1283f4 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10b2ed: 8b 99 d4 00 00 00 mov 0xd4(%ecx),%ebx 10b2f3: 89 18 mov %ebx,(%eax) thread_support->cancelability_state = state; 10b2f5: 89 91 d4 00 00 00 mov %edx,0xd4(%ecx) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b2fb: 83 ec 0c sub $0xc,%esp 10b2fe: ff 35 b8 89 12 00 pushl 0x1289b8 10b304: e8 37 53 00 00 call 110640 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b309: 83 c4 10 add $0x10,%esp 10b30c: 31 c0 xor %eax,%eax } 10b30e: 8b 5d fc mov -0x4(%ebp),%ebx 10b311: c9 leave 10b312: c3 ret =============================================================================== 0010b314 : int pthread_setcanceltype( int type, int *oldtype ) { 10b314: 55 push %ebp 10b315: 89 e5 mov %esp,%ebp 10b317: 53 push %ebx 10b318: 83 ec 04 sub $0x4,%esp 10b31b: 8b 55 08 mov 0x8(%ebp),%edx 10b31e: 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() ) 10b321: 8b 0d b4 89 12 00 mov 0x1289b4,%ecx 10b327: 85 c9 test %ecx,%ecx 10b329: 75 15 jne 10b340 return EPROTO; if ( !oldtype ) 10b32b: 85 c0 test %eax,%eax 10b32d: 74 05 je 10b334 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10b32f: 83 fa 01 cmp $0x1,%edx 10b332: 76 18 jbe 10b34c return EINVAL; 10b334: b8 16 00 00 00 mov $0x16,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b339: 8b 5d fc mov -0x4(%ebp),%ebx 10b33c: c9 leave 10b33d: c3 ret 10b33e: 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; 10b340: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b345: 8b 5d fc mov -0x4(%ebp),%ebx 10b348: c9 leave 10b349: c3 ret 10b34a: 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 ]; 10b34c: 8b 0d b8 89 12 00 mov 0x1289b8,%ecx 10b352: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx 10b358: 8b 1d f4 83 12 00 mov 0x1283f4,%ebx 10b35e: 43 inc %ebx 10b35f: 89 1d f4 83 12 00 mov %ebx,0x1283f4 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10b365: 8b 99 d8 00 00 00 mov 0xd8(%ecx),%ebx 10b36b: 89 18 mov %ebx,(%eax) thread_support->cancelability_type = type; 10b36d: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b373: 83 ec 0c sub $0xc,%esp 10b376: ff 35 b8 89 12 00 pushl 0x1289b8 10b37c: e8 bf 52 00 00 call 110640 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b381: 83 c4 10 add $0x10,%esp 10b384: 31 c0 xor %eax,%eax } 10b386: 8b 5d fc mov -0x4(%ebp),%ebx 10b389: c9 leave 10b38a: c3 ret =============================================================================== 0010dd64 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10dd64: 55 push %ebp 10dd65: 89 e5 mov %esp,%ebp 10dd67: 57 push %edi 10dd68: 56 push %esi 10dd69: 53 push %ebx 10dd6a: 83 ec 2c sub $0x2c,%esp 10dd6d: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10dd70: 85 f6 test %esi,%esi 10dd72: 0f 84 cc 00 00 00 je 10de44 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10dd78: 8d 45 e0 lea -0x20(%ebp),%eax 10dd7b: 50 push %eax 10dd7c: 8d 45 e4 lea -0x1c(%ebp),%eax 10dd7f: 50 push %eax 10dd80: 56 push %esi 10dd81: ff 75 0c pushl 0xc(%ebp) 10dd84: e8 ef 5a 00 00 call 113878 <_POSIX_Thread_Translate_sched_param> 10dd89: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10dd8b: 83 c4 10 add $0x10,%esp 10dd8e: 85 c0 test %eax,%eax 10dd90: 74 0a je 10dd9c case OBJECTS_ERROR: break; } return ESRCH; } 10dd92: 89 d8 mov %ebx,%eax 10dd94: 8d 65 f4 lea -0xc(%ebp),%esp 10dd97: 5b pop %ebx 10dd98: 5e pop %esi 10dd99: 5f pop %edi 10dd9a: c9 leave 10dd9b: c3 ret 10dd9c: 50 push %eax return rc; /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); 10dd9d: 8d 45 dc lea -0x24(%ebp),%eax 10dda0: 50 push %eax 10dda1: ff 75 08 pushl 0x8(%ebp) 10dda4: 68 e0 c7 12 00 push $0x12c7e0 10dda9: e8 86 1f 00 00 call 10fd34 <_Objects_Get> 10ddae: 89 c2 mov %eax,%edx switch ( location ) { 10ddb0: 83 c4 10 add $0x10,%esp 10ddb3: 8b 7d dc mov -0x24(%ebp),%edi 10ddb6: 85 ff test %edi,%edi 10ddb8: 0f 85 96 00 00 00 jne 10de54 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10ddbe: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10ddc4: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10ddc7: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 10ddce: 0f 84 cc 00 00 00 je 10dea0 <== NEVER TAKEN (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10ddd4: 8b 45 0c mov 0xc(%ebp),%eax 10ddd7: 8b 4d d4 mov -0x2c(%ebp),%ecx 10ddda: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = *param; 10dde0: 89 cf mov %ecx,%edi 10dde2: 81 c7 84 00 00 00 add $0x84,%edi 10dde8: b9 07 00 00 00 mov $0x7,%ecx 10dded: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10ddef: 8b 45 e4 mov -0x1c(%ebp),%eax 10ddf2: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10ddf5: 8b 45 e0 mov -0x20(%ebp),%eax 10ddf8: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10ddfe: 8b 75 0c mov 0xc(%ebp),%esi 10de01: 85 f6 test %esi,%esi 10de03: 78 2e js 10de33 <== NEVER TAKEN 10de05: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10de09: 7f 59 jg 10de64 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10de0b: a1 04 c5 12 00 mov 0x12c504,%eax 10de10: 89 42 78 mov %eax,0x78(%edx) 10de13: 0f b6 05 3c 83 12 00 movzbl 0x12833c,%eax 10de1a: 8b 4d d4 mov -0x2c(%ebp),%ecx 10de1d: 2b 81 84 00 00 00 sub 0x84(%ecx),%eax the_thread->real_priority = 10de23: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10de26: 51 push %ecx 10de27: 6a 01 push $0x1 10de29: 50 push %eax 10de2a: 52 push %edx 10de2b: e8 90 22 00 00 call 1100c0 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10de30: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10de33: e8 8c 27 00 00 call 1105c4 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10de38: 89 d8 mov %ebx,%eax 10de3a: 8d 65 f4 lea -0xc(%ebp),%esp 10de3d: 5b pop %ebx 10de3e: 5e pop %esi 10de3f: 5f pop %edi 10de40: c9 leave 10de41: c3 ret 10de42: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Check all the parameters */ if ( !param ) return EINVAL; 10de44: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10de49: 89 d8 mov %ebx,%eax 10de4b: 8d 65 f4 lea -0xc(%ebp),%esp 10de4e: 5b pop %ebx 10de4f: 5e pop %esi 10de50: 5f pop %edi 10de51: c9 leave 10de52: c3 ret 10de53: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return ESRCH; 10de54: bb 03 00 00 00 mov $0x3,%ebx } 10de59: 89 d8 mov %ebx,%eax 10de5b: 8d 65 f4 lea -0xc(%ebp),%esp 10de5e: 5b pop %ebx 10de5f: 5e pop %esi 10de60: 5f pop %edi 10de61: c9 leave 10de62: c3 ret 10de63: 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 ) { 10de64: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10de68: 75 c9 jne 10de33 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10de6a: 8b 4d d4 mov -0x2c(%ebp),%ecx 10de6d: 8b 81 84 00 00 00 mov 0x84(%ecx),%eax 10de73: 89 81 a0 00 00 00 mov %eax,0xa0(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10de79: 83 ec 0c sub $0xc,%esp 10de7c: 89 c8 mov %ecx,%eax 10de7e: 05 a4 00 00 00 add $0xa4,%eax 10de83: 50 push %eax 10de84: 89 55 d0 mov %edx,-0x30(%ebp) 10de87: e8 44 39 00 00 call 1117d0 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10de8c: 58 pop %eax 10de8d: 5a pop %edx 10de8e: 8b 55 d0 mov -0x30(%ebp),%edx 10de91: 52 push %edx 10de92: 6a 00 push $0x0 10de94: e8 af fd ff ff call 10dc48 <_POSIX_Threads_Sporadic_budget_TSR> break; 10de99: 83 c4 10 add $0x10,%esp 10de9c: eb 95 jmp 10de33 10de9e: 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 ); 10dea0: 83 ec 0c sub $0xc,%esp 10dea3: 05 a4 00 00 00 add $0xa4,%eax 10dea8: 50 push %eax 10dea9: 89 55 d0 mov %edx,-0x30(%ebp) 10deac: e8 1f 39 00 00 call 1117d0 <_Watchdog_Remove> 10deb1: 83 c4 10 add $0x10,%esp 10deb4: 8b 55 d0 mov -0x30(%ebp),%edx 10deb7: e9 18 ff ff ff jmp 10ddd4 =============================================================================== 00111c54 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 111c54: 55 push %ebp 111c55: 89 e5 mov %esp,%ebp 111c57: 56 push %esi 111c58: 53 push %ebx 111c59: 8b 4d 08 mov 0x8(%ebp),%ecx 111c5c: 8b 55 0c mov 0xc(%ebp),%edx 111c5f: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 111c62: 85 d2 test %edx,%edx 111c64: 0f 84 8a 00 00 00 je 111cf4 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111c6a: a1 f8 9b 12 00 mov 0x129bf8,%eax 111c6f: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax if ( oset ) 111c75: 85 db test %ebx,%ebx 111c77: 74 0c je 111c85 *oset = api->signals_blocked; 111c79: 8b b0 cc 00 00 00 mov 0xcc(%eax),%esi 111c7f: 89 33 mov %esi,(%ebx) if ( !set ) 111c81: 85 d2 test %edx,%edx 111c83: 74 3b je 111cc0 return 0; switch ( how ) { 111c85: 83 f9 01 cmp $0x1,%ecx 111c88: 74 5e je 111ce8 111c8a: 83 f9 02 cmp $0x2,%ecx 111c8d: 74 39 je 111cc8 111c8f: 85 c9 test %ecx,%ecx 111c91: 75 41 jne 111cd4 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 111c93: 8b 12 mov (%edx),%edx 111c95: 89 90 cc 00 00 00 mov %edx,0xcc(%eax) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 111c9b: 8b 15 28 9e 12 00 mov 0x129e28,%edx 111ca1: 0b 90 d0 00 00 00 or 0xd0(%eax),%edx /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 111ca7: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 111cad: f7 d0 not %eax 111caf: 85 c2 test %eax,%edx 111cb1: 74 0d je 111cc0 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); 111cb3: e8 e8 c7 ff ff call 10e4a0 <_Thread_Dispatch> } return 0; 111cb8: 31 c0 xor %eax,%eax } 111cba: 5b pop %ebx 111cbb: 5e pop %esi 111cbc: c9 leave 111cbd: c3 ret 111cbe: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; 111cc0: 31 c0 xor %eax,%eax } 111cc2: 5b pop %ebx 111cc3: 5e pop %esi 111cc4: c9 leave 111cc5: c3 ret 111cc6: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 111cc8: 8b 12 mov (%edx),%edx 111cca: f7 d2 not %edx 111ccc: 21 90 cc 00 00 00 and %edx,0xcc(%eax) break; 111cd2: eb c7 jmp 111c9b case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 111cd4: e8 97 26 00 00 call 114370 <__errno> 111cd9: c7 00 16 00 00 00 movl $0x16,(%eax) 111cdf: b8 ff ff ff ff mov $0xffffffff,%eax (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 111ce4: 5b pop %ebx 111ce5: 5e pop %esi 111ce6: c9 leave 111ce7: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 111ce8: 8b 12 mov (%edx),%edx 111cea: 09 90 cc 00 00 00 or %edx,0xcc(%eax) break; 111cf0: eb a9 jmp 111c9b 111cf2: 66 90 xchg %ax,%ax <== NOT EXECUTED sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 111cf4: 85 db test %ebx,%ebx 111cf6: 74 dc je 111cd4 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111cf8: a1 f8 9b 12 00 mov 0x129bf8,%eax 111cfd: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 111d03: e9 71 ff ff ff jmp 111c79 =============================================================================== 0010b77c : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10b77c: 55 push %ebp 10b77d: 89 e5 mov %esp,%ebp 10b77f: 83 ec 28 sub $0x28,%esp 10b782: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10b785: 85 c0 test %eax,%eax 10b787: 74 2f je 10b7b8 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b789: 52 push %edx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b78a: 8d 55 f4 lea -0xc(%ebp),%edx 10b78d: 52 push %edx 10b78e: ff 30 pushl (%eax) 10b790: 68 e0 86 12 00 push $0x1286e0 10b795: e8 56 21 00 00 call 10d8f0 <_Objects_Get> switch ( location ) { 10b79a: 83 c4 10 add $0x10,%esp 10b79d: 8b 4d f4 mov -0xc(%ebp),%ecx 10b7a0: 85 c9 test %ecx,%ecx 10b7a2: 75 14 jne 10b7b8 */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10b7a4: 8b 50 18 mov 0x18(%eax),%edx case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10b7a7: 85 d2 test %edx,%edx 10b7a9: 74 15 je 10b7c0 _Thread_Enable_dispatch(); 10b7ab: e8 d0 29 00 00 call 10e180 <_Thread_Enable_dispatch> return EBUSY; 10b7b0: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7b5: c9 leave 10b7b6: c3 ret 10b7b7: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return EINVAL; 10b7b8: b8 16 00 00 00 mov $0x16,%eax } 10b7bd: c9 leave 10b7be: c3 ret 10b7bf: 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 ); 10b7c0: 83 ec 08 sub $0x8,%esp 10b7c3: 50 push %eax 10b7c4: 68 e0 86 12 00 push $0x1286e0 10b7c9: 89 45 e4 mov %eax,-0x1c(%ebp) 10b7cc: e8 eb 1c 00 00 call 10d4bc <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b7d1: 58 pop %eax 10b7d2: 5a pop %edx 10b7d3: 8b 45 e4 mov -0x1c(%ebp),%eax 10b7d6: 50 push %eax 10b7d7: 68 e0 86 12 00 push $0x1286e0 10b7dc: e8 d7 1f 00 00 call 10d7b8 <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10b7e1: e8 9a 29 00 00 call 10e180 <_Thread_Enable_dispatch> return 0; 10b7e6: 83 c4 10 add $0x10,%esp 10b7e9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7eb: c9 leave 10b7ec: c3 ret =============================================================================== 0010b87c : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10b87c: 55 push %ebp 10b87d: 89 e5 mov %esp,%ebp 10b87f: 53 push %ebx 10b880: 83 ec 14 sub $0x14,%esp 10b883: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b886: 85 c0 test %eax,%eax 10b888: 74 1b je 10b8a5 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b88a: 53 push %ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b88b: 8d 55 f4 lea -0xc(%ebp),%edx 10b88e: 52 push %edx 10b88f: ff 30 pushl (%eax) 10b891: 68 e0 86 12 00 push $0x1286e0 10b896: e8 55 20 00 00 call 10d8f0 <_Objects_Get> switch ( location ) { 10b89b: 83 c4 10 add $0x10,%esp 10b89e: 8b 4d f4 mov -0xc(%ebp),%ecx 10b8a1: 85 c9 test %ecx,%ecx 10b8a3: 74 0b je 10b8b0 #endif case OBJECTS_ERROR: break; } return EINVAL; 10b8a5: b8 16 00 00 00 mov $0x16,%eax } 10b8aa: 8b 5d fc mov -0x4(%ebp),%ebx 10b8ad: c9 leave 10b8ae: c3 ret 10b8af: 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 ); 10b8b0: 52 push %edx 10b8b1: 6a 00 push $0x0 10b8b3: 6a 01 push $0x1 10b8b5: 83 c0 10 add $0x10,%eax 10b8b8: 50 push %eax 10b8b9: e8 f6 15 00 00 call 10ceb4 <_CORE_spinlock_Wait> 10b8be: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b8c0: e8 bb 28 00 00 call 10e180 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b8c5: 89 1c 24 mov %ebx,(%esp) 10b8c8: e8 0b 00 00 00 call 10b8d8 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b8cd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b8d0: 8b 5d fc mov -0x4(%ebp),%ebx 10b8d3: c9 leave 10b8d4: c3 ret =============================================================================== 0010b8e8 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10b8e8: 55 push %ebp 10b8e9: 89 e5 mov %esp,%ebp 10b8eb: 53 push %ebx 10b8ec: 83 ec 14 sub $0x14,%esp 10b8ef: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b8f2: 85 c0 test %eax,%eax 10b8f4: 74 1b je 10b911 10b8f6: 53 push %ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b8f7: 8d 55 f4 lea -0xc(%ebp),%edx 10b8fa: 52 push %edx 10b8fb: ff 30 pushl (%eax) 10b8fd: 68 e0 86 12 00 push $0x1286e0 10b902: e8 e9 1f 00 00 call 10d8f0 <_Objects_Get> switch ( location ) { 10b907: 83 c4 10 add $0x10,%esp 10b90a: 8b 4d f4 mov -0xc(%ebp),%ecx 10b90d: 85 c9 test %ecx,%ecx 10b90f: 74 0b je 10b91c #endif case OBJECTS_ERROR: break; } return EINVAL; 10b911: b8 16 00 00 00 mov $0x16,%eax } 10b916: 8b 5d fc mov -0x4(%ebp),%ebx 10b919: c9 leave 10b91a: c3 ret 10b91b: 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 ); 10b91c: 52 push %edx 10b91d: 6a 00 push $0x0 10b91f: 6a 00 push $0x0 10b921: 83 c0 10 add $0x10,%eax 10b924: 50 push %eax 10b925: e8 8a 15 00 00 call 10ceb4 <_CORE_spinlock_Wait> 10b92a: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b92c: e8 4f 28 00 00 call 10e180 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b931: 89 1c 24 mov %ebx,(%esp) 10b934: e8 9f ff ff ff call 10b8d8 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b939: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b93c: 8b 5d fc mov -0x4(%ebp),%ebx 10b93f: c9 leave 10b940: c3 ret =============================================================================== 0010b944 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10b944: 55 push %ebp 10b945: 89 e5 mov %esp,%ebp 10b947: 53 push %ebx 10b948: 83 ec 14 sub $0x14,%esp 10b94b: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b94e: 85 c0 test %eax,%eax 10b950: 74 1b je 10b96d 10b952: 51 push %ecx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); 10b953: 8d 55 f4 lea -0xc(%ebp),%edx 10b956: 52 push %edx 10b957: ff 30 pushl (%eax) 10b959: 68 e0 86 12 00 push $0x1286e0 10b95e: e8 8d 1f 00 00 call 10d8f0 <_Objects_Get> switch ( location ) { 10b963: 83 c4 10 add $0x10,%esp 10b966: 8b 55 f4 mov -0xc(%ebp),%edx 10b969: 85 d2 test %edx,%edx 10b96b: 74 0b je 10b978 #endif case OBJECTS_ERROR: break; } return EINVAL; 10b96d: b8 16 00 00 00 mov $0x16,%eax } 10b972: 8b 5d fc mov -0x4(%ebp),%ebx 10b975: c9 leave 10b976: c3 ret 10b977: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10b978: 83 ec 0c sub $0xc,%esp 10b97b: 83 c0 10 add $0x10,%eax 10b97e: 50 push %eax 10b97f: e8 e0 14 00 00 call 10ce64 <_CORE_spinlock_Release> 10b984: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b986: e8 f5 27 00 00 call 10e180 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b98b: 89 1c 24 mov %ebx,(%esp) 10b98e: e8 45 ff ff ff call 10b8d8 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b993: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b996: 8b 5d fc mov -0x4(%ebp),%ebx 10b999: c9 leave 10b99a: c3 ret =============================================================================== 0010bc0c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10bc0c: 55 push %ebp 10bc0d: 89 e5 mov %esp,%ebp 10bc0f: 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() ) 10bc12: 8b 0d b4 89 12 00 mov 0x1289b4,%ecx 10bc18: 85 c9 test %ecx,%ecx 10bc1a: 75 44 jne 10bc60 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10bc1c: a1 b8 89 12 00 mov 0x1289b8,%eax 10bc21: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10bc27: 8b 15 f4 83 12 00 mov 0x1283f4,%edx 10bc2d: 42 inc %edx 10bc2e: 89 15 f4 83 12 00 mov %edx,0x1283f4 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10bc34: 8b 90 d4 00 00 00 mov 0xd4(%eax),%edx 10bc3a: 85 d2 test %edx,%edx 10bc3c: 75 26 jne 10bc64 <== NEVER TAKEN 10bc3e: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax 10bc44: 85 c0 test %eax,%eax 10bc46: 74 1c je 10bc64 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10bc48: e8 83 26 00 00 call 10e2d0 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10bc4d: 83 ec 08 sub $0x8,%esp 10bc50: 6a ff push $0xffffffff 10bc52: ff 35 b8 89 12 00 pushl 0x1289b8 10bc58: e8 43 5a 00 00 call 1116a0 <_POSIX_Thread_Exit> 10bc5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10bc60: c9 leave <== NOT EXECUTED 10bc61: c3 ret <== NOT EXECUTED 10bc62: 66 90 xchg %ax,%ax <== NOT EXECUTED 10bc64: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10bc65: e9 66 26 00 00 jmp 10e2d0 <_Thread_Enable_dispatch> =============================================================================== 00113174 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 113174: 55 push %ebp 113175: 89 e5 mov %esp,%ebp 113177: 57 push %edi 113178: 56 push %esi 113179: 53 push %ebx 11317a: 83 ec 2c sub $0x2c,%esp 11317d: 8b 5d 08 mov 0x8(%ebp),%ebx 113180: 8b 7d 0c mov 0xc(%ebp),%edi 113183: 8b 45 10 mov 0x10(%ebp),%eax 113186: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 113189: 85 db test %ebx,%ebx 11318b: 0f 84 87 00 00 00 je 113218 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 113191: 85 f6 test %esi,%esi 113193: 0f 84 bf 00 00 00 je 113258 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 113199: f7 c7 10 00 00 00 test $0x10,%edi 11319f: 0f 84 83 00 00 00 je 113228 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1131a5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 1131ac: 85 c0 test %eax,%eax 1131ae: 0f 84 80 00 00 00 je 113234 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 1131b4: 89 45 e4 mov %eax,-0x1c(%ebp) 1131b7: a1 b4 92 12 00 mov 0x1292b4,%eax 1131bc: 40 inc %eax 1131bd: a3 b4 92 12 00 mov %eax,0x1292b4 * 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 ); 1131c2: 83 ec 0c sub $0xc,%esp 1131c5: 68 80 9c 12 00 push $0x129c80 1131ca: e8 5d ad ff ff call 10df2c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 1131cf: 83 c4 10 add $0x10,%esp 1131d2: 85 c0 test %eax,%eax 1131d4: 74 6e je 113244 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 1131d6: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 1131d9: 83 ec 08 sub $0x8,%esp 1131dc: 8d 55 e0 lea -0x20(%ebp),%edx 1131df: 52 push %edx 1131e0: 8d 50 14 lea 0x14(%eax),%edx 1131e3: 52 push %edx 1131e4: 89 45 d4 mov %eax,-0x2c(%ebp) 1131e7: e8 b0 07 00 00 call 11399c <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1131ec: 8b 45 d4 mov -0x2c(%ebp),%eax 1131ef: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1131f2: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1131f5: 8b 0d 9c 9c 12 00 mov 0x129c9c,%ecx 1131fb: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1131fe: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 113201: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 113203: e8 64 ba ff ff call 10ec6c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 113208: 83 c4 10 add $0x10,%esp 11320b: 31 c0 xor %eax,%eax } 11320d: 8d 65 f4 lea -0xc(%ebp),%esp 113210: 5b pop %ebx 113211: 5e pop %esi 113212: 5f pop %edi 113213: c9 leave 113214: c3 ret 113215: 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; 113218: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11321d: 8d 65 f4 lea -0xc(%ebp),%esp 113220: 5b pop %ebx 113221: 5e pop %esi 113222: 5f pop %edi 113223: c9 leave 113224: c3 ret 113225: 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; 113228: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 11322f: eb 83 jmp 1131b4 113231: 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; 113234: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113239: 8d 65 f4 lea -0xc(%ebp),%esp 11323c: 5b pop %ebx 11323d: 5e pop %esi 11323e: 5f pop %edi 11323f: c9 leave 113240: c3 ret 113241: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 113244: e8 23 ba ff ff call 10ec6c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113249: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11324e: 8d 65 f4 lea -0xc(%ebp),%esp 113251: 5b pop %ebx 113252: 5e pop %esi 113253: 5f pop %edi 113254: c9 leave 113255: c3 ret 113256: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 113258: b8 09 00 00 00 mov $0x9,%eax 11325d: eb ae jmp 11320d =============================================================================== 00113260 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 113260: 55 push %ebp 113261: 89 e5 mov %esp,%ebp 113263: 53 push %ebx 113264: 83 ec 18 sub $0x18,%esp Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 113267: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 11326a: 50 push %eax 11326b: ff 75 08 pushl 0x8(%ebp) 11326e: 68 80 9c 12 00 push $0x129c80 113273: e8 64 b1 ff ff call 10e3dc <_Objects_Get> 113278: 89 c3 mov %eax,%ebx switch ( location ) { 11327a: 83 c4 10 add $0x10,%esp 11327d: 8b 4d f4 mov -0xc(%ebp),%ecx 113280: 85 c9 test %ecx,%ecx 113282: 75 38 jne 1132bc case OBJECTS_LOCAL: _CORE_barrier_Flush( 113284: 52 push %edx 113285: 6a 02 push $0x2 113287: 6a 00 push $0x0 113289: 8d 40 14 lea 0x14(%eax),%eax 11328c: 50 push %eax 11328d: e8 26 c1 ff ff call 10f3b8 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 113292: 59 pop %ecx 113293: 58 pop %eax 113294: 53 push %ebx 113295: 68 80 9c 12 00 push $0x129c80 11329a: e8 09 ad ff ff call 10dfa8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 11329f: 58 pop %eax 1132a0: 5a pop %edx 1132a1: 53 push %ebx 1132a2: 68 80 9c 12 00 push $0x129c80 1132a7: e8 f8 af ff ff call 10e2a4 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 1132ac: e8 bb b9 ff ff call 10ec6c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1132b1: 83 c4 10 add $0x10,%esp 1132b4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1132b6: 8b 5d fc mov -0x4(%ebp),%ebx 1132b9: c9 leave 1132ba: c3 ret 1132bb: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1132bc: b8 04 00 00 00 mov $0x4,%eax } 1132c1: 8b 5d fc mov -0x4(%ebp),%ebx 1132c4: c9 leave 1132c5: c3 ret =============================================================================== 00113354 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 113354: 55 push %ebp 113355: 89 e5 mov %esp,%ebp 113357: 53 push %ebx 113358: 83 ec 18 sub $0x18,%esp 11335b: 8b 5d 08 mov 0x8(%ebp),%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 11335e: 8d 45 f4 lea -0xc(%ebp),%eax 113361: 50 push %eax 113362: 53 push %ebx 113363: 68 80 9c 12 00 push $0x129c80 113368: e8 6f b0 ff ff call 10e3dc <_Objects_Get> switch ( location ) { 11336d: 83 c4 10 add $0x10,%esp 113370: 8b 55 f4 mov -0xc(%ebp),%edx 113373: 85 d2 test %edx,%edx 113375: 75 35 jne 1133ac case OBJECTS_LOCAL: _CORE_barrier_Wait( 113377: 83 ec 0c sub $0xc,%esp 11337a: 6a 00 push $0x0 11337c: ff 75 0c pushl 0xc(%ebp) 11337f: 6a 01 push $0x1 113381: 53 push %ebx 113382: 83 c0 14 add $0x14,%eax 113385: 50 push %eax 113386: e8 75 06 00 00 call 113a00 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 11338b: 83 c4 20 add $0x20,%esp 11338e: e8 d9 b8 ff ff call 10ec6c <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 113393: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 113396: a1 78 98 12 00 mov 0x129878,%eax true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 11339b: ff 70 34 pushl 0x34(%eax) 11339e: e8 89 18 00 00 call 114c2c <_Barrier_Translate_core_barrier_return_code> 1133a3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1133a6: 8b 5d fc mov -0x4(%ebp),%ebx 1133a9: c9 leave 1133aa: c3 ret 1133ab: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1133ac: b8 04 00 00 00 mov $0x4,%eax } 1133b1: 8b 5d fc mov -0x4(%ebp),%ebx 1133b4: c9 leave 1133b5: c3 ret =============================================================================== 00115b68 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115b68: 55 push %ebp 115b69: 89 e5 mov %esp,%ebp 115b6b: 53 push %ebx 115b6c: 83 ec 04 sub $0x4,%esp 115b6f: 8b 45 08 mov 0x8(%ebp),%eax 115b72: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115b75: 85 db test %ebx,%ebx 115b77: 74 3b je 115bb4 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115b79: 85 c0 test %eax,%eax 115b7b: 74 2b je 115ba8 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115b7d: 83 f8 01 cmp $0x1,%eax 115b80: 74 3e je 115bc0 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115b82: 83 f8 02 cmp $0x2,%eax 115b85: 74 45 je 115bcc *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115b87: 83 f8 03 cmp $0x3,%eax 115b8a: 74 4c je 115bd8 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115b8c: 83 f8 04 cmp $0x4,%eax 115b8f: 74 0b je 115b9c return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115b91: b8 0a 00 00 00 mov $0xa,%eax } 115b96: 5a pop %edx 115b97: 5b pop %ebx 115b98: c9 leave 115b99: c3 ret 115b9a: 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 ); 115b9c: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115b9f: 59 pop %ecx 115ba0: 5b pop %ebx 115ba1: 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 ); 115ba2: e9 41 01 00 00 jmp 115ce8 115ba7: 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 ); 115ba8: 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; } 115bab: 58 pop %eax 115bac: 5b pop %ebx 115bad: 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 ); 115bae: e9 81 00 00 00 jmp 115c34 115bb3: 90 nop <== NOT EXECUTED rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115bb4: 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; } 115bb9: 5a pop %edx 115bba: 5b pop %ebx 115bbb: c9 leave 115bbc: c3 ret 115bbd: 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); 115bc0: 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; } 115bc3: 5b pop %ebx 115bc4: 5b pop %ebx 115bc5: 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); 115bc6: e9 19 00 00 00 jmp 115be4 115bcb: 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(); 115bcc: e8 57 00 00 00 call 115c28 115bd1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115bd3: 31 c0 xor %eax,%eax 115bd5: eb bf jmp 115b96 115bd7: 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(); 115bd8: e8 37 00 00 00 call 115c14 115bdd: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115bdf: 31 c0 xor %eax,%eax 115be1: eb b3 jmp 115b96 =============================================================================== 0010c06c : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10c06c: 55 push %ebp 10c06d: 89 e5 mov %esp,%ebp 10c06f: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10c072: 85 c0 test %eax,%eax 10c074: 74 1e je 10c094 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10c076: 80 3d 68 22 13 00 00 cmpb $0x0,0x132268 10c07d: 74 0d je 10c08c return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10c07f: 8b 15 e8 22 13 00 mov 0x1322e8,%edx 10c085: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10c087: 31 c0 xor %eax,%eax } 10c089: c9 leave 10c08a: c3 ret 10c08b: 90 nop <== NOT EXECUTED { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10c08c: b8 0b 00 00 00 mov $0xb,%eax *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10c091: c9 leave 10c092: c3 ret 10c093: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; 10c094: 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; } 10c099: c9 leave 10c09a: c3 ret =============================================================================== 00115ce8 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115ce8: 55 push %ebp 115ce9: 89 e5 mov %esp,%ebp 115ceb: 56 push %esi 115cec: 53 push %ebx 115ced: 83 ec 10 sub $0x10,%esp 115cf0: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115cf3: 85 db test %ebx,%ebx 115cf5: 74 51 je 115d48 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115cf7: 80 3d a8 23 14 00 00 cmpb $0x0,0x1423a8 115cfe: 75 0c jne 115d0c return RTEMS_NOT_DEFINED; 115d00: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115d05: 8d 65 f8 lea -0x8(%ebp),%esp 115d08: 5b pop %ebx 115d09: 5e pop %esi 115d0a: c9 leave 115d0b: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115d0c: 9c pushf 115d0d: fa cli 115d0e: 5e pop %esi _TOD_Get( &now ); 115d0f: 83 ec 0c sub $0xc,%esp 115d12: 8d 45 f0 lea -0x10(%ebp),%eax 115d15: 50 push %eax 115d16: e8 f1 43 00 00 call 11a10c <_TOD_Get> _ISR_Enable(level); 115d1b: 56 push %esi 115d1c: 9d popf useconds = (suseconds_t)now.tv_nsec; 115d1d: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115d20: 8b 45 f0 mov -0x10(%ebp),%eax 115d23: 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; 115d25: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115d2a: f7 e9 imul %ecx 115d2c: 89 d0 mov %edx,%eax 115d2e: c1 f8 06 sar $0x6,%eax 115d31: c1 f9 1f sar $0x1f,%ecx 115d34: 29 c8 sub %ecx,%eax 115d36: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115d39: 83 c4 10 add $0x10,%esp 115d3c: 31 c0 xor %eax,%eax } 115d3e: 8d 65 f8 lea -0x8(%ebp),%esp 115d41: 5b pop %ebx 115d42: 5e pop %esi 115d43: c9 leave 115d44: c3 ret 115d45: 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; 115d48: b8 09 00 00 00 mov $0x9,%eax 115d4d: eb b6 jmp 115d05 =============================================================================== 0010b24c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b24c: 55 push %ebp 10b24d: 89 e5 mov %esp,%ebp 10b24f: 83 ec 08 sub $0x8,%esp 10b252: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b255: 85 c0 test %eax,%eax 10b257: 74 13 je 10b26c return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b259: 83 ec 0c sub $0xc,%esp 10b25c: 50 push %eax 10b25d: e8 72 16 00 00 call 10c8d4 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b262: 83 c4 10 add $0x10,%esp 10b265: 31 c0 xor %eax,%eax } 10b267: c9 leave 10b268: c3 ret 10b269: 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; 10b26c: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b271: c9 leave 10b272: c3 ret =============================================================================== 0010c18c : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c18c: 55 push %ebp 10c18d: 89 e5 mov %esp,%ebp 10c18f: 53 push %ebx 10c190: 83 ec 14 sub $0x14,%esp 10c193: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c196: 85 db test %ebx,%ebx 10c198: 74 66 je 10c200 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c19a: 83 ec 0c sub $0xc,%esp 10c19d: 53 push %ebx 10c19e: e8 39 01 00 00 call 10c2dc <_TOD_Validate> 10c1a3: 83 c4 10 add $0x10,%esp 10c1a6: 84 c0 test %al,%al 10c1a8: 75 0a jne 10c1b4 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c1aa: b8 14 00 00 00 mov $0x14,%eax } 10c1af: 8b 5d fc mov -0x4(%ebp),%ebx 10c1b2: c9 leave 10c1b3: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c1b4: 83 ec 0c sub $0xc,%esp 10c1b7: 53 push %ebx 10c1b8: e8 93 00 00 00 call 10c250 <_TOD_To_seconds> 10c1bd: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c1c0: 8b 43 18 mov 0x18(%ebx),%eax 10c1c3: 0f af 05 2c 62 12 00 imul 0x12622c,%eax 10c1ca: 8d 04 80 lea (%eax,%eax,4),%eax 10c1cd: 8d 04 80 lea (%eax,%eax,4),%eax 10c1d0: 8d 04 80 lea (%eax,%eax,4),%eax 10c1d3: c1 e0 03 shl $0x3,%eax 10c1d6: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c1d9: a1 54 22 13 00 mov 0x132254,%eax 10c1de: 40 inc %eax 10c1df: a3 54 22 13 00 mov %eax,0x132254 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c1e4: 8d 45 f0 lea -0x10(%ebp),%eax 10c1e7: 89 04 24 mov %eax,(%esp) 10c1ea: e8 55 19 00 00 call 10db44 <_TOD_Set> _Thread_Enable_dispatch(); 10c1ef: e8 b0 2c 00 00 call 10eea4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1f4: 83 c4 10 add $0x10,%esp 10c1f7: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c1f9: 8b 5d fc mov -0x4(%ebp),%ebx 10c1fc: c9 leave 10c1fd: c3 ret 10c1fe: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c200: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c205: 8b 5d fc mov -0x4(%ebp),%ebx 10c208: c9 leave 10c209: c3 ret =============================================================================== 0010b03c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10b03c: 55 push %ebp 10b03d: 89 e5 mov %esp,%ebp 10b03f: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10b042: 85 c0 test %eax,%eax 10b044: 74 0a je 10b050 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10b046: a3 84 75 12 00 mov %eax,0x127584 return RTEMS_SUCCESSFUL; 10b04b: 31 c0 xor %eax,%eax } 10b04d: c9 leave 10b04e: c3 ret 10b04f: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) return RTEMS_INVALID_ADDRESS; 10b050: b8 09 00 00 00 mov $0x9,%eax _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10b055: c9 leave 10b056: c3 ret =============================================================================== 0010b058 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10b058: 55 push %ebp 10b059: 89 e5 mov %esp,%ebp 10b05b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10b05e: e8 35 15 00 00 call 10c598 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10b063: 83 ec 0c sub $0xc,%esp 10b066: 68 a4 74 12 00 push $0x1274a4 10b06b: e8 f0 37 00 00 call 10e860 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10b070: e8 5b 32 00 00 call 10e2d0 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10b075: a0 a4 79 12 00 mov 0x1279a4,%al if ( _Thread_Is_context_switch_necessary() && 10b07a: 83 c4 10 add $0x10,%esp 10b07d: 84 c0 test %al,%al 10b07f: 74 09 je 10b08a * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10b081: a1 d4 73 12 00 mov 0x1273d4,%eax 10b086: 85 c0 test %eax,%eax 10b088: 74 06 je 10b090 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b08a: 31 c0 xor %eax,%eax 10b08c: c9 leave 10b08d: c3 ret 10b08e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b090: e8 2f 25 00 00 call 10d5c4 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b095: 31 c0 xor %eax,%eax 10b097: c9 leave 10b098: c3 ret =============================================================================== 0010b224 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b224: 55 push %ebp 10b225: 89 e5 mov %esp,%ebp 10b227: 53 push %ebx 10b228: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b22b: 8d 45 f4 lea -0xc(%ebp),%eax 10b22e: 50 push %eax 10b22f: ff 75 08 pushl 0x8(%ebp) 10b232: e8 29 25 00 00 call 10d760 <_Thread_Get> switch ( location ) { 10b237: 83 c4 10 add $0x10,%esp 10b23a: 8b 55 f4 mov -0xc(%ebp),%edx 10b23d: 85 d2 test %edx,%edx 10b23f: 75 2b jne 10b26c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b241: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b247: 9c pushf 10b248: fa cli 10b249: 59 pop %ecx *the_event_set |= the_new_events; 10b24a: 8b 5d 0c mov 0xc(%ebp),%ebx 10b24d: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b24f: 51 push %ecx 10b250: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b251: 83 ec 0c sub $0xc,%esp 10b254: 50 push %eax 10b255: e8 1e 00 00 00 call 10b278 <_Event_Surrender> _Thread_Enable_dispatch(); 10b25a: e8 dd 24 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b25f: 83 c4 10 add $0x10,%esp 10b262: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b264: 8b 5d fc mov -0x4(%ebp),%ebx 10b267: c9 leave 10b268: c3 ret 10b269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b26c: b8 04 00 00 00 mov $0x4,%eax } 10b271: 8b 5d fc mov -0x4(%ebp),%ebx 10b274: c9 leave 10b275: c3 ret =============================================================================== 0010d1fc : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d1fc: 55 push %ebp 10d1fd: 89 e5 mov %esp,%ebp 10d1ff: 57 push %edi 10d200: 56 push %esi 10d201: 53 push %ebx 10d202: 83 ec 1c sub $0x1c,%esp 10d205: 8b 75 0c mov 0xc(%ebp),%esi 10d208: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d20b: 85 db test %ebx,%ebx 10d20d: 0f 84 85 00 00 00 je 10d298 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d213: 8b 45 08 mov 0x8(%ebp),%eax 10d216: 85 c0 test %eax,%eax 10d218: 75 0e jne 10d228 return RTEMS_INVALID_NAME; 10d21a: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d21f: 8d 65 f4 lea -0xc(%ebp),%esp 10d222: 5b pop %ebx 10d223: 5e pop %esi 10d224: 5f pop %edi 10d225: c9 leave 10d226: c3 ret 10d227: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d228: a1 54 22 13 00 mov 0x132254,%eax 10d22d: 40 inc %eax 10d22e: a3 54 22 13 00 mov %eax,0x132254 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d233: 83 ec 0c sub $0xc,%esp 10d236: 68 c0 24 13 00 push $0x1324c0 10d23b: e8 3c 0e 00 00 call 10e07c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d240: 83 c4 10 add $0x10,%esp 10d243: 85 c0 test %eax,%eax 10d245: 74 45 je 10d28c RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d247: 8d 78 24 lea 0x24(%eax),%edi 10d24a: b9 08 00 00 00 mov $0x8,%ecx 10d24f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d251: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10d254: 8d 50 10 lea 0x10(%eax),%edx 10d257: 52 push %edx 10d258: 89 45 e4 mov %eax,-0x1c(%ebp) 10d25b: e8 5c 2b 00 00 call 10fdbc <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d260: 8b 45 e4 mov -0x1c(%ebp),%eax 10d263: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d266: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d269: 8b 0d dc 24 13 00 mov 0x1324dc,%ecx 10d26f: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d272: 8b 4d 08 mov 0x8(%ebp),%ecx 10d275: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d278: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d27a: e8 25 1c 00 00 call 10eea4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d27f: 83 c4 10 add $0x10,%esp 10d282: 31 c0 xor %eax,%eax } 10d284: 8d 65 f4 lea -0xc(%ebp),%esp 10d287: 5b pop %ebx 10d288: 5e pop %esi 10d289: 5f pop %edi 10d28a: c9 leave 10d28b: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d28c: e8 13 1c 00 00 call 10eea4 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10d291: b8 05 00 00 00 mov $0x5,%eax 10d296: eb 87 jmp 10d21f ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10d298: b8 09 00 00 00 mov $0x9,%eax 10d29d: eb 80 jmp 10d21f =============================================================================== 0010d080 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10d080: 55 push %ebp 10d081: 89 e5 mov %esp,%ebp 10d083: 53 push %ebx 10d084: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10d087: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10d08a: 50 push %eax 10d08b: ff 75 08 pushl 0x8(%ebp) 10d08e: 68 c0 24 13 00 push $0x1324c0 10d093: e8 18 12 00 00 call 10e2b0 <_Objects_Get> 10d098: 89 c3 mov %eax,%ebx switch ( location ) { 10d09a: 83 c4 10 add $0x10,%esp 10d09d: 8b 55 f4 mov -0xc(%ebp),%edx 10d0a0: 85 d2 test %edx,%edx 10d0a2: 75 38 jne 10d0dc case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10d0a4: 83 ec 0c sub $0xc,%esp 10d0a7: 8d 40 10 lea 0x10(%eax),%eax 10d0aa: 50 push %eax 10d0ab: e8 e4 29 00 00 call 10fa94 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d0b0: 59 pop %ecx 10d0b1: 58 pop %eax 10d0b2: 53 push %ebx 10d0b3: 68 c0 24 13 00 push $0x1324c0 10d0b8: e8 bf 0d 00 00 call 10de7c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d0bd: 58 pop %eax 10d0be: 5a pop %edx 10d0bf: 53 push %ebx 10d0c0: 68 c0 24 13 00 push $0x1324c0 10d0c5: e8 ae 10 00 00 call 10e178 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d0ca: e8 71 1a 00 00 call 10eb40 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d0cf: 83 c4 10 add $0x10,%esp 10d0d2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d0d4: 8b 5d fc mov -0x4(%ebp),%ebx 10d0d7: c9 leave 10d0d8: c3 ret 10d0d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d0dc: b8 04 00 00 00 mov $0x4,%eax } 10d0e1: 8b 5d fc mov -0x4(%ebp),%ebx 10d0e4: c9 leave 10d0e5: c3 ret =============================================================================== 00113070 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113070: 55 push %ebp 113071: 89 e5 mov %esp,%ebp 113073: 53 push %ebx 113074: 83 ec 04 sub $0x4,%esp 113077: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11307a: 39 05 20 7e 12 00 cmp %eax,0x127e20 113080: 76 1a jbe 11309c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 113082: 8d 14 40 lea (%eax,%eax,2),%edx 113085: c1 e2 03 shl $0x3,%edx 113088: 03 15 24 7e 12 00 add 0x127e24,%edx 11308e: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113091: 85 d2 test %edx,%edx 113093: 74 13 je 1130a8 } 113095: 59 pop %ecx 113096: 5b pop %ebx 113097: 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; 113098: ff e2 jmp *%edx 11309a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 11309c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1130a1: 5a pop %edx 1130a2: 5b pop %ebx 1130a3: c9 leave 1130a4: c3 ret 1130a5: 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; 1130a8: 31 c0 xor %eax,%eax } 1130aa: 5a pop %edx 1130ab: 5b pop %ebx 1130ac: c9 leave 1130ad: c3 ret =============================================================================== 001130b0 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1130b0: 55 push %ebp 1130b1: 89 e5 mov %esp,%ebp 1130b3: 53 push %ebx 1130b4: 83 ec 04 sub $0x4,%esp 1130b7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1130ba: 39 05 20 7e 12 00 cmp %eax,0x127e20 1130c0: 76 1a jbe 1130dc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 1130c2: 8d 14 40 lea (%eax,%eax,2),%edx 1130c5: c1 e2 03 shl $0x3,%edx 1130c8: 03 15 24 7e 12 00 add 0x127e24,%edx 1130ce: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1130d1: 85 d2 test %edx,%edx 1130d3: 74 13 je 1130e8 } 1130d5: 59 pop %ecx 1130d6: 5b pop %ebx 1130d7: 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; 1130d8: ff e2 jmp *%edx 1130da: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1130dc: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1130e1: 5a pop %edx 1130e2: 5b pop %ebx 1130e3: c9 leave 1130e4: c3 ret 1130e5: 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; 1130e8: 31 c0 xor %eax,%eax } 1130ea: 5a pop %edx 1130eb: 5b pop %ebx 1130ec: c9 leave 1130ed: c3 ret =============================================================================== 00110f74 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110f74: 55 push %ebp 110f75: 89 e5 mov %esp,%ebp 110f77: 53 push %ebx 110f78: 83 ec 04 sub $0x4,%esp 110f7b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110f7e: 39 05 20 7e 12 00 cmp %eax,0x127e20 110f84: 76 1a jbe 110fa0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 110f86: 8d 14 40 lea (%eax,%eax,2),%edx 110f89: c1 e2 03 shl $0x3,%edx 110f8c: 03 15 24 7e 12 00 add 0x127e24,%edx 110f92: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110f94: 85 d2 test %edx,%edx 110f96: 74 14 je 110fac } 110f98: 59 pop %ecx 110f99: 5b pop %ebx 110f9a: 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; 110f9b: ff e2 jmp *%edx 110f9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 110fa0: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110fa5: 5a pop %edx 110fa6: 5b pop %ebx 110fa7: c9 leave 110fa8: c3 ret 110fa9: 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; 110fac: 31 c0 xor %eax,%eax } 110fae: 5a pop %edx 110faf: 5b pop %ebx 110fb0: c9 leave 110fb1: c3 ret =============================================================================== 001130f0 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1130f0: 55 push %ebp 1130f1: 89 e5 mov %esp,%ebp 1130f3: 53 push %ebx 1130f4: 83 ec 04 sub $0x4,%esp 1130f7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1130fa: 39 05 20 7e 12 00 cmp %eax,0x127e20 113100: 76 1a jbe 11311c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 113102: 8d 14 40 lea (%eax,%eax,2),%edx 113105: c1 e2 03 shl $0x3,%edx 113108: 03 15 24 7e 12 00 add 0x127e24,%edx 11310e: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113111: 85 d2 test %edx,%edx 113113: 74 13 je 113128 } 113115: 59 pop %ecx 113116: 5b pop %ebx 113117: 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; 113118: ff e2 jmp *%edx 11311a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 11311c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113121: 5a pop %edx 113122: 5b pop %ebx 113123: c9 leave 113124: c3 ret 113125: 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; 113128: 31 c0 xor %eax,%eax } 11312a: 5a pop %edx 11312b: 5b pop %ebx 11312c: c9 leave 11312d: c3 ret =============================================================================== 00113130 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113130: 55 push %ebp 113131: 89 e5 mov %esp,%ebp 113133: 53 push %ebx 113134: 83 ec 04 sub $0x4,%esp 113137: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11313a: 39 05 20 7e 12 00 cmp %eax,0x127e20 113140: 76 1a jbe 11315c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 113142: 8d 14 40 lea (%eax,%eax,2),%edx 113145: c1 e2 03 shl $0x3,%edx 113148: 03 15 24 7e 12 00 add 0x127e24,%edx 11314e: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113151: 85 d2 test %edx,%edx 113153: 74 13 je 113168 } 113155: 59 pop %ecx 113156: 5b pop %ebx 113157: 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; 113158: ff e2 jmp *%edx 11315a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 11315c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113161: 5a pop %edx 113162: 5b pop %ebx 113163: c9 leave 113164: c3 ret 113165: 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; 113168: 31 c0 xor %eax,%eax } 11316a: 5a pop %edx 11316b: 5b pop %ebx 11316c: c9 leave 11316d: c3 ret =============================================================================== 0010cf38 : 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 ) { 10cf38: 55 push %ebp 10cf39: 89 e5 mov %esp,%ebp 10cf3b: 57 push %edi 10cf3c: 56 push %esi 10cf3d: 53 push %ebx 10cf3e: 83 ec 0c sub $0xc,%esp 10cf41: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf44: 8b 75 0c mov 0xc(%ebp),%esi 10cf47: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10cf4a: a1 40 bd 12 00 mov 0x12bd40,%eax if ( rtems_interrupt_is_in_progress() ) 10cf4f: 8b 0d b4 b8 12 00 mov 0x12b8b4,%ecx 10cf55: 85 c9 test %ecx,%ecx 10cf57: 0f 85 ab 00 00 00 jne 10d008 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10cf5d: 85 d2 test %edx,%edx 10cf5f: 0f 84 e7 00 00 00 je 10d04c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10cf65: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10cf67: 85 f6 test %esi,%esi 10cf69: 0f 84 dd 00 00 00 je 10d04c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf6f: 8b 3e mov (%esi),%edi 10cf71: 85 ff test %edi,%edi 10cf73: 0f 84 c7 00 00 00 je 10d040 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cf79: 39 d8 cmp %ebx,%eax 10cf7b: 76 7b jbe 10cff8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cf7d: a1 f4 b2 12 00 mov 0x12b2f4,%eax 10cf82: 40 inc %eax 10cf83: a3 f4 b2 12 00 mov %eax,0x12b2f4 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10cf88: 85 db test %ebx,%ebx 10cf8a: 0f 85 88 00 00 00 jne 10d018 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cf90: 8b 0d 40 bd 12 00 mov 0x12bd40,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10cf96: 85 c9 test %ecx,%ecx 10cf98: 0f 84 bb 00 00 00 je 10d059 <== NEVER TAKEN 10cf9e: 8b 3d 44 bd 12 00 mov 0x12bd44,%edi 10cfa4: 89 f8 mov %edi,%eax 10cfa6: eb 08 jmp 10cfb0 10cfa8: 43 inc %ebx 10cfa9: 83 c0 18 add $0x18,%eax 10cfac: 39 d9 cmp %ebx,%ecx 10cfae: 76 0b jbe 10cfbb static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cfb0: 83 38 00 cmpl $0x0,(%eax) 10cfb3: 75 f3 jne 10cfa8 10cfb5: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cfb9: 75 ed jne 10cfa8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cfbb: 89 1a mov %ebx,(%edx) if ( m != n ) 10cfbd: 39 d9 cmp %ebx,%ecx 10cfbf: 0f 84 9b 00 00 00 je 10d060 10cfc5: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cfc8: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cfcb: 01 c7 add %eax,%edi 10cfcd: b9 06 00 00 00 mov $0x6,%ecx 10cfd2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cfd4: e8 73 1a 00 00 call 10ea4c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cfd9: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cfe0: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cfe7: 89 5d 08 mov %ebx,0x8(%ebp) } 10cfea: 83 c4 0c add $0xc,%esp 10cfed: 5b pop %ebx 10cfee: 5e pop %esi 10cfef: 5f pop %edi 10cff0: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cff1: e9 1e 7d 00 00 jmp 114d14 10cff6: 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; 10cff8: 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 ); } 10cffd: 83 c4 0c add $0xc,%esp 10d000: 5b pop %ebx 10d001: 5e pop %esi 10d002: 5f pop %edi 10d003: c9 leave 10d004: c3 ret 10d005: 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; 10d008: 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 ); } 10d00d: 83 c4 0c add $0xc,%esp 10d010: 5b pop %ebx 10d011: 5e pop %esi 10d012: 5f pop %edi 10d013: c9 leave 10d014: c3 ret 10d015: 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; 10d018: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d01b: c1 e0 03 shl $0x3,%eax 10d01e: 8b 0d 44 bd 12 00 mov 0x12bd44,%ecx 10d024: 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; 10d026: 8b 39 mov (%ecx),%edi 10d028: 85 ff test %edi,%edi 10d02a: 74 40 je 10d06c 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(); 10d02c: e8 1b 1a 00 00 call 10ea4c <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10d031: 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 ); } 10d036: 83 c4 0c add $0xc,%esp 10d039: 5b pop %ebx 10d03a: 5e pop %esi 10d03b: 5f pop %edi 10d03c: c9 leave 10d03d: c3 ret 10d03e: 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; 10d040: 8b 4e 04 mov 0x4(%esi),%ecx 10d043: 85 c9 test %ecx,%ecx 10d045: 0f 85 2e ff ff ff jne 10cf79 10d04b: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10d04c: 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 ); } 10d051: 83 c4 0c add $0xc,%esp 10d054: 5b pop %ebx 10d055: 5e pop %esi 10d056: 5f pop %edi 10d057: c9 leave 10d058: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d059: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d05f: 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(); 10d060: e8 e7 19 00 00 call 10ea4c <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10d065: 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; 10d06a: eb 91 jmp 10cffd static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d06c: 8b 49 04 mov 0x4(%ecx),%ecx 10d06f: 85 c9 test %ecx,%ecx 10d071: 75 b9 jne 10d02c if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d073: 89 1a mov %ebx,(%edx) 10d075: 8b 3d 44 bd 12 00 mov 0x12bd44,%edi 10d07b: e9 4b ff ff ff jmp 10cfcb =============================================================================== 0010d080 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d080: 55 push %ebp 10d081: 89 e5 mov %esp,%ebp 10d083: 57 push %edi 10d084: 83 ec 04 sub $0x4,%esp 10d087: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d08a: 8b 0d b4 b8 12 00 mov 0x12b8b4,%ecx 10d090: 85 c9 test %ecx,%ecx 10d092: 75 44 jne 10d0d8 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d094: 39 05 40 bd 12 00 cmp %eax,0x12bd40 10d09a: 77 0c ja 10d0a8 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10d09c: b8 0d 00 00 00 mov $0xd,%eax } 10d0a1: 5a pop %edx 10d0a2: 5f pop %edi 10d0a3: c9 leave 10d0a4: c3 ret 10d0a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d0a8: 8b 15 f4 b2 12 00 mov 0x12b2f4,%edx 10d0ae: 42 inc %edx 10d0af: 89 15 f4 b2 12 00 mov %edx,0x12b2f4 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d0b5: 8d 14 40 lea (%eax,%eax,2),%edx 10d0b8: 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( 10d0bb: 03 15 44 bd 12 00 add 0x12bd44,%edx 10d0c1: b9 18 00 00 00 mov $0x18,%ecx 10d0c6: 31 c0 xor %eax,%eax 10d0c8: 89 d7 mov %edx,%edi 10d0ca: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d0cc: e8 7b 19 00 00 call 10ea4c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d0d1: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d0d3: 5a pop %edx 10d0d4: 5f pop %edi 10d0d5: c9 leave 10d0d6: c3 ret 10d0d7: 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; 10d0d8: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d0dd: 5a pop %edx 10d0de: 5f pop %edi 10d0df: c9 leave 10d0e0: c3 ret =============================================================================== 00113170 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113170: 55 push %ebp 113171: 89 e5 mov %esp,%ebp 113173: 53 push %ebx 113174: 83 ec 04 sub $0x4,%esp 113177: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11317a: 39 05 20 7e 12 00 cmp %eax,0x127e20 113180: 76 1a jbe 11319c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 113182: 8d 14 40 lea (%eax,%eax,2),%edx 113185: c1 e2 03 shl $0x3,%edx 113188: 03 15 24 7e 12 00 add 0x127e24,%edx 11318e: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113191: 85 d2 test %edx,%edx 113193: 74 13 je 1131a8 } 113195: 59 pop %ecx 113196: 5b pop %ebx 113197: 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; 113198: ff e2 jmp *%edx 11319a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 11319c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1131a1: 5a pop %edx 1131a2: 5b pop %ebx 1131a3: c9 leave 1131a4: c3 ret 1131a5: 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; 1131a8: 31 c0 xor %eax,%eax } 1131aa: 5a pop %edx 1131ab: 5b pop %ebx 1131ac: c9 leave 1131ad: c3 ret =============================================================================== 0010e014 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10e014: 55 push %ebp 10e015: 89 e5 mov %esp,%ebp 10e017: 57 push %edi 10e018: 56 push %esi 10e019: 53 push %ebx 10e01a: 83 ec 1c sub $0x1c,%esp 10e01d: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10e020: 85 ff test %edi,%edi 10e022: 74 4d je 10e071 <== NEVER TAKEN 10e024: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10e02b: 8b 55 e4 mov -0x1c(%ebp),%edx 10e02e: 8b 04 95 2c 22 13 00 mov 0x13222c(,%edx,4),%eax 10e035: 85 c0 test %eax,%eax 10e037: 74 2f je 10e068 <== NEVER TAKEN continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10e039: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10e03c: 85 f6 test %esi,%esi 10e03e: 74 28 je 10e068 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e040: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10e045: 74 21 je 10e068 10e047: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10e04c: 8b 46 1c mov 0x1c(%esi),%eax 10e04f: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10e052: 85 c0 test %eax,%eax 10e054: 74 09 je 10e05f <== NEVER TAKEN continue; (*routine)(the_thread); 10e056: 83 ec 0c sub $0xc,%esp 10e059: 50 push %eax 10e05a: ff d7 call *%edi 10e05c: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e05f: 43 inc %ebx 10e060: 0f b7 46 10 movzwl 0x10(%esi),%eax 10e064: 39 d8 cmp %ebx,%eax 10e066: 73 e4 jae 10e04c Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10e068: ff 45 e4 incl -0x1c(%ebp) 10e06b: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10e06f: 75 ba jne 10e02b (*routine)(the_thread); } } } 10e071: 8d 65 f4 lea -0xc(%ebp),%esp 10e074: 5b pop %ebx 10e075: 5e pop %esi 10e076: 5f pop %edi 10e077: c9 leave 10e078: c3 ret =============================================================================== 001164c4 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 1164c4: 55 push %ebp 1164c5: 89 e5 mov %esp,%ebp 1164c7: 57 push %edi 1164c8: 56 push %esi 1164c9: 53 push %ebx 1164ca: 83 ec 1c sub $0x1c,%esp 1164cd: 8b 7d 08 mov 0x8(%ebp),%edi 1164d0: 8b 5d 0c mov 0xc(%ebp),%ebx 1164d3: 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 ) 1164d6: 85 db test %ebx,%ebx 1164d8: 74 62 je 11653c return RTEMS_INVALID_ADDRESS; if ( !count ) 1164da: 85 f6 test %esi,%esi 1164dc: 74 5e je 11653c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1164de: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1164df: 8d 45 e4 lea -0x1c(%ebp),%eax 1164e2: 50 push %eax 1164e3: 57 push %edi 1164e4: 68 60 2d 14 00 push $0x142d60 1164e9: e8 a6 4e 00 00 call 11b394 <_Objects_Get> switch ( location ) { 1164ee: 83 c4 10 add $0x10,%esp 1164f1: 8b 55 e4 mov -0x1c(%ebp),%edx 1164f4: 85 d2 test %edx,%edx 1164f6: 74 10 je 116508 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1164f8: b8 04 00 00 00 mov $0x4,%eax } 1164fd: 8d 65 f4 lea -0xc(%ebp),%esp 116500: 5b pop %ebx 116501: 5e pop %esi 116502: 5f pop %edi 116503: c9 leave 116504: c3 ret 116505: 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( 116508: 83 ec 08 sub $0x8,%esp 11650b: 56 push %esi 11650c: 6a 00 push $0x0 11650e: 57 push %edi 11650f: ff 75 10 pushl 0x10(%ebp) 116512: 53 push %ebx 116513: 83 c0 14 add $0x14,%eax 116516: 50 push %eax 116517: e8 9c 34 00 00 call 1199b8 <_CORE_message_queue_Broadcast> 11651c: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 11651e: 83 c4 20 add $0x20,%esp 116521: e8 fe 56 00 00 call 11bc24 <_Thread_Enable_dispatch> return 116526: 83 ec 0c sub $0xc,%esp 116529: 53 push %ebx 11652a: e8 69 03 00 00 call 116898 <_Message_queue_Translate_core_message_queue_return_code> 11652f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116532: 8d 65 f4 lea -0xc(%ebp),%esp 116535: 5b pop %ebx 116536: 5e pop %esi 116537: 5f pop %edi 116538: c9 leave 116539: c3 ret 11653a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 11653c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116541: 8d 65 f4 lea -0xc(%ebp),%esp 116544: 5b pop %ebx 116545: 5e pop %esi 116546: 5f pop %edi 116547: c9 leave 116548: c3 ret =============================================================================== 001138d4 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 1138d4: 55 push %ebp 1138d5: 89 e5 mov %esp,%ebp 1138d7: 57 push %edi 1138d8: 56 push %esi 1138d9: 53 push %ebx 1138da: 83 ec 2c sub $0x2c,%esp 1138dd: 8b 5d 08 mov 0x8(%ebp),%ebx 1138e0: 8b 75 0c mov 0xc(%ebp),%esi 1138e3: 8b 4d 10 mov 0x10(%ebp),%ecx 1138e6: 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 ) ) 1138e9: 85 db test %ebx,%ebx 1138eb: 74 2f je 11391c return RTEMS_INVALID_NAME; if ( !id ) 1138ed: 85 ff test %edi,%edi 1138ef: 0f 84 a3 00 00 00 je 113998 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1138f5: 85 f6 test %esi,%esi 1138f7: 74 13 je 11390c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 1138f9: 85 c9 test %ecx,%ecx 1138fb: 75 2f jne 11392c return RTEMS_INVALID_SIZE; 1138fd: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113902: 8d 65 f4 lea -0xc(%ebp),%esp 113905: 5b pop %ebx 113906: 5e pop %esi 113907: 5f pop %edi 113908: c9 leave 113909: c3 ret 11390a: 66 90 xchg %ax,%ax <== NOT EXECUTED !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 11390c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113911: 8d 65 f4 lea -0xc(%ebp),%esp 113914: 5b pop %ebx 113915: 5e pop %esi 113916: 5f pop %edi 113917: c9 leave 113918: c3 ret 113919: 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; 11391c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113921: 8d 65 f4 lea -0xc(%ebp),%esp 113924: 5b pop %ebx 113925: 5e pop %esi 113926: 5f pop %edi 113927: c9 leave 113928: c3 ret 113929: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11392c: a1 d4 0c 13 00 mov 0x130cd4,%eax 113931: 40 inc %eax 113932: a3 d4 0c 13 00 mov %eax,0x130cd4 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113937: 89 4d d4 mov %ecx,-0x2c(%ebp) 11393a: e8 bd 5e 00 00 call 1197fc <_Message_queue_Allocate> 11393f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113941: 85 c0 test %eax,%eax 113943: 8b 4d d4 mov -0x2c(%ebp),%ecx 113946: 74 7c je 1139c4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113948: 8b 45 14 mov 0x14(%ebp),%eax 11394b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11394e: a8 04 test $0x4,%al 113950: 0f 95 c0 setne %al 113953: 0f b6 c0 movzbl %al,%eax 113956: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113959: 51 push %ecx 11395a: 56 push %esi 11395b: 8d 45 e4 lea -0x1c(%ebp),%eax 11395e: 50 push %eax 11395f: 8d 42 14 lea 0x14(%edx),%eax 113962: 50 push %eax 113963: 89 55 d4 mov %edx,-0x2c(%ebp) 113966: e8 29 11 00 00 call 114a94 <_CORE_message_queue_Initialize> 11396b: 83 c4 10 add $0x10,%esp 11396e: 84 c0 test %al,%al 113970: 8b 55 d4 mov -0x2c(%ebp),%edx 113973: 75 2f jne 1139a4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113975: 83 ec 08 sub $0x8,%esp 113978: 52 push %edx 113979: 68 a0 16 13 00 push $0x1316a0 11397e: e8 ad 1f 00 00 call 115930 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113983: e8 f0 29 00 00 call 116378 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 113988: 83 c4 10 add $0x10,%esp 11398b: b8 0d 00 00 00 mov $0xd,%eax 113990: e9 6d ff ff ff jmp 113902 113995: 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; 113998: b8 09 00 00 00 mov $0x9,%eax 11399d: e9 60 ff ff ff jmp 113902 1139a2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1139a4: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1139a7: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1139aa: 8b 0d bc 16 13 00 mov 0x1316bc,%ecx 1139b0: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1139b3: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 1139b6: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 1139b8: e8 bb 29 00 00 call 116378 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1139bd: 31 c0 xor %eax,%eax 1139bf: e9 3e ff ff ff jmp 113902 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 1139c4: e8 af 29 00 00 call 116378 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1139c9: b8 05 00 00 00 mov $0x5,%eax 1139ce: e9 2f ff ff ff jmp 113902 =============================================================================== 0011664c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 11664c: 55 push %ebp 11664d: 89 e5 mov %esp,%ebp 11664f: 53 push %ebx 116650: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 116653: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 116656: 50 push %eax 116657: ff 75 08 pushl 0x8(%ebp) 11665a: 68 60 2d 14 00 push $0x142d60 11665f: e8 30 4d 00 00 call 11b394 <_Objects_Get> 116664: 89 c3 mov %eax,%ebx switch ( location ) { 116666: 83 c4 10 add $0x10,%esp 116669: 8b 4d f4 mov -0xc(%ebp),%ecx 11666c: 85 c9 test %ecx,%ecx 11666e: 75 3c jne 1166ac case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116670: 83 ec 08 sub $0x8,%esp 116673: 50 push %eax 116674: 68 60 2d 14 00 push $0x142d60 116679: e8 a6 48 00 00 call 11af24 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 11667e: 83 c4 0c add $0xc,%esp 116681: 6a 05 push $0x5 116683: 6a 00 push $0x0 116685: 8d 43 14 lea 0x14(%ebx),%eax 116688: 50 push %eax 116689: e8 ae 33 00 00 call 119a3c <_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 ); 11668e: 58 pop %eax 11668f: 5a pop %edx 116690: 53 push %ebx 116691: 68 60 2d 14 00 push $0x142d60 116696: e8 85 4b 00 00 call 11b220 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11669b: e8 84 55 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1166a0: 83 c4 10 add $0x10,%esp 1166a3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1166a5: 8b 5d fc mov -0x4(%ebp),%ebx 1166a8: c9 leave 1166a9: c3 ret 1166aa: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1166ac: b8 04 00 00 00 mov $0x4,%eax } 1166b1: 8b 5d fc mov -0x4(%ebp),%ebx 1166b4: c9 leave 1166b5: c3 ret =============================================================================== 001166b8 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 1166b8: 55 push %ebp 1166b9: 89 e5 mov %esp,%ebp 1166bb: 53 push %ebx 1166bc: 83 ec 14 sub $0x14,%esp 1166bf: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1166c2: 85 db test %ebx,%ebx 1166c4: 74 46 je 11670c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1166c6: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1166c7: 8d 45 f4 lea -0xc(%ebp),%eax 1166ca: 50 push %eax 1166cb: ff 75 08 pushl 0x8(%ebp) 1166ce: 68 60 2d 14 00 push $0x142d60 1166d3: e8 bc 4c 00 00 call 11b394 <_Objects_Get> switch ( location ) { 1166d8: 83 c4 10 add $0x10,%esp 1166db: 8b 55 f4 mov -0xc(%ebp),%edx 1166de: 85 d2 test %edx,%edx 1166e0: 74 0a je 1166ec case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1166e2: b8 04 00 00 00 mov $0x4,%eax } 1166e7: 8b 5d fc mov -0x4(%ebp),%ebx 1166ea: c9 leave 1166eb: 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 ); 1166ec: 83 ec 0c sub $0xc,%esp 1166ef: 83 c0 14 add $0x14,%eax 1166f2: 50 push %eax 1166f3: e8 80 33 00 00 call 119a78 <_CORE_message_queue_Flush> 1166f8: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1166fa: e8 25 55 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1166ff: 83 c4 10 add $0x10,%esp 116702: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116704: 8b 5d fc mov -0x4(%ebp),%ebx 116707: c9 leave 116708: c3 ret 116709: 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; 11670c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116711: 8b 5d fc mov -0x4(%ebp),%ebx 116714: c9 leave 116715: c3 ret =============================================================================== 00116718 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116718: 55 push %ebp 116719: 89 e5 mov %esp,%ebp 11671b: 53 push %ebx 11671c: 83 ec 14 sub $0x14,%esp 11671f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116722: 85 db test %ebx,%ebx 116724: 74 3a je 116760 116726: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 116727: 8d 45 f4 lea -0xc(%ebp),%eax 11672a: 50 push %eax 11672b: ff 75 08 pushl 0x8(%ebp) 11672e: 68 60 2d 14 00 push $0x142d60 116733: e8 5c 4c 00 00 call 11b394 <_Objects_Get> switch ( location ) { 116738: 83 c4 10 add $0x10,%esp 11673b: 8b 55 f4 mov -0xc(%ebp),%edx 11673e: 85 d2 test %edx,%edx 116740: 74 0a je 11674c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116742: b8 04 00 00 00 mov $0x4,%eax } 116747: 8b 5d fc mov -0x4(%ebp),%ebx 11674a: c9 leave 11674b: 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; 11674c: 8b 40 5c mov 0x5c(%eax),%eax 11674f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116751: e8 ce 54 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116756: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116758: 8b 5d fc mov -0x4(%ebp),%ebx 11675b: c9 leave 11675c: c3 ret 11675d: 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; 116760: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116765: 8b 5d fc mov -0x4(%ebp),%ebx 116768: c9 leave 116769: c3 ret =============================================================================== 001139f8 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 1139f8: 55 push %ebp 1139f9: 89 e5 mov %esp,%ebp 1139fb: 56 push %esi 1139fc: 53 push %ebx 1139fd: 83 ec 10 sub $0x10,%esp 113a00: 8b 5d 0c mov 0xc(%ebp),%ebx 113a03: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113a06: 85 db test %ebx,%ebx 113a08: 74 6e je 113a78 return RTEMS_INVALID_ADDRESS; if ( !size ) 113a0a: 85 f6 test %esi,%esi 113a0c: 74 6a je 113a78 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 113a0e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 113a0f: 8d 45 f4 lea -0xc(%ebp),%eax 113a12: 50 push %eax 113a13: ff 75 08 pushl 0x8(%ebp) 113a16: 68 a0 16 13 00 push $0x1316a0 113a1b: e8 48 20 00 00 call 115a68 <_Objects_Get> switch ( location ) { 113a20: 83 c4 10 add $0x10,%esp 113a23: 8b 55 f4 mov -0xc(%ebp),%edx 113a26: 85 d2 test %edx,%edx 113a28: 75 42 jne 113a6c if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 113a2a: 83 ec 08 sub $0x8,%esp 113a2d: 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; 113a30: 8b 55 14 mov 0x14(%ebp),%edx 113a33: 83 e2 01 and $0x1,%edx 113a36: 83 f2 01 xor $0x1,%edx 113a39: 52 push %edx 113a3a: 56 push %esi 113a3b: 53 push %ebx 113a3c: ff 70 08 pushl 0x8(%eax) 113a3f: 83 c0 14 add $0x14,%eax 113a42: 50 push %eax 113a43: e8 fc 10 00 00 call 114b44 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113a48: 83 c4 20 add $0x20,%esp 113a4b: e8 28 29 00 00 call 116378 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113a50: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 113a53: a1 98 12 13 00 mov 0x131298,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113a58: ff 70 34 pushl 0x34(%eax) 113a5b: e8 a0 00 00 00 call 113b00 <_Message_queue_Translate_core_message_queue_return_code> 113a60: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a63: 8d 65 f8 lea -0x8(%ebp),%esp 113a66: 5b pop %ebx 113a67: 5e pop %esi 113a68: c9 leave 113a69: c3 ret 113a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 113a6c: b8 04 00 00 00 mov $0x4,%eax } 113a71: 8d 65 f8 lea -0x8(%ebp),%esp 113a74: 5b pop %ebx 113a75: 5e pop %esi 113a76: c9 leave 113a77: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 113a78: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a7d: 8d 65 f8 lea -0x8(%ebp),%esp 113a80: 5b pop %ebx 113a81: 5e pop %esi 113a82: c9 leave 113a83: c3 ret =============================================================================== 0010b430 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b430: 55 push %ebp 10b431: 89 e5 mov %esp,%ebp 10b433: 56 push %esi 10b434: 53 push %ebx 10b435: 83 ec 10 sub $0x10,%esp 10b438: 8b 75 08 mov 0x8(%ebp),%esi 10b43b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b43e: 85 db test %ebx,%ebx 10b440: 74 5e je 10b4a0 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b442: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b443: 8d 45 f4 lea -0xc(%ebp),%eax 10b446: 50 push %eax 10b447: 56 push %esi 10b448: 68 a0 7d 12 00 push $0x127da0 10b44d: e8 5a 1a 00 00 call 10ceac <_Objects_Get> switch ( location ) { 10b452: 83 c4 10 add $0x10,%esp 10b455: 8b 55 f4 mov -0xc(%ebp),%edx 10b458: 85 d2 test %edx,%edx 10b45a: 74 0c je 10b468 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b45c: b8 04 00 00 00 mov $0x4,%eax } 10b461: 8d 65 f8 lea -0x8(%ebp),%esp 10b464: 5b pop %ebx 10b465: 5e pop %esi 10b466: c9 leave 10b467: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b468: 6a 00 push $0x0 10b46a: 6a 00 push $0x0 10b46c: 68 ff ff ff 7f push $0x7fffffff 10b471: 6a 00 push $0x0 10b473: 56 push %esi 10b474: ff 75 10 pushl 0x10(%ebp) 10b477: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b478: 83 c0 14 add $0x14,%eax 10b47b: 50 push %eax 10b47c: e8 33 0c 00 00 call 10c0b4 <_CORE_message_queue_Submit> 10b481: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b483: 83 c4 20 add $0x20,%esp 10b486: e8 b1 22 00 00 call 10d73c <_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); 10b48b: 83 ec 0c sub $0xc,%esp 10b48e: 53 push %ebx 10b48f: e8 18 00 00 00 call 10b4ac <_Message_queue_Translate_core_message_queue_return_code> 10b494: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b497: 8d 65 f8 lea -0x8(%ebp),%esp 10b49a: 5b pop %ebx 10b49b: 5e pop %esi 10b49c: c9 leave 10b49d: c3 ret 10b49e: 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; 10b4a0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b4a5: 8d 65 f8 lea -0x8(%ebp),%esp 10b4a8: 5b pop %ebx 10b4a9: 5e pop %esi 10b4aa: c9 leave 10b4ab: c3 ret =============================================================================== 001168a8 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1168a8: 55 push %ebp 1168a9: 89 e5 mov %esp,%ebp 1168ab: 56 push %esi 1168ac: 53 push %ebx 1168ad: 83 ec 10 sub $0x10,%esp 1168b0: 8b 75 08 mov 0x8(%ebp),%esi 1168b3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1168b6: 85 db test %ebx,%ebx 1168b8: 74 5e je 116918 1168ba: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1168bb: 8d 45 f4 lea -0xc(%ebp),%eax 1168be: 50 push %eax 1168bf: 56 push %esi 1168c0: 68 60 2d 14 00 push $0x142d60 1168c5: e8 ca 4a 00 00 call 11b394 <_Objects_Get> switch ( location ) { 1168ca: 83 c4 10 add $0x10,%esp 1168cd: 8b 55 f4 mov -0xc(%ebp),%edx 1168d0: 85 d2 test %edx,%edx 1168d2: 74 0c je 1168e0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1168d4: b8 04 00 00 00 mov $0x4,%eax } 1168d9: 8d 65 f8 lea -0x8(%ebp),%esp 1168dc: 5b pop %ebx 1168dd: 5e pop %esi 1168de: c9 leave 1168df: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1168e0: 6a 00 push $0x0 1168e2: 6a 00 push $0x0 1168e4: 68 00 00 00 80 push $0x80000000 1168e9: 6a 00 push $0x0 1168eb: 56 push %esi 1168ec: ff 75 10 pushl 0x10(%ebp) 1168ef: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 1168f0: 83 c0 14 add $0x14,%eax 1168f3: 50 push %eax 1168f4: e8 bf 33 00 00 call 119cb8 <_CORE_message_queue_Submit> 1168f9: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1168fb: 83 c4 20 add $0x20,%esp 1168fe: e8 21 53 00 00 call 11bc24 <_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); 116903: 83 ec 0c sub $0xc,%esp 116906: 53 push %ebx 116907: e8 8c ff ff ff call 116898 <_Message_queue_Translate_core_message_queue_return_code> 11690c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11690f: 8d 65 f8 lea -0x8(%ebp),%esp 116912: 5b pop %ebx 116913: 5e pop %esi 116914: c9 leave 116915: c3 ret 116916: 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; 116918: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11691d: 8d 65 f8 lea -0x8(%ebp),%esp 116920: 5b pop %ebx 116921: 5e pop %esi 116922: c9 leave 116923: c3 ret =============================================================================== 0010b9ac : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10b9ac: 55 push %ebp 10b9ad: 89 e5 mov %esp,%ebp 10b9af: 83 ec 08 sub $0x8,%esp 10b9b2: 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 ) 10b9b5: 83 f8 01 cmp $0x1,%eax 10b9b8: 74 36 je 10b9f0 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b9ba: 83 f8 02 cmp $0x2,%eax 10b9bd: 74 29 je 10b9e8 api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b9bf: 83 f8 03 cmp $0x3,%eax 10b9c2: 74 08 je 10b9cc api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10b9c4: b8 07 26 12 00 mov $0x122607,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10b9c9: c9 leave 10b9ca: c3 ret 10b9cb: 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; 10b9cc: b8 80 74 12 00 mov $0x127480,%eax #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10b9d1: 83 ec 08 sub $0x8,%esp 10b9d4: ff 75 0c pushl 0xc(%ebp) 10b9d7: 50 push %eax 10b9d8: e8 13 49 00 00 call 1102f0 if ( class_assoc ) 10b9dd: 83 c4 10 add $0x10,%esp 10b9e0: 85 c0 test %eax,%eax 10b9e2: 74 14 je 10b9f8 return class_assoc->name; 10b9e4: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b9e6: c9 leave 10b9e7: 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; 10b9e8: b8 00 74 12 00 mov $0x127400,%eax 10b9ed: eb e2 jmp 10b9d1 10b9ef: 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; 10b9f0: b8 e0 73 12 00 mov $0x1273e0,%eax 10b9f5: eb da jmp 10b9d1 10b9f7: 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"; 10b9f8: b8 0f 26 12 00 mov $0x12260f,%eax } 10b9fd: c9 leave 10b9fe: c3 ret =============================================================================== 0010ba00 : }; const char *rtems_object_get_api_name( int api ) { 10ba00: 55 push %ebp 10ba01: 89 e5 mov %esp,%ebp 10ba03: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10ba06: ff 75 08 pushl 0x8(%ebp) 10ba09: 68 20 75 12 00 push $0x127520 10ba0e: e8 dd 48 00 00 call 1102f0 if ( api_assoc ) 10ba13: 83 c4 10 add $0x10,%esp 10ba16: 85 c0 test %eax,%eax 10ba18: 74 06 je 10ba20 return api_assoc->name; 10ba1a: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10ba1c: c9 leave 10ba1d: c3 ret 10ba1e: 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"; 10ba20: b8 0f 26 12 00 mov $0x12260f,%eax } 10ba25: c9 leave 10ba26: c3 ret =============================================================================== 0010cf48 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cf48: 55 push %ebp 10cf49: 89 e5 mov %esp,%ebp 10cf4b: 57 push %edi 10cf4c: 56 push %esi 10cf4d: 53 push %ebx 10cf4e: 83 ec 0c sub $0xc,%esp 10cf51: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cf54: 85 db test %ebx,%ebx 10cf56: 74 5c je 10cfb4 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cf58: 83 ec 08 sub $0x8,%esp 10cf5b: ff 75 0c pushl 0xc(%ebp) 10cf5e: ff 75 08 pushl 0x8(%ebp) 10cf61: e8 32 1b 00 00 call 10ea98 <_Objects_Get_information> if ( !obj_info ) 10cf66: 83 c4 10 add $0x10,%esp 10cf69: 85 c0 test %eax,%eax 10cf6b: 74 57 je 10cfc4 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cf6d: 8b 50 08 mov 0x8(%eax),%edx 10cf70: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cf72: 8b 50 0c mov 0xc(%eax),%edx 10cf75: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cf78: 8a 50 12 mov 0x12(%eax),%dl 10cf7b: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cf7e: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf82: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf85: 85 f6 test %esi,%esi 10cf87: 74 42 je 10cfcb <== NEVER TAKEN 10cf89: 8b 78 1c mov 0x1c(%eax),%edi 10cf8c: b9 01 00 00 00 mov $0x1,%ecx 10cf91: b8 01 00 00 00 mov $0x1,%eax 10cf96: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10cf98: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cf9c: 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++ ) 10cf9f: 40 inc %eax 10cfa0: 89 c1 mov %eax,%ecx 10cfa2: 39 c6 cmp %eax,%esi 10cfa4: 73 f2 jae 10cf98 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cfa6: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10cfa9: 31 c0 xor %eax,%eax } 10cfab: 8d 65 f4 lea -0xc(%ebp),%esp 10cfae: 5b pop %ebx 10cfaf: 5e pop %esi 10cfb0: 5f pop %edi 10cfb1: c9 leave 10cfb2: c3 ret 10cfb3: 90 nop <== NOT EXECUTED /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10cfb4: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cfb9: 8d 65 f4 lea -0xc(%ebp),%esp 10cfbc: 5b pop %ebx 10cfbd: 5e pop %esi 10cfbe: 5f pop %edi 10cfbf: c9 leave 10cfc0: c3 ret 10cfc1: 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; 10cfc4: b8 0a 00 00 00 mov $0xa,%eax 10cfc9: eb e0 jmp 10cfab 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++ ) 10cfcb: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfcd: eb d7 jmp 10cfa6 <== NOT EXECUTED =============================================================================== 0010c598 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c598: 55 push %ebp 10c599: 89 e5 mov %esp,%ebp 10c59b: 53 push %ebx 10c59c: 83 ec 14 sub $0x14,%esp 10c59f: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c5a2: 85 db test %ebx,%ebx 10c5a4: 74 26 je 10c5cc return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c5a6: 83 ec 08 sub $0x8,%esp 10c5a9: 8d 45 f4 lea -0xc(%ebp),%eax 10c5ac: 50 push %eax 10c5ad: ff 75 08 pushl 0x8(%ebp) 10c5b0: e8 87 1b 00 00 call 10e13c <_Objects_Id_to_name> *name = name_u.name_u32; 10c5b5: 8b 55 f4 mov -0xc(%ebp),%edx 10c5b8: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c5ba: 8b 04 85 cc 31 12 00 mov 0x1231cc(,%eax,4),%eax 10c5c1: 83 c4 10 add $0x10,%esp } 10c5c4: 8b 5d fc mov -0x4(%ebp),%ebx 10c5c7: c9 leave 10c5c8: c3 ret 10c5c9: 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; 10c5cc: 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 ]; } 10c5d1: 8b 5d fc mov -0x4(%ebp),%ebx 10c5d4: c9 leave 10c5d5: c3 ret =============================================================================== 0010ba34 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10ba34: 55 push %ebp 10ba35: 89 e5 mov %esp,%ebp 10ba37: 57 push %edi 10ba38: 56 push %esi 10ba39: 53 push %ebx 10ba3a: 83 ec 1c sub $0x1c,%esp 10ba3d: 8b 75 08 mov 0x8(%ebp),%esi 10ba40: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10ba43: 85 ff test %edi,%edi 10ba45: 74 61 je 10baa8 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ba47: 85 f6 test %esi,%esi 10ba49: 74 35 je 10ba80 information = _Objects_Get_information_id( tmpId ); 10ba4b: 83 ec 0c sub $0xc,%esp 10ba4e: 56 push %esi 10ba4f: e8 0c 19 00 00 call 10d360 <_Objects_Get_information_id> 10ba54: 89 c3 mov %eax,%ebx if ( !information ) 10ba56: 83 c4 10 add $0x10,%esp 10ba59: 85 c0 test %eax,%eax 10ba5b: 74 16 je 10ba73 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10ba5d: 50 push %eax 10ba5e: 8d 45 e4 lea -0x1c(%ebp),%eax 10ba61: 50 push %eax 10ba62: 56 push %esi 10ba63: 53 push %ebx 10ba64: e8 a7 1a 00 00 call 10d510 <_Objects_Get> switch ( location ) { 10ba69: 83 c4 10 add $0x10,%esp 10ba6c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10ba6f: 85 c9 test %ecx,%ecx 10ba71: 74 19 je 10ba8c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ba73: b8 04 00 00 00 mov $0x4,%eax } 10ba78: 8d 65 f4 lea -0xc(%ebp),%esp 10ba7b: 5b pop %ebx 10ba7c: 5e pop %esi 10ba7d: 5f pop %edi 10ba7e: c9 leave 10ba7f: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ba80: a1 98 9e 12 00 mov 0x129e98,%eax 10ba85: 8b 70 08 mov 0x8(%eax),%esi 10ba88: eb c1 jmp 10ba4b 10ba8a: 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 ); 10ba8c: 52 push %edx 10ba8d: 57 push %edi 10ba8e: 50 push %eax 10ba8f: 53 push %ebx 10ba90: e8 77 1c 00 00 call 10d70c <_Objects_Set_name> _Thread_Enable_dispatch(); 10ba95: e8 ea 23 00 00 call 10de84 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ba9a: 83 c4 10 add $0x10,%esp 10ba9d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba9f: 8d 65 f4 lea -0xc(%ebp),%esp 10baa2: 5b pop %ebx 10baa3: 5e pop %esi 10baa4: 5f pop %edi 10baa5: c9 leave 10baa6: c3 ret 10baa7: 90 nop <== NOT EXECUTED Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10baa8: b8 09 00 00 00 mov $0x9,%eax 10baad: eb c9 jmp 10ba78 =============================================================================== 00116924 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 116924: 55 push %ebp 116925: 89 e5 mov %esp,%ebp 116927: 57 push %edi 116928: 56 push %esi 116929: 53 push %ebx 11692a: 83 ec 1c sub $0x1c,%esp 11692d: 8b 5d 08 mov 0x8(%ebp),%ebx 116930: 8b 75 0c mov 0xc(%ebp),%esi 116933: 8b 55 10 mov 0x10(%ebp),%edx 116936: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116939: 85 db test %ebx,%ebx 11693b: 74 47 je 116984 return RTEMS_INVALID_NAME; if ( !starting_address ) 11693d: 85 f6 test %esi,%esi 11693f: 74 23 je 116964 return RTEMS_INVALID_ADDRESS; if ( !id ) 116941: 8b 45 1c mov 0x1c(%ebp),%eax 116944: 85 c0 test %eax,%eax 116946: 74 1c je 116964 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 116948: 85 d2 test %edx,%edx 11694a: 74 28 je 116974 11694c: 85 ff test %edi,%edi 11694e: 74 24 je 116974 116950: 39 fa cmp %edi,%edx 116952: 72 20 jb 116974 116954: f7 c7 03 00 00 00 test $0x3,%edi 11695a: 75 18 jne 116974 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 11695c: f7 c6 03 00 00 00 test $0x3,%esi 116962: 74 30 je 116994 return RTEMS_INVALID_ADDRESS; 116964: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116969: 8d 65 f4 lea -0xc(%ebp),%esp 11696c: 5b pop %ebx 11696d: 5e pop %esi 11696e: 5f pop %edi 11696f: c9 leave 116970: c3 ret 116971: 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; 116974: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116979: 8d 65 f4 lea -0xc(%ebp),%esp 11697c: 5b pop %ebx 11697d: 5e pop %esi 11697e: 5f pop %edi 11697f: c9 leave 116980: c3 ret 116981: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 116984: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116989: 8d 65 f4 lea -0xc(%ebp),%esp 11698c: 5b pop %ebx 11698d: 5e pop %esi 11698e: 5f pop %edi 11698f: c9 leave 116990: c3 ret 116991: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116994: a1 94 23 14 00 mov 0x142394,%eax 116999: 40 inc %eax 11699a: a3 94 23 14 00 mov %eax,0x142394 * 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 ); 11699f: 83 ec 0c sub $0xc,%esp 1169a2: 68 20 22 14 00 push $0x142220 1169a7: 89 55 e0 mov %edx,-0x20(%ebp) 1169aa: e8 f9 44 00 00 call 11aea8 <_Objects_Allocate> 1169af: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1169b2: 83 c4 10 add $0x10,%esp 1169b5: 85 c0 test %eax,%eax 1169b7: 8b 55 e0 mov -0x20(%ebp),%edx 1169ba: 74 58 je 116a14 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1169bc: 8b 45 e4 mov -0x1c(%ebp),%eax 1169bf: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1169c2: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1169c5: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1169c8: 8b 4d 18 mov 0x18(%ebp),%ecx 1169cb: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 1169ce: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 1169d5: 57 push %edi 1169d6: 89 d0 mov %edx,%eax 1169d8: 31 d2 xor %edx,%edx 1169da: f7 f7 div %edi 1169dc: 50 push %eax 1169dd: 56 push %esi 1169de: 8b 45 e4 mov -0x1c(%ebp),%eax 1169e1: 83 c0 24 add $0x24,%eax 1169e4: 50 push %eax 1169e5: e8 82 2f 00 00 call 11996c <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1169ea: 8b 7d e4 mov -0x1c(%ebp),%edi 1169ed: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1169f0: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1169f3: 8b 15 3c 22 14 00 mov 0x14223c,%edx 1169f9: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1169fc: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1169ff: 8b 55 1c mov 0x1c(%ebp),%edx 116a02: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116a04: e8 1b 52 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a09: 83 c4 10 add $0x10,%esp 116a0c: 31 c0 xor %eax,%eax 116a0e: e9 66 ff ff ff jmp 116979 116a13: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 116a14: e8 0b 52 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 116a19: b8 05 00 00 00 mov $0x5,%eax 116a1e: e9 56 ff ff ff jmp 116979 =============================================================================== 00116a24 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 116a24: 55 push %ebp 116a25: 89 e5 mov %esp,%ebp 116a27: 83 ec 2c sub $0x2c,%esp register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a2a: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a2d: 50 push %eax 116a2e: ff 75 08 pushl 0x8(%ebp) 116a31: 68 20 22 14 00 push $0x142220 116a36: e8 59 49 00 00 call 11b394 <_Objects_Get> switch ( location ) { 116a3b: 83 c4 10 add $0x10,%esp 116a3e: 8b 55 f4 mov -0xc(%ebp),%edx 116a41: 85 d2 test %edx,%edx 116a43: 74 07 je 116a4c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a45: b8 04 00 00 00 mov $0x4,%eax } 116a4a: c9 leave 116a4b: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116a4c: 8b 48 20 mov 0x20(%eax),%ecx 116a4f: 85 c9 test %ecx,%ecx 116a51: 74 0d je 116a60 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116a53: e8 cc 51 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 116a58: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a5d: c9 leave 116a5e: c3 ret 116a5f: 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 ); 116a60: 83 ec 08 sub $0x8,%esp 116a63: 50 push %eax 116a64: 68 20 22 14 00 push $0x142220 116a69: 89 45 e4 mov %eax,-0x1c(%ebp) 116a6c: e8 b3 44 00 00 call 11af24 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 116a71: 58 pop %eax 116a72: 5a pop %edx 116a73: 8b 45 e4 mov -0x1c(%ebp),%eax 116a76: 50 push %eax 116a77: 68 20 22 14 00 push $0x142220 116a7c: e8 9f 47 00 00 call 11b220 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 116a81: e8 9e 51 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a86: 83 c4 10 add $0x10,%esp 116a89: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a8b: c9 leave 116a8c: c3 ret =============================================================================== 00116a90 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116a90: 55 push %ebp 116a91: 89 e5 mov %esp,%ebp 116a93: 56 push %esi 116a94: 53 push %ebx 116a95: 83 ec 20 sub $0x20,%esp 116a98: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116a9b: 85 db test %ebx,%ebx 116a9d: 74 59 je 116af8 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a9f: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 116aa0: 8d 45 f4 lea -0xc(%ebp),%eax 116aa3: 50 push %eax 116aa4: ff 75 08 pushl 0x8(%ebp) 116aa7: 68 20 22 14 00 push $0x142220 116aac: e8 e3 48 00 00 call 11b394 <_Objects_Get> 116ab1: 89 c6 mov %eax,%esi switch ( location ) { 116ab3: 83 c4 10 add $0x10,%esp 116ab6: 8b 45 f4 mov -0xc(%ebp),%eax 116ab9: 85 c0 test %eax,%eax 116abb: 75 2f jne 116aec */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116abd: 83 ec 0c sub $0xc,%esp 116ac0: 8d 46 24 lea 0x24(%esi),%eax 116ac3: 50 push %eax 116ac4: e8 7f 2e 00 00 call 119948 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116ac9: 83 c4 10 add $0x10,%esp 116acc: 85 c0 test %eax,%eax 116ace: 74 34 je 116b04 the_partition->number_of_used_blocks += 1; 116ad0: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 116ad3: 89 45 e4 mov %eax,-0x1c(%ebp) 116ad6: e8 49 51 00 00 call 11bc24 <_Thread_Enable_dispatch> *buffer = the_buffer; 116adb: 8b 45 e4 mov -0x1c(%ebp),%eax 116ade: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 116ae0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ae2: 8d 65 f8 lea -0x8(%ebp),%esp 116ae5: 5b pop %ebx 116ae6: 5e pop %esi 116ae7: c9 leave 116ae8: c3 ret 116ae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116aec: b8 04 00 00 00 mov $0x4,%eax } 116af1: 8d 65 f8 lea -0x8(%ebp),%esp 116af4: 5b pop %ebx 116af5: 5e pop %esi 116af6: c9 leave 116af7: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 116af8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116afd: 8d 65 f8 lea -0x8(%ebp),%esp 116b00: 5b pop %ebx 116b01: 5e pop %esi 116b02: c9 leave 116b03: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116b04: e8 1b 51 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 116b09: b8 0d 00 00 00 mov $0xd,%eax 116b0e: eb e1 jmp 116af1 =============================================================================== 00116b34 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116b34: 55 push %ebp 116b35: 89 e5 mov %esp,%ebp 116b37: 56 push %esi 116b38: 53 push %ebx 116b39: 83 ec 14 sub $0x14,%esp 116b3c: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116b3f: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116b42: 50 push %eax 116b43: ff 75 08 pushl 0x8(%ebp) 116b46: 68 20 22 14 00 push $0x142220 116b4b: e8 44 48 00 00 call 11b394 <_Objects_Get> 116b50: 89 c3 mov %eax,%ebx switch ( location ) { 116b52: 83 c4 10 add $0x10,%esp 116b55: 8b 45 f4 mov -0xc(%ebp),%eax 116b58: 85 c0 test %eax,%eax 116b5a: 74 0c je 116b68 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116b5c: b8 04 00 00 00 mov $0x4,%eax } 116b61: 8d 65 f8 lea -0x8(%ebp),%esp 116b64: 5b pop %ebx 116b65: 5e pop %esi 116b66: c9 leave 116b67: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116b68: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116b6b: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116b6e: 39 c6 cmp %eax,%esi 116b70: 72 3a jb 116bac RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116b72: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116b75: 39 d6 cmp %edx,%esi 116b77: 77 33 ja 116bac <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116b79: 89 f2 mov %esi,%edx 116b7b: 29 c2 sub %eax,%edx 116b7d: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116b7f: 31 d2 xor %edx,%edx 116b81: 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 ) && 116b84: 85 d2 test %edx,%edx 116b86: 75 24 jne 116bac RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116b88: 83 ec 08 sub $0x8,%esp 116b8b: 56 push %esi 116b8c: 8d 43 24 lea 0x24(%ebx),%eax 116b8f: 50 push %eax 116b90: e8 77 2d 00 00 call 11990c <_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; 116b95: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116b98: e8 87 50 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116b9d: 83 c4 10 add $0x10,%esp 116ba0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ba2: 8d 65 f8 lea -0x8(%ebp),%esp 116ba5: 5b pop %ebx 116ba6: 5e pop %esi 116ba7: c9 leave 116ba8: c3 ret 116ba9: 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(); 116bac: e8 73 50 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116bb1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116bb6: 8d 65 f8 lea -0x8(%ebp),%esp 116bb9: 5b pop %ebx 116bba: 5e pop %esi 116bbb: c9 leave 116bbc: c3 ret =============================================================================== 00115f58 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115f58: 55 push %ebp 115f59: 89 e5 mov %esp,%ebp 115f5b: 57 push %edi 115f5c: 56 push %esi 115f5d: 53 push %ebx 115f5e: 83 ec 1c sub $0x1c,%esp 115f61: 8b 5d 08 mov 0x8(%ebp),%ebx 115f64: 8b 55 0c mov 0xc(%ebp),%edx 115f67: 8b 7d 10 mov 0x10(%ebp),%edi 115f6a: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115f6d: 85 db test %ebx,%ebx 115f6f: 74 1b je 115f8c return RTEMS_INVALID_NAME; if ( !id ) 115f71: 85 f6 test %esi,%esi 115f73: 74 08 je 115f7d * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115f75: 89 f8 mov %edi,%eax 115f77: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115f79: a8 03 test $0x3,%al 115f7b: 74 1f je 115f9c !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115f7d: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115f82: 8d 65 f4 lea -0xc(%ebp),%esp 115f85: 5b pop %ebx 115f86: 5e pop %esi 115f87: 5f pop %edi 115f88: c9 leave 115f89: c3 ret 115f8a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115f8c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115f91: 8d 65 f4 lea -0xc(%ebp),%esp 115f94: 5b pop %ebx 115f95: 5e pop %esi 115f96: 5f pop %edi 115f97: c9 leave 115f98: c3 ret 115f99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115f9c: a1 94 23 14 00 mov 0x142394,%eax 115fa1: 40 inc %eax 115fa2: a3 94 23 14 00 mov %eax,0x142394 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 115fa7: 83 ec 0c sub $0xc,%esp 115faa: 68 e0 21 14 00 push $0x1421e0 115faf: 89 55 e4 mov %edx,-0x1c(%ebp) 115fb2: e8 f1 4e 00 00 call 11aea8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115fb7: 83 c4 10 add $0x10,%esp 115fba: 85 c0 test %eax,%eax 115fbc: 8b 55 e4 mov -0x1c(%ebp),%edx 115fbf: 74 33 je 115ff4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115fc1: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115fc4: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115fc7: 8b 55 14 mov 0x14(%ebp),%edx 115fca: 4a dec %edx 115fcb: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115fce: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115fd1: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115fd4: 8b 0d fc 21 14 00 mov 0x1421fc,%ecx 115fda: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115fdd: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115fe0: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115fe2: e8 3d 5c 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115fe7: 31 c0 xor %eax,%eax } 115fe9: 8d 65 f4 lea -0xc(%ebp),%esp 115fec: 5b pop %ebx 115fed: 5e pop %esi 115fee: 5f pop %edi 115fef: c9 leave 115ff0: c3 ret 115ff1: 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(); 115ff4: e8 2b 5c 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115ff9: b8 05 00 00 00 mov $0x5,%eax 115ffe: eb 82 jmp 115f82 =============================================================================== 00116000 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 116000: 55 push %ebp 116001: 89 e5 mov %esp,%ebp 116003: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 116006: 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 ); 116009: 50 push %eax 11600a: ff 75 08 pushl 0x8(%ebp) 11600d: 68 e0 21 14 00 push $0x1421e0 116012: e8 7d 53 00 00 call 11b394 <_Objects_Get> switch ( location ) { 116017: 83 c4 10 add $0x10,%esp 11601a: 8b 4d f4 mov -0xc(%ebp),%ecx 11601d: 85 c9 test %ecx,%ecx 11601f: 75 2f jne 116050 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 116021: 83 ec 08 sub $0x8,%esp 116024: 50 push %eax 116025: 68 e0 21 14 00 push $0x1421e0 11602a: 89 45 e4 mov %eax,-0x1c(%ebp) 11602d: e8 f2 4e 00 00 call 11af24 <_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 ); 116032: 58 pop %eax 116033: 5a pop %edx 116034: 8b 45 e4 mov -0x1c(%ebp),%eax 116037: 50 push %eax 116038: 68 e0 21 14 00 push $0x1421e0 11603d: e8 de 51 00 00 call 11b220 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 116042: e8 dd 5b 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116047: 83 c4 10 add $0x10,%esp 11604a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11604c: c9 leave 11604d: c3 ret 11604e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116050: b8 04 00 00 00 mov $0x4,%eax } 116055: c9 leave 116056: c3 ret =============================================================================== 00116058 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 116058: 55 push %ebp 116059: 89 e5 mov %esp,%ebp 11605b: 56 push %esi 11605c: 53 push %ebx 11605d: 83 ec 10 sub $0x10,%esp 116060: 8b 75 0c mov 0xc(%ebp),%esi 116063: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 116066: 85 db test %ebx,%ebx 116068: 74 4e je 1160b8 Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 11606a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 11606b: 8d 45 f4 lea -0xc(%ebp),%eax 11606e: 50 push %eax 11606f: ff 75 08 pushl 0x8(%ebp) 116072: 68 e0 21 14 00 push $0x1421e0 116077: e8 18 53 00 00 call 11b394 <_Objects_Get> switch ( location ) { 11607c: 83 c4 10 add $0x10,%esp 11607f: 8b 55 f4 mov -0xc(%ebp),%edx 116082: 85 d2 test %edx,%edx 116084: 74 0e je 116094 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116086: b8 04 00 00 00 mov $0x4,%eax } 11608b: 8d 65 f8 lea -0x8(%ebp),%esp 11608e: 5b pop %ebx 11608f: 5e pop %esi 116090: c9 leave 116091: c3 ret 116092: 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); 116094: 89 f2 mov %esi,%edx 116096: 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 ) 116099: 3b 50 18 cmp 0x18(%eax),%edx 11609c: 77 16 ja 1160b4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11609e: 03 50 10 add 0x10(%eax),%edx 1160a1: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 1160a3: e8 7c 5b 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1160a8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160aa: 8d 65 f8 lea -0x8(%ebp),%esp 1160ad: 5b pop %ebx 1160ae: 5e pop %esi 1160af: c9 leave 1160b0: c3 ret 1160b1: 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; 1160b4: 89 33 mov %esi,(%ebx) 1160b6: eb eb jmp 1160a3 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 1160b8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160bd: 8d 65 f8 lea -0x8(%ebp),%esp 1160c0: 5b pop %ebx 1160c1: 5e pop %esi 1160c2: c9 leave 1160c3: c3 ret =============================================================================== 001160e8 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 1160e8: 55 push %ebp 1160e9: 89 e5 mov %esp,%ebp 1160eb: 56 push %esi 1160ec: 53 push %ebx 1160ed: 83 ec 10 sub $0x10,%esp 1160f0: 8b 75 0c mov 0xc(%ebp),%esi 1160f3: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 1160f6: 85 db test %ebx,%ebx 1160f8: 74 4e je 116148 1160fa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 1160fb: 8d 45 f4 lea -0xc(%ebp),%eax 1160fe: 50 push %eax 1160ff: ff 75 08 pushl 0x8(%ebp) 116102: 68 e0 21 14 00 push $0x1421e0 116107: e8 88 52 00 00 call 11b394 <_Objects_Get> switch ( location ) { 11610c: 83 c4 10 add $0x10,%esp 11610f: 8b 55 f4 mov -0xc(%ebp),%edx 116112: 85 d2 test %edx,%edx 116114: 74 0e je 116124 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116116: b8 04 00 00 00 mov $0x4,%eax } 11611b: 8d 65 f8 lea -0x8(%ebp),%esp 11611e: 5b pop %ebx 11611f: 5e pop %esi 116120: c9 leave 116121: c3 ret 116122: 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); 116124: 89 f2 mov %esi,%edx 116126: 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 ) 116129: 3b 50 18 cmp 0x18(%eax),%edx 11612c: 77 16 ja 116144 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11612e: 03 50 14 add 0x14(%eax),%edx 116131: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 116133: e8 ec 5a 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116138: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11613a: 8d 65 f8 lea -0x8(%ebp),%esp 11613d: 5b pop %ebx 11613e: 5e pop %esi 11613f: c9 leave 116140: c3 ret 116141: 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; 116144: 89 33 mov %esi,(%ebx) 116146: eb eb jmp 116133 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 116148: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11614d: 8d 65 f8 lea -0x8(%ebp),%esp 116150: 5b pop %ebx 116151: 5e pop %esi 116152: c9 leave 116153: c3 ret =============================================================================== 00116bc0 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116bc0: 55 push %ebp 116bc1: 89 e5 mov %esp,%ebp 116bc3: 53 push %ebx 116bc4: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116bc7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116bca: 50 push %eax 116bcb: ff 75 08 pushl 0x8(%ebp) 116bce: 68 60 22 14 00 push $0x142260 116bd3: e8 bc 47 00 00 call 11b394 <_Objects_Get> 116bd8: 89 c3 mov %eax,%ebx switch ( location ) { 116bda: 83 c4 10 add $0x10,%esp 116bdd: 8b 45 f4 mov -0xc(%ebp),%eax 116be0: 85 c0 test %eax,%eax 116be2: 74 0c je 116bf0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116be4: b8 04 00 00 00 mov $0x4,%eax } 116be9: 8b 5d fc mov -0x4(%ebp),%ebx 116bec: c9 leave 116bed: c3 ret 116bee: 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 ) ) { 116bf0: a1 58 29 14 00 mov 0x142958,%eax 116bf5: 39 43 40 cmp %eax,0x40(%ebx) 116bf8: 74 12 je 116c0c _Thread_Enable_dispatch(); 116bfa: e8 25 50 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116bff: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116c04: 8b 5d fc mov -0x4(%ebp),%ebx 116c07: c9 leave 116c08: c3 ret 116c09: 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 ); 116c0c: 83 ec 0c sub $0xc,%esp 116c0f: 8d 43 10 lea 0x10(%ebx),%eax 116c12: 50 push %eax 116c13: e8 4c 64 00 00 call 11d064 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116c18: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116c1f: e8 00 50 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116c24: 83 c4 10 add $0x10,%esp 116c27: 31 c0 xor %eax,%eax 116c29: eb be jmp 116be9 =============================================================================== 0010c3b8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c3b8: 55 push %ebp 10c3b9: 89 e5 mov %esp,%ebp 10c3bb: 57 push %edi 10c3bc: 56 push %esi 10c3bd: 53 push %ebx 10c3be: 83 ec 1c sub $0x1c,%esp 10c3c1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3c4: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c3c7: 85 db test %ebx,%ebx 10c3c9: 0f 84 a9 00 00 00 je 10c478 return RTEMS_INVALID_NAME; if ( !id ) 10c3cf: 85 f6 test %esi,%esi 10c3d1: 0f 84 c5 00 00 00 je 10c49c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c3d7: a1 b4 a9 12 00 mov 0x12a9b4,%eax 10c3dc: 40 inc %eax 10c3dd: a3 b4 a9 12 00 mov %eax,0x12a9b4 * 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 ); 10c3e2: 83 ec 0c sub $0xc,%esp 10c3e5: 68 c0 a8 12 00 push $0x12a8c0 10c3ea: e8 21 1f 00 00 call 10e310 <_Objects_Allocate> 10c3ef: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c3f1: 83 c4 10 add $0x10,%esp 10c3f4: 85 c0 test %eax,%eax 10c3f6: 0f 84 8c 00 00 00 je 10c488 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c3fc: a1 78 af 12 00 mov 0x12af78,%eax 10c401: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c404: 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; 10c40b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c412: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c419: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c420: 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 ); 10c427: 8d 42 54 lea 0x54(%edx),%eax 10c42a: 89 45 e4 mov %eax,-0x1c(%ebp) 10c42d: b9 38 00 00 00 mov $0x38,%ecx 10c432: 31 c0 xor %eax,%eax 10c434: 8b 7d e4 mov -0x1c(%ebp),%edi 10c437: f3 aa rep stos %al,%es:(%edi) 10c439: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c440: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c447: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c44e: 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 ), 10c455: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c458: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c45b: 8b 0d dc a8 12 00 mov 0x12a8dc,%ecx 10c461: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c464: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c467: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c469: e8 ca 2c 00 00 call 10f138 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c46e: 31 c0 xor %eax,%eax } 10c470: 8d 65 f4 lea -0xc(%ebp),%esp 10c473: 5b pop %ebx 10c474: 5e pop %esi 10c475: 5f pop %edi 10c476: c9 leave 10c477: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c478: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c47d: 8d 65 f4 lea -0xc(%ebp),%esp 10c480: 5b pop %ebx 10c481: 5e pop %esi 10c482: 5f pop %edi 10c483: c9 leave 10c484: c3 ret 10c485: 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(); 10c488: e8 ab 2c 00 00 call 10f138 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c48d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c492: 8d 65 f4 lea -0xc(%ebp),%esp 10c495: 5b pop %ebx 10c496: 5e pop %esi 10c497: 5f pop %edi 10c498: c9 leave 10c499: c3 ret 10c49a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c49c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c4a1: 8d 65 f4 lea -0xc(%ebp),%esp 10c4a4: 5b pop %ebx 10c4a5: 5e pop %esi 10c4a6: 5f pop %edi 10c4a7: c9 leave 10c4a8: c3 ret =============================================================================== 001128d0 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 1128d0: 55 push %ebp 1128d1: 89 e5 mov %esp,%ebp 1128d3: 53 push %ebx 1128d4: 83 ec 24 sub $0x24,%esp 1128d7: 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 ) 1128da: 85 db test %ebx,%ebx 1128dc: 0f 84 92 00 00 00 je 112974 1128e2: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 1128e3: 8d 45 f4 lea -0xc(%ebp),%eax 1128e6: 50 push %eax 1128e7: ff 75 08 pushl 0x8(%ebp) 1128ea: 68 c0 a8 12 00 push $0x12a8c0 1128ef: e8 b4 bf ff ff call 10e8a8 <_Objects_Get> switch ( location ) { 1128f4: 83 c4 10 add $0x10,%esp 1128f7: 8b 4d f4 mov -0xc(%ebp),%ecx 1128fa: 85 c9 test %ecx,%ecx 1128fc: 74 0a je 112908 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1128fe: b8 04 00 00 00 mov $0x4,%eax } 112903: 8b 5d fc mov -0x4(%ebp),%ebx 112906: c9 leave 112907: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 112908: 8b 50 40 mov 0x40(%eax),%edx 11290b: 8b 52 08 mov 0x8(%edx),%edx 11290e: 89 13 mov %edx,(%ebx) status->state = the_period->state; 112910: 8b 50 38 mov 0x38(%eax),%edx 112913: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 112916: 85 d2 test %edx,%edx 112918: 75 2a jne 112944 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 11291a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 112921: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 112928: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 11292f: 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(); 112936: e8 fd c7 ff ff call 10f138 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11293b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11293d: 8b 5d fc mov -0x4(%ebp),%ebx 112940: c9 leave 112941: c3 ret 112942: 66 90 xchg %ax,%ax <== NOT EXECUTED } else { /* * Grab the current status. */ valid_status = 112944: 52 push %edx _Rate_monotonic_Get_status( 112945: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 112948: 52 push %edx _Rate_monotonic_Get_status( 112949: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 11294c: 52 push %edx 11294d: 50 push %eax 11294e: e8 7d 9b ff ff call 10c4d0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 112953: 83 c4 10 add $0x10,%esp 112956: 84 c0 test %al,%al 112958: 74 26 je 112980 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 11295a: 8b 45 e4 mov -0x1c(%ebp),%eax 11295d: 8b 55 e8 mov -0x18(%ebp),%edx 112960: 89 43 08 mov %eax,0x8(%ebx) 112963: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 112966: 8b 45 ec mov -0x14(%ebp),%eax 112969: 8b 55 f0 mov -0x10(%ebp),%edx 11296c: 89 43 10 mov %eax,0x10(%ebx) 11296f: 89 53 14 mov %edx,0x14(%ebx) 112972: eb c2 jmp 112936 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 112974: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112979: 8b 5d fc mov -0x4(%ebp),%ebx 11297c: c9 leave 11297d: c3 ret 11297e: 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(); 112980: e8 b3 c7 ff ff call 10f138 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 112985: b8 0b 00 00 00 mov $0xb,%eax 11298a: e9 74 ff ff ff jmp 112903 =============================================================================== 0010c6cc : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c6cc: 55 push %ebp 10c6cd: 89 e5 mov %esp,%ebp 10c6cf: 57 push %edi 10c6d0: 56 push %esi 10c6d1: 53 push %ebx 10c6d2: 83 ec 30 sub $0x30,%esp 10c6d5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6d8: 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 ); 10c6db: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c6de: 50 push %eax 10c6df: 53 push %ebx 10c6e0: 68 c0 a8 12 00 push $0x12a8c0 10c6e5: e8 be 21 00 00 call 10e8a8 <_Objects_Get> switch ( location ) { 10c6ea: 83 c4 10 add $0x10,%esp 10c6ed: 8b 7d e4 mov -0x1c(%ebp),%edi 10c6f0: 85 ff test %edi,%edi 10c6f2: 74 10 je 10c704 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c6f4: b8 04 00 00 00 mov $0x4,%eax } 10c6f9: 8d 65 f4 lea -0xc(%ebp),%esp 10c6fc: 5b pop %ebx 10c6fd: 5e pop %esi 10c6fe: 5f pop %edi 10c6ff: c9 leave 10c700: c3 ret 10c701: 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 ) ) { 10c704: 8b 15 78 af 12 00 mov 0x12af78,%edx 10c70a: 39 50 40 cmp %edx,0x40(%eax) 10c70d: 74 15 je 10c724 _Thread_Enable_dispatch(); 10c70f: e8 24 2a 00 00 call 10f138 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c714: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c719: 8d 65 f4 lea -0xc(%ebp),%esp 10c71c: 5b pop %ebx 10c71d: 5e pop %esi 10c71e: 5f pop %edi 10c71f: c9 leave 10c720: c3 ret 10c721: 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 ) { 10c724: 85 f6 test %esi,%esi 10c726: 0f 84 b0 00 00 00 je 10c7dc } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 10c72c: 9c pushf 10c72d: fa cli 10c72e: 5f pop %edi switch ( the_period->state ) { 10c72f: 8b 50 38 mov 0x38(%eax),%edx 10c732: 83 fa 02 cmp $0x2,%edx 10c735: 0f 84 c1 00 00 00 je 10c7fc 10c73b: 83 fa 04 cmp $0x4,%edx 10c73e: 74 5c je 10c79c 10c740: 85 d2 test %edx,%edx 10c742: 75 b0 jne 10c6f4 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10c744: 57 push %edi 10c745: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c746: 83 ec 0c sub $0xc,%esp 10c749: 50 push %eax 10c74a: 89 45 d4 mov %eax,-0x2c(%ebp) 10c74d: e8 16 fe ff ff call 10c568 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c752: 8b 45 d4 mov -0x2c(%ebp),%eax 10c755: 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; 10c75c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c763: c7 40 2c 30 cb 10 00 movl $0x10cb30,0x2c(%eax) the_watchdog->id = id; 10c76a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c76d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c774: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c777: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c77a: 5b pop %ebx 10c77b: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c77c: 83 c0 10 add $0x10,%eax 10c77f: 50 push %eax 10c780: 68 84 aa 12 00 push $0x12aa84 10c785: e8 d2 3a 00 00 call 11025c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c78a: e8 a9 29 00 00 call 10f138 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c78f: 83 c4 10 add $0x10,%esp 10c792: 31 c0 xor %eax,%eax 10c794: e9 60 ff ff ff jmp 10c6f9 10c799: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c79c: 83 ec 0c sub $0xc,%esp 10c79f: 50 push %eax 10c7a0: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7a3: e8 34 fe ff ff call 10c5dc <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c7a8: 57 push %edi 10c7a9: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c7aa: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7ad: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c7b4: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c7b7: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c7ba: 5b pop %ebx 10c7bb: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c7bc: 83 c0 10 add $0x10,%eax 10c7bf: 50 push %eax 10c7c0: 68 84 aa 12 00 push $0x12aa84 10c7c5: e8 92 3a 00 00 call 11025c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c7ca: e8 69 29 00 00 call 10f138 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c7cf: 83 c4 10 add $0x10,%esp 10c7d2: b8 06 00 00 00 mov $0x6,%eax 10c7d7: e9 1d ff ff ff jmp 10c6f9 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c7dc: 8b 40 38 mov 0x38(%eax),%eax 10c7df: 83 f8 04 cmp $0x4,%eax 10c7e2: 77 78 ja 10c85c <== NEVER TAKEN 10c7e4: 8b 04 85 a8 36 12 00 mov 0x1236a8(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c7eb: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7ee: e8 45 29 00 00 call 10f138 <_Thread_Enable_dispatch> return( return_value ); 10c7f3: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7f6: e9 fe fe ff ff jmp 10c6f9 10c7fb: 90 nop <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c7fc: 83 ec 0c sub $0xc,%esp 10c7ff: 50 push %eax 10c800: 89 45 d4 mov %eax,-0x2c(%ebp) 10c803: e8 d4 fd ff ff call 10c5dc <_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; 10c808: 8b 45 d4 mov -0x2c(%ebp),%eax 10c80b: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c812: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c815: 57 push %edi 10c816: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c817: 8b 15 78 af 12 00 mov 0x12af78,%edx 10c81d: 8b 48 08 mov 0x8(%eax),%ecx 10c820: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c823: 5f pop %edi 10c824: 59 pop %ecx 10c825: 68 00 40 00 00 push $0x4000 10c82a: 52 push %edx 10c82b: 89 45 d4 mov %eax,-0x2c(%ebp) 10c82e: e8 e5 31 00 00 call 10fa18 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c833: 9c pushf 10c834: fa cli 10c835: 59 pop %ecx local_state = the_period->state; 10c836: 8b 45 d4 mov -0x2c(%ebp),%eax 10c839: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c83c: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c843: 51 push %ecx 10c844: 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 ) 10c845: 83 c4 10 add $0x10,%esp 10c848: 83 fa 03 cmp $0x3,%edx 10c84b: 74 13 je 10c860 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c84d: e8 e6 28 00 00 call 10f138 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c852: 31 c0 xor %eax,%eax 10c854: e9 a0 fe ff ff jmp 10c6f9 10c859: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c85c: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c85e: eb 8b jmp 10c7eb <== NOT EXECUTED /* * 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 ); 10c860: 83 ec 08 sub $0x8,%esp 10c863: 68 00 40 00 00 push $0x4000 10c868: ff 35 78 af 12 00 pushl 0x12af78 10c86e: e8 01 25 00 00 call 10ed74 <_Thread_Clear_state> 10c873: 83 c4 10 add $0x10,%esp 10c876: eb d5 jmp 10c84d =============================================================================== 0010c878 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c878: 55 push %ebp 10c879: 89 e5 mov %esp,%ebp 10c87b: 57 push %edi 10c87c: 56 push %esi 10c87d: 53 push %ebx 10c87e: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c884: 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 ) 10c887: 8b 7d 0c mov 0xc(%ebp),%edi 10c88a: 85 ff test %edi,%edi 10c88c: 0f 84 be 00 00 00 je 10c950 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c892: 83 ec 08 sub $0x8,%esp 10c895: 68 bc 36 12 00 push $0x1236bc 10c89a: 56 push %esi 10c89b: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c89e: 59 pop %ecx 10c89f: 5b pop %ebx 10c8a0: 68 f4 36 12 00 push $0x1236f4 10c8a5: 56 push %esi 10c8a6: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c8a9: 58 pop %eax 10c8aa: 5a pop %edx 10c8ab: 68 18 37 12 00 push $0x123718 10c8b0: 56 push %esi 10c8b1: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c8b4: 5b pop %ebx 10c8b5: 5f pop %edi 10c8b6: 68 3c 37 12 00 push $0x12373c 10c8bb: 56 push %esi 10c8bc: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c8bf: 5a pop %edx 10c8c0: 59 pop %ecx 10c8c1: 68 88 37 12 00 push $0x123788 10c8c6: 56 push %esi 10c8c7: 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 ; 10c8ca: 8b 1d c8 a8 12 00 mov 0x12a8c8,%ebx 10c8d0: 83 c4 10 add $0x10,%esp 10c8d3: 3b 1d cc a8 12 00 cmp 0x12a8cc,%ebx 10c8d9: 77 75 ja 10c950 <== NEVER TAKEN 10c8db: 8d 7d 88 lea -0x78(%ebp),%edi 10c8de: eb 09 jmp 10c8e9 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c8e0: 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 ; 10c8e1: 39 1d cc a8 12 00 cmp %ebx,0x12a8cc 10c8e7: 72 67 jb 10c950 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c8e9: 83 ec 08 sub $0x8,%esp 10c8ec: 57 push %edi 10c8ed: 53 push %ebx 10c8ee: e8 31 5f 00 00 call 112824 if ( status != RTEMS_SUCCESSFUL ) 10c8f3: 83 c4 10 add $0x10,%esp 10c8f6: 85 c0 test %eax,%eax 10c8f8: 75 e6 jne 10c8e0 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10c8fa: 83 ec 08 sub $0x8,%esp 10c8fd: 8d 45 c0 lea -0x40(%ebp),%eax 10c900: 50 push %eax 10c901: 53 push %ebx 10c902: e8 c9 5f 00 00 call 1128d0 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c907: 83 c4 0c add $0xc,%esp 10c90a: 8d 55 e3 lea -0x1d(%ebp),%edx 10c90d: 52 push %edx 10c90e: 6a 05 push $0x5 10c910: ff 75 c0 pushl -0x40(%ebp) 10c913: e8 b4 02 00 00 call 10cbcc /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c918: 59 pop %ecx 10c919: 58 pop %eax 10c91a: ff 75 8c pushl -0x74(%ebp) 10c91d: ff 75 88 pushl -0x78(%ebp) 10c920: 8d 45 e3 lea -0x1d(%ebp),%eax 10c923: 50 push %eax 10c924: 53 push %ebx 10c925: 68 da 36 12 00 push $0x1236da 10c92a: 56 push %esi 10c92b: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c92e: 8b 45 88 mov -0x78(%ebp),%eax 10c931: 83 c4 20 add $0x20,%esp 10c934: 85 c0 test %eax,%eax 10c936: 75 20 jne 10c958 (*print)( context, "\n" ); 10c938: 83 ec 08 sub $0x8,%esp 10c93b: 68 51 18 12 00 push $0x121851 10c940: 56 push %esi 10c941: ff 55 0c call *0xc(%ebp) continue; 10c944: 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++ ) { 10c947: 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 ; 10c948: 39 1d cc a8 12 00 cmp %ebx,0x12a8cc 10c94e: 73 99 jae 10c8e9 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c950: 8d 65 f4 lea -0xc(%ebp),%esp 10c953: 5b pop %ebx 10c954: 5e pop %esi 10c955: 5f pop %edi 10c956: c9 leave 10c957: 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 ); 10c958: 52 push %edx 10c959: 8d 55 d8 lea -0x28(%ebp),%edx 10c95c: 52 push %edx 10c95d: 50 push %eax 10c95e: 8d 45 a0 lea -0x60(%ebp),%eax 10c961: 50 push %eax 10c962: e8 55 35 00 00 call 10febc <_Timespec_Divide_by_integer> (*print)( context, 10c967: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c96c: 8b 45 dc mov -0x24(%ebp),%eax 10c96f: f7 e9 imul %ecx 10c971: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c977: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c97d: c1 f8 06 sar $0x6,%eax 10c980: 8b 55 dc mov -0x24(%ebp),%edx 10c983: c1 fa 1f sar $0x1f,%edx 10c986: 29 d0 sub %edx,%eax 10c988: 50 push %eax 10c989: ff 75 d8 pushl -0x28(%ebp) 10c98c: 8b 45 9c mov -0x64(%ebp),%eax 10c98f: f7 e9 imul %ecx 10c991: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c997: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c99d: c1 f8 06 sar $0x6,%eax 10c9a0: 8b 55 9c mov -0x64(%ebp),%edx 10c9a3: c1 fa 1f sar $0x1f,%edx 10c9a6: 29 d0 sub %edx,%eax 10c9a8: 50 push %eax 10c9a9: ff 75 98 pushl -0x68(%ebp) 10c9ac: 8b 45 94 mov -0x6c(%ebp),%eax 10c9af: f7 e9 imul %ecx 10c9b1: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c9b7: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9bd: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c9c3: c1 f8 06 sar $0x6,%eax 10c9c6: 8b 55 94 mov -0x6c(%ebp),%edx 10c9c9: c1 fa 1f sar $0x1f,%edx 10c9cc: 29 d0 sub %edx,%eax 10c9ce: 50 push %eax 10c9cf: ff 75 90 pushl -0x70(%ebp) 10c9d2: 68 d4 37 12 00 push $0x1237d4 10c9d7: 56 push %esi 10c9d8: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c9db: 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); 10c9de: 83 c4 2c add $0x2c,%esp 10c9e1: 8d 55 d8 lea -0x28(%ebp),%edx 10c9e4: 52 push %edx 10c9e5: ff 75 88 pushl -0x78(%ebp) 10c9e8: 8d 45 b8 lea -0x48(%ebp),%eax 10c9eb: 50 push %eax 10c9ec: e8 cb 34 00 00 call 10febc <_Timespec_Divide_by_integer> (*print)( context, 10c9f1: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c9f4: 8b 45 dc mov -0x24(%ebp),%eax 10c9f7: f7 e9 imul %ecx 10c9f9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9ff: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca05: c1 f8 06 sar $0x6,%eax 10ca08: 8b 55 dc mov -0x24(%ebp),%edx 10ca0b: c1 fa 1f sar $0x1f,%edx 10ca0e: 29 d0 sub %edx,%eax 10ca10: 50 push %eax 10ca11: ff 75 d8 pushl -0x28(%ebp) 10ca14: 8b 45 b4 mov -0x4c(%ebp),%eax 10ca17: f7 e9 imul %ecx 10ca19: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10ca1f: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca25: c1 f8 06 sar $0x6,%eax 10ca28: 8b 55 b4 mov -0x4c(%ebp),%edx 10ca2b: c1 fa 1f sar $0x1f,%edx 10ca2e: 29 d0 sub %edx,%eax 10ca30: 50 push %eax 10ca31: ff 75 b0 pushl -0x50(%ebp) 10ca34: 8b 45 ac mov -0x54(%ebp),%eax 10ca37: f7 e9 imul %ecx 10ca39: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10ca3f: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10ca45: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca4b: c1 f8 06 sar $0x6,%eax 10ca4e: 8b 55 ac mov -0x54(%ebp),%edx 10ca51: c1 fa 1f sar $0x1f,%edx 10ca54: 29 d0 sub %edx,%eax 10ca56: 50 push %eax 10ca57: ff 75 a8 pushl -0x58(%ebp) 10ca5a: 68 f4 37 12 00 push $0x1237f4 10ca5f: 56 push %esi 10ca60: ff 55 0c call *0xc(%ebp) 10ca63: 83 c4 30 add $0x30,%esp 10ca66: e9 75 fe ff ff jmp 10c8e0 =============================================================================== 0010ca84 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10ca84: 55 push %ebp 10ca85: 89 e5 mov %esp,%ebp 10ca87: 53 push %ebx 10ca88: 83 ec 04 sub $0x4,%esp 10ca8b: a1 b4 a9 12 00 mov 0x12a9b4,%eax 10ca90: 40 inc %eax 10ca91: a3 b4 a9 12 00 mov %eax,0x12a9b4 /* * 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 ; 10ca96: 8b 1d c8 a8 12 00 mov 0x12a8c8,%ebx 10ca9c: 3b 1d cc a8 12 00 cmp 0x12a8cc,%ebx 10caa2: 77 15 ja 10cab9 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10caa4: 83 ec 0c sub $0xc,%esp 10caa7: 53 push %ebx 10caa8: e8 17 00 00 00 call 10cac4 * 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++ ) { 10caad: 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 ; 10caae: 83 c4 10 add $0x10,%esp 10cab1: 39 1d cc a8 12 00 cmp %ebx,0x12a8cc 10cab7: 73 eb jae 10caa4 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10cab9: 8b 5d fc mov -0x4(%ebp),%ebx 10cabc: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10cabd: e9 76 26 00 00 jmp 10f138 <_Thread_Enable_dispatch> =============================================================================== 0010cac4 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10cac4: 55 push %ebp 10cac5: 89 e5 mov %esp,%ebp 10cac7: 57 push %edi 10cac8: 53 push %ebx 10cac9: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10cacc: 8d 45 f4 lea -0xc(%ebp),%eax 10cacf: 50 push %eax 10cad0: ff 75 08 pushl 0x8(%ebp) 10cad3: 68 c0 a8 12 00 push $0x12a8c0 10cad8: e8 cb 1d 00 00 call 10e8a8 <_Objects_Get> 10cadd: 89 c2 mov %eax,%edx switch ( location ) { 10cadf: 83 c4 10 add $0x10,%esp 10cae2: 8b 45 f4 mov -0xc(%ebp),%eax 10cae5: 85 c0 test %eax,%eax 10cae7: 75 3b jne 10cb24 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10cae9: 8d 5a 54 lea 0x54(%edx),%ebx 10caec: b9 38 00 00 00 mov $0x38,%ecx 10caf1: 31 c0 xor %eax,%eax 10caf3: 89 df mov %ebx,%edi 10caf5: f3 aa rep stos %al,%es:(%edi) 10caf7: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10cafe: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10cb05: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10cb0c: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10cb13: e8 20 26 00 00 call 10f138 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cb18: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb1a: 8d 65 f8 lea -0x8(%ebp),%esp 10cb1d: 5b pop %ebx 10cb1e: 5f pop %edi 10cb1f: c9 leave 10cb20: c3 ret 10cb21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10cb24: b8 04 00 00 00 mov $0x4,%eax } 10cb29: 8d 65 f8 lea -0x8(%ebp),%esp 10cb2c: 5b pop %ebx 10cb2d: 5f pop %edi 10cb2e: c9 leave 10cb2f: c3 ret =============================================================================== 00117360 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117360: 55 push %ebp 117361: 89 e5 mov %esp,%ebp 117363: 57 push %edi 117364: 56 push %esi 117365: 53 push %ebx 117366: 83 ec 1c sub $0x1c,%esp 117369: 8b 75 08 mov 0x8(%ebp),%esi 11736c: 8b 5d 0c mov 0xc(%ebp),%ebx 11736f: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117372: 85 f6 test %esi,%esi 117374: 0f 84 92 00 00 00 je 11740c return RTEMS_INVALID_NAME; if ( !starting_address ) 11737a: 85 db test %ebx,%ebx 11737c: 74 09 je 117387 return RTEMS_INVALID_ADDRESS; if ( !id ) 11737e: 85 ff test %edi,%edi 117380: 74 05 je 117387 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 117382: f6 c3 03 test $0x3,%bl 117385: 74 0d je 117394 return RTEMS_INVALID_ADDRESS; 117387: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 11738c: 8d 65 f4 lea -0xc(%ebp),%esp 11738f: 5b pop %ebx 117390: 5e pop %esi 117391: 5f pop %edi 117392: c9 leave 117393: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117394: 83 ec 0c sub $0xc,%esp 117397: ff 35 44 24 14 00 pushl 0x142444 11739d: e8 f2 24 00 00 call 119894 <_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 ); 1173a2: c7 04 24 a0 22 14 00 movl $0x1422a0,(%esp) 1173a9: e8 fa 3a 00 00 call 11aea8 <_Objects_Allocate> 1173ae: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 1173b0: 83 c4 10 add $0x10,%esp 1173b3: 85 c0 test %eax,%eax 1173b5: 74 65 je 11741c return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 1173b7: ff 75 14 pushl 0x14(%ebp) 1173ba: ff 75 10 pushl 0x10(%ebp) 1173bd: 53 push %ebx 1173be: 8d 40 68 lea 0x68(%eax),%eax 1173c1: 50 push %eax 1173c2: 89 55 e4 mov %edx,-0x1c(%ebp) 1173c5: e8 f6 35 00 00 call 11a9c0 <_Heap_Initialize> 1173ca: 8b 55 e4 mov -0x1c(%ebp),%edx 1173cd: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 1173d0: 83 c4 10 add $0x10,%esp 1173d3: 85 c0 test %eax,%eax 1173d5: 75 4d jne 117424 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1173d7: 83 ec 08 sub $0x8,%esp 1173da: 52 push %edx 1173db: 68 a0 22 14 00 push $0x1422a0 1173e0: e8 3b 3e 00 00 call 11b220 <_Objects_Free> 1173e5: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 1173e8: b8 08 00 00 00 mov $0x8,%eax *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 1173ed: 83 ec 0c sub $0xc,%esp 1173f0: ff 35 44 24 14 00 pushl 0x142444 1173f6: 89 45 e4 mov %eax,-0x1c(%ebp) 1173f9: e8 de 24 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; 1173fe: 83 c4 10 add $0x10,%esp 117401: 8b 45 e4 mov -0x1c(%ebp),%eax } 117404: 8d 65 f4 lea -0xc(%ebp),%esp 117407: 5b pop %ebx 117408: 5e pop %esi 117409: 5f pop %edi 11740a: c9 leave 11740b: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11740c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117411: 8d 65 f4 lea -0xc(%ebp),%esp 117414: 5b pop %ebx 117415: 5e pop %esi 117416: 5f pop %edi 117417: c9 leave 117418: c3 ret 117419: 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; 11741c: b8 05 00 00 00 mov $0x5,%eax 117421: eb ca jmp 1173ed 117423: 90 nop <== NOT EXECUTED return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117424: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 117427: 8b 45 10 mov 0x10(%ebp),%eax 11742a: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 11742d: 8b 45 14 mov 0x14(%ebp),%eax 117430: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 117433: 8b 45 18 mov 0x18(%ebp),%eax 117436: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 117439: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 117440: 6a 06 push $0x6 117442: 6a 40 push $0x40 117444: a8 04 test $0x4,%al 117446: 0f 95 c0 setne %al 117449: 0f b6 c0 movzbl %al,%eax 11744c: 50 push %eax 11744d: 8d 42 10 lea 0x10(%edx),%eax 117450: 50 push %eax 117451: 89 55 e4 mov %edx,-0x1c(%ebp) 117454: e8 43 4f 00 00 call 11c39c <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 117459: 8b 55 e4 mov -0x1c(%ebp),%edx 11745c: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 11745f: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 117462: 8b 0d bc 22 14 00 mov 0x1422bc,%ecx 117468: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11746b: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 11746e: 89 07 mov %eax,(%edi) 117470: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 117473: 31 c0 xor %eax,%eax 117475: e9 73 ff ff ff jmp 1173ed =============================================================================== 0011747c : */ rtems_status_code rtems_region_delete( rtems_id id ) { 11747c: 55 push %ebp 11747d: 89 e5 mov %esp,%ebp 11747f: 53 push %ebx 117480: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117483: ff 35 44 24 14 00 pushl 0x142444 117489: e8 06 24 00 00 call 119894 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11748e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117491: 8d 45 f4 lea -0xc(%ebp),%eax 117494: 50 push %eax 117495: ff 75 08 pushl 0x8(%ebp) 117498: 68 a0 22 14 00 push $0x1422a0 11749d: e8 b6 3e 00 00 call 11b358 <_Objects_Get_no_protection> switch ( location ) { 1174a2: 83 c4 10 add $0x10,%esp 1174a5: 8b 5d f4 mov -0xc(%ebp),%ebx 1174a8: 85 db test %ebx,%ebx 1174aa: 74 1c je 1174c8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1174ac: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1174b1: 83 ec 0c sub $0xc,%esp 1174b4: ff 35 44 24 14 00 pushl 0x142444 1174ba: e8 1d 24 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; } 1174bf: 89 d8 mov %ebx,%eax 1174c1: 8b 5d fc mov -0x4(%ebp),%ebx 1174c4: c9 leave 1174c5: c3 ret 1174c6: 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 ) 1174c8: 8b 48 64 mov 0x64(%eax),%ecx 1174cb: 85 c9 test %ecx,%ecx 1174cd: 74 09 je 1174d8 return_status = RTEMS_RESOURCE_IN_USE; 1174cf: bb 0c 00 00 00 mov $0xc,%ebx 1174d4: eb db jmp 1174b1 1174d6: 66 90 xchg %ax,%ax <== NOT EXECUTED else { _Objects_Close( &_Region_Information, &the_region->Object ); 1174d8: 83 ec 08 sub $0x8,%esp 1174db: 50 push %eax 1174dc: 68 a0 22 14 00 push $0x1422a0 1174e1: 89 45 e4 mov %eax,-0x1c(%ebp) 1174e4: e8 3b 3a 00 00 call 11af24 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1174e9: 58 pop %eax 1174ea: 5a pop %edx 1174eb: 8b 45 e4 mov -0x1c(%ebp),%eax 1174ee: 50 push %eax 1174ef: 68 a0 22 14 00 push $0x1422a0 1174f4: e8 27 3d 00 00 call 11b220 <_Objects_Free> 1174f9: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 1174fc: 31 db xor %ebx,%ebx 1174fe: eb b1 jmp 1174b1 =============================================================================== 00117500 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117500: 55 push %ebp 117501: 89 e5 mov %esp,%ebp 117503: 56 push %esi 117504: 53 push %ebx 117505: 83 ec 10 sub $0x10,%esp 117508: 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 ) 11750b: 85 db test %ebx,%ebx 11750d: 74 75 je 117584 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 11750f: 83 ec 0c sub $0xc,%esp 117512: ff 35 44 24 14 00 pushl 0x142444 117518: e8 77 23 00 00 call 119894 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11751d: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117520: 8d 45 f0 lea -0x10(%ebp),%eax 117523: 50 push %eax 117524: ff 75 08 pushl 0x8(%ebp) 117527: 68 a0 22 14 00 push $0x1422a0 11752c: e8 27 3e 00 00 call 11b358 <_Objects_Get_no_protection> 117531: 89 c6 mov %eax,%esi switch ( location ) { 117533: 83 c4 10 add $0x10,%esp 117536: 8b 45 f0 mov -0x10(%ebp),%eax 117539: 85 c0 test %eax,%eax 11753b: 74 1f je 11755c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11753d: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117542: 83 ec 0c sub $0xc,%esp 117545: ff 35 44 24 14 00 pushl 0x142444 11754b: e8 8c 23 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; 117550: 83 c4 10 add $0x10,%esp } 117553: 89 d8 mov %ebx,%eax 117555: 8d 65 f8 lea -0x8(%ebp),%esp 117558: 5b pop %ebx 117559: 5e pop %esi 11755a: c9 leave 11755b: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 11755c: 8d 45 f4 lea -0xc(%ebp),%eax 11755f: 50 push %eax 117560: ff 75 10 pushl 0x10(%ebp) 117563: 53 push %ebx 117564: 8d 46 68 lea 0x68(%esi),%eax 117567: 50 push %eax 117568: e8 5f 2f 00 00 call 11a4cc <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 11756d: 83 c4 10 add $0x10,%esp 117570: 84 c0 test %al,%al 117572: 74 20 je 117594 the_region->length += amount_extended; 117574: 8b 45 f4 mov -0xc(%ebp),%eax 117577: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 11757a: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 11757d: 31 db xor %ebx,%ebx 11757f: eb c1 jmp 117542 117581: 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; 117584: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117589: 89 d8 mov %ebx,%eax 11758b: 8d 65 f8 lea -0x8(%ebp),%esp 11758e: 5b pop %ebx 11758f: 5e pop %esi 117590: c9 leave 117591: c3 ret 117592: 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; 117594: bb 09 00 00 00 mov $0x9,%ebx 117599: eb a7 jmp 117542 =============================================================================== 0011759c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 11759c: 55 push %ebp 11759d: 89 e5 mov %esp,%ebp 11759f: 53 push %ebx 1175a0: 83 ec 14 sub $0x14,%esp 1175a3: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1175a6: 85 db test %ebx,%ebx 1175a8: 74 76 je 117620 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1175aa: 83 ec 0c sub $0xc,%esp 1175ad: ff 35 44 24 14 00 pushl 0x142444 1175b3: e8 dc 22 00 00 call 119894 <_API_Mutex_Lock> 1175b8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1175bb: 8d 45 f4 lea -0xc(%ebp),%eax 1175be: 50 push %eax 1175bf: ff 75 08 pushl 0x8(%ebp) 1175c2: 68 a0 22 14 00 push $0x1422a0 1175c7: e8 8c 3d 00 00 call 11b358 <_Objects_Get_no_protection> switch ( location ) { 1175cc: 83 c4 10 add $0x10,%esp 1175cf: 8b 55 f4 mov -0xc(%ebp),%edx 1175d2: 85 d2 test %edx,%edx 1175d4: 74 1e je 1175f4 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1175d6: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1175db: 83 ec 0c sub $0xc,%esp 1175de: ff 35 44 24 14 00 pushl 0x142444 1175e4: e8 f3 22 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; 1175e9: 83 c4 10 add $0x10,%esp } 1175ec: 89 d8 mov %ebx,%eax 1175ee: 8b 5d fc mov -0x4(%ebp),%ebx 1175f1: c9 leave 1175f2: c3 ret 1175f3: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1175f4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1175fb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 117602: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117609: 83 ec 08 sub $0x8,%esp 11760c: 53 push %ebx 11760d: 83 c0 68 add $0x68,%eax 117610: 50 push %eax 117611: e8 92 32 00 00 call 11a8a8 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 117616: 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; 117619: 31 db xor %ebx,%ebx break; 11761b: eb be jmp 1175db 11761d: 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; 117620: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117625: 89 d8 mov %ebx,%eax 117627: 8b 5d fc mov -0x4(%ebp),%ebx 11762a: c9 leave 11762b: c3 ret =============================================================================== 0011762c : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 11762c: 55 push %ebp 11762d: 89 e5 mov %esp,%ebp 11762f: 53 push %ebx 117630: 83 ec 14 sub $0x14,%esp 117633: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117636: 85 db test %ebx,%ebx 117638: 74 5e je 117698 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11763a: 83 ec 0c sub $0xc,%esp 11763d: ff 35 44 24 14 00 pushl 0x142444 117643: e8 4c 22 00 00 call 119894 <_API_Mutex_Lock> 117648: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11764b: 8d 45 f4 lea -0xc(%ebp),%eax 11764e: 50 push %eax 11764f: ff 75 08 pushl 0x8(%ebp) 117652: 68 a0 22 14 00 push $0x1422a0 117657: e8 fc 3c 00 00 call 11b358 <_Objects_Get_no_protection> switch ( location ) { 11765c: 83 c4 10 add $0x10,%esp 11765f: 8b 55 f4 mov -0xc(%ebp),%edx 117662: 85 d2 test %edx,%edx 117664: 74 1e je 117684 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117666: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11766b: 83 ec 0c sub $0xc,%esp 11766e: ff 35 44 24 14 00 pushl 0x142444 117674: e8 63 22 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; 117679: 83 c4 10 add $0x10,%esp } 11767c: 89 d8 mov %ebx,%eax 11767e: 8b 5d fc mov -0x4(%ebp),%ebx 117681: c9 leave 117682: c3 ret 117683: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 117684: 83 ec 08 sub $0x8,%esp 117687: 53 push %ebx 117688: 83 c0 68 add $0x68,%eax 11768b: 50 push %eax 11768c: e8 77 32 00 00 call 11a908 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 117691: 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; 117694: 31 db xor %ebx,%ebx break; 117696: eb d3 jmp 11766b Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 117698: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11769d: 89 d8 mov %ebx,%eax 11769f: 8b 5d fc mov -0x4(%ebp),%ebx 1176a2: c9 leave 1176a3: c3 ret =============================================================================== 001176a4 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 1176a4: 55 push %ebp 1176a5: 89 e5 mov %esp,%ebp 1176a7: 57 push %edi 1176a8: 56 push %esi 1176a9: 53 push %ebx 1176aa: 83 ec 2c sub $0x2c,%esp 1176ad: 8b 75 0c mov 0xc(%ebp),%esi 1176b0: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1176b3: 85 db test %ebx,%ebx 1176b5: 0f 84 a1 00 00 00 je 11775c return RTEMS_INVALID_ADDRESS; *segment = NULL; 1176bb: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 1176c1: 85 f6 test %esi,%esi 1176c3: 75 0f jne 1176d4 return RTEMS_INVALID_SIZE; 1176c5: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1176ca: 8d 65 f4 lea -0xc(%ebp),%esp 1176cd: 5b pop %ebx 1176ce: 5e pop %esi 1176cf: 5f pop %edi 1176d0: c9 leave 1176d1: c3 ret 1176d2: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 1176d4: 83 ec 0c sub $0xc,%esp 1176d7: ff 35 44 24 14 00 pushl 0x142444 1176dd: e8 b2 21 00 00 call 119894 <_API_Mutex_Lock> executing = _Thread_Executing; 1176e2: a1 58 29 14 00 mov 0x142958,%eax 1176e7: 89 45 d4 mov %eax,-0x2c(%ebp) 1176ea: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1176ed: 8d 45 e4 lea -0x1c(%ebp),%eax 1176f0: 50 push %eax 1176f1: ff 75 08 pushl 0x8(%ebp) 1176f4: 68 a0 22 14 00 push $0x1422a0 1176f9: e8 5a 3c 00 00 call 11b358 <_Objects_Get_no_protection> 1176fe: 89 c7 mov %eax,%edi switch ( location ) { 117700: 83 c4 10 add $0x10,%esp 117703: 8b 45 e4 mov -0x1c(%ebp),%eax 117706: 85 c0 test %eax,%eax 117708: 75 2a jne 117734 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 11770a: 3b 77 5c cmp 0x5c(%edi),%esi 11770d: 76 2d jbe 11773c return_status = RTEMS_INVALID_SIZE; 11770f: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117714: 83 ec 0c sub $0xc,%esp 117717: ff 35 44 24 14 00 pushl 0x142444 11771d: 89 45 d0 mov %eax,-0x30(%ebp) 117720: e8 b7 21 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; 117725: 83 c4 10 add $0x10,%esp 117728: 8b 45 d0 mov -0x30(%ebp),%eax } 11772b: 8d 65 f4 lea -0xc(%ebp),%esp 11772e: 5b pop %ebx 11772f: 5e pop %esi 117730: 5f pop %edi 117731: c9 leave 117732: c3 ret 117733: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117734: b8 04 00 00 00 mov $0x4,%eax 117739: eb d9 jmp 117714 11773b: 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 ); 11773c: 6a 00 push $0x0 11773e: 6a 00 push $0x0 117740: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117741: 8d 47 68 lea 0x68(%edi),%eax 117744: 50 push %eax 117745: e8 ba 2b 00 00 call 11a304 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 11774a: 83 c4 10 add $0x10,%esp 11774d: 85 c0 test %eax,%eax 11774f: 74 17 je 117768 the_region->number_of_used_blocks += 1; 117751: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117754: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 117756: 31 c0 xor %eax,%eax 117758: eb ba jmp 117714 11775a: 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; 11775c: b8 09 00 00 00 mov $0x9,%eax 117761: e9 64 ff ff ff jmp 1176ca 117766: 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 ) ) { 117768: f6 45 10 01 testb $0x1,0x10(%ebp) 11776c: 74 07 je 117775 return_status = RTEMS_UNSATISFIED; 11776e: b8 0d 00 00 00 mov $0xd,%eax 117773: eb 9f jmp 117714 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117775: a1 94 23 14 00 mov 0x142394,%eax 11777a: 40 inc %eax 11777b: a3 94 23 14 00 mov %eax,0x142394 * 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(); 117780: 83 ec 0c sub $0xc,%esp 117783: ff 35 44 24 14 00 pushl 0x142444 117789: e8 4e 21 00 00 call 1198dc <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 11778e: 8d 47 10 lea 0x10(%edi),%eax 117791: 8b 55 d4 mov -0x2c(%ebp),%edx 117794: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 117797: 8b 4d 08 mov 0x8(%ebp),%ecx 11779a: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 11779d: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 1177a0: 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; 1177a3: 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 ); 1177aa: 83 c4 0c add $0xc,%esp 1177ad: 68 60 c4 11 00 push $0x11c460 1177b2: ff 75 14 pushl 0x14(%ebp) 1177b5: 50 push %eax 1177b6: e8 55 49 00 00 call 11c110 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 1177bb: e8 64 44 00 00 call 11bc24 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 1177c0: 8b 55 d4 mov -0x2c(%ebp),%edx 1177c3: 8b 42 34 mov 0x34(%edx),%eax 1177c6: 83 c4 10 add $0x10,%esp 1177c9: e9 fc fe ff ff jmp 1176ca =============================================================================== 001177d0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 1177d0: 55 push %ebp 1177d1: 89 e5 mov %esp,%ebp 1177d3: 56 push %esi 1177d4: 53 push %ebx 1177d5: 83 ec 20 sub $0x20,%esp 1177d8: 8b 5d 0c mov 0xc(%ebp),%ebx 1177db: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 1177de: 85 db test %ebx,%ebx 1177e0: 74 72 je 117854 return RTEMS_INVALID_ADDRESS; if ( !size ) 1177e2: 85 f6 test %esi,%esi 1177e4: 74 6e je 117854 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1177e6: 83 ec 0c sub $0xc,%esp 1177e9: ff 35 44 24 14 00 pushl 0x142444 1177ef: e8 a0 20 00 00 call 119894 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1177f4: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1177f7: 8d 45 f4 lea -0xc(%ebp),%eax 1177fa: 50 push %eax 1177fb: ff 75 08 pushl 0x8(%ebp) 1177fe: 68 a0 22 14 00 push $0x1422a0 117803: e8 50 3b 00 00 call 11b358 <_Objects_Get_no_protection> switch ( location ) { 117808: 83 c4 10 add $0x10,%esp 11780b: 8b 55 f4 mov -0xc(%ebp),%edx 11780e: 85 d2 test %edx,%edx 117810: 74 2a je 11783c void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 117812: 31 c0 xor %eax,%eax 117814: 83 fa 01 cmp $0x1,%edx 117817: 0f 94 c0 sete %al 11781a: c1 e0 02 shl $0x2,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11781d: 83 ec 0c sub $0xc,%esp 117820: ff 35 44 24 14 00 pushl 0x142444 117826: 89 45 e4 mov %eax,-0x1c(%ebp) 117829: e8 ae 20 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; 11782e: 83 c4 10 add $0x10,%esp 117831: 8b 45 e4 mov -0x1c(%ebp),%eax } 117834: 8d 65 f8 lea -0x8(%ebp),%esp 117837: 5b pop %ebx 117838: 5e pop %esi 117839: c9 leave 11783a: c3 ret 11783b: 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 ) ) 11783c: 52 push %edx 11783d: 56 push %esi 11783e: 53 push %ebx 11783f: 83 c0 68 add $0x68,%eax 117842: 50 push %eax 117843: e8 7c 35 00 00 call 11adc4 <_Heap_Size_of_alloc_area> 117848: 83 c4 10 add $0x10,%esp void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 11784b: 3c 01 cmp $0x1,%al 11784d: 19 c0 sbb %eax,%eax 11784f: 83 e0 09 and $0x9,%eax 117852: eb c9 jmp 11781d if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 117854: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117859: 8d 65 f8 lea -0x8(%ebp),%esp 11785c: 5b pop %ebx 11785d: 5e pop %esi 11785e: c9 leave 11785f: c3 ret =============================================================================== 00117884 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117884: 55 push %ebp 117885: 89 e5 mov %esp,%ebp 117887: 56 push %esi 117888: 53 push %ebx 117889: 83 ec 20 sub $0x20,%esp 11788c: 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 ) 11788f: 85 db test %ebx,%ebx 117891: 0f 84 89 00 00 00 je 117920 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117897: 83 ec 0c sub $0xc,%esp 11789a: ff 35 44 24 14 00 pushl 0x142444 1178a0: e8 ef 1f 00 00 call 119894 <_API_Mutex_Lock> 1178a5: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1178a8: 8d 45 f0 lea -0x10(%ebp),%eax 1178ab: 50 push %eax 1178ac: ff 75 08 pushl 0x8(%ebp) 1178af: 68 a0 22 14 00 push $0x1422a0 1178b4: e8 9f 3a 00 00 call 11b358 <_Objects_Get_no_protection> 1178b9: 89 c6 mov %eax,%esi switch ( location ) { 1178bb: 83 c4 10 add $0x10,%esp 1178be: 8b 45 f0 mov -0x10(%ebp),%eax 1178c1: 85 c0 test %eax,%eax 1178c3: 74 1f je 1178e4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1178c5: 83 ec 0c sub $0xc,%esp 1178c8: ff 35 44 24 14 00 pushl 0x142444 1178ce: e8 09 20 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; 1178d3: 83 c4 10 add $0x10,%esp 1178d6: b8 04 00 00 00 mov $0x4,%eax } 1178db: 8d 65 f8 lea -0x8(%ebp),%esp 1178de: 5b pop %ebx 1178df: 5e pop %esi 1178e0: c9 leave 1178e1: c3 ret 1178e2: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1178e4: 83 ec 0c sub $0xc,%esp 1178e7: 8d 45 f4 lea -0xc(%ebp),%eax 1178ea: 50 push %eax 1178eb: 8d 45 ec lea -0x14(%ebp),%eax 1178ee: 50 push %eax 1178ef: ff 75 10 pushl 0x10(%ebp) 1178f2: ff 75 0c pushl 0xc(%ebp) 1178f5: 8d 46 68 lea 0x68(%esi),%eax 1178f8: 50 push %eax 1178f9: e8 be 33 00 00 call 11acbc <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1178fe: 8b 55 ec mov -0x14(%ebp),%edx 117901: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 117903: 83 c4 20 add $0x20,%esp 117906: 85 c0 test %eax,%eax 117908: 75 22 jne 11792c _Region_Process_queue( the_region ); /* unlocks allocator */ 11790a: 83 ec 0c sub $0xc,%esp 11790d: 56 push %esi 11790e: e8 2d 7c 00 00 call 11f540 <_Region_Process_queue> 117913: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 117916: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117918: 8d 65 f8 lea -0x8(%ebp),%esp 11791b: 5b pop %ebx 11791c: 5e pop %esi 11791d: c9 leave 11791e: c3 ret 11791f: 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; 117920: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117925: 8d 65 f8 lea -0x8(%ebp),%esp 117928: 5b pop %ebx 117929: 5e pop %esi 11792a: c9 leave 11792b: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 11792c: 83 ec 0c sub $0xc,%esp 11792f: ff 35 44 24 14 00 pushl 0x142444 117935: 89 45 e4 mov %eax,-0x1c(%ebp) 117938: e8 9f 1f 00 00 call 1198dc <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 11793d: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117940: 8b 45 e4 mov -0x1c(%ebp),%eax 117943: 48 dec %eax 117944: 0f 94 c0 sete %al 117947: 0f b6 c0 movzbl %al,%eax 11794a: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117951: 8d 65 f8 lea -0x8(%ebp),%esp 117954: 5b pop %ebx 117955: 5e pop %esi 117956: c9 leave 117957: c3 ret =============================================================================== 00117958 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 117958: 55 push %ebp 117959: 89 e5 mov %esp,%ebp 11795b: 53 push %ebx 11795c: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11795f: ff 35 44 24 14 00 pushl 0x142444 117965: e8 2a 1f 00 00 call 119894 <_API_Mutex_Lock> 11796a: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11796d: 8d 45 f4 lea -0xc(%ebp),%eax 117970: 50 push %eax 117971: ff 75 08 pushl 0x8(%ebp) 117974: 68 a0 22 14 00 push $0x1422a0 117979: e8 da 39 00 00 call 11b358 <_Objects_Get_no_protection> 11797e: 89 c3 mov %eax,%ebx switch ( location ) { 117980: 83 c4 10 add $0x10,%esp 117983: 8b 45 f4 mov -0xc(%ebp),%eax 117986: 85 c0 test %eax,%eax 117988: 75 1e jne 1179a8 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11798a: 83 ec 08 sub $0x8,%esp 11798d: ff 75 0c pushl 0xc(%ebp) 117990: 8d 43 68 lea 0x68(%ebx),%eax 117993: 50 push %eax 117994: e8 bf 2d 00 00 call 11a758 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 117999: 83 c4 10 add $0x10,%esp 11799c: 84 c0 test %al,%al 11799e: 75 28 jne 1179c8 return_status = RTEMS_INVALID_ADDRESS; 1179a0: bb 09 00 00 00 mov $0x9,%ebx 1179a5: eb 06 jmp 1179ad 1179a7: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1179a8: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1179ad: 83 ec 0c sub $0xc,%esp 1179b0: ff 35 44 24 14 00 pushl 0x142444 1179b6: e8 21 1f 00 00 call 1198dc <_API_Mutex_Unlock> return return_status; 1179bb: 83 c4 10 add $0x10,%esp } 1179be: 89 d8 mov %ebx,%eax 1179c0: 8b 5d fc mov -0x4(%ebp),%ebx 1179c3: c9 leave 1179c4: c3 ret 1179c5: 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; 1179c8: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 1179cb: 83 ec 0c sub $0xc,%esp 1179ce: 53 push %ebx 1179cf: e8 6c 7b 00 00 call 11f540 <_Region_Process_queue> return RTEMS_SUCCESSFUL; 1179d4: 83 c4 10 add $0x10,%esp 1179d7: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1179d9: 89 d8 mov %ebx,%eax 1179db: 8b 5d fc mov -0x4(%ebp),%ebx 1179de: c9 leave 1179df: c3 ret =============================================================================== 0010b4bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b4bc: 55 push %ebp 10b4bd: 89 e5 mov %esp,%ebp 10b4bf: 57 push %edi 10b4c0: 56 push %esi 10b4c1: 53 push %ebx 10b4c2: 83 ec 3c sub $0x3c,%esp 10b4c5: 8b 75 08 mov 0x8(%ebp),%esi 10b4c8: 8b 5d 10 mov 0x10(%ebp),%ebx 10b4cb: 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 ) ) 10b4ce: 85 f6 test %esi,%esi 10b4d0: 74 4a je 10b51c return RTEMS_INVALID_NAME; if ( !id ) 10b4d2: 85 ff test %edi,%edi 10b4d4: 0f 84 f6 00 00 00 je 10b5d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b4da: 89 da mov %ebx,%edx 10b4dc: 81 e2 c0 00 00 00 and $0xc0,%edx 10b4e2: 74 48 je 10b52c */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b4e4: 89 d8 mov %ebx,%eax 10b4e6: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b4e9: 83 f8 10 cmp $0x10,%eax 10b4ec: 74 0e je 10b4fc } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b4ee: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b4f3: 8d 65 f4 lea -0xc(%ebp),%esp 10b4f6: 5b pop %ebx 10b4f7: 5e pop %esi 10b4f8: 5f pop %edi 10b4f9: c9 leave 10b4fa: c3 ret 10b4fb: 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 ) && 10b4fc: f6 c3 04 test $0x4,%bl 10b4ff: 74 ed je 10b4ee _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b501: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b507: 74 e5 je 10b4ee 10b509: 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 ) ) 10b50e: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b512: 76 1f jbe 10b533 return RTEMS_INVALID_NUMBER; 10b514: b8 0a 00 00 00 mov $0xa,%eax 10b519: eb d8 jmp 10b4f3 10b51b: 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; 10b51c: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b521: 8d 65 f4 lea -0xc(%ebp),%esp 10b524: 5b pop %ebx 10b525: 5e pop %esi 10b526: 5f pop %edi 10b527: c9 leave 10b528: c3 ret 10b529: 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 ) ) 10b52c: 89 d9 mov %ebx,%ecx 10b52e: 83 e1 30 and $0x30,%ecx 10b531: 75 db jne 10b50e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b533: a1 d4 73 12 00 mov 0x1273d4,%eax 10b538: 40 inc %eax 10b539: a3 d4 73 12 00 mov %eax,0x1273d4 * 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 ); 10b53e: 83 ec 0c sub $0xc,%esp 10b541: 68 20 73 12 00 push $0x127320 10b546: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b549: e8 ae 14 00 00 call 10c9fc <_Objects_Allocate> 10b54e: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b550: 83 c4 10 add $0x10,%esp 10b553: 85 c0 test %eax,%eax 10b555: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b558: 0f 84 ba 00 00 00 je 10b618 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b55e: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b561: 85 c9 test %ecx,%ecx 10b563: 74 77 je 10b5dc /* * 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; 10b565: 31 c0 xor %eax,%eax 10b567: f6 c3 04 test $0x4,%bl 10b56a: 0f 95 c0 setne %al 10b56d: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b570: 83 f9 10 cmp $0x10,%ecx 10b573: 0f 84 ae 00 00 00 je 10b627 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; 10b579: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b580: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b584: 50 push %eax 10b585: 31 c0 xor %eax,%eax 10b587: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b58b: 0f 94 c0 sete %al 10b58e: 50 push %eax 10b58f: 8d 45 d0 lea -0x30(%ebp),%eax 10b592: 50 push %eax 10b593: 8d 42 14 lea 0x14(%edx),%eax 10b596: 50 push %eax 10b597: 89 55 c4 mov %edx,-0x3c(%ebp) 10b59a: e8 59 0c 00 00 call 10c1f8 <_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 ) { 10b59f: 83 c4 10 add $0x10,%esp 10b5a2: 83 f8 06 cmp $0x6,%eax 10b5a5: 8b 55 c4 mov -0x3c(%ebp),%edx 10b5a8: 0f 84 a9 00 00 00 je 10b657 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b5ae: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b5b1: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b5b4: 8b 0d 3c 73 12 00 mov 0x12733c,%ecx 10b5ba: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b5bd: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b5c0: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b5c2: e8 75 21 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b5c7: 31 c0 xor %eax,%eax 10b5c9: e9 25 ff ff ff jmp 10b4f3 10b5ce: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b5d0: b8 09 00 00 00 mov $0x9,%eax 10b5d5: e9 19 ff ff ff jmp 10b4f3 10b5da: 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; 10b5dc: 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; 10b5e3: 31 c0 xor %eax,%eax 10b5e5: f6 c3 04 test $0x4,%bl 10b5e8: 0f 95 c0 setne %al 10b5eb: 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; 10b5ee: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b5f5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b5fc: 51 push %ecx 10b5fd: ff 75 0c pushl 0xc(%ebp) 10b600: 8d 45 e0 lea -0x20(%ebp),%eax 10b603: 50 push %eax 10b604: 8d 42 14 lea 0x14(%edx),%eax 10b607: 50 push %eax 10b608: 89 55 c4 mov %edx,-0x3c(%ebp) 10b60b: e8 78 0e 00 00 call 10c488 <_CORE_semaphore_Initialize> 10b610: 83 c4 10 add $0x10,%esp 10b613: 8b 55 c4 mov -0x3c(%ebp),%edx 10b616: eb 96 jmp 10b5ae _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b618: e8 1f 21 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b61d: b8 05 00 00 00 mov $0x5,%eax 10b622: e9 cc fe ff ff jmp 10b4f3 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; 10b627: 8b 45 14 mov 0x14(%ebp),%eax 10b62a: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b62d: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b634: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b638: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b63c: 0f 85 42 ff ff ff jne 10b584 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b642: f6 c3 40 test $0x40,%bl 10b645: 74 30 je 10b677 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b647: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b64e: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b652: e9 2d ff ff ff jmp 10b584 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b657: 83 ec 08 sub $0x8,%esp 10b65a: 52 push %edx 10b65b: 68 20 73 12 00 push $0x127320 10b660: e8 0f 17 00 00 call 10cd74 <_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(); 10b665: e8 d2 20 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b66a: 83 c4 10 add $0x10,%esp 10b66d: b8 13 00 00 00 mov $0x13,%eax 10b672: e9 7c fe ff ff jmp 10b4f3 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 ) ) { 10b677: 81 e3 80 00 00 00 and $0x80,%ebx 10b67d: 0f 84 01 ff ff ff je 10b584 <== NEVER TAKEN the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b683: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b68a: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b68e: e9 f1 fe ff ff jmp 10b584 =============================================================================== 0010b694 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b694: 55 push %ebp 10b695: 89 e5 mov %esp,%ebp 10b697: 53 push %ebx 10b698: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b69b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b69e: 50 push %eax 10b69f: ff 75 08 pushl 0x8(%ebp) 10b6a2: 68 20 73 12 00 push $0x127320 10b6a7: e8 00 18 00 00 call 10ceac <_Objects_Get> 10b6ac: 89 c3 mov %eax,%ebx switch ( location ) { 10b6ae: 83 c4 10 add $0x10,%esp 10b6b1: 8b 4d f4 mov -0xc(%ebp),%ecx 10b6b4: 85 c9 test %ecx,%ecx 10b6b6: 74 0c je 10b6c4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b6b8: b8 04 00 00 00 mov $0x4,%eax } 10b6bd: 8b 5d fc mov -0x4(%ebp),%ebx 10b6c0: c9 leave 10b6c1: c3 ret 10b6c2: 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); 10b6c4: 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) ) { 10b6c7: 83 e0 30 and $0x30,%eax 10b6ca: 74 58 je 10b724 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b6cc: 8b 53 64 mov 0x64(%ebx),%edx 10b6cf: 85 d2 test %edx,%edx 10b6d1: 75 15 jne 10b6e8 10b6d3: 83 f8 20 cmp $0x20,%eax 10b6d6: 74 10 je 10b6e8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b6d8: e8 5f 20 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b6dd: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6e2: 8b 5d fc mov -0x4(%ebp),%ebx 10b6e5: c9 leave 10b6e6: c3 ret 10b6e7: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b6e8: 50 push %eax 10b6e9: 6a 04 push $0x4 10b6eb: 6a 00 push $0x0 10b6ed: 8d 43 14 lea 0x14(%ebx),%eax 10b6f0: 50 push %eax 10b6f1: e8 f6 0a 00 00 call 10c1ec <_CORE_mutex_Flush> 10b6f6: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b6f9: 83 ec 08 sub $0x8,%esp 10b6fc: 53 push %ebx 10b6fd: 68 20 73 12 00 push $0x127320 10b702: e8 71 13 00 00 call 10ca78 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b707: 58 pop %eax 10b708: 5a pop %edx 10b709: 53 push %ebx 10b70a: 68 20 73 12 00 push $0x127320 10b70f: e8 60 16 00 00 call 10cd74 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b714: e8 23 20 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b719: 83 c4 10 add $0x10,%esp 10b71c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b71e: 8b 5d fc mov -0x4(%ebp),%ebx 10b721: c9 leave 10b722: c3 ret 10b723: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b724: 51 push %ecx 10b725: 6a 02 push $0x2 10b727: 6a 00 push $0x0 10b729: 8d 43 14 lea 0x14(%ebx),%eax 10b72c: 50 push %eax 10b72d: e8 4a 0d 00 00 call 10c47c <_CORE_semaphore_Flush> 10b732: 83 c4 10 add $0x10,%esp 10b735: eb c2 jmp 10b6f9 =============================================================================== 0010b738 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b738: 55 push %ebp 10b739: 89 e5 mov %esp,%ebp 10b73b: 57 push %edi 10b73c: 56 push %esi 10b73d: 53 push %ebx 10b73e: 83 ec 1c sub $0x1c,%esp 10b741: 8b 5d 08 mov 0x8(%ebp),%ebx 10b744: 8b 75 0c mov 0xc(%ebp),%esi 10b747: 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 ); 10b74a: 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 ); 10b74d: 50 push %eax 10b74e: 8d 45 e4 lea -0x1c(%ebp),%eax 10b751: 50 push %eax 10b752: 53 push %ebx 10b753: 68 20 73 12 00 push $0x127320 10b758: e8 f7 16 00 00 call 10ce54 <_Objects_Get_isr_disable> switch ( location ) { 10b75d: 83 c4 10 add $0x10,%esp 10b760: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b763: 85 c9 test %ecx,%ecx 10b765: 74 0d je 10b774 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b767: b8 04 00 00 00 mov $0x4,%eax } 10b76c: 8d 65 f4 lea -0xc(%ebp),%esp 10b76f: 5b pop %ebx 10b770: 5e pop %esi 10b771: 5f pop %edi 10b772: c9 leave 10b773: 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) ) { 10b774: f6 40 10 30 testb $0x30,0x10(%eax) 10b778: 74 36 je 10b7b0 _CORE_mutex_Seize( 10b77a: 83 ec 0c sub $0xc,%esp 10b77d: ff 75 e0 pushl -0x20(%ebp) 10b780: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b781: 83 e6 01 and $0x1,%esi 10b784: 83 f6 01 xor $0x1,%esi 10b787: 56 push %esi 10b788: 53 push %ebx 10b789: 83 c0 14 add $0x14,%eax 10b78c: 50 push %eax 10b78d: e8 5e 0b 00 00 call 10c2f0 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b792: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b795: a1 98 79 12 00 mov 0x127998,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b79a: ff 70 34 pushl 0x34(%eax) 10b79d: e8 12 01 00 00 call 10b8b4 <_Semaphore_Translate_core_mutex_return_code> 10b7a2: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b7a5: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a8: 5b pop %ebx 10b7a9: 5e pop %esi 10b7aa: 5f pop %edi 10b7ab: c9 leave 10b7ac: c3 ret 10b7ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b7b0: 8b 15 98 79 12 00 mov 0x127998,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b7b6: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b7bd: 8b 48 5c mov 0x5c(%eax),%ecx 10b7c0: 85 c9 test %ecx,%ecx 10b7c2: 75 2c jne 10b7f0 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b7c4: 83 e6 01 and $0x1,%esi 10b7c7: 74 33 je 10b7fc _ISR_Enable( *level_p ); 10b7c9: ff 75 e0 pushl -0x20(%ebp) 10b7cc: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b7cd: 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( 10b7d4: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b7d7: a1 98 79 12 00 mov 0x127998,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b7dc: ff 70 34 pushl 0x34(%eax) 10b7df: e8 e0 00 00 00 call 10b8c4 <_Semaphore_Translate_core_semaphore_return_code> 10b7e4: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b7e7: 8d 65 f4 lea -0xc(%ebp),%esp 10b7ea: 5b pop %ebx 10b7eb: 5e pop %esi 10b7ec: 5f pop %edi 10b7ed: c9 leave 10b7ee: c3 ret 10b7ef: 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; 10b7f0: 49 dec %ecx 10b7f1: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b7f4: ff 75 e0 pushl -0x20(%ebp) 10b7f7: 9d popf 10b7f8: eb da jmp 10b7d4 10b7fa: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b7fc: 8b 0d d4 73 12 00 mov 0x1273d4,%ecx 10b802: 41 inc %ecx 10b803: 89 0d d4 73 12 00 mov %ecx,0x1273d4 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; 10b809: 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; 10b810: 83 c0 14 add $0x14,%eax 10b813: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b816: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b819: ff 75 e0 pushl -0x20(%ebp) 10b81c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b81d: 52 push %edx 10b81e: 68 78 df 10 00 push $0x10df78 10b823: 57 push %edi 10b824: 50 push %eax 10b825: e8 fe 23 00 00 call 10dc28 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b82a: e8 0d 1f 00 00 call 10d73c <_Thread_Enable_dispatch> 10b82f: 83 c4 10 add $0x10,%esp 10b832: eb a0 jmp 10b7d4 =============================================================================== 0010b834 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b834: 55 push %ebp 10b835: 89 e5 mov %esp,%ebp 10b837: 53 push %ebx 10b838: 83 ec 18 sub $0x18,%esp 10b83b: 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 ); 10b83e: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b841: 50 push %eax 10b842: 53 push %ebx 10b843: 68 20 73 12 00 push $0x127320 10b848: e8 5f 16 00 00 call 10ceac <_Objects_Get> switch ( location ) { 10b84d: 83 c4 10 add $0x10,%esp 10b850: 8b 55 f4 mov -0xc(%ebp),%edx 10b853: 85 d2 test %edx,%edx 10b855: 74 0d je 10b864 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b857: b8 04 00 00 00 mov $0x4,%eax } 10b85c: 8b 5d fc mov -0x4(%ebp),%ebx 10b85f: c9 leave 10b860: c3 ret 10b861: 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) ) { 10b864: f6 40 10 30 testb $0x30,0x10(%eax) 10b868: 75 26 jne 10b890 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b86a: 52 push %edx 10b86b: 6a 00 push $0x0 10b86d: 53 push %ebx 10b86e: 83 c0 14 add $0x14,%eax 10b871: 50 push %eax 10b872: e8 51 0c 00 00 call 10c4c8 <_CORE_semaphore_Surrender> 10b877: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b879: e8 be 1e 00 00 call 10d73c <_Thread_Enable_dispatch> return 10b87e: 89 1c 24 mov %ebx,(%esp) 10b881: e8 3e 00 00 00 call 10b8c4 <_Semaphore_Translate_core_semaphore_return_code> 10b886: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b889: 8b 5d fc mov -0x4(%ebp),%ebx 10b88c: c9 leave 10b88d: c3 ret 10b88e: 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( 10b890: 51 push %ecx 10b891: 6a 00 push $0x0 10b893: 53 push %ebx 10b894: 83 c0 14 add $0x14,%eax 10b897: 50 push %eax 10b898: e8 f3 0a 00 00 call 10c390 <_CORE_mutex_Surrender> 10b89d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b89f: e8 98 1e 00 00 call 10d73c <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b8a4: 89 1c 24 mov %ebx,(%esp) 10b8a7: e8 08 00 00 00 call 10b8b4 <_Semaphore_Translate_core_mutex_return_code> 10b8ac: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b8af: 8b 5d fc mov -0x4(%ebp),%ebx 10b8b2: c9 leave 10b8b3: c3 ret =============================================================================== 0010c850 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 83 ec 08 sub $0x8,%esp 10c856: 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 ]; 10c859: a1 f8 a6 12 00 mov 0x12a6f8,%eax 10c85e: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c864: 8b 0d 34 a1 12 00 mov 0x12a134,%ecx 10c86a: 41 inc %ecx 10c86b: 89 0d 34 a1 12 00 mov %ecx,0x12a134 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c871: 85 d2 test %edx,%edx 10c873: 74 13 je 10c888 asr->mode_set = mode_set; 10c875: 8b 4d 0c mov 0xc(%ebp),%ecx 10c878: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c87b: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c87e: e8 15 22 00 00 call 10ea98 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c883: 31 c0 xor %eax,%eax 10c885: c9 leave 10c886: c3 ret 10c887: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c888: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c88c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c893: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c89a: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c8a1: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c8a8: 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(); 10c8af: e8 e4 21 00 00 call 10ea98 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c8b4: 31 c0 xor %eax,%eax 10c8b6: c9 leave 10c8b7: c3 ret =============================================================================== 00117e78 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117e78: 55 push %ebp 117e79: 89 e5 mov %esp,%ebp 117e7b: 53 push %ebx 117e7c: 83 ec 14 sub $0x14,%esp 117e7f: 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 ) 117e82: 85 db test %ebx,%ebx 117e84: 75 0a jne 117e90 return RTEMS_INVALID_NUMBER; 117e86: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117e8b: 8b 5d fc mov -0x4(%ebp),%ebx 117e8e: c9 leave 117e8f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117e90: 83 ec 08 sub $0x8,%esp 117e93: 8d 45 f4 lea -0xc(%ebp),%eax 117e96: 50 push %eax 117e97: ff 75 08 pushl 0x8(%ebp) 117e9a: e8 a9 3d 00 00 call 11bc48 <_Thread_Get> switch ( location ) { 117e9f: 83 c4 10 add $0x10,%esp 117ea2: 8b 55 f4 mov -0xc(%ebp),%edx 117ea5: 85 d2 test %edx,%edx 117ea7: 74 0b je 117eb4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117ea9: b8 04 00 00 00 mov $0x4,%eax } 117eae: 8b 5d fc mov -0x4(%ebp),%ebx 117eb1: c9 leave 117eb2: c3 ret 117eb3: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117eb4: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117eba: 8b 4a 0c mov 0xc(%edx),%ecx 117ebd: 85 c9 test %ecx,%ecx 117ebf: 74 3f je 117f00 if ( asr->is_enabled ) { 117ec1: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117ec5: 74 25 je 117eec rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117ec7: 9c pushf 117ec8: fa cli 117ec9: 59 pop %ecx *signal_set |= signals; 117eca: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117ecd: 51 push %ecx 117ece: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117ecf: 8b 15 54 29 14 00 mov 0x142954,%edx 117ed5: 85 d2 test %edx,%edx 117ed7: 74 1b je 117ef4 117ed9: 3b 05 58 29 14 00 cmp 0x142958,%eax 117edf: 75 13 jne 117ef4 <== NEVER TAKEN _Context_Switch_necessary = true; 117ee1: c6 05 64 29 14 00 01 movb $0x1,0x142964 117ee8: eb 0a jmp 117ef4 117eea: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117eec: 9c pushf 117eed: fa cli 117eee: 58 pop %eax *signal_set |= signals; 117eef: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117ef2: 50 push %eax 117ef3: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117ef4: e8 2b 3d 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117ef9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117efb: 8b 5d fc mov -0x4(%ebp),%ebx 117efe: c9 leave 117eff: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117f00: e8 1f 3d 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117f05: b8 0b 00 00 00 mov $0xb,%eax 117f0a: e9 7c ff ff ff jmp 117e8b =============================================================================== 0010b8d4 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b8d4: 55 push %ebp 10b8d5: 89 e5 mov %esp,%ebp 10b8d7: 57 push %edi 10b8d8: 56 push %esi 10b8d9: 53 push %ebx 10b8da: 83 ec 1c sub $0x1c,%esp 10b8dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10b8e0: 8b 7d 0c mov 0xc(%ebp),%edi 10b8e3: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b8e6: 85 f6 test %esi,%esi 10b8e8: 0f 84 3e 01 00 00 je 10ba2c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b8ee: 85 db test %ebx,%ebx 10b8f0: 0f 84 d2 00 00 00 je 10b9c8 <== NEVER TAKEN /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b8f6: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b8fd: 75 17 jne 10b916 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b8ff: 85 ff test %edi,%edi 10b901: 0f 84 b1 00 00 00 je 10b9b8 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b907: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b90e: 39 c7 cmp %eax,%edi 10b910: 0f 87 a2 00 00 00 ja 10b9b8 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b916: 83 ec 0c sub $0xc,%esp 10b919: ff 35 84 74 12 00 pushl 0x127484 10b91f: e8 b8 06 00 00 call 10bfdc <_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 ); 10b924: c7 04 24 60 73 12 00 movl $0x127360,(%esp) 10b92b: e8 cc 10 00 00 call 10c9fc <_Objects_Allocate> 10b930: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b932: 83 c4 10 add $0x10,%esp 10b935: 85 c0 test %eax,%eax 10b937: 0f 84 cf 00 00 00 je 10ba0c /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b93d: 50 push %eax 10b93e: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b93f: 8b 45 14 mov 0x14(%ebp),%eax 10b942: 83 e0 01 and $0x1,%eax 10b945: 50 push %eax 10b946: 6a 00 push $0x0 10b948: 31 c0 xor %eax,%eax 10b94a: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b951: 0f 95 c0 setne %al 10b954: 50 push %eax 10b955: 31 c0 xor %eax,%eax 10b957: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b95e: 0f 94 c0 sete %al 10b961: 50 push %eax 10b962: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b963: 8b 45 18 mov 0x18(%ebp),%eax 10b966: 83 e0 01 and $0x1,%eax 10b969: 50 push %eax 10b96a: ff 75 10 pushl 0x10(%ebp) 10b96d: 6a 00 push $0x0 10b96f: 52 push %edx 10b970: 68 60 73 12 00 push $0x127360 10b975: 89 55 e4 mov %edx,-0x1c(%ebp) 10b978: e8 5b 1e 00 00 call 10d7d8 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b97d: 83 c4 30 add $0x30,%esp 10b980: 84 c0 test %al,%al 10b982: 8b 55 e4 mov -0x1c(%ebp),%edx 10b985: 74 51 je 10b9d8 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b987: 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( 10b98d: 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; 10b994: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b998: 8b 42 08 mov 0x8(%edx),%eax 10b99b: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b99d: 83 ec 0c sub $0xc,%esp 10b9a0: ff 35 84 74 12 00 pushl 0x127484 10b9a6: e8 79 06 00 00 call 10c024 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b9ab: 83 c4 10 add $0x10,%esp 10b9ae: 31 c0 xor %eax,%eax } 10b9b0: 8d 65 f4 lea -0xc(%ebp),%esp 10b9b3: 5b pop %ebx 10b9b4: 5e pop %esi 10b9b5: 5f pop %edi 10b9b6: c9 leave 10b9b7: 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; 10b9b8: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b9bd: 8d 65 f4 lea -0xc(%ebp),%esp 10b9c0: 5b pop %ebx 10b9c1: 5e pop %esi 10b9c2: 5f pop %edi 10b9c3: c9 leave 10b9c4: c3 ret 10b9c5: 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; 10b9c8: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b9cd: 8d 65 f4 lea -0xc(%ebp),%esp 10b9d0: 5b pop %ebx 10b9d1: 5e pop %esi 10b9d2: 5f pop %edi 10b9d3: c9 leave 10b9d4: c3 ret 10b9d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b9d8: 83 ec 0c sub $0xc,%esp 10b9db: ff 72 08 pushl 0x8(%edx) 10b9de: e8 01 14 00 00 call 10cde4 <_Objects_Get_information_id> 10b9e3: 5a pop %edx 10b9e4: 59 pop %ecx 10b9e5: 8b 55 e4 mov -0x1c(%ebp),%edx 10b9e8: 52 push %edx 10b9e9: 50 push %eax 10b9ea: e8 85 13 00 00 call 10cd74 <_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(); 10b9ef: 58 pop %eax 10b9f0: ff 35 84 74 12 00 pushl 0x127484 10b9f6: e8 29 06 00 00 call 10c024 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b9fb: 83 c4 10 add $0x10,%esp 10b9fe: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ba03: 8d 65 f4 lea -0xc(%ebp),%esp 10ba06: 5b pop %ebx 10ba07: 5e pop %esi 10ba08: 5f pop %edi 10ba09: c9 leave 10ba0a: c3 ret 10ba0b: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10ba0c: 83 ec 0c sub $0xc,%esp 10ba0f: ff 35 84 74 12 00 pushl 0x127484 10ba15: e8 0a 06 00 00 call 10c024 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10ba1a: 83 c4 10 add $0x10,%esp 10ba1d: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ba22: 8d 65 f4 lea -0xc(%ebp),%esp 10ba25: 5b pop %ebx 10ba26: 5e pop %esi 10ba27: 5f pop %edi 10ba28: c9 leave 10ba29: c3 ret 10ba2a: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ba2c: b8 09 00 00 00 mov $0x9,%eax 10ba31: eb 8a jmp 10b9bd =============================================================================== 0010ba34 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10ba34: 55 push %ebp 10ba35: 89 e5 mov %esp,%ebp 10ba37: 53 push %ebx 10ba38: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10ba3b: ff 35 84 74 12 00 pushl 0x127484 10ba41: e8 96 05 00 00 call 10bfdc <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10ba46: 5a pop %edx 10ba47: 59 pop %ecx 10ba48: 8d 45 f4 lea -0xc(%ebp),%eax 10ba4b: 50 push %eax 10ba4c: ff 75 08 pushl 0x8(%ebp) 10ba4f: e8 0c 1d 00 00 call 10d760 <_Thread_Get> 10ba54: 89 c3 mov %eax,%ebx switch ( location ) { 10ba56: 83 c4 10 add $0x10,%esp 10ba59: 8b 45 f4 mov -0xc(%ebp),%eax 10ba5c: 85 c0 test %eax,%eax 10ba5e: 75 44 jne 10baa4 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10ba60: 83 ec 0c sub $0xc,%esp 10ba63: ff 73 08 pushl 0x8(%ebx) 10ba66: e8 79 13 00 00 call 10cde4 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10ba6b: 5a pop %edx 10ba6c: 59 pop %ecx 10ba6d: 53 push %ebx 10ba6e: 50 push %eax 10ba6f: e8 98 19 00 00 call 10d40c <_Thread_Close> 10ba74: 58 pop %eax 10ba75: ff 73 08 pushl 0x8(%ebx) 10ba78: e8 67 13 00 00 call 10cde4 <_Objects_Get_information_id> 10ba7d: 5a pop %edx 10ba7e: 59 pop %ecx 10ba7f: 53 push %ebx 10ba80: 50 push %eax 10ba81: e8 ee 12 00 00 call 10cd74 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10ba86: 58 pop %eax 10ba87: ff 35 84 74 12 00 pushl 0x127484 10ba8d: e8 92 05 00 00 call 10c024 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10ba92: e8 a5 1c 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ba97: 83 c4 10 add $0x10,%esp 10ba9a: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10ba9c: 8b 5d fc mov -0x4(%ebp),%ebx 10ba9f: c9 leave 10baa0: c3 ret 10baa1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10baa4: 83 ec 0c sub $0xc,%esp 10baa7: ff 35 84 74 12 00 pushl 0x127484 10baad: e8 72 05 00 00 call 10c024 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10bab2: 83 c4 10 add $0x10,%esp 10bab5: b8 04 00 00 00 mov $0x4,%eax } 10baba: 8b 5d fc mov -0x4(%ebp),%ebx 10babd: c9 leave 10babe: c3 ret =============================================================================== 0010d55c : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d55c: 55 push %ebp 10d55d: 89 e5 mov %esp,%ebp 10d55f: 56 push %esi 10d560: 53 push %ebx 10d561: 83 ec 10 sub $0x10,%esp 10d564: 8b 45 08 mov 0x8(%ebp),%eax 10d567: 8b 75 0c mov 0xc(%ebp),%esi 10d56a: 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() ) 10d56d: 80 3d a4 72 12 00 00 cmpb $0x0,0x1272a4 10d574: 74 6e je 10d5e4 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d576: 85 db test %ebx,%ebx 10d578: 74 7e je 10d5f8 /* * 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 ) 10d57a: 83 fe 0f cmp $0xf,%esi 10d57d: 77 3d ja 10d5bc /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d57f: 85 c0 test %eax,%eax 10d581: 74 45 je 10d5c8 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d583: 8b 15 98 bd 12 00 mov 0x12bd98,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d589: 3b 42 08 cmp 0x8(%edx),%eax 10d58c: 74 40 je 10d5ce api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d58e: 83 ec 08 sub $0x8,%esp 10d591: 8d 55 f4 lea -0xc(%ebp),%edx 10d594: 52 push %edx 10d595: 50 push %eax 10d596: e8 f1 1f 00 00 call 10f58c <_Thread_Get> switch ( location ) { 10d59b: 83 c4 10 add $0x10,%esp 10d59e: 8b 55 f4 mov -0xc(%ebp),%edx 10d5a1: 85 d2 test %edx,%edx 10d5a3: 75 4b jne 10d5f0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d5a5: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d5ab: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d5af: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d5b1: e8 b2 1f 00 00 call 10f568 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d5b6: 31 c0 xor %eax,%eax 10d5b8: eb 07 jmp 10d5c1 10d5ba: 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; 10d5bc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5c1: 8d 65 f8 lea -0x8(%ebp),%esp 10d5c4: 5b pop %ebx 10d5c5: 5e pop %esi 10d5c6: c9 leave 10d5c7: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d5c8: 8b 15 98 bd 12 00 mov 0x12bd98,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d5ce: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d5d4: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d5d8: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d5da: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5dc: 8d 65 f8 lea -0x8(%ebp),%esp 10d5df: 5b pop %ebx 10d5e0: 5e pop %esi 10d5e1: c9 leave 10d5e2: c3 ret 10d5e3: 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; 10d5e4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5e9: 8d 65 f8 lea -0x8(%ebp),%esp 10d5ec: 5b pop %ebx 10d5ed: 5e pop %esi 10d5ee: c9 leave 10d5ef: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d5f0: b8 04 00 00 00 mov $0x4,%eax 10d5f5: eb ca jmp 10d5c1 10d5f7: 90 nop <== NOT EXECUTED if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d5f8: b8 09 00 00 00 mov $0x9,%eax 10d5fd: eb c2 jmp 10d5c1 =============================================================================== 0010bac0 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10bac0: 55 push %ebp 10bac1: 89 e5 mov %esp,%ebp 10bac3: 83 ec 08 sub $0x8,%esp 10bac6: 8b 55 08 mov 0x8(%ebp),%edx 10bac9: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10bacc: 85 c0 test %eax,%eax 10bace: 74 30 je 10bb00 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10bad0: 85 d2 test %edx,%edx 10bad2: 75 10 jne 10bae4 *id = _Thread_Executing->Object.id; 10bad4: 8b 15 98 79 12 00 mov 0x127998,%edx 10bada: 8b 52 08 mov 0x8(%edx),%edx 10badd: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10badf: 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 ]; } 10bae1: c9 leave 10bae2: c3 ret 10bae3: 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 ); 10bae4: 50 push %eax 10bae5: ff 75 0c pushl 0xc(%ebp) 10bae8: 52 push %edx 10bae9: 68 60 73 12 00 push $0x127360 10baee: e8 3d 15 00 00 call 10d030 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10baf3: 8b 04 85 4c 0e 12 00 mov 0x120e4c(,%eax,4),%eax 10bafa: 83 c4 10 add $0x10,%esp } 10bafd: c9 leave 10bafe: c3 ret 10baff: 90 nop <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; if ( !id ) return RTEMS_INVALID_ADDRESS; 10bb00: 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 ]; } 10bb05: c9 leave 10bb06: c3 ret =============================================================================== 0011825c : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 11825c: 55 push %ebp 11825d: 89 e5 mov %esp,%ebp 11825f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118262: 8d 45 f4 lea -0xc(%ebp),%eax 118265: 50 push %eax 118266: ff 75 08 pushl 0x8(%ebp) 118269: e8 da 39 00 00 call 11bc48 <_Thread_Get> switch ( location ) { 11826e: 83 c4 10 add $0x10,%esp 118271: 8b 55 f4 mov -0xc(%ebp),%edx 118274: 85 d2 test %edx,%edx 118276: 74 08 je 118280 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118278: b8 04 00 00 00 mov $0x4,%eax } 11827d: c9 leave 11827e: c3 ret 11827f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118280: f6 40 10 02 testb $0x2,0x10(%eax) 118284: 74 0e je 118294 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 118286: e8 99 39 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11828b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118290: c9 leave 118291: c3 ret 118292: 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(); 118294: e8 8b 39 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118299: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11829b: c9 leave 11829c: c3 ret =============================================================================== 00112f04 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 112f04: 55 push %ebp 112f05: 89 e5 mov %esp,%ebp 112f07: 57 push %edi 112f08: 56 push %esi 112f09: 53 push %ebx 112f0a: 83 ec 1c sub $0x1c,%esp 112f0d: 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 ) 112f10: 85 c9 test %ecx,%ecx 112f12: 0f 84 48 01 00 00 je 113060 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 112f18: 8b 1d 98 79 12 00 mov 0x127998,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 112f1e: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 112f24: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 112f28: 19 f6 sbb %esi,%esi 112f2a: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 112f30: 8b 43 7c mov 0x7c(%ebx),%eax 112f33: 85 c0 test %eax,%eax 112f35: 0f 85 e1 00 00 00 jne 11301c old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 112f3b: 80 7f 08 01 cmpb $0x1,0x8(%edi) 112f3f: 19 d2 sbb %edx,%edx 112f41: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 112f47: 89 55 e4 mov %edx,-0x1c(%ebp) 112f4a: 89 4d e0 mov %ecx,-0x20(%ebp) 112f4d: e8 ca bd ff ff call 10ed1c <_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; 112f52: 8b 55 e4 mov -0x1c(%ebp),%edx 112f55: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 112f57: 09 f0 or %esi,%eax 112f59: 8b 4d e0 mov -0x20(%ebp),%ecx 112f5c: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 112f5e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 112f65: 74 0b je 112f72 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 112f67: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 112f6e: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 112f72: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 112f79: 74 1c je 112f97 if ( _Modes_Is_timeslice(mode_set) ) { 112f7b: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 112f82: 0f 84 c0 00 00 00 je 113048 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 112f88: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 112f8f: a1 a4 73 12 00 mov 0x1273a4,%eax 112f94: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112f97: f6 45 0c 01 testb $0x1,0xc(%ebp) 112f9b: 74 0b je 112fa8 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 112f9d: f6 45 08 01 testb $0x1,0x8(%ebp) 112fa1: 0f 84 99 00 00 00 je 113040 112fa7: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 112fa8: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 112faf: 74 3f je 112ff0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 112fb1: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 112fb8: 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 ) { 112fbb: 38 47 08 cmp %al,0x8(%edi) 112fbe: 74 30 je 112ff0 asr->is_enabled = is_asr_enabled; 112fc0: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112fc3: 9c pushf 112fc4: fa cli 112fc5: 58 pop %eax _signals = information->signals_pending; 112fc6: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 112fc9: 8b 4f 14 mov 0x14(%edi),%ecx 112fcc: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 112fcf: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 112fd2: 50 push %eax 112fd3: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 112fd4: 8b 5f 14 mov 0x14(%edi),%ebx 112fd7: 85 db test %ebx,%ebx 112fd9: 0f 95 c2 setne %dl needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 112fdc: 83 3d 80 75 12 00 03 cmpl $0x3,0x127580 112fe3: 74 16 je 112ffb <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 112fe5: 31 c0 xor %eax,%eax } 112fe7: 83 c4 1c add $0x1c,%esp 112fea: 5b pop %ebx 112feb: 5e pop %esi 112fec: 5f pop %edi 112fed: c9 leave 112fee: c3 ret 112fef: 90 nop <== NOT EXECUTED /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 112ff0: 31 d2 xor %edx,%edx needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 112ff2: 83 3d 80 75 12 00 03 cmpl $0x3,0x127580 112ff9: 75 ea jne 112fe5 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 112ffb: a1 98 79 12 00 mov 0x127998,%eax if ( !_States_Is_ready( executing->current_state ) || 113000: 8b 48 10 mov 0x10(%eax),%ecx 113003: 85 c9 test %ecx,%ecx 113005: 75 21 jne 113028 <== NEVER TAKEN 113007: 3b 05 9c 79 12 00 cmp 0x12799c,%eax 11300d: 74 06 je 113015 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 11300f: 80 78 74 00 cmpb $0x0,0x74(%eax) 113013: 75 13 jne 113028 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 113015: 84 d2 test %dl,%dl 113017: 75 16 jne 11302f 113019: eb ca jmp 112fe5 11301b: 90 nop <== 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; 11301c: 81 ce 00 02 00 00 or $0x200,%esi 113022: e9 14 ff ff ff jmp 112f3b 113027: 90 nop <== NOT EXECUTED _Context_Switch_necessary = true; 113028: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4 } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 11302f: e8 90 a5 ff ff call 10d5c4 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; 113034: 31 c0 xor %eax,%eax } 113036: 83 c4 1c add $0x1c,%esp 113039: 5b pop %ebx 11303a: 5e pop %esi 11303b: 5f pop %edi 11303c: c9 leave 11303d: c3 ret 11303e: 66 90 xchg %ax,%ax <== NOT EXECUTED 113040: fb sti 113041: e9 62 ff ff ff jmp 112fa8 113046: 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; 113048: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 11304f: f6 45 0c 01 testb $0x1,0xc(%ebp) 113053: 0f 84 4f ff ff ff je 112fa8 113059: e9 3f ff ff ff jmp 112f9d 11305e: 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; 113060: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 113065: 83 c4 1c add $0x1c,%esp 113068: 5b pop %ebx 113069: 5e pop %esi 11306a: 5f pop %edi 11306b: c9 leave 11306c: c3 ret =============================================================================== 0010c590 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c590: 55 push %ebp 10c591: 89 e5 mov %esp,%ebp 10c593: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c596: 8d 45 f4 lea -0xc(%ebp),%eax 10c599: 50 push %eax 10c59a: ff 75 08 pushl 0x8(%ebp) 10c59d: e8 de 1c 00 00 call 10e280 <_Thread_Get> switch ( location ) { 10c5a2: 83 c4 10 add $0x10,%esp 10c5a5: 8b 4d f4 mov -0xc(%ebp),%ecx 10c5a8: 85 c9 test %ecx,%ecx 10c5aa: 75 20 jne 10c5cc case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c5ac: 52 push %edx 10c5ad: ff 75 0c pushl 0xc(%ebp) 10c5b0: 6a 00 push $0x0 10c5b2: 50 push %eax 10c5b3: e8 18 25 00 00 call 10ead0 <_Thread_Restart> 10c5b8: 83 c4 10 add $0x10,%esp 10c5bb: 84 c0 test %al,%al 10c5bd: 75 15 jne 10c5d4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c5bf: e8 98 1c 00 00 call 10e25c <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10c5c4: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5c9: c9 leave 10c5ca: c3 ret 10c5cb: 90 nop <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c5cc: b8 04 00 00 00 mov $0x4,%eax } 10c5d1: c9 leave 10c5d2: c3 ret 10c5d3: 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(); 10c5d4: e8 83 1c 00 00 call 10e25c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c5d9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5db: c9 leave 10c5dc: c3 ret =============================================================================== 0010ed50 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ed50: 55 push %ebp 10ed51: 89 e5 mov %esp,%ebp 10ed53: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ed56: 8d 45 f4 lea -0xc(%ebp),%eax 10ed59: 50 push %eax 10ed5a: ff 75 08 pushl 0x8(%ebp) 10ed5d: e8 22 1d 00 00 call 110a84 <_Thread_Get> switch ( location ) { 10ed62: 83 c4 10 add $0x10,%esp 10ed65: 8b 55 f4 mov -0xc(%ebp),%edx 10ed68: 85 d2 test %edx,%edx 10ed6a: 74 08 je 10ed74 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ed6c: b8 04 00 00 00 mov $0x4,%eax } 10ed71: c9 leave 10ed72: c3 ret 10ed73: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ed74: f6 40 10 02 testb $0x2,0x10(%eax) 10ed78: 75 0e jne 10ed88 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ed7a: e8 e1 1c 00 00 call 110a60 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ed7f: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed84: c9 leave 10ed85: c3 ret 10ed86: 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 ); 10ed88: 83 ec 08 sub $0x8,%esp 10ed8b: 6a 01 push $0x1 10ed8d: 50 push %eax 10ed8e: e8 41 25 00 00 call 1112d4 <_Thread_Resume> _Thread_Enable_dispatch(); 10ed93: e8 c8 1c 00 00 call 110a60 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ed98: 83 c4 10 add $0x10,%esp 10ed9b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed9d: c9 leave 10ed9e: c3 ret =============================================================================== 0010d6d4 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d6d4: 55 push %ebp 10d6d5: 89 e5 mov %esp,%ebp 10d6d7: 56 push %esi 10d6d8: 53 push %ebx 10d6d9: 83 ec 10 sub $0x10,%esp 10d6dc: 8b 45 08 mov 0x8(%ebp),%eax 10d6df: 8b 5d 0c mov 0xc(%ebp),%ebx 10d6e2: 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() ) 10d6e5: 80 3d a4 72 12 00 00 cmpb $0x0,0x1272a4 10d6ec: 74 66 je 10d754 /* * 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 ) 10d6ee: 83 fb 0f cmp $0xf,%ebx 10d6f1: 77 39 ja 10d72c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6f3: 85 c0 test %eax,%eax 10d6f5: 74 41 je 10d738 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d6f7: 8b 15 98 bd 12 00 mov 0x12bd98,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6fd: 3b 42 08 cmp 0x8(%edx),%eax 10d700: 74 3c je 10d73e api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d702: 83 ec 08 sub $0x8,%esp 10d705: 8d 55 f4 lea -0xc(%ebp),%edx 10d708: 52 push %edx 10d709: 50 push %eax 10d70a: e8 7d 1e 00 00 call 10f58c <_Thread_Get> switch ( location ) { 10d70f: 83 c4 10 add $0x10,%esp 10d712: 8b 55 f4 mov -0xc(%ebp),%edx 10d715: 85 d2 test %edx,%edx 10d717: 75 47 jne 10d760 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d719: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d71f: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d723: e8 40 1e 00 00 call 10f568 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d728: 31 c0 xor %eax,%eax 10d72a: eb 05 jmp 10d731 * 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; 10d72c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d731: 8d 65 f8 lea -0x8(%ebp),%esp 10d734: 5b pop %ebx 10d735: 5e pop %esi 10d736: c9 leave 10d737: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d738: 8b 15 98 bd 12 00 mov 0x12bd98,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d73e: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d744: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d748: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d74a: 8d 65 f8 lea -0x8(%ebp),%esp 10d74d: 5b pop %ebx 10d74e: 5e pop %esi 10d74f: c9 leave 10d750: c3 ret 10d751: 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; 10d754: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d759: 8d 65 f8 lea -0x8(%ebp),%esp 10d75c: 5b pop %ebx 10d75d: 5e pop %esi 10d75e: c9 leave 10d75f: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d760: b8 04 00 00 00 mov $0x4,%eax } 10d765: 8d 65 f8 lea -0x8(%ebp),%esp 10d768: 5b pop %ebx 10d769: 5e pop %esi 10d76a: c9 leave 10d76b: c3 ret =============================================================================== 0010fa24 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10fa24: 55 push %ebp 10fa25: 89 e5 mov %esp,%ebp 10fa27: 56 push %esi 10fa28: 53 push %ebx 10fa29: 83 ec 10 sub $0x10,%esp 10fa2c: 8b 5d 0c mov 0xc(%ebp),%ebx 10fa2f: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fa32: 85 db test %ebx,%ebx 10fa34: 74 0b je 10fa41 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 ) ); 10fa36: 0f b6 05 54 74 12 00 movzbl 0x127454,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fa3d: 39 c3 cmp %eax,%ebx 10fa3f: 77 5f ja 10faa0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fa41: 85 f6 test %esi,%esi 10fa43: 74 67 je 10faac return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fa45: 83 ec 08 sub $0x8,%esp 10fa48: 8d 45 f4 lea -0xc(%ebp),%eax 10fa4b: 50 push %eax 10fa4c: ff 75 08 pushl 0x8(%ebp) 10fa4f: e8 80 1e 00 00 call 1118d4 <_Thread_Get> switch ( location ) { 10fa54: 83 c4 10 add $0x10,%esp 10fa57: 8b 55 f4 mov -0xc(%ebp),%edx 10fa5a: 85 d2 test %edx,%edx 10fa5c: 75 36 jne 10fa94 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fa5e: 8b 50 14 mov 0x14(%eax),%edx 10fa61: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10fa63: 85 db test %ebx,%ebx 10fa65: 74 1c je 10fa83 the_thread->real_priority = new_priority; 10fa67: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fa6a: 8b 48 1c mov 0x1c(%eax),%ecx 10fa6d: 85 c9 test %ecx,%ecx 10fa6f: 74 05 je 10fa76 10fa71: 3b 58 14 cmp 0x14(%eax),%ebx 10fa74: 73 0d jae 10fa83 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10fa76: 52 push %edx 10fa77: 6a 00 push $0x0 10fa79: 53 push %ebx 10fa7a: 50 push %eax 10fa7b: e8 2c 19 00 00 call 1113ac <_Thread_Change_priority> 10fa80: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fa83: e8 28 1e 00 00 call 1118b0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10fa88: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa8a: 8d 65 f8 lea -0x8(%ebp),%esp 10fa8d: 5b pop %ebx 10fa8e: 5e pop %esi 10fa8f: c9 leave 10fa90: c3 ret 10fa91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10fa94: b8 04 00 00 00 mov $0x4,%eax } 10fa99: 8d 65 f8 lea -0x8(%ebp),%esp 10fa9c: 5b pop %ebx 10fa9d: 5e pop %esi 10fa9e: c9 leave 10fa9f: 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; 10faa0: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10faa5: 8d 65 f8 lea -0x8(%ebp),%esp 10faa8: 5b pop %ebx 10faa9: 5e pop %esi 10faaa: c9 leave 10faab: 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; 10faac: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fab1: 8d 65 f8 lea -0x8(%ebp),%esp 10fab4: 5b pop %ebx 10fab5: 5e pop %esi 10fab6: c9 leave 10fab7: c3 ret =============================================================================== 0010bb7c : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10bb7c: 55 push %ebp 10bb7d: 89 e5 mov %esp,%ebp 10bb7f: 53 push %ebx 10bb80: 83 ec 14 sub $0x14,%esp 10bb83: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bb86: 85 db test %ebx,%ebx 10bb88: 74 4e je 10bbd8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bb8a: 83 ec 08 sub $0x8,%esp 10bb8d: 8d 45 f4 lea -0xc(%ebp),%eax 10bb90: 50 push %eax 10bb91: ff 75 08 pushl 0x8(%ebp) 10bb94: e8 c7 1b 00 00 call 10d760 <_Thread_Get> switch ( location ) { 10bb99: 83 c4 10 add $0x10,%esp 10bb9c: 8b 55 f4 mov -0xc(%ebp),%edx 10bb9f: 85 d2 test %edx,%edx 10bba1: 75 29 jne 10bbcc case OBJECTS_LOCAL: if ( _Thread_Start( 10bba3: 83 ec 0c sub $0xc,%esp 10bba6: ff 75 10 pushl 0x10(%ebp) 10bba9: 6a 00 push $0x0 10bbab: 53 push %ebx 10bbac: 6a 00 push $0x0 10bbae: 50 push %eax 10bbaf: e8 bc 26 00 00 call 10e270 <_Thread_Start> 10bbb4: 83 c4 20 add $0x20,%esp 10bbb7: 84 c0 test %al,%al 10bbb9: 75 29 jne 10bbe4 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bbbb: e8 7c 1b 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bbc0: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbc5: 8b 5d fc mov -0x4(%ebp),%ebx 10bbc8: c9 leave 10bbc9: c3 ret 10bbca: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bbcc: b8 04 00 00 00 mov $0x4,%eax } 10bbd1: 8b 5d fc mov -0x4(%ebp),%ebx 10bbd4: c9 leave 10bbd5: c3 ret 10bbd6: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bbd8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbdd: 8b 5d fc mov -0x4(%ebp),%ebx 10bbe0: c9 leave 10bbe1: c3 ret 10bbe2: 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(); 10bbe4: e8 53 1b 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bbe9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbeb: 8b 5d fc mov -0x4(%ebp),%ebx 10bbee: c9 leave 10bbef: c3 ret =============================================================================== 00110ea0 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110ea0: 55 push %ebp 110ea1: 89 e5 mov %esp,%ebp 110ea3: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 110ea6: 8d 45 f4 lea -0xc(%ebp),%eax 110ea9: 50 push %eax 110eaa: ff 75 08 pushl 0x8(%ebp) 110ead: e8 ae c8 ff ff call 10d760 <_Thread_Get> switch ( location ) { 110eb2: 83 c4 10 add $0x10,%esp 110eb5: 8b 55 f4 mov -0xc(%ebp),%edx 110eb8: 85 d2 test %edx,%edx 110eba: 74 08 je 110ec4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 110ebc: b8 04 00 00 00 mov $0x4,%eax } 110ec1: c9 leave 110ec2: c3 ret 110ec3: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110ec4: f6 40 10 02 testb $0x2,0x10(%eax) 110ec8: 74 0e je 110ed8 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 110eca: e8 6d c8 ff ff call 10d73c <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 110ecf: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110ed4: c9 leave 110ed5: c3 ret 110ed6: 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 ); 110ed8: 83 ec 0c sub $0xc,%esp 110edb: 50 push %eax 110edc: e8 5f 09 00 00 call 111840 <_Thread_Suspend> _Thread_Enable_dispatch(); 110ee1: e8 56 c8 ff ff call 10d73c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 110ee6: 83 c4 10 add $0x10,%esp 110ee9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110eeb: c9 leave 110eec: c3 ret =============================================================================== 0010c4d4 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c4d4: 55 push %ebp 10c4d5: 89 e5 mov %esp,%ebp 10c4d7: 57 push %edi 10c4d8: 56 push %esi 10c4d9: 53 push %ebx 10c4da: 83 ec 1c sub $0x1c,%esp 10c4dd: 8b 5d 0c mov 0xc(%ebp),%ebx 10c4e0: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c4e3: 85 db test %ebx,%ebx 10c4e5: 0f 84 9d 00 00 00 je 10c588 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c4eb: 83 ec 08 sub $0x8,%esp 10c4ee: 8d 45 e4 lea -0x1c(%ebp),%eax 10c4f1: 50 push %eax 10c4f2: ff 75 08 pushl 0x8(%ebp) 10c4f5: e8 72 1d 00 00 call 10e26c <_Thread_Get> 10c4fa: 89 c6 mov %eax,%esi switch (location) { 10c4fc: 83 c4 10 add $0x10,%esp 10c4ff: 8b 45 e4 mov -0x1c(%ebp),%eax 10c502: 85 c0 test %eax,%eax 10c504: 74 0e je 10c514 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c506: b8 04 00 00 00 mov $0x4,%eax } 10c50b: 8d 65 f4 lea -0xc(%ebp),%esp 10c50e: 5b pop %ebx 10c50f: 5e pop %esi 10c510: 5f pop %edi 10c511: c9 leave 10c512: c3 ret 10c513: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c514: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 10c51a: 85 c0 test %eax,%eax 10c51c: 75 44 jne 10c562 10c51e: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c520: 83 ec 0c sub $0xc,%esp 10c523: 6a 14 push $0x14 10c525: e8 fe 2e 00 00 call 10f428 <_Workspace_Allocate> if (new == NULL) { 10c52a: 83 c4 10 add $0x10,%esp 10c52d: 85 c0 test %eax,%eax 10c52f: 74 4b je 10c57c _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c531: 8b 13 mov (%ebx),%edx 10c533: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c536: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c539: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c53c: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 10c542: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c544: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 10c54a: e8 f9 1c 00 00 call 10e248 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c54f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c551: 8d 65 f4 lea -0xc(%ebp),%esp 10c554: 5b pop %ebx 10c555: 5e pop %esi 10c556: 5f pop %edi 10c557: c9 leave 10c558: c3 ret 10c559: 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; 10c55c: 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) { 10c55e: 85 c0 test %eax,%eax 10c560: 74 be je 10c520 if (tvp->ptr == ptr) { 10c562: 39 58 04 cmp %ebx,0x4(%eax) 10c565: 75 f5 jne 10c55c tvp->dtor = dtor; 10c567: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c56a: e8 d9 1c 00 00 call 10e248 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c56f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c571: 8d 65 f4 lea -0xc(%ebp),%esp 10c574: 5b pop %ebx 10c575: 5e pop %esi 10c576: 5f pop %edi 10c577: c9 leave 10c578: c3 ret 10c579: 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(); 10c57c: e8 c7 1c 00 00 call 10e248 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c581: b8 1a 00 00 00 mov $0x1a,%eax 10c586: eb 83 jmp 10c50b Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c588: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c58d: 8d 65 f4 lea -0xc(%ebp),%esp 10c590: 5b pop %ebx 10c591: 5e pop %esi 10c592: 5f pop %edi 10c593: c9 leave 10c594: c3 ret =============================================================================== 0010c598 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c598: 55 push %ebp 10c599: 89 e5 mov %esp,%ebp 10c59b: 53 push %ebx 10c59c: 83 ec 14 sub $0x14,%esp 10c59f: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c5a2: 85 db test %ebx,%ebx 10c5a4: 74 76 je 10c61c return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c5a6: 83 ec 08 sub $0x8,%esp 10c5a9: 8d 45 f4 lea -0xc(%ebp),%eax 10c5ac: 50 push %eax 10c5ad: ff 75 08 pushl 0x8(%ebp) 10c5b0: e8 b7 1c 00 00 call 10e26c <_Thread_Get> switch (location) { 10c5b5: 83 c4 10 add $0x10,%esp 10c5b8: 8b 55 f4 mov -0xc(%ebp),%edx 10c5bb: 85 d2 test %edx,%edx 10c5bd: 74 0d je 10c5cc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c5bf: b8 04 00 00 00 mov $0x4,%eax } 10c5c4: 8b 5d fc mov -0x4(%ebp),%ebx 10c5c7: c9 leave 10c5c8: c3 ret 10c5c9: 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; 10c5cc: 8b 88 00 01 00 00 mov 0x100(%eax),%ecx while (tvp) { 10c5d2: 85 c9 test %ecx,%ecx 10c5d4: 74 17 je 10c5ed if (tvp->ptr == ptr) { 10c5d6: 39 59 04 cmp %ebx,0x4(%ecx) 10c5d9: 75 0c jne 10c5e7 10c5db: eb 49 jmp 10c626 10c5dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c5e0: 39 5a 04 cmp %ebx,0x4(%edx) 10c5e3: 74 17 je 10c5fc 10c5e5: 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; 10c5e7: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c5e9: 85 d2 test %edx,%edx 10c5eb: 75 f3 jne 10c5e0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c5ed: e8 56 1c 00 00 call 10e248 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c5f2: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5f7: 8b 5d fc mov -0x4(%ebp),%ebx 10c5fa: c9 leave 10c5fb: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c5fc: 8b 1a mov (%edx),%ebx 10c5fe: 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 ); 10c600: 83 ec 08 sub $0x8,%esp 10c603: 52 push %edx 10c604: 50 push %eax 10c605: e8 b2 00 00 00 call 10c6bc <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c60a: e8 39 1c 00 00 call 10e248 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c60f: 83 c4 10 add $0x10,%esp 10c612: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c614: 8b 5d fc mov -0x4(%ebp),%ebx 10c617: c9 leave 10c618: c3 ret 10c619: 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; 10c61c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c621: 8b 5d fc mov -0x4(%ebp),%ebx 10c624: c9 leave 10c625: 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; 10c626: 8b 11 mov (%ecx),%edx 10c628: 89 90 00 01 00 00 mov %edx,0x100(%eax) 10c62e: 89 ca mov %ecx,%edx 10c630: eb ce jmp 10c600 =============================================================================== 0010c634 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c634: 55 push %ebp 10c635: 89 e5 mov %esp,%ebp 10c637: 56 push %esi 10c638: 53 push %ebx 10c639: 83 ec 10 sub $0x10,%esp 10c63c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c63f: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c642: 85 db test %ebx,%ebx 10c644: 74 56 je 10c69c return RTEMS_INVALID_ADDRESS; if ( !result ) 10c646: 85 f6 test %esi,%esi 10c648: 74 52 je 10c69c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c64a: 83 ec 08 sub $0x8,%esp 10c64d: 8d 45 f4 lea -0xc(%ebp),%eax 10c650: 50 push %eax 10c651: ff 75 08 pushl 0x8(%ebp) 10c654: e8 13 1c 00 00 call 10e26c <_Thread_Get> switch (location) { 10c659: 83 c4 10 add $0x10,%esp 10c65c: 8b 55 f4 mov -0xc(%ebp),%edx 10c65f: 85 d2 test %edx,%edx 10c661: 75 2d jne 10c690 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c663: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10c669: 85 c0 test %eax,%eax 10c66b: 75 09 jne 10c676 10c66d: eb 39 jmp 10c6a8 10c66f: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c670: 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) { 10c672: 85 c0 test %eax,%eax 10c674: 74 32 je 10c6a8 <== NEVER TAKEN if (tvp->ptr == ptr) { 10c676: 39 58 04 cmp %ebx,0x4(%eax) 10c679: 75 f5 jne 10c670 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c67b: 8b 40 0c mov 0xc(%eax),%eax 10c67e: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c680: e8 c3 1b 00 00 call 10e248 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c685: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c687: 8d 65 f8 lea -0x8(%ebp),%esp 10c68a: 5b pop %ebx 10c68b: 5e pop %esi 10c68c: c9 leave 10c68d: c3 ret 10c68e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c690: b8 04 00 00 00 mov $0x4,%eax } 10c695: 8d 65 f8 lea -0x8(%ebp),%esp 10c698: 5b pop %ebx 10c699: 5e pop %esi 10c69a: c9 leave 10c69b: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c69c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6a1: 8d 65 f8 lea -0x8(%ebp),%esp 10c6a4: 5b pop %ebx 10c6a5: 5e pop %esi 10c6a6: c9 leave 10c6a7: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c6a8: e8 9b 1b 00 00 call 10e248 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c6ad: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6b2: 8d 65 f8 lea -0x8(%ebp),%esp 10c6b5: 5b pop %ebx 10c6b6: 5e pop %esi 10c6b7: c9 leave 10c6b8: c3 ret =============================================================================== 0010bbf0 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10bbf0: 55 push %ebp 10bbf1: 89 e5 mov %esp,%ebp 10bbf3: 53 push %ebx 10bbf4: 83 ec 04 sub $0x4,%esp 10bbf7: 8b 5d 08 mov 0x8(%ebp),%ebx 10bbfa: a1 d4 73 12 00 mov 0x1273d4,%eax 10bbff: 40 inc %eax 10bc00: a3 d4 73 12 00 mov %eax,0x1273d4 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10bc05: 85 db test %ebx,%ebx 10bc07: 74 53 je 10bc5c _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10bc09: 83 ec 08 sub $0x8,%esp 10bc0c: 6a 08 push $0x8 10bc0e: ff 35 98 79 12 00 pushl 0x127998 10bc14: e8 03 24 00 00 call 10e01c <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bc19: a1 98 79 12 00 mov 0x127998,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10bc1e: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bc21: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10bc28: c7 40 64 88 d5 10 00 movl $0x10d588,0x64(%eax) the_watchdog->id = id; 10bc2f: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10bc32: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bc39: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bc3c: 5a pop %edx 10bc3d: 59 pop %ecx &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); 10bc3e: 83 c0 48 add $0x48,%eax 10bc41: 50 push %eax 10bc42: 68 a4 74 12 00 push $0x1274a4 10bc47: e8 70 2a 00 00 call 10e6bc <_Watchdog_Insert> 10bc4c: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10bc4f: e8 e8 1a 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bc54: 31 c0 xor %eax,%eax 10bc56: 8b 5d fc mov -0x4(%ebp),%ebx 10bc59: c9 leave 10bc5a: c3 ret 10bc5b: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bc5c: e8 db 26 00 00 call 10e33c <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bc61: e8 d6 1a 00 00 call 10d73c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bc66: 31 c0 xor %eax,%eax 10bc68: 8b 5d fc mov -0x4(%ebp),%ebx 10bc6b: c9 leave 10bc6c: c3 ret =============================================================================== 0010ca38 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10ca38: 55 push %ebp 10ca39: 89 e5 mov %esp,%ebp 10ca3b: 53 push %ebx 10ca3c: 83 ec 14 sub $0x14,%esp 10ca3f: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10ca42: 80 3d 28 a3 12 00 00 cmpb $0x0,0x12a328 10ca49: 0f 84 a9 00 00 00 je 10caf8 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10ca4f: 85 db test %ebx,%ebx 10ca51: 0f 84 ad 00 00 00 je 10cb04 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10ca57: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10ca5e: 83 ec 0c sub $0xc,%esp 10ca61: 53 push %ebx 10ca62: e8 d1 f3 ff ff call 10be38 <_TOD_Validate> 10ca67: 83 c4 10 add $0x10,%esp 10ca6a: 84 c0 test %al,%al 10ca6c: 75 0a jne 10ca78 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10ca6e: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca73: 8b 5d fc mov -0x4(%ebp),%ebx 10ca76: c9 leave 10ca77: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10ca78: 83 ec 0c sub $0xc,%esp 10ca7b: 53 push %ebx 10ca7c: e8 2b f3 ff ff call 10bdac <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10ca81: 83 c4 10 add $0x10,%esp 10ca84: 3b 05 a8 a3 12 00 cmp 0x12a3a8,%eax 10ca8a: 76 e2 jbe 10ca6e 10ca8c: 8b 15 14 a3 12 00 mov 0x12a314,%edx 10ca92: 42 inc %edx 10ca93: 89 15 14 a3 12 00 mov %edx,0x12a314 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10ca99: 83 ec 08 sub $0x8,%esp 10ca9c: 6a 10 push $0x10 10ca9e: ff 35 d8 a8 12 00 pushl 0x12a8d8 10caa4: 89 45 f4 mov %eax,-0xc(%ebp) 10caa7: e8 a4 24 00 00 call 10ef50 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10caac: 8b 15 d8 a8 12 00 mov 0x12a8d8,%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( 10cab2: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10cab5: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10cabc: c7 42 64 bc e4 10 00 movl $0x10e4bc,0x64(%edx) the_watchdog->id = id; 10cac3: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10cac6: 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( 10cacd: 8b 45 f4 mov -0xc(%ebp),%eax 10cad0: 2b 05 a8 a3 12 00 sub 0x12a3a8,%eax 10cad6: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10cad9: 58 pop %eax 10cada: 59 pop %ecx 10cadb: 83 c2 48 add $0x48,%edx 10cade: 52 push %edx 10cadf: 68 d8 a3 12 00 push $0x12a3d8 10cae4: e8 7f 2b 00 00 call 10f668 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10cae9: e8 82 1b 00 00 call 10e670 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10caee: 83 c4 10 add $0x10,%esp 10caf1: 31 c0 xor %eax,%eax 10caf3: e9 7b ff ff ff jmp 10ca73 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10caf8: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10cafd: 8b 5d fc mov -0x4(%ebp),%ebx 10cb00: c9 leave 10cb01: c3 ret 10cb02: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10cb04: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10cb09: 8b 5d fc mov -0x4(%ebp),%ebx 10cb0c: c9 leave 10cb0d: c3 ret =============================================================================== 001187f4 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1187f4: 55 push %ebp 1187f5: 89 e5 mov %esp,%ebp 1187f7: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1187fa: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1187fd: 50 push %eax 1187fe: ff 75 08 pushl 0x8(%ebp) 118801: 68 a0 2d 14 00 push $0x142da0 118806: e8 89 2b 00 00 call 11b394 <_Objects_Get> switch ( location ) { 11880b: 83 c4 10 add $0x10,%esp 11880e: 8b 55 f4 mov -0xc(%ebp),%edx 118811: 85 d2 test %edx,%edx 118813: 74 07 je 11881c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118815: b8 04 00 00 00 mov $0x4,%eax } 11881a: c9 leave 11881b: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 11881c: 83 78 38 04 cmpl $0x4,0x38(%eax) 118820: 74 0f je 118831 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118822: 83 ec 0c sub $0xc,%esp 118825: 83 c0 10 add $0x10,%eax 118828: 50 push %eax 118829: e8 36 48 00 00 call 11d064 <_Watchdog_Remove> 11882e: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118831: e8 ee 33 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118836: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118838: c9 leave 118839: c3 ret =============================================================================== 0010c068 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10c068: 55 push %ebp 10c069: 89 e5 mov %esp,%ebp 10c06b: 57 push %edi 10c06c: 56 push %esi 10c06d: 53 push %ebx 10c06e: 83 ec 0c sub $0xc,%esp 10c071: 8b 5d 08 mov 0x8(%ebp),%ebx 10c074: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10c077: 85 db test %ebx,%ebx 10c079: 74 6d je 10c0e8 return RTEMS_INVALID_NAME; if ( !id ) 10c07b: 85 f6 test %esi,%esi 10c07d: 0f 84 89 00 00 00 je 10c10c 10c083: a1 34 90 12 00 mov 0x129034,%eax 10c088: 40 inc %eax 10c089: a3 34 90 12 00 mov %eax,0x129034 * 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 ); 10c08e: 83 ec 0c sub $0xc,%esp 10c091: 68 40 9a 12 00 push $0x129a40 10c096: e8 15 0f 00 00 call 10cfb0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10c09b: 83 c4 10 add $0x10,%esp 10c09e: 85 c0 test %eax,%eax 10c0a0: 74 56 je 10c0f8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10c0a2: 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; 10c0a9: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c0b0: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c0b7: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c0be: 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 ), 10c0c5: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c0c8: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c0cb: 8b 0d 5c 9a 12 00 mov 0x129a5c,%ecx 10c0d1: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c0d4: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c0d7: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c0d9: e8 12 1c 00 00 call 10dcf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c0de: 31 c0 xor %eax,%eax } 10c0e0: 8d 65 f4 lea -0xc(%ebp),%esp 10c0e3: 5b pop %ebx 10c0e4: 5e pop %esi 10c0e5: 5f pop %edi 10c0e6: c9 leave 10c0e7: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c0e8: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c0ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c0f0: 5b pop %ebx 10c0f1: 5e pop %esi 10c0f2: 5f pop %edi 10c0f3: c9 leave 10c0f4: c3 ret 10c0f5: 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(); 10c0f8: e8 f3 1b 00 00 call 10dcf0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c0fd: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c102: 8d 65 f4 lea -0xc(%ebp),%esp 10c105: 5b pop %ebx 10c106: 5e pop %esi 10c107: 5f pop %edi 10c108: c9 leave 10c109: c3 ret 10c10a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c10c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c111: 8d 65 f4 lea -0xc(%ebp),%esp 10c114: 5b pop %ebx 10c115: 5e pop %esi 10c116: 5f pop %edi 10c117: c9 leave 10c118: c3 ret =============================================================================== 001188f0 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1188f0: 55 push %ebp 1188f1: 89 e5 mov %esp,%ebp 1188f3: 53 push %ebx 1188f4: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1188f7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1188fa: 50 push %eax 1188fb: ff 75 08 pushl 0x8(%ebp) 1188fe: 68 a0 2d 14 00 push $0x142da0 118903: e8 8c 2a 00 00 call 11b394 <_Objects_Get> 118908: 89 c3 mov %eax,%ebx switch ( location ) { 11890a: 83 c4 10 add $0x10,%esp 11890d: 8b 4d f4 mov -0xc(%ebp),%ecx 118910: 85 c9 test %ecx,%ecx 118912: 75 38 jne 11894c case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 118914: 83 ec 08 sub $0x8,%esp 118917: 50 push %eax 118918: 68 a0 2d 14 00 push $0x142da0 11891d: e8 02 26 00 00 call 11af24 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 118922: 8d 43 10 lea 0x10(%ebx),%eax 118925: 89 04 24 mov %eax,(%esp) 118928: e8 37 47 00 00 call 11d064 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 11892d: 58 pop %eax 11892e: 5a pop %edx 11892f: 53 push %ebx 118930: 68 a0 2d 14 00 push $0x142da0 118935: e8 e6 28 00 00 call 11b220 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 11893a: e8 e5 32 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11893f: 83 c4 10 add $0x10,%esp 118942: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118944: 8b 5d fc mov -0x4(%ebp),%ebx 118947: c9 leave 118948: c3 ret 118949: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11894c: b8 04 00 00 00 mov $0x4,%eax } 118951: 8b 5d fc mov -0x4(%ebp),%ebx 118954: c9 leave 118955: c3 ret =============================================================================== 0010c11c : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c11c: 55 push %ebp 10c11d: 89 e5 mov %esp,%ebp 10c11f: 57 push %edi 10c120: 56 push %esi 10c121: 53 push %ebx 10c122: 83 ec 2c sub $0x2c,%esp 10c125: 8b 5d 0c mov 0xc(%ebp),%ebx 10c128: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c12b: 85 db test %ebx,%ebx 10c12d: 0f 84 99 00 00 00 je 10c1cc return RTEMS_INVALID_NUMBER; if ( !routine ) 10c133: 85 f6 test %esi,%esi 10c135: 0f 84 b1 00 00 00 je 10c1ec Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c13b: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c13c: 8d 45 e4 lea -0x1c(%ebp),%eax 10c13f: 50 push %eax 10c140: ff 75 08 pushl 0x8(%ebp) 10c143: 68 40 9a 12 00 push $0x129a40 10c148: e8 13 13 00 00 call 10d460 <_Objects_Get> 10c14d: 89 c7 mov %eax,%edi switch ( location ) { 10c14f: 83 c4 10 add $0x10,%esp 10c152: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c155: 85 c9 test %ecx,%ecx 10c157: 74 0f je 10c168 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c159: b8 04 00 00 00 mov $0x4,%eax } 10c15e: 8d 65 f4 lea -0xc(%ebp),%esp 10c161: 5b pop %ebx 10c162: 5e pop %esi 10c163: 5f pop %edi 10c164: c9 leave 10c165: c3 ret 10c166: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c168: 8d 50 10 lea 0x10(%eax),%edx 10c16b: 83 ec 0c sub $0xc,%esp 10c16e: 52 push %edx 10c16f: 89 55 d4 mov %edx,-0x2c(%ebp) 10c172: e8 31 2c 00 00 call 10eda8 <_Watchdog_Remove> _ISR_Disable( level ); 10c177: 9c pushf 10c178: fa cli 10c179: 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 ) { 10c17a: 83 c4 10 add $0x10,%esp 10c17d: 8b 57 18 mov 0x18(%edi),%edx 10c180: 85 d2 test %edx,%edx 10c182: 8b 55 d4 mov -0x2c(%ebp),%edx 10c185: 75 55 jne 10c1dc /* * 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; 10c187: 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; 10c18e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c195: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c198: 8b 4d 08 mov 0x8(%ebp),%ecx 10c19b: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c19e: 8b 4d 14 mov 0x14(%ebp),%ecx 10c1a1: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c1a4: 50 push %eax 10c1a5: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c1a6: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c1a9: 83 ec 08 sub $0x8,%esp 10c1ac: 52 push %edx 10c1ad: 68 04 91 12 00 push $0x129104 10c1b2: e8 b9 2a 00 00 call 10ec70 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c1b7: e8 34 1b 00 00 call 10dcf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1bc: 83 c4 10 add $0x10,%esp 10c1bf: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1c1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1c4: 5b pop %ebx 10c1c5: 5e pop %esi 10c1c6: 5f pop %edi 10c1c7: c9 leave 10c1c8: c3 ret 10c1c9: 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; 10c1cc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1d4: 5b pop %ebx 10c1d5: 5e pop %esi 10c1d6: 5f pop %edi 10c1d7: c9 leave 10c1d8: c3 ret 10c1d9: 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 ); 10c1dc: 50 push %eax 10c1dd: 9d popf _Thread_Enable_dispatch(); 10c1de: e8 0d 1b 00 00 call 10dcf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1e3: 31 c0 xor %eax,%eax 10c1e5: e9 74 ff ff ff jmp 10c15e 10c1ea: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c1ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 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 =============================================================================== 00118a38 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118a38: 55 push %ebp 118a39: 89 e5 mov %esp,%ebp 118a3b: 57 push %edi 118a3c: 56 push %esi 118a3d: 53 push %ebx 118a3e: 83 ec 2c sub $0x2c,%esp 118a41: 8b 75 08 mov 0x8(%ebp),%esi 118a44: 8b 7d 0c mov 0xc(%ebp),%edi 118a47: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118a4a: 80 3d a8 23 14 00 00 cmpb $0x0,0x1423a8 118a51: 75 0d jne 118a60 return RTEMS_NOT_DEFINED; 118a53: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a58: 8d 65 f4 lea -0xc(%ebp),%esp 118a5b: 5b pop %ebx 118a5c: 5e pop %esi 118a5d: 5f pop %edi 118a5e: c9 leave 118a5f: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 118a60: 83 ec 0c sub $0xc,%esp 118a63: 57 push %edi 118a64: e8 7b d4 ff ff call 115ee4 <_TOD_Validate> 118a69: 83 c4 10 add $0x10,%esp 118a6c: 84 c0 test %al,%al 118a6e: 74 1e je 118a8e return RTEMS_INVALID_CLOCK; if ( !routine ) 118a70: 85 db test %ebx,%ebx 118a72: 0f 84 a4 00 00 00 je 118b1c return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118a78: 83 ec 0c sub $0xc,%esp 118a7b: 57 push %edi 118a7c: e8 d7 d3 ff ff call 115e58 <_TOD_To_seconds> 118a81: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118a83: 83 c4 10 add $0x10,%esp 118a86: 3b 05 28 24 14 00 cmp 0x142428,%eax 118a8c: 77 0e ja 118a9c return RTEMS_INVALID_CLOCK; 118a8e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a93: 8d 65 f4 lea -0xc(%ebp),%esp 118a96: 5b pop %ebx 118a97: 5e pop %esi 118a98: 5f pop %edi 118a99: c9 leave 118a9a: c3 ret 118a9b: 90 nop <== NOT EXECUTED 118a9c: 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 ); 118a9d: 8d 45 e4 lea -0x1c(%ebp),%eax 118aa0: 50 push %eax 118aa1: 56 push %esi 118aa2: 68 a0 2d 14 00 push $0x142da0 118aa7: e8 e8 28 00 00 call 11b394 <_Objects_Get> switch ( location ) { 118aac: 83 c4 10 add $0x10,%esp 118aaf: 8b 4d e4 mov -0x1c(%ebp),%ecx 118ab2: 85 c9 test %ecx,%ecx 118ab4: 75 5a jne 118b10 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118ab6: 8d 48 10 lea 0x10(%eax),%ecx 118ab9: 83 ec 0c sub $0xc,%esp 118abc: 51 push %ecx 118abd: 89 45 d0 mov %eax,-0x30(%ebp) 118ac0: 89 4d d4 mov %ecx,-0x2c(%ebp) 118ac3: e8 9c 45 00 00 call 11d064 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 118ac8: 8b 55 d0 mov -0x30(%ebp),%edx 118acb: 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; 118ad2: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118ad9: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118adc: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118adf: 8b 45 14 mov 0x14(%ebp),%eax 118ae2: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 118ae5: 2b 3d 28 24 14 00 sub 0x142428,%edi 118aeb: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118aee: 58 pop %eax 118aef: 5a pop %edx 118af0: 8b 4d d4 mov -0x2c(%ebp),%ecx 118af3: 51 push %ecx 118af4: 68 58 24 14 00 push $0x142458 118af9: e8 2e 44 00 00 call 11cf2c <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 118afe: e8 21 31 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118b03: 83 c4 10 add $0x10,%esp 118b06: 31 c0 xor %eax,%eax 118b08: e9 4b ff ff ff jmp 118a58 118b0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118b10: b8 04 00 00 00 mov $0x4,%eax 118b15: e9 3e ff ff ff jmp 118a58 118b1a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118b1c: b8 09 00 00 00 mov $0x9,%eax 118b21: e9 32 ff ff ff jmp 118a58 =============================================================================== 00118b28 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 118b28: 55 push %ebp 118b29: 89 e5 mov %esp,%ebp 118b2b: 53 push %ebx 118b2c: 83 ec 14 sub $0x14,%esp 118b2f: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118b32: 85 db test %ebx,%ebx 118b34: 74 4a je 118b80 118b36: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 118b37: 8d 45 f4 lea -0xc(%ebp),%eax 118b3a: 50 push %eax 118b3b: ff 75 08 pushl 0x8(%ebp) 118b3e: 68 a0 2d 14 00 push $0x142da0 118b43: e8 4c 28 00 00 call 11b394 <_Objects_Get> switch ( location ) { 118b48: 83 c4 10 add $0x10,%esp 118b4b: 8b 55 f4 mov -0xc(%ebp),%edx 118b4e: 85 d2 test %edx,%edx 118b50: 74 0a je 118b5c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118b52: b8 04 00 00 00 mov $0x4,%eax } 118b57: 8b 5d fc mov -0x4(%ebp),%ebx 118b5a: c9 leave 118b5b: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118b5c: 8b 50 38 mov 0x38(%eax),%edx 118b5f: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118b61: 8b 50 1c mov 0x1c(%eax),%edx 118b64: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 118b67: 8b 50 24 mov 0x24(%eax),%edx 118b6a: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118b6d: 8b 40 28 mov 0x28(%eax),%eax 118b70: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118b73: e8 ac 30 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118b78: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b7a: 8b 5d fc mov -0x4(%ebp),%ebx 118b7d: c9 leave 118b7e: c3 ret 118b7f: 90 nop <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 118b80: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b85: 8b 5d fc mov -0x4(%ebp),%ebx 118b88: c9 leave 118b89: c3 ret =============================================================================== 001191b4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1191b4: 55 push %ebp 1191b5: 89 e5 mov %esp,%ebp 1191b7: 56 push %esi 1191b8: 53 push %ebx 1191b9: 83 ec 10 sub $0x10,%esp 1191bc: 8b 45 08 mov 0x8(%ebp),%eax 1191bf: 85 c0 test %eax,%eax 1191c1: 74 41 je 119204 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 1191c3: 0f b6 15 94 9d 13 00 movzbl 0x139d94,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 1191ca: 39 d0 cmp %edx,%eax 1191cc: 76 42 jbe 119210 * 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 ) 1191ce: 40 inc %eax 1191cf: 75 33 jne 119204 return RTEMS_INVALID_PRIORITY; _priority = 0; 1191d1: 31 f6 xor %esi,%esi 1191d3: 8b 15 94 23 14 00 mov 0x142394,%edx 1191d9: 42 inc %edx 1191da: 89 15 94 23 14 00 mov %edx,0x142394 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1191e0: 8a 1d c0 dc 13 00 mov 0x13dcc0,%bl initialized = true; 1191e6: c6 05 c0 dc 13 00 01 movb $0x1,0x13dcc0 _Thread_Enable_dispatch(); 1191ed: e8 32 2a 00 00 call 11bc24 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1191f2: 84 db test %bl,%bl 1191f4: 74 1e je 119214 return RTEMS_INCORRECT_STATE; 1191f6: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1191fb: 8d 65 f8 lea -0x8(%ebp),%esp 1191fe: 5b pop %ebx 1191ff: 5e pop %esi 119200: c9 leave 119201: c3 ret 119202: 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; 119204: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 119209: 8d 65 f8 lea -0x8(%ebp),%esp 11920c: 5b pop %ebx 11920d: 5e pop %esi 11920e: c9 leave 11920f: c3 ret 119210: 89 c6 mov %eax,%esi 119212: eb bf jmp 1191d3 * 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( 119214: 83 ec 08 sub $0x8,%esp 119217: 8d 45 f4 lea -0xc(%ebp),%eax 11921a: 50 push %eax 11921b: 8b 45 10 mov 0x10(%ebp),%eax 11921e: 80 cc 80 or $0x80,%ah 119221: 50 push %eax 119222: 68 00 01 00 00 push $0x100 119227: ff 75 0c pushl 0xc(%ebp) 11922a: 56 push %esi 11922b: 68 45 4d 49 54 push $0x54494d45 119230: e8 db ec ff ff call 117f10 /* 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) { 119235: 83 c4 20 add $0x20,%esp 119238: 85 c0 test %eax,%eax 11923a: 74 10 je 11924c initialized = false; 11923c: c6 05 c0 dc 13 00 00 movb $0x0,0x13dcc0 initialized = false; } #endif return status; } 119243: 8d 65 f8 lea -0x8(%ebp),%esp 119246: 5b pop %ebx 119247: 5e pop %esi 119248: c9 leave 119249: c3 ret 11924a: 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) 11924c: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 11924f: 0f b7 c8 movzwl %ax,%ecx 119252: 8b 15 3c 23 14 00 mov 0x14233c,%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( 119258: 8b 14 8a mov (%edx,%ecx,4),%edx 11925b: 89 15 40 dc 13 00 mov %edx,0x13dc40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119261: c7 05 70 dc 13 00 74 movl $0x13dc74,0x13dc70 119268: dc 13 00 the_chain->permanent_null = NULL; 11926b: c7 05 74 dc 13 00 00 movl $0x0,0x13dc74 119272: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119275: c7 05 78 dc 13 00 70 movl $0x13dc70,0x13dc78 11927c: dc 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11927f: c7 05 a8 dc 13 00 ac movl $0x13dcac,0x13dca8 119286: dc 13 00 the_chain->permanent_null = NULL; 119289: c7 05 ac dc 13 00 00 movl $0x0,0x13dcac 119290: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119293: c7 05 b0 dc 13 00 a8 movl $0x13dca8,0x13dcb0 11929a: dc 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11929d: c7 05 50 dc 13 00 00 movl $0x0,0x13dc50 1192a4: 00 00 00 the_watchdog->routine = routine; 1192a7: c7 05 64 dc 13 00 70 movl $0x11ba70,0x13dc64 1192ae: ba 11 00 the_watchdog->id = id; 1192b1: a3 68 dc 13 00 mov %eax,0x13dc68 the_watchdog->user_data = user_data; 1192b6: c7 05 6c dc 13 00 00 movl $0x0,0x13dc6c 1192bd: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1192c0: c7 05 88 dc 13 00 00 movl $0x0,0x13dc88 1192c7: 00 00 00 the_watchdog->routine = routine; 1192ca: c7 05 9c dc 13 00 70 movl $0x11ba70,0x13dc9c 1192d1: ba 11 00 the_watchdog->id = id; 1192d4: a3 a0 dc 13 00 mov %eax,0x13dca0 the_watchdog->user_data = user_data; 1192d9: c7 05 a4 dc 13 00 00 movl $0x0,0x13dca4 1192e0: 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; 1192e3: c7 05 44 dc 13 00 84 movl $0x119084,0x13dc44 1192ea: 90 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1192ed: 8b 15 e4 24 14 00 mov 0x1424e4,%edx 1192f3: 89 15 7c dc 13 00 mov %edx,0x13dc7c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1192f9: 8b 15 28 24 14 00 mov 0x142428,%edx 1192ff: 89 15 b4 dc 13 00 mov %edx,0x13dcb4 ts->insert_chain = NULL; 119305: c7 05 b8 dc 13 00 00 movl $0x0,0x13dcb8 11930c: 00 00 00 ts->active = false; 11930f: c6 05 bc dc 13 00 00 movb $0x0,0x13dcbc /* * The default timer server is now available. */ _Timer_server = ts; 119316: c7 05 e0 2d 14 00 40 movl $0x13dc40,0x142de0 11931d: dc 13 00 /* * Start the timer server */ status = rtems_task_start( 119320: 53 push %ebx 119321: 68 40 dc 13 00 push $0x13dc40 119326: 68 d8 8e 11 00 push $0x118ed8 11932b: 50 push %eax 11932c: e8 a7 f2 ff ff call 1185d8 if (status) { initialized = false; } #endif return status; 119331: 83 c4 10 add $0x10,%esp 119334: e9 d0 fe ff ff jmp 119209 =============================================================================== 00118bb0 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118bb0: 55 push %ebp 118bb1: 89 e5 mov %esp,%ebp 118bb3: 56 push %esi 118bb4: 53 push %ebx 118bb5: 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 ); 118bb8: 8d 45 f4 lea -0xc(%ebp),%eax 118bbb: 50 push %eax 118bbc: ff 75 08 pushl 0x8(%ebp) 118bbf: 68 a0 2d 14 00 push $0x142da0 118bc4: e8 cb 27 00 00 call 11b394 <_Objects_Get> 118bc9: 89 c3 mov %eax,%ebx switch ( location ) { 118bcb: 83 c4 10 add $0x10,%esp 118bce: 8b 45 f4 mov -0xc(%ebp),%eax 118bd1: 85 c0 test %eax,%eax 118bd3: 74 0f je 118be4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118bd5: b8 04 00 00 00 mov $0x4,%eax } 118bda: 8d 65 f8 lea -0x8(%ebp),%esp 118bdd: 5b pop %ebx 118bde: 5e pop %esi 118bdf: c9 leave 118be0: c3 ret 118be1: 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 ) { 118be4: 8b 43 38 mov 0x38(%ebx),%eax 118be7: 85 c0 test %eax,%eax 118be9: 74 1d je 118c08 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118beb: 48 dec %eax 118bec: 74 3a je 118c28 /* * 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; 118bee: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118bf3: 89 45 e4 mov %eax,-0x1c(%ebp) 118bf6: e8 29 30 00 00 call 11bc24 <_Thread_Enable_dispatch> return status; 118bfb: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118bfe: 8d 65 f8 lea -0x8(%ebp),%esp 118c01: 5b pop %ebx 118c02: 5e pop %esi 118c03: c9 leave 118c04: c3 ret 118c05: 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 ); 118c08: 83 c3 10 add $0x10,%ebx 118c0b: 83 ec 0c sub $0xc,%esp 118c0e: 53 push %ebx 118c0f: e8 50 44 00 00 call 11d064 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118c14: 59 pop %ecx 118c15: 5e pop %esi 118c16: 53 push %ebx 118c17: 68 64 24 14 00 push $0x142464 118c1c: e8 0b 43 00 00 call 11cf2c <_Watchdog_Insert> 118c21: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118c24: 31 c0 xor %eax,%eax 118c26: eb cb jmp 118bf3 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; 118c28: 8b 35 e0 2d 14 00 mov 0x142de0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118c2e: 83 ec 0c sub $0xc,%esp 118c31: 8d 43 10 lea 0x10(%ebx),%eax 118c34: 50 push %eax 118c35: e8 2a 44 00 00 call 11d064 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118c3a: 58 pop %eax 118c3b: 5a pop %edx 118c3c: 53 push %ebx 118c3d: 56 push %esi 118c3e: ff 56 04 call *0x4(%esi) 118c41: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118c44: 31 c0 xor %eax,%eax 118c46: eb ab jmp 118bf3 =============================================================================== 00118c48 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118c48: 55 push %ebp 118c49: 89 e5 mov %esp,%ebp 118c4b: 57 push %edi 118c4c: 56 push %esi 118c4d: 53 push %ebx 118c4e: 83 ec 2c sub $0x2c,%esp 118c51: 8b 7d 0c mov 0xc(%ebp),%edi 118c54: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118c57: 8b 1d e0 2d 14 00 mov 0x142de0,%ebx if ( !timer_server ) 118c5d: 85 db test %ebx,%ebx 118c5f: 0f 84 9f 00 00 00 je 118d04 return RTEMS_INCORRECT_STATE; if ( !routine ) 118c65: 85 f6 test %esi,%esi 118c67: 0f 84 a3 00 00 00 je 118d10 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118c6d: 85 ff test %edi,%edi 118c6f: 75 0f jne 118c80 return RTEMS_INVALID_NUMBER; 118c71: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c76: 8d 65 f4 lea -0xc(%ebp),%esp 118c79: 5b pop %ebx 118c7a: 5e pop %esi 118c7b: 5f pop %edi 118c7c: c9 leave 118c7d: c3 ret 118c7e: 66 90 xchg %ax,%ax <== NOT EXECUTED 118c80: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118c81: 8d 45 e4 lea -0x1c(%ebp),%eax 118c84: 50 push %eax 118c85: ff 75 08 pushl 0x8(%ebp) 118c88: 68 a0 2d 14 00 push $0x142da0 118c8d: e8 02 27 00 00 call 11b394 <_Objects_Get> 118c92: 89 c2 mov %eax,%edx switch ( location ) { 118c94: 83 c4 10 add $0x10,%esp 118c97: 8b 45 e4 mov -0x1c(%ebp),%eax 118c9a: 85 c0 test %eax,%eax 118c9c: 75 56 jne 118cf4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118c9e: 83 ec 0c sub $0xc,%esp 118ca1: 8d 42 10 lea 0x10(%edx),%eax 118ca4: 50 push %eax 118ca5: 89 55 d4 mov %edx,-0x2c(%ebp) 118ca8: e8 b7 43 00 00 call 11d064 <_Watchdog_Remove> _ISR_Disable( level ); 118cad: 9c pushf 118cae: fa cli 118caf: 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 ) { 118cb0: 83 c4 10 add $0x10,%esp 118cb3: 8b 55 d4 mov -0x2c(%ebp),%edx 118cb6: 8b 4a 18 mov 0x18(%edx),%ecx 118cb9: 85 c9 test %ecx,%ecx 118cbb: 75 5f jne 118d1c /* * 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; 118cbd: 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; 118cc4: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118ccb: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118cce: 8b 4d 08 mov 0x8(%ebp),%ecx 118cd1: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118cd4: 8b 4d 14 mov 0x14(%ebp),%ecx 118cd7: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118cda: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118cdd: 50 push %eax 118cde: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118cdf: 83 ec 08 sub $0x8,%esp 118ce2: 52 push %edx 118ce3: 53 push %ebx 118ce4: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118ce7: e8 38 2f 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118cec: 83 c4 10 add $0x10,%esp 118cef: 31 c0 xor %eax,%eax 118cf1: eb 83 jmp 118c76 118cf3: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118cf4: b8 04 00 00 00 mov $0x4,%eax } 118cf9: 8d 65 f4 lea -0xc(%ebp),%esp 118cfc: 5b pop %ebx 118cfd: 5e pop %esi 118cfe: 5f pop %edi 118cff: c9 leave 118d00: c3 ret 118d01: 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; 118d04: b8 0e 00 00 00 mov $0xe,%eax 118d09: e9 68 ff ff ff jmp 118c76 118d0e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 118d10: b8 09 00 00 00 mov $0x9,%eax 118d15: e9 5c ff ff ff jmp 118c76 118d1a: 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 ); 118d1c: 50 push %eax 118d1d: 9d popf _Thread_Enable_dispatch(); 118d1e: e8 01 2f 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118d23: 31 c0 xor %eax,%eax 118d25: e9 4c ff ff ff jmp 118c76 =============================================================================== 00118d2c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118d2c: 55 push %ebp 118d2d: 89 e5 mov %esp,%ebp 118d2f: 57 push %edi 118d30: 56 push %esi 118d31: 53 push %ebx 118d32: 83 ec 2c sub $0x2c,%esp 118d35: 8b 7d 0c mov 0xc(%ebp),%edi 118d38: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118d3b: 8b 1d e0 2d 14 00 mov 0x142de0,%ebx if ( !timer_server ) 118d41: 85 db test %ebx,%ebx 118d43: 0f 84 d7 00 00 00 je 118e20 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118d49: 80 3d a8 23 14 00 00 cmpb $0x0,0x1423a8 118d50: 0f 84 aa 00 00 00 je 118e00 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118d56: 85 f6 test %esi,%esi 118d58: 0f 84 b2 00 00 00 je 118e10 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118d5e: 83 ec 0c sub $0xc,%esp 118d61: 57 push %edi 118d62: e8 7d d1 ff ff call 115ee4 <_TOD_Validate> 118d67: 83 c4 10 add $0x10,%esp 118d6a: 84 c0 test %al,%al 118d6c: 75 0e jne 118d7c return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118d6e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118d73: 8d 65 f4 lea -0xc(%ebp),%esp 118d76: 5b pop %ebx 118d77: 5e pop %esi 118d78: 5f pop %edi 118d79: c9 leave 118d7a: c3 ret 118d7b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118d7c: 83 ec 0c sub $0xc,%esp 118d7f: 57 push %edi 118d80: e8 d3 d0 ff ff call 115e58 <_TOD_To_seconds> 118d85: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118d87: 83 c4 10 add $0x10,%esp 118d8a: 3b 05 28 24 14 00 cmp 0x142428,%eax 118d90: 76 dc jbe 118d6e 118d92: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118d93: 8d 45 e4 lea -0x1c(%ebp),%eax 118d96: 50 push %eax 118d97: ff 75 08 pushl 0x8(%ebp) 118d9a: 68 a0 2d 14 00 push $0x142da0 118d9f: e8 f0 25 00 00 call 11b394 <_Objects_Get> 118da4: 89 c2 mov %eax,%edx switch ( location ) { 118da6: 83 c4 10 add $0x10,%esp 118da9: 8b 45 e4 mov -0x1c(%ebp),%eax 118dac: 85 c0 test %eax,%eax 118dae: 75 7c jne 118e2c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118db0: 83 ec 0c sub $0xc,%esp 118db3: 8d 42 10 lea 0x10(%edx),%eax 118db6: 50 push %eax 118db7: 89 55 d4 mov %edx,-0x2c(%ebp) 118dba: e8 a5 42 00 00 call 11d064 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118dbf: 8b 55 d4 mov -0x2c(%ebp),%edx 118dc2: 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; 118dc9: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118dd0: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118dd3: 8b 45 08 mov 0x8(%ebp),%eax 118dd6: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118dd9: 8b 45 14 mov 0x14(%ebp),%eax 118ddc: 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(); 118ddf: 2b 3d 28 24 14 00 sub 0x142428,%edi 118de5: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118de8: 58 pop %eax 118de9: 59 pop %ecx 118dea: 52 push %edx 118deb: 53 push %ebx 118dec: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118def: e8 30 2e 00 00 call 11bc24 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118df4: 83 c4 10 add $0x10,%esp 118df7: 31 c0 xor %eax,%eax 118df9: e9 75 ff ff ff jmp 118d73 118dfe: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118e00: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118e05: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118e08: 5b pop %ebx <== NOT EXECUTED 118e09: 5e pop %esi <== NOT EXECUTED 118e0a: 5f pop %edi <== NOT EXECUTED 118e0b: c9 leave <== NOT EXECUTED 118e0c: c3 ret <== NOT EXECUTED 118e0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118e10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118e15: 8d 65 f4 lea -0xc(%ebp),%esp 118e18: 5b pop %ebx 118e19: 5e pop %esi 118e1a: 5f pop %edi 118e1b: c9 leave 118e1c: c3 ret 118e1d: 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; 118e20: b8 0e 00 00 00 mov $0xe,%eax 118e25: e9 49 ff ff ff jmp 118d73 118e2a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118e2c: b8 04 00 00 00 mov $0x4,%eax 118e31: e9 3d ff ff ff jmp 118d73 =============================================================================== 0010be9c : #include int sched_get_priority_max( int policy ) { 10be9c: 55 push %ebp 10be9d: 89 e5 mov %esp,%ebp 10be9f: 83 ec 08 sub $0x8,%esp 10bea2: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10bea5: 85 c0 test %eax,%eax 10bea7: 78 0a js 10beb3 10bea9: 83 f8 02 cmp $0x2,%eax 10beac: 7e 1a jle 10bec8 10beae: 83 f8 04 cmp $0x4,%eax 10beb1: 74 15 je 10bec8 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10beb3: e8 ac 81 00 00 call 114064 <__errno> 10beb8: c7 00 16 00 00 00 movl $0x16,(%eax) 10bebe: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10bec3: c9 leave 10bec4: c3 ret 10bec5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10bec8: 0f b6 05 5c 42 12 00 movzbl 0x12425c,%eax 10becf: 48 dec %eax } 10bed0: c9 leave 10bed1: c3 ret =============================================================================== 0010bed4 : #include int sched_get_priority_min( int policy ) { 10bed4: 55 push %ebp 10bed5: 89 e5 mov %esp,%ebp 10bed7: 83 ec 08 sub $0x8,%esp 10beda: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10bedd: 85 c0 test %eax,%eax 10bedf: 78 0a js 10beeb 10bee1: 83 f8 02 cmp $0x2,%eax 10bee4: 7e 1a jle 10bf00 <== ALWAYS TAKEN 10bee6: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10bee9: 74 15 je 10bf00 <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10beeb: e8 74 81 00 00 call 114064 <__errno> 10bef0: c7 00 16 00 00 00 movl $0x16,(%eax) 10bef6: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10befb: c9 leave 10befc: c3 ret 10befd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; 10bf00: b8 01 00 00 00 mov $0x1,%eax } 10bf05: c9 leave 10bf06: c3 ret =============================================================================== 0010bf08 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10bf08: 55 push %ebp 10bf09: 89 e5 mov %esp,%ebp 10bf0b: 56 push %esi 10bf0c: 53 push %ebx 10bf0d: 8b 75 08 mov 0x8(%ebp),%esi 10bf10: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bf13: 85 f6 test %esi,%esi 10bf15: 75 21 jne 10bf38 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10bf17: 85 db test %ebx,%ebx 10bf19: 74 38 je 10bf53 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10bf1b: 83 ec 08 sub $0x8,%esp 10bf1e: 53 push %ebx 10bf1f: ff 35 c4 83 12 00 pushl 0x1283c4 10bf25: e8 ce 34 00 00 call 10f3f8 <_Timespec_From_ticks> return 0; 10bf2a: 83 c4 10 add $0x10,%esp 10bf2d: 31 c0 xor %eax,%eax } 10bf2f: 8d 65 f8 lea -0x8(%ebp),%esp 10bf32: 5b pop %ebx 10bf33: 5e pop %esi 10bf34: c9 leave 10bf35: c3 ret 10bf36: 66 90 xchg %ax,%ax <== NOT EXECUTED { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bf38: e8 ff c7 ff ff call 10873c 10bf3d: 39 f0 cmp %esi,%eax 10bf3f: 74 d6 je 10bf17 rtems_set_errno_and_return_minus_one( ESRCH ); 10bf41: e8 1e 81 00 00 call 114064 <__errno> 10bf46: c7 00 03 00 00 00 movl $0x3,(%eax) 10bf4c: b8 ff ff ff ff mov $0xffffffff,%eax 10bf51: eb dc jmp 10bf2f if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bf53: e8 0c 81 00 00 call 114064 <__errno> 10bf58: c7 00 16 00 00 00 movl $0x16,(%eax) 10bf5e: b8 ff ff ff ff mov $0xffffffff,%eax 10bf63: eb ca jmp 10bf2f =============================================================================== 0010e67c : */ int sem_close( sem_t *sem ) { 10e67c: 55 push %ebp 10e67d: 89 e5 mov %esp,%ebp 10e67f: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e682: 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 ); 10e685: 50 push %eax 10e686: 8b 45 08 mov 0x8(%ebp),%eax 10e689: ff 30 pushl (%eax) 10e68b: 68 c0 d6 12 00 push $0x12d6c0 10e690: e8 ab 21 00 00 call 110840 <_Objects_Get> switch ( location ) { 10e695: 83 c4 10 add $0x10,%esp 10e698: 8b 55 f4 mov -0xc(%ebp),%edx 10e69b: 85 d2 test %edx,%edx 10e69d: 74 15 je 10e6b4 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e69f: e8 04 90 00 00 call 1176a8 <__errno> 10e6a4: c7 00 16 00 00 00 movl $0x16,(%eax) 10e6aa: b8 ff ff ff ff mov $0xffffffff,%eax } 10e6af: c9 leave 10e6b0: c3 ret 10e6b1: 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; 10e6b4: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10e6b7: 83 ec 0c sub $0xc,%esp 10e6ba: 50 push %eax 10e6bb: e8 e4 62 00 00 call 1149a4 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e6c0: e8 8b 2a 00 00 call 111150 <_Thread_Enable_dispatch> return 0; 10e6c5: 83 c4 10 add $0x10,%esp 10e6c8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e6ca: c9 leave 10e6cb: c3 ret =============================================================================== 0010e6cc : */ int sem_destroy( sem_t *sem ) { 10e6cc: 55 push %ebp 10e6cd: 89 e5 mov %esp,%ebp 10e6cf: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e6d2: 8d 45 f4 lea -0xc(%ebp),%eax 10e6d5: 50 push %eax 10e6d6: 8b 45 08 mov 0x8(%ebp),%eax 10e6d9: ff 30 pushl (%eax) 10e6db: 68 c0 d6 12 00 push $0x12d6c0 10e6e0: e8 5b 21 00 00 call 110840 <_Objects_Get> switch ( location ) { 10e6e5: 83 c4 10 add $0x10,%esp 10e6e8: 8b 55 f4 mov -0xc(%ebp),%edx 10e6eb: 85 d2 test %edx,%edx 10e6ed: 74 15 je 10e704 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e6ef: e8 b4 8f 00 00 call 1176a8 <__errno> 10e6f4: c7 00 16 00 00 00 movl $0x16,(%eax) 10e6fa: b8 ff ff ff ff mov $0xffffffff,%eax } 10e6ff: c9 leave 10e700: c3 ret 10e701: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10e704: 80 78 14 00 cmpb $0x0,0x14(%eax) 10e708: 75 16 jne 10e720 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10e70a: 83 ec 0c sub $0xc,%esp 10e70d: 50 push %eax 10e70e: e8 91 62 00 00 call 1149a4 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e713: e8 38 2a 00 00 call 111150 <_Thread_Enable_dispatch> return 0; 10e718: 83 c4 10 add $0x10,%esp 10e71b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e71d: c9 leave 10e71e: c3 ret 10e71f: 90 nop <== NOT EXECUTED /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10e720: e8 2b 2a 00 00 call 111150 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10e725: e8 7e 8f 00 00 call 1176a8 <__errno> 10e72a: c7 00 16 00 00 00 movl $0x16,(%eax) 10e730: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e735: c9 leave 10e736: c3 ret =============================================================================== 0010e738 : int sem_getvalue( sem_t *sem, int *sval ) { 10e738: 55 push %ebp 10e739: 89 e5 mov %esp,%ebp 10e73b: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e73e: 8d 45 f4 lea -0xc(%ebp),%eax 10e741: 50 push %eax 10e742: 8b 45 08 mov 0x8(%ebp),%eax 10e745: ff 30 pushl (%eax) 10e747: 68 c0 d6 12 00 push $0x12d6c0 10e74c: e8 ef 20 00 00 call 110840 <_Objects_Get> switch ( location ) { 10e751: 83 c4 10 add $0x10,%esp 10e754: 8b 55 f4 mov -0xc(%ebp),%edx 10e757: 85 d2 test %edx,%edx 10e759: 74 15 je 10e770 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e75b: e8 48 8f 00 00 call 1176a8 <__errno> 10e760: c7 00 16 00 00 00 movl $0x16,(%eax) 10e766: b8 ff ff ff ff mov $0xffffffff,%eax } 10e76b: c9 leave 10e76c: c3 ret 10e76d: 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 ); 10e770: 8b 50 64 mov 0x64(%eax),%edx 10e773: 8b 45 0c mov 0xc(%ebp),%eax 10e776: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e778: e8 d3 29 00 00 call 111150 <_Thread_Enable_dispatch> return 0; 10e77d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e77f: c9 leave 10e780: c3 ret =============================================================================== 0010e7cc : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10e7cc: 55 push %ebp 10e7cd: 89 e5 mov %esp,%ebp 10e7cf: 57 push %edi 10e7d0: 56 push %esi 10e7d1: 53 push %ebx 10e7d2: 83 ec 2c sub $0x2c,%esp 10e7d5: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e7d8: a1 94 d3 12 00 mov 0x12d394,%eax 10e7dd: 40 inc %eax 10e7de: a3 94 d3 12 00 mov %eax,0x12d394 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10e7e3: 8b 7d 0c mov 0xc(%ebp),%edi 10e7e6: 81 e7 00 02 00 00 and $0x200,%edi 10e7ec: 0f 85 86 00 00 00 jne 10e878 /* unsigned int value */ ) { va_list arg; mode_t mode; unsigned int value = 0; 10e7f2: 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 ); 10e7f9: 83 ec 08 sub $0x8,%esp 10e7fc: 8d 45 e4 lea -0x1c(%ebp),%eax 10e7ff: 50 push %eax 10e800: 56 push %esi 10e801: e8 ee 61 00 00 call 1149f4 <_POSIX_Semaphore_Name_to_id> 10e806: 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 ) { 10e808: 83 c4 10 add $0x10,%esp 10e80b: 85 c0 test %eax,%eax 10e80d: 74 25 je 10e834 /* * 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) ) ) { 10e80f: 83 f8 02 cmp $0x2,%eax 10e812: 75 04 jne 10e818 <== NEVER TAKEN 10e814: 85 ff test %edi,%edi 10e816: 75 6c jne 10e884 _Thread_Enable_dispatch(); 10e818: e8 33 29 00 00 call 111150 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10e81d: e8 86 8e 00 00 call 1176a8 <__errno> 10e822: 89 18 mov %ebx,(%eax) 10e824: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10e829: 8d 65 f4 lea -0xc(%ebp),%esp 10e82c: 5b pop %ebx 10e82d: 5e pop %esi 10e82e: 5f pop %edi 10e82f: c9 leave 10e830: c3 ret 10e831: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10e834: 8b 45 0c mov 0xc(%ebp),%eax 10e837: 25 00 0a 00 00 and $0xa00,%eax 10e83c: 3d 00 0a 00 00 cmp $0xa00,%eax 10e841: 74 65 je 10e8a8 10e843: 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 ); 10e844: 8d 45 dc lea -0x24(%ebp),%eax 10e847: 50 push %eax 10e848: ff 75 e4 pushl -0x1c(%ebp) 10e84b: 68 c0 d6 12 00 push $0x12d6c0 10e850: e8 eb 1f 00 00 call 110840 <_Objects_Get> 10e855: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10e858: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10e85b: e8 f0 28 00 00 call 111150 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10e860: e8 eb 28 00 00 call 111150 <_Thread_Enable_dispatch> goto return_id; 10e865: 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; 10e868: 8b 45 e0 mov -0x20(%ebp),%eax 10e86b: 83 c0 08 add $0x8,%eax #endif return id; } 10e86e: 8d 65 f4 lea -0xc(%ebp),%esp 10e871: 5b pop %ebx 10e872: 5e pop %esi 10e873: 5f pop %edi 10e874: c9 leave 10e875: c3 ret 10e876: 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 ); 10e878: 8b 45 14 mov 0x14(%ebp),%eax 10e87b: 89 45 d4 mov %eax,-0x2c(%ebp) 10e87e: e9 76 ff ff ff jmp 10e7f9 10e883: 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( 10e884: 8d 45 e0 lea -0x20(%ebp),%eax 10e887: 50 push %eax 10e888: ff 75 d4 pushl -0x2c(%ebp) 10e88b: 6a 00 push $0x0 10e88d: 56 push %esi 10e88e: e8 05 60 00 00 call 114898 <_POSIX_Semaphore_Create_support> 10e893: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10e895: e8 b6 28 00 00 call 111150 <_Thread_Enable_dispatch> if ( status == -1 ) 10e89a: 83 c4 10 add $0x10,%esp 10e89d: 43 inc %ebx 10e89e: 75 c8 jne 10e868 return SEM_FAILED; 10e8a0: b8 ff ff ff ff mov $0xffffffff,%eax 10e8a5: eb c7 jmp 10e86e 10e8a7: 90 nop <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10e8a8: e8 a3 28 00 00 call 111150 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10e8ad: e8 f6 8d 00 00 call 1176a8 <__errno> 10e8b2: c7 00 11 00 00 00 movl $0x11,(%eax) 10e8b8: b8 ff ff ff ff mov $0xffffffff,%eax 10e8bd: eb af jmp 10e86e =============================================================================== 0010e8c0 : */ int sem_post( sem_t *sem ) { 10e8c0: 55 push %ebp 10e8c1: 89 e5 mov %esp,%ebp 10e8c3: 83 ec 1c sub $0x1c,%esp register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); 10e8c6: 8d 45 f4 lea -0xc(%ebp),%eax 10e8c9: 50 push %eax 10e8ca: 8b 45 08 mov 0x8(%ebp),%eax 10e8cd: ff 30 pushl (%eax) 10e8cf: 68 c0 d6 12 00 push $0x12d6c0 10e8d4: e8 67 1f 00 00 call 110840 <_Objects_Get> switch ( location ) { 10e8d9: 83 c4 10 add $0x10,%esp 10e8dc: 8b 4d f4 mov -0xc(%ebp),%ecx 10e8df: 85 c9 test %ecx,%ecx 10e8e1: 74 15 je 10e8f8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e8e3: e8 c0 8d 00 00 call 1176a8 <__errno> 10e8e8: c7 00 16 00 00 00 movl $0x16,(%eax) 10e8ee: b8 ff ff ff ff mov $0xffffffff,%eax } 10e8f3: c9 leave 10e8f4: c3 ret 10e8f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10e8f8: 52 push %edx 10e8f9: 6a 00 push $0x0 10e8fb: ff 70 08 pushl 0x8(%eax) 10e8fe: 83 c0 1c add $0x1c,%eax 10e901: 50 push %eax 10e902: e8 55 15 00 00 call 10fe5c <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10e907: e8 44 28 00 00 call 111150 <_Thread_Enable_dispatch> return 0; 10e90c: 83 c4 10 add $0x10,%esp 10e90f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e911: c9 leave 10e912: c3 ret =============================================================================== 0010e914 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10e914: 55 push %ebp 10e915: 89 e5 mov %esp,%ebp 10e917: 53 push %ebx 10e918: 83 ec 1c sub $0x1c,%esp 10e91b: 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 ); 10e91e: 8d 45 f4 lea -0xc(%ebp),%eax 10e921: 50 push %eax 10e922: ff 75 0c pushl 0xc(%ebp) 10e925: e8 02 54 00 00 call 113d2c <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10e92a: 83 c4 10 add $0x10,%esp 10e92d: 83 f8 03 cmp $0x3,%eax 10e930: 74 16 je 10e948 <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e932: 50 push %eax <== NOT EXECUTED 10e933: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10e936: 6a 00 push $0x0 <== NOT EXECUTED 10e938: 53 push %ebx <== NOT EXECUTED 10e939: e8 22 61 00 00 call 114a60 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED 10e93e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } return lock_status; } 10e941: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e944: c9 leave <== NOT EXECUTED 10e945: c3 ret <== NOT EXECUTED 10e946: 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 ); 10e948: 52 push %edx 10e949: ff 75 f4 pushl -0xc(%ebp) 10e94c: 6a 01 push $0x1 10e94e: 53 push %ebx 10e94f: e8 0c 61 00 00 call 114a60 <_POSIX_Semaphore_Wait_support> 10e954: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10e957: 8b 5d fc mov -0x4(%ebp),%ebx 10e95a: c9 leave 10e95b: c3 ret =============================================================================== 0010b37c : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10b37c: 55 push %ebp 10b37d: 89 e5 mov %esp,%ebp 10b37f: 83 ec 08 sub $0x8,%esp if ( !value ) 10b382: 8b 55 0c mov 0xc(%ebp),%edx 10b385: 85 d2 test %edx,%edx 10b387: 74 33 je 10b3bc rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10b389: 8b 45 10 mov 0x10(%ebp),%eax 10b38c: 85 c0 test %eax,%eax 10b38e: 74 2c je 10b3bc rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b390: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b394: 76 12 jbe 10b3a8 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b396: e8 01 87 00 00 call 113a9c <__errno> 10b39b: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b3a1: b8 ff ff ff ff mov $0xffffffff,%eax 10b3a6: c9 leave 10b3a7: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b3a8: e8 ef 86 00 00 call 113a9c <__errno> 10b3ad: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b3b3: b8 ff ff ff ff mov $0xffffffff,%eax 10b3b8: c9 leave 10b3b9: c3 ret 10b3ba: 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 ); 10b3bc: e8 db 86 00 00 call 113a9c <__errno> 10b3c1: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b3c7: eb d8 jmp 10b3a1 =============================================================================== 0010bdbc : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10bdbc: 55 push %ebp 10bdbd: 89 e5 mov %esp,%ebp 10bdbf: 57 push %edi 10bdc0: 56 push %esi 10bdc1: 53 push %ebx 10bdc2: 83 ec 1c sub $0x1c,%esp 10bdc5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bdc8: 8b 45 0c mov 0xc(%ebp),%eax 10bdcb: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10bdce: 85 d2 test %edx,%edx 10bdd0: 74 13 je 10bde5 *oact = _POSIX_signals_Vectors[ sig ]; 10bdd2: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10bdd5: 8d 34 8d 20 9c 12 00 lea 0x129c20(,%ecx,4),%esi 10bddc: b9 03 00 00 00 mov $0x3,%ecx 10bde1: 89 d7 mov %edx,%edi 10bde3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10bde5: 85 db test %ebx,%ebx 10bde7: 74 77 je 10be60 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10bde9: 8d 53 ff lea -0x1(%ebx),%edx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10bdec: 83 fa 1f cmp $0x1f,%edx 10bdef: 77 6f ja 10be60 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10bdf1: 83 fb 09 cmp $0x9,%ebx 10bdf4: 74 6a je 10be60 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10bdf6: 85 c0 test %eax,%eax 10bdf8: 74 62 je 10be5c <== 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 ); 10bdfa: 9c pushf 10bdfb: fa cli 10bdfc: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10bdff: 8b 50 08 mov 0x8(%eax),%edx 10be02: 85 d2 test %edx,%edx 10be04: 74 36 je 10be3c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10be06: 83 ec 0c sub $0xc,%esp 10be09: 53 push %ebx 10be0a: 89 45 e0 mov %eax,-0x20(%ebp) 10be0d: e8 96 56 00 00 call 1114a8 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10be12: 8d 14 5b lea (%ebx,%ebx,2),%edx 10be15: 8d 14 95 20 9c 12 00 lea 0x129c20(,%edx,4),%edx 10be1c: b9 03 00 00 00 mov $0x3,%ecx 10be21: 8b 45 e0 mov -0x20(%ebp),%eax 10be24: 89 d7 mov %edx,%edi 10be26: 89 c6 mov %eax,%esi 10be28: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10be2a: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10be2d: ff 75 e4 pushl -0x1c(%ebp) 10be30: 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; 10be31: 31 c0 xor %eax,%eax } 10be33: 8d 65 f4 lea -0xc(%ebp),%esp 10be36: 5b pop %ebx 10be37: 5e pop %esi 10be38: 5f pop %edi 10be39: c9 leave 10be3a: c3 ret 10be3b: 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 ]; 10be3c: 8d 34 5b lea (%ebx,%ebx,2),%esi 10be3f: c1 e6 02 shl $0x2,%esi 10be42: 8d 86 20 9c 12 00 lea 0x129c20(%esi),%eax 10be48: 81 c6 20 32 12 00 add $0x123220,%esi 10be4e: b9 03 00 00 00 mov $0x3,%ecx 10be53: 89 c7 mov %eax,%edi 10be55: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10be57: eb d4 jmp 10be2d 10be59: 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; 10be5c: 31 c0 xor %eax,%eax <== NOT EXECUTED 10be5e: eb d3 jmp 10be33 <== 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 ); 10be60: e8 0b 85 00 00 call 114370 <__errno> 10be65: c7 00 16 00 00 00 movl $0x16,(%eax) 10be6b: b8 ff ff ff ff mov $0xffffffff,%eax 10be70: eb c1 jmp 10be33 =============================================================================== 0010be74 : int sigaddset( sigset_t *set, int signo ) { 10be74: 55 push %ebp 10be75: 89 e5 mov %esp,%ebp 10be77: 83 ec 08 sub $0x8,%esp 10be7a: 8b 45 08 mov 0x8(%ebp),%eax 10be7d: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10be80: 85 c0 test %eax,%eax 10be82: 74 18 je 10be9c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10be84: 85 c9 test %ecx,%ecx 10be86: 74 14 je 10be9c 10be88: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10be89: 83 f9 1f cmp $0x1f,%ecx 10be8c: 77 0e ja 10be9c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10be8e: ba 01 00 00 00 mov $0x1,%edx 10be93: d3 e2 shl %cl,%edx rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 10be95: 09 10 or %edx,(%eax) return 0; 10be97: 31 c0 xor %eax,%eax } 10be99: c9 leave 10be9a: c3 ret 10be9b: 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 ); 10be9c: e8 cf 84 00 00 call 114370 <__errno> 10bea1: c7 00 16 00 00 00 movl $0x16,(%eax) 10bea7: b8 ff ff ff ff mov $0xffffffff,%eax *set |= signo_to_mask(signo); return 0; } 10beac: c9 leave 10bead: c3 ret =============================================================================== 0010dc24 : int sigdelset( sigset_t *set, int signo ) { 10dc24: 55 push %ebp 10dc25: 89 e5 mov %esp,%ebp 10dc27: 83 ec 08 sub $0x8,%esp 10dc2a: 8b 45 08 mov 0x8(%ebp),%eax 10dc2d: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10dc30: 85 c0 test %eax,%eax 10dc32: 74 1c je 10dc50 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10dc34: 85 c9 test %ecx,%ecx 10dc36: 74 14 je 10dc4c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10dc38: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10dc39: 83 f9 1f cmp $0x1f,%ecx 10dc3c: 77 12 ja 10dc50 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10dc3e: ba fe ff ff ff mov $0xfffffffe,%edx rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); 10dc43: d3 c2 rol %cl,%edx 10dc45: 21 10 and %edx,(%eax) return 0; 10dc47: 31 c0 xor %eax,%eax } 10dc49: c9 leave 10dc4a: c3 ret 10dc4b: 90 nop <== NOT EXECUTED { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) return 0; 10dc4c: 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; } 10dc4e: c9 leave 10dc4f: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dc50: e8 c7 84 00 00 call 11611c <__errno> 10dc55: c7 00 16 00 00 00 movl $0x16,(%eax) 10dc5b: b8 ff ff ff ff mov $0xffffffff,%eax *set &= ~signo_to_mask(signo); return 0; } 10dc60: c9 leave 10dc61: c3 ret =============================================================================== 0010dcbc : int sigismember( const sigset_t *set, int signo ) { 10dcbc: 55 push %ebp 10dcbd: 89 e5 mov %esp,%ebp 10dcbf: 83 ec 08 sub $0x8,%esp 10dcc2: 8b 45 08 mov 0x8(%ebp),%eax 10dcc5: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10dcc8: 85 c0 test %eax,%eax 10dcca: 74 20 je 10dcec rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10dccc: 85 c9 test %ecx,%ecx 10dcce: 74 18 je 10dce8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10dcd0: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10dcd1: 83 f9 1f cmp $0x1f,%ecx 10dcd4: 77 16 ja 10dcec static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 10dcd6: ba 01 00 00 00 mov $0x1,%edx 10dcdb: d3 e2 shl %cl,%edx const sigset_t *set, int signo ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dcdd: 85 10 test %edx,(%eax) 10dcdf: 0f 95 c0 setne %al 10dce2: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dce5: c9 leave 10dce6: c3 ret 10dce7: 90 nop <== NOT EXECUTED { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) return 0; 10dce8: 31 c0 xor %eax,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dcea: c9 leave 10dceb: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10dcec: e8 2b 84 00 00 call 11611c <__errno> 10dcf1: c7 00 16 00 00 00 movl $0x16,(%eax) 10dcf7: b8 ff ff ff ff mov $0xffffffff,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10dcfc: c9 leave 10dcfd: c3 ret =============================================================================== 0010dd60 : #include int sigsuspend( const sigset_t *sigmask ) { 10dd60: 55 push %ebp 10dd61: 89 e5 mov %esp,%ebp 10dd63: 56 push %esi 10dd64: 53 push %ebx 10dd65: 83 ec 14 sub $0x14,%esp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 10dd68: 8d 5d f4 lea -0xc(%ebp),%ebx 10dd6b: 53 push %ebx 10dd6c: ff 75 08 pushl 0x8(%ebp) 10dd6f: 6a 01 push $0x1 10dd71: e8 c6 ff ff ff call 10dd3c (void) sigfillset( &all_signals ); 10dd76: 8d 75 f0 lea -0x10(%ebp),%esi 10dd79: 89 34 24 mov %esi,(%esp) 10dd7c: e8 0f ff ff ff call 10dc90 status = sigtimedwait( &all_signals, NULL, NULL ); 10dd81: 83 c4 0c add $0xc,%esp 10dd84: 6a 00 push $0x0 10dd86: 6a 00 push $0x0 10dd88: 56 push %esi 10dd89: e8 76 00 00 00 call 10de04 10dd8e: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10dd90: 83 c4 0c add $0xc,%esp 10dd93: 6a 00 push $0x0 10dd95: 53 push %ebx 10dd96: 6a 00 push $0x0 10dd98: e8 9f ff ff ff call 10dd3c /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10dd9d: 83 c4 10 add $0x10,%esp 10dda0: 46 inc %esi 10dda1: 75 0d jne 10ddb0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 10dda3: b8 ff ff ff ff mov $0xffffffff,%eax 10dda8: 8d 65 f8 lea -0x8(%ebp),%esp 10ddab: 5b pop %ebx 10ddac: 5e pop %esi 10ddad: c9 leave 10ddae: c3 ret 10ddaf: 90 nop <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 10ddb0: e8 67 83 00 00 call 11611c <__errno> 10ddb5: c7 00 04 00 00 00 movl $0x4,(%eax) 10ddbb: eb e6 jmp 10dda3 =============================================================================== 0010c198 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10c198: 55 push %ebp 10c199: 89 e5 mov %esp,%ebp 10c19b: 57 push %edi 10c19c: 56 push %esi 10c19d: 53 push %ebx 10c19e: 83 ec 2c sub $0x2c,%esp 10c1a1: 8b 75 08 mov 0x8(%ebp),%esi 10c1a4: 8b 5d 0c mov 0xc(%ebp),%ebx 10c1a7: 8b 7d 10 mov 0x10(%ebp),%edi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10c1aa: 85 f6 test %esi,%esi 10c1ac: 0f 84 7a 01 00 00 je 10c32c /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10c1b2: 85 ff test %edi,%edi 10c1b4: 0f 84 1e 01 00 00 je 10c2d8 if ( !_Timespec_Is_valid( timeout ) ) 10c1ba: 83 ec 0c sub $0xc,%esp 10c1bd: 57 push %edi 10c1be: e8 15 35 00 00 call 10f6d8 <_Timespec_Is_valid> 10c1c3: 83 c4 10 add $0x10,%esp 10c1c6: 84 c0 test %al,%al 10c1c8: 0f 84 5e 01 00 00 je 10c32c rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10c1ce: 83 ec 0c sub $0xc,%esp 10c1d1: 57 push %edi 10c1d2: e8 69 35 00 00 call 10f740 <_Timespec_To_ticks> if ( !interval ) 10c1d7: 83 c4 10 add $0x10,%esp 10c1da: 85 c0 test %eax,%eax 10c1dc: 0f 84 4a 01 00 00 je 10c32c <== NEVER TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c1e2: 85 db test %ebx,%ebx 10c1e4: 0f 84 f8 00 00 00 je 10c2e2 <== NEVER TAKEN the_thread = _Thread_Executing; 10c1ea: 8b 15 78 a2 12 00 mov 0x12a278,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c1f0: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10c1f6: 9c pushf 10c1f7: fa cli 10c1f8: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10c1fb: 8b 0e mov (%esi),%ecx 10c1fd: 89 4d d4 mov %ecx,-0x2c(%ebp) 10c200: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx 10c206: 85 4d d4 test %ecx,-0x2c(%ebp) 10c209: 0f 85 dd 00 00 00 jne 10c2ec return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10c20f: 8b 0d a8 a4 12 00 mov 0x12a4a8,%ecx 10c215: 85 4d d4 test %ecx,-0x2c(%ebp) 10c218: 75 7e jne 10c298 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10c21a: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10c220: 8b 0d b4 9c 12 00 mov 0x129cb4,%ecx 10c226: 41 inc %ecx 10c227: 89 0d b4 9c 12 00 mov %ecx,0x129cb4 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10c22d: c7 42 44 40 a4 12 00 movl $0x12a440,0x44(%edx) the_thread->Wait.return_code = EINTR; 10c234: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10c23b: 8b 0e mov (%esi),%ecx 10c23d: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10c240: 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; 10c243: c7 05 70 a4 12 00 01 movl $0x1,0x12a470 10c24a: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10c24d: ff 75 d0 pushl -0x30(%ebp) 10c250: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10c251: 52 push %edx 10c252: 68 74 f2 10 00 push $0x10f274 10c257: 50 push %eax 10c258: 68 40 a4 12 00 push $0x12a440 10c25d: e8 c2 2c 00 00 call 10ef24 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c262: e8 d1 27 00 00 call 10ea38 <_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 ); 10c267: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c26e: 6a 00 push $0x0 10c270: 53 push %ebx 10c271: ff 33 pushl (%ebx) 10c273: 57 push %edi 10c274: e8 cf 58 00 00 call 111b48 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10c279: 83 c4 20 add $0x20,%esp 10c27c: e8 e7 86 00 00 call 114968 <__errno> 10c281: 8b 15 78 a2 12 00 mov 0x12a278,%edx 10c287: 8b 52 34 mov 0x34(%edx),%edx 10c28a: 89 10 mov %edx,(%eax) return the_info->si_signo; 10c28c: 8b 33 mov (%ebx),%esi } 10c28e: 89 f0 mov %esi,%eax 10c290: 8d 65 f4 lea -0xc(%ebp),%esp 10c293: 5b pop %ebx 10c294: 5e pop %esi 10c295: 5f pop %edi 10c296: c9 leave 10c297: c3 ret } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10c298: 83 ec 0c sub $0xc,%esp 10c29b: 51 push %ecx 10c29c: e8 b3 fe ff ff call 10c154 <_POSIX_signals_Get_highest> 10c2a1: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10c2a3: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c2aa: 6a 01 push $0x1 10c2ac: 53 push %ebx 10c2ad: 50 push %eax 10c2ae: 57 push %edi 10c2af: e8 94 58 00 00 call 111b48 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10c2b4: ff 75 d0 pushl -0x30(%ebp) 10c2b7: 9d popf the_info->si_signo = signo; 10c2b8: 89 33 mov %esi,(%ebx) the_info->si_code = SI_USER; 10c2ba: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c2c1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10c2c8: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10c2cb: 89 f0 mov %esi,%eax 10c2cd: 8d 65 f4 lea -0xc(%ebp),%esp 10c2d0: 5b pop %ebx 10c2d1: 5e pop %esi 10c2d2: 5f pop %edi 10c2d3: c9 leave 10c2d4: c3 ret 10c2d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; 10c2d8: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c2da: 85 db test %ebx,%ebx 10c2dc: 0f 85 08 ff ff ff jne 10c1ea 10c2e2: 8d 5d dc lea -0x24(%ebp),%ebx 10c2e5: e9 00 ff ff ff jmp 10c1ea 10c2ea: 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_highest( api->signals_pending ); 10c2ec: 83 ec 0c sub $0xc,%esp 10c2ef: 51 push %ecx 10c2f0: e8 5f fe ff ff call 10c154 <_POSIX_signals_Get_highest> 10c2f5: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10c2f7: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c2fe: 6a 00 push $0x0 10c300: 53 push %ebx 10c301: 50 push %eax 10c302: 57 push %edi 10c303: e8 40 58 00 00 call 111b48 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10c308: ff 75 d0 pushl -0x30(%ebp) 10c30b: 9d popf the_info->si_code = SI_USER; 10c30c: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c313: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10c31a: 8b 33 mov (%ebx),%esi 10c31c: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10c31f: 89 f0 mov %esi,%eax 10c321: 8d 65 f4 lea -0xc(%ebp),%esp 10c324: 5b pop %ebx 10c325: 5e pop %esi 10c326: 5f pop %edi 10c327: c9 leave 10c328: c3 ret 10c329: 8d 76 00 lea 0x0(%esi),%esi <== 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 ); 10c32c: e8 37 86 00 00 call 114968 <__errno> 10c331: c7 00 16 00 00 00 movl $0x16,(%eax) 10c337: be ff ff ff ff mov $0xffffffff,%esi 10c33c: e9 4d ff ff ff jmp 10c28e =============================================================================== 0010dfc8 : int sigwait( const sigset_t *set, int *sig ) { 10dfc8: 55 push %ebp 10dfc9: 89 e5 mov %esp,%ebp 10dfcb: 53 push %ebx 10dfcc: 83 ec 08 sub $0x8,%esp 10dfcf: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10dfd2: 6a 00 push $0x0 10dfd4: 6a 00 push $0x0 10dfd6: ff 75 08 pushl 0x8(%ebp) 10dfd9: e8 26 fe ff ff call 10de04 if ( status != -1 ) { 10dfde: 83 c4 10 add $0x10,%esp 10dfe1: 83 f8 ff cmp $0xffffffff,%eax 10dfe4: 74 0e je 10dff4 if ( sig ) 10dfe6: 85 db test %ebx,%ebx 10dfe8: 74 16 je 10e000 <== NEVER TAKEN *sig = status; 10dfea: 89 03 mov %eax,(%ebx) return 0; 10dfec: 31 c0 xor %eax,%eax } return errno; } 10dfee: 8b 5d fc mov -0x4(%ebp),%ebx 10dff1: c9 leave 10dff2: c3 ret 10dff3: 90 nop <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 10dff4: e8 23 81 00 00 call 11611c <__errno> 10dff9: 8b 00 mov (%eax),%eax } 10dffb: 8b 5d fc mov -0x4(%ebp),%ebx 10dffe: c9 leave 10dfff: c3 ret status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 10e000: 31 c0 xor %eax,%eax <== NOT EXECUTED } return errno; } 10e002: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e005: c9 leave <== NOT EXECUTED 10e006: c3 ret <== NOT EXECUTED =============================================================================== 0010b22c : */ long sysconf( int name ) { 10b22c: 55 push %ebp 10b22d: 89 e5 mov %esp,%ebp 10b22f: 83 ec 08 sub $0x8,%esp 10b232: 8b 45 08 mov 0x8(%ebp),%eax if ( name == _SC_CLK_TCK ) 10b235: 83 f8 02 cmp $0x2,%eax 10b238: 74 16 je 10b250 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 10b23a: 83 f8 04 cmp $0x4,%eax 10b23d: 74 21 je 10b260 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b23f: 83 f8 33 cmp $0x33,%eax 10b242: 74 24 je 10b268 return 1024; if ( name == _SC_PAGESIZE ) 10b244: 83 f8 08 cmp $0x8,%eax 10b247: 75 27 jne 10b270 return PAGE_SIZE; 10b249: 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 ); } 10b24e: c9 leave 10b24f: c3 ret long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 10b250: b8 40 42 0f 00 mov $0xf4240,%eax 10b255: 31 d2 xor %edx,%edx 10b257: f7 35 6c 42 12 00 divl 0x12426c if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b25d: c9 leave 10b25e: c3 ret 10b25f: 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; 10b260: a1 4c 41 12 00 mov 0x12414c,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b265: c9 leave 10b266: c3 ret 10b267: 90 nop <== NOT EXECUTED if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) return 1024; 10b268: 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 ); } 10b26d: c9 leave 10b26e: c3 ret 10b26f: 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 ); 10b270: e8 e7 86 00 00 call 11395c <__errno> 10b275: c7 00 16 00 00 00 movl $0x16,(%eax) 10b27b: b8 ff ff ff ff mov $0xffffffff,%eax } 10b280: c9 leave 10b281: c3 ret =============================================================================== 0010b578 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10b578: 55 push %ebp 10b579: 89 e5 mov %esp,%ebp 10b57b: 56 push %esi 10b57c: 53 push %ebx 10b57d: 8b 5d 0c mov 0xc(%ebp),%ebx 10b580: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10b583: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10b587: 0f 85 db 00 00 00 jne 10b668 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10b58d: 85 f6 test %esi,%esi 10b58f: 0f 84 d3 00 00 00 je 10b668 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10b595: 85 db test %ebx,%ebx 10b597: 74 21 je 10b5ba /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10b599: 8b 03 mov (%ebx),%eax 10b59b: 48 dec %eax 10b59c: 83 f8 01 cmp $0x1,%eax 10b59f: 0f 87 c3 00 00 00 ja 10b668 <== 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 ) 10b5a5: 8b 43 04 mov 0x4(%ebx),%eax 10b5a8: 85 c0 test %eax,%eax 10b5aa: 0f 84 b8 00 00 00 je 10b668 <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10b5b0: 48 dec %eax rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10b5b1: 83 f8 1f cmp $0x1f,%eax 10b5b4: 0f 87 ae 00 00 00 ja 10b668 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b5ba: a1 14 99 12 00 mov 0x129914,%eax 10b5bf: 40 inc %eax 10b5c0: a3 14 99 12 00 mov %eax,0x129914 * 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 ); 10b5c5: 83 ec 0c sub $0xc,%esp 10b5c8: 68 80 9c 12 00 push $0x129c80 10b5cd: e8 7e 1e 00 00 call 10d450 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10b5d2: 83 c4 10 add $0x10,%esp 10b5d5: 85 c0 test %eax,%eax 10b5d7: 0f 84 a2 00 00 00 je 10b67f 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; 10b5dd: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10b5e1: 8b 15 d8 9e 12 00 mov 0x129ed8,%edx 10b5e7: 8b 52 08 mov 0x8(%edx),%edx 10b5ea: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10b5ed: 85 db test %ebx,%ebx 10b5ef: 74 11 je 10b602 ptimer->inf.sigev_notify = evp->sigev_notify; 10b5f1: 8b 13 mov (%ebx),%edx 10b5f3: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10b5f6: 8b 53 04 mov 0x4(%ebx),%edx 10b5f9: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10b5fc: 8b 53 08 mov 0x8(%ebx),%edx 10b5ff: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10b602: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10b609: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10b610: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10b617: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10b61e: 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; 10b625: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b62c: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b633: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b63a: 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 ), 10b641: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b644: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b647: 8b 0d 9c 9c 12 00 mov 0x129c9c,%ecx 10b64d: 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; 10b650: 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; 10b657: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b659: e8 32 2b 00 00 call 10e190 <_Thread_Enable_dispatch> return 0; 10b65e: 31 c0 xor %eax,%eax } 10b660: 8d 65 f8 lea -0x8(%ebp),%esp 10b663: 5b pop %ebx 10b664: 5e pop %esi 10b665: c9 leave 10b666: c3 ret 10b667: 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 ); 10b668: e8 ab 8a 00 00 call 114118 <__errno> 10b66d: c7 00 16 00 00 00 movl $0x16,(%eax) 10b673: 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; } 10b678: 8d 65 f8 lea -0x8(%ebp),%esp 10b67b: 5b pop %ebx 10b67c: 5e pop %esi 10b67d: c9 leave 10b67e: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10b67f: e8 0c 2b 00 00 call 10e190 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10b684: e8 8f 8a 00 00 call 114118 <__errno> 10b689: c7 00 0b 00 00 00 movl $0xb,(%eax) 10b68f: b8 ff ff ff ff mov $0xffffffff,%eax 10b694: eb ca jmp 10b660 =============================================================================== 0010babc : int timer_delete( timer_t timerid ) { 10babc: 55 push %ebp 10babd: 89 e5 mov %esp,%ebp 10babf: 53 push %ebx 10bac0: 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 ); 10bac3: 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 ); 10bac6: 50 push %eax 10bac7: ff 75 08 pushl 0x8(%ebp) 10baca: 68 40 97 12 00 push $0x129740 10bacf: e8 88 21 00 00 call 10dc5c <_Objects_Get> 10bad4: 89 c3 mov %eax,%ebx switch ( location ) { 10bad6: 83 c4 10 add $0x10,%esp 10bad9: 8b 4d f4 mov -0xc(%ebp),%ecx 10badc: 85 c9 test %ecx,%ecx 10bade: 74 18 je 10baf8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10bae0: e8 53 8d 00 00 call 114838 <__errno> 10bae5: c7 00 16 00 00 00 movl $0x16,(%eax) 10baeb: b8 ff ff ff ff mov $0xffffffff,%eax } 10baf0: 8b 5d fc mov -0x4(%ebp),%ebx 10baf3: c9 leave 10baf4: c3 ret 10baf5: 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 ); 10baf8: 83 ec 08 sub $0x8,%esp 10bafb: 50 push %eax 10bafc: 68 40 97 12 00 push $0x129740 10bb01: e8 22 1d 00 00 call 10d828 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10bb06: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10bb0a: 8d 43 10 lea 0x10(%ebx),%eax 10bb0d: 89 04 24 mov %eax,(%esp) 10bb10: e8 77 3b 00 00 call 10f68c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10bb15: 58 pop %eax 10bb16: 5a pop %edx 10bb17: 53 push %ebx 10bb18: 68 40 97 12 00 push $0x129740 10bb1d: e8 02 20 00 00 call 10db24 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10bb22: e8 c5 29 00 00 call 10e4ec <_Thread_Enable_dispatch> return 0; 10bb27: 83 c4 10 add $0x10,%esp 10bb2a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10bb2c: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2f: c9 leave 10bb30: c3 ret =============================================================================== 0010c97c : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10c97c: 55 push %ebp 10c97d: 89 e5 mov %esp,%ebp 10c97f: 53 push %ebx 10c980: 83 ec 18 sub $0x18,%esp int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); 10c983: 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 ); 10c986: 50 push %eax 10c987: ff 75 08 pushl 0x8(%ebp) 10c98a: 68 20 b2 12 00 push $0x12b220 10c98f: e8 10 21 00 00 call 10eaa4 <_Objects_Get> switch ( location ) { 10c994: 83 c4 10 add $0x10,%esp 10c997: 8b 55 f4 mov -0xc(%ebp),%edx 10c99a: 85 d2 test %edx,%edx 10c99c: 74 1a je 10c9b8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c99e: e8 d5 88 00 00 call 115278 <__errno> 10c9a3: c7 00 16 00 00 00 movl $0x16,(%eax) 10c9a9: bb ff ff ff ff mov $0xffffffff,%ebx } 10c9ae: 89 d8 mov %ebx,%eax 10c9b0: 8b 5d fc mov -0x4(%ebp),%ebx 10c9b3: c9 leave 10c9b4: c3 ret 10c9b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10c9b8: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10c9bb: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10c9c2: e8 6d 29 00 00 call 10f334 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c9c7: 89 d8 mov %ebx,%eax 10c9c9: 8b 5d fc mov -0x4(%ebp),%ebx 10c9cc: c9 leave 10c9cd: c3 ret =============================================================================== 0010c9d0 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10c9d0: 55 push %ebp 10c9d1: 89 e5 mov %esp,%ebp 10c9d3: 56 push %esi 10c9d4: 53 push %ebx 10c9d5: 83 ec 10 sub $0x10,%esp 10c9d8: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10c9db: 85 db test %ebx,%ebx 10c9dd: 74 65 je 10ca44 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10c9df: 83 ec 0c sub $0xc,%esp 10c9e2: 8d 45 ec lea -0x14(%ebp),%eax 10c9e5: 50 push %eax 10c9e6: e8 f1 16 00 00 call 10e0dc <_TOD_Get> 10c9eb: 83 c4 0c add $0xc,%esp ptimer = _POSIX_Timer_Get( timerid, &location ); 10c9ee: 8d 45 f4 lea -0xc(%ebp),%eax 10c9f1: 50 push %eax 10c9f2: ff 75 08 pushl 0x8(%ebp) 10c9f5: 68 20 b2 12 00 push $0x12b220 10c9fa: e8 a5 20 00 00 call 10eaa4 <_Objects_Get> 10c9ff: 89 c6 mov %eax,%esi switch ( location ) { 10ca01: 83 c4 10 add $0x10,%esp 10ca04: 8b 45 f4 mov -0xc(%ebp),%eax 10ca07: 85 c0 test %eax,%eax 10ca09: 75 39 jne 10ca44 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10ca0b: a1 04 b0 12 00 mov 0x12b004,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10ca10: 83 ec 08 sub $0x8,%esp 10ca13: 8d 53 08 lea 0x8(%ebx),%edx 10ca16: 52 push %edx case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10ca17: 8b 56 1c mov 0x1c(%esi),%edx 10ca1a: 03 56 24 add 0x24(%esi),%edx case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = 10ca1d: 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 ); 10ca1f: 52 push %edx 10ca20: e8 af 35 00 00 call 10ffd4 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10ca25: 8b 46 54 mov 0x54(%esi),%eax 10ca28: 8b 56 58 mov 0x58(%esi),%edx 10ca2b: 89 03 mov %eax,(%ebx) 10ca2d: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10ca30: e8 ff 28 00 00 call 10f334 <_Thread_Enable_dispatch> return 0; 10ca35: 83 c4 10 add $0x10,%esp 10ca38: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ca3a: 8d 65 f8 lea -0x8(%ebp),%esp 10ca3d: 5b pop %ebx 10ca3e: 5e pop %esi 10ca3f: c9 leave 10ca40: c3 ret 10ca41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10ca44: e8 2f 88 00 00 call 115278 <__errno> 10ca49: c7 00 16 00 00 00 movl $0x16,(%eax) 10ca4f: b8 ff ff ff ff mov $0xffffffff,%eax 10ca54: eb e4 jmp 10ca3a =============================================================================== 0010b698 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10b698: 55 push %ebp 10b699: 89 e5 mov %esp,%ebp 10b69b: 57 push %edi 10b69c: 56 push %esi 10b69d: 53 push %ebx 10b69e: 83 ec 3c sub $0x3c,%esp 10b6a1: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10b6a4: 85 db test %ebx,%ebx 10b6a6: 0f 84 50 01 00 00 je 10b7fc <== 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) ) ) { 10b6ac: 83 ec 0c sub $0xc,%esp 10b6af: 8d 43 08 lea 0x8(%ebx),%eax 10b6b2: 50 push %eax 10b6b3: e8 9c 37 00 00 call 10ee54 <_Timespec_Is_valid> 10b6b8: 83 c4 10 add $0x10,%esp 10b6bb: 84 c0 test %al,%al 10b6bd: 0f 84 39 01 00 00 je 10b7fc rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !_Timespec_Is_valid( &(value->it_interval) ) ) { 10b6c3: 83 ec 0c sub $0xc,%esp 10b6c6: 53 push %ebx 10b6c7: e8 88 37 00 00 call 10ee54 <_Timespec_Is_valid> 10b6cc: 83 c4 10 add $0x10,%esp 10b6cf: 84 c0 test %al,%al 10b6d1: 0f 84 25 01 00 00 je 10b7fc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10b6d7: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10b6db: 0f 84 db 00 00 00 je 10b7bc 10b6e1: 8b 45 0c mov 0xc(%ebp),%eax 10b6e4: 85 c0 test %eax,%eax 10b6e6: 0f 85 10 01 00 00 jne 10b7fc rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b6ec: 8d 45 cc lea -0x34(%ebp),%eax 10b6ef: 89 45 c4 mov %eax,-0x3c(%ebp) 10b6f2: b9 04 00 00 00 mov $0x4,%ecx 10b6f7: 89 c7 mov %eax,%edi 10b6f9: 89 de mov %ebx,%esi 10b6fb: 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 ); 10b6fd: 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 ); 10b6fe: 8d 45 e4 lea -0x1c(%ebp),%eax 10b701: 50 push %eax 10b702: ff 75 08 pushl 0x8(%ebp) 10b705: 68 80 9c 12 00 push $0x129c80 10b70a: e8 f1 21 00 00 call 10d900 <_Objects_Get> 10b70f: 89 c2 mov %eax,%edx switch ( location ) { 10b711: 83 c4 10 add $0x10,%esp 10b714: 8b 7d e4 mov -0x1c(%ebp),%edi 10b717: 85 ff test %edi,%edi 10b719: 0f 85 dd 00 00 00 jne 10b7fc 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 ) { 10b71f: 8b 75 d4 mov -0x2c(%ebp),%esi 10b722: 85 f6 test %esi,%esi 10b724: 75 0b jne 10b731 10b726: 8b 4d d8 mov -0x28(%ebp),%ecx 10b729: 85 c9 test %ecx,%ecx 10b72b: 0f 84 df 00 00 00 je 10b810 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10b731: 83 ec 0c sub $0xc,%esp 10b734: 53 push %ebx 10b735: 89 55 c0 mov %edx,-0x40(%ebp) 10b738: e8 7f 37 00 00 call 10eebc <_Timespec_To_ticks> 10b73d: 8b 55 c0 mov -0x40(%ebp),%edx 10b740: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10b743: 8d 45 d4 lea -0x2c(%ebp),%eax 10b746: 89 04 24 mov %eax,(%esp) 10b749: e8 6e 37 00 00 call 10eebc <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10b74e: 8b 55 c0 mov -0x40(%ebp),%edx 10b751: 89 14 24 mov %edx,(%esp) 10b754: 68 7c b8 10 00 push $0x10b87c 10b759: ff 72 08 pushl 0x8(%edx) 10b75c: 50 push %eax 10b75d: 8d 42 10 lea 0x10(%edx),%eax 10b760: 50 push %eax 10b761: e8 06 60 00 00 call 11176c <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10b766: 83 c4 20 add $0x20,%esp 10b769: 84 c0 test %al,%al 10b76b: 8b 55 c0 mov -0x40(%ebp),%edx 10b76e: 0f 84 e8 00 00 00 je 10b85c /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10b774: 8b 45 14 mov 0x14(%ebp),%eax 10b777: 85 c0 test %eax,%eax 10b779: 0f 84 ed 00 00 00 je 10b86c *ovalue = ptimer->timer_data; 10b77f: 8d 42 54 lea 0x54(%edx),%eax 10b782: b9 04 00 00 00 mov $0x4,%ecx 10b787: 8b 7d 14 mov 0x14(%ebp),%edi 10b78a: 89 c6 mov %eax,%esi 10b78c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10b78e: b9 04 00 00 00 mov $0x4,%ecx 10b793: 89 c7 mov %eax,%edi 10b795: 8b 75 c4 mov -0x3c(%ebp),%esi 10b798: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b79a: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10b79e: 83 ec 0c sub $0xc,%esp 10b7a1: 83 c2 6c add $0x6c,%edx 10b7a4: 52 push %edx 10b7a5: e8 b2 17 00 00 call 10cf5c <_TOD_Get> _Thread_Enable_dispatch(); 10b7aa: e8 e1 29 00 00 call 10e190 <_Thread_Enable_dispatch> return 0; 10b7af: 83 c4 10 add $0x10,%esp 10b7b2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7b4: 8d 65 f4 lea -0xc(%ebp),%esp 10b7b7: 5b pop %ebx 10b7b8: 5e pop %esi 10b7b9: 5f pop %edi 10b7ba: c9 leave 10b7bb: c3 ret if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b7bc: 8d 45 cc lea -0x34(%ebp),%eax 10b7bf: 89 45 c4 mov %eax,-0x3c(%ebp) 10b7c2: 89 c7 mov %eax,%edi 10b7c4: 89 de mov %ebx,%esi 10b7c6: 8b 4d 0c mov 0xc(%ebp),%ecx 10b7c9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10b7cb: 83 ec 0c sub $0xc,%esp 10b7ce: 8d 75 dc lea -0x24(%ebp),%esi 10b7d1: 56 push %esi 10b7d2: e8 85 17 00 00 call 10cf5c <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10b7d7: 59 pop %ecx 10b7d8: 5f pop %edi 10b7d9: 8d 7d d4 lea -0x2c(%ebp),%edi 10b7dc: 57 push %edi 10b7dd: 56 push %esi 10b7de: e8 4d 36 00 00 call 10ee30 <_Timespec_Greater_than> 10b7e3: 83 c4 10 add $0x10,%esp 10b7e6: 84 c0 test %al,%al 10b7e8: 75 12 jne 10b7fc rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10b7ea: 52 push %edx 10b7eb: 57 push %edi 10b7ec: 57 push %edi 10b7ed: 56 push %esi 10b7ee: e8 89 36 00 00 call 10ee7c <_Timespec_Subtract> 10b7f3: 83 c4 10 add $0x10,%esp 10b7f6: e9 02 ff ff ff jmp 10b6fd 10b7fb: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b7fc: e8 17 89 00 00 call 114118 <__errno> 10b801: c7 00 16 00 00 00 movl $0x16,(%eax) 10b807: b8 ff ff ff ff mov $0xffffffff,%eax 10b80c: eb a6 jmp 10b7b4 10b80e: 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 ); 10b810: 83 ec 0c sub $0xc,%esp 10b813: 8d 40 10 lea 0x10(%eax),%eax 10b816: 50 push %eax 10b817: 89 55 c0 mov %edx,-0x40(%ebp) 10b81a: e8 c9 3a 00 00 call 10f2e8 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10b81f: 83 c4 10 add $0x10,%esp 10b822: 8b 55 14 mov 0x14(%ebp),%edx 10b825: 85 d2 test %edx,%edx 10b827: 8b 55 c0 mov -0x40(%ebp),%edx 10b82a: 74 48 je 10b874 *ovalue = ptimer->timer_data; 10b82c: 8d 42 54 lea 0x54(%edx),%eax 10b82f: b9 04 00 00 00 mov $0x4,%ecx 10b834: 8b 7d 14 mov 0x14(%ebp),%edi 10b837: 89 c6 mov %eax,%esi 10b839: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10b83b: b9 04 00 00 00 mov $0x4,%ecx 10b840: 89 c7 mov %eax,%edi 10b842: 8b 75 c4 mov -0x3c(%ebp),%esi 10b845: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b847: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10b84b: e8 40 29 00 00 call 10e190 <_Thread_Enable_dispatch> return 0; 10b850: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b852: 8d 65 f4 lea -0xc(%ebp),%esp 10b855: 5b pop %ebx 10b856: 5e pop %esi 10b857: 5f pop %edi 10b858: c9 leave 10b859: c3 ret 10b85a: 66 90 xchg %ax,%ax <== NOT EXECUTED ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10b85c: e8 2f 29 00 00 call 10e190 <_Thread_Enable_dispatch> return 0; 10b861: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b863: 8d 65 f4 lea -0xc(%ebp),%esp 10b866: 5b pop %ebx 10b867: 5e pop %esi 10b868: 5f pop %edi 10b869: c9 leave 10b86a: c3 ret 10b86b: 90 nop <== NOT EXECUTED 10b86c: 8d 42 54 lea 0x54(%edx),%eax 10b86f: e9 1a ff ff ff jmp 10b78e 10b874: 8d 42 54 lea 0x54(%edx),%eax 10b877: eb c2 jmp 10b83b =============================================================================== 0010b498 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10b498: 55 push %ebp 10b499: 89 e5 mov %esp,%ebp 10b49b: 56 push %esi 10b49c: 53 push %ebx 10b49d: 83 ec 10 sub $0x10,%esp 10b4a0: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10b4a3: 8b 0d 7c 9e 12 00 mov 0x129e7c,%ecx 10b4a9: 85 c9 test %ecx,%ecx 10b4ab: 0f 84 8f 00 00 00 je 10b540 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10b4b1: 83 ec 0c sub $0xc,%esp 10b4b4: 68 60 9e 12 00 push $0x129e60 10b4b9: e8 a6 39 00 00 call 10ee64 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10b4be: 83 e8 02 sub $0x2,%eax 10b4c1: 83 c4 10 add $0x10,%esp 10b4c4: 83 f8 01 cmp $0x1,%eax 10b4c7: 0f 86 a3 00 00 00 jbe 10b570 <== ALWAYS TAKEN useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 10b4cd: 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 ) { 10b4cf: 85 db test %ebx,%ebx 10b4d1: 74 62 je 10b535 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10b4d3: ba 83 de 1b 43 mov $0x431bde83,%edx 10b4d8: 89 d8 mov %ebx,%eax 10b4da: f7 e2 mul %edx 10b4dc: c1 ea 12 shr $0x12,%edx 10b4df: 89 55 f0 mov %edx,-0x10(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10b4e2: 8d 04 92 lea (%edx,%edx,4),%eax 10b4e5: 8d 04 80 lea (%eax,%eax,4),%eax 10b4e8: 8d 04 80 lea (%eax,%eax,4),%eax 10b4eb: 8d 04 80 lea (%eax,%eax,4),%eax 10b4ee: 8d 04 80 lea (%eax,%eax,4),%eax 10b4f1: 8d 04 80 lea (%eax,%eax,4),%eax 10b4f4: c1 e0 06 shl $0x6,%eax 10b4f7: 29 c3 sub %eax,%ebx 10b4f9: 8d 04 9b lea (%ebx,%ebx,4),%eax 10b4fc: 8d 04 80 lea (%eax,%eax,4),%eax 10b4ff: 8d 04 80 lea (%eax,%eax,4),%eax 10b502: c1 e0 03 shl $0x3,%eax 10b505: 89 45 f4 mov %eax,-0xc(%ebp) ticks = _Timespec_To_ticks( &tp ); 10b508: 83 ec 0c sub $0xc,%esp 10b50b: 8d 5d f0 lea -0x10(%ebp),%ebx 10b50e: 53 push %ebx 10b50f: e8 ac 34 00 00 call 10e9c0 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10b514: 89 1c 24 mov %ebx,(%esp) 10b517: e8 a4 34 00 00 call 10e9c0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b51c: a3 6c 9e 12 00 mov %eax,0x129e6c _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b521: 58 pop %eax 10b522: 5a pop %edx 10b523: 68 60 9e 12 00 push $0x129e60 10b528: 68 a4 95 12 00 push $0x1295a4 10b52d: e8 fa 37 00 00 call 10ed2c <_Watchdog_Insert> 10b532: 83 c4 10 add $0x10,%esp } return remaining; } 10b535: 89 f0 mov %esi,%eax 10b537: 8d 65 f8 lea -0x8(%ebp),%esp 10b53a: 5b pop %ebx 10b53b: 5e pop %esi 10b53c: c9 leave 10b53d: c3 ret 10b53e: 66 90 xchg %ax,%ax <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b540: c7 05 68 9e 12 00 00 movl $0x0,0x129e68 10b547: 00 00 00 the_watchdog->routine = routine; 10b54a: c7 05 7c 9e 12 00 5c movl $0x10b45c,0x129e7c 10b551: b4 10 00 the_watchdog->id = id; 10b554: c7 05 80 9e 12 00 00 movl $0x0,0x129e80 10b55b: 00 00 00 the_watchdog->user_data = user_data; 10b55e: c7 05 84 9e 12 00 00 movl $0x0,0x129e84 10b565: 00 00 00 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 10b568: 31 f6 xor %esi,%esi 10b56a: e9 60 ff ff ff jmp 10b4cf 10b56f: 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); 10b570: a1 74 9e 12 00 mov 0x129e74,%eax 10b575: 03 05 6c 9e 12 00 add 0x129e6c,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10b57b: 83 ec 08 sub $0x8,%esp 10b57e: 8d 55 f0 lea -0x10(%ebp),%edx 10b581: 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); 10b582: 2b 05 78 9e 12 00 sub 0x129e78,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10b588: 50 push %eax 10b589: e8 aa 33 00 00 call 10e938 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10b58e: 8b 45 f0 mov -0x10(%ebp),%eax 10b591: 8d 04 80 lea (%eax,%eax,4),%eax 10b594: 8d 04 80 lea (%eax,%eax,4),%eax 10b597: 8d 04 80 lea (%eax,%eax,4),%eax 10b59a: 8d 04 80 lea (%eax,%eax,4),%eax 10b59d: 8d 04 80 lea (%eax,%eax,4),%eax 10b5a0: 8d 0c 80 lea (%eax,%eax,4),%ecx 10b5a3: c1 e1 06 shl $0x6,%ecx remaining += tp.tv_nsec / 1000; 10b5a6: 8b 75 f4 mov -0xc(%ebp),%esi 10b5a9: b8 d3 4d 62 10 mov $0x10624dd3,%eax 10b5ae: f7 ee imul %esi 10b5b0: 89 d0 mov %edx,%eax 10b5b2: c1 f8 06 sar $0x6,%eax 10b5b5: c1 fe 1f sar $0x1f,%esi 10b5b8: 29 f0 sub %esi,%eax 10b5ba: 8d 34 08 lea (%eax,%ecx,1),%esi 10b5bd: 83 c4 10 add $0x10,%esp 10b5c0: e9 0a ff ff ff jmp 10b4cf