0010e040 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e040: 55 push %ebp 10e041: 89 e5 mov %esp,%ebp 10e043: 57 push %edi 10e044: 56 push %esi 10e045: 53 push %ebx 10e046: 83 ec 1c sub $0x1c,%esp 10e049: 8b 5d 08 mov 0x8(%ebp),%ebx 10e04c: 8b 7d 0c mov 0xc(%ebp),%edi 10e04f: 8b 4d 14 mov 0x14(%ebp),%ecx 10e052: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e055: 8b 35 98 a3 12 00 mov 0x12a398,%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 ); 10e05b: 9c pushf 10e05c: fa cli 10e05d: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10e060: 8b 43 44 mov 0x44(%ebx),%eax 10e063: 85 c0 test %eax,%eax 10e065: 75 1d jne 10e084 <_CORE_RWLock_Obtain_for_reading+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e067: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10e06e: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e071: ff 75 e4 pushl -0x1c(%ebp) 10e074: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e075: 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 */ } 10e07c: 8d 65 f4 lea -0xc(%ebp),%esp 10e07f: 5b pop %ebx 10e080: 5e pop %esi 10e081: 5f pop %edi 10e082: c9 leave 10e083: 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 ) { 10e084: 48 dec %eax 10e085: 74 51 je 10e0d8 <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e087: 84 d2 test %dl,%dl 10e089: 75 15 jne 10e0a0 <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e08b: ff 75 e4 pushl -0x1c(%ebp) 10e08e: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e08f: 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 */ } 10e096: 8d 65 f4 lea -0xc(%ebp),%esp 10e099: 5b pop %ebx 10e09a: 5e pop %esi 10e09b: 5f pop %edi 10e09c: c9 leave 10e09d: c3 ret 10e09e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e0a0: 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; 10e0a7: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e0aa: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e0ad: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e0b4: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e0bb: ff 75 e4 pushl -0x1c(%ebp) 10e0be: 9d popf _Thread_queue_Enqueue_with_handler( 10e0bf: c7 45 10 44 e2 10 00 movl $0x10e244,0x10(%ebp) 10e0c6: 89 4d 0c mov %ecx,0xc(%ebp) 10e0c9: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e0cc: 8d 65 f4 lea -0xc(%ebp),%esp 10e0cf: 5b pop %ebx 10e0d0: 5e pop %esi 10e0d1: 5f pop %edi 10e0d2: 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( 10e0d3: e9 4c 19 00 00 jmp 10fa24 <_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 ); 10e0d8: 83 ec 0c sub $0xc,%esp 10e0db: 53 push %ebx 10e0dc: 88 55 e0 mov %dl,-0x20(%ebp) 10e0df: 89 4d dc mov %ecx,-0x24(%ebp) 10e0e2: e8 5d 1c 00 00 call 10fd44 <_Thread_queue_First> if ( !waiter ) { 10e0e7: 83 c4 10 add $0x10,%esp 10e0ea: 85 c0 test %eax,%eax 10e0ec: 8a 55 e0 mov -0x20(%ebp),%dl 10e0ef: 8b 4d dc mov -0x24(%ebp),%ecx 10e0f2: 75 93 jne 10e087 <_CORE_RWLock_Obtain_for_reading+0x47> the_rwlock->number_of_readers += 1; 10e0f4: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e0f7: ff 75 e4 pushl -0x1c(%ebp) 10e0fa: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e0fb: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e102: e9 75 ff ff ff jmp 10e07c <_CORE_RWLock_Obtain_for_reading+0x3c> 0010e108 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e108: 55 push %ebp 10e109: 89 e5 mov %esp,%ebp 10e10b: 57 push %edi 10e10c: 56 push %esi 10e10d: 53 push %ebx 10e10e: 83 ec 0c sub $0xc,%esp 10e111: 8b 45 08 mov 0x8(%ebp),%eax 10e114: 8b 7d 0c mov 0xc(%ebp),%edi 10e117: 8b 75 14 mov 0x14(%ebp),%esi 10e11a: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e11d: 8b 15 98 a3 12 00 mov 0x12a398,%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 ); 10e123: 9c pushf 10e124: fa cli 10e125: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e126: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e12a: 75 18 jne 10e144 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e12c: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e133: 51 push %ecx 10e134: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e135: 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 */ } 10e13c: 83 c4 0c add $0xc,%esp 10e13f: 5b pop %ebx 10e140: 5e pop %esi 10e141: 5f pop %edi 10e142: c9 leave 10e143: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e144: 84 db test %bl,%bl 10e146: 75 14 jne 10e15c <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e148: 51 push %ecx 10e149: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e14a: 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 */ } 10e151: 83 c4 0c add $0xc,%esp 10e154: 5b pop %ebx 10e155: 5e pop %esi 10e156: 5f pop %edi 10e157: c9 leave 10e158: c3 ret 10e159: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10e15c: 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; 10e163: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e166: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e169: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e170: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e177: 51 push %ecx 10e178: 9d popf _Thread_queue_Enqueue_with_handler( 10e179: c7 45 10 44 e2 10 00 movl $0x10e244,0x10(%ebp) 10e180: 89 75 0c mov %esi,0xc(%ebp) 10e183: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e186: 83 c4 0c add $0xc,%esp 10e189: 5b pop %ebx 10e18a: 5e pop %esi 10e18b: 5f pop %edi 10e18c: 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( 10e18d: e9 92 18 00 00 jmp 10fa24 <_Thread_queue_Enqueue_with_handler> 0010e194 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e194: 55 push %ebp 10e195: 89 e5 mov %esp,%ebp 10e197: 53 push %ebx 10e198: 83 ec 04 sub $0x4,%esp 10e19b: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e19e: 8b 0d 98 a3 12 00 mov 0x12a398,%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 ); 10e1a4: 9c pushf 10e1a5: fa cli 10e1a6: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e1a7: 8b 43 44 mov 0x44(%ebx),%eax 10e1aa: 85 c0 test %eax,%eax 10e1ac: 74 7a je 10e228 <_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 ) { 10e1ae: 48 dec %eax 10e1af: 74 63 je 10e214 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e1b1: 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; 10e1b8: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e1bf: 52 push %edx 10e1c0: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e1c1: 83 ec 0c sub $0xc,%esp 10e1c4: 53 push %ebx 10e1c5: e8 3e 17 00 00 call 10f908 <_Thread_queue_Dequeue> if ( next ) { 10e1ca: 83 c4 10 add $0x10,%esp 10e1cd: 85 c0 test %eax,%eax 10e1cf: 74 39 je 10e20a <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e1d1: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e1d5: 74 61 je 10e238 <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e1d7: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e1da: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e1e1: eb 17 jmp 10e1fa <_CORE_RWLock_Release+0x66> 10e1e3: 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 || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10e1e4: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e1e8: 74 20 je 10e20a <_CORE_RWLock_Release+0x76> return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10e1ea: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e1ed: 83 ec 08 sub $0x8,%esp 10e1f0: 50 push %eax 10e1f1: 53 push %ebx 10e1f2: e8 35 1a 00 00 call 10fc2c <_Thread_queue_Extract> } 10e1f7: 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 ); 10e1fa: 83 ec 0c sub $0xc,%esp 10e1fd: 53 push %ebx 10e1fe: e8 41 1b 00 00 call 10fd44 <_Thread_queue_First> if ( !next || 10e203: 83 c4 10 add $0x10,%esp 10e206: 85 c0 test %eax,%eax 10e208: 75 da jne 10e1e4 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e20a: 31 c0 xor %eax,%eax 10e20c: 8b 5d fc mov -0x4(%ebp),%ebx 10e20f: c9 leave 10e210: c3 ret 10e211: 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; 10e214: 8b 43 48 mov 0x48(%ebx),%eax 10e217: 48 dec %eax 10e218: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e21b: 85 c0 test %eax,%eax 10e21d: 74 92 je 10e1b1 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e21f: 52 push %edx 10e220: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e221: 31 c0 xor %eax,%eax 10e223: 8b 5d fc mov -0x4(%ebp),%ebx 10e226: c9 leave 10e227: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e228: 52 push %edx 10e229: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e22a: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e231: 31 c0 xor %eax,%eax 10e233: 8b 5d fc mov -0x4(%ebp),%ebx 10e236: c9 leave 10e237: 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; 10e238: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e23f: eb c9 jmp 10e20a <_CORE_RWLock_Release+0x76> 00112ce8 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 112ce8: 55 push %ebp 112ce9: 89 e5 mov %esp,%ebp 112ceb: 57 push %edi 112cec: 56 push %esi 112ced: 53 push %ebx 112cee: 83 ec 1c sub $0x1c,%esp 112cf1: 8b 45 08 mov 0x8(%ebp),%eax 112cf4: 8b 5d 0c mov 0xc(%ebp),%ebx 112cf7: 8b 75 14 mov 0x14(%ebp),%esi 112cfa: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 112cfd: 8b 15 d8 77 12 00 mov 0x1277d8,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 112d03: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 112d0a: 9c pushf 112d0b: fa cli 112d0c: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 112d0f: 8b 48 48 mov 0x48(%eax),%ecx 112d12: 41 inc %ecx 112d13: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 112d16: 83 78 40 00 cmpl $0x0,0x40(%eax) 112d1a: 75 05 jne 112d21 <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 112d1c: 3b 48 44 cmp 0x44(%eax),%ecx 112d1f: 74 2b je 112d4c <_CORE_barrier_Wait+0x64> 112d21: 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; 112d28: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 112d2b: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 112d2e: ff 75 e4 pushl -0x1c(%ebp) 112d31: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 112d32: c7 45 10 14 dd 10 00 movl $0x10dd14,0x10(%ebp) 112d39: 89 75 0c mov %esi,0xc(%ebp) 112d3c: 89 45 08 mov %eax,0x8(%ebp) } 112d3f: 83 c4 1c add $0x1c,%esp 112d42: 5b pop %ebx 112d43: 5e pop %esi 112d44: 5f pop %edi 112d45: 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 ); 112d46: e9 b9 ac ff ff jmp 10da04 <_Thread_queue_Enqueue_with_handler> 112d4b: 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; 112d4c: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 112d53: ff 75 e4 pushl -0x1c(%ebp) 112d56: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 112d57: 89 7d 10 mov %edi,0x10(%ebp) 112d5a: 89 5d 0c mov %ebx,0xc(%ebp) 112d5d: 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 ); } 112d60: 83 c4 1c add $0x1c,%esp 112d63: 5b pop %ebx 112d64: 5e pop %esi 112d65: 5f pop %edi 112d66: 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 ); 112d67: e9 4c ff ff ff jmp 112cb8 <_CORE_barrier_Release> 0011947c <_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 ) { 11947c: 55 push %ebp 11947d: 89 e5 mov %esp,%ebp 11947f: 57 push %edi 119480: 56 push %esi 119481: 53 push %ebx 119482: 83 ec 1c sub $0x1c,%esp 119485: 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 ) { 119488: 8b 45 10 mov 0x10(%ebp),%eax 11948b: 39 43 4c cmp %eax,0x4c(%ebx) 11948e: 72 60 jb 1194f0 <_CORE_message_queue_Broadcast+0x74> * 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 ) { 119490: 8b 43 48 mov 0x48(%ebx),%eax 119493: 85 c0 test %eax,%eax 119495: 75 45 jne 1194dc <_CORE_message_queue_Broadcast+0x60> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 119497: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11949e: eb 18 jmp 1194b8 <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 1194a0: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1194a3: 8b 42 2c mov 0x2c(%edx),%eax 1194a6: 89 c7 mov %eax,%edi 1194a8: 8b 75 0c mov 0xc(%ebp),%esi 1194ab: 8b 4d 10 mov 0x10(%ebp),%ecx 1194ae: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1194b0: 8b 42 28 mov 0x28(%edx),%eax 1194b3: 8b 55 10 mov 0x10(%ebp),%edx 1194b6: 89 10 mov %edx,(%eax) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 1194b8: 83 ec 0c sub $0xc,%esp 1194bb: 53 push %ebx 1194bc: e8 db 24 00 00 call 11b99c <_Thread_queue_Dequeue> 1194c1: 89 c2 mov %eax,%edx /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 1194c3: 83 c4 10 add $0x10,%esp 1194c6: 85 c0 test %eax,%eax 1194c8: 75 d6 jne 1194a0 <_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; 1194ca: 8b 55 e4 mov -0x1c(%ebp),%edx 1194cd: 8b 45 1c mov 0x1c(%ebp),%eax 1194d0: 89 10 mov %edx,(%eax) 1194d2: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1194d4: 8d 65 f4 lea -0xc(%ebp),%esp 1194d7: 5b pop %ebx 1194d8: 5e pop %esi 1194d9: 5f pop %edi 1194da: c9 leave 1194db: 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; 1194dc: 8b 55 1c mov 0x1c(%ebp),%edx 1194df: c7 02 00 00 00 00 movl $0x0,(%edx) 1194e5: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1194e7: 8d 65 f4 lea -0xc(%ebp),%esp 1194ea: 5b pop %ebx 1194eb: 5e pop %esi 1194ec: 5f pop %edi 1194ed: c9 leave 1194ee: c3 ret 1194ef: 90 nop <== NOT EXECUTED { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 1194f0: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1194f5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1194f8: 5b pop %ebx <== NOT EXECUTED 1194f9: 5e pop %esi <== NOT EXECUTED 1194fa: 5f pop %edi <== NOT EXECUTED 1194fb: c9 leave <== NOT EXECUTED 1194fc: c3 ret <== NOT EXECUTED 00114bac <_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 ) { 114bac: 55 push %ebp 114bad: 89 e5 mov %esp,%ebp 114baf: 57 push %edi 114bb0: 56 push %esi 114bb1: 53 push %ebx 114bb2: 83 ec 0c sub $0xc,%esp 114bb5: 8b 5d 08 mov 0x8(%ebp),%ebx 114bb8: 8b 75 10 mov 0x10(%ebp),%esi 114bbb: 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; 114bbe: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114bc1: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114bc8: 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; 114bcb: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 114bd2: 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)) { 114bd9: a8 03 test $0x3,%al 114bdb: 75 1b jne 114bf8 <_CORE_message_queue_Initialize+0x4c> 114bdd: 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)); 114bdf: 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 * 114be2: 89 f8 mov %edi,%eax 114be4: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114be7: 39 d0 cmp %edx,%eax 114be9: 73 25 jae 114c10 <_CORE_message_queue_Initialize+0x64> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114beb: 31 c0 xor %eax,%eax } 114bed: 8d 65 f4 lea -0xc(%ebp),%esp 114bf0: 5b pop %ebx 114bf1: 5e pop %esi 114bf2: 5f pop %edi 114bf3: c9 leave 114bf4: c3 ret 114bf5: 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)) { allocated_message_size += sizeof(uint32_t); 114bf8: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114bfb: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114bfe: 39 d0 cmp %edx,%eax 114c00: 77 e9 ja 114beb <_CORE_message_queue_Initialize+0x3f> /* * 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)); 114c02: 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 * 114c05: 89 f8 mov %edi,%eax 114c07: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c0a: 39 d0 cmp %edx,%eax 114c0c: 72 dd jb 114beb <_CORE_message_queue_Initialize+0x3f> 114c0e: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114c10: 83 ec 0c sub $0xc,%esp 114c13: 50 push %eax 114c14: e8 a7 29 00 00 call 1175c0 <_Workspace_Allocate> 114c19: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114c1c: 83 c4 10 add $0x10,%esp 114c1f: 85 c0 test %eax,%eax 114c21: 74 c8 je 114beb <_CORE_message_queue_Initialize+0x3f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114c23: 57 push %edi 114c24: 56 push %esi 114c25: 50 push %eax 114c26: 8d 43 68 lea 0x68(%ebx),%eax 114c29: 50 push %eax 114c2a: e8 0d 4d 00 00 call 11993c <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 114c2f: 8d 43 54 lea 0x54(%ebx),%eax 114c32: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 114c35: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 114c3c: 8d 43 50 lea 0x50(%ebx),%eax 114c3f: 89 43 58 mov %eax,0x58(%ebx) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 114c42: 6a 06 push $0x6 114c44: 68 80 00 00 00 push $0x80 114c49: 8b 45 0c mov 0xc(%ebp),%eax 114c4c: 83 38 01 cmpl $0x1,(%eax) 114c4f: 0f 94 c0 sete %al 114c52: 0f b6 c0 movzbl %al,%eax 114c55: 50 push %eax 114c56: 53 push %ebx 114c57: e8 4c 1f 00 00 call 116ba8 <_Thread_queue_Initialize> 114c5c: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114c5e: 83 c4 20 add $0x20,%esp } 114c61: 8d 65 f4 lea -0xc(%ebp),%esp 114c64: 5b pop %ebx 114c65: 5e pop %esi 114c66: 5f pop %edi 114c67: c9 leave 114c68: c3 ret 00110a6c <_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 ) { 110a6c: 55 push %ebp 110a6d: 89 e5 mov %esp,%ebp 110a6f: 56 push %esi 110a70: 53 push %ebx 110a71: 8b 45 08 mov 0x8(%ebp),%eax 110a74: 8b 55 0c mov 0xc(%ebp),%edx 110a77: 8b 4d 10 mov 0x10(%ebp),%ecx 110a7a: 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 ) { 110a7d: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 110a83: 74 53 je 110ad8 <_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 ) { 110a85: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 110a8b: 74 6f je 110afc <_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; 110a8d: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110a90: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 110a93: 39 f3 cmp %esi,%ebx 110a95: 74 05 je 110a9c <_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 ) { 110a97: 3b 4b 08 cmp 0x8(%ebx),%ecx 110a9a: 7d 2c jge 110ac8 <_CORE_message_queue_Insert_message+0x5c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 110a9c: 9c pushf 110a9d: fa cli 110a9e: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a9f: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 110aa2: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 110aa5: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 110aa8: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 110aaa: 89 11 mov %edx,(%ecx) the_node->next = before_node; 110aac: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 110aae: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 110ab1: 56 push %esi 110ab2: 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 ) 110ab3: 8b 50 60 mov 0x60(%eax),%edx 110ab6: 85 d2 test %edx,%edx 110ab8: 74 3d je 110af7 <_CORE_message_queue_Insert_message+0x8b> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 110aba: 8b 40 64 mov 0x64(%eax),%eax 110abd: 89 45 08 mov %eax,0x8(%ebp) #endif } 110ac0: 5b pop %ebx 110ac1: 5e pop %esi 110ac2: 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); 110ac3: ff e2 jmp *%edx 110ac5: 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; 110ac8: 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 ) ) { 110aca: 39 f3 cmp %esi,%ebx 110acc: 74 ce je 110a9c <_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 ) { 110ace: 3b 4b 08 cmp 0x8(%ebx),%ecx 110ad1: 7c c9 jl 110a9c <_CORE_message_queue_Insert_message+0x30> 110ad3: eb f3 jmp 110ac8 <_CORE_message_queue_Insert_message+0x5c> 110ad5: 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 ); 110ad8: 9c pushf 110ad9: fa cli 110ada: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110adb: ff 40 48 incl 0x48(%eax) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 110ade: 8d 48 54 lea 0x54(%eax),%ecx 110ae1: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 110ae3: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 110ae6: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 110ae9: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 110aeb: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 110aee: 53 push %ebx 110aef: 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 ) 110af0: 8b 50 60 mov 0x60(%eax),%edx 110af3: 85 d2 test %edx,%edx 110af5: 75 c3 jne 110aba <_CORE_message_queue_Insert_message+0x4e> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 110af7: 5b pop %ebx 110af8: 5e pop %esi 110af9: c9 leave 110afa: c3 ret 110afb: 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 ); 110afc: 9c pushf 110afd: fa cli 110afe: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110aff: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110b02: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 110b05: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 110b08: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 110b0b: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 110b0e: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 110b10: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 110b13: 53 push %ebx 110b14: 9d popf 110b15: eb 9c jmp 110ab3 <_CORE_message_queue_Insert_message+0x47> 00114c6c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114c6c: 55 push %ebp 114c6d: 89 e5 mov %esp,%ebp 114c6f: 57 push %edi 114c70: 56 push %esi 114c71: 53 push %ebx 114c72: 83 ec 2c sub $0x2c,%esp 114c75: 8b 55 08 mov 0x8(%ebp),%edx 114c78: 8b 45 0c mov 0xc(%ebp),%eax 114c7b: 89 45 dc mov %eax,-0x24(%ebp) 114c7e: 8b 4d 10 mov 0x10(%ebp),%ecx 114c81: 89 4d e0 mov %ecx,-0x20(%ebp) 114c84: 8b 45 14 mov 0x14(%ebp),%eax 114c87: 8b 5d 1c mov 0x1c(%ebp),%ebx 114c8a: 89 5d d8 mov %ebx,-0x28(%ebp) 114c8d: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114c91: 8b 0d 38 12 13 00 mov 0x131238,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114c97: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114c9e: 9c pushf 114c9f: fa cli 114ca0: 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)); 114ca3: 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; 114ca6: 8d 72 54 lea 0x54(%edx),%esi 114ca9: 39 f3 cmp %esi,%ebx 114cab: 74 7b je 114d28 <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114cad: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 114caf: 89 4a 50 mov %ecx,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 114cb2: 8d 72 50 lea 0x50(%edx),%esi 114cb5: 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; 114cb8: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 114cbb: ff 75 e4 pushl -0x1c(%ebp) 114cbe: 9d popf *size_p = the_message->Contents.size; 114cbf: 8b 4b 0c mov 0xc(%ebx),%ecx 114cc2: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 114cc4: 8b 73 08 mov 0x8(%ebx),%esi 114cc7: 8b 0d 38 12 13 00 mov 0x131238,%ecx 114ccd: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114cd0: 8d 4b 10 lea 0x10(%ebx),%ecx 114cd3: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114cd6: 8b 08 mov (%eax),%ecx 114cd8: 8b 7d e0 mov -0x20(%ebp),%edi 114cdb: 8b 75 e4 mov -0x1c(%ebp),%esi 114cde: 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 ); 114ce0: 83 ec 0c sub $0xc,%esp 114ce3: 52 push %edx 114ce4: 89 55 d4 mov %edx,-0x2c(%ebp) 114ce7: e8 40 1b 00 00 call 11682c <_Thread_queue_Dequeue> if ( !the_thread ) { 114cec: 83 c4 10 add $0x10,%esp 114cef: 85 c0 test %eax,%eax 114cf1: 8b 55 d4 mov -0x2c(%ebp),%edx 114cf4: 0f 84 86 00 00 00 je 114d80 <_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; 114cfa: 8b 48 24 mov 0x24(%eax),%ecx 114cfd: 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; 114d00: 8b 48 30 mov 0x30(%eax),%ecx 114d03: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114d06: 8b 70 2c mov 0x2c(%eax),%esi 114d09: 8b 7d e4 mov -0x1c(%ebp),%edi 114d0c: 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( 114d0e: 8b 43 08 mov 0x8(%ebx),%eax 114d11: 89 45 10 mov %eax,0x10(%ebp) 114d14: 89 5d 0c mov %ebx,0xc(%ebp) 114d17: 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 ); } 114d1a: 8d 65 f4 lea -0xc(%ebp),%esp 114d1d: 5b pop %ebx 114d1e: 5e pop %esi 114d1f: 5f pop %edi 114d20: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 114d21: e9 56 4c 00 00 jmp 11997c <_CORE_message_queue_Insert_message> 114d26: 66 90 xchg %ax,%ax <== NOT EXECUTED return; } #endif } if ( !wait ) { 114d28: 89 fb mov %edi,%ebx 114d2a: 84 db test %bl,%bl 114d2c: 75 16 jne 114d44 <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 114d2e: ff 75 e4 pushl -0x1c(%ebp) 114d31: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114d32: 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 ); } 114d39: 8d 65 f4 lea -0xc(%ebp),%esp 114d3c: 5b pop %ebx 114d3d: 5e pop %esi 114d3e: 5f pop %edi 114d3f: c9 leave 114d40: c3 ret 114d41: 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; 114d44: 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; 114d4b: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 114d4e: 8b 5d dc mov -0x24(%ebp),%ebx 114d51: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114d54: 8b 5d e0 mov -0x20(%ebp),%ebx 114d57: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114d5a: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114d5d: ff 75 e4 pushl -0x1c(%ebp) 114d60: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114d61: c7 45 10 58 6c 11 00 movl $0x116c58,0x10(%ebp) 114d68: 8b 45 d8 mov -0x28(%ebp),%eax 114d6b: 89 45 0c mov %eax,0xc(%ebp) 114d6e: 89 55 08 mov %edx,0x8(%ebp) } 114d71: 8d 65 f4 lea -0xc(%ebp),%esp 114d74: 5b pop %ebx 114d75: 5e pop %esi 114d76: 5f pop %edi 114d77: 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 ); 114d78: e9 cb 1b 00 00 jmp 116948 <_Thread_queue_Enqueue_with_handler> 114d7d: 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 ); 114d80: 89 5d 0c mov %ebx,0xc(%ebp) 114d83: 83 c2 68 add $0x68,%edx 114d86: 89 55 08 mov %edx,0x8(%ebp) } 114d89: 8d 65 f4 lea -0xc(%ebp),%esp 114d8c: 5b pop %ebx 114d8d: 5e pop %esi 114d8e: 5f pop %edi 114d8f: c9 leave 114d90: e9 97 fd ff ff jmp 114b2c <_Chain_Append> 0010bf00 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10bf00: 55 push %ebp 10bf01: 89 e5 mov %esp,%ebp 10bf03: 57 push %edi 10bf04: 56 push %esi 10bf05: 53 push %ebx 10bf06: 83 ec 1c sub $0x1c,%esp 10bf09: 8b 5d 08 mov 0x8(%ebp),%ebx 10bf0c: 8b 75 0c mov 0xc(%ebp),%esi 10bf0f: 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 ) { 10bf12: 8b 45 10 mov 0x10(%ebp),%eax 10bf15: 39 43 4c cmp %eax,0x4c(%ebx) 10bf18: 72 2e jb 10bf48 <_CORE_message_queue_Submit+0x48> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10bf1a: 8b 43 48 mov 0x48(%ebx),%eax 10bf1d: 85 c0 test %eax,%eax 10bf1f: 74 37 je 10bf58 <_CORE_message_queue_Submit+0x58> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 10bf21: 39 43 44 cmp %eax,0x44(%ebx) 10bf24: 0f 87 b6 00 00 00 ja 10bfe0 <_CORE_message_queue_Submit+0xe0> /* * 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 ) { 10bf2a: 84 c9 test %cl,%cl 10bf2c: 0f 84 ea 00 00 00 je 10c01c <_CORE_message_queue_Submit+0x11c> /* * 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() ) { 10bf32: a1 b4 77 12 00 mov 0x1277b4,%eax 10bf37: 85 c0 test %eax,%eax 10bf39: 74 5d je 10bf98 <_CORE_message_queue_Submit+0x98> 10bf3b: 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 } 10bf40: 8d 65 f4 lea -0xc(%ebp),%esp 10bf43: 5b pop %ebx 10bf44: 5e pop %esi 10bf45: 5f pop %edi 10bf46: c9 leave 10bf47: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bf48: 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 } 10bf4d: 8d 65 f4 lea -0xc(%ebp),%esp 10bf50: 5b pop %ebx 10bf51: 5e pop %esi 10bf52: 5f pop %edi 10bf53: c9 leave 10bf54: c3 ret 10bf55: 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 ); 10bf58: 83 ec 0c sub $0xc,%esp 10bf5b: 53 push %ebx 10bf5c: 88 4d e4 mov %cl,-0x1c(%ebp) 10bf5f: e8 84 19 00 00 call 10d8e8 <_Thread_queue_Dequeue> 10bf64: 89 c2 mov %eax,%edx if ( the_thread ) { 10bf66: 83 c4 10 add $0x10,%esp 10bf69: 85 c0 test %eax,%eax 10bf6b: 8a 4d e4 mov -0x1c(%ebp),%cl 10bf6e: 0f 84 b8 00 00 00 je 10c02c <_CORE_message_queue_Submit+0x12c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10bf74: 8b 40 2c mov 0x2c(%eax),%eax 10bf77: 89 c7 mov %eax,%edi 10bf79: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf7c: 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; 10bf7e: 8b 42 28 mov 0x28(%edx),%eax 10bf81: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf84: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10bf86: 8b 45 1c mov 0x1c(%ebp),%eax 10bf89: 89 42 24 mov %eax,0x24(%edx) 10bf8c: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bf8e: 8d 65 f4 lea -0xc(%ebp),%esp 10bf91: 5b pop %ebx 10bf92: 5e pop %esi 10bf93: 5f pop %edi 10bf94: c9 leave 10bf95: c3 ret 10bf96: 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; 10bf98: a1 d8 77 12 00 mov 0x1277d8,%eax ISR_Level level; _ISR_Disable( level ); 10bf9d: 9c pushf 10bf9e: fa cli 10bf9f: 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; 10bfa0: 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; 10bfa7: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10bfaa: 8b 55 14 mov 0x14(%ebp),%edx 10bfad: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10bfb0: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10bfb3: 8b 55 10 mov 0x10(%ebp),%edx 10bfb6: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10bfb9: 8b 55 1c mov 0x1c(%ebp),%edx 10bfbc: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10bfbf: 51 push %ecx 10bfc0: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10bfc1: 50 push %eax 10bfc2: 68 14 dd 10 00 push $0x10dd14 10bfc7: ff 75 24 pushl 0x24(%ebp) 10bfca: 53 push %ebx 10bfcb: e8 34 1a 00 00 call 10da04 <_Thread_queue_Enqueue_with_handler> 10bfd0: b8 07 00 00 00 mov $0x7,%eax } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10bfd5: 83 c4 10 add $0x10,%esp #endif } 10bfd8: 8d 65 f4 lea -0xc(%ebp),%esp 10bfdb: 5b pop %ebx 10bfdc: 5e pop %esi 10bfdd: 5f pop %edi 10bfde: c9 leave 10bfdf: c3 ret RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10bfe0: 83 ec 0c sub $0xc,%esp 10bfe3: 8d 43 68 lea 0x68(%ebx),%eax 10bfe6: 50 push %eax 10bfe7: e8 f0 fe ff ff call 10bedc <_Chain_Get> 10bfec: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10bfee: 8d 40 10 lea 0x10(%eax),%eax 10bff1: 89 c7 mov %eax,%edi 10bff3: 8b 4d 10 mov 0x10(%ebp),%ecx 10bff6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10bff8: 8b 4d 10 mov 0x10(%ebp),%ecx 10bffb: 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; 10bffe: 8b 45 1c mov 0x1c(%ebp),%eax 10c001: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c004: 83 c4 0c add $0xc,%esp 10c007: 50 push %eax 10c008: 52 push %edx 10c009: 53 push %ebx 10c00a: e8 5d 4a 00 00 call 110a6c <_CORE_message_queue_Insert_message> 10c00f: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c011: 83 c4 10 add $0x10,%esp 10c014: e9 34 ff ff ff jmp 10bf4d <_CORE_message_queue_Submit+0x4d> 10c019: 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 ) { 10c01c: 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 } 10c021: 8d 65 f4 lea -0xc(%ebp),%esp 10c024: 5b pop %ebx 10c025: 5e pop %esi 10c026: 5f pop %edi 10c027: c9 leave 10c028: c3 ret 10c029: 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 ) { 10c02c: 8b 43 48 mov 0x48(%ebx),%eax 10c02f: e9 ed fe ff ff jmp 10bf21 <_CORE_message_queue_Submit+0x21> 0010c040 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c040: 55 push %ebp 10c041: 89 e5 mov %esp,%ebp 10c043: 57 push %edi 10c044: 56 push %esi 10c045: 53 push %ebx 10c046: 83 ec 0c sub $0xc,%esp 10c049: 8b 45 08 mov 0x8(%ebp),%eax 10c04c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c04f: 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; 10c052: 8d 78 40 lea 0x40(%eax),%edi 10c055: b9 04 00 00 00 mov $0x4,%ecx 10c05a: 89 de mov %ebx,%esi 10c05c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c05e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c061: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c068: 85 d2 test %edx,%edx 10c06a: 75 30 jne 10c09c <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c06c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c073: 8b 15 d8 77 12 00 mov 0x1277d8,%edx 10c079: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c07c: 8b 4a 08 mov 0x8(%edx),%ecx 10c07f: 89 48 60 mov %ecx,0x60(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10c082: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c085: 83 f9 02 cmp $0x2,%ecx 10c088: 74 05 je 10c08f <_CORE_mutex_Initialize+0x4f> 10c08a: 83 f9 03 cmp $0x3,%ecx 10c08d: 75 22 jne 10c0b1 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c08f: 8b 4a 14 mov 0x14(%edx),%ecx 10c092: 3b 48 4c cmp 0x4c(%eax),%ecx 10c095: 72 41 jb 10c0d8 <_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++; 10c097: ff 42 1c incl 0x1c(%edx) 10c09a: eb 15 jmp 10c0b1 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c09c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c0a3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c0aa: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c0b1: 6a 05 push $0x5 10c0b3: 68 00 04 00 00 push $0x400 10c0b8: 31 d2 xor %edx,%edx 10c0ba: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c0be: 0f 95 c2 setne %dl 10c0c1: 52 push %edx 10c0c2: 50 push %eax 10c0c3: e8 9c 1b 00 00 call 10dc64 <_Thread_queue_Initialize> 10c0c8: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c0ca: 83 c4 10 add $0x10,%esp } 10c0cd: 8d 65 f4 lea -0xc(%ebp),%esp 10c0d0: 5b pop %ebx 10c0d1: 5e pop %esi 10c0d2: 5f pop %edi 10c0d3: c9 leave 10c0d4: c3 ret 10c0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c0d8: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c0dd: 8d 65 f4 lea -0xc(%ebp),%esp 10c0e0: 5b pop %ebx 10c0e1: 5e pop %esi 10c0e2: 5f pop %edi 10c0e3: c9 leave 10c0e4: c3 ret 0010c138 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c138: 55 push %ebp 10c139: 89 e5 mov %esp,%ebp 10c13b: 53 push %ebx 10c13c: 83 ec 14 sub $0x14,%esp 10c13f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c142: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c145: a1 18 77 12 00 mov 0x127718,%eax 10c14a: 85 c0 test %eax,%eax 10c14c: 74 04 je 10c152 <_CORE_mutex_Seize+0x1a> 10c14e: 84 d2 test %dl,%dl 10c150: 75 36 jne 10c188 <_CORE_mutex_Seize+0x50> 10c152: 83 ec 08 sub $0x8,%esp 10c155: 8d 45 18 lea 0x18(%ebp),%eax 10c158: 50 push %eax 10c159: 53 push %ebx 10c15a: 88 55 f4 mov %dl,-0xc(%ebp) 10c15d: e8 b6 49 00 00 call 110b18 <_CORE_mutex_Seize_interrupt_trylock> 10c162: 83 c4 10 add $0x10,%esp 10c165: 85 c0 test %eax,%eax 10c167: 8a 55 f4 mov -0xc(%ebp),%dl 10c16a: 74 14 je 10c180 <_CORE_mutex_Seize+0x48> 10c16c: 84 d2 test %dl,%dl 10c16e: 75 30 jne 10c1a0 <_CORE_mutex_Seize+0x68> 10c170: ff 75 18 pushl 0x18(%ebp) 10c173: 9d popf 10c174: a1 d8 77 12 00 mov 0x1277d8,%eax 10c179: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c180: 8b 5d fc mov -0x4(%ebp),%ebx 10c183: c9 leave 10c184: c3 ret 10c185: 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 ); 10c188: 83 3d e0 78 12 00 01 cmpl $0x1,0x1278e0 10c18f: 76 c1 jbe 10c152 <_CORE_mutex_Seize+0x1a> 10c191: 53 push %ebx 10c192: 6a 13 push $0x13 10c194: 6a 00 push $0x0 10c196: 6a 00 push $0x0 10c198: e8 9b 05 00 00 call 10c738 <_Internal_error_Occurred> 10c19d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c1a0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c1a7: a1 d8 77 12 00 mov 0x1277d8,%eax 10c1ac: 89 58 44 mov %ebx,0x44(%eax) 10c1af: 8b 55 0c mov 0xc(%ebp),%edx 10c1b2: 89 50 20 mov %edx,0x20(%eax) 10c1b5: a1 18 77 12 00 mov 0x127718,%eax 10c1ba: 40 inc %eax 10c1bb: a3 18 77 12 00 mov %eax,0x127718 10c1c0: ff 75 18 pushl 0x18(%ebp) 10c1c3: 9d popf 10c1c4: 83 ec 08 sub $0x8,%esp 10c1c7: ff 75 14 pushl 0x14(%ebp) 10c1ca: 53 push %ebx 10c1cb: e8 18 ff ff ff call 10c0e8 <_CORE_mutex_Seize_interrupt_blocking> 10c1d0: 83 c4 10 add $0x10,%esp } 10c1d3: 8b 5d fc mov -0x4(%ebp),%ebx 10c1d6: c9 leave 10c1d7: c3 ret 00110b18 <_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 ) { 110b18: 55 push %ebp 110b19: 89 e5 mov %esp,%ebp 110b1b: 56 push %esi 110b1c: 53 push %ebx 110b1d: 8b 45 08 mov 0x8(%ebp),%eax 110b20: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 110b23: 8b 15 d8 77 12 00 mov 0x1277d8,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110b29: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110b30: 8b 58 50 mov 0x50(%eax),%ebx 110b33: 85 db test %ebx,%ebx 110b35: 74 31 je 110b68 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110b37: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110b3e: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110b41: 8b 5a 08 mov 0x8(%edx),%ebx 110b44: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110b47: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 110b4e: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 110b51: 83 fb 02 cmp $0x2,%ebx 110b54: 74 26 je 110b7c <_CORE_mutex_Seize_interrupt_trylock+0x64> 110b56: 83 fb 03 cmp $0x3,%ebx 110b59: 74 3d je 110b98 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 110b5b: ff 31 pushl (%ecx) 110b5d: 9d popf 110b5e: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110b60: 8d 65 f8 lea -0x8(%ebp),%esp 110b63: 5b pop %ebx 110b64: 5e pop %esi 110b65: c9 leave 110b66: c3 ret 110b67: 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 ) ) { 110b68: 3b 50 5c cmp 0x5c(%eax),%edx 110b6b: 74 17 je 110b84 <_CORE_mutex_Seize_interrupt_trylock+0x6c> 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; _ISR_Enable( *level_p ); 110b6d: b8 01 00 00 00 mov $0x1,%eax 110b72: 8d 65 f8 lea -0x8(%ebp),%esp 110b75: 5b pop %ebx 110b76: 5e pop %esi 110b77: c9 leave 110b78: c3 ret 110b79: 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++; 110b7c: ff 42 1c incl 0x1c(%edx) 110b7f: eb da jmp 110b5b <_CORE_mutex_Seize_interrupt_trylock+0x43> 110b81: 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 ) { 110b84: 8b 58 40 mov 0x40(%eax),%ebx 110b87: 85 db test %ebx,%ebx 110b89: 75 45 jne 110bd0 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 110b8b: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110b8e: ff 31 pushl (%ecx) 110b90: 9d popf 110b91: 31 c0 xor %eax,%eax 110b93: eb dd jmp 110b72 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110b95: 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++; 110b98: 8b 5a 1c mov 0x1c(%edx),%ebx 110b9b: 8d 73 01 lea 0x1(%ebx),%esi 110b9e: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 110ba1: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 110ba4: 39 70 4c cmp %esi,0x4c(%eax) 110ba7: 74 6b je 110c14 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 110ba9: 72 39 jb 110be4 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 110bab: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 110bb2: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 110bb9: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 110bc0: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 110bc3: ff 31 pushl (%ecx) 110bc5: 9d popf 110bc6: 31 c0 xor %eax,%eax 110bc8: 8d 65 f8 lea -0x8(%ebp),%esp 110bcb: 5b pop %ebx 110bcc: 5e pop %esi 110bcd: c9 leave 110bce: c3 ret 110bcf: 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 ) { 110bd0: 4b dec %ebx 110bd1: 75 9a jne 110b6d <_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; 110bd3: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 110bda: ff 31 pushl (%ecx) 110bdc: 9d popf 110bdd: 31 c0 xor %eax,%eax 110bdf: eb 91 jmp 110b72 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110be1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110be4: 8b 15 18 77 12 00 mov 0x127718,%edx 110bea: 42 inc %edx 110beb: 89 15 18 77 12 00 mov %edx,0x127718 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 110bf1: ff 31 pushl (%ecx) 110bf3: 9d popf _Thread_Change_priority( 110bf4: 52 push %edx 110bf5: 6a 00 push $0x0 110bf7: ff 70 4c pushl 0x4c(%eax) 110bfa: ff 70 5c pushl 0x5c(%eax) 110bfd: e8 0a c4 ff ff call 10d00c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 110c02: e8 ed c8 ff ff call 10d4f4 <_Thread_Enable_dispatch> 110c07: 31 c0 xor %eax,%eax 110c09: 83 c4 10 add $0x10,%esp 110c0c: e9 61 ff ff ff jmp 110b72 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110c11: 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 ); 110c14: ff 31 pushl (%ecx) 110c16: 9d popf 110c17: 31 c0 xor %eax,%eax 110c19: e9 54 ff ff ff jmp 110b72 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 0010c1d8 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c1d8: 55 push %ebp 10c1d9: 89 e5 mov %esp,%ebp 10c1db: 53 push %ebx 10c1dc: 83 ec 04 sub $0x4,%esp 10c1df: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10c1e2: 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 ) { 10c1e5: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c1e9: 74 15 je 10c200 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c1eb: 3b 05 d8 77 12 00 cmp 0x1277d8,%eax 10c1f1: 74 0d je 10c200 <_CORE_mutex_Surrender+0x28> 10c1f3: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c1f8: 8b 5d fc mov -0x4(%ebp),%ebx 10c1fb: c9 leave 10c1fc: c3 ret 10c1fd: 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 ) 10c200: 8b 53 54 mov 0x54(%ebx),%edx 10c203: 85 d2 test %edx,%edx 10c205: 74 65 je 10c26c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c207: 4a dec %edx 10c208: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c20b: 85 d2 test %edx,%edx 10c20d: 75 5d jne 10c26c <_CORE_mutex_Surrender+0x94> 10c20f: 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 ) || 10c212: 83 fa 02 cmp $0x2,%edx 10c215: 0f 84 99 00 00 00 je 10c2b4 <_CORE_mutex_Surrender+0xdc> 10c21b: 83 fa 03 cmp $0x3,%edx 10c21e: 0f 84 90 00 00 00 je 10c2b4 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c224: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c22b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c232: 83 fa 02 cmp $0x2,%edx 10c235: 74 5d je 10c294 <_CORE_mutex_Surrender+0xbc> 10c237: 83 fa 03 cmp $0x3,%edx 10c23a: 74 58 je 10c294 <_CORE_mutex_Surrender+0xbc> /* * 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 ) ) ) { 10c23c: 83 ec 0c sub $0xc,%esp 10c23f: 53 push %ebx 10c240: e8 a3 16 00 00 call 10d8e8 <_Thread_queue_Dequeue> 10c245: 83 c4 10 add $0x10,%esp 10c248: 85 c0 test %eax,%eax 10c24a: 74 7c je 10c2c8 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c24c: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c24f: 8b 50 08 mov 0x8(%eax),%edx 10c252: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c255: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c25c: 8b 53 48 mov 0x48(%ebx),%edx 10c25f: 83 fa 02 cmp $0x2,%edx 10c262: 74 58 je 10c2bc <_CORE_mutex_Surrender+0xe4> 10c264: 83 fa 03 cmp $0x3,%edx 10c267: 74 0b je 10c274 <_CORE_mutex_Surrender+0x9c> 10c269: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c26c: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c26e: 8b 5d fc mov -0x4(%ebp),%ebx 10c271: c9 leave 10c272: c3 ret 10c273: 90 nop <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c274: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c277: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c27a: 3b 50 14 cmp 0x14(%eax),%edx 10c27d: 73 ed jae 10c26c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c27f: 51 push %ecx 10c280: 6a 00 push $0x0 10c282: 52 push %edx 10c283: 50 push %eax 10c284: e8 83 0d 00 00 call 10d00c <_Thread_Change_priority> 10c289: 31 c0 xor %eax,%eax 10c28b: 83 c4 10 add $0x10,%esp 10c28e: e9 65 ff ff ff jmp 10c1f8 <_CORE_mutex_Surrender+0x20> 10c293: 90 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10c294: 8b 50 1c mov 0x1c(%eax),%edx 10c297: 85 d2 test %edx,%edx 10c299: 75 a1 jne 10c23c <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c29b: 8b 50 18 mov 0x18(%eax),%edx 10c29e: 3b 50 14 cmp 0x14(%eax),%edx 10c2a1: 74 99 je 10c23c <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c2a3: 51 push %ecx 10c2a4: 6a 01 push $0x1 10c2a6: 52 push %edx 10c2a7: 50 push %eax 10c2a8: e8 5f 0d 00 00 call 10d00c <_Thread_Change_priority> 10c2ad: 83 c4 10 add $0x10,%esp 10c2b0: eb 8a jmp 10c23c <_CORE_mutex_Surrender+0x64> 10c2b2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10c2b4: ff 48 1c decl 0x1c(%eax) 10c2b7: e9 68 ff ff ff jmp 10c224 <_CORE_mutex_Surrender+0x4c> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c2bc: ff 40 1c incl 0x1c(%eax) 10c2bf: 31 c0 xor %eax,%eax break; 10c2c1: e9 32 ff ff ff jmp 10c1f8 <_CORE_mutex_Surrender+0x20> 10c2c6: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c2c8: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c2cf: 31 c0 xor %eax,%eax 10c2d1: e9 22 ff ff ff jmp 10c1f8 <_CORE_mutex_Surrender+0x20> 001148fc <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 1148fc: 55 push %ebp 1148fd: 89 e5 mov %esp,%ebp 1148ff: 57 push %edi 114900: 56 push %esi 114901: 53 push %ebx 114902: 83 ec 1c sub $0x1c,%esp 114905: 8b 45 08 mov 0x8(%ebp),%eax 114908: 8b 7d 0c mov 0xc(%ebp),%edi 11490b: 8b 75 14 mov 0x14(%ebp),%esi 11490e: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 114911: 8b 15 38 d2 12 00 mov 0x12d238,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 114917: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 11491e: 9c pushf 11491f: fa cli 114920: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 114923: 8b 48 48 mov 0x48(%eax),%ecx 114926: 85 c9 test %ecx,%ecx 114928: 75 46 jne 114970 <_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 ) { 11492a: 84 db test %bl,%bl 11492c: 75 16 jne 114944 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 11492e: ff 75 e4 pushl -0x1c(%ebp) 114931: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 114932: 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 ); } 114939: 83 c4 1c add $0x1c,%esp 11493c: 5b pop %ebx 11493d: 5e pop %esi 11493e: 5f pop %edi 11493f: c9 leave 114940: c3 ret 114941: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 114944: 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; 11494b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11494e: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 114951: ff 75 e4 pushl -0x1c(%ebp) 114954: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 114955: c7 45 10 1c 14 11 00 movl $0x11141c,0x10(%ebp) 11495c: 89 75 0c mov %esi,0xc(%ebp) 11495f: 89 45 08 mov %eax,0x8(%ebp) } 114962: 83 c4 1c add $0x1c,%esp 114965: 5b pop %ebx 114966: 5e pop %esi 114967: 5f pop %edi 114968: 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 ); 114969: e9 9e c7 ff ff jmp 11110c <_Thread_queue_Enqueue_with_handler> 11496e: 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; 114970: 49 dec %ecx 114971: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 114974: ff 75 e4 pushl -0x1c(%ebp) 114977: 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 ); } 114978: 83 c4 1c add $0x1c,%esp 11497b: 5b pop %ebx 11497c: 5e pop %esi 11497d: 5f pop %edi 11497e: c9 leave 11497f: c3 ret 0010c324 <_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 ) { 10c324: 55 push %ebp 10c325: 89 e5 mov %esp,%ebp 10c327: 53 push %ebx 10c328: 83 ec 10 sub $0x10,%esp 10c32b: 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)) ) { 10c32e: 53 push %ebx 10c32f: e8 b4 15 00 00 call 10d8e8 <_Thread_queue_Dequeue> 10c334: 83 c4 10 add $0x10,%esp 10c337: 85 c0 test %eax,%eax 10c339: 74 09 je 10c344 <_CORE_semaphore_Surrender+0x20> 10c33b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c33d: 8b 5d fc mov -0x4(%ebp),%ebx 10c340: c9 leave 10c341: c3 ret 10c342: 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 ); 10c344: 9c pushf 10c345: fa cli 10c346: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c347: 8b 43 48 mov 0x48(%ebx),%eax 10c34a: 3b 43 40 cmp 0x40(%ebx),%eax 10c34d: 72 0d jb 10c35c <_CORE_semaphore_Surrender+0x38> 10c34f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c354: 52 push %edx 10c355: 9d popf } return status; } 10c356: 8b 5d fc mov -0x4(%ebp),%ebx 10c359: c9 leave 10c35a: c3 ret 10c35b: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c35c: 40 inc %eax 10c35d: 89 43 48 mov %eax,0x48(%ebx) 10c360: 31 c0 xor %eax,%eax 10c362: eb f0 jmp 10c354 <_CORE_semaphore_Surrender+0x30> 0010ccd4 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10ccd4: 55 push %ebp 10ccd5: 89 e5 mov %esp,%ebp 10ccd7: 53 push %ebx 10ccd8: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10ccdb: 9c pushf 10ccdc: fa cli 10ccdd: 59 pop %ecx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ccde: 8b 50 04 mov 0x4(%eax),%edx 10cce1: 85 d2 test %edx,%edx 10cce3: 75 0b jne 10ccf0 <_CORE_spinlock_Release+0x1c> _ISR_Enable( level ); 10cce5: 51 push %ecx 10cce6: 9d popf 10cce7: 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; } 10ccec: 5b pop %ebx 10cced: c9 leave 10ccee: c3 ret 10ccef: 90 nop <== NOT EXECUTED } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10ccf0: 8b 58 0c mov 0xc(%eax),%ebx 10ccf3: 8b 15 98 88 12 00 mov 0x128898,%edx 10ccf9: 3b 5a 08 cmp 0x8(%edx),%ebx 10ccfc: 74 0a je 10cd08 <_CORE_spinlock_Release+0x34> _ISR_Enable( level ); 10ccfe: 51 push %ecx 10ccff: 9d popf 10cd00: 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; } 10cd05: 5b pop %ebx 10cd06: c9 leave 10cd07: c3 ret } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10cd08: 8b 50 08 mov 0x8(%eax),%edx 10cd0b: 4a dec %edx 10cd0c: 89 50 08 mov %edx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10cd0f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10cd16: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10cd1d: 51 push %ecx 10cd1e: 9d popf 10cd1f: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; 10cd21: eb c9 jmp 10ccec <_CORE_spinlock_Release+0x18> 0010cd24 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10cd24: 55 push %ebp 10cd25: 89 e5 mov %esp,%ebp 10cd27: 56 push %esi 10cd28: 53 push %ebx 10cd29: 8b 5d 08 mov 0x8(%ebp),%ebx 10cd2c: 8a 4d 0c mov 0xc(%ebp),%cl ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 10cd2f: 9c pushf 10cd30: fa cli 10cd31: 58 pop %eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10cd32: 8b 53 04 mov 0x4(%ebx),%edx 10cd35: 4a dec %edx 10cd36: 74 60 je 10cd98 <_CORE_spinlock_Wait+0x74> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10cd38: 8b 53 08 mov 0x8(%ebx),%edx 10cd3b: 42 inc %edx 10cd3c: 89 53 08 mov %edx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cd3f: 8b 53 04 mov 0x4(%ebx),%edx 10cd42: 85 d2 test %edx,%edx 10cd44: 74 22 je 10cd68 <_CORE_spinlock_Wait+0x44> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10cd46: 84 c9 test %cl,%cl 10cd48: 74 39 je 10cd83 <_CORE_spinlock_Wait+0x5f> 10cd4a: 66 90 xchg %ax,%ax * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10cd4c: 50 push %eax 10cd4d: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10cd4e: e8 ed 11 00 00 call 10df40 <_Thread_Enable_dispatch> 10cd53: a1 d8 87 12 00 mov 0x1287d8,%eax 10cd58: 40 inc %eax 10cd59: a3 d8 87 12 00 mov %eax,0x1287d8 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10cd5e: 9c pushf 10cd5f: fa cli 10cd60: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cd61: 8b 53 04 mov 0x4(%ebx),%edx 10cd64: 85 d2 test %edx,%edx 10cd66: 75 e4 jne 10cd4c <_CORE_spinlock_Wait+0x28> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10cd68: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10cd6f: 8b 15 98 88 12 00 mov 0x128898,%edx 10cd75: 8b 52 08 mov 0x8(%edx),%edx 10cd78: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10cd7b: 50 push %eax 10cd7c: 9d popf 10cd7d: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cd7f: 5b pop %ebx 10cd80: 5e pop %esi 10cd81: c9 leave 10cd82: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10cd83: 8b 53 08 mov 0x8(%ebx),%edx 10cd86: 4a dec %edx 10cd87: 89 53 08 mov %edx,0x8(%ebx) _ISR_Enable( level ); 10cd8a: 50 push %eax 10cd8b: 9d popf 10cd8c: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cd91: 5b pop %ebx 10cd92: 5e pop %esi 10cd93: c9 leave 10cd94: c3 ret 10cd95: 8d 76 00 lea 0x0(%esi),%esi <== 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) ) { 10cd98: 8b 73 0c mov 0xc(%ebx),%esi 10cd9b: 8b 15 98 88 12 00 mov 0x128898,%edx 10cda1: 3b 72 08 cmp 0x8(%edx),%esi 10cda4: 75 92 jne 10cd38 <_CORE_spinlock_Wait+0x14> _ISR_Enable( level ); 10cda6: 50 push %eax 10cda7: 9d popf 10cda8: b8 01 00 00 00 mov $0x1,%eax return CORE_SPINLOCK_HOLDER_RELOCKING; 10cdad: eb d0 jmp 10cd7f <_CORE_spinlock_Wait+0x5b> 0010bedc <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10bedc: 55 push %ebp 10bedd: 89 e5 mov %esp,%ebp 10bedf: 53 push %ebx 10bee0: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10bee3: 9c pushf 10bee4: fa cli 10bee5: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10bee6: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bee8: 8d 4a 04 lea 0x4(%edx),%ecx 10beeb: 39 c8 cmp %ecx,%eax 10beed: 74 0d je 10befc <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10beef: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10bef1: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10bef3: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10bef6: 53 push %ebx 10bef7: 9d popf return return_node; } 10bef8: 5b pop %ebx 10bef9: c9 leave 10befa: c3 ret 10befb: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10befc: 31 c0 xor %eax,%eax 10befe: eb f6 jmp 10bef6 <_Chain_Get+0x1a> 00110a2c <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110a2c: 55 push %ebp 110a2d: 89 e5 mov %esp,%ebp 110a2f: 57 push %edi 110a30: 56 push %esi 110a31: 53 push %ebx 110a32: 8b 7d 08 mov 0x8(%ebp),%edi 110a35: 8b 4d 10 mov 0x10(%ebp),%ecx 110a38: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110a3b: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 110a3d: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 110a44: 85 c9 test %ecx,%ecx 110a46: 74 17 je 110a5f <_Chain_Initialize+0x33> Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 110a48: 8b 45 0c mov 0xc(%ebp),%eax 110a4b: eb 05 jmp 110a52 <_Chain_Initialize+0x26> 110a4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( count-- ) { 110a50: 89 d8 mov %ebx,%eax current->next = next; 110a52: 89 02 mov %eax,(%edx) next->previous = current; 110a54: 89 50 04 mov %edx,0x4(%eax) 110a57: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 110a5a: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 110a5c: 49 dec %ecx 110a5d: 75 f1 jne 110a50 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 110a5f: 8d 47 04 lea 0x4(%edi),%eax 110a62: 89 02 mov %eax,(%edx) the_chain->last = current; 110a64: 89 57 08 mov %edx,0x8(%edi) } 110a67: 5b pop %ebx 110a68: 5e pop %esi 110a69: 5f pop %edi 110a6a: c9 leave 110a6b: c3 ret 0010af64 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10af64: 55 push %ebp 10af65: 89 e5 mov %esp,%ebp 10af67: 57 push %edi 10af68: 56 push %esi 10af69: 53 push %ebx 10af6a: 83 ec 2c sub $0x2c,%esp 10af6d: 8b 45 08 mov 0x8(%ebp),%eax 10af70: 8b 4d 0c mov 0xc(%ebp),%ecx 10af73: 8b 55 10 mov 0x10(%ebp),%edx 10af76: 89 55 dc mov %edx,-0x24(%ebp) 10af79: 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; 10af7c: 8b 1d d8 77 12 00 mov 0x1277d8,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10af82: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10af89: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi _ISR_Disable( level ); 10af8f: 9c pushf 10af90: fa cli 10af91: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10af94: 8b 16 mov (%esi),%edx 10af96: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10af99: 21 c2 and %eax,%edx 10af9b: 89 55 e4 mov %edx,-0x1c(%ebp) 10af9e: 74 0d je 10afad <_Event_Seize+0x49> 10afa0: 39 d0 cmp %edx,%eax 10afa2: 0f 84 84 00 00 00 je 10b02c <_Event_Seize+0xc8> 10afa8: f6 c1 02 test $0x2,%cl 10afab: 75 7f jne 10b02c <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10afad: f6 c1 01 test $0x1,%cl 10afb0: 75 62 jne 10b014 <_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; 10afb2: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10afb5: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10afb8: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10afbb: c7 05 a8 80 12 00 01 movl $0x1,0x1280a8 10afc2: 00 00 00 _ISR_Enable( level ); 10afc5: ff 75 e0 pushl -0x20(%ebp) 10afc8: 9d popf if ( ticks ) { 10afc9: 8b 45 dc mov -0x24(%ebp),%eax 10afcc: 85 c0 test %eax,%eax 10afce: 0f 85 80 00 00 00 jne 10b054 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10afd4: 83 ec 08 sub $0x8,%esp 10afd7: 68 00 01 00 00 push $0x100 10afdc: 53 push %ebx 10afdd: e8 d6 2d 00 00 call 10ddb8 <_Thread_Set_state> _ISR_Disable( level ); 10afe2: 9c pushf 10afe3: fa cli 10afe4: 5a pop %edx sync_state = _Event_Sync_state; 10afe5: a1 a8 80 12 00 mov 0x1280a8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10afea: c7 05 a8 80 12 00 00 movl $0x0,0x1280a8 10aff1: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10aff4: 83 c4 10 add $0x10,%esp 10aff7: 83 f8 01 cmp $0x1,%eax 10affa: 74 4c je 10b048 <_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 ); 10affc: 89 55 10 mov %edx,0x10(%ebp) 10afff: 89 5d 0c mov %ebx,0xc(%ebp) 10b002: 89 45 08 mov %eax,0x8(%ebp) } 10b005: 8d 65 f4 lea -0xc(%ebp),%esp 10b008: 5b pop %ebx 10b009: 5e pop %esi 10b00a: 5f pop %edi 10b00b: 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 ); 10b00c: e9 af 1f 00 00 jmp 10cfc0 <_Thread_blocking_operation_Cancel> 10b011: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b014: ff 75 e0 pushl -0x20(%ebp) 10b017: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b018: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b01f: 8b 55 e4 mov -0x1c(%ebp),%edx 10b022: 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 ); } 10b024: 8d 65 f4 lea -0xc(%ebp),%esp 10b027: 5b pop %ebx 10b028: 5e pop %esi 10b029: 5f pop %edi 10b02a: c9 leave 10b02b: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10b02c: 8b 45 e4 mov -0x1c(%ebp),%eax 10b02f: f7 d0 not %eax 10b031: 23 45 d4 and -0x2c(%ebp),%eax 10b034: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b036: ff 75 e0 pushl -0x20(%ebp) 10b039: 9d popf *event_out = seized_events; 10b03a: 8b 45 e4 mov -0x1c(%ebp),%eax 10b03d: 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 ); } 10b03f: 8d 65 f4 lea -0xc(%ebp),%esp 10b042: 5b pop %ebx 10b043: 5e pop %esi 10b044: 5f pop %edi 10b045: c9 leave 10b046: c3 ret 10b047: 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 ); 10b048: 52 push %edx 10b049: 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 ); } 10b04a: 8d 65 f4 lea -0xc(%ebp),%esp 10b04d: 5b pop %ebx 10b04e: 5e pop %esi 10b04f: 5f pop %edi 10b050: c9 leave 10b051: c3 ret 10b052: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b054: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b057: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b05e: c7 43 64 08 b2 10 00 movl $0x10b208,0x64(%ebx) the_watchdog->id = id; 10b065: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b068: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b06f: 8b 45 dc mov -0x24(%ebp),%eax 10b072: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b075: 83 ec 08 sub $0x8,%esp 10b078: 8d 43 48 lea 0x48(%ebx),%eax 10b07b: 50 push %eax 10b07c: 68 f8 77 12 00 push $0x1277f8 10b081: e8 ba 33 00 00 call 10e440 <_Watchdog_Insert> 10b086: 83 c4 10 add $0x10,%esp 10b089: e9 46 ff ff ff jmp 10afd4 <_Event_Seize+0x70> 0010b0e4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b0e4: 55 push %ebp 10b0e5: 89 e5 mov %esp,%ebp 10b0e7: 57 push %edi 10b0e8: 56 push %esi 10b0e9: 53 push %ebx 10b0ea: 83 ec 1c sub $0x1c,%esp 10b0ed: 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 ]; 10b0f0: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b0f6: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b0f9: 9c pushf 10b0fa: fa cli 10b0fb: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b0fe: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b100: 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 ) ) { 10b103: 89 c7 mov %eax,%edi 10b105: 21 d7 and %edx,%edi 10b107: 89 7d e0 mov %edi,-0x20(%ebp) 10b10a: 74 74 je 10b180 <_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() && 10b10c: 8b 3d b4 77 12 00 mov 0x1277b4,%edi 10b112: 85 ff test %edi,%edi 10b114: 74 0c je 10b122 <_Event_Surrender+0x3e> 10b116: 3b 1d d8 77 12 00 cmp 0x1277d8,%ebx 10b11c: 0f 84 96 00 00 00 je 10b1b8 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b122: f6 43 11 01 testb $0x1,0x11(%ebx) 10b126: 74 4c je 10b174 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b128: 3b 45 e0 cmp -0x20(%ebp),%eax 10b12b: 74 05 je 10b132 <_Event_Surrender+0x4e> 10b12d: 83 e6 02 and $0x2,%esi 10b130: 74 42 je 10b174 <_Event_Surrender+0x90> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b132: 8b 45 e0 mov -0x20(%ebp),%eax 10b135: f7 d0 not %eax 10b137: 21 d0 and %edx,%eax 10b139: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b13b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b142: 8b 43 28 mov 0x28(%ebx),%eax 10b145: 8b 7d e0 mov -0x20(%ebp),%edi 10b148: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b14a: ff 75 e4 pushl -0x1c(%ebp) 10b14d: 9d popf 10b14e: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b14f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b153: 74 37 je 10b18c <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b155: ff 75 e4 pushl -0x1c(%ebp) 10b158: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b159: 83 ec 08 sub $0x8,%esp 10b15c: 68 f8 ff 03 10 push $0x1003fff8 10b161: 53 push %ebx 10b162: e8 e5 1f 00 00 call 10d14c <_Thread_Clear_state> 10b167: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b16a: 8d 65 f4 lea -0xc(%ebp),%esp 10b16d: 5b pop %ebx 10b16e: 5e pop %esi 10b16f: 5f pop %edi 10b170: c9 leave 10b171: c3 ret 10b172: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b174: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10b177: 9d popf <== NOT EXECUTED } 10b178: 8d 65 f4 lea -0xc(%ebp),%esp 10b17b: 5b pop %ebx 10b17c: 5e pop %esi 10b17d: 5f pop %edi 10b17e: c9 leave 10b17f: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b180: ff 75 e4 pushl -0x1c(%ebp) 10b183: 9d popf } return; } } _ISR_Enable( level ); } 10b184: 8d 65 f4 lea -0xc(%ebp),%esp 10b187: 5b pop %ebx 10b188: 5e pop %esi 10b189: 5f pop %edi 10b18a: c9 leave 10b18b: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b18c: 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 ); 10b193: ff 75 e4 pushl -0x1c(%ebp) 10b196: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b197: 83 ec 0c sub $0xc,%esp 10b19a: 8d 43 48 lea 0x48(%ebx),%eax 10b19d: 50 push %eax 10b19e: e8 d5 33 00 00 call 10e578 <_Watchdog_Remove> 10b1a3: 58 pop %eax 10b1a4: 5a pop %edx 10b1a5: 68 f8 ff 03 10 push $0x1003fff8 10b1aa: 53 push %ebx 10b1ab: e8 9c 1f 00 00 call 10d14c <_Thread_Clear_state> 10b1b0: 83 c4 10 add $0x10,%esp 10b1b3: eb c3 jmp 10b178 <_Event_Surrender+0x94> 10b1b5: 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) || 10b1b8: 8b 3d a8 80 12 00 mov 0x1280a8,%edi /* * 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() && 10b1be: 83 ff 02 cmp $0x2,%edi 10b1c1: 74 0d je 10b1d0 <_Event_Surrender+0xec> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b1c3: 8b 3d a8 80 12 00 mov 0x1280a8,%edi /* * 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() && 10b1c9: 4f dec %edi 10b1ca: 0f 85 52 ff ff ff jne 10b122 <_Event_Surrender+0x3e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b1d0: 3b 45 e0 cmp -0x20(%ebp),%eax 10b1d3: 74 05 je 10b1da <_Event_Surrender+0xf6> 10b1d5: 83 e6 02 and $0x2,%esi 10b1d8: 74 22 je 10b1fc <_Event_Surrender+0x118> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b1da: 8b 45 e0 mov -0x20(%ebp),%eax 10b1dd: f7 d0 not %eax 10b1df: 21 d0 and %edx,%eax 10b1e1: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b1e3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b1ea: 8b 43 28 mov 0x28(%ebx),%eax 10b1ed: 8b 55 e0 mov -0x20(%ebp),%edx 10b1f0: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b1f2: c7 05 a8 80 12 00 03 movl $0x3,0x1280a8 10b1f9: 00 00 00 } _ISR_Enable( level ); 10b1fc: ff 75 e4 pushl -0x1c(%ebp) 10b1ff: 9d popf return; 10b200: e9 73 ff ff ff jmp 10b178 <_Event_Surrender+0x94> 0010b208 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b208: 55 push %ebp 10b209: 89 e5 mov %esp,%ebp 10b20b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b20e: 8d 45 f4 lea -0xc(%ebp),%eax 10b211: 50 push %eax 10b212: ff 75 08 pushl 0x8(%ebp) 10b215: e8 fe 22 00 00 call 10d518 <_Thread_Get> switch ( location ) { 10b21a: 83 c4 10 add $0x10,%esp 10b21d: 8b 55 f4 mov -0xc(%ebp),%edx 10b220: 85 d2 test %edx,%edx 10b222: 75 37 jne 10b25b <_Event_Timeout+0x53> * * 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 ); 10b224: 9c pushf 10b225: fa cli 10b226: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b227: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b22e: 3b 05 d8 77 12 00 cmp 0x1277d8,%eax 10b234: 74 2a je 10b260 <_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; 10b236: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b23d: 52 push %edx 10b23e: 9d popf 10b23f: 83 ec 08 sub $0x8,%esp 10b242: 68 f8 ff 03 10 push $0x1003fff8 10b247: 50 push %eax 10b248: e8 ff 1e 00 00 call 10d14c <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b24d: a1 18 77 12 00 mov 0x127718,%eax 10b252: 48 dec %eax 10b253: a3 18 77 12 00 mov %eax,0x127718 10b258: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b25b: c9 leave 10b25c: c3 ret 10b25d: 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 ) 10b260: 8b 0d a8 80 12 00 mov 0x1280a8,%ecx 10b266: 49 dec %ecx 10b267: 75 cd jne 10b236 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b269: c7 05 a8 80 12 00 02 movl $0x2,0x1280a8 10b270: 00 00 00 10b273: eb c1 jmp 10b236 <_Event_Timeout+0x2e> 00110cd0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110cd0: 55 push %ebp 110cd1: 89 e5 mov %esp,%ebp 110cd3: 57 push %edi 110cd4: 56 push %esi 110cd5: 53 push %ebx 110cd6: 83 ec 2c sub $0x2c,%esp 110cd9: 8b 7d 0c mov 0xc(%ebp),%edi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 110cdc: 8b 45 08 mov 0x8(%ebp),%eax 110cdf: 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 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 110ce2: 8b 50 10 mov 0x10(%eax),%edx 110ce5: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 110ce8: 89 f8 mov %edi,%eax 110cea: 83 c0 04 add $0x4,%eax 110ced: 89 45 e0 mov %eax,-0x20(%ebp) 110cf0: 0f 82 5a 01 00 00 jb 110e50 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 110cf6: 8b 75 14 mov 0x14(%ebp),%esi 110cf9: 85 f6 test %esi,%esi 110cfb: 0f 85 48 01 00 00 jne 110e49 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110d01: 39 4d 08 cmp %ecx,0x8(%ebp) 110d04: 0f 84 50 01 00 00 je 110e5a <_Heap_Allocate_aligned_with_boundary+0x18a> 110d0a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 110d11: 8b 55 d4 mov -0x2c(%ebp),%edx 110d14: 83 c2 07 add $0x7,%edx 110d17: 89 55 c8 mov %edx,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110d1a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 110d21: 29 7d d8 sub %edi,-0x28(%ebp) 110d24: eb 19 jmp 110d3f <_Heap_Allocate_aligned_with_boundary+0x6f> 110d26: 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; 110d28: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 110d2b: 85 db test %ebx,%ebx 110d2d: 0f 85 e9 00 00 00 jne 110e1c <_Heap_Allocate_aligned_with_boundary+0x14c> break; } block = block->next; 110d33: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110d36: 39 4d 08 cmp %ecx,0x8(%ebp) 110d39: 0f 84 25 01 00 00 je 110e64 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 110d3f: 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 ) { 110d42: 8b 59 04 mov 0x4(%ecx),%ebx 110d45: 39 5d e0 cmp %ebx,-0x20(%ebp) 110d48: 73 e9 jae 110d33 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 110d4a: 8b 55 10 mov 0x10(%ebp),%edx 110d4d: 85 d2 test %edx,%edx 110d4f: 74 d7 je 110d28 <_Heap_Allocate_aligned_with_boundary+0x58> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 110d51: 8b 45 08 mov 0x8(%ebp),%eax 110d54: 8b 40 14 mov 0x14(%eax),%eax 110d57: 89 45 d0 mov %eax,-0x30(%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; 110d5a: 83 e3 fe and $0xfffffffe,%ebx 110d5d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 110d60: 8d 51 08 lea 0x8(%ecx),%edx 110d63: 89 55 cc mov %edx,-0x34(%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; 110d66: 8b 75 c8 mov -0x38(%ebp),%esi 110d69: 29 c6 sub %eax,%esi 110d6b: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110d6d: 03 5d d8 add -0x28(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110d70: 89 d8 mov %ebx,%eax 110d72: 31 d2 xor %edx,%edx 110d74: f7 75 10 divl 0x10(%ebp) 110d77: 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 ) { 110d79: 39 de cmp %ebx,%esi 110d7b: 73 0b jae 110d88 <_Heap_Allocate_aligned_with_boundary+0xb8> 110d7d: 89 f0 mov %esi,%eax 110d7f: 31 d2 xor %edx,%edx 110d81: f7 75 10 divl 0x10(%ebp) 110d84: 89 f3 mov %esi,%ebx 110d86: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110d88: 8b 45 14 mov 0x14(%ebp),%eax 110d8b: 85 c0 test %eax,%eax 110d8d: 74 59 je 110de8 <_Heap_Allocate_aligned_with_boundary+0x118> /* 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; 110d8f: 8d 34 3b lea (%ebx,%edi,1),%esi 110d92: 89 f0 mov %esi,%eax 110d94: 31 d2 xor %edx,%edx 110d96: f7 75 14 divl 0x14(%ebp) 110d99: 89 f0 mov %esi,%eax 110d9b: 29 d0 sub %edx,%eax 110d9d: 89 c2 mov %eax,%edx /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 110d9f: 39 c3 cmp %eax,%ebx 110da1: 73 45 jae 110de8 <_Heap_Allocate_aligned_with_boundary+0x118> 110da3: 39 c6 cmp %eax,%esi 110da5: 76 41 jbe 110de8 <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 110da7: 8b 45 cc mov -0x34(%ebp),%eax 110daa: 01 f8 add %edi,%eax 110dac: 89 45 dc mov %eax,-0x24(%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 ) { 110daf: 39 d0 cmp %edx,%eax 110db1: 77 80 ja 110d33 <_Heap_Allocate_aligned_with_boundary+0x63> 110db3: 89 ce mov %ecx,%esi 110db5: eb 0e jmp 110dc5 <_Heap_Allocate_aligned_with_boundary+0xf5> 110db7: 90 nop <== 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 ) { 110db8: 39 c1 cmp %eax,%ecx 110dba: 76 2a jbe 110de6 <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 110dbc: 39 55 dc cmp %edx,-0x24(%ebp) 110dbf: 0f 87 a3 00 00 00 ja 110e68 <_Heap_Allocate_aligned_with_boundary+0x198> return 0; } alloc_begin = boundary_line - alloc_size; 110dc5: 89 d3 mov %edx,%ebx 110dc7: 29 fb sub %edi,%ebx 110dc9: 89 d8 mov %ebx,%eax 110dcb: 31 d2 xor %edx,%edx 110dcd: f7 75 10 divl 0x10(%ebp) 110dd0: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110dd2: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110dd5: 89 c8 mov %ecx,%eax 110dd7: 31 d2 xor %edx,%edx 110dd9: f7 75 14 divl 0x14(%ebp) 110ddc: 89 c8 mov %ecx,%eax 110dde: 29 d0 sub %edx,%eax 110de0: 89 c2 mov %eax,%edx /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 110de2: 39 c3 cmp %eax,%ebx 110de4: 72 d2 jb 110db8 <_Heap_Allocate_aligned_with_boundary+0xe8> 110de6: 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 ) { 110de8: 39 5d cc cmp %ebx,-0x34(%ebp) 110deb: 0f 87 42 ff ff ff ja 110d33 <_Heap_Allocate_aligned_with_boundary+0x63> 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; 110df1: be f8 ff ff ff mov $0xfffffff8,%esi 110df6: 29 ce sub %ecx,%esi 110df8: 01 de add %ebx,%esi 110dfa: 89 d8 mov %ebx,%eax 110dfc: 31 d2 xor %edx,%edx 110dfe: f7 75 d4 divl -0x2c(%ebp) 110e01: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 110e03: 39 75 d0 cmp %esi,-0x30(%ebp) 110e06: 0f 86 1f ff ff ff jbe 110d2b <_Heap_Allocate_aligned_with_boundary+0x5b> 110e0c: 85 f6 test %esi,%esi 110e0e: 0f 85 1f ff ff ff jne 110d33 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 110e14: 85 db test %ebx,%ebx 110e16: 0f 84 17 ff ff ff je 110d33 <_Heap_Allocate_aligned_with_boundary+0x63> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 110e1c: 8b 55 e4 mov -0x1c(%ebp),%edx 110e1f: 8b 45 08 mov 0x8(%ebp),%eax 110e22: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 110e25: 57 push %edi 110e26: 53 push %ebx 110e27: 51 push %ecx 110e28: 50 push %eax 110e29: e8 1a b8 ff ff call 10c648 <_Heap_Block_allocate> 110e2e: 89 d8 mov %ebx,%eax 110e30: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 110e33: 8b 4d e4 mov -0x1c(%ebp),%ecx 110e36: 8b 55 08 mov 0x8(%ebp),%edx 110e39: 39 4a 44 cmp %ecx,0x44(%edx) 110e3c: 73 14 jae 110e52 <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110e3e: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 110e41: 8d 65 f4 lea -0xc(%ebp),%esp 110e44: 5b pop %ebx 110e45: 5e pop %esi 110e46: 5f pop %edi 110e47: c9 leave 110e48: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 110e49: 3b 7d 14 cmp 0x14(%ebp),%edi 110e4c: 76 21 jbe 110e6f <_Heap_Allocate_aligned_with_boundary+0x19f> 110e4e: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110e50: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 110e52: 8d 65 f4 lea -0xc(%ebp),%esp 110e55: 5b pop %ebx 110e56: 5e pop %esi 110e57: 5f pop %edi 110e58: c9 leave 110e59: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110e5a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 110e61: 8d 76 00 lea 0x0(%esi),%esi 110e64: 31 c0 xor %eax,%eax 110e66: eb cb jmp 110e33 <_Heap_Allocate_aligned_with_boundary+0x163> 110e68: 89 f1 mov %esi,%ecx <== NOT EXECUTED 110e6a: e9 c4 fe ff ff jmp 110d33 <_Heap_Allocate_aligned_with_boundary+0x63> <== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 110e6f: 8b 5d 10 mov 0x10(%ebp),%ebx 110e72: 85 db test %ebx,%ebx 110e74: 0f 85 87 fe ff ff jne 110d01 <_Heap_Allocate_aligned_with_boundary+0x31> 110e7a: 89 55 10 mov %edx,0x10(%ebp) 110e7d: e9 7f fe ff ff jmp 110d01 <_Heap_Allocate_aligned_with_boundary+0x31> 0010c648 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c648: 55 push %ebp 10c649: 89 e5 mov %esp,%ebp 10c64b: 57 push %edi 10c64c: 56 push %esi 10c64d: 53 push %ebx 10c64e: 83 ec 10 sub $0x10,%esp 10c651: 8b 75 08 mov 0x8(%ebp),%esi 10c654: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c657: 89 5d ec mov %ebx,-0x14(%ebp) 10c65a: 8b 7d 10 mov 0x10(%ebp),%edi 10c65d: 83 ef 08 sub $0x8,%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10c660: 89 f8 mov %edi,%eax 10c662: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c664: 8b 53 04 mov 0x4(%ebx),%edx 10c667: 83 e2 fe and $0xfffffffe,%edx 10c66a: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10c66f: 0f 85 8b 00 00 00 jne 10c700 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c675: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10c678: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10c67b: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10c67e: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c681: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10c684: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10c687: 8b 53 04 mov 0x4(%ebx),%edx 10c68a: 83 e2 fe and $0xfffffffe,%edx 10c68d: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c690: 8b 56 10 mov 0x10(%esi),%edx 10c693: 89 55 e4 mov %edx,-0x1c(%ebp) 10c696: 39 d0 cmp %edx,%eax 10c698: 72 72 jb 10c70c <_Heap_Block_allocate+0xc4> - 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; 10c69a: 8b 43 04 mov 0x4(%ebx),%eax 10c69d: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10c6a0: 8b 45 10 mov 0x10(%ebp),%eax 10c6a3: 31 d2 xor %edx,%edx 10c6a5: f7 75 e4 divl -0x1c(%ebp) 10c6a8: 29 d7 sub %edx,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10c6aa: 89 f8 mov %edi,%eax 10c6ac: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10c6ae: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10c6b1: f6 43 04 01 testb $0x1,0x4(%ebx) 10c6b5: 75 69 jne 10c720 <_Heap_Block_allocate+0xd8> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10c6b7: 2b 1b sub (%ebx),%ebx Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10c6b9: 8b 53 04 mov 0x4(%ebx),%edx 10c6bc: 83 e2 fe and $0xfffffffe,%edx 10c6bf: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c6c1: 89 c2 mov %eax,%edx 10c6c3: 83 ca 01 or $0x1,%edx 10c6c6: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10c6c9: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10c6cb: 8b 45 f0 mov -0x10(%ebp),%eax 10c6ce: 83 e0 fe and $0xfffffffe,%eax 10c6d1: 03 45 ec add -0x14(%ebp),%eax 10c6d4: 29 f8 sub %edi,%eax 10c6d6: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c6d9: ff 75 14 pushl 0x14(%ebp) 10c6dc: 51 push %ecx 10c6dd: 57 push %edi 10c6de: 56 push %esi 10c6df: e8 80 fe ff ff call 10c564 <_Heap_Block_split> 10c6e4: 89 fb mov %edi,%ebx 10c6e6: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c6e9: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10c6ec: 39 46 34 cmp %eax,0x34(%esi) 10c6ef: 76 03 jbe 10c6f4 <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10c6f1: 89 46 34 mov %eax,0x34(%esi) } return block; } 10c6f4: 89 d8 mov %ebx,%eax 10c6f6: 8d 65 f4 lea -0xc(%ebp),%esp 10c6f9: 5b pop %ebx 10c6fa: 5e pop %esi 10c6fb: 5f pop %edi 10c6fc: c9 leave 10c6fd: c3 ret 10c6fe: 66 90 xchg %ax,%ax <== NOT EXECUTED /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10c700: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c702: 8b 56 10 mov 0x10(%esi),%edx 10c705: 89 55 e4 mov %edx,-0x1c(%ebp) 10c708: 39 d0 cmp %edx,%eax 10c70a: 73 8e jae 10c69a <_Heap_Block_allocate+0x52> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10c70c: 03 45 14 add 0x14(%ebp),%eax 10c70f: 50 push %eax 10c710: 51 push %ecx 10c711: 53 push %ebx 10c712: 56 push %esi 10c713: e8 4c fe ff ff call 10c564 <_Heap_Block_split> 10c718: 83 c4 10 add $0x10,%esp 10c71b: eb cc jmp 10c6e9 <_Heap_Block_allocate+0xa1> 10c71d: 8d 76 00 lea 0x0(%esi),%esi <== 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; 10c720: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10c723: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10c726: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10c729: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10c72c: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c72f: ff 46 38 incl 0x38(%esi) 10c732: 89 d9 mov %ebx,%ecx 10c734: eb 8b jmp 10c6c1 <_Heap_Block_allocate+0x79> 0010c564 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c564: 55 push %ebp 10c565: 89 e5 mov %esp,%ebp 10c567: 57 push %edi 10c568: 56 push %esi 10c569: 53 push %ebx 10c56a: 83 ec 14 sub $0x14,%esp 10c56d: 8b 4d 08 mov 0x8(%ebp),%ecx 10c570: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c573: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c576: 8b 41 14 mov 0x14(%ecx),%eax 10c579: 89 45 e8 mov %eax,-0x18(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c57c: 8b 43 04 mov 0x4(%ebx),%eax 10c57f: 89 45 e4 mov %eax,-0x1c(%ebp) 10c582: 89 c6 mov %eax,%esi 10c584: 83 e6 fe and $0xfffffffe,%esi uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10c587: 8b 55 e8 mov -0x18(%ebp),%edx 10c58a: 83 ea 08 sub $0x8,%edx 10c58d: 8b 45 14 mov 0x14(%ebp),%eax 10c590: 39 d0 cmp %edx,%eax 10c592: 73 02 jae 10c596 <_Heap_Block_split+0x32> 10c594: 89 d0 mov %edx,%eax 10c596: 83 c0 08 add $0x8,%eax 10c599: 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; 10c59c: 31 d2 xor %edx,%edx 10c59e: f7 f7 div %edi if ( remainder != 0 ) { 10c5a0: 85 d2 test %edx,%edx 10c5a2: 75 70 jne 10c614 <_Heap_Block_split+0xb0> 10c5a4: 8b 7d f0 mov -0x10(%ebp),%edi 10c5a7: 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); 10c5aa: 8d 04 33 lea (%ebx,%esi,1),%eax 10c5ad: 89 45 e0 mov %eax,-0x20(%ebp) 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 ) { 10c5b0: 8d 56 04 lea 0x4(%esi),%edx 10c5b3: 2b 55 f0 sub -0x10(%ebp),%edx 10c5b6: 8b 7d e8 mov -0x18(%ebp),%edi 10c5b9: 83 c7 04 add $0x4,%edi 10c5bc: 39 fa cmp %edi,%edx 10c5be: 72 60 jb 10c620 <_Heap_Block_split+0xbc> 10c5c0: 8b 55 ec mov -0x14(%ebp),%edx 10c5c3: 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; 10c5c5: 2b 75 ec sub -0x14(%ebp),%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10c5c8: 8b 7d e4 mov -0x1c(%ebp),%edi 10c5cb: 83 e7 01 and $0x1,%edi 10c5ce: 0b 7d ec or -0x14(%ebp),%edi 10c5d1: 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; 10c5d4: 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; 10c5d7: 8b 58 04 mov 0x4(%eax),%ebx 10c5da: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c5dd: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c5e2: 75 4c jne 10c630 <_Heap_Block_split+0xcc> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10c5e4: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10c5e7: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10c5ea: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c5ed: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c5f0: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c5f3: 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; 10c5f6: 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); 10c5f8: 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; 10c5fb: 89 f1 mov %esi,%ecx 10c5fd: 83 c9 01 or $0x1,%ecx 10c600: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c603: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c605: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c609: 83 c4 14 add $0x14,%esp 10c60c: 5b pop %ebx 10c60d: 5e pop %esi 10c60e: 5f pop %edi 10c60f: c9 leave 10c610: c3 ret 10c611: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10c614: 03 7d f0 add -0x10(%ebp),%edi 10c617: 29 d7 sub %edx,%edi 10c619: 89 7d ec mov %edi,-0x14(%ebp) 10c61c: eb 8c jmp 10c5aa <_Heap_Block_split+0x46> 10c61e: 66 90 xchg %ax,%ax <== NOT EXECUTED 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; 10c620: 8b 45 e0 mov -0x20(%ebp),%eax 10c623: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c627: 83 c4 14 add $0x14,%esp 10c62a: 5b pop %ebx 10c62b: 5e pop %esi 10c62c: 5f pop %edi 10c62d: c9 leave 10c62e: c3 ret 10c62f: 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; 10c630: 8b 7d 10 mov 0x10(%ebp),%edi 10c633: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c636: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c639: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c63c: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c63f: 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; 10c642: ff 41 38 incl 0x38(%ecx) 10c645: eb b4 jmp 10c5fb <_Heap_Block_split+0x97> 001145d0 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 1145d0: 55 push %ebp 1145d1: 89 e5 mov %esp,%ebp 1145d3: 56 push %esi 1145d4: 53 push %ebx 1145d5: 8b 4d 08 mov 0x8(%ebp),%ecx 1145d8: 8b 45 0c mov 0xc(%ebp),%eax Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 1145db: 8b 51 1c mov 0x1c(%ecx),%edx uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 1145de: 8b 59 24 mov 0x24(%ecx),%ebx uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 1145e1: 3b 41 18 cmp 0x18(%ecx),%eax 1145e4: 73 3a jae 114620 <_Heap_Extend+0x50> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 1145e6: 39 d0 cmp %edx,%eax 1145e8: 74 0e je 1145f8 <_Heap_Extend+0x28> 1145ea: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1145ef: 8d 65 f8 lea -0x8(%ebp),%esp 1145f2: 5b pop %ebx 1145f3: 5e pop %esi 1145f4: c9 leave 1145f5: c3 ret 1145f6: 66 90 xchg %ax,%ax <== NOT EXECUTED { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 1145f8: 03 45 10 add 0x10(%ebp),%eax * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 1145fb: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 1145fe: 29 d8 sub %ebx,%eax 114600: 8d 70 f8 lea -0x8(%eax),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 114603: 89 f0 mov %esi,%eax 114605: 31 d2 xor %edx,%edx 114607: f7 71 10 divl 0x10(%ecx) 11460a: 29 d6 sub %edx,%esi - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 11460c: 8b 45 14 mov 0x14(%ebp),%eax 11460f: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 114611: 39 71 14 cmp %esi,0x14(%ecx) 114614: 76 1a jbe 114630 <_Heap_Extend+0x60> 114616: 31 c0 xor %eax,%eax <== NOT EXECUTED _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 114618: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 11461b: 5b pop %ebx <== NOT EXECUTED 11461c: 5e pop %esi <== NOT EXECUTED 11461d: c9 leave <== NOT EXECUTED 11461e: c3 ret <== NOT EXECUTED 11461f: 90 nop <== NOT EXECUTED * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 114620: 39 d0 cmp %edx,%eax 114622: 73 c2 jae 1145e6 <_Heap_Extend+0x16> 114624: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 114629: 8d 65 f8 lea -0x8(%ebp),%esp 11462c: 5b pop %ebx 11462d: 5e pop %esi 11462e: c9 leave 11462f: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 114630: 8d 14 1e lea (%esi,%ebx,1),%edx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 114633: 8b 43 04 mov 0x4(%ebx),%eax 114636: 83 e0 01 and $0x1,%eax 114639: 09 f0 or %esi,%eax 11463b: 89 43 04 mov %eax,0x4(%ebx) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 11463e: 8b 41 20 mov 0x20(%ecx),%eax 114641: 29 d0 sub %edx,%eax 114643: 83 c8 01 or $0x1,%eax 114646: 89 42 04 mov %eax,0x4(%edx) ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 114649: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 11464c: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 11464f: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 114652: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 114655: 83 ec 08 sub $0x8,%esp 114658: 83 c3 08 add $0x8,%ebx 11465b: 53 push %ebx 11465c: 51 push %ecx 11465d: e8 b2 ad ff ff call 10f414 <_Heap_Free> 114662: 31 c0 xor %eax,%eax 114664: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 114667: 8d 65 f8 lea -0x8(%ebp),%esp 11466a: 5b pop %ebx 11466b: 5e pop %esi 11466c: c9 leave 11466d: c3 ret 00110e84 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110e84: 55 push %ebp 110e85: 89 e5 mov %esp,%ebp 110e87: 57 push %edi 110e88: 56 push %esi 110e89: 53 push %ebx 110e8a: 83 ec 18 sub $0x18,%esp 110e8d: 8b 5d 08 mov 0x8(%ebp),%ebx 110e90: 8b 45 0c mov 0xc(%ebp),%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 110e93: 8d 48 f8 lea -0x8(%eax),%ecx 110e96: 31 d2 xor %edx,%edx 110e98: f7 73 10 divl 0x10(%ebx) 110e9b: 29 d1 sub %edx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 110e9d: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 110ea0: 39 c1 cmp %eax,%ecx 110ea2: 72 07 jb 110eab <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 110ea4: 8b 73 24 mov 0x24(%ebx),%esi 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 110ea7: 39 f1 cmp %esi,%ecx 110ea9: 76 0d jbe 110eb8 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 110eab: 31 c0 xor %eax,%eax } 110ead: 83 c4 18 add $0x18,%esp 110eb0: 5b pop %ebx 110eb1: 5e pop %esi 110eb2: 5f pop %edi 110eb3: c9 leave 110eb4: c3 ret 110eb5: 8d 76 00 lea 0x0(%esi),%esi <== 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; 110eb8: 8b 51 04 mov 0x4(%ecx),%edx 110ebb: 89 55 f0 mov %edx,-0x10(%ebp) 110ebe: 83 e2 fe and $0xfffffffe,%edx 110ec1: 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); 110ec4: 01 ca add %ecx,%edx 110ec6: 89 55 dc mov %edx,-0x24(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 110ec9: 39 d0 cmp %edx,%eax 110ecb: 77 de ja 110eab <_Heap_Free+0x27> 110ecd: 39 d6 cmp %edx,%esi 110ecf: 72 da jb 110eab <_Heap_Free+0x27> 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; 110ed1: 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 ) ) { 110ed4: f7 c7 01 00 00 00 test $0x1,%edi 110eda: 74 cf je 110eab <_Heap_Free+0x27> - 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; 110edc: 83 e7 fe and $0xfffffffe,%edi 110edf: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 110ee2: 39 d6 cmp %edx,%esi 110ee4: 0f 84 e2 00 00 00 je 110fcc <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110eea: 8b 55 dc mov -0x24(%ebp),%edx 110eed: 8b 7d e8 mov -0x18(%ebp),%edi 110ef0: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 110ef4: 89 7d e0 mov %edi,-0x20(%ebp) 110ef7: 8a 55 e0 mov -0x20(%ebp),%dl 110efa: 83 e2 01 and $0x1,%edx 110efd: 88 55 e7 mov %dl,-0x19(%ebp) 110f00: 80 75 e7 01 xorb $0x1,-0x19(%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 ) ) { 110f04: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110f08: 75 46 jne 110f50 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 110f0a: 8b 39 mov (%ecx),%edi 110f0c: 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); 110f0f: 29 f9 sub %edi,%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 110f11: 39 c8 cmp %ecx,%eax 110f13: 77 96 ja 110eab <_Heap_Free+0x27> 110f15: 39 ce cmp %ecx,%esi 110f17: 72 92 jb 110eab <_Heap_Free+0x27> 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) ) { 110f19: f6 41 04 01 testb $0x1,0x4(%ecx) 110f1d: 74 8c je 110eab <_Heap_Free+0x27> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 110f1f: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110f23: 0f 84 af 00 00 00 je 110fd8 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 110f29: 8b 45 ec mov -0x14(%ebp),%eax 110f2c: 03 45 e8 add -0x18(%ebp),%eax 110f2f: 01 f8 add %edi,%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 110f31: 8b 55 dc mov -0x24(%ebp),%edx 110f34: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 110f37: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 110f3a: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 110f3d: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 110f40: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110f43: 89 c2 mov %eax,%edx 110f45: 83 ca 01 or $0x1,%edx 110f48: 89 51 04 mov %edx,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 110f4b: 89 04 01 mov %eax,(%ecx,%eax,1) 110f4e: eb 2c jmp 110f7c <_Heap_Free+0xf8> 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 */ 110f50: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110f54: 74 3e je 110f94 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 110f56: 8b 7d e8 mov -0x18(%ebp),%edi 110f59: 03 7d ec add -0x14(%ebp),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 110f5c: 8b 75 dc mov -0x24(%ebp),%esi 110f5f: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 110f62: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 110f65: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 110f68: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 110f6b: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 110f6e: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110f71: 89 f8 mov %edi,%eax 110f73: 83 c8 01 or $0x1,%eax 110f76: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 110f79: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 110f7c: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 110f7f: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 110f82: 8b 55 ec mov -0x14(%ebp),%edx 110f85: 01 53 30 add %edx,0x30(%ebx) 110f88: b0 01 mov $0x1,%al return( true ); } 110f8a: 83 c4 18 add $0x18,%esp 110f8d: 5b pop %ebx 110f8e: 5e pop %esi 110f8f: 5f pop %edi 110f90: c9 leave 110f91: c3 ret 110f92: 66 90 xchg %ax,%ax <== 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; 110f94: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 110f97: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 110f9a: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110f9d: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110fa0: 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; 110fa3: 8b 45 ec mov -0x14(%ebp),%eax 110fa6: 83 c8 01 or $0x1,%eax 110fa9: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110fac: 8b 7d dc mov -0x24(%ebp),%edi 110faf: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 110fb3: 8b 45 ec mov -0x14(%ebp),%eax 110fb6: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 110fb8: 8b 43 38 mov 0x38(%ebx),%eax 110fbb: 40 inc %eax 110fbc: 89 43 38 mov %eax,0x38(%ebx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 110fbf: 3b 43 3c cmp 0x3c(%ebx),%eax 110fc2: 76 b8 jbe 110f7c <_Heap_Free+0xf8> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 110fc4: 89 43 3c mov %eax,0x3c(%ebx) 110fc7: eb b3 jmp 110f7c <_Heap_Free+0xf8> 110fc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 110fcc: c6 45 e7 00 movb $0x0,-0x19(%ebp) 110fd0: e9 2f ff ff ff jmp 110f04 <_Heap_Free+0x80> 110fd5: 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; 110fd8: 8b 45 ec mov -0x14(%ebp),%eax 110fdb: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110fde: 89 c6 mov %eax,%esi 110fe0: 83 ce 01 or $0x1,%esi 110fe3: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110fe6: 8b 55 dc mov -0x24(%ebp),%edx 110fe9: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110fed: 89 02 mov %eax,(%edx) 110fef: eb 8b jmp 110f7c <_Heap_Free+0xf8> 0013dec8 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 13dec8: 55 push %ebp 13dec9: 89 e5 mov %esp,%ebp 13decb: 57 push %edi 13decc: 56 push %esi 13decd: 53 push %ebx 13dece: 83 ec 04 sub $0x4,%esp 13ded1: 8b 45 08 mov 0x8(%ebp),%eax 13ded4: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 13ded7: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 13deda: 8b 78 24 mov 0x24(%eax),%edi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 13dedd: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 13dee3: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 13deea: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 13def1: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 13def8: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 13deff: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 13df06: 39 fb cmp %edi,%ebx 13df08: 74 45 je 13df4f <_Heap_Get_information+0x87> 13df0a: 8b 4b 04 mov 0x4(%ebx),%ecx 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; 13df0d: 8d 46 0c lea 0xc(%esi),%eax 13df10: 89 45 f0 mov %eax,-0x10(%ebp) 13df13: eb 16 jmp 13df2b <_Heap_Get_information+0x63> 13df15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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) ) 13df18: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 13df1a: ff 00 incl (%eax) info->total += the_size; 13df1c: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 13df1f: 39 50 04 cmp %edx,0x4(%eax) 13df22: 73 03 jae 13df27 <_Heap_Get_information+0x5f> info->largest = the_size; 13df24: 89 50 04 mov %edx,0x4(%eax) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13df27: 39 df cmp %ebx,%edi 13df29: 74 15 je 13df40 <_Heap_Get_information+0x78> - 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; 13df2b: 89 ca mov %ecx,%edx 13df2d: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 13df30: 01 d3 add %edx,%ebx 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; 13df32: 8b 4b 04 mov 0x4(%ebx),%ecx 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) ) 13df35: f6 c1 01 test $0x1,%cl 13df38: 74 de je 13df18 <_Heap_Get_information+0x50> 13df3a: 8b 45 f0 mov -0x10(%ebp),%eax 13df3d: eb db jmp 13df1a <_Heap_Get_information+0x52> 13df3f: 90 nop <== NOT EXECUTED the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13df40: 8b 46 14 mov 0x14(%esi),%eax 13df43: 83 c0 08 add $0x8,%eax /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 13df46: 89 46 14 mov %eax,0x14(%esi) } 13df49: 58 pop %eax 13df4a: 5b pop %ebx 13df4b: 5e pop %esi 13df4c: 5f pop %edi 13df4d: c9 leave 13df4e: c3 ret the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13df4f: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 13df54: eb f0 jmp 13df46 <_Heap_Get_information+0x7e> <== NOT EXECUTED 0010c414 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c414: 55 push %ebp 10c415: 89 e5 mov %esp,%ebp 10c417: 57 push %edi 10c418: 56 push %esi 10c419: 53 push %ebx 10c41a: 83 ec 10 sub $0x10,%esp 10c41d: 8b 5d 08 mov 0x8(%ebp),%ebx 10c420: 8b 4d 14 mov 0x14(%ebp),%ecx uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 10c423: 85 c9 test %ecx,%ecx 10c425: 0f 85 f5 00 00 00 jne 10c520 <_Heap_Initialize+0x10c> 10c42b: b1 04 mov $0x4,%cl 10c42d: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 10c434: 8b 75 0c mov 0xc(%ebp),%esi 10c437: 83 c6 08 add $0x8,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c43a: 89 f0 mov %esi,%eax 10c43c: 31 d2 xor %edx,%edx 10c43e: f7 f1 div %ecx if ( remainder != 0 ) { 10c440: 85 d2 test %edx,%edx 10c442: 74 05 je 10c449 <_Heap_Initialize+0x35> return value - remainder + alignment; 10c444: 8d 34 31 lea (%ecx,%esi,1),%esi 10c447: 29 d6 sub %edx,%esi overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10c449: 8b 55 0c mov 0xc(%ebp),%edx 10c44c: 03 55 10 add 0x10(%ebp),%edx 10c44f: 89 55 ec mov %edx,-0x14(%ebp) 10c452: 0f 82 d9 00 00 00 jb 10c531 <_Heap_Initialize+0x11d> } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10c458: 8d 7e f8 lea -0x8(%esi),%edi 10c45b: 2b 75 0c sub 0xc(%ebp),%esi first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10c45e: 39 75 10 cmp %esi,0x10(%ebp) 10c461: 0f 86 ca 00 00 00 jbe 10c531 <_Heap_Initialize+0x11d> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; 10c467: 8b 45 10 mov 0x10(%ebp),%eax 10c46a: 29 f0 sub %esi,%eax 10c46c: 89 c6 mov %eax,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c46e: 31 d2 xor %edx,%edx 10c470: f7 f1 div %ecx 10c472: 29 d6 sub %edx,%esi 10c474: 89 75 e4 mov %esi,-0x1c(%ebp) first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10c477: 39 75 f0 cmp %esi,-0x10(%ebp) 10c47a: 0f 87 b1 00 00 00 ja 10c531 <_Heap_Initialize+0x11d> alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; 10c480: 89 f0 mov %esi,%eax 10c482: 83 e8 08 sub $0x8,%eax return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10c485: 89 0f mov %ecx,(%edi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c487: 89 f2 mov %esi,%edx 10c489: 83 ca 01 or $0x1,%edx 10c48c: 89 57 04 mov %edx,0x4(%edi) first_block->next = _Heap_Free_list_tail( heap ); 10c48f: 89 5f 08 mov %ebx,0x8(%edi) first_block->prev = _Heap_Free_list_head( heap ); 10c492: 89 5f 0c mov %ebx,0xc(%edi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c495: 01 fe add %edi,%esi 10c497: 89 73 24 mov %esi,0x24(%ebx) * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; 10c49a: 8b 55 e4 mov -0x1c(%ebp),%edx 10c49d: 89 16 mov %edx,(%esi) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10c49f: 89 fa mov %edi,%edx 10c4a1: 29 f2 sub %esi,%edx 10c4a3: 89 56 04 mov %edx,0x4(%esi) /* Heap control */ heap->page_size = page_size; 10c4a6: 89 4b 10 mov %ecx,0x10(%ebx) heap->min_block_size = min_block_size; 10c4a9: 8b 75 f0 mov -0x10(%ebp),%esi 10c4ac: 89 73 14 mov %esi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c4af: 8b 55 0c mov 0xc(%ebp),%edx 10c4b2: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c4b5: 8b 75 ec mov -0x14(%ebp),%esi 10c4b8: 89 73 1c mov %esi,0x1c(%ebx) heap->first_block = first_block; 10c4bb: 89 7b 20 mov %edi,0x20(%ebx) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 10c4be: 89 7b 08 mov %edi,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c4c1: 89 7b 0c mov %edi,0xc(%ebx) /* Statistics */ stats->size = first_block_size; 10c4c4: 8b 55 e4 mov -0x1c(%ebp),%edx 10c4c7: 89 53 2c mov %edx,0x2c(%ebx) stats->free_size = first_block_size; 10c4ca: 89 53 30 mov %edx,0x30(%ebx) stats->min_free_size = first_block_size; 10c4cd: 89 53 34 mov %edx,0x34(%ebx) stats->free_blocks = 1; 10c4d0: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c4d7: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c4de: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c4e5: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c4ec: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c4f3: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c4fa: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c501: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c508: 8b 15 40 73 12 00 mov 0x127340,%edx 10c50e: 89 53 28 mov %edx,0x28(%ebx) 10c511: 42 inc %edx 10c512: 89 15 40 73 12 00 mov %edx,0x127340 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 10c518: 83 c4 10 add $0x10,%esp 10c51b: 5b pop %ebx 10c51c: 5e pop %esi 10c51d: 5f pop %edi 10c51e: c9 leave 10c51f: c3 ret uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c520: 89 c8 mov %ecx,%eax 10c522: 83 e0 03 and $0x3,%eax 10c525: 74 05 je 10c52c <_Heap_Initialize+0x118> return value - remainder + alignment; 10c527: 83 c1 04 add $0x4,%ecx 10c52a: 29 c1 sub %eax,%ecx if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c52c: 83 f9 03 cmp $0x3,%ecx 10c52f: 77 0b ja 10c53c <_Heap_Initialize+0x128> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10c531: 31 c0 xor %eax,%eax } 10c533: 83 c4 10 add $0x10,%esp 10c536: 5b pop %ebx 10c537: 5e pop %esi 10c538: 5f pop %edi 10c539: c9 leave 10c53a: c3 ret 10c53b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c53c: b8 10 00 00 00 mov $0x10,%eax 10c541: 31 d2 xor %edx,%edx 10c543: f7 f1 div %ecx if ( remainder != 0 ) { 10c545: 85 d2 test %edx,%edx 10c547: 74 0d je 10c556 <_Heap_Initialize+0x142> return value - remainder + alignment; 10c549: 8d 41 10 lea 0x10(%ecx),%eax 10c54c: 29 d0 sub %edx,%eax 10c54e: 89 45 f0 mov %eax,-0x10(%ebp) 10c551: e9 de fe ff ff jmp 10c434 <_Heap_Initialize+0x20> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c556: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10c55d: e9 d2 fe ff ff jmp 10c434 <_Heap_Initialize+0x20> 0011f090 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11f090: 55 push %ebp 11f091: 89 e5 mov %esp,%ebp 11f093: 57 push %edi 11f094: 56 push %esi 11f095: 53 push %ebx 11f096: 83 ec 2c sub $0x2c,%esp 11f099: 8b 5d 08 mov 0x8(%ebp),%ebx 11f09c: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 11f09f: 8d 4e f8 lea -0x8(%esi),%ecx 11f0a2: 89 f0 mov %esi,%eax 11f0a4: 31 d2 xor %edx,%edx 11f0a6: f7 73 10 divl 0x10(%ebx) 11f0a9: 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; 11f0ab: 8b 45 14 mov 0x14(%ebp),%eax 11f0ae: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11f0b4: 8b 55 18 mov 0x18(%ebp),%edx 11f0b7: c7 02 00 00 00 00 movl $0x0,(%edx) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11f0bd: 39 4b 20 cmp %ecx,0x20(%ebx) 11f0c0: 76 0e jbe 11f0d0 <_Heap_Resize_block+0x40> 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; /* Statistics */ ++stats->resizes; 11f0c2: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f0c7: 8d 65 f4 lea -0xc(%ebp),%esp 11f0ca: 5b pop %ebx 11f0cb: 5e pop %esi 11f0cc: 5f pop %edi 11f0cd: c9 leave 11f0ce: c3 ret 11f0cf: 90 nop <== NOT EXECUTED 11f0d0: 39 4b 24 cmp %ecx,0x24(%ebx) 11f0d3: 72 ed jb 11f0c2 <_Heap_Resize_block+0x32> - 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; 11f0d5: 8b 41 04 mov 0x4(%ecx),%eax 11f0d8: 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; 11f0db: 8d 3c 01 lea (%ecx,%eax,1),%edi 11f0de: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11f0e1: 89 fa mov %edi,%edx 11f0e3: 29 f2 sub %esi,%edx 11f0e5: 83 c2 04 add $0x4,%edx 11f0e8: 89 55 dc mov %edx,-0x24(%ebp) 11f0eb: 8b 57 04 mov 0x4(%edi),%edx 11f0ee: 83 e2 fe and $0xfffffffe,%edx 11f0f1: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11f0f4: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11f0f8: 83 e2 01 and $0x1,%edx 11f0fb: 89 55 e0 mov %edx,-0x20(%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; 11f0fe: 8b 55 dc mov -0x24(%ebp),%edx 11f101: 8b 7d 14 mov 0x14(%ebp),%edi 11f104: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f106: 8a 55 e0 mov -0x20(%ebp),%dl 11f109: 80 f2 01 xor $0x1,%dl 11f10c: 88 55 e0 mov %dl,-0x20(%ebp) 11f10f: 75 17 jne 11f128 <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f111: 8b 55 dc mov -0x24(%ebp),%edx 11f114: 39 55 10 cmp %edx,0x10(%ebp) 11f117: 76 20 jbe 11f139 <_Heap_Resize_block+0xa9> 11f119: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f11e: 8d 65 f4 lea -0xc(%ebp),%esp 11f121: 5b pop %ebx 11f122: 5e pop %esi 11f123: 5f pop %edi 11f124: c9 leave 11f125: c3 ret 11f126: 66 90 xchg %ax,%ax <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11f128: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f12b: 8b 7d d0 mov -0x30(%ebp),%edi 11f12e: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11f131: 8b 55 dc mov -0x24(%ebp),%edx 11f134: 39 55 10 cmp %edx,0x10(%ebp) 11f137: 77 e0 ja 11f119 <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f139: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11f13d: 74 31 je 11f170 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11f13f: 8b 79 04 mov 0x4(%ecx),%edi 11f142: 83 e7 01 and $0x1,%edi 11f145: 09 c7 or %eax,%edi 11f147: 89 79 04 mov %edi,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11f14a: 8b 7d d4 mov -0x2c(%ebp),%edi 11f14d: 8b 7f 08 mov 0x8(%edi),%edi 11f150: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11f153: 8b 55 d4 mov -0x2c(%ebp),%edx 11f156: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11f159: 8b 55 e4 mov -0x1c(%ebp),%edx 11f15c: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11f15f: 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; 11f162: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11f167: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11f16a: 8b 7d d0 mov -0x30(%ebp),%edi 11f16d: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11f170: ff 75 10 pushl 0x10(%ebp) 11f173: 56 push %esi 11f174: 51 push %ecx 11f175: 53 push %ebx 11f176: e8 cd d4 fe ff call 10c648 <_Heap_Block_allocate> 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; 11f17b: 8b 50 04 mov 0x4(%eax),%edx 11f17e: 83 e2 fe and $0xfffffffe,%edx 11f181: 29 f0 sub %esi,%eax 11f183: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11f187: 8b 55 18 mov 0x18(%ebp),%edx 11f18a: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11f18c: ff 43 54 incl 0x54(%ebx) 11f18f: 31 c0 xor %eax,%eax 11f191: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f194: 8d 65 f4 lea -0xc(%ebp),%esp 11f197: 5b pop %ebx 11f198: 5e pop %esi 11f199: 5f pop %edi 11f19a: c9 leave 11f19b: c3 ret 0011f19c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11f19c: 55 push %ebp 11f19d: 89 e5 mov %esp,%ebp 11f19f: 56 push %esi 11f1a0: 53 push %ebx 11f1a1: 8b 5d 08 mov 0x8(%ebp),%ebx 11f1a4: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 11f1a7: 8d 4e f8 lea -0x8(%esi),%ecx 11f1aa: 89 f0 mov %esi,%eax 11f1ac: 31 d2 xor %edx,%edx 11f1ae: f7 73 10 divl 0x10(%ebx) 11f1b1: 29 d1 sub %edx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11f1b3: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11f1b6: 39 c1 cmp %eax,%ecx 11f1b8: 72 07 jb 11f1c1 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11f1ba: 8b 53 24 mov 0x24(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11f1bd: 39 d1 cmp %edx,%ecx 11f1bf: 76 07 jbe 11f1c8 <_Heap_Size_of_alloc_area+0x2c> return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11f1c1: 31 c0 xor %eax,%eax } 11f1c3: 5b pop %ebx 11f1c4: 5e pop %esi 11f1c5: c9 leave 11f1c6: c3 ret 11f1c7: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11f1c8: 8b 59 04 mov 0x4(%ecx),%ebx 11f1cb: 83 e3 fe and $0xfffffffe,%ebx 11f1ce: 01 d9 add %ebx,%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 11f1d0: 39 c8 cmp %ecx,%eax 11f1d2: 77 ed ja 11f1c1 <_Heap_Size_of_alloc_area+0x25> 11f1d4: 39 ca cmp %ecx,%edx 11f1d6: 72 e9 jb 11f1c1 <_Heap_Size_of_alloc_area+0x25> } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11f1d8: f6 41 04 01 testb $0x1,0x4(%ecx) 11f1dc: 74 e3 je 11f1c1 <_Heap_Size_of_alloc_area+0x25> || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11f1de: 29 f1 sub %esi,%ecx 11f1e0: 8d 51 04 lea 0x4(%ecx),%edx 11f1e3: 8b 45 10 mov 0x10(%ebp),%eax 11f1e6: 89 10 mov %edx,(%eax) 11f1e8: b0 01 mov $0x1,%al return true; } 11f1ea: 5b pop %ebx 11f1eb: 5e pop %esi 11f1ec: c9 leave 11f1ed: c3 ret 0010d1b0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d1b0: 55 push %ebp 10d1b1: 89 e5 mov %esp,%ebp 10d1b3: 57 push %edi 10d1b4: 56 push %esi 10d1b5: 53 push %ebx 10d1b6: 83 ec 3c sub $0x3c,%esp 10d1b9: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d1bc: 8b 43 10 mov 0x10(%ebx),%eax 10d1bf: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d1c2: 8b 53 14 mov 0x14(%ebx),%edx 10d1c5: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d1c8: 8b 43 24 mov 0x24(%ebx),%eax 10d1cb: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d1ce: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d1d1: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d1d5: 75 1d jne 10d1f4 <_Heap_Walk+0x44> 10d1d7: c7 45 e4 a8 d1 10 00 movl $0x10d1a8,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d1de: 83 3d 40 9e 12 00 03 cmpl $0x3,0x129e40 10d1e5: 74 1d je 10d204 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d1e7: b0 01 mov $0x1,%al block = next_block; } return true; } 10d1e9: 8d 65 f4 lea -0xc(%ebp),%esp 10d1ec: 5b pop %ebx 10d1ed: 5e pop %esi 10d1ee: 5f pop %edi 10d1ef: c9 leave 10d1f0: c3 ret 10d1f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d1f4: c7 45 e4 78 d5 10 00 movl $0x10d578,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d1fb: 83 3d 40 9e 12 00 03 cmpl $0x3,0x129e40 10d202: 75 e3 jne 10d1e7 <_Heap_Walk+0x37> 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)( 10d204: 52 push %edx 10d205: ff 73 0c pushl 0xc(%ebx) 10d208: ff 73 08 pushl 0x8(%ebx) 10d20b: ff 75 d8 pushl -0x28(%ebp) 10d20e: 56 push %esi 10d20f: ff 73 1c pushl 0x1c(%ebx) 10d212: ff 73 18 pushl 0x18(%ebx) 10d215: ff 75 dc pushl -0x24(%ebp) 10d218: ff 75 e0 pushl -0x20(%ebp) 10d21b: 68 50 1f 12 00 push $0x121f50 10d220: 6a 00 push $0x0 10d222: ff 75 0c pushl 0xc(%ebp) 10d225: ff 55 e4 call *-0x1c(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d228: 83 c4 30 add $0x30,%esp 10d22b: 8b 45 e0 mov -0x20(%ebp),%eax 10d22e: 85 c0 test %eax,%eax 10d230: 0f 84 b2 00 00 00 je 10d2e8 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d236: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d23a: 0f 85 b0 00 00 00 jne 10d2f0 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d240: 8b 45 dc mov -0x24(%ebp),%eax 10d243: 31 d2 xor %edx,%edx 10d245: f7 75 e0 divl -0x20(%ebp) 10d248: 85 d2 test %edx,%edx 10d24a: 0f 85 ac 00 00 00 jne 10d2fc <_Heap_Walk+0x14c> ); return false; } if ( 10d250: 8d 46 08 lea 0x8(%esi),%eax 10d253: 31 d2 xor %edx,%edx 10d255: f7 75 e0 divl -0x20(%ebp) 10d258: 85 d2 test %edx,%edx 10d25a: 0f 85 a8 00 00 00 jne 10d308 <_Heap_Walk+0x158> 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; 10d260: 8b 56 04 mov 0x4(%esi),%edx 10d263: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d266: 83 e2 01 and $0x1,%edx 10d269: 0f 84 a1 00 00 00 je 10d310 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d26f: 8b 06 mov (%esi),%eax 10d271: 39 45 e0 cmp %eax,-0x20(%ebp) 10d274: 75 4e jne 10d2c4 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d276: 8b 55 d8 mov -0x28(%ebp),%edx 10d279: 8b 42 04 mov 0x4(%edx),%eax 10d27c: 83 e0 fe and $0xfffffffe,%eax 10d27f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d284: 0f 84 bd 02 00 00 je 10d547 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d28a: 8b 43 10 mov 0x10(%ebx),%eax 10d28d: 89 45 d4 mov %eax,-0x2c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d290: 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 ) { 10d293: 39 cb cmp %ecx,%ebx 10d295: 0f 84 08 01 00 00 je 10d3a3 <_Heap_Walk+0x1f3> 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; 10d29b: 8b 7b 20 mov 0x20(%ebx),%edi 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 10d29e: 39 cf cmp %ecx,%edi 10d2a0: 76 76 jbe 10d318 <_Heap_Walk+0x168> 10d2a2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d2a4: 51 push %ecx 10d2a5: 68 98 20 12 00 push $0x122098 10d2aa: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d2ac: 6a 01 push $0x1 10d2ae: ff 75 0c pushl 0xc(%ebp) 10d2b1: ff 55 e4 call *-0x1c(%ebp) 10d2b4: 31 c0 xor %eax,%eax 10d2b6: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d2b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d2bc: 5b pop %ebx 10d2bd: 5e pop %esi 10d2be: 5f pop %edi 10d2bf: c9 leave 10d2c0: c3 ret 10d2c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d2c4: 83 ec 0c sub $0xc,%esp 10d2c7: ff 75 e0 pushl -0x20(%ebp) 10d2ca: 50 push %eax 10d2cb: 68 6c 20 12 00 push $0x12206c return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d2d0: 6a 01 push $0x1 10d2d2: ff 75 0c pushl 0xc(%ebp) 10d2d5: ff 55 e4 call *-0x1c(%ebp) 10d2d8: 31 c0 xor %eax,%eax 10d2da: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d2dd: 8d 65 f4 lea -0xc(%ebp),%esp 10d2e0: 5b pop %ebx 10d2e1: 5e pop %esi 10d2e2: 5f pop %edi 10d2e3: c9 leave 10d2e4: c3 ret 10d2e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d2e8: 57 push %edi 10d2e9: 68 c7 22 12 00 push $0x1222c7 10d2ee: eb bc jmp 10d2ac <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d2f0: ff 75 e0 pushl -0x20(%ebp) 10d2f3: 68 da 22 12 00 push $0x1222da 10d2f8: eb b2 jmp 10d2ac <_Heap_Walk+0xfc> 10d2fa: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d2fc: ff 75 dc pushl -0x24(%ebp) 10d2ff: 68 e4 1f 12 00 push $0x121fe4 10d304: eb a6 jmp 10d2ac <_Heap_Walk+0xfc> 10d306: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d308: 56 push %esi 10d309: 68 08 20 12 00 push $0x122008 10d30e: eb 9c jmp 10d2ac <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d310: 56 push %esi 10d311: 68 3c 20 12 00 push $0x12203c 10d316: eb 94 jmp 10d2ac <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d318: 8b 53 24 mov 0x24(%ebx),%edx 10d31b: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10d31e: 39 ca cmp %ecx,%edx 10d320: 72 82 jb 10d2a4 <_Heap_Walk+0xf4> ); return false; } if ( 10d322: 8d 41 08 lea 0x8(%ecx),%eax 10d325: 31 d2 xor %edx,%edx 10d327: f7 75 d4 divl -0x2c(%ebp) 10d32a: 85 d2 test %edx,%edx 10d32c: 0f 85 20 02 00 00 jne 10d552 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d332: 8b 41 04 mov 0x4(%ecx),%eax 10d335: 83 e0 fe and $0xfffffffe,%eax 10d338: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d33d: 0f 85 29 02 00 00 jne 10d56c <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10d343: 8b 41 0c mov 0xc(%ecx),%eax 10d346: 39 c3 cmp %eax,%ebx 10d348: 0f 85 0f 02 00 00 jne 10d55d <_Heap_Walk+0x3ad> 10d34e: 89 75 c8 mov %esi,-0x38(%ebp) 10d351: 89 de mov %ebx,%esi 10d353: eb 40 jmp 10d395 <_Heap_Walk+0x1e5> 10d355: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d358: 39 f9 cmp %edi,%ecx 10d35a: 0f 82 44 ff ff ff jb 10d2a4 <_Heap_Walk+0xf4> 10d360: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d363: 0f 82 3b ff ff ff jb 10d2a4 <_Heap_Walk+0xf4> ); return false; } if ( 10d369: 8d 41 08 lea 0x8(%ecx),%eax 10d36c: 31 d2 xor %edx,%edx 10d36e: f7 75 d4 divl -0x2c(%ebp) 10d371: 85 d2 test %edx,%edx 10d373: 0f 85 d9 01 00 00 jne 10d552 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d379: 8b 41 04 mov 0x4(%ecx),%eax 10d37c: 83 e0 fe and $0xfffffffe,%eax 10d37f: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d384: 0f 85 e2 01 00 00 jne 10d56c <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10d38a: 8b 41 0c mov 0xc(%ecx),%eax 10d38d: 39 d8 cmp %ebx,%eax 10d38f: 0f 85 c8 01 00 00 jne 10d55d <_Heap_Walk+0x3ad> (*printer)( 10d395: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10d397: 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 ) { 10d39a: 39 ce cmp %ecx,%esi 10d39c: 75 ba jne 10d358 <_Heap_Walk+0x1a8> 10d39e: 89 f3 mov %esi,%ebx 10d3a0: 8b 75 c8 mov -0x38(%ebp),%esi if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d3a3: 39 75 d8 cmp %esi,-0x28(%ebp) 10d3a6: 0f 84 3b fe ff ff je 10d1e7 <_Heap_Walk+0x37> 10d3ac: 8b 45 cc mov -0x34(%ebp),%eax 10d3af: 90 nop - 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; 10d3b0: 89 c1 mov %eax,%ecx 10d3b2: 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); 10d3b5: 8d 3c 31 lea (%ecx,%esi,1),%edi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10d3b8: a8 01 test $0x1,%al 10d3ba: 74 30 je 10d3ec <_Heap_Walk+0x23c> (*printer)( 10d3bc: 83 ec 0c sub $0xc,%esp 10d3bf: 51 push %ecx 10d3c0: 56 push %esi 10d3c1: 68 29 23 12 00 push $0x122329 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d3c6: 6a 00 push $0x0 10d3c8: ff 75 0c pushl 0xc(%ebp) 10d3cb: 89 4d c4 mov %ecx,-0x3c(%ebp) 10d3ce: ff 55 e4 call *-0x1c(%ebp) 10d3d1: 83 c4 20 add $0x20,%esp 10d3d4: 8b 4d c4 mov -0x3c(%ebp),%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10d3d7: 39 7b 20 cmp %edi,0x20(%ebx) 10d3da: 76 20 jbe 10d3fc <_Heap_Walk+0x24c> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d3dc: 83 ec 0c sub $0xc,%esp 10d3df: 57 push %edi 10d3e0: 56 push %esi 10d3e1: 68 44 21 12 00 push $0x122144 10d3e6: e9 e5 fe ff ff jmp 10d2d0 <_Heap_Walk+0x120> 10d3eb: 90 nop <== NOT EXECUTED "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d3ec: 83 ec 08 sub $0x8,%esp 10d3ef: ff 36 pushl (%esi) 10d3f1: 51 push %ecx 10d3f2: 56 push %esi 10d3f3: 68 1c 21 12 00 push $0x12211c 10d3f8: eb cc jmp 10d3c6 <_Heap_Walk+0x216> 10d3fa: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d3fc: 39 7b 24 cmp %edi,0x24(%ebx) 10d3ff: 72 db jb 10d3dc <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10d401: 89 c8 mov %ecx,%eax 10d403: 31 d2 xor %edx,%edx 10d405: f7 75 e0 divl -0x20(%ebp) 10d408: 85 d2 test %edx,%edx 10d40a: 0f 85 02 01 00 00 jne 10d512 <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10d410: 39 4d dc cmp %ecx,-0x24(%ebp) 10d413: 0f 87 0b 01 00 00 ja 10d524 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10d419: 39 fe cmp %edi,%esi 10d41b: 0f 83 17 01 00 00 jae 10d538 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d421: f6 47 04 01 testb $0x1,0x4(%edi) 10d425: 0f 85 91 00 00 00 jne 10d4bc <_Heap_Walk+0x30c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d42b: 8b 4b 08 mov 0x8(%ebx),%ecx 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; 10d42e: 8b 46 04 mov 0x4(%esi),%eax 10d431: 89 45 cc mov %eax,-0x34(%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; 10d434: 83 e0 fe and $0xfffffffe,%eax 10d437: 89 45 d4 mov %eax,-0x2c(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d43a: 01 f0 add %esi,%eax 10d43c: 89 45 d0 mov %eax,-0x30(%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)( 10d43f: 8b 56 08 mov 0x8(%esi),%edx return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10d442: 39 53 0c cmp %edx,0xc(%ebx) 10d445: 0f 84 99 00 00 00 je 10d4e4 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d44b: 39 da cmp %ebx,%edx 10d44d: 0f 84 a9 00 00 00 je 10d4fc <_Heap_Walk+0x34c> 10d453: c7 45 c8 99 1e 12 00 movl $0x121e99,-0x38(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d45a: 8b 46 0c mov 0xc(%esi),%eax 10d45d: 39 c1 cmp %eax,%ecx 10d45f: 74 7b je 10d4dc <_Heap_Walk+0x32c> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10d461: 39 d8 cmp %ebx,%eax 10d463: 0f 84 9f 00 00 00 je 10d508 <_Heap_Walk+0x358> 10d469: b9 99 1e 12 00 mov $0x121e99,%ecx 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)( 10d46e: ff 75 c8 pushl -0x38(%ebp) 10d471: 52 push %edx 10d472: 51 push %ecx 10d473: 50 push %eax 10d474: 56 push %esi 10d475: 68 04 22 12 00 push $0x122204 10d47a: 6a 00 push $0x0 10d47c: ff 75 0c pushl 0xc(%ebp) 10d47f: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10d482: 8b 55 d0 mov -0x30(%ebp),%edx 10d485: 8b 02 mov (%edx),%eax 10d487: 83 c4 20 add $0x20,%esp 10d48a: 39 45 d4 cmp %eax,-0x2c(%ebp) 10d48d: 74 11 je 10d4a0 <_Heap_Walk+0x2f0> (*printer)( 10d48f: 51 push %ecx 10d490: 52 push %edx 10d491: 50 push %eax 10d492: ff 75 d4 pushl -0x2c(%ebp) 10d495: 56 push %esi 10d496: 68 30 22 12 00 push $0x122230 10d49b: e9 30 fe ff ff jmp 10d2d0 <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10d4a0: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10d4a4: 74 4a je 10d4f0 <_Heap_Walk+0x340> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d4a6: 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 ) { 10d4a9: 39 d8 cmp %ebx,%eax 10d4ab: 75 0a jne 10d4b7 <_Heap_Walk+0x307> 10d4ad: eb 21 jmp 10d4d0 <_Heap_Walk+0x320> <== NOT EXECUTED 10d4af: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10d4b0: 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 ) { 10d4b3: 39 d8 cmp %ebx,%eax 10d4b5: 74 19 je 10d4d0 <_Heap_Walk+0x320> if ( free_block == block ) { 10d4b7: 39 f0 cmp %esi,%eax 10d4b9: 75 f5 jne 10d4b0 <_Heap_Walk+0x300> 10d4bb: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d4bc: 39 7d d8 cmp %edi,-0x28(%ebp) 10d4bf: 0f 84 22 fd ff ff je 10d1e7 <_Heap_Walk+0x37> 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 ) { 10d4c5: 8b 47 04 mov 0x4(%edi),%eax 10d4c8: 89 fe mov %edi,%esi 10d4ca: e9 e1 fe ff ff jmp 10d3b0 <_Heap_Walk+0x200> 10d4cf: 90 nop <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d4d0: 56 push %esi 10d4d1: 68 9c 22 12 00 push $0x12229c 10d4d6: e9 d1 fd ff ff jmp 10d2ac <_Heap_Walk+0xfc> 10d4db: 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)( 10d4dc: b9 54 23 12 00 mov $0x122354,%ecx 10d4e1: eb 8b jmp 10d46e <_Heap_Walk+0x2be> 10d4e3: 90 nop <== NOT EXECUTED } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10d4e4: c7 45 c8 40 23 12 00 movl $0x122340,-0x38(%ebp) 10d4eb: e9 6a ff ff ff jmp 10d45a <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10d4f0: 56 push %esi 10d4f1: 68 6c 22 12 00 push $0x12226c 10d4f6: e9 b1 fd ff ff jmp 10d2ac <_Heap_Walk+0xfc> 10d4fb: 90 nop <== NOT EXECUTED " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d4fc: c7 45 c8 4a 23 12 00 movl $0x12234a,-0x38(%ebp) 10d503: e9 52 ff ff ff jmp 10d45a <_Heap_Walk+0x2aa> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10d508: b9 5f 23 12 00 mov $0x12235f,%ecx 10d50d: e9 5c ff ff ff jmp 10d46e <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10d512: 83 ec 0c sub $0xc,%esp 10d515: 51 push %ecx 10d516: 56 push %esi 10d517: 68 74 21 12 00 push $0x122174 10d51c: e9 af fd ff ff jmp 10d2d0 <_Heap_Walk+0x120> 10d521: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( block_size < min_block_size ) { (*printer)( 10d524: 83 ec 08 sub $0x8,%esp 10d527: ff 75 dc pushl -0x24(%ebp) 10d52a: 51 push %ecx 10d52b: 56 push %esi 10d52c: 68 a4 21 12 00 push $0x1221a4 10d531: e9 9a fd ff ff jmp 10d2d0 <_Heap_Walk+0x120> 10d536: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10d538: 83 ec 0c sub $0xc,%esp 10d53b: 57 push %edi 10d53c: 56 push %esi 10d53d: 68 d0 21 12 00 push $0x1221d0 10d542: e9 89 fd ff ff jmp 10d2d0 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d547: 53 push %ebx 10d548: 68 f8 22 12 00 push $0x1222f8 10d54d: e9 5a fd ff ff jmp 10d2ac <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d552: 51 push %ecx 10d553: 68 b8 20 12 00 push $0x1220b8 10d558: e9 4f fd ff ff jmp 10d2ac <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d55d: 83 ec 0c sub $0xc,%esp 10d560: 50 push %eax 10d561: 51 push %ecx 10d562: 68 e8 20 12 00 push $0x1220e8 10d567: e9 64 fd ff ff jmp 10d2d0 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d56c: 51 push %ecx 10d56d: 68 0d 23 12 00 push $0x12230d 10d572: e9 35 fd ff ff jmp 10d2ac <_Heap_Walk+0xfc> 0010bc20 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bc20: 55 push %ebp 10bc21: 89 e5 mov %esp,%ebp 10bc23: 57 push %edi 10bc24: 56 push %esi 10bc25: 53 push %ebx 10bc26: 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; 10bc29: 8b 1d 74 35 12 00 mov 0x123574,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bc2f: a1 70 35 12 00 mov 0x123570,%eax 10bc34: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bc37: 8b 35 6c 35 12 00 mov 0x12356c,%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 ) 10bc3d: 39 f0 cmp %esi,%eax 10bc3f: 72 17 jb 10bc58 <_IO_Manager_initialization+0x38> * 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; 10bc41: 89 1d 44 81 12 00 mov %ebx,0x128144 _IO_Number_of_drivers = number_of_drivers; 10bc47: 8b 45 e4 mov -0x1c(%ebp),%eax 10bc4a: a3 40 81 12 00 mov %eax,0x128140 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bc4f: 8d 65 f4 lea -0xc(%ebp),%esp 10bc52: 5b pop %ebx 10bc53: 5e pop %esi 10bc54: 5f pop %edi 10bc55: c9 leave 10bc56: c3 ret 10bc57: 90 nop <== NOT EXECUTED /* * 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 *) 10bc58: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bc5b: c1 e1 03 shl $0x3,%ecx 10bc5e: 83 ec 0c sub $0xc,%esp 10bc61: 51 push %ecx 10bc62: 89 4d dc mov %ecx,-0x24(%ebp) 10bc65: e8 e6 29 00 00 call 10e650 <_Workspace_Allocate_or_fatal_error> 10bc6a: 89 c2 mov %eax,%edx 10bc6c: a3 44 81 12 00 mov %eax,0x128144 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bc71: 89 35 40 81 12 00 mov %esi,0x128140 memset( 10bc77: 31 c0 xor %eax,%eax 10bc79: 8b 4d dc mov -0x24(%ebp),%ecx 10bc7c: 89 d7 mov %edx,%edi 10bc7e: 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++ ) 10bc80: 83 c4 10 add $0x10,%esp 10bc83: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bc86: 85 c9 test %ecx,%ecx 10bc88: 74 c5 je 10bc4f <_IO_Manager_initialization+0x2f> 10bc8a: a1 44 81 12 00 mov 0x128144,%eax 10bc8f: 89 45 e0 mov %eax,-0x20(%ebp) 10bc92: 31 c0 xor %eax,%eax 10bc94: 31 d2 xor %edx,%edx 10bc96: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10bc98: 8b 7d e0 mov -0x20(%ebp),%edi 10bc9b: 01 c7 add %eax,%edi 10bc9d: 8d 34 03 lea (%ebx,%eax,1),%esi 10bca0: b9 06 00 00 00 mov $0x6,%ecx 10bca5: 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++ ) 10bca7: 42 inc %edx 10bca8: 83 c0 18 add $0x18,%eax 10bcab: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bcae: 77 e8 ja 10bc98 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bcb0: 8d 65 f4 lea -0xc(%ebp),%esp 10bcb3: 5b pop %ebx 10bcb4: 5e pop %esi 10bcb5: 5f pop %edi 10bcb6: c9 leave 10bcb7: c3 ret 0010c738 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c738: 55 push %ebp 10c739: 89 e5 mov %esp,%ebp 10c73b: 53 push %ebx 10c73c: 83 ec 08 sub $0x8,%esp 10c73f: 8b 45 08 mov 0x8(%ebp),%eax 10c742: 8b 55 0c mov 0xc(%ebp),%edx 10c745: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c748: a3 c0 77 12 00 mov %eax,0x1277c0 _Internal_errors_What_happened.is_internal = is_internal; 10c74d: 88 15 c4 77 12 00 mov %dl,0x1277c4 _Internal_errors_What_happened.the_error = the_error; 10c753: 89 1d c8 77 12 00 mov %ebx,0x1277c8 _User_extensions_Fatal( the_source, is_internal, the_error ); 10c759: 53 push %ebx 10c75a: 0f b6 d2 movzbl %dl,%edx 10c75d: 52 push %edx 10c75e: 50 push %eax 10c75f: e8 84 1b 00 00 call 10e2e8 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c764: c7 05 e0 78 12 00 05 movl $0x5,0x1278e0 <== NOT EXECUTED 10c76b: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c76e: fa cli <== NOT EXECUTED 10c76f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c771: f4 hlt <== NOT EXECUTED 10c772: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c775: eb fe jmp 10c775 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 00110ff4 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110ff4: 55 push %ebp 110ff5: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 110ff7: 8b 45 08 mov 0x8(%ebp),%eax 110ffa: 48 dec %eax 110ffb: 83 f8 03 cmp $0x3,%eax 110ffe: 77 0c ja 11100c <_Objects_API_maximum_class+0x18> 111000: 8b 04 85 dc 15 12 00 mov 0x1215dc(,%eax,4),%eax 111007: c9 leave 111008: c3 ret 111009: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 11100c: 31 c0 xor %eax,%eax 11100e: c9 leave 11100f: c3 ret 0010c7d0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c7d0: 55 push %ebp 10c7d1: 89 e5 mov %esp,%ebp 10c7d3: 56 push %esi 10c7d4: 53 push %ebx 10c7d5: 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 ) 10c7d8: 8b 43 18 mov 0x18(%ebx),%eax 10c7db: 85 c0 test %eax,%eax 10c7dd: 75 0d jne 10c7ec <_Objects_Allocate+0x1c> 10c7df: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10c7e1: 89 c8 mov %ecx,%eax 10c7e3: 8d 65 f8 lea -0x8(%ebp),%esp 10c7e6: 5b pop %ebx 10c7e7: 5e pop %esi 10c7e8: c9 leave 10c7e9: c3 ret 10c7ea: 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 ); 10c7ec: 8d 73 20 lea 0x20(%ebx),%esi 10c7ef: 83 ec 0c sub $0xc,%esp 10c7f2: 56 push %esi 10c7f3: e8 e4 f6 ff ff call 10bedc <_Chain_Get> 10c7f8: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c7fa: 83 c4 10 add $0x10,%esp 10c7fd: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c801: 74 de je 10c7e1 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c803: 85 c0 test %eax,%eax 10c805: 74 29 je 10c830 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c807: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c80b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c80f: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10c811: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c815: 31 d2 xor %edx,%edx 10c817: f7 f6 div %esi 10c819: c1 e0 02 shl $0x2,%eax 10c81c: 03 43 30 add 0x30(%ebx),%eax 10c81f: ff 08 decl (%eax) information->inactive--; 10c821: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10c825: 89 c8 mov %ecx,%eax 10c827: 8d 65 f8 lea -0x8(%ebp),%esp 10c82a: 5b pop %ebx 10c82b: 5e pop %esi 10c82c: c9 leave 10c82d: c3 ret 10c82e: 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 ); 10c830: 83 ec 0c sub $0xc,%esp 10c833: 53 push %ebx 10c834: e8 3b 00 00 00 call 10c874 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c839: 89 34 24 mov %esi,(%esp) 10c83c: e8 9b f6 ff ff call 10bedc <_Chain_Get> 10c841: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c843: 83 c4 10 add $0x10,%esp 10c846: 85 c0 test %eax,%eax 10c848: 74 97 je 10c7e1 <_Objects_Allocate+0x11> 10c84a: eb bb jmp 10c807 <_Objects_Allocate+0x37> 0010c874 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c874: 55 push %ebp 10c875: 89 e5 mov %esp,%ebp 10c877: 57 push %edi 10c878: 56 push %esi 10c879: 53 push %ebx 10c87a: 83 ec 4c sub $0x4c,%esp 10c87d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 10c880: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c884: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c887: 8b 4b 34 mov 0x34(%ebx),%ecx 10c88a: 85 c9 test %ecx,%ecx 10c88c: 0f 84 72 02 00 00 je 10cb04 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c892: 8b 7b 10 mov 0x10(%ebx),%edi 10c895: 66 89 7d d4 mov %di,-0x2c(%ebp) 10c899: 8b 7b 14 mov 0x14(%ebx),%edi 10c89c: 31 d2 xor %edx,%edx 10c89e: 8b 45 d4 mov -0x2c(%ebp),%eax 10c8a1: 66 f7 f7 div %di 10c8a4: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c8a7: 85 f6 test %esi,%esi 10c8a9: 0f 84 6c 02 00 00 je 10cb1b <_Objects_Extend_information+0x2a7> if ( information->object_blocks[ block ] == NULL ) 10c8af: 8b 01 mov (%ecx),%eax 10c8b1: 85 c0 test %eax,%eax 10c8b3: 0f 84 72 02 00 00 je 10cb2b <_Objects_Extend_information+0x2b7> 10c8b9: 0f b7 ff movzwl %di,%edi 10c8bc: 8b 55 d0 mov -0x30(%ebp),%edx 10c8bf: 89 55 cc mov %edx,-0x34(%ebp) 10c8c2: 31 d2 xor %edx,%edx 10c8c4: 8b 45 cc mov -0x34(%ebp),%eax 10c8c7: eb 09 jmp 10c8d2 <_Objects_Extend_information+0x5e> 10c8c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c8cc: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c8d0: 74 07 je 10c8d9 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10c8d2: 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++ ) { 10c8d4: 42 inc %edx 10c8d5: 39 d6 cmp %edx,%esi 10c8d7: 77 f3 ja 10c8cc <_Objects_Extend_information+0x58> 10c8d9: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c8dc: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c8e0: 01 f8 add %edi,%eax 10c8e2: 89 45 d4 mov %eax,-0x2c(%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 ) { 10c8e5: 3d ff ff 00 00 cmp $0xffff,%eax 10c8ea: 0f 87 b1 01 00 00 ja 10caa1 <_Objects_Extend_information+0x22d> /* * 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; 10c8f0: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c8f4: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c8f8: 0f 85 ae 01 00 00 jne 10caac <_Objects_Extend_information+0x238> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10c8fe: 83 ec 0c sub $0xc,%esp 10c901: 57 push %edi 10c902: 89 55 b4 mov %edx,-0x4c(%ebp) 10c905: e8 46 1d 00 00 call 10e650 <_Workspace_Allocate_or_fatal_error> 10c90a: 89 45 c4 mov %eax,-0x3c(%ebp) 10c90d: 83 c4 10 add $0x10,%esp 10c910: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10c913: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c917: 39 45 cc cmp %eax,-0x34(%ebp) 10c91a: 0f 82 fe 00 00 00 jb 10ca1e <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10c920: 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 ); 10c923: 83 ec 0c sub $0xc,%esp 10c926: 8d 04 7f lea (%edi,%edi,2),%eax 10c929: 03 45 d4 add -0x2c(%ebp),%eax 10c92c: 03 45 d0 add -0x30(%ebp),%eax 10c92f: c1 e0 02 shl $0x2,%eax 10c932: 50 push %eax 10c933: 89 55 b4 mov %edx,-0x4c(%ebp) 10c936: e8 41 1d 00 00 call 10e67c <_Workspace_Allocate> 10c93b: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10c93e: 83 c4 10 add $0x10,%esp 10c941: 85 c0 test %eax,%eax 10c943: 8b 55 b4 mov -0x4c(%ebp),%edx 10c946: 0f 84 ef 01 00 00 je 10cb3b <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10c94c: 8b 45 c8 mov -0x38(%ebp),%eax 10c94f: 8d 04 b8 lea (%eax,%edi,4),%eax 10c952: 89 45 b8 mov %eax,-0x48(%ebp) 10c955: 8b 4d c8 mov -0x38(%ebp),%ecx 10c958: 8d 3c f9 lea (%ecx,%edi,8),%edi 10c95b: 89 7d bc mov %edi,-0x44(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10c95e: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c962: 39 45 d0 cmp %eax,-0x30(%ebp) 10c965: 0f 82 60 01 00 00 jb 10cacb <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c96b: 8b 45 d0 mov -0x30(%ebp),%eax 10c96e: 85 c0 test %eax,%eax 10c970: 74 16 je 10c988 <_Objects_Extend_information+0x114> information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10c972: 31 c0 xor %eax,%eax 10c974: 8b 4d bc mov -0x44(%ebp),%ecx 10c977: 8b 7d d0 mov -0x30(%ebp),%edi 10c97a: 66 90 xchg %ax,%ax /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10c97c: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c983: 40 inc %eax 10c984: 39 c7 cmp %eax,%edi 10c986: 77 f4 ja 10c97c <_Objects_Extend_information+0x108> 10c988: c1 e6 02 shl $0x2,%esi 10c98b: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10c98e: 8b 45 c8 mov -0x38(%ebp),%eax 10c991: 8b 7d c0 mov -0x40(%ebp),%edi 10c994: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10c99b: 8b 4d b8 mov -0x48(%ebp),%ecx 10c99e: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10c9a5: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c9a9: 03 75 cc add -0x34(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10c9ac: 39 75 cc cmp %esi,-0x34(%ebp) 10c9af: 73 19 jae 10c9ca <_Objects_Extend_information+0x156> 10c9b1: 8b 7d cc mov -0x34(%ebp),%edi 10c9b4: 8b 45 bc mov -0x44(%ebp),%eax 10c9b7: 8d 0c b8 lea (%eax,%edi,4),%ecx 10c9ba: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10c9bc: c7 01 00 00 00 00 movl $0x0,(%ecx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10c9c2: 40 inc %eax 10c9c3: 83 c1 04 add $0x4,%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10c9c6: 39 f0 cmp %esi,%eax 10c9c8: 72 f2 jb 10c9bc <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10c9ca: 9c pushf 10c9cb: fa cli 10c9cc: 5f pop %edi old_tables = information->object_blocks; 10c9cd: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10c9d0: 8b 45 c8 mov -0x38(%ebp),%eax 10c9d3: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10c9d6: 8b 45 b8 mov -0x48(%ebp),%eax 10c9d9: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10c9dc: 8b 45 bc mov -0x44(%ebp),%eax 10c9df: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10c9e2: 8b 45 d4 mov -0x2c(%ebp),%eax 10c9e5: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10c9e9: 8b 33 mov (%ebx),%esi 10c9eb: c1 e6 18 shl $0x18,%esi 10c9ee: 81 ce 00 00 01 00 or $0x10000,%esi 10c9f4: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10c9f8: c1 e0 1b shl $0x1b,%eax 10c9fb: 09 c6 or %eax,%esi 10c9fd: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10ca01: 09 c6 or %eax,%esi 10ca03: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10ca06: 57 push %edi 10ca07: 9d popf if ( old_tables ) 10ca08: 85 c9 test %ecx,%ecx 10ca0a: 74 12 je 10ca1e <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10ca0c: 83 ec 0c sub $0xc,%esp 10ca0f: 51 push %ecx 10ca10: 89 55 b4 mov %edx,-0x4c(%ebp) 10ca13: e8 80 1c 00 00 call 10e698 <_Workspace_Free> 10ca18: 83 c4 10 add $0x10,%esp 10ca1b: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10ca1e: c1 e2 02 shl $0x2,%edx 10ca21: 89 55 d0 mov %edx,-0x30(%ebp) 10ca24: 8b 43 34 mov 0x34(%ebx),%eax 10ca27: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca2a: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10ca2d: ff 73 18 pushl 0x18(%ebx) 10ca30: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10ca34: 52 push %edx 10ca35: 8b 7d d0 mov -0x30(%ebp),%edi 10ca38: ff 34 38 pushl (%eax,%edi,1) 10ca3b: 8d 7d dc lea -0x24(%ebp),%edi 10ca3e: 57 push %edi 10ca3f: e8 e8 3f 00 00 call 110a2c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10ca44: 8d 43 20 lea 0x20(%ebx),%eax 10ca47: 89 45 d4 mov %eax,-0x2c(%ebp) 10ca4a: 8b 75 cc mov -0x34(%ebp),%esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10ca4d: 83 c4 10 add $0x10,%esp 10ca50: eb 2b jmp 10ca7d <_Objects_Extend_information+0x209> 10ca52: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object->id = _Objects_Build_id( 10ca54: 8b 13 mov (%ebx),%edx 10ca56: c1 e2 18 shl $0x18,%edx 10ca59: 81 ca 00 00 01 00 or $0x10000,%edx 10ca5f: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10ca63: c1 e1 1b shl $0x1b,%ecx 10ca66: 09 ca or %ecx,%edx 10ca68: 09 f2 or %esi,%edx 10ca6a: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10ca6d: 83 ec 08 sub $0x8,%esp 10ca70: 50 push %eax 10ca71: ff 75 d4 pushl -0x2c(%ebp) 10ca74: e8 3f f4 ff ff call 10beb8 <_Chain_Append> index++; 10ca79: 46 inc %esi 10ca7a: 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 ) { 10ca7d: 83 ec 0c sub $0xc,%esp 10ca80: 57 push %edi 10ca81: e8 56 f4 ff ff call 10bedc <_Chain_Get> 10ca86: 83 c4 10 add $0x10,%esp 10ca89: 85 c0 test %eax,%eax 10ca8b: 75 c7 jne 10ca54 <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10ca8d: 8b 43 30 mov 0x30(%ebx),%eax 10ca90: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10ca94: 8b 4d d0 mov -0x30(%ebp),%ecx 10ca97: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10ca9a: 8b 43 14 mov 0x14(%ebx),%eax 10ca9d: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10caa1: 8d 65 f4 lea -0xc(%ebp),%esp 10caa4: 5b pop %ebx 10caa5: 5e pop %esi 10caa6: 5f pop %edi 10caa7: c9 leave 10caa8: c3 ret 10caa9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 10caac: 83 ec 0c sub $0xc,%esp 10caaf: 57 push %edi 10cab0: 89 55 b4 mov %edx,-0x4c(%ebp) 10cab3: e8 c4 1b 00 00 call 10e67c <_Workspace_Allocate> 10cab8: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10cabb: 83 c4 10 add $0x10,%esp 10cabe: 85 c0 test %eax,%eax 10cac0: 8b 55 b4 mov -0x4c(%ebp),%edx 10cac3: 0f 85 4a fe ff ff jne 10c913 <_Objects_Extend_information+0x9f> 10cac9: eb d6 jmp 10caa1 <_Objects_Extend_information+0x22d> /* * 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, 10cacb: c1 e6 02 shl $0x2,%esi 10cace: 89 75 c0 mov %esi,-0x40(%ebp) 10cad1: 8b 73 34 mov 0x34(%ebx),%esi 10cad4: 8b 7d c8 mov -0x38(%ebp),%edi 10cad7: 8b 4d c0 mov -0x40(%ebp),%ecx 10cada: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cadc: 8b 73 30 mov 0x30(%ebx),%esi 10cadf: 8b 7d b8 mov -0x48(%ebp),%edi 10cae2: 8b 4d c0 mov -0x40(%ebp),%ecx 10cae5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10cae7: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10caeb: 03 45 d0 add -0x30(%ebp),%eax 10caee: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10caf5: 8b 73 1c mov 0x1c(%ebx),%esi 10caf8: 8b 7d bc mov -0x44(%ebp),%edi 10cafb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cafd: e9 8c fe ff ff jmp 10c98e <_Objects_Extend_information+0x11a> 10cb02: 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 ) 10cb04: 8b 53 10 mov 0x10(%ebx),%edx 10cb07: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10cb0b: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10cb0f: 89 45 cc mov %eax,-0x34(%ebp) 10cb12: 31 d2 xor %edx,%edx 10cb14: 31 f6 xor %esi,%esi 10cb16: e9 c1 fd ff ff jmp 10c8dc <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cb1b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10cb1e: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10cb21: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10cb24: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cb26: e9 b1 fd ff ff jmp 10c8dc <_Objects_Extend_information+0x68> <== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10cb2b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10cb2e: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10cb31: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10cb34: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cb36: e9 a1 fd ff ff jmp 10c8dc <_Objects_Extend_information+0x68> <== 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 ); 10cb3b: 83 ec 0c sub $0xc,%esp 10cb3e: ff 75 c4 pushl -0x3c(%ebp) 10cb41: e8 52 1b 00 00 call 10e698 <_Workspace_Free> return; 10cb46: 83 c4 10 add $0x10,%esp 10cb49: e9 53 ff ff ff jmp 10caa1 <_Objects_Extend_information+0x22d> 0010cc80 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cc80: 55 push %ebp 10cc81: 89 e5 mov %esp,%ebp 10cc83: 53 push %ebx 10cc84: 83 ec 14 sub $0x14,%esp 10cc87: 8b 55 08 mov 0x8(%ebp),%edx 10cc8a: 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; 10cc8d: b8 01 00 00 00 mov $0x1,%eax 10cc92: 2b 42 08 sub 0x8(%edx),%eax 10cc95: 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 ) { 10cc98: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cc9c: 39 c8 cmp %ecx,%eax 10cc9e: 77 24 ja 10ccc4 <_Objects_Get+0x44> 10cca0: 8b 0d 18 77 12 00 mov 0x127718,%ecx 10cca6: 41 inc %ecx 10cca7: 89 0d 18 77 12 00 mov %ecx,0x127718 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10ccad: 8b 52 1c mov 0x1c(%edx),%edx 10ccb0: 8b 04 82 mov (%edx,%eax,4),%eax 10ccb3: 85 c0 test %eax,%eax 10ccb5: 74 1b je 10ccd2 <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10ccb7: 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 } 10ccbd: 83 c4 14 add $0x14,%esp 10ccc0: 5b pop %ebx 10ccc1: c9 leave 10ccc2: c3 ret 10ccc3: 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; 10ccc4: c7 03 01 00 00 00 movl $0x1,(%ebx) 10ccca: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cccc: 83 c4 14 add $0x14,%esp 10cccf: 5b pop %ebx 10ccd0: c9 leave 10ccd1: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10ccd2: 89 45 f4 mov %eax,-0xc(%ebp) 10ccd5: e8 1a 08 00 00 call 10d4f4 <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10ccda: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cce0: 8b 45 f4 mov -0xc(%ebp),%eax 10cce3: eb d8 jmp 10ccbd <_Objects_Get+0x3d> 0010cc28 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cc28: 55 push %ebp 10cc29: 89 e5 mov %esp,%ebp 10cc2b: 56 push %esi 10cc2c: 53 push %ebx 10cc2d: 8b 55 08 mov 0x8(%ebp),%edx 10cc30: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cc33: b8 01 00 00 00 mov $0x1,%eax 10cc38: 2b 42 08 sub 0x8(%edx),%eax 10cc3b: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cc3e: 9c pushf 10cc3f: fa cli 10cc40: 5e pop %esi if ( information->maximum >= index ) { 10cc41: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cc45: 39 c8 cmp %ecx,%eax 10cc47: 77 1b ja 10cc64 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cc49: 8b 52 1c mov 0x1c(%edx),%edx 10cc4c: 8b 04 82 mov (%edx,%eax,4),%eax 10cc4f: 85 c0 test %eax,%eax 10cc51: 74 21 je 10cc74 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cc53: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cc59: 8b 55 14 mov 0x14(%ebp),%edx 10cc5c: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc5e: 5b pop %ebx 10cc5f: 5e pop %esi 10cc60: c9 leave 10cc61: c3 ret 10cc62: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cc64: 56 push %esi 10cc65: 9d popf *location = OBJECTS_ERROR; 10cc66: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cc6c: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc6e: 5b pop %ebx 10cc6f: 5e pop %esi 10cc70: c9 leave 10cc71: c3 ret 10cc72: 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 ); 10cc74: 56 push %esi 10cc75: 9d popf *location = OBJECTS_ERROR; 10cc76: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cc7c: eb e0 jmp 10cc5e <_Objects_Get_isr_disable+0x36> 00118800 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 118800: 55 push %ebp 118801: 89 e5 mov %esp,%ebp 118803: 57 push %edi 118804: 56 push %esi 118805: 53 push %ebx 118806: 83 ec 2c sub $0x2c,%esp 118809: 8b 55 08 mov 0x8(%ebp),%edx 11880c: 8b 75 0c mov 0xc(%ebp),%esi 11880f: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 118812: 85 f6 test %esi,%esi 118814: 75 0e jne 118824 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 118816: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 118818: 89 d8 mov %ebx,%eax 11881a: 8d 65 f4 lea -0xc(%ebp),%esp 11881d: 5b pop %ebx 11881e: 5e pop %esi 11881f: 5f pop %edi 118820: c9 leave 118821: c3 ret 118822: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 118824: 85 db test %ebx,%ebx 118826: 74 f0 je 118818 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 118828: 85 d2 test %edx,%edx 11882a: 75 08 jne 118834 <_Objects_Get_name_as_string+0x34> 11882c: a1 d8 53 13 00 mov 0x1353d8,%eax 118831: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 118834: 83 ec 0c sub $0xc,%esp 118837: 52 push %edx 118838: 89 55 cc mov %edx,-0x34(%ebp) 11883b: e8 50 90 ff ff call 111890 <_Objects_Get_information_id> 118840: 89 c7 mov %eax,%edi if ( !information ) 118842: 83 c4 10 add $0x10,%esp 118845: 85 c0 test %eax,%eax 118847: 8b 55 cc mov -0x34(%ebp),%edx 11884a: 74 ca je 118816 <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 11884c: 51 push %ecx 11884d: 8d 45 e4 lea -0x1c(%ebp),%eax 118850: 50 push %eax 118851: 52 push %edx 118852: 57 push %edi 118853: e8 f8 90 ff ff call 111950 <_Objects_Get> switch ( location ) { 118858: 83 c4 10 add $0x10,%esp 11885b: 8b 55 e4 mov -0x1c(%ebp),%edx 11885e: 85 d2 test %edx,%edx 118860: 75 b4 jne 118816 <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 118862: 80 7f 38 00 cmpb $0x0,0x38(%edi) 118866: 74 4e je 1188b6 <_Objects_Get_name_as_string+0xb6> s = the_object->name.name_p; 118868: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 11886b: 85 ff test %edi,%edi 11886d: 74 6e je 1188dd <_Objects_Get_name_as_string+0xdd> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 11886f: 4e dec %esi 118870: 89 75 d4 mov %esi,-0x2c(%ebp) 118873: 74 68 je 1188dd <_Objects_Get_name_as_string+0xdd> 118875: 8a 07 mov (%edi),%al 118877: 84 c0 test %al,%al 118879: 74 62 je 1188dd <_Objects_Get_name_as_string+0xdd> 11887b: 89 d9 mov %ebx,%ecx 11887d: 31 d2 xor %edx,%edx 11887f: 89 5d d0 mov %ebx,-0x30(%ebp) 118882: eb 07 jmp 11888b <_Objects_Get_name_as_string+0x8b> 118884: 8a 04 17 mov (%edi,%edx,1),%al 118887: 84 c0 test %al,%al 118889: 74 1b je 1188a6 <_Objects_Get_name_as_string+0xa6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 11888b: 0f b6 d8 movzbl %al,%ebx 11888e: 8b 35 18 29 13 00 mov 0x132918,%esi 118894: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1) 118899: 75 02 jne 11889d <_Objects_Get_name_as_string+0x9d> 11889b: b0 2a mov $0x2a,%al 11889d: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 11889f: 42 inc %edx 1188a0: 41 inc %ecx 1188a1: 3b 55 d4 cmp -0x2c(%ebp),%edx 1188a4: 72 de jb 118884 <_Objects_Get_name_as_string+0x84> 1188a6: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 1188a9: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 1188ac: e8 83 99 ff ff call 112234 <_Thread_Enable_dispatch> return name; 1188b1: e9 62 ff ff ff jmp 118818 <_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; 1188b6: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 1188b9: 89 c2 mov %eax,%edx 1188bb: c1 ea 18 shr $0x18,%edx 1188be: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 1188c1: 89 c2 mov %eax,%edx 1188c3: c1 ea 10 shr $0x10,%edx 1188c6: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 1188c9: 89 c2 mov %eax,%edx 1188cb: c1 ea 08 shr $0x8,%edx 1188ce: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 1188d1: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 1188d4: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 1188d8: 8d 7d df lea -0x21(%ebp),%edi 1188db: eb 92 jmp 11886f <_Objects_Get_name_as_string+0x6f> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1188dd: 89 d9 mov %ebx,%ecx 1188df: eb c8 jmp 1188a9 <_Objects_Get_name_as_string+0xa9> 0011b388 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11b388: 55 push %ebp 11b389: 89 e5 mov %esp,%ebp 11b38b: 57 push %edi 11b38c: 56 push %esi 11b38d: 53 push %ebx 11b38e: 83 ec 0c sub $0xc,%esp 11b391: 8b 5d 08 mov 0x8(%ebp),%ebx 11b394: 8b 75 0c mov 0xc(%ebp),%esi 11b397: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11b39a: 85 db test %ebx,%ebx 11b39c: 75 0a jne 11b3a8 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11b39e: 31 c0 xor %eax,%eax } 11b3a0: 8d 65 f4 lea -0xc(%ebp),%esp 11b3a3: 5b pop %ebx 11b3a4: 5e pop %esi 11b3a5: 5f pop %edi 11b3a6: c9 leave 11b3a7: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11b3a8: 85 ff test %edi,%edi 11b3aa: 74 f2 je 11b39e <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11b3ac: 8b 45 14 mov 0x14(%ebp),%eax 11b3af: 85 c0 test %eax,%eax 11b3b1: 74 eb je 11b39e <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11b3b3: 66 85 f6 test %si,%si 11b3b6: 75 04 jne 11b3bc <_Objects_Get_next+0x34> next_id = information->minimum_id; 11b3b8: 8b 73 08 mov 0x8(%ebx),%esi 11b3bb: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11b3bc: 66 39 73 10 cmp %si,0x10(%ebx) 11b3c0: 72 22 jb 11b3e4 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11b3c2: 51 push %ecx 11b3c3: 57 push %edi 11b3c4: 56 push %esi 11b3c5: 53 push %ebx 11b3c6: e8 85 65 ff ff call 111950 <_Objects_Get> next_id++; 11b3cb: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11b3cc: 83 c4 10 add $0x10,%esp 11b3cf: 8b 17 mov (%edi),%edx 11b3d1: 85 d2 test %edx,%edx 11b3d3: 75 e7 jne 11b3bc <_Objects_Get_next+0x34> *next_id_p = next_id; 11b3d5: 8b 55 14 mov 0x14(%ebp),%edx 11b3d8: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11b3da: 8d 65 f4 lea -0xc(%ebp),%esp 11b3dd: 5b pop %ebx 11b3de: 5e pop %esi 11b3df: 5f pop %edi 11b3e0: c9 leave 11b3e1: c3 ret 11b3e2: 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; 11b3e4: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11b3ea: 8b 45 14 mov 0x14(%ebp),%eax 11b3ed: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11b3f3: 31 c0 xor %eax,%eax return 0; 11b3f5: eb a9 jmp 11b3a0 <_Objects_Get_next+0x18> 001119b8 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 1119b8: 55 push %ebp 1119b9: 89 e5 mov %esp,%ebp 1119bb: 83 ec 18 sub $0x18,%esp 1119be: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 1119c1: 85 d2 test %edx,%edx 1119c3: 75 08 jne 1119cd <_Objects_Id_to_name+0x15> 1119c5: a1 d8 53 13 00 mov 0x1353d8,%eax 1119ca: 8b 50 08 mov 0x8(%eax),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 1119cd: 89 d0 mov %edx,%eax 1119cf: c1 e8 18 shr $0x18,%eax 1119d2: 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 ) 1119d5: 8d 48 ff lea -0x1(%eax),%ecx 1119d8: 83 f9 03 cmp $0x3,%ecx 1119db: 77 1d ja 1119fa <_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 ] ) 1119dd: 8b 04 85 ec 52 13 00 mov 0x1352ec(,%eax,4),%eax 1119e4: 85 c0 test %eax,%eax 1119e6: 74 12 je 1119fa <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 1119e8: 89 d1 mov %edx,%ecx 1119ea: c1 e9 1b shr $0x1b,%ecx 1119ed: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 1119f0: 85 c0 test %eax,%eax 1119f2: 74 06 je 1119fa <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 1119f4: 80 78 38 00 cmpb $0x0,0x38(%eax) 1119f8: 74 0a je 111a04 <_Objects_Id_to_name+0x4c> if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 1119fa: b8 03 00 00 00 mov $0x3,%eax } 1119ff: c9 leave 111a00: c3 ret 111a01: 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 ); 111a04: 51 push %ecx 111a05: 8d 4d f4 lea -0xc(%ebp),%ecx 111a08: 51 push %ecx 111a09: 52 push %edx 111a0a: 50 push %eax 111a0b: e8 40 ff ff ff call 111950 <_Objects_Get> if ( !the_object ) 111a10: 83 c4 10 add $0x10,%esp 111a13: 85 c0 test %eax,%eax 111a15: 74 e3 je 1119fa <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 111a17: 8b 50 0c mov 0xc(%eax),%edx 111a1a: 8b 45 0c mov 0xc(%ebp),%eax 111a1d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 111a1f: e8 10 08 00 00 call 112234 <_Thread_Enable_dispatch> 111a24: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 111a26: c9 leave 111a27: c3 ret 0010cce8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cce8: 55 push %ebp 10cce9: 89 e5 mov %esp,%ebp 10cceb: 57 push %edi 10ccec: 56 push %esi 10cced: 53 push %ebx 10ccee: 83 ec 0c sub $0xc,%esp 10ccf1: 8b 45 08 mov 0x8(%ebp),%eax 10ccf4: 8b 55 0c mov 0xc(%ebp),%edx 10ccf7: 8b 5d 10 mov 0x10(%ebp),%ebx 10ccfa: 8b 75 20 mov 0x20(%ebp),%esi 10ccfd: 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; 10cd01: 89 10 mov %edx,(%eax) information->the_class = the_class; 10cd03: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10cd07: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cd0a: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cd11: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10cd18: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10cd1f: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10cd25: 8b 7d 1c mov 0x1c(%ebp),%edi 10cd28: 89 f9 mov %edi,%ecx 10cd2a: 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; 10cd2d: 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; 10cd33: 8b 3c 95 ec 76 12 00 mov 0x1276ec(,%edx,4),%edi 10cd3a: 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; 10cd3d: 8b 7d 14 mov 0x14(%ebp),%edi 10cd40: 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 = 10cd43: 89 f9 mov %edi,%ecx 10cd45: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cd48: 8b 4d 14 mov 0x14(%ebp),%ecx 10cd4b: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cd51: 85 ff test %edi,%edi 10cd53: 74 04 je 10cd59 <_Objects_Initialize_information+0x71> 10cd55: 85 c9 test %ecx,%ecx 10cd57: 74 6a je 10cdc3 <_Objects_Initialize_information+0xdb> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cd59: 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; 10cd5d: c7 40 1c 44 73 12 00 movl $0x127344,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10cd64: c1 e2 18 shl $0x18,%edx 10cd67: 81 ca 00 00 01 00 or $0x10000,%edx 10cd6d: c1 e3 1b shl $0x1b,%ebx 10cd70: 09 da or %ebx,%edx 10cd72: 31 db xor %ebx,%ebx 10cd74: 85 c9 test %ecx,%ecx 10cd76: 0f 95 c3 setne %bl 10cd79: 09 da or %ebx,%edx 10cd7b: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cd7e: f7 c6 03 00 00 00 test $0x3,%esi 10cd84: 75 26 jne 10cdac <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10cd86: 66 89 70 3a mov %si,0x3a(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10cd8a: 8d 50 24 lea 0x24(%eax),%edx 10cd8d: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10cd90: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10cd97: 8d 50 20 lea 0x20(%eax),%edx 10cd9a: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10cd9d: 85 c9 test %ecx,%ecx 10cd9f: 75 13 jne 10cdb4 <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cda1: 8d 65 f4 lea -0xc(%ebp),%esp 10cda4: 5b pop %ebx 10cda5: 5e pop %esi 10cda6: 5f pop %edi 10cda7: c9 leave 10cda8: c3 ret 10cda9: 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) & 10cdac: 83 c6 04 add $0x4,%esi 10cdaf: 83 e6 fc and $0xfffffffc,%esi 10cdb2: eb d2 jmp 10cd86 <_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 ); 10cdb4: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cdb7: 8d 65 f4 lea -0xc(%ebp),%esp 10cdba: 5b pop %ebx 10cdbb: 5e pop %esi 10cdbc: 5f pop %edi 10cdbd: 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 ); 10cdbe: e9 b1 fa ff ff jmp 10c874 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cdc3: 50 push %eax 10cdc4: 6a 14 push $0x14 10cdc6: 6a 01 push $0x1 10cdc8: 6a 00 push $0x0 10cdca: e8 69 f9 ff ff call 10c738 <_Internal_error_Occurred> 00117130 <_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 ) { 117130: 55 push %ebp 117131: 89 e5 mov %esp,%ebp 117133: 57 push %edi 117134: 56 push %esi 117135: 53 push %ebx 117136: 83 ec 1c sub $0x1c,%esp 117139: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 11713c: 8b 5d 10 mov 0x10(%ebp),%ebx 11713f: 85 db test %ebx,%ebx 117141: 74 75 je 1171b8 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 117143: 8b 4d 0c mov 0xc(%ebp),%ecx 117146: 85 c9 test %ecx,%ecx 117148: 74 4b je 117195 <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 11714a: 8b 47 10 mov 0x10(%edi),%eax 11714d: 66 85 c0 test %ax,%ax 117150: 74 43 je 117195 <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 117152: 0f b7 c0 movzwl %ax,%eax 117155: 89 45 e4 mov %eax,-0x1c(%ebp) 117158: 8b 47 1c mov 0x1c(%edi),%eax 11715b: bb 01 00 00 00 mov $0x1,%ebx 117160: 89 7d e0 mov %edi,-0x20(%ebp) 117163: 89 c7 mov %eax,%edi 117165: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 117168: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 11716b: 85 f6 test %esi,%esi 11716d: 74 20 je 11718f <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 11716f: 8b 46 0c mov 0xc(%esi),%eax 117172: 85 c0 test %eax,%eax 117174: 74 19 je 11718f <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 117176: 52 push %edx 117177: 8b 4d e0 mov -0x20(%ebp),%ecx 11717a: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 11717e: 52 push %edx 11717f: 50 push %eax 117180: ff 75 0c pushl 0xc(%ebp) 117183: e8 d0 39 00 00 call 11ab58 117188: 83 c4 10 add $0x10,%esp 11718b: 85 c0 test %eax,%eax 11718d: 74 15 je 1171a4 <_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++ ) { 11718f: 43 inc %ebx 117190: 3b 5d e4 cmp -0x1c(%ebp),%ebx 117193: 76 d3 jbe 117168 <_Objects_Name_to_id_string+0x38> 117195: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 11719a: 8d 65 f4 lea -0xc(%ebp),%esp 11719d: 5b pop %ebx 11719e: 5e pop %esi 11719f: 5f pop %edi 1171a0: c9 leave 1171a1: c3 ret 1171a2: 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; 1171a4: 8b 46 08 mov 0x8(%esi),%eax 1171a7: 8b 55 10 mov 0x10(%ebp),%edx 1171aa: 89 02 mov %eax,(%edx) 1171ac: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 1171ae: 8d 65 f4 lea -0xc(%ebp),%esp 1171b1: 5b pop %ebx 1171b2: 5e pop %esi 1171b3: 5f pop %edi 1171b4: c9 leave 1171b5: c3 ret 1171b6: 66 90 xchg %ax,%ax <== NOT EXECUTED uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 1171b8: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 1171bd: 8d 65 f4 lea -0xc(%ebp),%esp 1171c0: 5b pop %ebx 1171c1: 5e pop %esi 1171c2: 5f pop %edi 1171c3: c9 leave 1171c4: c3 ret 0010ce04 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10ce04: 55 push %ebp 10ce05: 89 e5 mov %esp,%ebp 10ce07: 57 push %edi 10ce08: 56 push %esi 10ce09: 53 push %ebx 10ce0a: 8b 45 08 mov 0x8(%ebp),%eax 10ce0d: 8b 4d 0c mov 0xc(%ebp),%ecx 10ce10: 8b 55 10 mov 0x10(%ebp),%edx 10ce13: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ce16: 85 ff test %edi,%edi 10ce18: 74 56 je 10ce70 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10ce1a: 85 c9 test %ecx,%ecx 10ce1c: 74 08 je 10ce26 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ce1e: 8b 70 10 mov 0x10(%eax),%esi 10ce21: 66 85 f6 test %si,%si 10ce24: 75 0a jne 10ce30 <_Objects_Name_to_id_u32+0x2c> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10ce26: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10ce2b: 5b pop %ebx 10ce2c: 5e pop %esi 10ce2d: 5f pop %edi 10ce2e: c9 leave 10ce2f: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ce30: 85 d2 test %edx,%edx 10ce32: 75 20 jne 10ce54 <_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++ ) { 10ce34: 0f b7 f6 movzwl %si,%esi 10ce37: 8b 58 1c mov 0x1c(%eax),%ebx 10ce3a: b8 01 00 00 00 mov $0x1,%eax 10ce3f: 90 nop the_object = information->local_table[ index ]; 10ce40: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10ce43: 85 d2 test %edx,%edx 10ce45: 74 05 je 10ce4c <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10ce47: 39 4a 0c cmp %ecx,0xc(%edx) 10ce4a: 74 18 je 10ce64 <_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++ ) { 10ce4c: 40 inc %eax 10ce4d: 39 c6 cmp %eax,%esi 10ce4f: 73 ef jae 10ce40 <_Objects_Name_to_id_u32+0x3c> 10ce51: eb d3 jmp 10ce26 <_Objects_Name_to_id_u32+0x22> 10ce53: 90 nop <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ce54: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10ce5a: 74 d8 je 10ce34 <_Objects_Name_to_id_u32+0x30> 10ce5c: 4a dec %edx 10ce5d: 75 c7 jne 10ce26 <_Objects_Name_to_id_u32+0x22> 10ce5f: eb d3 jmp 10ce34 <_Objects_Name_to_id_u32+0x30> 10ce61: 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; 10ce64: 8b 42 08 mov 0x8(%edx),%eax 10ce67: 89 07 mov %eax,(%edi) 10ce69: 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 } 10ce6b: 5b pop %ebx 10ce6c: 5e pop %esi 10ce6d: 5f pop %edi 10ce6e: c9 leave 10ce6f: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ce70: 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 } 10ce75: 5b pop %ebx 10ce76: 5e pop %esi 10ce77: 5f pop %edi 10ce78: c9 leave 10ce79: c3 ret 0010d4c4 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d4c4: 55 push %ebp 10d4c5: 89 e5 mov %esp,%ebp 10d4c7: 57 push %edi 10d4c8: 56 push %esi 10d4c9: 53 push %ebx 10d4ca: 83 ec 14 sub $0x14,%esp 10d4cd: 8b 7d 08 mov 0x8(%ebp),%edi 10d4d0: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d4d3: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10d4d7: 50 push %eax 10d4d8: 53 push %ebx 10d4d9: e8 62 7e 00 00 call 115340 10d4de: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10d4e0: 83 c4 10 add $0x10,%esp 10d4e3: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10d4e7: 75 53 jne 10d53c <_Objects_Set_name+0x78> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d4e9: 0f be 13 movsbl (%ebx),%edx 10d4ec: c1 e2 18 shl $0x18,%edx 10d4ef: 83 f8 01 cmp $0x1,%eax 10d4f2: 76 34 jbe 10d528 <_Objects_Set_name+0x64> 10d4f4: 0f be 43 01 movsbl 0x1(%ebx),%eax 10d4f8: c1 e0 10 shl $0x10,%eax 10d4fb: 09 d0 or %edx,%eax 10d4fd: 83 fe 02 cmp $0x2,%esi 10d500: 74 2d je 10d52f <_Objects_Set_name+0x6b> 10d502: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d506: c1 e2 08 shl $0x8,%edx 10d509: 09 c2 or %eax,%edx 10d50b: 83 fe 03 cmp $0x3,%esi 10d50e: 74 24 je 10d534 <_Objects_Set_name+0x70> 10d510: 0f be 43 03 movsbl 0x3(%ebx),%eax 10d514: 09 c2 or %eax,%edx 10d516: 8b 45 0c mov 0xc(%ebp),%eax 10d519: 89 50 0c mov %edx,0xc(%eax) 10d51c: b0 01 mov $0x1,%al ); } return true; } 10d51e: 8d 65 f4 lea -0xc(%ebp),%esp 10d521: 5b pop %ebx 10d522: 5e pop %esi 10d523: 5f pop %edi 10d524: c9 leave 10d525: c3 ret 10d526: 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( 10d528: 89 d0 mov %edx,%eax 10d52a: 0d 00 00 20 00 or $0x200000,%eax 10d52f: 89 c2 mov %eax,%edx 10d531: 80 ce 20 or $0x20,%dh 10d534: b8 20 00 00 00 mov $0x20,%eax 10d539: eb d9 jmp 10d514 <_Objects_Set_name+0x50> 10d53b: 90 nop <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10d53c: 83 ec 0c sub $0xc,%esp 10d53f: 8d 40 01 lea 0x1(%eax),%eax 10d542: 50 push %eax 10d543: e8 50 18 00 00 call 10ed98 <_Workspace_Allocate> 10d548: 89 c7 mov %eax,%edi if ( !d ) 10d54a: 83 c4 10 add $0x10,%esp 10d54d: 85 c0 test %eax,%eax 10d54f: 74 43 je 10d594 <_Objects_Set_name+0xd0> return false; if ( the_object->name.name_p ) { 10d551: 8b 55 0c mov 0xc(%ebp),%edx 10d554: 8b 42 0c mov 0xc(%edx),%eax 10d557: 85 c0 test %eax,%eax 10d559: 74 16 je 10d571 <_Objects_Set_name+0xad> _Workspace_Free( (void *)the_object->name.name_p ); 10d55b: 83 ec 0c sub $0xc,%esp 10d55e: 50 push %eax 10d55f: e8 50 18 00 00 call 10edb4 <_Workspace_Free> the_object->name.name_p = NULL; 10d564: 8b 45 0c mov 0xc(%ebp),%eax 10d567: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10d56e: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10d571: 50 push %eax 10d572: 56 push %esi 10d573: 53 push %ebx 10d574: 57 push %edi 10d575: e8 4a 7d 00 00 call 1152c4 d[length] = '\0'; 10d57a: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10d57e: 8b 55 0c mov 0xc(%ebp),%edx 10d581: 89 7a 0c mov %edi,0xc(%edx) 10d584: b0 01 mov $0x1,%al 10d586: 83 c4 10 add $0x10,%esp ); } return true; } 10d589: 8d 65 f4 lea -0xc(%ebp),%esp 10d58c: 5b pop %ebx 10d58d: 5e pop %esi 10d58e: 5f pop %edi 10d58f: c9 leave 10d590: c3 ret 10d591: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 10d594: 31 c0 xor %eax,%eax <== NOT EXECUTED 10d596: eb 86 jmp 10d51e <_Objects_Set_name+0x5a> <== NOT EXECUTED 0010ce7c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10ce7c: 55 push %ebp 10ce7d: 89 e5 mov %esp,%ebp 10ce7f: 57 push %edi 10ce80: 56 push %esi 10ce81: 53 push %ebx 10ce82: 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 ); 10ce85: 8b 45 08 mov 0x8(%ebp),%eax 10ce88: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10ce8c: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10ce90: 0f b7 40 10 movzwl 0x10(%eax),%eax 10ce94: 29 d8 sub %ebx,%eax 10ce96: 31 d2 xor %edx,%edx 10ce98: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10ce9a: 85 c0 test %eax,%eax 10ce9c: 74 21 je 10cebf <_Objects_Shrink_information+0x43> if ( information->inactive_per_block[ block ] == 10ce9e: 8b 55 08 mov 0x8(%ebp),%edx 10cea1: 8b 7a 30 mov 0x30(%edx),%edi 10cea4: 3b 0f cmp (%edi),%ecx 10cea6: 74 1f je 10cec7 <_Objects_Shrink_information+0x4b> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10cea8: 31 d2 xor %edx,%edx 10ceaa: eb 0e jmp 10ceba <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10ceac: 01 cb add %ecx,%ebx 10ceae: 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 ] == 10ceb5: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10ceb8: 74 12 je 10cecc <_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++ ) { 10ceba: 42 inc %edx 10cebb: 39 d0 cmp %edx,%eax 10cebd: 77 ed ja 10ceac <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cebf: 8d 65 f4 lea -0xc(%ebp),%esp 10cec2: 5b pop %ebx 10cec3: 5e pop %esi 10cec4: 5f pop %edi 10cec5: c9 leave 10cec6: 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 ] == 10cec7: 31 f6 xor %esi,%esi <== NOT EXECUTED 10cec9: 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; 10cecc: 8b 55 08 mov 0x8(%ebp),%edx 10cecf: 8b 42 20 mov 0x20(%edx),%eax 10ced2: 89 75 e4 mov %esi,-0x1c(%ebp) 10ced5: eb 07 jmp 10cede <_Objects_Shrink_information+0x62> 10ced7: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10ced8: 85 ff test %edi,%edi 10ceda: 74 2c je 10cf08 <_Objects_Shrink_information+0x8c> 10cedc: 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 ); 10cede: 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; 10cee2: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10cee4: 39 da cmp %ebx,%edx 10cee6: 72 f0 jb 10ced8 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cee8: 8b 75 08 mov 0x8(%ebp),%esi 10ceeb: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10ceef: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10cef2: 39 ca cmp %ecx,%edx 10cef4: 73 e2 jae 10ced8 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10cef6: 83 ec 0c sub $0xc,%esp 10cef9: 50 push %eax 10cefa: e8 15 3b 00 00 call 110a14 <_Chain_Extract> 10ceff: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cf02: 85 ff test %edi,%edi 10cf04: 75 d6 jne 10cedc <_Objects_Shrink_information+0x60> 10cf06: 66 90 xchg %ax,%ax 10cf08: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cf0b: 83 ec 0c sub $0xc,%esp 10cf0e: 8b 55 08 mov 0x8(%ebp),%edx 10cf11: 8b 42 34 mov 0x34(%edx),%eax 10cf14: ff 34 30 pushl (%eax,%esi,1) 10cf17: e8 7c 17 00 00 call 10e698 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10cf1c: 8b 55 08 mov 0x8(%ebp),%edx 10cf1f: 8b 42 34 mov 0x34(%edx),%eax 10cf22: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10cf29: 8b 42 30 mov 0x30(%edx),%eax 10cf2c: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10cf33: 8b 42 14 mov 0x14(%edx),%eax 10cf36: 66 29 42 2c sub %ax,0x2c(%edx) return; 10cf3a: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10cf3d: 8d 65 f4 lea -0xc(%ebp),%esp 10cf40: 5b pop %ebx 10cf41: 5e pop %esi 10cf42: 5f pop %edi 10cf43: c9 leave 10cf44: c3 ret 0010d468 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10d468: 55 push %ebp 10d469: 89 e5 mov %esp,%ebp 10d46b: 57 push %edi 10d46c: 56 push %esi 10d46d: 53 push %ebx 10d46e: 83 ec 38 sub $0x38,%esp 10d471: 8b 5d 08 mov 0x8(%ebp),%ebx 10d474: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10d477: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10d47d: 53 push %ebx 10d47e: e8 45 3c 00 00 call 1110c8 <_Timespec_Is_valid> 10d483: 83 c4 10 add $0x10,%esp 10d486: 84 c0 test %al,%al 10d488: 75 0a jne 10d494 <_POSIX_Absolute_timeout_to_ticks+0x2c> 10d48a: 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; } 10d48c: 8d 65 f4 lea -0xc(%ebp),%esp 10d48f: 5b pop %ebx 10d490: 5e pop %esi 10d491: 5f pop %edi 10d492: c9 leave 10d493: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10d494: 83 ec 0c sub $0xc,%esp 10d497: 8d 7d e0 lea -0x20(%ebp),%edi 10d49a: 57 push %edi 10d49b: e8 58 1d 00 00 call 10f1f8 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10d4a0: 5a pop %edx 10d4a1: 59 pop %ecx 10d4a2: 57 push %edi 10d4a3: 53 push %ebx 10d4a4: e8 47 3c 00 00 call 1110f0 <_Timespec_Less_than> 10d4a9: 83 c4 10 add $0x10,%esp 10d4ac: 84 c0 test %al,%al 10d4ae: 74 10 je 10d4c0 <_POSIX_Absolute_timeout_to_ticks+0x58> 10d4b0: 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; } 10d4b5: 8d 65 f4 lea -0xc(%ebp),%esp 10d4b8: 5b pop %ebx 10d4b9: 5e pop %esi 10d4ba: 5f pop %edi 10d4bb: c9 leave 10d4bc: c3 ret 10d4bd: 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 ); 10d4c0: 50 push %eax 10d4c1: 8d 45 d8 lea -0x28(%ebp),%eax 10d4c4: 50 push %eax 10d4c5: 53 push %ebx 10d4c6: 57 push %edi 10d4c7: 89 45 d4 mov %eax,-0x2c(%ebp) 10d4ca: e8 45 3c 00 00 call 111114 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10d4cf: 8b 45 d4 mov -0x2c(%ebp),%eax 10d4d2: 89 04 24 mov %eax,(%esp) 10d4d5: e8 76 3c 00 00 call 111150 <_Timespec_To_ticks> 10d4da: 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 ) 10d4dc: 83 c4 10 add $0x10,%esp 10d4df: 83 f8 01 cmp $0x1,%eax 10d4e2: 19 c0 sbb %eax,%eax 10d4e4: 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; } 10d4e7: 8d 65 f4 lea -0xc(%ebp),%esp 10d4ea: 5b pop %ebx 10d4eb: 5e pop %esi 10d4ec: 5f pop %edi 10d4ed: c9 leave 10d4ee: c3 ret 0010bfc0 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10bfc0: 55 push %ebp 10bfc1: 89 e5 mov %esp,%ebp 10bfc3: 56 push %esi 10bfc4: 53 push %ebx 10bfc5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfc8: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10bfcb: 85 db test %ebx,%ebx 10bfcd: 74 39 je 10c008 <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10bfcf: 8b 03 mov (%ebx),%eax 10bfd1: 83 f8 ff cmp $0xffffffff,%eax 10bfd4: 74 1a je 10bff0 <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10bfd6: 52 push %edx 10bfd7: 56 push %esi 10bfd8: 50 push %eax 10bfd9: 68 20 a3 12 00 push $0x12a320 10bfde: e8 15 2b 00 00 call 10eaf8 <_Objects_Get> 10bfe3: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10bfe6: 8d 65 f8 lea -0x8(%ebp),%esp 10bfe9: 5b pop %ebx 10bfea: 5e pop %esi 10bfeb: c9 leave 10bfec: c3 ret 10bfed: 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 ); 10bff0: 83 ec 08 sub $0x8,%esp 10bff3: 6a 00 push $0x0 10bff5: 53 push %ebx 10bff6: e8 19 00 00 00 call 10c014 if ( status ) { 10bffb: 83 c4 10 add $0x10,%esp 10bffe: 85 c0 test %eax,%eax 10c000: 75 06 jne 10c008 <_POSIX_Condition_variables_Get+0x48> 10c002: 8b 03 mov (%ebx),%eax 10c004: eb d0 jmp 10bfd6 <_POSIX_Condition_variables_Get+0x16> 10c006: 66 90 xchg %ax,%ax <== NOT EXECUTED *location = OBJECTS_ERROR; 10c008: c7 06 01 00 00 00 movl $0x1,(%esi) 10c00e: 31 c0 xor %eax,%eax return (POSIX_Condition_variables_Control *) 0; 10c010: eb d4 jmp 10bfe6 <_POSIX_Condition_variables_Get+0x26> 0010c0dc <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c0dc: 55 push %ebp 10c0dd: 89 e5 mov %esp,%ebp 10c0df: 57 push %edi 10c0e0: 56 push %esi 10c0e1: 53 push %ebx 10c0e2: 83 ec 24 sub $0x24,%esp 10c0e5: 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 ); 10c0e8: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0eb: 50 push %eax 10c0ec: ff 75 08 pushl 0x8(%ebp) 10c0ef: e8 cc fe ff ff call 10bfc0 <_POSIX_Condition_variables_Get> 10c0f4: 89 c7 mov %eax,%edi switch ( location ) { 10c0f6: 83 c4 10 add $0x10,%esp 10c0f9: 8b 45 e4 mov -0x1c(%ebp),%eax 10c0fc: 85 c0 test %eax,%eax 10c0fe: 74 10 je 10c110 <_POSIX_Condition_variables_Signal_support+0x34> 10c100: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 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 the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c110: 8d 77 18 lea 0x18(%edi),%esi 10c113: eb 0b jmp 10c120 <_POSIX_Condition_variables_Signal_support+0x44> 10c115: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 10c118: 84 db test %bl,%bl 10c11a: 74 20 je 10c13c <_POSIX_Condition_variables_Signal_support+0x60> 10c11c: 85 c0 test %eax,%eax 10c11e: 74 1c je 10c13c <_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 ); 10c120: 83 ec 0c sub $0xc,%esp 10c123: 56 push %esi 10c124: e8 37 36 00 00 call 10f760 <_Thread_queue_Dequeue> if ( !the_thread ) 10c129: 83 c4 10 add $0x10,%esp 10c12c: 85 c0 test %eax,%eax 10c12e: 75 e8 jne 10c118 <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c130: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c137: 84 db test %bl,%bl 10c139: 75 e1 jne 10c11c <_POSIX_Condition_variables_Signal_support+0x40> 10c13b: 90 nop _Thread_Enable_dispatch(); 10c13c: e8 2b 32 00 00 call 10f36c <_Thread_Enable_dispatch> 10c141: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c143: 8d 65 f4 lea -0xc(%ebp),%esp 10c146: 5b pop %ebx 10c147: 5e pop %esi 10c148: 5f pop %edi 10c149: c9 leave 10c14a: c3 ret 0010c1a4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c1a4: 55 push %ebp 10c1a5: 89 e5 mov %esp,%ebp 10c1a7: 57 push %edi 10c1a8: 56 push %esi 10c1a9: 53 push %ebx 10c1aa: 83 ec 34 sub $0x34,%esp 10c1ad: 8b 7d 08 mov 0x8(%ebp),%edi 10c1b0: 8b 5d 0c mov 0xc(%ebp),%ebx 10c1b3: 8a 45 14 mov 0x14(%ebp),%al 10c1b6: 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 ) ) { 10c1b9: 8d 75 e4 lea -0x1c(%ebp),%esi 10c1bc: 56 push %esi 10c1bd: 53 push %ebx 10c1be: e8 b1 01 00 00 call 10c374 <_POSIX_Mutex_Get> 10c1c3: 83 c4 10 add $0x10,%esp 10c1c6: 85 c0 test %eax,%eax 10c1c8: 74 21 je 10c1eb <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c1ca: a1 38 9e 12 00 mov 0x129e38,%eax 10c1cf: 48 dec %eax 10c1d0: a3 38 9e 12 00 mov %eax,0x129e38 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c1d5: 83 ec 08 sub $0x8,%esp 10c1d8: 56 push %esi 10c1d9: 57 push %edi 10c1da: e8 e1 fd ff ff call 10bfc0 <_POSIX_Condition_variables_Get> 10c1df: 89 c6 mov %eax,%esi switch ( location ) { 10c1e1: 83 c4 10 add $0x10,%esp 10c1e4: 8b 55 e4 mov -0x1c(%ebp),%edx 10c1e7: 85 d2 test %edx,%edx 10c1e9: 74 11 je 10c1fc <_POSIX_Condition_variables_Wait_support+0x58> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 10c1eb: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c1f0: 89 f0 mov %esi,%eax 10c1f2: 8d 65 f4 lea -0xc(%ebp),%esp 10c1f5: 5b pop %ebx 10c1f6: 5e pop %esi 10c1f7: 5f pop %edi 10c1f8: c9 leave 10c1f9: c3 ret 10c1fa: 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 ) ) { 10c1fc: 8b 40 14 mov 0x14(%eax),%eax 10c1ff: 85 c0 test %eax,%eax 10c201: 74 19 je 10c21c <_POSIX_Condition_variables_Wait_support+0x78> 10c203: 3b 03 cmp (%ebx),%eax 10c205: 74 15 je 10c21c <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c207: e8 60 31 00 00 call 10f36c <_Thread_Enable_dispatch> 10c20c: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c211: 89 f0 mov %esi,%eax 10c213: 8d 65 f4 lea -0xc(%ebp),%esp 10c216: 5b pop %ebx 10c217: 5e pop %esi 10c218: 5f pop %edi 10c219: c9 leave 10c21a: c3 ret 10c21b: 90 nop <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c21c: 83 ec 0c sub $0xc,%esp 10c21f: 53 push %ebx 10c220: e8 73 03 00 00 call 10c598 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c225: 83 c4 10 add $0x10,%esp 10c228: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c22c: 74 26 je 10c254 <_POSIX_Condition_variables_Wait_support+0xb0> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 10c22e: e8 39 31 00 00 call 10f36c <_Thread_Enable_dispatch> 10c233: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c238: 83 ec 0c sub $0xc,%esp 10c23b: 53 push %ebx 10c23c: e8 cf 02 00 00 call 10c510 if ( mutex_status ) 10c241: 83 c4 10 add $0x10,%esp 10c244: 85 c0 test %eax,%eax 10c246: 75 a3 jne 10c1eb <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c248: 89 f0 mov %esi,%eax 10c24a: 8d 65 f4 lea -0xc(%ebp),%esp 10c24d: 5b pop %ebx 10c24e: 5e pop %esi 10c24f: 5f pop %edi 10c250: c9 leave 10c251: c3 ret 10c252: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 10c254: 8b 03 mov (%ebx),%eax 10c256: 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; 10c259: 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; 10c260: a1 f8 9e 12 00 mov 0x129ef8,%eax 10c265: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c26c: 83 c6 18 add $0x18,%esi 10c26f: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c272: 8b 17 mov (%edi),%edx 10c274: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c277: 50 push %eax 10c278: 68 e0 fb 10 00 push $0x10fbe0 10c27d: ff 75 10 pushl 0x10(%ebp) 10c280: 56 push %esi 10c281: e8 f6 35 00 00 call 10f87c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c286: e8 e1 30 00 00 call 10f36c <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10c28b: a1 f8 9e 12 00 mov 0x129ef8,%eax 10c290: 8b 70 34 mov 0x34(%eax),%esi if ( status && status != ETIMEDOUT ) 10c293: 83 c4 10 add $0x10,%esp 10c296: 85 f6 test %esi,%esi 10c298: 74 9e je 10c238 <_POSIX_Condition_variables_Wait_support+0x94> 10c29a: 83 fe 74 cmp $0x74,%esi 10c29d: 0f 85 4d ff ff ff jne 10c1f0 <_POSIX_Condition_variables_Wait_support+0x4c> 10c2a3: eb 93 jmp 10c238 <_POSIX_Condition_variables_Wait_support+0x94> 00115c88 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 115c88: 55 push %ebp 115c89: 89 e5 mov %esp,%ebp 115c8b: 57 push %edi 115c8c: 56 push %esi 115c8d: 53 push %ebx 115c8e: 83 ec 34 sub $0x34,%esp 115c91: 8b 75 10 mov 0x10(%ebp),%esi CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 115c94: 68 ff 00 00 00 push $0xff 115c99: ff 75 08 pushl 0x8(%ebp) 115c9c: e8 af 4f 00 00 call 11ac50 115ca1: 89 c3 mov %eax,%ebx 115ca3: a1 78 01 13 00 mov 0x130178,%eax 115ca8: 40 inc %eax 115ca9: a3 78 01 13 00 mov %eax,0x130178 * 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 ) { 115cae: 83 c4 10 add $0x10,%esp 115cb1: 85 f6 test %esi,%esi 115cb3: 0f 84 c3 00 00 00 je 115d7c <_POSIX_Message_queue_Create_support+0xf4> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 115cb9: 8b 4e 04 mov 0x4(%esi),%ecx 115cbc: 85 c9 test %ecx,%ecx 115cbe: 0f 8e fc 00 00 00 jle 115dc0 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 115cc4: 8b 56 08 mov 0x8(%esi),%edx 115cc7: 85 d2 test %edx,%edx 115cc9: 0f 8e f1 00 00 00 jle 115dc0 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 115ccf: 8d 7d d8 lea -0x28(%ebp),%edi 115cd2: b9 04 00 00 00 mov $0x4,%ecx 115cd7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 115cd9: 8b 45 dc mov -0x24(%ebp),%eax 115cdc: 89 45 d4 mov %eax,-0x2c(%ebp) 115cdf: 8b 45 e0 mov -0x20(%ebp),%eax 115ce2: 89 45 d0 mov %eax,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 115ce5: 83 ec 0c sub $0xc,%esp 115ce8: 68 40 05 13 00 push $0x130540 115ced: e8 c6 c7 ff ff call 1124b8 <_Objects_Allocate> 115cf2: 89 c6 mov %eax,%esi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 115cf4: 83 c4 10 add $0x10,%esp 115cf7: 85 c0 test %eax,%eax 115cf9: 0f 84 03 01 00 00 je 115e02 <_POSIX_Message_queue_Create_support+0x17a> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 115cff: 8b 45 0c mov 0xc(%ebp),%eax 115d02: 89 46 10 mov %eax,0x10(%esi) the_mq->named = true; 115d05: c6 46 14 01 movb $0x1,0x14(%esi) the_mq->open_count = 1; 115d09: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi) the_mq->linked = true; 115d10: c6 46 15 01 movb $0x1,0x15(%esi) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 115d14: 43 inc %ebx 115d15: 83 ec 0c sub $0xc,%esp 115d18: 53 push %ebx 115d19: e8 72 e7 ff ff call 114490 <_Workspace_Allocate> 115d1e: 89 c7 mov %eax,%edi if (!name) { 115d20: 83 c4 10 add $0x10,%esp 115d23: 85 c0 test %eax,%eax 115d25: 0f 84 ac 00 00 00 je 115dd7 <_POSIX_Message_queue_Create_support+0x14f> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strncpy( name, name_arg, n+1 ); 115d2b: 50 push %eax 115d2c: 53 push %ebx 115d2d: ff 75 08 pushl 0x8(%ebp) 115d30: 57 push %edi 115d31: e8 9e 4e 00 00 call 11abd4 * * 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; 115d36: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) if ( !_CORE_message_queue_Initialize( 115d3d: ff 75 d0 pushl -0x30(%ebp) 115d40: ff 75 d4 pushl -0x2c(%ebp) 115d43: 8d 46 5c lea 0x5c(%esi),%eax 115d46: 50 push %eax 115d47: 8d 46 1c lea 0x1c(%esi),%eax 115d4a: 50 push %eax 115d4b: e8 dc 0d 00 00 call 116b2c <_CORE_message_queue_Initialize> 115d50: 83 c4 20 add $0x20,%esp 115d53: 84 c0 test %al,%al 115d55: 74 39 je 115d90 <_POSIX_Message_queue_Create_support+0x108> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115d57: 0f b7 56 08 movzwl 0x8(%esi),%edx 115d5b: a1 5c 05 13 00 mov 0x13055c,%eax 115d60: 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; 115d63: 89 7e 0c mov %edi,0xc(%esi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 115d66: 8b 45 14 mov 0x14(%ebp),%eax 115d69: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 115d6b: e8 bc d4 ff ff call 11322c <_Thread_Enable_dispatch> 115d70: 31 c0 xor %eax,%eax return 0; } 115d72: 8d 65 f4 lea -0xc(%ebp),%esp 115d75: 5b pop %ebx 115d76: 5e pop %esi 115d77: 5f pop %edi 115d78: c9 leave 115d79: c3 ret 115d7a: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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 ) { 115d7c: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp) 115d83: c7 45 d0 10 00 00 00 movl $0x10,-0x30(%ebp) 115d8a: e9 56 ff ff ff jmp 115ce5 <_POSIX_Message_queue_Create_support+0x5d> 115d8f: 90 nop <== 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 ); 115d90: 83 ec 08 sub $0x8,%esp 115d93: 56 push %esi 115d94: 68 40 05 13 00 push $0x130540 115d99: e8 9a ca ff ff call 112838 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 115d9e: 89 3c 24 mov %edi,(%esp) 115da1: e8 06 e7 ff ff call 1144ac <_Workspace_Free> _Thread_Enable_dispatch(); 115da6: e8 81 d4 ff ff call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 115dab: e8 5c 39 00 00 call 11970c <__errno> 115db0: c7 00 1c 00 00 00 movl $0x1c,(%eax) 115db6: b8 ff ff ff ff mov $0xffffffff,%eax 115dbb: 83 c4 10 add $0x10,%esp 115dbe: eb b2 jmp 115d72 <_POSIX_Message_queue_Create_support+0xea> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 115dc0: e8 67 d4 ff ff call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 115dc5: e8 42 39 00 00 call 11970c <__errno> 115dca: c7 00 16 00 00 00 movl $0x16,(%eax) 115dd0: b8 ff ff ff ff mov $0xffffffff,%eax 115dd5: eb 9b jmp 115d72 <_POSIX_Message_queue_Create_support+0xea> 115dd7: 83 ec 08 sub $0x8,%esp 115dda: 56 push %esi 115ddb: 68 40 05 13 00 push $0x130540 115de0: e8 53 ca ff ff call 112838 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 115de5: e8 42 d4 ff ff call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 115dea: e8 1d 39 00 00 call 11970c <__errno> 115def: c7 00 0c 00 00 00 movl $0xc,(%eax) 115df5: b8 ff ff ff ff mov $0xffffffff,%eax 115dfa: 83 c4 10 add $0x10,%esp 115dfd: e9 70 ff ff ff jmp 115d72 <_POSIX_Message_queue_Create_support+0xea> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 115e02: e8 25 d4 ff ff call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 115e07: e8 00 39 00 00 call 11970c <__errno> 115e0c: c7 00 17 00 00 00 movl $0x17,(%eax) 115e12: b8 ff ff ff ff mov $0xffffffff,%eax 115e17: e9 56 ff ff ff jmp 115d72 <_POSIX_Message_queue_Create_support+0xea> 00115e1c <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 115e1c: 55 push %ebp 115e1d: 89 e5 mov %esp,%ebp 115e1f: 53 push %ebx 115e20: 83 ec 14 sub $0x14,%esp 115e23: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 115e26: 85 db test %ebx,%ebx 115e28: 74 05 je 115e2f <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 115e2a: 80 3b 00 cmpb $0x0,(%ebx) 115e2d: 75 0d jne 115e3c <_POSIX_Message_queue_Name_to_id+0x20> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115e2f: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 115e34: 8b 5d fc mov -0x4(%ebp),%ebx 115e37: c9 leave 115e38: c3 ret 115e39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 115e3c: 83 ec 08 sub $0x8,%esp 115e3f: 68 ff 00 00 00 push $0xff 115e44: 53 push %ebx 115e45: e8 06 4e 00 00 call 11ac50 115e4a: 83 c4 10 add $0x10,%esp 115e4d: 3d fe 00 00 00 cmp $0xfe,%eax 115e52: 76 0c jbe 115e60 <_POSIX_Message_queue_Name_to_id+0x44> 115e54: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 115e59: 8b 5d fc mov -0x4(%ebp),%ebx 115e5c: c9 leave 115e5d: c3 ret 115e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 115e60: 50 push %eax 115e61: 8d 45 f4 lea -0xc(%ebp),%eax 115e64: 50 push %eax 115e65: 53 push %ebx 115e66: 68 40 05 13 00 push $0x130540 115e6b: e8 c0 12 00 00 call 117130 <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 115e70: 8b 4d f4 mov -0xc(%ebp),%ecx 115e73: 8b 55 0c mov 0xc(%ebp),%edx 115e76: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115e78: 83 c4 10 add $0x10,%esp 115e7b: 83 f8 01 cmp $0x1,%eax 115e7e: 19 c0 sbb %eax,%eax 115e80: f7 d0 not %eax 115e82: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 115e85: 8b 5d fc mov -0x4(%ebp),%ebx 115e88: c9 leave 115e89: c3 ret 0010fa70 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10fa70: 55 push %ebp 10fa71: 89 e5 mov %esp,%ebp 10fa73: 56 push %esi 10fa74: 53 push %ebx 10fa75: 83 ec 24 sub $0x24,%esp 10fa78: 8b 5d 08 mov 0x8(%ebp),%ebx 10fa7b: 8b 75 14 mov 0x14(%ebp),%esi 10fa7e: 8a 45 18 mov 0x18(%ebp),%al 10fa81: 88 45 e7 mov %al,-0x19(%ebp) 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( 10fa84: 8d 45 f4 lea -0xc(%ebp),%eax 10fa87: 50 push %eax 10fa88: 53 push %ebx 10fa89: 68 e0 06 13 00 push $0x1306e0 10fa8e: e8 d5 2e 00 00 call 112968 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fa93: 83 c4 10 add $0x10,%esp 10fa96: 8b 55 f4 mov -0xc(%ebp),%edx 10fa99: 85 d2 test %edx,%edx 10fa9b: 74 17 je 10fab4 <_POSIX_Message_queue_Receive_support+0x44> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fa9d: e8 6a 9c 00 00 call 11970c <__errno> 10faa2: c7 00 09 00 00 00 movl $0x9,(%eax) 10faa8: b8 ff ff ff ff mov $0xffffffff,%eax } 10faad: 8d 65 f8 lea -0x8(%ebp),%esp 10fab0: 5b pop %ebx 10fab1: 5e pop %esi 10fab2: c9 leave 10fab3: c3 ret the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10fab4: 8b 48 14 mov 0x14(%eax),%ecx 10fab7: 89 ca mov %ecx,%edx 10fab9: 83 e2 03 and $0x3,%edx 10fabc: 4a dec %edx 10fabd: 0f 84 af 00 00 00 je 10fb72 <_POSIX_Message_queue_Receive_support+0x102> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fac3: 8b 50 10 mov 0x10(%eax),%edx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10fac6: 8b 45 10 mov 0x10(%ebp),%eax 10fac9: 39 42 68 cmp %eax,0x68(%edx) 10facc: 77 62 ja 10fb30 <_POSIX_Message_queue_Receive_support+0xc0> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10face: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10fad2: 75 48 jne 10fb1c <_POSIX_Message_queue_Receive_support+0xac> 10fad4: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10fad6: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10fadd: 83 ec 08 sub $0x8,%esp 10fae0: ff 75 1c pushl 0x1c(%ebp) 10fae3: 50 push %eax 10fae4: 8d 45 f0 lea -0x10(%ebp),%eax 10fae7: 50 push %eax 10fae8: ff 75 0c pushl 0xc(%ebp) 10faeb: 53 push %ebx 10faec: 83 c2 1c add $0x1c,%edx 10faef: 52 push %edx 10faf0: e8 4b 1f 00 00 call 111a40 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10faf5: 83 c4 20 add $0x20,%esp 10faf8: e8 2f 37 00 00 call 11322c <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10fafd: a1 38 02 13 00 mov 0x130238,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fb02: 8b 50 24 mov 0x24(%eax),%edx 10fb05: 89 16 mov %edx,(%esi) 10fb07: 85 d2 test %edx,%edx 10fb09: 78 21 js 10fb2c <_POSIX_Message_queue_Receive_support+0xbc> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10fb0b: 8b 40 34 mov 0x34(%eax),%eax 10fb0e: 85 c0 test %eax,%eax 10fb10: 75 3a jne 10fb4c <_POSIX_Message_queue_Receive_support+0xdc> return length_out; 10fb12: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fb15: 8d 65 f8 lea -0x8(%ebp),%esp 10fb18: 5b pop %ebx 10fb19: 5e pop %esi 10fb1a: c9 leave 10fb1b: c3 ret length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fb1c: 89 c8 mov %ecx,%eax 10fb1e: c1 e8 0e shr $0xe,%eax 10fb21: 83 f0 01 xor $0x1,%eax 10fb24: 83 e0 01 and $0x1,%eax 10fb27: eb ad jmp 10fad6 <_POSIX_Message_queue_Receive_support+0x66> 10fb29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fb2c: f7 1e negl (%esi) 10fb2e: eb db jmp 10fb0b <_POSIX_Message_queue_Receive_support+0x9b> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 10fb30: e8 f7 36 00 00 call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10fb35: e8 d2 9b 00 00 call 11970c <__errno> 10fb3a: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10fb40: b8 ff ff ff ff mov $0xffffffff,%eax 10fb45: e9 63 ff ff ff jmp 10faad <_POSIX_Message_queue_Receive_support+0x3d> 10fb4a: 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( 10fb4c: e8 bb 9b 00 00 call 11970c <__errno> 10fb51: 89 c3 mov %eax,%ebx 10fb53: 83 ec 0c sub $0xc,%esp 10fb56: a1 38 02 13 00 mov 0x130238,%eax 10fb5b: ff 70 34 pushl 0x34(%eax) 10fb5e: e8 39 02 00 00 call 10fd9c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fb63: 89 03 mov %eax,(%ebx) 10fb65: b8 ff ff ff ff mov $0xffffffff,%eax 10fb6a: 83 c4 10 add $0x10,%esp 10fb6d: e9 3b ff ff ff jmp 10faad <_POSIX_Message_queue_Receive_support+0x3d> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 10fb72: e8 b5 36 00 00 call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fb77: e8 90 9b 00 00 call 11970c <__errno> 10fb7c: c7 00 09 00 00 00 movl $0x9,(%eax) 10fb82: b8 ff ff ff ff mov $0xffffffff,%eax 10fb87: e9 21 ff ff ff jmp 10faad <_POSIX_Message_queue_Receive_support+0x3d> 0010fbac <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10fbac: 55 push %ebp 10fbad: 89 e5 mov %esp,%ebp 10fbaf: 57 push %edi 10fbb0: 56 push %esi 10fbb1: 53 push %ebx 10fbb2: 83 ec 2c sub $0x2c,%esp 10fbb5: 8b 75 08 mov 0x8(%ebp),%esi 10fbb8: 8b 5d 14 mov 0x14(%ebp),%ebx 10fbbb: 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 ) 10fbbe: 83 fb 20 cmp $0x20,%ebx 10fbc1: 0f 87 9d 00 00 00 ja 10fc64 <_POSIX_Message_queue_Send_support+0xb8> 10fbc7: 51 push %ecx 10fbc8: 8d 45 e4 lea -0x1c(%ebp),%eax 10fbcb: 50 push %eax 10fbcc: 56 push %esi 10fbcd: 68 e0 06 13 00 push $0x1306e0 10fbd2: 88 55 d4 mov %dl,-0x2c(%ebp) 10fbd5: e8 8e 2d 00 00 call 112968 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fbda: 83 c4 10 add $0x10,%esp 10fbdd: 8b 55 e4 mov -0x1c(%ebp),%edx 10fbe0: 85 d2 test %edx,%edx 10fbe2: 8a 55 d4 mov -0x2c(%ebp),%dl 10fbe5: 75 69 jne 10fc50 <_POSIX_Message_queue_Send_support+0xa4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10fbe7: 8b 48 14 mov 0x14(%eax),%ecx 10fbea: f6 c1 03 test $0x3,%cl 10fbed: 0f 84 85 00 00 00 je 10fc78 <_POSIX_Message_queue_Send_support+0xcc> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fbf3: 8b 78 10 mov 0x10(%eax),%edi /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fbf6: 84 d2 test %dl,%dl 10fbf8: 75 3a jne 10fc34 <_POSIX_Message_queue_Send_support+0x88> 10fbfa: 31 c0 xor %eax,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10fbfc: ff 75 1c pushl 0x1c(%ebp) 10fbff: 50 push %eax 10fc00: f7 db neg %ebx 10fc02: 53 push %ebx 10fc03: 6a 00 push $0x0 10fc05: 56 push %esi 10fc06: ff 75 10 pushl 0x10(%ebp) 10fc09: ff 75 0c pushl 0xc(%ebp) 10fc0c: 8d 47 1c lea 0x1c(%edi),%eax 10fc0f: 50 push %eax 10fc10: e8 57 1f 00 00 call 111b6c <_CORE_message_queue_Submit> 10fc15: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10fc17: 83 c4 20 add $0x20,%esp 10fc1a: e8 0d 36 00 00 call 11322c <_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 ) 10fc1f: 83 fb 07 cmp $0x7,%ebx 10fc22: 74 20 je 10fc44 <_POSIX_Message_queue_Send_support+0x98> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10fc24: 85 db test %ebx,%ebx 10fc26: 75 68 jne 10fc90 <_POSIX_Message_queue_Send_support+0xe4> 10fc28: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fc2a: 8d 65 f4 lea -0xc(%ebp),%esp 10fc2d: 5b pop %ebx 10fc2e: 5e pop %esi 10fc2f: 5f pop %edi 10fc30: c9 leave 10fc31: c3 ret 10fc32: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fc34: 89 c8 mov %ecx,%eax 10fc36: c1 e8 0e shr $0xe,%eax 10fc39: 83 f0 01 xor $0x1,%eax 10fc3c: 83 e0 01 and $0x1,%eax 10fc3f: eb bb jmp 10fbfc <_POSIX_Message_queue_Send_support+0x50> 10fc41: 8d 76 00 lea 0x0(%esi),%esi <== 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; 10fc44: a1 38 02 13 00 mov 0x130238,%eax 10fc49: 8b 58 34 mov 0x34(%eax),%ebx 10fc4c: eb d6 jmp 10fc24 <_POSIX_Message_queue_Send_support+0x78> 10fc4e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fc50: e8 b7 9a 00 00 call 11970c <__errno> 10fc55: c7 00 09 00 00 00 movl $0x9,(%eax) 10fc5b: b8 ff ff ff ff mov $0xffffffff,%eax 10fc60: eb c8 jmp 10fc2a <_POSIX_Message_queue_Send_support+0x7e> 10fc62: 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 ); 10fc64: e8 a3 9a 00 00 call 11970c <__errno> 10fc69: c7 00 16 00 00 00 movl $0x16,(%eax) 10fc6f: b8 ff ff ff ff mov $0xffffffff,%eax 10fc74: eb b4 jmp 10fc2a <_POSIX_Message_queue_Send_support+0x7e> 10fc76: 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(); 10fc78: e8 af 35 00 00 call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fc7d: e8 8a 9a 00 00 call 11970c <__errno> 10fc82: c7 00 09 00 00 00 movl $0x9,(%eax) 10fc88: b8 ff ff ff ff mov $0xffffffff,%eax 10fc8d: eb 9b jmp 10fc2a <_POSIX_Message_queue_Send_support+0x7e> 10fc8f: 90 nop <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10fc90: e8 77 9a 00 00 call 11970c <__errno> 10fc95: 89 c6 mov %eax,%esi 10fc97: 83 ec 0c sub $0xc,%esp 10fc9a: 53 push %ebx 10fc9b: e8 fc 00 00 00 call 10fd9c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10fca0: 89 06 mov %eax,(%esi) 10fca2: b8 ff ff ff ff mov $0xffffffff,%eax 10fca7: 83 c4 10 add $0x10,%esp 10fcaa: e9 7b ff ff ff jmp 10fc2a <_POSIX_Message_queue_Send_support+0x7e> 0010d0b8 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10d0b8: 55 push %ebp 10d0b9: 89 e5 mov %esp,%ebp 10d0bb: 56 push %esi 10d0bc: 53 push %ebx 10d0bd: 8b 5d 08 mov 0x8(%ebp),%ebx 10d0c0: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d0c3: 85 db test %ebx,%ebx 10d0c5: 74 39 je 10d100 <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d0c7: 8b 03 mov (%ebx),%eax 10d0c9: 83 f8 ff cmp $0xffffffff,%eax 10d0cc: 74 1a je 10d0e8 <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) 10d0ce: 52 push %edx 10d0cf: 56 push %esi 10d0d0: 50 push %eax 10d0d1: 68 e0 c9 12 00 push $0x12c9e0 10d0d6: e8 fd 2a 00 00 call 10fbd8 <_Objects_Get> 10d0db: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d0de: 8d 65 f8 lea -0x8(%ebp),%esp 10d0e1: 5b pop %ebx 10d0e2: 5e pop %esi 10d0e3: c9 leave 10d0e4: c3 ret 10d0e5: 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 ); 10d0e8: 83 ec 08 sub $0x8,%esp 10d0eb: 6a 00 push $0x0 10d0ed: 53 push %ebx 10d0ee: e8 65 00 00 00 call 10d158 10d0f3: 83 c4 10 add $0x10,%esp 10d0f6: 85 c0 test %eax,%eax 10d0f8: 75 06 jne 10d100 <_POSIX_Mutex_Get+0x48> 10d0fa: 8b 03 mov (%ebx),%eax 10d0fc: eb d0 jmp 10d0ce <_POSIX_Mutex_Get+0x16> 10d0fe: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d100: c7 06 01 00 00 00 movl $0x1,(%esi) 10d106: 31 c0 xor %eax,%eax 10d108: eb d4 jmp 10d0de <_POSIX_Mutex_Get+0x26> 0010d064 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 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 ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d06f: 85 db test %ebx,%ebx 10d071: 74 39 je 10d0ac <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d073: 8b 03 mov (%ebx),%eax 10d075: 83 f8 ff cmp $0xffffffff,%eax 10d078: 74 1a je 10d094 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d07a: ff 75 10 pushl 0x10(%ebp) 10d07d: 56 push %esi 10d07e: 50 push %eax 10d07f: 68 e0 c9 12 00 push $0x12c9e0 10d084: e8 f7 2a 00 00 call 10fb80 <_Objects_Get_isr_disable> 10d089: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d08c: 8d 65 f8 lea -0x8(%ebp),%esp 10d08f: 5b pop %ebx 10d090: 5e pop %esi 10d091: c9 leave 10d092: c3 ret 10d093: 90 nop <== NOT EXECUTED ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d094: 83 ec 08 sub $0x8,%esp 10d097: 6a 00 push $0x0 10d099: 53 push %ebx 10d09a: e8 b9 00 00 00 call 10d158 10d09f: 83 c4 10 add $0x10,%esp 10d0a2: 85 c0 test %eax,%eax 10d0a4: 75 06 jne 10d0ac <_POSIX_Mutex_Get_interrupt_disable+0x48> 10d0a6: 8b 03 mov (%ebx),%eax 10d0a8: eb d0 jmp 10d07a <_POSIX_Mutex_Get_interrupt_disable+0x16> 10d0aa: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d0ac: c7 06 01 00 00 00 movl $0x1,(%esi) 10d0b2: 31 c0 xor %eax,%eax 10d0b4: eb d6 jmp 10d08c <_POSIX_Mutex_Get_interrupt_disable+0x28> 0010d2b4 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d2b4: 55 push %ebp 10d2b5: 89 e5 mov %esp,%ebp 10d2b7: 53 push %ebx 10d2b8: 83 ec 18 sub $0x18,%esp 10d2bb: 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 ); 10d2be: 8d 45 f0 lea -0x10(%ebp),%eax 10d2c1: 50 push %eax 10d2c2: 8d 45 f4 lea -0xc(%ebp),%eax 10d2c5: 50 push %eax 10d2c6: ff 75 08 pushl 0x8(%ebp) 10d2c9: e8 96 fd ff ff call 10d064 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 10d2ce: 83 c4 10 add $0x10,%esp 10d2d1: 8b 55 f4 mov -0xc(%ebp),%edx 10d2d4: 85 d2 test %edx,%edx 10d2d6: 75 34 jne 10d30c <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d2d8: 83 ec 0c sub $0xc,%esp 10d2db: ff 75 f0 pushl -0x10(%ebp) 10d2de: ff 75 10 pushl 0x10(%ebp) 10d2e1: 0f b6 db movzbl %bl,%ebx 10d2e4: 53 push %ebx 10d2e5: ff 70 08 pushl 0x8(%eax) 10d2e8: 83 c0 14 add $0x14,%eax 10d2eb: 50 push %eax 10d2ec: e8 db 1c 00 00 call 10efcc <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d2f1: 83 c4 14 add $0x14,%esp 10d2f4: a1 98 c6 12 00 mov 0x12c698,%eax 10d2f9: ff 70 34 pushl 0x34(%eax) 10d2fc: e8 f3 00 00 00 call 10d3f4 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d301: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d304: 8b 5d fc mov -0x4(%ebp),%ebx 10d307: c9 leave 10d308: c3 ret 10d309: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 10d30c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d311: 8b 5d fc mov -0x4(%ebp),%ebx 10d314: c9 leave 10d315: c3 ret 00113e80 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 113e80: 55 push %ebp 113e81: 89 e5 mov %esp,%ebp 113e83: 56 push %esi 113e84: 53 push %ebx 113e85: 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) 113e88: 8b 55 0c mov 0xc(%ebp),%edx 113e8b: 85 d2 test %edx,%edx 113e8d: 0f 85 b9 00 00 00 jne 113f4c <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 113e93: 85 db test %ebx,%ebx 113e95: 74 1c je 113eb3 <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 113e97: 83 ec 08 sub $0x8,%esp 113e9a: 68 ff 00 00 00 push $0xff 113e9f: 53 push %ebx 113ea0: e8 6b 48 00 00 call 118710 113ea5: 83 c4 10 add $0x10,%esp 113ea8: 3d fe 00 00 00 cmp $0xfe,%eax 113ead: 0f 87 ad 00 00 00 ja 113f60 <_POSIX_Semaphore_Create_support+0xe0> 113eb3: a1 78 d1 12 00 mov 0x12d178,%eax 113eb8: 40 inc %eax 113eb9: a3 78 d1 12 00 mov %eax,0x12d178 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 113ebe: 83 ec 0c sub $0xc,%esp 113ec1: 68 c0 d4 12 00 push $0x12d4c0 113ec6: e8 bd bf ff ff call 10fe88 <_Objects_Allocate> 113ecb: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 113ecd: 83 c4 10 add $0x10,%esp 113ed0: 85 c0 test %eax,%eax 113ed2: 0f 84 9a 00 00 00 je 113f72 <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 113ed8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 113edf: 85 db test %ebx,%ebx 113ee1: 74 55 je 113f38 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 113ee3: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 113ee7: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 113eee: 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; 113ef2: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 113ef9: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 113f00: 50 push %eax 113f01: ff 75 10 pushl 0x10(%ebp) 113f04: 8d 46 5c lea 0x5c(%esi),%eax 113f07: 50 push %eax 113f08: 8d 46 1c lea 0x1c(%esi),%eax 113f0b: 50 push %eax 113f0c: e8 8b ba ff ff call 10f99c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113f11: 0f b7 56 08 movzwl 0x8(%esi),%edx 113f15: a1 dc d4 12 00 mov 0x12d4dc,%eax 113f1a: 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; 113f1d: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 113f20: 8b 45 14 mov 0x14(%ebp),%eax 113f23: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 113f25: e8 d2 cc ff ff call 110bfc <_Thread_Enable_dispatch> 113f2a: 31 c0 xor %eax,%eax return 0; 113f2c: 83 c4 10 add $0x10,%esp } 113f2f: 8d 65 f8 lea -0x8(%ebp),%esp 113f32: 5b pop %ebx 113f33: 5e pop %esi 113f34: c9 leave 113f35: c3 ret 113f36: 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; 113f38: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 113f3c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 113f43: c6 40 15 00 movb $0x0,0x15(%eax) 113f47: eb a9 jmp 113ef2 <_POSIX_Semaphore_Create_support+0x72> 113f49: 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 ); 113f4c: e8 2f 39 00 00 call 117880 <__errno> 113f51: c7 00 58 00 00 00 movl $0x58,(%eax) 113f57: b8 ff ff ff ff mov $0xffffffff,%eax 113f5c: eb d1 jmp 113f2f <_POSIX_Semaphore_Create_support+0xaf> 113f5e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 113f60: e8 1b 39 00 00 call 117880 <__errno> 113f65: c7 00 5b 00 00 00 movl $0x5b,(%eax) 113f6b: b8 ff ff ff ff mov $0xffffffff,%eax 113f70: eb bd jmp 113f2f <_POSIX_Semaphore_Create_support+0xaf> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 113f72: e8 85 cc ff ff call 110bfc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 113f77: e8 04 39 00 00 call 117880 <__errno> 113f7c: c7 00 1c 00 00 00 movl $0x1c,(%eax) 113f82: b8 ff ff ff ff mov $0xffffffff,%eax 113f87: eb a6 jmp 113f2f <_POSIX_Semaphore_Create_support+0xaf> 00113fdc <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 113fdc: 55 push %ebp 113fdd: 89 e5 mov %esp,%ebp 113fdf: 83 ec 18 sub $0x18,%esp 113fe2: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 113fe5: 85 c0 test %eax,%eax 113fe7: 74 05 je 113fee <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 113fe9: 80 38 00 cmpb $0x0,(%eax) 113fec: 75 0a jne 113ff8 <_POSIX_Semaphore_Name_to_id+0x1c> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 113fee: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 113ff3: c9 leave 113ff4: c3 ret 113ff5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 113ff8: 52 push %edx 113ff9: 8d 55 f4 lea -0xc(%ebp),%edx 113ffc: 52 push %edx 113ffd: 50 push %eax 113ffe: 68 c0 d4 12 00 push $0x12d4c0 114003: e8 f8 0d 00 00 call 114e00 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 114008: 8b 4d f4 mov -0xc(%ebp),%ecx 11400b: 8b 55 0c mov 0xc(%ebp),%edx 11400e: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 114010: 83 c4 10 add $0x10,%esp 114013: 83 f8 01 cmp $0x1,%eax 114016: 19 c0 sbb %eax,%eax 114018: f7 d0 not %eax 11401a: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 11401d: c9 leave 11401e: c3 ret 00114048 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 114048: 55 push %ebp 114049: 89 e5 mov %esp,%ebp 11404b: 53 push %ebx 11404c: 83 ec 18 sub $0x18,%esp 11404f: 8a 5d 0c mov 0xc(%ebp),%bl RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 114052: 8d 45 f4 lea -0xc(%ebp),%eax 114055: 50 push %eax 114056: 8b 45 08 mov 0x8(%ebp),%eax 114059: ff 30 pushl (%eax) 11405b: 68 c0 d4 12 00 push $0x12d4c0 114060: e8 d3 c2 ff ff call 110338 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 114065: 83 c4 10 add $0x10,%esp 114068: 8b 55 f4 mov -0xc(%ebp),%edx 11406b: 85 d2 test %edx,%edx 11406d: 74 15 je 114084 <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 11406f: e8 0c 38 00 00 call 117880 <__errno> 114074: c7 00 16 00 00 00 movl $0x16,(%eax) 11407a: b8 ff ff ff ff mov $0xffffffff,%eax } 11407f: 8b 5d fc mov -0x4(%ebp),%ebx 114082: c9 leave 114083: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 114084: ff 75 10 pushl 0x10(%ebp) 114087: 0f b6 db movzbl %bl,%ebx 11408a: 53 push %ebx 11408b: ff 70 08 pushl 0x8(%eax) 11408e: 83 c0 1c add $0x1c,%eax 114091: 50 push %eax 114092: e8 65 08 00 00 call 1148fc <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 114097: e8 60 cb ff ff call 110bfc <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 11409c: 83 c4 10 add $0x10,%esp 11409f: a1 38 d2 12 00 mov 0x12d238,%eax 1140a4: 8b 40 34 mov 0x34(%eax),%eax 1140a7: 85 c0 test %eax,%eax 1140a9: 75 09 jne 1140b4 <_POSIX_Semaphore_Wait_support+0x6c> 1140ab: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 1140ad: 8b 5d fc mov -0x4(%ebp),%ebx 1140b0: c9 leave 1140b1: c3 ret 1140b2: 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( 1140b4: e8 c7 37 00 00 call 117880 <__errno> 1140b9: 89 c3 mov %eax,%ebx 1140bb: 83 ec 0c sub $0xc,%esp 1140be: a1 38 d2 12 00 mov 0x12d238,%eax 1140c3: ff 70 34 pushl 0x34(%eax) 1140c6: e8 c1 26 00 00 call 11678c <_POSIX_Semaphore_Translate_core_semaphore_return_code> 1140cb: 89 03 mov %eax,(%ebx) 1140cd: b8 ff ff ff ff mov $0xffffffff,%eax 1140d2: 83 c4 10 add $0x10,%esp 1140d5: eb a8 jmp 11407f <_POSIX_Semaphore_Wait_support+0x37> 00111298 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 111298: 55 push %ebp 111299: 89 e5 mov %esp,%ebp 11129b: 57 push %edi 11129c: 56 push %esi 11129d: 53 push %ebx 11129e: 83 ec 18 sub $0x18,%esp 1112a1: 8b 5d 08 mov 0x8(%ebp),%ebx 1112a4: 8b 75 0c mov 0xc(%ebp),%esi 1112a7: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 1112aa: ff 36 pushl (%esi) 1112ac: e8 cb ff ff ff call 11127c <_POSIX_Priority_Is_valid> 1112b1: 83 c4 10 add $0x10,%esp 1112b4: 84 c0 test %al,%al 1112b6: 74 2a je 1112e2 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1112b8: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 1112be: 8b 45 14 mov 0x14(%ebp),%eax 1112c1: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 1112c7: 85 db test %ebx,%ebx 1112c9: 74 25 je 1112f0 <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 1112cb: 83 fb 01 cmp $0x1,%ebx 1112ce: 0f 84 90 00 00 00 je 111364 <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 1112d4: 83 fb 02 cmp $0x2,%ebx 1112d7: 0f 84 97 00 00 00 je 111374 <_POSIX_Thread_Translate_sched_param+0xdc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 1112dd: 83 fb 04 cmp $0x4,%ebx 1112e0: 74 1e je 111300 <_POSIX_Thread_Translate_sched_param+0x68> if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 1112e2: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 1112e7: 8d 65 f4 lea -0xc(%ebp),%esp 1112ea: 5b pop %ebx 1112eb: 5e pop %esi 1112ec: 5f pop %edi 1112ed: c9 leave 1112ee: c3 ret 1112ef: 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; 1112f0: c7 07 01 00 00 00 movl $0x1,(%edi) 1112f6: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 1112f8: 8d 65 f4 lea -0xc(%ebp),%esp 1112fb: 5b pop %ebx 1112fc: 5e pop %esi 1112fd: 5f pop %edi 1112fe: c9 leave 1112ff: 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) && 111300: 8b 5e 08 mov 0x8(%esi),%ebx 111303: 85 db test %ebx,%ebx 111305: 75 07 jne 11130e <_POSIX_Thread_Translate_sched_param+0x76> (param->sched_ss_repl_period.tv_nsec == 0) ) 111307: 8b 4e 0c mov 0xc(%esi),%ecx 11130a: 85 c9 test %ecx,%ecx 11130c: 74 d4 je 1112e2 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 11130e: 8b 56 10 mov 0x10(%esi),%edx 111311: 85 d2 test %edx,%edx 111313: 75 07 jne 11131c <_POSIX_Thread_Translate_sched_param+0x84> (param->sched_ss_init_budget.tv_nsec == 0) ) 111315: 8b 46 14 mov 0x14(%esi),%eax 111318: 85 c0 test %eax,%eax 11131a: 74 c6 je 1112e2 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 11131c: 83 ec 0c sub $0xc,%esp 11131f: 8d 46 08 lea 0x8(%esi),%eax 111322: 50 push %eax 111323: e8 f4 de ff ff call 10f21c <_Timespec_To_ticks> 111328: 89 c3 mov %eax,%ebx 11132a: 8d 46 10 lea 0x10(%esi),%eax 11132d: 89 04 24 mov %eax,(%esp) 111330: e8 e7 de ff ff call 10f21c <_Timespec_To_ticks> 111335: 83 c4 10 add $0x10,%esp 111338: 39 c3 cmp %eax,%ebx 11133a: 72 a6 jb 1112e2 <_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 ) ) 11133c: 83 ec 0c sub $0xc,%esp 11133f: ff 76 04 pushl 0x4(%esi) 111342: e8 35 ff ff ff call 11127c <_POSIX_Priority_Is_valid> 111347: 83 c4 10 add $0x10,%esp 11134a: 84 c0 test %al,%al 11134c: 74 94 je 1112e2 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 11134e: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 111354: 8b 45 14 mov 0x14(%ebp),%eax 111357: c7 00 b8 bb 10 00 movl $0x10bbb8,(%eax) 11135d: 31 c0 xor %eax,%eax return 0; 11135f: eb 86 jmp 1112e7 <_POSIX_Thread_Translate_sched_param+0x4f> 111361: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111364: c7 07 00 00 00 00 movl $0x0,(%edi) 11136a: 31 c0 xor %eax,%eax return 0; 11136c: e9 76 ff ff ff jmp 1112e7 <_POSIX_Thread_Translate_sched_param+0x4f> 111371: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 111374: c7 07 02 00 00 00 movl $0x2,(%edi) 11137a: 31 c0 xor %eax,%eax return 0; 11137c: e9 66 ff ff ff jmp 1112e7 <_POSIX_Thread_Translate_sched_param+0x4f> 00110180 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 110180: 55 push %ebp 110181: 89 e5 mov %esp,%ebp 110183: 57 push %edi 110184: 56 push %esi 110185: 53 push %ebx 110186: 83 ec 28 sub $0x28,%esp 110189: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 11018c: 68 ec 00 00 00 push $0xec 110191: 89 55 e4 mov %edx,-0x1c(%ebp) 110194: e8 e3 e4 ff ff call 10e67c <_Workspace_Allocate> 110199: 89 c3 mov %eax,%ebx if ( !api ) 11019b: 83 c4 10 add $0x10,%esp 11019e: 85 c0 test %eax,%eax 1101a0: 8b 55 e4 mov -0x1c(%ebp),%edx 1101a3: 0f 84 2f 01 00 00 je 1102d8 <_POSIX_Threads_Create_extension+0x158> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 1101a9: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 1101af: b9 3c 00 00 00 mov $0x3c,%ecx 1101b4: 31 c0 xor %eax,%eax 1101b6: 89 df mov %ebx,%edi 1101b8: f3 aa rep stos %al,%es:(%edi) 1101ba: c7 03 01 00 00 00 movl $0x1,(%ebx) 1101c0: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) 1101c7: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx) 1101ce: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx) 1101d5: c7 43 34 01 00 00 00 movl $0x1,0x34(%ebx) 1101dc: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 1101e3: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 1101ea: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx) 1101f1: 00 00 00 api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 1101f4: be b8 15 12 00 mov $0x1215b8,%esi 1101f9: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi 1101ff: b1 07 mov $0x7,%cl 110201: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 110203: 0f b6 05 34 35 12 00 movzbl 0x123534,%eax 11020a: 2b 42 14 sub 0x14(%edx),%eax 11020d: 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; 110213: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 11021a: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 11021d: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 110224: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 110227: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx) 11022e: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 110231: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax 110237: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) the_chain->permanent_null = NULL; 11023d: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 110244: 00 00 00 the_chain->last = _Chain_Head(the_chain); 110247: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax 11024d: 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; 110253: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 11025a: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 11025d: 0f b6 42 0b movzbl 0xb(%edx),%eax 110261: 83 e0 07 and $0x7,%eax 110264: 83 f8 03 cmp $0x3,%eax 110267: 74 53 je 1102bc <_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; 110269: c7 83 cc 00 00 00 ff movl $0xffffffff,0xcc(%ebx) 110270: ff ff ff } _Thread_queue_Initialize( 110273: 6a 00 push $0x0 110275: 68 00 10 00 00 push $0x1000 11027a: 6a 00 push $0x0 11027c: 8d 43 40 lea 0x40(%ebx),%eax 11027f: 50 push %eax 110280: 89 55 e4 mov %edx,-0x1c(%ebp) 110283: e8 dc d9 ff ff call 10dc64 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 110288: 8b 55 e4 mov -0x1c(%ebp),%edx 11028b: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11028e: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx) 110295: 00 00 00 the_watchdog->routine = routine; 110298: c7 83 c0 00 00 00 28 movl $0x110328,0xc0(%ebx) 11029f: 03 11 00 the_watchdog->id = id; 1102a2: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) the_watchdog->user_data = user_data; 1102a8: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx) 1102ae: b0 01 mov $0x1,%al _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 1102b0: 83 c4 10 add $0x10,%esp } 1102b3: 8d 65 f4 lea -0xc(%ebp),%esp 1102b6: 5b pop %ebx 1102b7: 5e pop %esi 1102b8: 5f pop %edi 1102b9: c9 leave 1102ba: c3 ret 1102bb: 90 nop <== NOT EXECUTED #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 1102bc: a1 d8 77 12 00 mov 0x1277d8,%eax 1102c1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 1102c7: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 1102cd: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 1102d3: eb 9e jmp 110273 <_POSIX_Threads_Create_extension+0xf3> 1102d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) 1102d8: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 1102da: 8d 65 f4 lea -0xc(%ebp),%esp 1102dd: 5b pop %ebx 1102de: 5e pop %esi 1102df: 5f pop %edi 1102e0: c9 leave 1102e1: c3 ret 001100f8 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 1100f8: 55 push %ebp 1100f9: 89 e5 mov %esp,%ebp 1100fb: 57 push %edi 1100fc: 56 push %esi 1100fd: 53 push %ebx 1100fe: 83 ec 28 sub $0x28,%esp 110101: 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 ]; 110104: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 11010a: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 11010d: 57 push %edi 11010e: e8 6d 23 00 00 call 112480 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 110113: 89 3c 24 mov %edi,(%esp) 110116: e8 c9 23 00 00 call 1124e4 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 11011b: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 11011e: 8b 5d e4 mov -0x1c(%ebp),%ebx 110121: 83 c3 40 add $0x40,%ebx 110124: 83 c4 10 add $0x10,%esp 110127: eb 08 jmp 110131 <_POSIX_Threads_Delete_extension+0x39> 110129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; 11012c: 8b 40 28 mov 0x28(%eax),%eax 11012f: 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 )) ) 110131: 83 ec 0c sub $0xc,%esp 110134: 53 push %ebx 110135: e8 ae d7 ff ff call 10d8e8 <_Thread_queue_Dequeue> 11013a: 83 c4 10 add $0x10,%esp 11013d: 85 c0 test %eax,%eax 11013f: 75 eb jne 11012c <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 110141: 8b 45 e4 mov -0x1c(%ebp),%eax 110144: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 11014b: 74 1f je 11016c <_POSIX_Threads_Delete_extension+0x74> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 11014d: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 110154: 00 00 00 (void) _Workspace_Free( api ); 110157: 8b 45 e4 mov -0x1c(%ebp),%eax 11015a: 89 45 08 mov %eax,0x8(%ebp) } 11015d: 8d 65 f4 lea -0xc(%ebp),%esp 110160: 5b pop %ebx 110161: 5e pop %esi 110162: 5f pop %edi 110163: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 110164: e9 2f e5 ff ff jmp 10e698 <_Workspace_Free> 110169: 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 ); 11016c: 83 ec 0c sub $0xc,%esp 11016f: 05 a4 00 00 00 add $0xa4,%eax 110174: 50 push %eax 110175: e8 fe e3 ff ff call 10e578 <_Watchdog_Remove> 11017a: 83 c4 10 add $0x10,%esp 11017d: eb ce jmp 11014d <_POSIX_Threads_Delete_extension+0x55> 001100d4 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 1100d4: 55 push %ebp 1100d5: 89 e5 mov %esp,%ebp 1100d7: 83 ec 08 sub $0x8,%esp 1100da: 8b 55 08 mov 0x8(%ebp),%edx /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) 1100dd: 0f b6 42 0b movzbl 0xb(%edx),%eax 1100e1: 83 e0 07 and $0x7,%eax 1100e4: 83 f8 03 cmp $0x3,%eax 1100e7: 74 03 je 1100ec <_POSIX_Threads_Exitted_extension+0x18> pthread_exit( executing->Wait.return_argument ); } 1100e9: c9 leave 1100ea: c3 ret 1100eb: 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 ); 1100ec: 8b 42 28 mov 0x28(%edx),%eax 1100ef: 89 45 08 mov %eax,0x8(%ebp) } 1100f2: 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 ); 1100f3: e9 9c 26 00 00 jmp 112794 00110078 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 110078: 55 push %ebp 110079: 89 e5 mov %esp,%ebp 11007b: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 11007e: a1 98 59 12 00 mov 0x125998,%eax 110083: 85 c0 test %eax,%eax 110085: 74 05 je 11008c <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 110087: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 110088: ff e0 jmp *%eax 11008a: 66 90 xchg %ax,%ax <== NOT EXECUTED } 11008c: c9 leave 11008d: c3 ret 00110328 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 110328: 55 push %ebp 110329: 89 e5 mov %esp,%ebp 11032b: 56 push %esi 11032c: 53 push %ebx 11032d: 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 ]; 110330: 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 ); 110336: 83 ec 0c sub $0xc,%esp 110339: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 11033f: 50 push %eax 110340: e8 77 11 00 00 call 1114bc <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 110345: 89 46 78 mov %eax,0x78(%esi) 110348: 0f b6 05 34 35 12 00 movzbl 0x123534,%eax 11034f: 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; 110355: 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 ) { 110358: 83 c4 10 add $0x10,%esp 11035b: 8b 4e 1c mov 0x1c(%esi),%ecx 11035e: 85 c9 test %ecx,%ecx 110360: 75 05 jne 110367 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 110362: 39 46 14 cmp %eax,0x14(%esi) 110365: 77 35 ja 11039c <_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 ); 110367: 83 ec 0c sub $0xc,%esp 11036a: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 110370: 50 push %eax 110371: e8 46 11 00 00 call 1114bc <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 110376: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11037c: 83 c4 10 add $0x10,%esp 11037f: 81 c3 a4 00 00 00 add $0xa4,%ebx 110385: 89 5d 0c mov %ebx,0xc(%ebp) 110388: c7 45 08 f8 77 12 00 movl $0x1277f8,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 11038f: 8d 65 f8 lea -0x8(%ebp),%esp 110392: 5b pop %ebx 110393: 5e pop %esi 110394: c9 leave 110395: e9 a6 e0 ff ff jmp 10e440 <_Watchdog_Insert> 11039a: 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 ); 11039c: 52 push %edx 11039d: 6a 01 push $0x1 11039f: 50 push %eax 1103a0: 56 push %esi 1103a1: e8 66 cc ff ff call 10d00c <_Thread_Change_priority> 1103a6: 83 c4 10 add $0x10,%esp 1103a9: eb bc jmp 110367 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> 001102e4 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 1102e4: 55 push %ebp 1102e5: 89 e5 mov %esp,%ebp 1102e7: 83 ec 08 sub $0x8,%esp 1102ea: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1102ed: 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 */ 1102f3: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 1102fa: 0f b6 15 34 35 12 00 movzbl 0x123534,%edx 110301: 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; 110307: 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 ) { 11030a: 8b 48 1c mov 0x1c(%eax),%ecx 11030d: 85 c9 test %ecx,%ecx 11030f: 75 05 jne 110316 <_POSIX_Threads_Sporadic_budget_callout+0x32> /* * 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 ) { 110311: 39 50 14 cmp %edx,0x14(%eax) 110314: 72 02 jb 110318 <_POSIX_Threads_Sporadic_budget_callout+0x34> #if 0 printk( "lower priority\n" ); #endif } } } 110316: c9 leave <== NOT EXECUTED 110317: 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 ); 110318: 51 push %ecx 110319: 6a 01 push $0x1 11031b: 52 push %edx 11031c: 50 push %eax 11031d: e8 ea cc ff ff call 10d00c <_Thread_Change_priority> 110322: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 110325: c9 leave 110326: c3 ret 00111088 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 111088: 55 push %ebp 111089: 89 e5 mov %esp,%ebp 11108b: 56 push %esi 11108c: 53 push %ebx 11108d: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 111090: 83 ec 0c sub $0xc,%esp 111093: 53 push %ebx 111094: e8 eb df ff ff call 10f084 <_Watchdog_Remove> _ISR_Disable( level ); 111099: 9c pushf 11109a: fa cli 11109b: 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 ) { 11109c: 83 c4 10 add $0x10,%esp 11109f: 8b 43 08 mov 0x8(%ebx),%eax 1110a2: 85 c0 test %eax,%eax 1110a4: 74 0e je 1110b4 <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 1110a6: 56 push %esi 1110a7: 9d popf 1110a8: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 1110aa: 8d 65 f8 lea -0x8(%ebp),%esp 1110ad: 5b pop %ebx 1110ae: 5e pop %esi 1110af: c9 leave 1110b0: c3 ret 1110b1: 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; 1110b4: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 1110bb: 8b 45 14 mov 0x14(%ebp),%eax 1110be: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 1110c1: 8b 45 10 mov 0x10(%ebp),%eax 1110c4: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 1110c7: 8b 45 18 mov 0x18(%ebp),%eax 1110ca: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1110cd: 8b 45 0c mov 0xc(%ebp),%eax 1110d0: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1110d3: 83 ec 08 sub $0x8,%esp 1110d6: 53 push %ebx 1110d7: 68 f8 95 12 00 push $0x1295f8 1110dc: e8 6b de ff ff call 10ef4c <_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 ); 1110e1: 56 push %esi 1110e2: 9d popf 1110e3: b0 01 mov $0x1,%al return true; 1110e5: 83 c4 10 add $0x10,%esp } 1110e8: 8d 65 f8 lea -0x8(%ebp),%esp 1110eb: 5b pop %ebx 1110ec: 5e pop %esi 1110ed: c9 leave 1110ee: c3 ret 0010b6d4 <_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) { 10b6d4: 55 push %ebp 10b6d5: 89 e5 mov %esp,%ebp 10b6d7: 53 push %ebx 10b6d8: 83 ec 04 sub $0x4,%esp 10b6db: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10b6de: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b6e1: 8b 53 54 mov 0x54(%ebx),%edx 10b6e4: 85 d2 test %edx,%edx 10b6e6: 75 28 jne 10b710 <_POSIX_Timer_TSR+0x3c> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10b6e8: 8b 43 58 mov 0x58(%ebx),%eax 10b6eb: 85 c0 test %eax,%eax 10b6ed: 75 21 jne 10b710 <_POSIX_Timer_TSR+0x3c> /* 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; 10b6ef: 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 ) ) { 10b6f3: 83 ec 08 sub $0x8,%esp 10b6f6: ff 73 44 pushl 0x44(%ebx) 10b6f9: ff 73 38 pushl 0x38(%ebx) 10b6fc: e8 0f 55 00 00 call 110c10 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10b701: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10b708: 83 c4 10 add $0x10,%esp } 10b70b: 8b 5d fc mov -0x4(%ebp),%ebx 10b70e: c9 leave 10b70f: 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( 10b710: 83 ec 0c sub $0xc,%esp 10b713: 53 push %ebx 10b714: 68 d4 b6 10 00 push $0x10b6d4 10b719: ff 73 08 pushl 0x8(%ebx) 10b71c: ff 73 64 pushl 0x64(%ebx) 10b71f: 8d 43 10 lea 0x10(%ebx),%eax 10b722: 50 push %eax 10b723: e8 60 59 00 00 call 111088 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10b728: 83 c4 20 add $0x20,%esp 10b72b: 84 c0 test %al,%al 10b72d: 74 dc je 10b70b <_POSIX_Timer_TSR+0x37> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10b72f: 83 ec 0c sub $0xc,%esp 10b732: 8d 43 6c lea 0x6c(%ebx),%eax 10b735: 50 push %eax 10b736: e8 65 16 00 00 call 10cda0 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b73b: c6 43 3c 03 movb $0x3,0x3c(%ebx) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b73f: 83 c4 10 add $0x10,%esp 10b742: eb af jmp 10b6f3 <_POSIX_Timer_TSR+0x1f> 0011259c <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 11259c: 55 push %ebp 11259d: 89 e5 mov %esp,%ebp 11259f: 57 push %edi 1125a0: 56 push %esi 1125a1: 53 push %ebx 1125a2: 83 ec 48 sub $0x48,%esp 1125a5: 8b 75 08 mov 0x8(%ebp),%esi 1125a8: 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, 1125ab: 6a 01 push $0x1 1125ad: 0f b6 45 10 movzbl 0x10(%ebp),%eax 1125b1: 50 push %eax 1125b2: 8d 7d dc lea -0x24(%ebp),%edi 1125b5: 57 push %edi 1125b6: 53 push %ebx 1125b7: 56 push %esi 1125b8: e8 6b 00 00 00 call 112628 <_POSIX_signals_Clear_signals> 1125bd: 83 c4 20 add $0x20,%esp 1125c0: 84 c0 test %al,%al 1125c2: 74 58 je 11261c <_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 ) 1125c4: 8d 04 5b lea (%ebx,%ebx,2),%eax 1125c7: c1 e0 02 shl $0x2,%eax 1125ca: 8b 90 08 7d 12 00 mov 0x127d08(%eax),%edx 1125d0: 89 55 c4 mov %edx,-0x3c(%ebp) 1125d3: 4a dec %edx 1125d4: 74 46 je 11261c <_POSIX_signals_Check_signal+0x80> return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 1125d6: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 1125dc: 8b 90 04 7d 12 00 mov 0x127d04(%eax),%edx 1125e2: 09 ca or %ecx,%edx 1125e4: 89 96 cc 00 00 00 mov %edx,0xcc(%esi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 1125ea: 83 b8 00 7d 12 00 02 cmpl $0x2,0x127d00(%eax) 1125f1: 74 21 je 112614 <_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 ); 1125f3: 83 ec 0c sub $0xc,%esp 1125f6: 53 push %ebx 1125f7: 89 4d d4 mov %ecx,-0x2c(%ebp) 1125fa: ff 55 c4 call *-0x3c(%ebp) 1125fd: 83 c4 10 add $0x10,%esp 112600: 8b 4d d4 mov -0x2c(%ebp),%ecx } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 112603: 89 8e cc 00 00 00 mov %ecx,0xcc(%esi) 112609: b0 01 mov $0x1,%al return true; } 11260b: 8d 65 f4 lea -0xc(%ebp),%esp 11260e: 5b pop %ebx 11260f: 5e pop %esi 112610: 5f pop %edi 112611: c9 leave 112612: c3 ret 112613: 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)( 112614: 50 push %eax 112615: 6a 00 push $0x0 112617: 57 push %edi 112618: eb dc jmp 1125f6 <_POSIX_signals_Check_signal+0x5a> 11261a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 11261c: 31 c0 xor %eax,%eax } 11261e: 8d 65 f4 lea -0xc(%ebp),%esp 112621: 5b pop %ebx 112622: 5e pop %esi 112623: 5f pop %edi 112624: c9 leave 112625: c3 ret 001135b0 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 1135b0: 55 push %ebp 1135b1: 89 e5 mov %esp,%ebp 1135b3: 53 push %ebx 1135b4: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 1135b7: 9c pushf 1135b8: fa cli 1135b9: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 1135ba: 8d 04 49 lea (%ecx,%ecx,2),%eax 1135bd: c1 e0 02 shl $0x2,%eax 1135c0: 83 b8 00 7d 12 00 02 cmpl $0x2,0x127d00(%eax) 1135c7: 74 23 je 1135ec <_POSIX_signals_Clear_process_signals+0x3c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 1135c9: 49 dec %ecx 1135ca: b8 fe ff ff ff mov $0xfffffffe,%eax 1135cf: d3 c0 rol %cl,%eax 1135d1: 23 05 e0 7e 12 00 and 0x127ee0,%eax 1135d7: a3 e0 7e 12 00 mov %eax,0x127ee0 if ( !_POSIX_signals_Pending ) 1135dc: 85 c0 test %eax,%eax 1135de: 75 06 jne 1135e6 <_POSIX_signals_Clear_process_signals+0x36> _Thread_Do_post_task_switch_extension--; 1135e0: ff 0d bc 77 12 00 decl 0x1277bc } _ISR_Enable( level ); 1135e6: 52 push %edx 1135e7: 9d popf } 1135e8: 5b pop %ebx 1135e9: c9 leave 1135ea: c3 ret 1135eb: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1135ec: 8d 98 04 7f 12 00 lea 0x127f04(%eax),%ebx 1135f2: 39 98 00 7f 12 00 cmp %ebx,0x127f00(%eax) 1135f8: 75 ec jne 1135e6 <_POSIX_signals_Clear_process_signals+0x36> 1135fa: eb cd jmp 1135c9 <_POSIX_signals_Clear_process_signals+0x19> 00112628 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 112628: 55 push %ebp 112629: 89 e5 mov %esp,%ebp 11262b: 57 push %edi 11262c: 56 push %esi 11262d: 53 push %ebx 11262e: 83 ec 1c sub $0x1c,%esp 112631: 8b 5d 0c mov 0xc(%ebp),%ebx 112634: 0f b6 7d 14 movzbl 0x14(%ebp),%edi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 112638: 8d 4b ff lea -0x1(%ebx),%ecx 11263b: b8 01 00 00 00 mov $0x1,%eax 112640: 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 ) 112642: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 112646: 75 3c jne 112684 <_POSIX_signals_Clear_signals+0x5c> 112648: b9 ff ff ff ff mov $0xffffffff,%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 ); 11264d: 9c pushf 11264e: fa cli 11264f: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 112652: 89 fa mov %edi,%edx 112654: 84 d2 test %dl,%dl 112656: 74 3c je 112694 <_POSIX_signals_Clear_signals+0x6c> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 112658: 23 05 e0 7e 12 00 and 0x127ee0,%eax 11265e: 85 c8 test %ecx,%eax 112660: 74 5e je 1126c0 <_POSIX_signals_Clear_signals+0x98> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 112662: 8d 14 5b lea (%ebx,%ebx,2),%edx 112665: c1 e2 02 shl $0x2,%edx 112668: 83 ba 00 7d 12 00 02 cmpl $0x2,0x127d00(%edx) 11266f: 74 53 je 1126c4 <_POSIX_signals_Clear_signals+0x9c> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 112671: 83 ec 0c sub $0xc,%esp 112674: 53 push %ebx 112675: e8 36 0f 00 00 call 1135b0 <_POSIX_signals_Clear_process_signals> 11267a: b0 01 mov $0x1,%al 11267c: 83 c4 10 add $0x10,%esp 11267f: eb 30 jmp 1126b1 <_POSIX_signals_Clear_signals+0x89> 112681: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 112684: 8b 55 08 mov 0x8(%ebp),%edx 112687: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx 11268d: f7 d1 not %ecx 11268f: eb bc jmp 11264d <_POSIX_signals_Clear_signals+0x25> 112691: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 112694: 8b 55 08 mov 0x8(%ebp),%edx 112697: 8b 9a d0 00 00 00 mov 0xd0(%edx),%ebx 11269d: 89 c6 mov %eax,%esi 11269f: 21 de and %ebx,%esi 1126a1: 85 ce test %ecx,%esi 1126a3: 74 1b je 1126c0 <_POSIX_signals_Clear_signals+0x98> api->signals_pending &= ~mask; 1126a5: f7 d0 not %eax 1126a7: 21 d8 and %ebx,%eax 1126a9: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) 1126af: b0 01 mov $0x1,%al do_callout = true; } } _ISR_Enable( level ); 1126b1: ff 75 e4 pushl -0x1c(%ebp) 1126b4: 9d popf return do_callout; } 1126b5: 8d 65 f4 lea -0xc(%ebp),%esp 1126b8: 5b pop %ebx 1126b9: 5e pop %esi 1126ba: 5f pop %edi 1126bb: c9 leave 1126bc: c3 ret 1126bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 1126c0: 31 c0 xor %eax,%eax 1126c2: eb ed jmp 1126b1 <_POSIX_signals_Clear_signals+0x89> _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 *) 1126c4: 8d 8a 00 7f 12 00 lea 0x127f00(%edx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1126ca: 8b 82 00 7f 12 00 mov 0x127f00(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1126d0: 8d 71 04 lea 0x4(%ecx),%esi 1126d3: 39 f0 cmp %esi,%eax 1126d5: 74 45 je 11271c <_POSIX_signals_Clear_signals+0xf4> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 1126d7: 8b 30 mov (%eax),%esi the_chain->first = new_first; 1126d9: 89 b2 00 7f 12 00 mov %esi,0x127f00(%edx) new_first->previous = _Chain_Head(the_chain); 1126df: 89 4e 04 mov %ecx,0x4(%esi) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 1126e2: 83 ec 0c sub $0xc,%esp 1126e5: 53 push %ebx 1126e6: 89 45 e0 mov %eax,-0x20(%ebp) 1126e9: e8 c2 0e 00 00 call 1135b0 <_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; 1126ee: 8b 45 e0 mov -0x20(%ebp),%eax 1126f1: 8d 70 08 lea 0x8(%eax),%esi 1126f4: b9 03 00 00 00 mov $0x3,%ecx 1126f9: 8b 7d 10 mov 0x10(%ebp),%edi 1126fc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1126fe: c7 00 84 7e 12 00 movl $0x127e84,(%eax) old_last_node = the_chain->last; 112704: 8b 15 88 7e 12 00 mov 0x127e88,%edx the_chain->last = the_node; 11270a: a3 88 7e 12 00 mov %eax,0x127e88 old_last_node->next = the_node; 11270f: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 112711: 89 50 04 mov %edx,0x4(%eax) 112714: 83 c4 10 add $0x10,%esp 112717: e9 55 ff ff ff jmp 112671 <_POSIX_signals_Clear_signals+0x49> 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 ); 11271c: 83 ec 0c sub $0xc,%esp 11271f: 53 push %ebx 112720: e8 8b 0e 00 00 call 1135b0 <_POSIX_signals_Clear_process_signals> 112725: 83 c4 10 add $0x10,%esp 112728: e9 44 ff ff ff jmp 112671 <_POSIX_signals_Clear_signals+0x49> 00113620 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 113620: 55 push %ebp 113621: 89 e5 mov %esp,%ebp 113623: 57 push %edi 113624: 56 push %esi 113625: 53 push %ebx 113626: 83 ec 0c sub $0xc,%esp 113629: 8b 5d 08 mov 0x8(%ebp),%ebx 11362c: 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 ]; 11362f: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 113635: 8d 4a ff lea -0x1(%edx),%ecx 113638: b8 01 00 00 00 mov $0x1,%eax 11363d: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 11363f: 8b 4b 10 mov 0x10(%ebx),%ecx 113642: 89 cf mov %ecx,%edi 113644: 81 e7 00 80 00 10 and $0x10008000,%edi 11364a: 81 ff 00 80 00 10 cmp $0x10008000,%edi 113650: 74 6e je 1136c0 <_POSIX_signals_Unblock_thread+0xa0> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 113652: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 113658: f7 d2 not %edx 11365a: 85 d0 test %edx,%eax 11365c: 74 56 je 1136b4 <_POSIX_signals_Unblock_thread+0x94> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 11365e: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 113662: f7 c1 00 00 00 10 test $0x10000000,%ecx 113668: 74 32 je 11369c <_POSIX_signals_Unblock_thread+0x7c> the_thread->Wait.return_code = EINTR; 11366a: 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) ){ 113671: 83 e1 08 and $0x8,%ecx 113674: 74 3e je 1136b4 <_POSIX_signals_Unblock_thread+0x94> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 113676: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11367a: 0f 84 a8 00 00 00 je 113728 <_POSIX_signals_Unblock_thread+0x108> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 113680: 83 ec 08 sub $0x8,%esp 113683: 68 f8 ff 03 10 push $0x1003fff8 113688: 53 push %ebx 113689: e8 be 9a ff ff call 10d14c <_Thread_Clear_state> 11368e: 31 c0 xor %eax,%eax 113690: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 113693: 8d 65 f4 lea -0xc(%ebp),%esp 113696: 5b pop %ebx 113697: 5e pop %esi 113698: 5f pop %edi 113699: c9 leave 11369a: c3 ret 11369b: 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 ) { 11369c: 85 c9 test %ecx,%ecx 11369e: 75 14 jne 1136b4 <_POSIX_signals_Unblock_thread+0x94> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1136a0: a1 b4 77 12 00 mov 0x1277b4,%eax 1136a5: 85 c0 test %eax,%eax 1136a7: 74 0b je 1136b4 <_POSIX_signals_Unblock_thread+0x94> 1136a9: 3b 1d d8 77 12 00 cmp 0x1277d8,%ebx 1136af: 74 6b je 11371c <_POSIX_signals_Unblock_thread+0xfc> 1136b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Signals_to_thread_executing = true; 1136b4: 31 c0 xor %eax,%eax } } return false; } 1136b6: 8d 65 f4 lea -0xc(%ebp),%esp 1136b9: 5b pop %ebx 1136ba: 5e pop %esi 1136bb: 5f pop %edi 1136bc: c9 leave 1136bd: c3 ret 1136be: 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) ) { 1136c0: 85 43 30 test %eax,0x30(%ebx) 1136c3: 74 33 je 1136f8 <_POSIX_signals_Unblock_thread+0xd8> the_thread->Wait.return_code = EINTR; 1136c5: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 1136cc: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 1136cf: 8b 4d 10 mov 0x10(%ebp),%ecx 1136d2: 85 c9 test %ecx,%ecx 1136d4: 74 32 je 113708 <_POSIX_signals_Unblock_thread+0xe8> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 1136d6: b9 03 00 00 00 mov $0x3,%ecx 1136db: 89 c7 mov %eax,%edi 1136dd: 8b 75 10 mov 0x10(%ebp),%esi 1136e0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 1136e2: 83 ec 0c sub $0xc,%esp 1136e5: 53 push %ebx 1136e6: e8 21 a5 ff ff call 10dc0c <_Thread_queue_Extract_with_proxy> 1136eb: b0 01 mov $0x1,%al return true; 1136ed: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 1136f0: 8d 65 f4 lea -0xc(%ebp),%esp 1136f3: 5b pop %ebx 1136f4: 5e pop %esi 1136f5: 5f pop %edi 1136f6: c9 leave 1136f7: 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) ) { 1136f8: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 1136fe: f7 d1 not %ecx 113700: 85 c8 test %ecx,%eax 113702: 75 c1 jne 1136c5 <_POSIX_signals_Unblock_thread+0xa5> 113704: eb ae jmp 1136b4 <_POSIX_signals_Unblock_thread+0x94> 113706: 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; 113708: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 11370a: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 113711: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 113718: eb c8 jmp 1136e2 <_POSIX_signals_Unblock_thread+0xc2> 11371a: 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 ) ) _ISR_Signals_to_thread_executing = true; 11371c: c6 05 88 78 12 00 01 movb $0x1,0x127888 113723: 31 c0 xor %eax,%eax 113725: eb 8f jmp 1136b6 <_POSIX_signals_Unblock_thread+0x96> 113727: 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 ); 113728: 83 ec 0c sub $0xc,%esp 11372b: 8d 43 48 lea 0x48(%ebx),%eax 11372e: 50 push %eax 11372f: e8 44 ae ff ff call 10e578 <_Watchdog_Remove> 113734: 83 c4 10 add $0x10,%esp 113737: e9 44 ff ff ff jmp 113680 <_POSIX_signals_Unblock_thread+0x60> 0012f024 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 12f024: 55 push %ebp 12f025: 89 e5 mov %esp,%ebp 12f027: 56 push %esi 12f028: 53 push %ebx 12f029: 8b 5d 08 mov 0x8(%ebp),%ebx 12f02c: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 12f02f: 85 db test %ebx,%ebx 12f031: 74 35 je 12f068 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 12f033: 85 f6 test %esi,%esi 12f035: 74 31 je 12f068 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 12f037: 83 ec 0c sub $0xc,%esp 12f03a: ff 35 b0 ef 16 00 pushl 0x16efb0 12f040: e8 43 2d fe ff call 111d88 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 12f045: 5a pop %edx 12f046: 59 pop %ecx 12f047: 56 push %esi 12f048: 53 push %ebx 12f049: e8 7a ee 00 00 call 13dec8 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 12f04e: 58 pop %eax 12f04f: ff 35 b0 ef 16 00 pushl 0x16efb0 12f055: e8 76 2d fe ff call 111dd0 <_API_Mutex_Unlock> 12f05a: b0 01 mov $0x1,%al return true; 12f05c: 83 c4 10 add $0x10,%esp } 12f05f: 8d 65 f8 lea -0x8(%ebp),%esp 12f062: 5b pop %ebx 12f063: 5e pop %esi 12f064: c9 leave 12f065: c3 ret 12f066: 66 90 xchg %ax,%ax <== NOT EXECUTED _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 12f068: 31 c0 xor %eax,%eax } 12f06a: 8d 65 f8 lea -0x8(%ebp),%esp 12f06d: 5b pop %ebx 12f06e: 5e pop %esi 12f06f: c9 leave 12f070: c3 ret 00110798 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110798: 55 push %ebp 110799: 89 e5 mov %esp,%ebp 11079b: 56 push %esi 11079c: 53 push %ebx 11079d: 83 ec 10 sub $0x10,%esp 1107a0: 8b 5d 08 mov 0x8(%ebp),%ebx 1107a3: 8b 75 0c mov 0xc(%ebp),%esi 1107a6: 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 ) { 1107a9: 8b 15 98 e1 12 00 mov 0x12e198,%edx 1107af: 85 d2 test %edx,%edx 1107b1: 74 19 je 1107cc <_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 ); 1107b3: 0f b6 c0 movzbl %al,%eax 1107b6: 89 45 10 mov %eax,0x10(%ebp) 1107b9: 89 75 0c mov %esi,0xc(%ebp) 1107bc: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 1107bf: 8d 65 f8 lea -0x8(%ebp),%esp 1107c2: 5b pop %ebx 1107c3: 5e pop %esi 1107c4: 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 ); 1107c5: e9 f2 f1 ff ff jmp 10f9bc <_Heap_Walk> 1107ca: 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(); 1107cc: 83 ec 0c sub $0xc,%esp 1107cf: ff 35 50 e2 12 00 pushl 0x12e250 1107d5: 88 45 f4 mov %al,-0xc(%ebp) 1107d8: e8 eb e3 ff ff call 10ebc8 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 1107dd: 83 c4 0c add $0xc,%esp 1107e0: 8a 45 f4 mov -0xc(%ebp),%al 1107e3: 0f b6 c0 movzbl %al,%eax 1107e6: 50 push %eax 1107e7: 56 push %esi 1107e8: 53 push %ebx 1107e9: e8 ce f1 ff ff call 10f9bc <_Heap_Walk> _RTEMS_Unlock_allocator(); 1107ee: 5a pop %edx 1107ef: ff 35 50 e2 12 00 pushl 0x12e250 1107f5: 88 45 f4 mov %al,-0xc(%ebp) 1107f8: e8 13 e4 ff ff call 10ec10 <_API_Mutex_Unlock> 1107fd: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110800: 8a 45 f4 mov -0xc(%ebp),%al 110803: 8d 65 f8 lea -0x8(%ebp),%esp 110806: 5b pop %ebx 110807: 5e pop %esi 110808: c9 leave 110809: c3 ret 00110754 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 110754: 55 push %ebp 110755: 89 e5 mov %esp,%ebp 110757: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 11075a: a1 80 35 12 00 mov 0x123580,%eax 11075f: 85 c0 test %eax,%eax 110761: 74 05 je 110768 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 110763: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 110764: ff e0 jmp *%eax 110766: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110768: c9 leave 110769: c3 ret 0013d964 <_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 ) { 13d964: 55 push %ebp 13d965: 89 e5 mov %esp,%ebp 13d967: 57 push %edi 13d968: 56 push %esi 13d969: 53 push %ebx 13d96a: 83 ec 38 sub $0x38,%esp 13d96d: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 13d970: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 13d973: 8d 75 e0 lea -0x20(%ebp),%esi 13d976: 56 push %esi 13d977: e8 c8 10 ff ff call 12ea44 <_TOD_Get_uptime> _Timestamp_Subtract( 13d97c: 83 c4 0c add $0xc,%esp 13d97f: ff 75 0c pushl 0xc(%ebp) 13d982: 56 push %esi 13d983: 8d 43 4c lea 0x4c(%ebx),%eax 13d986: 50 push %eax 13d987: e8 08 6c fd ff call 114594 <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 13d98c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 13d992: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 13d998: 89 45 d8 mov %eax,-0x28(%ebp) 13d99b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13d99e: 83 c4 10 add $0x10,%esp 13d9a1: 3b 3d b8 ef 16 00 cmp 0x16efb8,%edi 13d9a7: 74 0b je 13d9b4 <_Rate_monotonic_Get_status+0x50> 13d9a9: b0 01 mov $0x1,%al return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 13d9ab: 8d 65 f4 lea -0xc(%ebp),%esp 13d9ae: 5b pop %ebx 13d9af: 5e pop %esi 13d9b0: 5f pop %edi 13d9b1: c9 leave 13d9b2: c3 ret 13d9b3: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 13d9b4: 57 push %edi 13d9b5: 8d 7d d0 lea -0x30(%ebp),%edi 13d9b8: 57 push %edi 13d9b9: 56 push %esi 13d9ba: 68 c0 ef 16 00 push $0x16efc0 13d9bf: e8 d0 6b fd ff call 114594 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 13d9c4: 59 pop %ecx 13d9c5: 5e pop %esi 13d9c6: 57 push %edi 13d9c7: 8d 75 d8 lea -0x28(%ebp),%esi 13d9ca: 56 push %esi 13d9cb: e8 88 6b fd ff call 114558 <_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)) 13d9d0: 83 c3 44 add $0x44,%ebx 13d9d3: 58 pop %eax 13d9d4: 5a pop %edx 13d9d5: 53 push %ebx 13d9d6: 56 push %esi 13d9d7: e8 dc 06 00 00 call 13e0b8 <_Timespec_Less_than> 13d9dc: 83 c4 10 add $0x10,%esp 13d9df: 84 c0 test %al,%al 13d9e1: 74 05 je 13d9e8 <_Rate_monotonic_Get_status+0x84> 13d9e3: 31 c0 xor %eax,%eax 13d9e5: eb c4 jmp 13d9ab <_Rate_monotonic_Get_status+0x47> 13d9e7: 90 nop <== NOT EXECUTED return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 13d9e8: 57 push %edi 13d9e9: ff 75 10 pushl 0x10(%ebp) 13d9ec: 56 push %esi 13d9ed: 53 push %ebx 13d9ee: e8 a1 6b fd ff call 114594 <_Timespec_Subtract> 13d9f3: b0 01 mov $0x1,%al 13d9f5: 83 c4 10 add $0x10,%esp 13d9f8: eb b1 jmp 13d9ab <_Rate_monotonic_Get_status+0x47> 0013d8f0 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 13d8f0: 55 push %ebp 13d8f1: 89 e5 mov %esp,%ebp 13d8f3: 57 push %edi 13d8f4: 56 push %esi 13d8f5: 53 push %ebx 13d8f6: 83 ec 28 sub $0x28,%esp 13d8f9: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 13d8fc: 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 ); 13d8ff: 8d 7d e0 lea -0x20(%ebp),%edi 13d902: 57 push %edi 13d903: e8 3c 11 ff ff call 12ea44 <_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; 13d908: 8b 45 e0 mov -0x20(%ebp),%eax 13d90b: 8b 55 e4 mov -0x1c(%ebp),%edx 13d90e: 89 43 4c mov %eax,0x4c(%ebx) 13d911: 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; 13d914: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 13d91a: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 13d920: 89 43 44 mov %eax,0x44(%ebx) 13d923: 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) { 13d926: 83 c4 10 add $0x10,%esp 13d929: 3b 35 b8 ef 16 00 cmp 0x16efb8,%esi 13d92f: 74 0b je 13d93c <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 13d931: 8d 65 f4 lea -0xc(%ebp),%esp 13d934: 5b pop %ebx 13d935: 5e pop %esi 13d936: 5f pop %edi 13d937: c9 leave 13d938: c3 ret 13d939: 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( 13d93c: 51 push %ecx 13d93d: 8d 75 d8 lea -0x28(%ebp),%esi 13d940: 56 push %esi 13d941: 57 push %edi 13d942: 68 c0 ef 16 00 push $0x16efc0 13d947: e8 48 6c fd ff call 114594 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 13d94c: 58 pop %eax 13d94d: 5a pop %edx 13d94e: 56 push %esi 13d94f: 83 c3 44 add $0x44,%ebx 13d952: 53 push %ebx 13d953: e8 00 6c fd ff call 114558 <_Timespec_Add_to> 13d958: 83 c4 10 add $0x10,%esp } #endif } 13d95b: 8d 65 f4 lea -0xc(%ebp),%esp 13d95e: 5b pop %ebx 13d95f: 5e pop %esi 13d960: 5f pop %edi 13d961: c9 leave 13d962: c3 ret 0013dc9c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13dc9c: 55 push %ebp 13dc9d: 89 e5 mov %esp,%ebp 13dc9f: 83 ec 2c sub $0x2c,%esp 13dca2: 8d 45 f4 lea -0xc(%ebp),%eax 13dca5: 50 push %eax 13dca6: ff 75 08 pushl 0x8(%ebp) 13dca9: 68 a0 fb 16 00 push $0x16fba0 13dcae: e8 41 53 fd ff call 112ff4 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13dcb3: 83 c4 10 add $0x10,%esp 13dcb6: 8b 55 f4 mov -0xc(%ebp),%edx 13dcb9: 85 d2 test %edx,%edx 13dcbb: 75 29 jne 13dce6 <_Rate_monotonic_Timeout+0x4a> case OBJECTS_LOCAL: the_thread = the_period->owner; 13dcbd: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13dcc0: f6 42 11 40 testb $0x40,0x11(%edx) 13dcc4: 74 08 je 13dcce <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 13dcc6: 8b 4a 20 mov 0x20(%edx),%ecx 13dcc9: 3b 48 08 cmp 0x8(%eax),%ecx 13dccc: 74 4e je 13dd1c <_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 ) { 13dcce: 83 78 38 01 cmpl $0x1,0x38(%eax) 13dcd2: 74 14 je 13dce8 <_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; 13dcd4: 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; 13dcdb: a1 f8 ee 16 00 mov 0x16eef8,%eax 13dce0: 48 dec %eax 13dce1: a3 f8 ee 16 00 mov %eax,0x16eef8 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13dce6: c9 leave 13dce7: 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; 13dce8: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 13dcef: 83 ec 0c sub $0xc,%esp 13dcf2: 50 push %eax 13dcf3: 89 45 e4 mov %eax,-0x1c(%ebp) 13dcf6: e8 f5 fb ff ff call 13d8f0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13dcfb: 8b 45 e4 mov -0x1c(%ebp),%eax 13dcfe: 8b 50 3c mov 0x3c(%eax),%edx 13dd01: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13dd04: 5a pop %edx 13dd05: 59 pop %ecx 13dd06: 83 c0 10 add $0x10,%eax 13dd09: 50 push %eax 13dd0a: 68 d8 ef 16 00 push $0x16efd8 13dd0f: e8 50 6b fd ff call 114864 <_Watchdog_Insert> 13dd14: 83 c4 10 add $0x10,%esp 13dd17: eb c2 jmp 13dcdb <_Rate_monotonic_Timeout+0x3f> 13dd19: 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 ); 13dd1c: 83 ec 08 sub $0x8,%esp 13dd1f: 68 f8 ff 03 10 push $0x1003fff8 13dd24: 52 push %edx 13dd25: 89 45 e4 mov %eax,-0x1c(%ebp) 13dd28: e8 43 58 fd ff call 113570 <_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 ); 13dd2d: 8b 45 e4 mov -0x1c(%ebp),%eax 13dd30: 89 04 24 mov %eax,(%esp) 13dd33: eb c1 jmp 13dcf6 <_Rate_monotonic_Timeout+0x5a> 0013d9fc <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13d9fc: 55 push %ebp 13d9fd: 89 e5 mov %esp,%ebp 13d9ff: 57 push %edi 13da00: 56 push %esi 13da01: 53 push %ebx 13da02: 83 ec 1c sub $0x1c,%esp 13da05: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 13da08: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 13da0b: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 13da0f: 0f 84 bf 00 00 00 je 13dad4 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 13da15: 52 push %edx 13da16: 8d 7d e0 lea -0x20(%ebp),%edi 13da19: 57 push %edi 13da1a: 8d 75 d8 lea -0x28(%ebp),%esi 13da1d: 56 push %esi 13da1e: 53 push %ebx 13da1f: e8 40 ff ff ff call 13d964 <_Rate_monotonic_Get_status> if (!valid_status) 13da24: 83 c4 10 add $0x10,%esp 13da27: 84 c0 test %al,%al 13da29: 75 09 jne 13da34 <_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 } 13da2b: 8d 65 f4 lea -0xc(%ebp),%esp 13da2e: 5b pop %ebx 13da2f: 5e pop %esi 13da30: 5f pop %edi 13da31: c9 leave 13da32: c3 ret 13da33: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13da34: 83 ec 08 sub $0x8,%esp 13da37: 57 push %edi 13da38: 8d 43 6c lea 0x6c(%ebx),%eax 13da3b: 50 push %eax 13da3c: e8 17 6b fd ff call 114558 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 13da41: 59 pop %ecx 13da42: 58 pop %eax 13da43: 8d 43 5c lea 0x5c(%ebx),%eax 13da46: 50 push %eax 13da47: 57 push %edi 13da48: e8 6b 06 00 00 call 13e0b8 <_Timespec_Less_than> 13da4d: 83 c4 10 add $0x10,%esp 13da50: 84 c0 test %al,%al 13da52: 74 0c je 13da60 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 13da54: 8b 45 e0 mov -0x20(%ebp),%eax 13da57: 8b 55 e4 mov -0x1c(%ebp),%edx 13da5a: 89 43 5c mov %eax,0x5c(%ebx) 13da5d: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 13da60: 83 ec 08 sub $0x8,%esp 13da63: 8d 43 64 lea 0x64(%ebx),%eax 13da66: 50 push %eax 13da67: 57 push %edi 13da68: e8 27 06 00 00 call 13e094 <_Timespec_Greater_than> 13da6d: 83 c4 10 add $0x10,%esp 13da70: 84 c0 test %al,%al 13da72: 74 0c je 13da80 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 13da74: 8b 45 e0 mov -0x20(%ebp),%eax 13da77: 8b 55 e4 mov -0x1c(%ebp),%edx 13da7a: 89 43 64 mov %eax,0x64(%ebx) 13da7d: 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 ); 13da80: 83 ec 08 sub $0x8,%esp 13da83: 56 push %esi 13da84: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 13da8a: 50 push %eax 13da8b: e8 c8 6a fd ff call 114558 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 13da90: 58 pop %eax 13da91: 5a pop %edx 13da92: 8d 43 74 lea 0x74(%ebx),%eax 13da95: 50 push %eax 13da96: 56 push %esi 13da97: e8 1c 06 00 00 call 13e0b8 <_Timespec_Less_than> 13da9c: 83 c4 10 add $0x10,%esp 13da9f: 84 c0 test %al,%al 13daa1: 75 39 jne 13dadc <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 13daa3: 83 ec 08 sub $0x8,%esp 13daa6: 8d 43 7c lea 0x7c(%ebx),%eax 13daa9: 50 push %eax 13daaa: 56 push %esi 13daab: e8 e4 05 00 00 call 13e094 <_Timespec_Greater_than> 13dab0: 83 c4 10 add $0x10,%esp 13dab3: 84 c0 test %al,%al 13dab5: 0f 84 70 ff ff ff je 13da2b <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 13dabb: 8b 45 d8 mov -0x28(%ebp),%eax 13dabe: 8b 55 dc mov -0x24(%ebp),%edx 13dac1: 89 43 7c mov %eax,0x7c(%ebx) 13dac4: 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 } 13daca: 8d 65 f4 lea -0xc(%ebp),%esp 13dacd: 5b pop %ebx 13dace: 5e pop %esi 13dacf: 5f pop %edi 13dad0: c9 leave 13dad1: c3 ret 13dad2: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 13dad4: ff 43 58 incl 0x58(%ebx) 13dad7: e9 39 ff ff ff jmp 13da15 <_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; 13dadc: 8b 45 d8 mov -0x28(%ebp),%eax 13dadf: 8b 55 dc mov -0x24(%ebp),%edx 13dae2: 89 43 74 mov %eax,0x74(%ebx) 13dae5: 89 53 78 mov %edx,0x78(%ebx) 13dae8: eb b9 jmp 13daa3 <_Rate_monotonic_Update_statistics+0xa7> 0010d90c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10d90c: 55 push %ebp 10d90d: 89 e5 mov %esp,%ebp 10d90f: 53 push %ebx 10d910: 83 ec 04 sub $0x4,%esp 10d913: 8b 5d 08 mov 0x8(%ebp),%ebx 10d916: a1 38 22 13 00 mov 0x132238,%eax 10d91b: 40 inc %eax 10d91c: a3 38 22 13 00 mov %eax,0x132238 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10d921: a1 cc 22 13 00 mov 0x1322cc,%eax if ( time->tv_sec < seconds ) 10d926: 8b 13 mov (%ebx),%edx 10d928: 39 d0 cmp %edx,%eax 10d92a: 7f 34 jg 10d960 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10d92c: 51 push %ecx 10d92d: 29 c2 sub %eax,%edx 10d92f: 52 push %edx 10d930: 6a 00 push $0x0 10d932: 68 0c 23 13 00 push $0x13230c 10d937: e8 dc 24 00 00 call 10fe18 <_Watchdog_Adjust> 10d93c: 83 c4 10 add $0x10,%esp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10d93f: 8b 03 mov (%ebx),%eax 10d941: a3 cc 22 13 00 mov %eax,0x1322cc 10d946: 8b 43 04 mov 0x4(%ebx),%eax 10d949: a3 d0 22 13 00 mov %eax,0x1322d0 _TOD_Is_set = true; 10d94e: c6 05 4c 22 13 00 01 movb $0x1,0x13224c _TOD_Activate(); _Thread_Enable_dispatch(); } 10d955: 8b 5d fc mov -0x4(%ebp),%ebx 10d958: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10d959: e9 c2 12 00 00 jmp 10ec20 <_Thread_Enable_dispatch> 10d95e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d960: 51 push %ecx 10d961: 29 d0 sub %edx,%eax 10d963: 50 push %eax 10d964: 6a 01 push $0x1 10d966: 68 0c 23 13 00 push $0x13230c 10d96b: e8 a8 24 00 00 call 10fe18 <_Watchdog_Adjust> 10d970: 83 c4 10 add $0x10,%esp 10d973: eb ca jmp 10d93f <_TOD_Set+0x33> 0010c05c <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c05c: 55 push %ebp 10c05d: 89 e5 mov %esp,%ebp 10c05f: 56 push %esi 10c060: 53 push %ebx 10c061: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c064: 8b 72 08 mov 0x8(%edx),%esi 10c067: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c068: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c06a: 89 c3 mov %eax,%ebx 10c06c: 83 e3 03 and $0x3,%ebx 10c06f: 74 67 je 10c0d8 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c071: 8b 4a 04 mov 0x4(%edx),%ecx 10c074: 0f b7 8c 09 40 38 12 movzwl 0x123840(%ecx,%ecx,1),%ecx 10c07b: 00 10c07c: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c07f: 0f b7 8c 1b 74 38 12 movzwl 0x123874(%ebx,%ebx,1),%ecx 10c086: 00 10c087: 2d c4 07 00 00 sub $0x7c4,%eax 10c08c: c1 e8 02 shr $0x2,%eax 10c08f: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c092: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c095: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c098: 8d 04 98 lea (%eax,%ebx,4),%eax 10c09b: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c09d: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c09f: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c0a2: 8d 04 81 lea (%ecx,%eax,4),%eax 10c0a5: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c0a8: c1 e0 02 shl $0x2,%eax 10c0ab: 29 c8 sub %ecx,%eax 10c0ad: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c0b0: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c0b3: 8b 4a 0c mov 0xc(%edx),%ecx 10c0b6: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c0b9: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c0bc: c1 e1 02 shl $0x2,%ecx 10c0bf: 03 4a 10 add 0x10(%edx),%ecx 10c0c2: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c0c5: 8d 14 92 lea (%edx,%edx,4),%edx 10c0c8: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c0cf: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c0d2: 5b pop %ebx 10c0d3: 5e pop %esi 10c0d4: c9 leave 10c0d5: c3 ret 10c0d6: 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 ]; 10c0d8: 8b 4a 04 mov 0x4(%edx),%ecx 10c0db: 0f b7 8c 09 5a 38 12 movzwl 0x12385a(%ecx,%ecx,1),%ecx 10c0e2: 00 10c0e3: 8d 34 31 lea (%ecx,%esi,1),%esi 10c0e6: eb 97 jmp 10c07f <_TOD_To_seconds+0x23> 0010c0e8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 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(); 10c0ef: 8b 1d 2c 62 12 00 mov 0x12622c,%ebx if ((!the_tod) || 10c0f5: 85 c9 test %ecx,%ecx 10c0f7: 74 53 je 10c14c <_TOD_Validate+0x64> 10c0f9: b8 40 42 0f 00 mov $0xf4240,%eax 10c0fe: 31 d2 xor %edx,%edx 10c100: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c102: 3b 41 18 cmp 0x18(%ecx),%eax 10c105: 76 45 jbe 10c14c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c107: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c10b: 77 3f ja 10c14c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c10d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c111: 77 39 ja 10c14c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c113: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c117: 77 33 ja 10c14c <_TOD_Validate+0x64> (the_tod->month == 0) || 10c119: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c11c: 85 c0 test %eax,%eax 10c11e: 74 2c je 10c14c <_TOD_Validate+0x64> 10c120: 83 f8 0c cmp $0xc,%eax 10c123: 77 27 ja 10c14c <_TOD_Validate+0x64> (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) || 10c125: 8b 11 mov (%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c127: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c12d: 76 1d jbe 10c14c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c12f: 8b 49 08 mov 0x8(%ecx),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c132: 85 c9 test %ecx,%ecx 10c134: 74 16 je 10c14c <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c136: 83 e2 03 and $0x3,%edx 10c139: 75 16 jne 10c151 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c13b: 8b 04 85 b4 38 12 00 mov 0x1238b4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c142: 39 c8 cmp %ecx,%eax 10c144: 0f 93 c0 setae %al 10c147: eb 05 jmp 10c14e <_TOD_Validate+0x66> 10c149: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c14c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c14e: 5b pop %ebx 10c14f: c9 leave 10c150: 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 ]; 10c151: 8b 04 85 80 38 12 00 mov 0x123880(,%eax,4),%eax 10c158: eb e8 jmp 10c142 <_TOD_Validate+0x5a> 0010d00c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d00c: 55 push %ebp 10d00d: 89 e5 mov %esp,%ebp 10d00f: 57 push %edi 10d010: 56 push %esi 10d011: 53 push %ebx 10d012: 83 ec 28 sub $0x28,%esp 10d015: 8b 5d 08 mov 0x8(%ebp),%ebx 10d018: 8b 75 0c mov 0xc(%ebp),%esi 10d01b: 8a 45 10 mov 0x10(%ebp),%al 10d01e: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d021: 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 ); 10d024: 53 push %ebx 10d025: e8 6a 0e 00 00 call 10de94 <_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 ) 10d02a: 83 c4 10 add $0x10,%esp 10d02d: 39 73 14 cmp %esi,0x14(%ebx) 10d030: 74 0d je 10d03f <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d032: 83 ec 08 sub $0x8,%esp 10d035: 56 push %esi 10d036: 53 push %ebx 10d037: e8 10 0d 00 00 call 10dd4c <_Thread_Set_priority> 10d03c: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d03f: 9c pushf 10d040: fa cli 10d041: 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; 10d042: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d045: 83 f8 04 cmp $0x4,%eax 10d048: 74 26 je 10d070 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d04a: 83 e7 04 and $0x4,%edi 10d04d: 74 15 je 10d064 <_Thread_Change_priority+0x58> the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d04f: 52 push %edx 10d050: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d051: a9 e0 be 03 00 test $0x3bee0,%eax 10d056: 0f 85 bc 00 00 00 jne 10d118 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d05c: 8d 65 f4 lea -0xc(%ebp),%esp 10d05f: 5b pop %ebx 10d060: 5e pop %esi 10d061: 5f pop %edi 10d062: c9 leave 10d063: c3 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* 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 ); 10d064: 89 c1 mov %eax,%ecx 10d066: 83 e1 fb and $0xfffffffb,%ecx 10d069: 89 4b 10 mov %ecx,0x10(%ebx) 10d06c: eb e1 jmp 10d04f <_Thread_Change_priority+0x43> 10d06e: 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 ) ) { 10d070: 83 e7 04 and $0x4,%edi 10d073: 75 45 jne 10d0ba <_Thread_Change_priority+0xae> * 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 ); 10d075: 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; 10d07c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d082: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d089: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d08c: 66 a1 cc 77 12 00 mov 0x1277cc,%ax 10d092: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d098: 66 a3 cc 77 12 00 mov %ax,0x1277cc _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d09e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d0a2: 0f 84 88 00 00 00 je 10d130 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d0a8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d0ae: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d0b1: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d0b3: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d0b5: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d0b7: 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 ); 10d0ba: 52 push %edx 10d0bb: 9d popf 10d0bc: 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 ); 10d0bd: 66 8b 1d cc 77 12 00 mov 0x1277cc,%bx 10d0c4: 31 c0 xor %eax,%eax 10d0c6: 89 c1 mov %eax,%ecx 10d0c8: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d0cc: 0f b7 c9 movzwl %cx,%ecx 10d0cf: 66 8b 9c 09 60 78 12 mov 0x127860(%ecx,%ecx,1),%bx 10d0d6: 00 10d0d7: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d0db: c1 e1 04 shl $0x4,%ecx 10d0de: 0f b7 c0 movzwl %ax,%eax 10d0e1: 8d 04 01 lea (%ecx,%eax,1),%eax 10d0e4: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d0e7: a1 e0 76 12 00 mov 0x1276e0,%eax 10d0ec: 8b 04 88 mov (%eax,%ecx,4),%eax 10d0ef: a3 a8 77 12 00 mov %eax,0x1277a8 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d0f4: 8b 0d d8 77 12 00 mov 0x1277d8,%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() && 10d0fa: 39 c8 cmp %ecx,%eax 10d0fc: 74 0d je 10d10b <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d0fe: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d102: 74 07 je 10d10b <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d104: c6 05 e8 77 12 00 01 movb $0x1,0x1277e8 _ISR_Enable( level ); 10d10b: 52 push %edx 10d10c: 9d popf } 10d10d: 8d 65 f4 lea -0xc(%ebp),%esp 10d110: 5b pop %ebx 10d111: 5e pop %esi 10d112: 5f pop %edi 10d113: c9 leave 10d114: c3 ret 10d115: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* 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 ); 10d118: 89 5d 0c mov %ebx,0xc(%ebp) 10d11b: 8b 43 44 mov 0x44(%ebx),%eax 10d11e: 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 ); } 10d121: 8d 65 f4 lea -0xc(%ebp),%esp 10d124: 5b pop %ebx 10d125: 5e pop %esi 10d126: 5f pop %edi 10d127: 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 ); 10d128: e9 87 0b 00 00 jmp 10dcb4 <_Thread_queue_Requeue> 10d12d: 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 ); 10d130: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d136: 8d 48 04 lea 0x4(%eax),%ecx 10d139: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d13b: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d13e: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d141: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d143: 89 4b 04 mov %ecx,0x4(%ebx) 10d146: e9 6f ff ff ff jmp 10d0ba <_Thread_Change_priority+0xae> 0010d14c <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d14c: 55 push %ebp 10d14d: 89 e5 mov %esp,%ebp 10d14f: 53 push %ebx 10d150: 8b 45 08 mov 0x8(%ebp),%eax 10d153: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d156: 9c pushf 10d157: fa cli 10d158: 5b pop %ebx current_state = the_thread->current_state; 10d159: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d15c: 85 ca test %ecx,%edx 10d15e: 74 70 je 10d1d0 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d160: f7 d2 not %edx 10d162: 21 ca and %ecx,%edx current_state = 10d164: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d167: 85 d2 test %edx,%edx 10d169: 75 65 jne 10d1d0 <_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; 10d16b: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d171: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d178: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d17b: 66 8b 15 cc 77 12 00 mov 0x1277cc,%dx 10d182: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d188: 66 89 15 cc 77 12 00 mov %dx,0x1277cc _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d18f: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d195: 8d 4a 04 lea 0x4(%edx),%ecx 10d198: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d19a: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d19d: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d1a0: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d1a2: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d1a5: 53 push %ebx 10d1a6: 9d popf 10d1a7: 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 ) { 10d1a8: 8b 50 14 mov 0x14(%eax),%edx 10d1ab: 8b 0d a8 77 12 00 mov 0x1277a8,%ecx 10d1b1: 3b 51 14 cmp 0x14(%ecx),%edx 10d1b4: 73 1a jae 10d1d0 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d1b6: a3 a8 77 12 00 mov %eax,0x1277a8 if ( _Thread_Executing->is_preemptible || 10d1bb: a1 d8 77 12 00 mov 0x1277d8,%eax 10d1c0: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d1c4: 74 12 je 10d1d8 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d1c6: c6 05 e8 77 12 00 01 movb $0x1,0x1277e8 10d1cd: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d1d0: 53 push %ebx 10d1d1: 9d popf } 10d1d2: 5b pop %ebx 10d1d3: c9 leave 10d1d4: c3 ret 10d1d5: 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 || 10d1d8: 85 d2 test %edx,%edx 10d1da: 74 ea je 10d1c6 <_Thread_Clear_state+0x7a> 10d1dc: eb f2 jmp 10d1d0 <_Thread_Clear_state+0x84> 0010d1e0 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d1e0: 55 push %ebp 10d1e1: 89 e5 mov %esp,%ebp 10d1e3: 56 push %esi 10d1e4: 53 push %ebx 10d1e5: 8b 75 08 mov 0x8(%ebp),%esi 10d1e8: 8b 5d 0c mov 0xc(%ebp),%ebx 10d1eb: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d1ef: 8b 46 1c mov 0x1c(%esi),%eax 10d1f2: 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; 10d1f9: a1 18 77 12 00 mov 0x127718,%eax 10d1fe: 48 dec %eax 10d1ff: a3 18 77 12 00 mov %eax,0x127718 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d204: 83 ec 0c sub $0xc,%esp 10d207: 53 push %ebx 10d208: e8 73 11 00 00 call 10e380 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d20d: a1 18 77 12 00 mov 0x127718,%eax 10d212: 40 inc %eax 10d213: a3 18 77 12 00 mov %eax,0x127718 /* * 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 ); 10d218: 59 pop %ecx 10d219: 58 pop %eax 10d21a: 53 push %ebx 10d21b: 56 push %esi 10d21c: e8 2b f6 ff ff call 10c84c <_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 ); 10d221: 58 pop %eax 10d222: 5a pop %edx 10d223: 6a 01 push $0x1 10d225: 53 push %ebx 10d226: e8 8d 0b 00 00 call 10ddb8 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d22b: 89 1c 24 mov %ebx,(%esp) 10d22e: e8 d9 09 00 00 call 10dc0c <_Thread_queue_Extract_with_proxy> 10d233: 83 c4 10 add $0x10,%esp 10d236: 84 c0 test %al,%al 10d238: 75 06 jne 10d240 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d23a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d23e: 74 68 je 10d2a8 <_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 ) ) 10d240: 3b 1d a0 77 12 00 cmp 0x1277a0,%ebx 10d246: 74 74 je 10d2bc <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d248: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d24f: 00 00 00 if ( the_thread->Start.fp_context ) 10d252: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d258: 85 c0 test %eax,%eax 10d25a: 74 0c je 10d268 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d25c: 83 ec 0c sub $0xc,%esp 10d25f: 50 push %eax 10d260: e8 33 14 00 00 call 10e698 <_Workspace_Free> 10d265: 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 ); 10d268: 83 ec 0c sub $0xc,%esp 10d26b: 53 push %ebx 10d26c: e8 fb 0c 00 00 call 10df6c <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d271: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d278: 00 00 00 if ( the_thread->extensions ) 10d27b: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10d281: 83 c4 10 add $0x10,%esp 10d284: 85 c0 test %eax,%eax 10d286: 74 0c je 10d294 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d288: 83 ec 0c sub $0xc,%esp 10d28b: 50 push %eax 10d28c: e8 07 14 00 00 call 10e698 <_Workspace_Free> 10d291: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d294: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10d29b: 00 00 00 } 10d29e: 8d 65 f8 lea -0x8(%ebp),%esp 10d2a1: 5b pop %ebx 10d2a2: 5e pop %esi 10d2a3: c9 leave 10d2a4: c3 ret 10d2a5: 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 ); 10d2a8: 83 ec 0c sub $0xc,%esp 10d2ab: 8d 43 48 lea 0x48(%ebx),%eax 10d2ae: 50 push %eax 10d2af: e8 c4 12 00 00 call 10e578 <_Watchdog_Remove> 10d2b4: 83 c4 10 add $0x10,%esp 10d2b7: eb 87 jmp 10d240 <_Thread_Close+0x60> 10d2b9: 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; 10d2bc: c7 05 a0 77 12 00 00 movl $0x0,0x1277a0 10d2c3: 00 00 00 10d2c6: eb 80 jmp 10d248 <_Thread_Close+0x68> 0010d398 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d398: 55 push %ebp 10d399: 89 e5 mov %esp,%ebp 10d39b: 57 push %edi 10d39c: 56 push %esi 10d39d: 53 push %ebx 10d39e: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d3a1: 8b 1d d8 77 12 00 mov 0x1277d8,%ebx _ISR_Disable( level ); 10d3a7: 9c pushf 10d3a8: fa cli 10d3a9: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d3aa: 8a 15 e8 77 12 00 mov 0x1277e8,%dl 10d3b0: 84 d2 test %dl,%dl 10d3b2: 0f 84 10 01 00 00 je 10d4c8 <_Thread_Dispatch+0x130> 10d3b8: 8d 7d d8 lea -0x28(%ebp),%edi 10d3bb: e9 d1 00 00 00 jmp 10d491 <_Thread_Dispatch+0xf9> executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10d3c0: 50 push %eax 10d3c1: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d3c2: 83 ec 0c sub $0xc,%esp 10d3c5: 8d 45 e0 lea -0x20(%ebp),%eax 10d3c8: 50 push %eax 10d3c9: e8 aa 38 00 00 call 110c78 <_TOD_Get_uptime> _Timestamp_Subtract( 10d3ce: 83 c4 0c add $0xc,%esp 10d3d1: 57 push %edi 10d3d2: 8d 45 e0 lea -0x20(%ebp),%eax 10d3d5: 50 push %eax 10d3d6: 68 e0 77 12 00 push $0x1277e0 10d3db: e8 90 0d 00 00 call 10e170 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d3e0: 5a pop %edx 10d3e1: 59 pop %ecx 10d3e2: 57 push %edi 10d3e3: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d3e9: 50 push %eax 10d3ea: e8 45 0d 00 00 call 10e134 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d3ef: 8b 45 e0 mov -0x20(%ebp),%eax 10d3f2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d3f5: a3 e0 77 12 00 mov %eax,0x1277e0 10d3fa: 89 15 e4 77 12 00 mov %edx,0x1277e4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d400: a1 a4 77 12 00 mov 0x1277a4,%eax 10d405: 83 c4 10 add $0x10,%esp 10d408: 85 c0 test %eax,%eax 10d40a: 74 10 je 10d41c <_Thread_Dispatch+0x84> executing->libc_reent = *_Thread_libc_reent; 10d40c: 8b 10 mov (%eax),%edx 10d40e: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d414: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10d41a: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d41c: 83 ec 08 sub $0x8,%esp 10d41f: 56 push %esi 10d420: 53 push %ebx 10d421: e8 da 0f 00 00 call 10e400 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d426: 59 pop %ecx 10d427: 58 pop %eax 10d428: 81 c6 d4 00 00 00 add $0xd4,%esi 10d42e: 56 push %esi 10d42f: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10d435: 50 push %eax 10d436: e8 c5 12 00 00 call 10e700 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d43b: 83 c4 10 add $0x10,%esp 10d43e: 8b 93 ec 00 00 00 mov 0xec(%ebx),%edx 10d444: 85 d2 test %edx,%edx 10d446: 74 36 je 10d47e <_Thread_Dispatch+0xe6> #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 ); 10d448: a1 a0 77 12 00 mov 0x1277a0,%eax 10d44d: 39 c3 cmp %eax,%ebx 10d44f: 74 2d je 10d47e <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d451: 85 c0 test %eax,%eax 10d453: 74 11 je 10d466 <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d455: 83 ec 0c sub $0xc,%esp 10d458: 05 ec 00 00 00 add $0xec,%eax 10d45d: 50 push %eax 10d45e: e8 d1 12 00 00 call 10e734 <_CPU_Context_save_fp> 10d463: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d466: 83 ec 0c sub $0xc,%esp 10d469: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10d46f: 50 push %eax 10d470: e8 c9 12 00 00 call 10e73e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d475: 89 1d a0 77 12 00 mov %ebx,0x1277a0 10d47b: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d47e: 8b 1d d8 77 12 00 mov 0x1277d8,%ebx _ISR_Disable( level ); 10d484: 9c pushf 10d485: fa cli 10d486: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d487: 8a 15 e8 77 12 00 mov 0x1277e8,%dl 10d48d: 84 d2 test %dl,%dl 10d48f: 74 37 je 10d4c8 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10d491: 8b 35 a8 77 12 00 mov 0x1277a8,%esi _Thread_Dispatch_disable_level = 1; 10d497: c7 05 18 77 12 00 01 movl $0x1,0x127718 10d49e: 00 00 00 _Context_Switch_necessary = false; 10d4a1: c6 05 e8 77 12 00 00 movb $0x0,0x1277e8 _Thread_Executing = heir; 10d4a8: 89 35 d8 77 12 00 mov %esi,0x1277d8 #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 ) 10d4ae: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d4b2: 0f 85 08 ff ff ff jne 10d3c0 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d4b8: 8b 15 e4 76 12 00 mov 0x1276e4,%edx 10d4be: 89 56 78 mov %edx,0x78(%esi) 10d4c1: e9 fa fe ff ff jmp 10d3c0 <_Thread_Dispatch+0x28> 10d4c6: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10d4c8: c7 05 18 77 12 00 00 movl $0x0,0x127718 10d4cf: 00 00 00 _ISR_Enable( level ); 10d4d2: 50 push %eax 10d4d3: 9d popf if ( _Thread_Do_post_task_switch_extension || 10d4d4: a1 bc 77 12 00 mov 0x1277bc,%eax 10d4d9: 85 c0 test %eax,%eax 10d4db: 75 06 jne 10d4e3 <_Thread_Dispatch+0x14b> executing->do_post_task_switch_extension ) { 10d4dd: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10d4e1: 74 09 je 10d4ec <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10d4e3: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10d4e7: e8 ac e8 ff ff call 10bd98 <_API_extensions_Run_postswitch> } } 10d4ec: 8d 65 f4 lea -0xc(%ebp),%esp 10d4ef: 5b pop %ebx 10d4f0: 5e pop %esi 10d4f1: 5f pop %edi 10d4f2: c9 leave 10d4f3: c3 ret 0010d518 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d518: 55 push %ebp 10d519: 89 e5 mov %esp,%ebp 10d51b: 53 push %ebx 10d51c: 83 ec 04 sub $0x4,%esp 10d51f: 8b 45 08 mov 0x8(%ebp),%eax 10d522: 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 ) ) { 10d525: 85 c0 test %eax,%eax 10d527: 74 4b je 10d574 <_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); 10d529: 89 c2 mov %eax,%edx 10d52b: c1 ea 18 shr $0x18,%edx 10d52e: 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 ) 10d531: 8d 5a ff lea -0x1(%edx),%ebx 10d534: 83 fb 03 cmp $0x3,%ebx 10d537: 77 2b ja 10d564 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d539: 89 c3 mov %eax,%ebx 10d53b: c1 eb 1b shr $0x1b,%ebx 10d53e: 4b dec %ebx 10d53f: 75 23 jne 10d564 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d541: 8b 14 95 ec 76 12 00 mov 0x1276ec(,%edx,4),%edx if ( !api_information ) { 10d548: 85 d2 test %edx,%edx 10d54a: 74 18 je 10d564 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d54c: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d54f: 85 d2 test %edx,%edx 10d551: 74 11 je 10d564 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d553: 53 push %ebx 10d554: 51 push %ecx 10d555: 50 push %eax 10d556: 52 push %edx 10d557: e8 24 f7 ff ff call 10cc80 <_Objects_Get> 10d55c: 83 c4 10 add $0x10,%esp done: return tp; } 10d55f: 8b 5d fc mov -0x4(%ebp),%ebx 10d562: c9 leave 10d563: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d564: c7 01 01 00 00 00 movl $0x1,(%ecx) 10d56a: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d56c: 8b 5d fc mov -0x4(%ebp),%ebx 10d56f: c9 leave 10d570: c3 ret 10d571: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d574: a1 18 77 12 00 mov 0x127718,%eax 10d579: 40 inc %eax 10d57a: a3 18 77 12 00 mov %eax,0x127718 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; 10d57f: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d585: a1 d8 77 12 00 mov 0x1277d8,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d58a: 8b 5d fc mov -0x4(%ebp),%ebx 10d58d: c9 leave 10d58e: c3 ret 00112dac <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112dac: 55 push %ebp 112dad: 89 e5 mov %esp,%ebp 112daf: 53 push %ebx 112db0: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112db3: 8b 1d d8 77 12 00 mov 0x1277d8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112db9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 112dbf: 85 c0 test %eax,%eax 112dc1: 74 79 je 112e3c <_Thread_Handler+0x90> 112dc3: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112dc4: a0 50 73 12 00 mov 0x127350,%al 112dc9: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112dcc: c6 05 50 73 12 00 01 movb $0x1,0x127350 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112dd3: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 112dd9: 85 c0 test %eax,%eax 112ddb: 74 24 je 112e01 <_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 ); 112ddd: a1 a0 77 12 00 mov 0x1277a0,%eax 112de2: 39 c3 cmp %eax,%ebx 112de4: 74 1b je 112e01 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 112de6: 85 c0 test %eax,%eax 112de8: 74 11 je 112dfb <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 112dea: 83 ec 0c sub $0xc,%esp 112ded: 05 ec 00 00 00 add $0xec,%eax 112df2: 50 push %eax 112df3: e8 3c b9 ff ff call 10e734 <_CPU_Context_save_fp> 112df8: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 112dfb: 89 1d a0 77 12 00 mov %ebx,0x1277a0 /* * 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 ); 112e01: 83 ec 0c sub $0xc,%esp 112e04: 53 push %ebx 112e05: e8 66 b4 ff ff call 10e270 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 112e0a: e8 e5 a6 ff ff call 10d4f4 <_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) */ { 112e0f: 83 c4 10 add $0x10,%esp 112e12: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 112e16: 74 28 je 112e40 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112e18: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112e1e: 85 c0 test %eax,%eax 112e20: 74 2d je 112e4f <_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 ) { 112e22: 48 dec %eax 112e23: 74 43 je 112e68 <_Thread_Handler+0xbc> * 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 ); 112e25: 83 ec 0c sub $0xc,%esp 112e28: 53 push %ebx 112e29: e8 7e b4 ff ff call 10e2ac <_User_extensions_Thread_exitted> _Internal_error_Occurred( 112e2e: 83 c4 0c add $0xc,%esp 112e31: 6a 06 push $0x6 112e33: 6a 01 push $0x1 112e35: 6a 00 push $0x0 112e37: e8 fc 98 ff ff call 10c738 <_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); 112e3c: fb sti 112e3d: eb 85 jmp 112dc4 <_Thread_Handler+0x18> 112e3f: 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 (); 112e40: e8 ab c5 00 00 call 11f3f0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112e45: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112e4b: 85 c0 test %eax,%eax 112e4d: 75 d3 jne 112e22 <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 112e4f: 83 ec 0c sub $0xc,%esp 112e52: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112e58: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 112e5e: 89 43 28 mov %eax,0x28(%ebx) 112e61: 83 c4 10 add $0x10,%esp 112e64: eb bf jmp 112e25 <_Thread_Handler+0x79> 112e66: 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)( 112e68: 83 ec 0c sub $0xc,%esp 112e6b: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 112e71: 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 = 112e77: 89 43 28 mov %eax,0x28(%ebx) 112e7a: 83 c4 10 add $0x10,%esp 112e7d: eb a6 jmp 112e25 <_Thread_Handler+0x79> 0010d590 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d590: 55 push %ebp 10d591: 89 e5 mov %esp,%ebp 10d593: 57 push %edi 10d594: 56 push %esi 10d595: 53 push %ebx 10d596: 83 ec 1c sub $0x1c,%esp 10d599: 8b 5d 0c mov 0xc(%ebp),%ebx 10d59c: 8b 4d 10 mov 0x10(%ebp),%ecx 10d59f: 8b 7d 14 mov 0x14(%ebp),%edi 10d5a2: 8b 75 1c mov 0x1c(%ebp),%esi 10d5a5: 8a 55 18 mov 0x18(%ebp),%dl 10d5a8: 8a 45 20 mov 0x20(%ebp),%al 10d5ab: 88 45 df mov %al,-0x21(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10d5ae: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d5b5: 00 00 00 10d5b8: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d5bf: 00 00 00 10d5c2: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d5c9: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d5cc: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d5d3: 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 ) { 10d5d6: 85 c9 test %ecx,%ecx 10d5d8: 0f 84 eb 01 00 00 je 10d7c9 <_Thread_Initialize+0x239> 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; 10d5de: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10d5e5: 89 f8 mov %edi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d5e7: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10d5ed: 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 ) { 10d5f3: 84 d2 test %dl,%dl 10d5f5: 0f 85 61 01 00 00 jne 10d75c <_Thread_Initialize+0x1cc> 10d5fb: 31 c0 xor %eax,%eax 10d5fd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%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; 10d604: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10d60a: 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; 10d610: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d617: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d61e: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d625: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d62c: a1 b8 77 12 00 mov 0x1277b8,%eax 10d631: 85 c0 test %eax,%eax 10d633: 0f 85 43 01 00 00 jne 10d77c <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d639: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10d640: 00 00 00 10d643: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d64a: 8a 45 df mov -0x21(%ebp),%al 10d64d: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d653: 8b 45 24 mov 0x24(%ebp),%eax 10d656: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d65c: 8b 45 28 mov 0x28(%ebp),%eax 10d65f: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10d665: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10d669: 75 08 jne 10d673 <_Thread_Initialize+0xe3> 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; 10d66b: a1 e4 76 12 00 mov 0x1276e4,%eax 10d670: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d673: 8b 45 2c mov 0x2c(%ebp),%eax 10d676: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d67c: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d683: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d68a: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 10d691: 89 73 18 mov %esi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d694: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d69a: 83 ec 08 sub $0x8,%esp 10d69d: 56 push %esi 10d69e: 53 push %ebx 10d69f: e8 a8 06 00 00 call 10dd4c <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d6a4: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d6ab: 00 00 00 10d6ae: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d6b5: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d6b8: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d6bc: 8b 45 08 mov 0x8(%ebp),%eax 10d6bf: 8b 40 1c mov 0x1c(%eax),%eax 10d6c2: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d6c5: 8b 45 30 mov 0x30(%ebp),%eax 10d6c8: 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 ); 10d6cb: 89 1c 24 mov %ebx,(%esp) 10d6ce: e8 65 0c 00 00 call 10e338 <_User_extensions_Thread_create> if ( extension_status ) 10d6d3: 83 c4 10 add $0x10,%esp 10d6d6: 84 c0 test %al,%al 10d6d8: 75 76 jne 10d750 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 10d6da: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d6e0: 85 c0 test %eax,%eax 10d6e2: 74 0c je 10d6f0 <_Thread_Initialize+0x160> _Workspace_Free( the_thread->libc_reent ); 10d6e4: 83 ec 0c sub $0xc,%esp 10d6e7: 50 push %eax 10d6e8: e8 ab 0f 00 00 call 10e698 <_Workspace_Free> 10d6ed: 83 c4 10 add $0x10,%esp 10d6f0: 31 f6 xor %esi,%esi for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d6f2: 8b 84 b3 f4 00 00 00 mov 0xf4(%ebx,%esi,4),%eax 10d6f9: 85 c0 test %eax,%eax 10d6fb: 74 0c je 10d709 <_Thread_Initialize+0x179> _Workspace_Free( the_thread->API_Extensions[i] ); 10d6fd: 83 ec 0c sub $0xc,%esp 10d700: 50 push %eax 10d701: e8 92 0f 00 00 call 10e698 <_Workspace_Free> 10d706: 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++ ) 10d709: 46 inc %esi 10d70a: 83 fe 03 cmp $0x3,%esi 10d70d: 75 e3 jne 10d6f2 <_Thread_Initialize+0x162> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10d70f: 8b 55 e4 mov -0x1c(%ebp),%edx 10d712: 85 d2 test %edx,%edx 10d714: 74 0e je 10d724 <_Thread_Initialize+0x194> (void) _Workspace_Free( extensions_area ); 10d716: 83 ec 0c sub $0xc,%esp 10d719: ff 75 e4 pushl -0x1c(%ebp) 10d71c: e8 77 0f 00 00 call 10e698 <_Workspace_Free> 10d721: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d724: 8b 45 e0 mov -0x20(%ebp),%eax 10d727: 85 c0 test %eax,%eax 10d729: 74 0e je 10d739 <_Thread_Initialize+0x1a9> (void) _Workspace_Free( fp_area ); 10d72b: 83 ec 0c sub $0xc,%esp 10d72e: ff 75 e0 pushl -0x20(%ebp) 10d731: e8 62 0f 00 00 call 10e698 <_Workspace_Free> 10d736: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d739: 83 ec 0c sub $0xc,%esp 10d73c: 53 push %ebx 10d73d: e8 2a 08 00 00 call 10df6c <_Thread_Stack_Free> 10d742: 31 c0 xor %eax,%eax return false; 10d744: 83 c4 10 add $0x10,%esp } 10d747: 8d 65 f4 lea -0xc(%ebp),%esp 10d74a: 5b pop %ebx 10d74b: 5e pop %esi 10d74c: 5f pop %edi 10d74d: c9 leave 10d74e: c3 ret 10d74f: 90 nop <== NOT EXECUTED * 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 ); if ( extension_status ) 10d750: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d752: 8d 65 f4 lea -0xc(%ebp),%esp 10d755: 5b pop %ebx 10d756: 5e pop %esi 10d757: 5f pop %edi 10d758: c9 leave 10d759: c3 ret 10d75a: 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 ); 10d75c: 83 ec 0c sub $0xc,%esp 10d75f: 6a 6c push $0x6c 10d761: e8 16 0f 00 00 call 10e67c <_Workspace_Allocate> 10d766: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10d769: 83 c4 10 add $0x10,%esp 10d76c: 85 c0 test %eax,%eax 10d76e: 0f 84 89 00 00 00 je 10d7fd <_Thread_Initialize+0x26d> 10d774: 8b 45 e0 mov -0x20(%ebp),%eax 10d777: e9 88 fe ff ff jmp 10d604 <_Thread_Initialize+0x74> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d77c: 83 ec 0c sub $0xc,%esp 10d77f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d786: 50 push %eax 10d787: e8 f0 0e 00 00 call 10e67c <_Workspace_Allocate> 10d78c: 89 45 e4 mov %eax,-0x1c(%ebp) (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d78f: 83 c4 10 add $0x10,%esp 10d792: 85 c0 test %eax,%eax 10d794: 0f 84 40 ff ff ff je 10d6da <_Thread_Initialize+0x14a> goto failed; } the_thread->extensions = (void **) extensions_area; 10d79a: 89 c1 mov %eax,%ecx 10d79c: 89 83 00 01 00 00 mov %eax,0x100(%ebx) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d7a2: 8b 3d b8 77 12 00 mov 0x1277b8,%edi 10d7a8: 31 d2 xor %edx,%edx 10d7aa: 31 c0 xor %eax,%eax 10d7ac: eb 08 jmp 10d7b6 <_Thread_Initialize+0x226> 10d7ae: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d7b0: 8b 8b 00 01 00 00 mov 0x100(%ebx),%ecx the_thread->extensions[i] = NULL; 10d7b6: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%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++ ) 10d7bd: 40 inc %eax 10d7be: 89 c2 mov %eax,%edx 10d7c0: 39 f8 cmp %edi,%eax 10d7c2: 76 ec jbe 10d7b0 <_Thread_Initialize+0x220> 10d7c4: e9 81 fe ff ff jmp 10d64a <_Thread_Initialize+0xba> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10d7c9: 83 ec 08 sub $0x8,%esp 10d7cc: 57 push %edi 10d7cd: 53 push %ebx 10d7ce: 88 55 d8 mov %dl,-0x28(%ebp) 10d7d1: e8 32 07 00 00 call 10df08 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d7d6: 83 c4 10 add $0x10,%esp 10d7d9: 85 c0 test %eax,%eax 10d7db: 8a 55 d8 mov -0x28(%ebp),%dl 10d7de: 74 16 je 10d7f6 <_Thread_Initialize+0x266> 10d7e0: 39 c7 cmp %eax,%edi 10d7e2: 77 12 ja 10d7f6 <_Thread_Initialize+0x266> return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10d7e4: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10d7ea: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10d7f1: e9 f1 fd ff ff jmp 10d5e7 <_Thread_Initialize+0x57> if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10d7f6: 31 c0 xor %eax,%eax 10d7f8: e9 4a ff ff ff jmp 10d747 <_Thread_Initialize+0x1b7> * 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 ); if ( !fp_area ) 10d7fd: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10d804: e9 d1 fe ff ff jmp 10d6da <_Thread_Initialize+0x14a> 00111f6c <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 111f6c: 55 push %ebp 111f6d: 89 e5 mov %esp,%ebp 111f6f: 53 push %ebx 111f70: 83 ec 10 sub $0x10,%esp 111f73: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 111f76: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 111f7d: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111f83: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 111f86: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111f8c: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 111f8f: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111f95: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 111f9b: 8b 45 0c mov 0xc(%ebp),%eax 111f9e: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111fa4: 8b 45 10 mov 0x10(%ebp),%eax 111fa7: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 111fad: 53 push %ebx 111fae: e8 31 c7 ff ff call 10e6e4 <_Thread_queue_Extract_with_proxy> 111fb3: 83 c4 10 add $0x10,%esp 111fb6: 84 c0 test %al,%al 111fb8: 75 06 jne 111fc0 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111fba: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111fbe: 74 28 je 111fe8 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111fc0: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 111fc6: 39 43 14 cmp %eax,0x14(%ebx) 111fc9: 74 15 je 111fe0 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 111fcb: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111fce: 89 45 0c mov %eax,0xc(%ebp) 111fd1: 89 5d 08 mov %ebx,0x8(%ebp) } } 111fd4: 8b 5d fc mov -0x4(%ebp),%ebx 111fd7: 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 ); 111fd8: e9 d3 c8 ff ff jmp 10e8b0 <_Thread_Set_priority> 111fdd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111fe0: 8b 5d fc mov -0x4(%ebp),%ebx 111fe3: c9 leave 111fe4: c3 ret 111fe5: 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 ); 111fe8: 83 ec 0c sub $0xc,%esp 111feb: 8d 43 48 lea 0x48(%ebx),%eax 111fee: 50 push %eax 111fef: e8 28 d1 ff ff call 10f11c <_Watchdog_Remove> 111ff4: 83 c4 10 add $0x10,%esp 111ff7: eb c7 jmp 111fc0 <_Thread_Reset+0x54> 00111334 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 111334: 55 push %ebp 111335: 89 e5 mov %esp,%ebp 111337: 56 push %esi 111338: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 111339: a1 d8 77 12 00 mov 0x1277d8,%eax ready = executing->ready; 11133e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111344: 9c pushf 111345: fa cli 111346: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 111347: 8b 1a mov (%edx),%ebx 111349: 3b 5a 08 cmp 0x8(%edx),%ebx 11134c: 74 3e je 11138c <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11134e: 8b 30 mov (%eax),%esi previous = the_node->previous; 111350: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 111353: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 111356: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111358: 8d 5a 04 lea 0x4(%edx),%ebx 11135b: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 11135d: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111360: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111363: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111365: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 111368: 51 push %ecx 111369: 9d popf 11136a: fa cli if ( _Thread_Is_heir( executing ) ) 11136b: 3b 05 a8 77 12 00 cmp 0x1277a8,%eax 111371: 74 0d je 111380 <_Thread_Reset_timeslice+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 111373: c6 05 e8 77 12 00 01 movb $0x1,0x1277e8 _ISR_Enable( level ); 11137a: 51 push %ecx 11137b: 9d popf } 11137c: 5b pop %ebx 11137d: 5e pop %esi 11137e: c9 leave 11137f: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 111380: 8b 02 mov (%edx),%eax 111382: a3 a8 77 12 00 mov %eax,0x1277a8 111387: eb ea jmp 111373 <_Thread_Reset_timeslice+0x3f> 111389: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 11138c: 51 push %ecx 11138d: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 11138e: 5b pop %ebx 11138f: 5e pop %esi 111390: c9 leave 111391: c3 ret 0010e824 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e824: 55 push %ebp 10e825: 89 e5 mov %esp,%ebp 10e827: 53 push %ebx 10e828: 83 ec 04 sub $0x4,%esp 10e82b: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e82e: f6 43 10 01 testb $0x1,0x10(%ebx) 10e832: 74 08 je 10e83c <_Thread_Restart+0x18> 10e834: 31 c0 xor %eax,%eax return true; } return false; } 10e836: 8b 5d fc mov -0x4(%ebp),%ebx 10e839: c9 leave 10e83a: c3 ret 10e83b: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e83c: 83 ec 0c sub $0xc,%esp 10e83f: 53 push %ebx 10e840: e8 b3 01 00 00 call 10e9f8 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e845: 83 c4 0c add $0xc,%esp 10e848: ff 75 10 pushl 0x10(%ebp) 10e84b: ff 75 0c pushl 0xc(%ebp) 10e84e: 53 push %ebx 10e84f: e8 18 37 00 00 call 111f6c <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e854: 89 1c 24 mov %ebx,(%esp) 10e857: e8 ec 33 00 00 call 111c48 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e85c: 89 1c 24 mov %ebx,(%esp) 10e85f: e8 64 36 00 00 call 111ec8 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e864: 89 1c 24 mov %ebx,(%esp) 10e867: e8 b8 06 00 00 call 10ef24 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10e86c: 83 c4 10 add $0x10,%esp 10e86f: 3b 1d b8 95 12 00 cmp 0x1295b8,%ebx 10e875: 74 07 je 10e87e <_Thread_Restart+0x5a> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e877: b0 01 mov $0x1,%al return true; } return false; } 10e879: 8b 5d fc mov -0x4(%ebp),%ebx 10e87c: c9 leave 10e87d: 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 ) 10e87e: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10e885: 74 18 je 10e89f <_Thread_Restart+0x7b> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10e887: 83 ec 0c sub $0xc,%esp 10e88a: 81 c3 ec 00 00 00 add $0xec,%ebx 10e890: 53 push %ebx 10e891: e8 58 0a 00 00 call 10f2ee <_CPU_Context_restore_fp> 10e896: 8b 1d b8 95 12 00 mov 0x1295b8,%ebx 10e89c: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e89f: 83 ec 0c sub $0xc,%esp 10e8a2: 81 c3 d4 00 00 00 add $0xd4,%ebx 10e8a8: 53 push %ebx 10e8a9: e8 2f 0a 00 00 call 10f2dd <_CPU_Context_restore> 00111674 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111674: 55 push %ebp 111675: 89 e5 mov %esp,%ebp 111677: 53 push %ebx 111678: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11167b: 9c pushf 11167c: fa cli 11167d: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 11167e: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111681: f6 c2 02 test $0x2,%dl 111684: 74 6e je 1116f4 <_Thread_Resume+0x80> 111686: 83 e2 fd and $0xfffffffd,%edx current_state = 111689: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 11168c: 85 d2 test %edx,%edx 11168e: 75 64 jne 1116f4 <_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; 111690: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111696: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 11169d: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 1116a0: 66 8b 15 cc ca 12 00 mov 0x12cacc,%dx 1116a7: 0b 90 94 00 00 00 or 0x94(%eax),%edx 1116ad: 66 89 15 cc ca 12 00 mov %dx,0x12cacc _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 1116b4: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1116ba: 8d 5a 04 lea 0x4(%edx),%ebx 1116bd: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 1116bf: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1116c2: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1116c5: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1116c7: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 1116ca: 51 push %ecx 1116cb: 9d popf 1116cc: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 1116cd: 8b 50 14 mov 0x14(%eax),%edx 1116d0: 8b 1d a8 ca 12 00 mov 0x12caa8,%ebx 1116d6: 3b 53 14 cmp 0x14(%ebx),%edx 1116d9: 73 19 jae 1116f4 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 1116db: a3 a8 ca 12 00 mov %eax,0x12caa8 if ( _Thread_Executing->is_preemptible || 1116e0: a1 d8 ca 12 00 mov 0x12cad8,%eax 1116e5: 80 78 75 00 cmpb $0x0,0x75(%eax) 1116e9: 74 11 je 1116fc <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1116eb: c6 05 e8 ca 12 00 01 movb $0x1,0x12cae8 1116f2: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1116f4: 51 push %ecx 1116f5: 9d popf } 1116f6: 5b pop %ebx 1116f7: c9 leave 1116f8: c3 ret 1116f9: 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 || 1116fc: 85 d2 test %edx,%edx 1116fe: 74 eb je 1116eb <_Thread_Resume+0x77> 111700: eb f2 jmp 1116f4 <_Thread_Resume+0x80> 0010ddb8 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10ddb8: 55 push %ebp 10ddb9: 89 e5 mov %esp,%ebp 10ddbb: 56 push %esi 10ddbc: 53 push %ebx 10ddbd: 8b 45 08 mov 0x8(%ebp),%eax 10ddc0: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10ddc3: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10ddc9: 9c pushf 10ddca: fa cli 10ddcb: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10ddcc: 8b 58 10 mov 0x10(%eax),%ebx 10ddcf: 85 db test %ebx,%ebx 10ddd1: 75 2d jne 10de00 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10ddd3: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10ddd6: 8b 1a mov (%edx),%ebx 10ddd8: 3b 5a 08 cmp 0x8(%edx),%ebx 10dddb: 74 3b je 10de18 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dddd: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10dddf: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10dde2: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10dde5: 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 ); 10dde7: 51 push %ecx 10dde8: 9d popf 10dde9: fa cli if ( _Thread_Is_heir( the_thread ) ) 10ddea: 3b 05 a8 77 12 00 cmp 0x1277a8,%eax 10ddf0: 74 62 je 10de54 <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10ddf2: 3b 05 d8 77 12 00 cmp 0x1277d8,%eax 10ddf8: 74 12 je 10de0c <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10ddfa: 51 push %ecx 10ddfb: 9d popf } 10ddfc: 5b pop %ebx 10ddfd: 5e pop %esi 10ddfe: c9 leave 10ddff: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10de00: 09 f3 or %esi,%ebx 10de02: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10de05: 51 push %ecx 10de06: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10de07: 5b pop %ebx 10de08: 5e pop %esi 10de09: c9 leave 10de0a: c3 ret 10de0b: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10de0c: c6 05 e8 77 12 00 01 movb $0x1,0x1277e8 10de13: eb e5 jmp 10ddfa <_Thread_Set_state+0x42> 10de15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10de18: 8d 5a 04 lea 0x4(%edx),%ebx 10de1b: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10de1d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10de24: 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; 10de27: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10de2d: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10de34: 66 21 1a and %bx,(%edx) the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10de37: 66 83 3a 00 cmpw $0x0,(%edx) 10de3b: 75 aa jne 10dde7 <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10de3d: 66 8b 15 cc 77 12 00 mov 0x1277cc,%dx 10de44: 23 90 98 00 00 00 and 0x98(%eax),%edx 10de4a: 66 89 15 cc 77 12 00 mov %dx,0x1277cc 10de51: eb 94 jmp 10dde7 <_Thread_Set_state+0x2f> 10de53: 90 nop <== 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 ); 10de54: 66 8b 35 cc 77 12 00 mov 0x1277cc,%si 10de5b: 31 d2 xor %edx,%edx 10de5d: 89 d3 mov %edx,%ebx 10de5f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10de63: 0f b7 db movzwl %bx,%ebx 10de66: 66 8b b4 1b 60 78 12 mov 0x127860(%ebx,%ebx,1),%si 10de6d: 00 10de6e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10de72: c1 e3 04 shl $0x4,%ebx 10de75: 0f b7 d2 movzwl %dx,%edx 10de78: 8d 14 13 lea (%ebx,%edx,1),%edx 10de7b: 8d 1c 52 lea (%edx,%edx,2),%ebx 10de7e: 8b 15 e0 76 12 00 mov 0x1276e0,%edx 10de84: 8b 14 9a mov (%edx,%ebx,4),%edx 10de87: 89 15 a8 77 12 00 mov %edx,0x1277a8 10de8d: e9 60 ff ff ff jmp 10ddf2 <_Thread_Set_state+0x3a> 0010de94 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10de94: 55 push %ebp 10de95: 89 e5 mov %esp,%ebp 10de97: 56 push %esi 10de98: 53 push %ebx 10de99: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10de9c: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10dea2: 9c pushf 10dea3: fa cli 10dea4: 5b pop %ebx old_state = the_thread->current_state; 10dea5: 8b 50 10 mov 0x10(%eax),%edx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10dea8: 89 d6 mov %edx,%esi 10deaa: 83 ce 04 or $0x4,%esi 10dead: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10deb0: 85 d2 test %edx,%edx 10deb2: 75 11 jne 10dec5 <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10deb4: 8b 11 mov (%ecx),%edx 10deb6: 3b 51 08 cmp 0x8(%ecx),%edx 10deb9: 74 11 je 10decc <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10debb: 8b 10 mov (%eax),%edx previous = the_node->previous; 10debd: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10dec0: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10dec3: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10dec5: 53 push %ebx 10dec6: 9d popf } 10dec7: 5b pop %ebx 10dec8: 5e pop %esi 10dec9: c9 leave 10deca: c3 ret 10decb: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10decc: 8d 51 04 lea 0x4(%ecx),%edx 10decf: 89 11 mov %edx,(%ecx) the_chain->permanent_null = NULL; 10ded1: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10ded8: 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; 10dedb: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dee1: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10dee8: 66 21 0a and %cx,(%edx) if ( _States_Is_ready( old_state ) ) { if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10deeb: 66 83 3a 00 cmpw $0x0,(%edx) 10deef: 75 d4 jne 10dec5 <_Thread_Set_transient+0x31> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10def1: 66 8b 15 cc 77 12 00 mov 0x1277cc,%dx 10def8: 23 90 98 00 00 00 and 0x98(%eax),%edx 10defe: 66 89 15 cc 77 12 00 mov %dx,0x1277cc 10df05: eb be jmp 10dec5 <_Thread_Set_transient+0x31> 0010df08 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10df08: 55 push %ebp 10df09: 89 e5 mov %esp,%ebp 10df0b: 53 push %ebx 10df0c: 83 ec 04 sub $0x4,%esp 10df0f: a1 30 35 12 00 mov 0x123530,%eax 10df14: 8b 5d 0c mov 0xc(%ebp),%ebx 10df17: 39 c3 cmp %eax,%ebx 10df19: 73 02 jae 10df1d <_Thread_Stack_Allocate+0x15> 10df1b: 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 ) { 10df1d: a1 60 35 12 00 mov 0x123560,%eax 10df22: 85 c0 test %eax,%eax 10df24: 74 32 je 10df58 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10df26: 83 ec 0c sub $0xc,%esp 10df29: 53 push %ebx 10df2a: ff d0 call *%eax 10df2c: 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 ) 10df2f: 85 c0 test %eax,%eax 10df31: 74 11 je 10df44 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10df33: 8b 55 08 mov 0x8(%ebp),%edx 10df36: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10df3c: 89 d8 mov %ebx,%eax 10df3e: 8b 5d fc mov -0x4(%ebp),%ebx 10df41: c9 leave 10df42: c3 ret 10df43: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10df44: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10df46: 8b 55 08 mov 0x8(%ebp),%edx 10df49: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10df4f: 89 d8 mov %ebx,%eax 10df51: 8b 5d fc mov -0x4(%ebp),%ebx 10df54: c9 leave 10df55: c3 ret 10df56: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10df58: 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 ); 10df5b: 83 ec 0c sub $0xc,%esp 10df5e: 53 push %ebx 10df5f: e8 18 07 00 00 call 10e67c <_Workspace_Allocate> 10df64: 83 c4 10 add $0x10,%esp 10df67: eb c6 jmp 10df2f <_Thread_Stack_Allocate+0x27> 0010df6c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10df6c: 55 push %ebp 10df6d: 89 e5 mov %esp,%ebp 10df6f: 83 ec 08 sub $0x8,%esp 10df72: 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 ) 10df75: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10df7c: 74 16 je 10df94 <_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 ) 10df7e: 8b 15 64 35 12 00 mov 0x123564,%edx 10df84: 85 d2 test %edx,%edx 10df86: 74 10 je 10df98 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10df88: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10df8e: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10df91: 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 ); 10df92: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10df94: c9 leave 10df95: c3 ret 10df96: 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 ); 10df98: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10df9e: 89 45 08 mov %eax,0x8(%ebp) } 10dfa1: 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 ); 10dfa2: e9 f1 06 00 00 jmp 10e698 <_Workspace_Free> 0010e004 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e004: 55 push %ebp 10e005: 89 e5 mov %esp,%ebp 10e007: 53 push %ebx 10e008: 83 ec 04 sub $0x4,%esp 10e00b: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e00e: f6 43 10 01 testb $0x1,0x10(%ebx) 10e012: 75 08 jne 10e01c <_Thread_Start+0x18> 10e014: 31 c0 xor %eax,%eax return true; } return false; } 10e016: 8b 5d fc mov -0x4(%ebp),%ebx 10e019: c9 leave 10e01a: c3 ret 10e01b: 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; 10e01c: 8b 45 10 mov 0x10(%ebp),%eax 10e01f: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e025: 8b 45 0c mov 0xc(%ebp),%eax 10e028: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e02e: 8b 45 14 mov 0x14(%ebp),%eax 10e031: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e037: 8b 45 18 mov 0x18(%ebp),%eax 10e03a: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e040: 83 ec 0c sub $0xc,%esp 10e043: 53 push %ebx 10e044: e8 c7 2f 00 00 call 111010 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e049: 89 1c 24 mov %ebx,(%esp) 10e04c: e8 3f 32 00 00 call 111290 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e051: 89 1c 24 mov %ebx,(%esp) 10e054: e8 67 03 00 00 call 10e3c0 <_User_extensions_Thread_start> 10e059: b0 01 mov $0x1,%al return true; 10e05b: 83 c4 10 add $0x10,%esp } return false; } 10e05e: 8b 5d fc mov -0x4(%ebp),%ebx 10e061: c9 leave 10e062: c3 ret 00111394 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111394: 55 push %ebp 111395: 89 e5 mov %esp,%ebp 111397: 56 push %esi 111398: 53 push %ebx 111399: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 11139c: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 1113a2: 9c pushf 1113a3: fa cli 1113a4: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 1113a5: 8b 58 10 mov 0x10(%eax),%ebx 1113a8: 85 db test %ebx,%ebx 1113aa: 75 34 jne 1113e0 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 1113ac: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 1113b3: 8b 1a mov (%edx),%ebx 1113b5: 3b 5a 08 cmp 0x8(%edx),%ebx 1113b8: 74 3e je 1113f8 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1113ba: 8b 18 mov (%eax),%ebx previous = the_node->previous; 1113bc: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 1113bf: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 1113c2: 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 ); 1113c4: 51 push %ecx 1113c5: 9d popf 1113c6: fa cli if ( _Thread_Is_heir( the_thread ) ) 1113c7: 3b 05 a8 77 12 00 cmp 0x1277a8,%eax 1113cd: 74 65 je 111434 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 1113cf: 3b 05 d8 77 12 00 cmp 0x1277d8,%eax 1113d5: 74 15 je 1113ec <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 1113d7: 51 push %ecx 1113d8: 9d popf } 1113d9: 5b pop %ebx 1113da: 5e pop %esi 1113db: c9 leave 1113dc: c3 ret 1113dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 1113e0: 83 cb 02 or $0x2,%ebx 1113e3: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 1113e6: 51 push %ecx 1113e7: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 1113e8: 5b pop %ebx 1113e9: 5e pop %esi 1113ea: c9 leave 1113eb: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 1113ec: c6 05 e8 77 12 00 01 movb $0x1,0x1277e8 1113f3: eb e2 jmp 1113d7 <_Thread_Suspend+0x43> 1113f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1113f8: 8d 5a 04 lea 0x4(%edx),%ebx 1113fb: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 1113fd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 111404: 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; 111407: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11140d: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 111414: 66 21 1a and %bx,(%edx) the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 111417: 66 83 3a 00 cmpw $0x0,(%edx) 11141b: 75 a7 jne 1113c4 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 11141d: 66 8b 15 cc 77 12 00 mov 0x1277cc,%dx 111424: 23 90 98 00 00 00 and 0x98(%eax),%edx 11142a: 66 89 15 cc 77 12 00 mov %dx,0x1277cc 111431: eb 91 jmp 1113c4 <_Thread_Suspend+0x30> 111433: 90 nop <== 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 ); 111434: 66 8b 35 cc 77 12 00 mov 0x1277cc,%si 11143b: 31 d2 xor %edx,%edx 11143d: 89 d3 mov %edx,%ebx 11143f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 111443: 0f b7 db movzwl %bx,%ebx 111446: 66 8b b4 1b 60 78 12 mov 0x127860(%ebx,%ebx,1),%si 11144d: 00 11144e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 111452: c1 e3 04 shl $0x4,%ebx 111455: 0f b7 d2 movzwl %dx,%edx 111458: 8d 14 13 lea (%ebx,%edx,1),%edx 11145b: 8d 1c 52 lea (%edx,%edx,2),%ebx 11145e: 8b 15 e0 76 12 00 mov 0x1276e0,%edx 111464: 8b 14 9a mov (%edx,%ebx,4),%edx 111467: 89 15 a8 77 12 00 mov %edx,0x1277a8 11146d: e9 5d ff ff ff jmp 1113cf <_Thread_Suspend+0x3b> 0010e064 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e064: 55 push %ebp 10e065: 89 e5 mov %esp,%ebp 10e067: 53 push %ebx 10e068: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e06b: 8b 1d d8 77 12 00 mov 0x1277d8,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e071: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10e075: 74 19 je 10e090 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e077: 8b 43 10 mov 0x10(%ebx),%eax 10e07a: 85 c0 test %eax,%eax 10e07c: 75 12 jne 10e090 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e07e: 8b 43 7c mov 0x7c(%ebx),%eax 10e081: 83 f8 01 cmp $0x1,%eax 10e084: 72 0a jb 10e090 <_Thread_Tickle_timeslice+0x2c> 10e086: 83 f8 02 cmp $0x2,%eax 10e089: 76 29 jbe 10e0b4 <_Thread_Tickle_timeslice+0x50> 10e08b: 83 f8 03 cmp $0x3,%eax 10e08e: 74 08 je 10e098 <_Thread_Tickle_timeslice+0x34> if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e090: 8b 5d fc mov -0x4(%ebp),%ebx 10e093: c9 leave 10e094: c3 ret 10e095: 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 ) 10e098: 8b 43 78 mov 0x78(%ebx),%eax 10e09b: 48 dec %eax 10e09c: 89 43 78 mov %eax,0x78(%ebx) 10e09f: 85 c0 test %eax,%eax 10e0a1: 75 ed jne 10e090 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e0a3: 83 ec 0c sub $0xc,%esp 10e0a6: 53 push %ebx 10e0a7: ff 93 80 00 00 00 call *0x80(%ebx) 10e0ad: 83 c4 10 add $0x10,%esp 10e0b0: eb de jmp 10e090 <_Thread_Tickle_timeslice+0x2c> 10e0b2: 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 ) { 10e0b4: 8b 43 78 mov 0x78(%ebx),%eax 10e0b7: 48 dec %eax 10e0b8: 89 43 78 mov %eax,0x78(%ebx) 10e0bb: 85 c0 test %eax,%eax 10e0bd: 7f d1 jg 10e090 <_Thread_Tickle_timeslice+0x2c> _Thread_Reset_timeslice(); 10e0bf: e8 70 32 00 00 call 111334 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e0c4: a1 e4 76 12 00 mov 0x1276e4,%eax 10e0c9: 89 43 78 mov %eax,0x78(%ebx) 10e0cc: eb c2 jmp 10e090 <_Thread_Tickle_timeslice+0x2c> 0010e0d0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e0d0: 55 push %ebp 10e0d1: 89 e5 mov %esp,%ebp 10e0d3: 56 push %esi 10e0d4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e0d5: a1 d8 77 12 00 mov 0x1277d8,%eax ready = executing->ready; 10e0da: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e0e0: 9c pushf 10e0e1: fa cli 10e0e2: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e0e3: 8b 1a mov (%edx),%ebx 10e0e5: 3b 5a 08 cmp 0x8(%edx),%ebx 10e0e8: 74 3e je 10e128 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e0ea: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e0ec: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e0ef: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e0f2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e0f4: 8d 5a 04 lea 0x4(%edx),%ebx 10e0f7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e0f9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e0fc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e0ff: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e101: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e104: 51 push %ecx 10e105: 9d popf 10e106: fa cli if ( _Thread_Is_heir( executing ) ) 10e107: 3b 05 a8 77 12 00 cmp 0x1277a8,%eax 10e10d: 74 0d je 10e11c <_Thread_Yield_processor+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e10f: c6 05 e8 77 12 00 01 movb $0x1,0x1277e8 _ISR_Enable( level ); 10e116: 51 push %ecx 10e117: 9d popf } 10e118: 5b pop %ebx 10e119: 5e pop %esi 10e11a: c9 leave 10e11b: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e11c: 8b 02 mov (%edx),%eax 10e11e: a3 a8 77 12 00 mov %eax,0x1277a8 10e123: eb ea jmp 10e10f <_Thread_Yield_processor+0x3f> 10e125: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e128: 3b 05 a8 77 12 00 cmp 0x1277a8,%eax 10e12e: 75 df jne 10e10f <_Thread_Yield_processor+0x3f> 10e130: eb e4 jmp 10e116 <_Thread_Yield_processor+0x46> 0010cfc0 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10cfc0: 55 push %ebp 10cfc1: 89 e5 mov %esp,%ebp 10cfc3: 53 push %ebx 10cfc4: 83 ec 04 sub $0x4,%esp 10cfc7: 8b 5d 0c mov 0xc(%ebp),%ebx 10cfca: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10cfcd: 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 ) ) { 10cfd4: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10cfd8: 74 16 je 10cff0 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10cfda: 50 push %eax 10cfdb: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10cfdc: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10cfe3: 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 } 10cfe6: 8b 5d fc mov -0x4(%ebp),%ebx 10cfe9: c9 leave 10cfea: e9 5d 01 00 00 jmp 10d14c <_Thread_Clear_state> 10cfef: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10cff0: 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 ); 10cff7: 50 push %eax 10cff8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10cff9: 83 ec 0c sub $0xc,%esp 10cffc: 8d 43 48 lea 0x48(%ebx),%eax 10cfff: 50 push %eax 10d000: e8 73 15 00 00 call 10e578 <_Watchdog_Remove> 10d005: 83 c4 10 add $0x10,%esp 10d008: eb d2 jmp 10cfdc <_Thread_blocking_operation_Cancel+0x1c> 0010d8e8 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d8e8: 55 push %ebp 10d8e9: 89 e5 mov %esp,%ebp 10d8eb: 53 push %ebx 10d8ec: 83 ec 04 sub $0x4,%esp 10d8ef: 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 ) 10d8f2: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d8f6: 74 1c je 10d914 <_Thread_queue_Dequeue+0x2c> 10d8f8: b8 a0 10 11 00 mov $0x1110a0,%eax dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 10d8fd: 83 ec 0c sub $0xc,%esp 10d900: 53 push %ebx 10d901: ff d0 call *%eax _ISR_Disable( level ); 10d903: 9c pushf 10d904: fa cli 10d905: 5a pop %edx if ( !the_thread ) { 10d906: 83 c4 10 add $0x10,%esp 10d909: 85 c0 test %eax,%eax 10d90b: 74 0f je 10d91c <_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 ); 10d90d: 52 push %edx 10d90e: 9d popf return the_thread; } 10d90f: 8b 5d fc mov -0x4(%ebp),%ebx 10d912: c9 leave 10d913: c3 ret 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 ) 10d914: b8 34 d9 10 00 mov $0x10d934,%eax 10d919: eb e2 jmp 10d8fd <_Thread_queue_Dequeue+0x15> 10d91b: 90 nop <== NOT EXECUTED dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; 10d91c: 8b 4b 30 mov 0x30(%ebx),%ecx 10d91f: 49 dec %ecx 10d920: 83 f9 01 cmp $0x1,%ecx 10d923: 77 e8 ja 10d90d <_Thread_queue_Dequeue+0x25> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10d925: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10d92c: a1 d8 77 12 00 mov 0x1277d8,%eax 10d931: eb da jmp 10d90d <_Thread_queue_Dequeue+0x25> 0010d934 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d934: 55 push %ebp 10d935: 89 e5 mov %esp,%ebp 10d937: 57 push %edi 10d938: 56 push %esi 10d939: 53 push %ebx 10d93a: 83 ec 1c sub $0x1c,%esp 10d93d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10d940: 9c pushf 10d941: fa cli 10d942: 58 pop %eax 10d943: 89 f2 mov %esi,%edx 10d945: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d947: 8d 5a 04 lea 0x4(%edx),%ebx 10d94a: 39 1a cmp %ebx,(%edx) 10d94c: 75 1a jne 10d968 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d94e: 41 inc %ecx 10d94f: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d952: 83 f9 04 cmp $0x4,%ecx 10d955: 75 f0 jne 10d947 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d957: 50 push %eax 10d958: 9d popf 10d959: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d95b: 89 d8 mov %ebx,%eax 10d95d: 8d 65 f4 lea -0xc(%ebp),%esp 10d960: 5b pop %ebx 10d961: 5e pop %esi 10d962: 5f pop %edi 10d963: c9 leave 10d964: c3 ret 10d965: 8d 76 00 lea 0x0(%esi),%esi <== 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 *) 10d968: 8d 14 49 lea (%ecx,%ecx,2),%edx 10d96b: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d96e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10d975: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10d978: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d97a: 8b 73 04 mov 0x4(%ebx),%esi 10d97d: 8d 7b 3c lea 0x3c(%ebx),%edi 10d980: 39 fa cmp %edi,%edx 10d982: 74 76 je 10d9fa <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10d984: 8b 7b 40 mov 0x40(%ebx),%edi 10d987: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10d98a: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10d98c: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10d98e: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d991: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d993: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d996: 8b 4b 38 mov 0x38(%ebx),%ecx 10d999: 3b 4b 40 cmp 0x40(%ebx),%ecx 10d99c: 74 14 je 10d9b2 <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10d99e: 8d 4a 38 lea 0x38(%edx),%ecx 10d9a1: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10d9a4: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10d9a7: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d9aa: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10d9ad: 83 c2 3c add $0x3c,%edx 10d9b0: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10d9b2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d9b6: 74 18 je 10d9d0 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10d9b8: 50 push %eax 10d9b9: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d9ba: 83 ec 08 sub $0x8,%esp 10d9bd: 68 f8 ff 03 10 push $0x1003fff8 10d9c2: 53 push %ebx 10d9c3: e8 84 f7 ff ff call 10d14c <_Thread_Clear_state> 10d9c8: 83 c4 10 add $0x10,%esp 10d9cb: eb 8e jmp 10d95b <_Thread_queue_Dequeue_priority+0x27> 10d9cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d9d0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d9d7: 50 push %eax 10d9d8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d9d9: 83 ec 0c sub $0xc,%esp 10d9dc: 8d 43 48 lea 0x48(%ebx),%eax 10d9df: 50 push %eax 10d9e0: e8 93 0b 00 00 call 10e578 <_Watchdog_Remove> 10d9e5: 58 pop %eax 10d9e6: 5a pop %edx 10d9e7: 68 f8 ff 03 10 push $0x1003fff8 10d9ec: 53 push %ebx 10d9ed: e8 5a f7 ff ff call 10d14c <_Thread_Clear_state> 10d9f2: 83 c4 10 add $0x10,%esp 10d9f5: e9 61 ff ff ff jmp 10d95b <_Thread_queue_Dequeue_priority+0x27> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10d9fa: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10d9fc: 89 71 04 mov %esi,0x4(%ecx) 10d9ff: eb b1 jmp 10d9b2 <_Thread_queue_Dequeue_priority+0x7e> 00111118 <_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 ) { 111118: 55 push %ebp 111119: 89 e5 mov %esp,%ebp 11111b: 56 push %esi 11111c: 53 push %ebx 11111d: 8b 55 08 mov 0x8(%ebp),%edx 111120: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 111123: 9c pushf 111124: fa cli 111125: 59 pop %ecx sync_state = the_thread_queue->sync_state; 111126: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 111129: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 111130: 83 f8 01 cmp $0x1,%eax 111133: 74 0b je 111140 <_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; 111135: 8b 55 10 mov 0x10(%ebp),%edx 111138: 89 0a mov %ecx,(%edx) return sync_state; } 11113a: 5b pop %ebx 11113b: 5e pop %esi 11113c: c9 leave 11113d: c3 ret 11113e: 66 90 xchg %ax,%ax <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111140: 8d 72 04 lea 0x4(%edx),%esi 111143: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 111145: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 111148: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 11114b: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 11114d: 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; 111150: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 111153: 51 push %ecx 111154: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111155: 5b pop %ebx 111156: 5e pop %esi 111157: c9 leave 111158: c3 ret 0010da9c <_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 ) { 10da9c: 55 push %ebp 10da9d: 89 e5 mov %esp,%ebp 10da9f: 57 push %edi 10daa0: 56 push %esi 10daa1: 53 push %ebx 10daa2: 83 ec 08 sub $0x8,%esp 10daa5: 8b 7d 0c mov 0xc(%ebp),%edi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10daa8: 8d 47 3c lea 0x3c(%edi),%eax 10daab: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10daae: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10dab5: 8d 47 38 lea 0x38(%edi),%eax 10dab8: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10dabb: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10dabe: 89 d0 mov %edx,%eax 10dac0: c1 e8 06 shr $0x6,%eax 10dac3: 8d 04 40 lea (%eax,%eax,2),%eax 10dac6: 8b 4d 08 mov 0x8(%ebp),%ecx 10dac9: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10dacc: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10dacf: f6 c2 20 test $0x20,%dl 10dad2: 75 60 jne 10db34 <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dad4: 8d 46 04 lea 0x4(%esi),%eax 10dad7: 89 75 f0 mov %esi,-0x10(%ebp) 10dada: 89 7d ec mov %edi,-0x14(%ebp) 10dadd: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10dadf: 9c pushf 10dae0: fa cli 10dae1: 5e pop %esi search_thread = (Thread_Control *) header->first; 10dae2: 8b 4d f0 mov -0x10(%ebp),%ecx 10dae5: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10dae7: 39 f8 cmp %edi,%eax 10dae9: 75 17 jne 10db02 <_Thread_queue_Enqueue_priority+0x66> 10daeb: e9 09 01 00 00 jmp 10dbf9 <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10daf0: 56 push %esi 10daf1: 9d popf 10daf2: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10daf3: 85 58 10 test %ebx,0x10(%eax) 10daf6: 0f 84 a8 00 00 00 je 10dba4 <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10dafc: 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 ) ) { 10dafe: 39 f8 cmp %edi,%eax 10db00: 74 07 je 10db09 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10db02: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10db05: 39 ca cmp %ecx,%edx 10db07: 77 e7 ja 10daf0 <_Thread_queue_Enqueue_priority+0x54> 10db09: 89 4d f0 mov %ecx,-0x10(%ebp) 10db0c: 8b 7d ec mov -0x14(%ebp),%edi 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 ) ) { 10db0f: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10db11: 8b 4d 08 mov 0x8(%ebp),%ecx 10db14: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10db18: 0f 84 8e 00 00 00 je 10dbac <_Thread_queue_Enqueue_priority+0x110> * 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; 10db1e: 8b 45 10 mov 0x10(%ebp),%eax 10db21: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10db23: 8b 55 08 mov 0x8(%ebp),%edx 10db26: 8b 42 30 mov 0x30(%edx),%eax } 10db29: 83 c4 08 add $0x8,%esp 10db2c: 5b pop %ebx 10db2d: 5e pop %esi 10db2e: 5f pop %edi 10db2f: c9 leave 10db30: c3 ret 10db31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10db34: 89 7d f0 mov %edi,-0x10(%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; 10db37: 0f b6 0d 34 35 12 00 movzbl 0x123534,%ecx 10db3e: 41 inc %ecx _ISR_Disable( level ); 10db3f: 9c pushf 10db40: fa cli 10db41: 5f pop %edi search_thread = (Thread_Control *) header->last; 10db42: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10db45: 39 f0 cmp %esi,%eax 10db47: 75 12 jne 10db5b <_Thread_queue_Enqueue_priority+0xbf> 10db49: eb 17 jmp 10db62 <_Thread_queue_Enqueue_priority+0xc6> 10db4b: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10db4c: 57 push %edi 10db4d: 9d popf 10db4e: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10db4f: 85 58 10 test %ebx,0x10(%eax) 10db52: 74 4c je 10dba0 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10db54: 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 ) ) { 10db57: 39 f0 cmp %esi,%eax 10db59: 74 07 je 10db62 <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10db5b: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10db5e: 39 ca cmp %ecx,%edx 10db60: 72 ea jb 10db4c <_Thread_queue_Enqueue_priority+0xb0> 10db62: 89 fe mov %edi,%esi 10db64: 89 4d ec mov %ecx,-0x14(%ebp) 10db67: 8b 7d f0 mov -0x10(%ebp),%edi 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 ) ) { 10db6a: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10db6c: 8b 4d 08 mov 0x8(%ebp),%ecx 10db6f: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10db73: 75 a9 jne 10db1e <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10db75: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10db7c: 3b 55 ec cmp -0x14(%ebp),%edx 10db7f: 74 56 je 10dbd7 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10db81: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10db83: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10db85: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10db88: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10db8a: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10db8d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10db90: 56 push %esi 10db91: 9d popf 10db92: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10db97: 83 c4 08 add $0x8,%esp 10db9a: 5b pop %ebx 10db9b: 5e pop %esi 10db9c: 5f pop %edi 10db9d: c9 leave 10db9e: c3 ret 10db9f: 90 nop <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dba0: 57 push %edi 10dba1: 9d popf goto restart_reverse_search; 10dba2: eb 93 jmp 10db37 <_Thread_queue_Enqueue_priority+0x9b> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dba4: 56 push %esi <== NOT EXECUTED 10dba5: 9d popf <== NOT EXECUTED goto restart_forward_search; 10dba6: e9 34 ff ff ff jmp 10dadf <_Thread_queue_Enqueue_priority+0x43> <== NOT EXECUTED 10dbab: 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; 10dbac: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10dbb3: 3b 55 f0 cmp -0x10(%ebp),%edx 10dbb6: 74 1f je 10dbd7 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10dbb8: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dbbb: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dbbd: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dbc0: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dbc2: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dbc5: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10dbc8: 56 push %esi 10dbc9: 9d popf 10dbca: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dbcf: 83 c4 08 add $0x8,%esp 10dbd2: 5b pop %ebx 10dbd3: 5e pop %esi 10dbd4: 5f pop %edi 10dbd5: c9 leave 10dbd6: c3 ret 10dbd7: 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; 10dbda: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dbdd: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dbdf: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dbe2: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dbe4: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dbe7: 8b 45 08 mov 0x8(%ebp),%eax 10dbea: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dbed: 53 push %ebx 10dbee: 9d popf 10dbef: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dbf4: e9 30 ff ff ff jmp 10db29 <_Thread_queue_Enqueue_priority+0x8d> 10dbf9: 8b 7d ec mov -0x14(%ebp),%edi 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 ) ) { 10dbfc: 89 f3 mov %esi,%ebx 10dbfe: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10dc05: e9 07 ff ff ff jmp 10db11 <_Thread_queue_Enqueue_priority+0x75> 0010da04 <_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 ) { 10da04: 55 push %ebp 10da05: 89 e5 mov %esp,%ebp 10da07: 57 push %edi 10da08: 56 push %esi 10da09: 53 push %ebx 10da0a: 83 ec 24 sub $0x24,%esp 10da0d: 8b 75 08 mov 0x8(%ebp),%esi 10da10: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10da13: 8b 1d d8 77 12 00 mov 0x1277d8,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10da19: ff 76 38 pushl 0x38(%esi) 10da1c: 53 push %ebx 10da1d: e8 96 03 00 00 call 10ddb8 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10da22: 83 c4 10 add $0x10,%esp 10da25: 85 ff test %edi,%edi 10da27: 75 33 jne 10da5c <_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 ) 10da29: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10da2d: 74 64 je 10da93 <_Thread_queue_Enqueue_with_handler+0x8f> 10da2f: b8 18 11 11 00 mov $0x111118,%eax enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10da34: 51 push %ecx 10da35: 8d 55 e4 lea -0x1c(%ebp),%edx 10da38: 52 push %edx 10da39: 53 push %ebx 10da3a: 56 push %esi 10da3b: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10da3d: 83 c4 10 add $0x10,%esp 10da40: 83 f8 01 cmp $0x1,%eax 10da43: 74 0e je 10da53 <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10da45: 52 push %edx 10da46: ff 75 e4 pushl -0x1c(%ebp) 10da49: 53 push %ebx 10da4a: 50 push %eax 10da4b: e8 70 f5 ff ff call 10cfc0 <_Thread_blocking_operation_Cancel> 10da50: 83 c4 10 add $0x10,%esp } 10da53: 8d 65 f4 lea -0xc(%ebp),%esp 10da56: 5b pop %ebx 10da57: 5e pop %esi 10da58: 5f pop %edi 10da59: c9 leave 10da5a: c3 ret 10da5b: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10da5c: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10da5f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10da66: 8b 55 10 mov 0x10(%ebp),%edx 10da69: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10da6c: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10da6f: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10da76: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10da79: 83 ec 08 sub $0x8,%esp 10da7c: 8d 43 48 lea 0x48(%ebx),%eax 10da7f: 50 push %eax 10da80: 68 f8 77 12 00 push $0x1277f8 10da85: e8 b6 09 00 00 call 10e440 <_Watchdog_Insert> 10da8a: 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 ) 10da8d: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10da91: 75 9c jne 10da2f <_Thread_queue_Enqueue_with_handler+0x2b> 10da93: b8 9c da 10 00 mov $0x10da9c,%eax 10da98: eb 9a jmp 10da34 <_Thread_queue_Enqueue_with_handler+0x30> 0011115c <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 11115c: 55 push %ebp 11115d: 89 e5 mov %esp,%ebp 11115f: 83 ec 08 sub $0x8,%esp 111162: 8b 45 08 mov 0x8(%ebp),%eax 111165: 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 ) 111168: 83 78 34 01 cmpl $0x1,0x34(%eax) 11116c: 74 0e je 11117c <_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 ); 11116e: 89 55 0c mov %edx,0xc(%ebp) 111171: 89 45 08 mov %eax,0x8(%ebp) } 111174: 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 ); 111175: e9 06 1d 00 00 jmp 112e80 <_Thread_queue_Extract_fifo> 11117a: 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 ); 11117c: 51 push %ecx 11117d: 6a 00 push $0x0 11117f: 52 push %edx 111180: 50 push %eax 111181: e8 06 00 00 00 call 11118c <_Thread_queue_Extract_priority_helper> 111186: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 111189: c9 leave 11118a: c3 ret 00112e80 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 112e80: 55 push %ebp 112e81: 89 e5 mov %esp,%ebp 112e83: 53 push %ebx 112e84: 83 ec 04 sub $0x4,%esp 112e87: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 112e8a: 9c pushf 112e8b: fa cli 112e8c: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 112e8d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112e94: 74 2e je 112ec4 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112e96: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112e98: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 112e9b: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 112e9e: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112ea0: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 112ea7: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112eab: 74 1f je 112ecc <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 112ead: 50 push %eax 112eae: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 112eaf: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112eb6: 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 } 112eb9: 8b 5d fc mov -0x4(%ebp),%ebx 112ebc: c9 leave 112ebd: e9 8a a2 ff ff jmp 10d14c <_Thread_Clear_state> 112ec2: 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 ); 112ec4: 50 push %eax 112ec5: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112ec6: 8b 5d fc mov -0x4(%ebp),%ebx 112ec9: c9 leave 112eca: c3 ret 112ecb: 90 nop <== NOT EXECUTED 112ecc: 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 ); 112ed3: 50 push %eax 112ed4: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112ed5: 83 ec 0c sub $0xc,%esp 112ed8: 8d 43 48 lea 0x48(%ebx),%eax 112edb: 50 push %eax 112edc: e8 97 b6 ff ff call 10e578 <_Watchdog_Remove> 112ee1: 83 c4 10 add $0x10,%esp 112ee4: eb c9 jmp 112eaf <_Thread_queue_Extract_fifo+0x2f> 0011118c <_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 ) { 11118c: 55 push %ebp 11118d: 89 e5 mov %esp,%ebp 11118f: 57 push %edi 111190: 56 push %esi 111191: 53 push %ebx 111192: 83 ec 1c sub $0x1c,%esp 111195: 8b 5d 0c mov 0xc(%ebp),%ebx 111198: 8a 45 10 mov 0x10(%ebp),%al 11119b: 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 ); 11119e: 9c pushf 11119f: fa cli 1111a0: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1111a3: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1111aa: 74 6c je 111218 <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 1111ac: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 1111ae: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1111b1: 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; 1111b4: 8d 73 3c lea 0x3c(%ebx),%esi 1111b7: 39 f0 cmp %esi,%eax 1111b9: 74 69 je 111224 <_Thread_queue_Extract_priority_helper+0x98> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 1111bb: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 1111be: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 1111c0: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 1111c2: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 1111c5: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 1111c7: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 1111ca: 8b 53 38 mov 0x38(%ebx),%edx 1111cd: 3b 53 40 cmp 0x40(%ebx),%edx 1111d0: 74 11 je 1111e3 <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 1111d2: 8d 50 38 lea 0x38(%eax),%edx 1111d5: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 1111d8: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 1111db: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 1111de: 83 c0 3c add $0x3c,%eax 1111e1: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 1111e3: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 1111e7: 75 23 jne 11120c <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1111e9: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1111ed: 74 3d je 11122c <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 1111ef: ff 75 e4 pushl -0x1c(%ebp) 1111f2: 9d popf 1111f3: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 1111fa: 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 } 1111fd: 8d 65 f4 lea -0xc(%ebp),%esp 111200: 5b pop %ebx 111201: 5e pop %esi 111202: 5f pop %edi 111203: c9 leave 111204: e9 43 bf ff ff jmp 10d14c <_Thread_Clear_state> 111209: 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 ); 11120c: ff 75 e4 pushl -0x1c(%ebp) 11120f: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111210: 8d 65 f4 lea -0xc(%ebp),%esp 111213: 5b pop %ebx 111214: 5e pop %esi 111215: 5f pop %edi 111216: c9 leave 111217: 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 ); 111218: ff 75 e4 pushl -0x1c(%ebp) 11121b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11121c: 8d 65 f4 lea -0xc(%ebp),%esp 11121f: 5b pop %ebx 111220: 5e pop %esi 111221: 5f pop %edi 111222: c9 leave 111223: 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; 111224: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 111226: 89 4a 04 mov %ecx,0x4(%edx) 111229: eb b8 jmp 1111e3 <_Thread_queue_Extract_priority_helper+0x57> 11122b: 90 nop <== NOT EXECUTED 11122c: 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 ); 111233: ff 75 e4 pushl -0x1c(%ebp) 111236: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111237: 83 ec 0c sub $0xc,%esp 11123a: 8d 43 48 lea 0x48(%ebx),%eax 11123d: 50 push %eax 11123e: e8 35 d3 ff ff call 10e578 <_Watchdog_Remove> 111243: 83 c4 10 add $0x10,%esp 111246: eb ab jmp 1111f3 <_Thread_queue_Extract_priority_helper+0x67> 0010dc0c <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dc0c: 55 push %ebp 10dc0d: 89 e5 mov %esp,%ebp 10dc0f: 83 ec 08 sub $0x8,%esp 10dc12: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10dc15: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dc1c: 75 06 jne 10dc24 <_Thread_queue_Extract_with_proxy+0x18> 10dc1e: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10dc20: c9 leave 10dc21: c3 ret 10dc22: 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 ); 10dc24: 83 ec 08 sub $0x8,%esp 10dc27: 50 push %eax 10dc28: ff 70 44 pushl 0x44(%eax) 10dc2b: e8 2c 35 00 00 call 11115c <_Thread_queue_Extract> 10dc30: b0 01 mov $0x1,%al return true; 10dc32: 83 c4 10 add $0x10,%esp } return false; } 10dc35: c9 leave 10dc36: c3 ret 0010fab0 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 10fab0: 55 push %ebp 10fab1: 89 e5 mov %esp,%ebp 10fab3: 83 ec 08 sub $0x8,%esp 10fab6: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10fab9: 83 78 34 01 cmpl $0x1,0x34(%eax) 10fabd: 74 0d je 10facc <_Thread_queue_First+0x1c> 10fabf: ba 04 31 11 00 mov $0x113104,%edx 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 ); 10fac4: 89 45 08 mov %eax,0x8(%ebp) } 10fac7: 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 ); 10fac8: ff e2 jmp *%edx 10faca: 66 90 xchg %ax,%ax <== NOT EXECUTED Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10facc: ba d8 fa 10 00 mov $0x10fad8,%edx 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 ); 10fad1: 89 45 08 mov %eax,0x8(%ebp) } 10fad4: 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 ); 10fad5: ff e2 jmp *%edx 00113104 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 113104: 55 push %ebp 113105: 89 e5 mov %esp,%ebp 113107: 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)); 11310a: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11310c: 83 c2 04 add $0x4,%edx 11310f: 39 d0 cmp %edx,%eax 113111: 74 05 je 113118 <_Thread_queue_First_fifo+0x14> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 113113: c9 leave 113114: c3 ret 113115: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 113118: 31 c0 xor %eax,%eax 11311a: c9 leave 11311b: c3 ret 0010dc38 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dc38: 55 push %ebp 10dc39: 89 e5 mov %esp,%ebp 10dc3b: 56 push %esi 10dc3c: 53 push %ebx 10dc3d: 8b 5d 08 mov 0x8(%ebp),%ebx 10dc40: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dc43: eb 06 jmp 10dc4b <_Thread_queue_Flush+0x13> 10dc45: 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; 10dc48: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dc4b: 83 ec 0c sub $0xc,%esp 10dc4e: 53 push %ebx 10dc4f: e8 94 fc ff ff call 10d8e8 <_Thread_queue_Dequeue> 10dc54: 83 c4 10 add $0x10,%esp 10dc57: 85 c0 test %eax,%eax 10dc59: 75 ed jne 10dc48 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dc5b: 8d 65 f8 lea -0x8(%ebp),%esp 10dc5e: 5b pop %ebx 10dc5f: 5e pop %esi 10dc60: c9 leave 10dc61: c3 ret 0010dc64 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dc64: 55 push %ebp 10dc65: 89 e5 mov %esp,%ebp 10dc67: 8b 45 08 mov 0x8(%ebp),%eax 10dc6a: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dc6d: 8b 4d 10 mov 0x10(%ebp),%ecx 10dc70: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dc73: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dc76: 8b 4d 14 mov 0x14(%ebp),%ecx 10dc79: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dc7c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dc83: 4a dec %edx 10dc84: 74 12 je 10dc98 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dc86: 8d 50 04 lea 0x4(%eax),%edx 10dc89: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10dc8b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dc92: 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 ); } } 10dc95: c9 leave 10dc96: c3 ret 10dc97: 90 nop <== NOT EXECUTED * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10dc98: 8d 48 30 lea 0x30(%eax),%ecx */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dc9b: 8d 50 04 lea 0x4(%eax),%edx 10dc9e: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10dca0: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dca7: 89 40 08 mov %eax,0x8(%eax) 10dcaa: 83 c0 0c add $0xc,%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10dcad: 39 c8 cmp %ecx,%eax 10dcaf: 75 ea jne 10dc9b <_Thread_queue_Initialize+0x37> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10dcb1: c9 leave 10dcb2: c3 ret 00111248 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 111248: 55 push %ebp 111249: 89 e5 mov %esp,%ebp 11124b: 83 ec 08 sub $0x8,%esp 11124e: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 111251: 8b 50 44 mov 0x44(%eax),%edx * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 111254: 8b 4a 30 mov 0x30(%edx),%ecx 111257: 85 c9 test %ecx,%ecx 111259: 74 08 je 111263 <_Thread_queue_Process_timeout+0x1b> 11125b: 3b 05 d8 77 12 00 cmp 0x1277d8,%eax 111261: 74 19 je 11127c <_Thread_queue_Process_timeout+0x34> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111263: 8b 52 3c mov 0x3c(%edx),%edx 111266: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 111269: 83 ec 08 sub $0x8,%esp 11126c: 50 push %eax 11126d: ff 70 44 pushl 0x44(%eax) 111270: e8 e7 fe ff ff call 11115c <_Thread_queue_Extract> 111275: 83 c4 10 add $0x10,%esp } } 111278: c9 leave 111279: c3 ret 11127a: 66 90 xchg %ax,%ax <== NOT EXECUTED * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 11127c: 83 f9 03 cmp $0x3,%ecx 11127f: 74 f7 je 111278 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111281: 8b 4a 3c mov 0x3c(%edx),%ecx 111284: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 111287: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 11128e: c9 leave 11128f: c3 ret 0010dcb4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10dcb4: 55 push %ebp 10dcb5: 89 e5 mov %esp,%ebp 10dcb7: 57 push %edi 10dcb8: 56 push %esi 10dcb9: 53 push %ebx 10dcba: 83 ec 1c sub $0x1c,%esp 10dcbd: 8b 75 08 mov 0x8(%ebp),%esi 10dcc0: 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 ) 10dcc3: 85 f6 test %esi,%esi 10dcc5: 74 06 je 10dccd <_Thread_queue_Requeue+0x19> /* * 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 ) { 10dcc7: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dccb: 74 0b je 10dcd8 <_Thread_queue_Requeue+0x24> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10dccd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10dcd0: 5b pop %ebx <== NOT EXECUTED 10dcd1: 5e pop %esi <== NOT EXECUTED 10dcd2: 5f pop %edi <== NOT EXECUTED 10dcd3: c9 leave <== NOT EXECUTED 10dcd4: c3 ret <== NOT EXECUTED 10dcd5: 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 ); 10dcd8: 9c pushf 10dcd9: fa cli 10dcda: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dcdb: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10dce2: 75 0c jne 10dcf0 <_Thread_queue_Requeue+0x3c> _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 ); 10dce4: 53 push %ebx 10dce5: 9d popf } } 10dce6: 8d 65 f4 lea -0xc(%ebp),%esp 10dce9: 5b pop %ebx 10dcea: 5e pop %esi 10dceb: 5f pop %edi 10dcec: c9 leave 10dced: c3 ret 10dcee: 66 90 xchg %ax,%ax <== NOT EXECUTED 10dcf0: 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 ); 10dcf7: 50 push %eax 10dcf8: 6a 01 push $0x1 10dcfa: 57 push %edi 10dcfb: 56 push %esi 10dcfc: e8 8b 34 00 00 call 11118c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10dd01: 83 c4 0c add $0xc,%esp 10dd04: 8d 45 e4 lea -0x1c(%ebp),%eax 10dd07: 50 push %eax 10dd08: 57 push %edi 10dd09: 56 push %esi 10dd0a: e8 8d fd ff ff call 10da9c <_Thread_queue_Enqueue_priority> 10dd0f: 83 c4 10 add $0x10,%esp 10dd12: eb d0 jmp 10dce4 <_Thread_queue_Requeue+0x30> 00118b04 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118b04: 55 push %ebp 118b05: 89 e5 mov %esp,%ebp 118b07: 57 push %edi 118b08: 56 push %esi 118b09: 53 push %ebx 118b0a: 83 ec 4c sub $0x4c,%esp 118b0d: 8b 5d 08 mov 0x8(%ebp),%ebx 118b10: 8d 45 e0 lea -0x20(%ebp),%eax 118b13: 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); 118b16: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118b19: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 118b20: 8d 4d dc lea -0x24(%ebp),%ecx 118b23: 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; 118b26: 8d 7d d0 lea -0x30(%ebp),%edi 118b29: 8d 45 d4 lea -0x2c(%ebp),%eax 118b2c: 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); 118b2f: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118b32: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118b39: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118b3c: 8d 73 30 lea 0x30(%ebx),%esi /* * 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 ); 118b3f: 8d 4b 68 lea 0x68(%ebx),%ecx 118b42: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118b45: 8d 43 08 lea 0x8(%ebx),%eax 118b48: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118b4b: 8d 53 40 lea 0x40(%ebx),%edx 118b4e: 89 55 c0 mov %edx,-0x40(%ebp) 118b51: 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; 118b54: 8d 4d dc lea -0x24(%ebp),%ecx 118b57: 89 4b 78 mov %ecx,0x78(%ebx) 118b5a: 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; 118b5c: a1 64 1e 14 00 mov 0x141e64,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118b61: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118b64: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118b67: 51 push %ecx 118b68: 57 push %edi 118b69: 29 d0 sub %edx,%eax 118b6b: 50 push %eax 118b6c: 56 push %esi 118b6d: e8 7e 3c 00 00 call 11c7f0 <_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(); 118b72: a1 8c 1d 14 00 mov 0x141d8c,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118b77: 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 ) { 118b7a: 83 c4 10 add $0x10,%esp 118b7d: 39 d0 cmp %edx,%eax 118b7f: 77 63 ja 118be4 <_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 ) { 118b81: 72 7d jb 118c00 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118b83: 89 43 74 mov %eax,0x74(%ebx) 118b86: 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 ); 118b88: 8b 43 78 mov 0x78(%ebx),%eax 118b8b: 83 ec 0c sub $0xc,%esp 118b8e: 50 push %eax 118b8f: e8 84 08 00 00 call 119418 <_Chain_Get> if ( timer == NULL ) { 118b94: 83 c4 10 add $0x10,%esp 118b97: 85 c0 test %eax,%eax 118b99: 74 35 je 118bd0 <_Timer_server_Body+0xcc> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118b9b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118b9e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118ba1: 74 19 je 118bbc <_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 ) { 118ba3: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118ba6: 75 e0 jne 118b88 <_Timer_server_Body+0x84> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118ba8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118bab: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118bae: 50 push %eax <== NOT EXECUTED 118baf: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118bb2: e8 d1 3c 00 00 call 11c888 <_Watchdog_Insert> <== NOT EXECUTED 118bb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118bba: eb cc jmp 118b88 <_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 ); 118bbc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118bbf: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118bc2: 50 push %eax <== NOT EXECUTED 118bc3: 56 push %esi <== NOT EXECUTED 118bc4: e8 bf 3c 00 00 call 11c888 <_Watchdog_Insert> <== NOT EXECUTED 118bc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118bcc: eb ba jmp 118b88 <_Timer_server_Body+0x84> <== NOT EXECUTED 118bce: 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 ); 118bd0: 9c pushf 118bd1: fa cli 118bd2: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118bd3: 8b 55 b4 mov -0x4c(%ebp),%edx 118bd6: 3b 55 dc cmp -0x24(%ebp),%edx 118bd9: 74 41 je 118c1c <_Timer_server_Body+0x118> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118bdb: 50 push %eax <== NOT EXECUTED 118bdc: 9d popf <== NOT EXECUTED 118bdd: e9 7a ff ff ff jmp 118b5c <_Timer_server_Body+0x58> <== NOT EXECUTED 118be2: 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 ); 118be4: 51 push %ecx 118be5: 57 push %edi 118be6: 89 c1 mov %eax,%ecx 118be8: 29 d1 sub %edx,%ecx 118bea: 51 push %ecx 118beb: ff 75 c4 pushl -0x3c(%ebp) 118bee: 89 45 b8 mov %eax,-0x48(%ebp) 118bf1: e8 fa 3b 00 00 call 11c7f0 <_Watchdog_Adjust_to_chain> 118bf6: 83 c4 10 add $0x10,%esp 118bf9: 8b 45 b8 mov -0x48(%ebp),%eax 118bfc: eb 85 jmp 118b83 <_Timer_server_Body+0x7f> 118bfe: 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 ); 118c00: 51 push %ecx 118c01: 29 c2 sub %eax,%edx 118c03: 52 push %edx 118c04: 6a 01 push $0x1 118c06: ff 75 c4 pushl -0x3c(%ebp) 118c09: 89 45 b8 mov %eax,-0x48(%ebp) 118c0c: e8 67 3b 00 00 call 11c778 <_Watchdog_Adjust> 118c11: 83 c4 10 add $0x10,%esp 118c14: 8b 45 b8 mov -0x48(%ebp),%eax 118c17: e9 67 ff ff ff jmp 118b83 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118c1c: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118c23: 50 push %eax 118c24: 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 ) ) { 118c25: 8b 4d b0 mov -0x50(%ebp),%ecx 118c28: 3b 4d d0 cmp -0x30(%ebp),%ecx 118c2b: 75 23 jne 118c50 <_Timer_server_Body+0x14c> 118c2d: eb 33 jmp 118c62 <_Timer_server_Body+0x15e> 118c2f: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 118c30: 8b 10 mov (%eax),%edx the_chain->first = new_first; 118c32: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 118c35: 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; 118c38: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118c3f: 51 push %ecx 118c40: 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 ); 118c41: 83 ec 08 sub $0x8,%esp 118c44: ff 70 24 pushl 0x24(%eax) 118c47: ff 70 20 pushl 0x20(%eax) 118c4a: ff 50 1c call *0x1c(%eax) } 118c4d: 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 ); 118c50: 9c pushf 118c51: fa cli 118c52: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118c53: 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)) 118c56: 39 45 b0 cmp %eax,-0x50(%ebp) 118c59: 75 d5 jne 118c30 <_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 ); 118c5b: 51 push %ecx 118c5c: 9d popf 118c5d: e9 f2 fe ff ff jmp 118b54 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118c62: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118c66: a1 f8 1c 14 00 mov 0x141cf8,%eax 118c6b: 40 inc %eax 118c6c: a3 f8 1c 14 00 mov %eax,0x141cf8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118c71: 83 ec 08 sub $0x8,%esp 118c74: 6a 08 push $0x8 118c76: ff 33 pushl (%ebx) 118c78: e8 0b 33 00 00 call 11bf88 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118c7d: 89 d8 mov %ebx,%eax 118c7f: e8 e0 fd ff ff call 118a64 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118c84: 89 d8 mov %ebx,%eax 118c86: e8 29 fe ff ff call 118ab4 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118c8b: e8 ec 28 00 00 call 11b57c <_Thread_Enable_dispatch> ts->active = true; 118c90: 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 ); 118c94: 58 pop %eax 118c95: ff 75 bc pushl -0x44(%ebp) 118c98: e8 23 3d 00 00 call 11c9c0 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118c9d: 59 pop %ecx 118c9e: ff 75 c0 pushl -0x40(%ebp) 118ca1: e8 1a 3d 00 00 call 11c9c0 <_Watchdog_Remove> 118ca6: 83 c4 10 add $0x10,%esp 118ca9: e9 a6 fe ff ff jmp 118b54 <_Timer_server_Body+0x50> 00118a64 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118a64: 55 push %ebp 118a65: 89 e5 mov %esp,%ebp 118a67: 56 push %esi 118a68: 53 push %ebx 118a69: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118a6b: 8d 70 08 lea 0x8(%eax),%esi 118a6e: 83 ec 0c sub $0xc,%esp 118a71: 56 push %esi 118a72: e8 49 3f 00 00 call 11c9c0 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118a77: 9c pushf 118a78: fa cli 118a79: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118a7a: 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; 118a7d: 8d 53 34 lea 0x34(%ebx),%edx 118a80: 83 c4 10 add $0x10,%esp 118a83: 39 d0 cmp %edx,%eax 118a85: 74 21 je 118aa8 <_Timer_server_Reset_interval_system_watchdog+0x44> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 118a87: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 118a8a: 51 push %ecx 118a8b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118a8c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118a8f: 83 ec 08 sub $0x8,%esp 118a92: 56 push %esi 118a93: 68 d8 1d 14 00 push $0x141dd8 118a98: e8 eb 3d 00 00 call 11c888 <_Watchdog_Insert> 118a9d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118aa0: 8d 65 f8 lea -0x8(%ebp),%esp 118aa3: 5b pop %ebx 118aa4: 5e pop %esi 118aa5: c9 leave 118aa6: c3 ret 118aa7: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118aa8: 51 push %ecx 118aa9: 9d popf } } 118aaa: 8d 65 f8 lea -0x8(%ebp),%esp 118aad: 5b pop %ebx 118aae: 5e pop %esi 118aaf: c9 leave 118ab0: c3 ret 00118ab4 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118ab4: 55 push %ebp 118ab5: 89 e5 mov %esp,%ebp 118ab7: 56 push %esi 118ab8: 53 push %ebx 118ab9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118abb: 8d 70 40 lea 0x40(%eax),%esi 118abe: 83 ec 0c sub $0xc,%esp 118ac1: 56 push %esi 118ac2: e8 f9 3e 00 00 call 11c9c0 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118ac7: 9c pushf 118ac8: fa cli 118ac9: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118aca: 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; 118acd: 8d 53 6c lea 0x6c(%ebx),%edx 118ad0: 83 c4 10 add $0x10,%esp 118ad3: 39 d0 cmp %edx,%eax 118ad5: 74 21 je 118af8 <_Timer_server_Reset_tod_system_watchdog+0x44> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 118ad7: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 118ada: 51 push %ecx 118adb: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118adc: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118adf: 83 ec 08 sub $0x8,%esp 118ae2: 56 push %esi 118ae3: 68 cc 1d 14 00 push $0x141dcc 118ae8: e8 9b 3d 00 00 call 11c888 <_Watchdog_Insert> 118aed: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118af0: 8d 65 f8 lea -0x8(%ebp),%esp 118af3: 5b pop %ebx 118af4: 5e pop %esi 118af5: c9 leave 118af6: c3 ret 118af7: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118af8: 51 push %ecx 118af9: 9d popf } } 118afa: 8d 65 f8 lea -0x8(%ebp),%esp 118afd: 5b pop %ebx 118afe: 5e pop %esi 118aff: c9 leave 118b00: c3 ret 00118cb0 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118cb0: 55 push %ebp 118cb1: 89 e5 mov %esp,%ebp 118cb3: 57 push %edi 118cb4: 56 push %esi 118cb5: 53 push %ebx 118cb6: 83 ec 2c sub $0x2c,%esp 118cb9: 8b 5d 08 mov 0x8(%ebp),%ebx 118cbc: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118cbf: 8b 53 78 mov 0x78(%ebx),%edx 118cc2: 85 d2 test %edx,%edx 118cc4: 74 16 je 118cdc <_Timer_server_Schedule_operation_method+0x2c> * 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 ); 118cc6: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118cc9: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118ccc: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118ccf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118cd2: 5b pop %ebx <== NOT EXECUTED 118cd3: 5e pop %esi <== NOT EXECUTED 118cd4: 5f pop %edi <== NOT EXECUTED 118cd5: 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 ); 118cd6: e9 19 07 00 00 jmp 1193f4 <_Chain_Append> <== NOT EXECUTED 118cdb: 90 nop <== NOT EXECUTED 118cdc: 8b 15 f8 1c 14 00 mov 0x141cf8,%edx 118ce2: 42 inc %edx 118ce3: 89 15 f8 1c 14 00 mov %edx,0x141cf8 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118ce9: 8b 50 38 mov 0x38(%eax),%edx 118cec: 83 fa 01 cmp $0x1,%edx 118cef: 74 77 je 118d68 <_Timer_server_Schedule_operation_method+0xb8> _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 ) { 118cf1: 83 fa 03 cmp $0x3,%edx 118cf4: 74 0e je 118d04 <_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 ); } } 118cf6: 8d 65 f4 lea -0xc(%ebp),%esp 118cf9: 5b pop %ebx 118cfa: 5e pop %esi 118cfb: 5f pop %edi 118cfc: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118cfd: e9 7a 28 00 00 jmp 11b57c <_Thread_Enable_dispatch> 118d02: 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 ); 118d04: 9c pushf 118d05: fa cli 118d06: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118d09: 8b 0d 8c 1d 14 00 mov 0x141d8c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118d0f: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d12: 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; 118d15: 8d 7b 6c lea 0x6c(%ebx),%edi 118d18: 39 fa cmp %edi,%edx 118d1a: 74 22 je 118d3e <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118d1c: 8b 7a 10 mov 0x10(%edx),%edi 118d1f: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 118d22: 39 f1 cmp %esi,%ecx 118d24: 0f 86 9e 00 00 00 jbe 118dc8 <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118d2a: 89 cf mov %ecx,%edi 118d2c: 29 f7 sub %esi,%edi 118d2e: 89 fe mov %edi,%esi if (delta_interval > delta) { 118d30: 39 7d d4 cmp %edi,-0x2c(%ebp) 118d33: 0f 87 9b 00 00 00 ja 118dd4 <_Timer_server_Schedule_operation_method+0x124> 118d39: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118d3b: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 118d3e: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 118d41: ff 75 e4 pushl -0x1c(%ebp) 118d44: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118d45: 83 ec 08 sub $0x8,%esp 118d48: 83 c0 10 add $0x10,%eax 118d4b: 50 push %eax 118d4c: 8d 43 68 lea 0x68(%ebx),%eax 118d4f: 50 push %eax 118d50: e8 33 3b 00 00 call 11c888 <_Watchdog_Insert> if ( !ts->active ) { 118d55: 8a 43 7c mov 0x7c(%ebx),%al 118d58: 83 c4 10 add $0x10,%esp 118d5b: 84 c0 test %al,%al 118d5d: 75 97 jne 118cf6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 118d5f: 89 d8 mov %ebx,%eax 118d61: e8 4e fd ff ff call 118ab4 <_Timer_server_Reset_tod_system_watchdog> 118d66: eb 8e jmp 118cf6 <_Timer_server_Schedule_operation_method+0x46> 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 ); 118d68: 9c pushf 118d69: fa cli 118d6a: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 118d6d: 8b 0d 64 1e 14 00 mov 0x141e64,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 118d73: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d76: 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; 118d79: 8d 7b 34 lea 0x34(%ebx),%edi 118d7c: 39 fa cmp %edi,%edx 118d7e: 74 12 je 118d92 <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 118d80: 89 cf mov %ecx,%edi 118d82: 29 f7 sub %esi,%edi 118d84: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 118d86: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 118d89: 39 fe cmp %edi,%esi 118d8b: 72 37 jb 118dc4 <_Timer_server_Schedule_operation_method+0x114> 118d8d: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 118d8f: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 118d92: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 118d95: ff 75 e4 pushl -0x1c(%ebp) 118d98: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118d99: 83 ec 08 sub $0x8,%esp 118d9c: 83 c0 10 add $0x10,%eax 118d9f: 50 push %eax 118da0: 8d 43 30 lea 0x30(%ebx),%eax 118da3: 50 push %eax 118da4: e8 df 3a 00 00 call 11c888 <_Watchdog_Insert> if ( !ts->active ) { 118da9: 8a 43 7c mov 0x7c(%ebx),%al 118dac: 83 c4 10 add $0x10,%esp 118daf: 84 c0 test %al,%al 118db1: 0f 85 3f ff ff ff jne 118cf6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 118db7: 89 d8 mov %ebx,%eax 118db9: e8 a6 fc ff ff call 118a64 <_Timer_server_Reset_interval_system_watchdog> 118dbe: e9 33 ff ff ff jmp 118cf6 <_Timer_server_Schedule_operation_method+0x46> 118dc3: 90 nop <== NOT EXECUTED */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 118dc4: 29 f7 sub %esi,%edi 118dc6: eb c7 jmp 118d8f <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 118dc8: 8b 7d d4 mov -0x2c(%ebp),%edi 118dcb: 01 f7 add %esi,%edi delta_interval += delta; 118dcd: 29 cf sub %ecx,%edi 118dcf: e9 67 ff ff ff jmp 118d3b <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 118dd4: 8b 7d d4 mov -0x2c(%ebp),%edi 118dd7: 29 f7 sub %esi,%edi 118dd9: e9 5d ff ff ff jmp 118d3b <_Timer_server_Schedule_operation_method+0x8b> 0010fa38 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fa38: 55 push %ebp 10fa39: 89 e5 mov %esp,%ebp 10fa3b: 57 push %edi 10fa3c: 56 push %esi 10fa3d: 53 push %ebx 10fa3e: 83 ec 2c sub $0x2c,%esp 10fa41: 8b 45 08 mov 0x8(%ebp),%eax 10fa44: 8b 5d 0c mov 0xc(%ebp),%ebx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fa47: 8b 10 mov (%eax),%edx 10fa49: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10fa4c: 8b 78 04 mov 0x4(%eax),%edi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fa4f: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10fa54: 8b 03 mov (%ebx),%eax 10fa56: f7 e9 imul %ecx 10fa58: 89 45 d0 mov %eax,-0x30(%ebp) 10fa5b: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10fa5e: 8b 5b 04 mov 0x4(%ebx),%ebx 10fa61: 89 de mov %ebx,%esi 10fa63: c1 fe 1f sar $0x1f,%esi 10fa66: 01 5d d0 add %ebx,-0x30(%ebp) 10fa69: 11 75 d4 adc %esi,-0x2c(%ebp) if ( right == 0 ) { 10fa6c: 8b 55 d4 mov -0x2c(%ebp),%edx 10fa6f: 0b 55 d0 or -0x30(%ebp),%edx 10fa72: 74 7c je 10faf0 <_Timespec_Divide+0xb8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fa74: 8b 45 e0 mov -0x20(%ebp),%eax 10fa77: f7 e9 imul %ecx 10fa79: 89 45 e0 mov %eax,-0x20(%ebp) 10fa7c: 89 55 e4 mov %edx,-0x1c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10fa7f: 89 fb mov %edi,%ebx 10fa81: c1 fb 1f sar $0x1f,%ebx 10fa84: 01 7d e0 add %edi,-0x20(%ebp) 10fa87: 11 5d e4 adc %ebx,-0x1c(%ebp) 10fa8a: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10fa91: b9 a0 86 01 00 mov $0x186a0,%ecx 10fa96: 8b 45 e0 mov -0x20(%ebp),%eax 10fa99: f7 e1 mul %ecx 10fa9b: 89 45 e0 mov %eax,-0x20(%ebp) 10fa9e: 01 da add %ebx,%edx 10faa0: 89 55 e4 mov %edx,-0x1c(%ebp) 10faa3: ff 75 d4 pushl -0x2c(%ebp) 10faa6: ff 75 d0 pushl -0x30(%ebp) 10faa9: ff 75 e4 pushl -0x1c(%ebp) 10faac: ff 75 e0 pushl -0x20(%ebp) 10faaf: e8 38 0f 01 00 call 1209ec <__udivdi3> 10fab4: 83 c4 10 add $0x10,%esp 10fab7: 89 c3 mov %eax,%ebx 10fab9: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fabb: 6a 00 push $0x0 10fabd: 68 e8 03 00 00 push $0x3e8 10fac2: 52 push %edx 10fac3: 50 push %eax 10fac4: e8 23 0f 01 00 call 1209ec <__udivdi3> 10fac9: 83 c4 10 add $0x10,%esp 10facc: 8b 55 10 mov 0x10(%ebp),%edx 10facf: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fad1: 6a 00 push $0x0 10fad3: 68 e8 03 00 00 push $0x3e8 10fad8: 56 push %esi 10fad9: 53 push %ebx 10fada: e8 1d 10 01 00 call 120afc <__umoddi3> 10fadf: 83 c4 10 add $0x10,%esp 10fae2: 8b 55 14 mov 0x14(%ebp),%edx 10fae5: 89 02 mov %eax,(%edx) } 10fae7: 8d 65 f4 lea -0xc(%ebp),%esp 10faea: 5b pop %ebx 10faeb: 5e pop %esi 10faec: 5f pop %edi 10faed: c9 leave 10faee: c3 ret 10faef: 90 nop <== 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; 10faf0: 8b 45 10 mov 0x10(%ebp),%eax 10faf3: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10faf9: 8b 55 14 mov 0x14(%ebp),%edx 10fafc: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fb02: 8d 65 f4 lea -0xc(%ebp),%esp 10fb05: 5b pop %ebx 10fb06: 5e pop %esi 10fb07: 5f pop %edi 10fb08: c9 leave 10fb09: c3 ret 001293bc <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 1293bc: 55 push %ebp 1293bd: 89 e5 mov %esp,%ebp 1293bf: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 1293c2: 85 c0 test %eax,%eax 1293c4: 74 1a je 1293e0 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 1293c6: 8b 10 mov (%eax),%edx 1293c8: 85 d2 test %edx,%edx 1293ca: 78 14 js 1293e0 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 1293cc: 8b 40 04 mov 0x4(%eax),%eax 1293cf: 85 c0 test %eax,%eax 1293d1: 78 0d js 1293e0 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 1293d3: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 1293d8: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 1293db: c9 leave 1293dc: c3 ret 1293dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include #include #include bool _Timespec_Is_valid( 1293e0: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 1293e2: c9 leave 1293e3: c3 ret 001114bc <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 1114bc: 55 push %ebp 1114bd: 89 e5 mov %esp,%ebp 1114bf: 56 push %esi 1114c0: 53 push %ebx 1114c1: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 1114c4: 8b 33 mov (%ebx),%esi 1114c6: 85 f6 test %esi,%esi 1114c8: 75 07 jne 1114d1 <_Timespec_To_ticks+0x15> 1114ca: 8b 43 04 mov 0x4(%ebx),%eax 1114cd: 85 c0 test %eax,%eax 1114cf: 74 37 je 111508 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 1114d1: e8 96 18 00 00 call 112d6c 1114d6: 89 c1 mov %eax,%ecx 1114d8: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 1114db: a1 4c 35 12 00 mov 0x12354c,%eax 1114e0: 8d 04 80 lea (%eax,%eax,4),%eax 1114e3: 8d 04 80 lea (%eax,%eax,4),%eax 1114e6: 8d 34 80 lea (%eax,%eax,4),%esi 1114e9: c1 e6 03 shl $0x3,%esi 1114ec: 8b 43 04 mov 0x4(%ebx),%eax 1114ef: 31 d2 xor %edx,%edx 1114f1: f7 f6 div %esi if (ticks) 1114f3: 01 c8 add %ecx,%eax 1114f5: 74 05 je 1114fc <_Timespec_To_ticks+0x40> return ticks; return 1; } 1114f7: 5b pop %ebx 1114f8: 5e pop %esi 1114f9: c9 leave 1114fa: c3 ret 1114fb: 90 nop <== NOT EXECUTED ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 1114fc: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 111501: 5b pop %ebx 111502: 5e pop %esi 111503: c9 leave 111504: c3 ret 111505: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 111508: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 11150a: 5b pop %ebx 11150b: 5e pop %esi 11150c: c9 leave 11150d: c3 ret 00113018 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 113018: 55 push %ebp 113019: 89 e5 mov %esp,%ebp 11301b: 53 push %ebx 11301c: 83 ec 10 sub $0x10,%esp 11301f: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 113022: 53 push %ebx 113023: e8 2c 50 00 00 call 118054 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 113028: 83 c4 10 add $0x10,%esp 11302b: 8b 43 24 mov 0x24(%ebx),%eax 11302e: 85 c0 test %eax,%eax 113030: 74 12 je 113044 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 113032: 83 c3 08 add $0x8,%ebx 113035: 89 5d 08 mov %ebx,0x8(%ebp) } 113038: 8b 5d fc mov -0x4(%ebp),%ebx 11303b: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 11303c: e9 13 50 00 00 jmp 118054 <_Chain_Extract> 113041: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 113044: 8b 5d fc mov -0x4(%ebp),%ebx 113047: c9 leave 113048: c3 ret 0010fe18 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10fe18: 55 push %ebp 10fe19: 89 e5 mov %esp,%ebp 10fe1b: 57 push %edi 10fe1c: 56 push %esi 10fe1d: 53 push %ebx 10fe1e: 83 ec 1c sub $0x1c,%esp 10fe21: 8b 75 08 mov 0x8(%ebp),%esi 10fe24: 8b 4d 0c mov 0xc(%ebp),%ecx 10fe27: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fe2a: 9c pushf 10fe2b: fa cli 10fe2c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fe2d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fe2f: 8d 7e 04 lea 0x4(%esi),%edi 10fe32: 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 ) ) { 10fe35: 39 fa cmp %edi,%edx 10fe37: 74 3d je 10fe76 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10fe39: 85 c9 test %ecx,%ecx 10fe3b: 75 43 jne 10fe80 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fe3d: 85 db test %ebx,%ebx 10fe3f: 74 35 je 10fe76 <_Watchdog_Adjust+0x5e> if ( units < _Watchdog_First( header )->delta_interval ) { 10fe41: 8b 7a 10 mov 0x10(%edx),%edi 10fe44: 39 fb cmp %edi,%ebx 10fe46: 73 0f jae 10fe57 <_Watchdog_Adjust+0x3f> 10fe48: eb 3e jmp 10fe88 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10fe4a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fe4c: 29 fb sub %edi,%ebx 10fe4e: 74 26 je 10fe76 <_Watchdog_Adjust+0x5e> if ( units < _Watchdog_First( header )->delta_interval ) { 10fe50: 8b 7a 10 mov 0x10(%edx),%edi 10fe53: 39 df cmp %ebx,%edi 10fe55: 77 31 ja 10fe88 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10fe57: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10fe5e: 50 push %eax 10fe5f: 9d popf _Watchdog_Tickle( header ); 10fe60: 83 ec 0c sub $0xc,%esp 10fe63: 56 push %esi 10fe64: e8 cb 01 00 00 call 110034 <_Watchdog_Tickle> _ISR_Disable( level ); 10fe69: 9c pushf 10fe6a: fa cli 10fe6b: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fe6c: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10fe6e: 83 c4 10 add $0x10,%esp 10fe71: 39 55 e4 cmp %edx,-0x1c(%ebp) 10fe74: 75 d6 jne 10fe4c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10fe76: 50 push %eax 10fe77: 9d popf } 10fe78: 8d 65 f4 lea -0xc(%ebp),%esp 10fe7b: 5b pop %ebx 10fe7c: 5e pop %esi 10fe7d: 5f pop %edi 10fe7e: c9 leave 10fe7f: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10fe80: 49 dec %ecx 10fe81: 75 f3 jne 10fe76 <_Watchdog_Adjust+0x5e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10fe83: 01 5a 10 add %ebx,0x10(%edx) break; 10fe86: eb ee jmp 10fe76 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10fe88: 29 df sub %ebx,%edi 10fe8a: 89 7a 10 mov %edi,0x10(%edx) break; 10fe8d: eb e7 jmp 10fe76 <_Watchdog_Adjust+0x5e> 0011c7f0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11c7f0: 55 push %ebp 11c7f1: 89 e5 mov %esp,%ebp 11c7f3: 57 push %edi 11c7f4: 56 push %esi 11c7f5: 53 push %ebx 11c7f6: 83 ec 0c sub $0xc,%esp 11c7f9: 8b 75 08 mov 0x8(%ebp),%esi 11c7fc: 8b 55 0c mov 0xc(%ebp),%edx 11c7ff: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11c802: 85 d2 test %edx,%edx 11c804: 74 63 je 11c869 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11c806: 9c pushf 11c807: fa cli 11c808: 8f 45 ec popl -0x14(%ebp) 11c80b: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11c80d: 8d 4e 04 lea 0x4(%esi),%ecx 11c810: 89 4d f0 mov %ecx,-0x10(%ebp) 11c813: 8d 7b 04 lea 0x4(%ebx),%edi 11c816: 89 55 e8 mov %edx,-0x18(%ebp) 11c819: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11c81c: 39 45 f0 cmp %eax,-0x10(%ebp) 11c81f: 74 44 je 11c865 <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 11c821: 8b 50 10 mov 0x10(%eax),%edx 11c824: 3b 55 e8 cmp -0x18(%ebp),%edx 11c827: 77 57 ja 11c880 <_Watchdog_Adjust_to_chain+0x90> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 11c829: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11c82c: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11c833: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11c834: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11c836: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11c839: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11c83c: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11c83e: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11c840: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11c843: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11c846: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11c848: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11c84b: ff 75 ec pushl -0x14(%ebp) 11c84e: 9d popf 11c84f: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11c850: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11c852: 39 45 f0 cmp %eax,-0x10(%ebp) 11c855: 74 1d je 11c874 <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11c857: 8b 50 10 mov 0x10(%eax),%edx 11c85a: 85 d2 test %edx,%edx 11c85c: 74 d6 je 11c834 <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c85e: 8b 4d e8 mov -0x18(%ebp),%ecx 11c861: 85 c9 test %ecx,%ecx 11c863: 75 b7 jne 11c81c <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11c865: ff 75 ec pushl -0x14(%ebp) 11c868: 9d popf } 11c869: 83 c4 0c add $0xc,%esp 11c86c: 5b pop %ebx 11c86d: 5e pop %esi 11c86e: 5f pop %edi 11c86f: c9 leave 11c870: c3 ret 11c871: 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; 11c874: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c877: 8b 4d e8 mov -0x18(%ebp),%ecx 11c87a: 85 c9 test %ecx,%ecx 11c87c: 75 9e jne 11c81c <_Watchdog_Adjust_to_chain+0x2c> 11c87e: eb e5 jmp 11c865 <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 11c880: 2b 55 e8 sub -0x18(%ebp),%edx 11c883: 89 50 10 mov %edx,0x10(%eax) break; 11c886: eb dd jmp 11c865 <_Watchdog_Adjust_to_chain+0x75> 0010e440 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e440: 55 push %ebp 10e441: 89 e5 mov %esp,%ebp 10e443: 57 push %edi 10e444: 56 push %esi 10e445: 53 push %ebx 10e446: 83 ec 04 sub $0x4,%esp 10e449: 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; 10e44c: 8b 3d b4 77 12 00 mov 0x1277b4,%edi _ISR_Disable( level ); 10e452: 9c pushf 10e453: fa cli 10e454: 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 ) { 10e457: 8b 43 08 mov 0x8(%ebx),%eax 10e45a: 85 c0 test %eax,%eax 10e45c: 0f 85 9e 00 00 00 jne 10e500 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e462: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e469: a1 80 78 12 00 mov 0x127880,%eax 10e46e: 40 inc %eax 10e46f: a3 80 78 12 00 mov %eax,0x127880 restart: delta_interval = the_watchdog->initial; 10e474: 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 ; 10e477: 8b 4d 08 mov 0x8(%ebp),%ecx 10e47a: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e47c: 85 c0 test %eax,%eax 10e47e: 74 5d je 10e4dd <_Watchdog_Insert+0x9d> 10e480: 8b 32 mov (%edx),%esi 10e482: 85 f6 test %esi,%esi 10e484: 74 57 je 10e4dd <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e486: 8b 4a 10 mov 0x10(%edx),%ecx 10e489: 39 c8 cmp %ecx,%eax 10e48b: 73 22 jae 10e4af <_Watchdog_Insert+0x6f> 10e48d: eb 49 jmp 10e4d8 <_Watchdog_Insert+0x98> 10e48f: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e490: 8b 35 d4 77 12 00 mov 0x1277d4,%esi 10e496: 39 f7 cmp %esi,%edi 10e498: 72 72 jb 10e50c <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e49a: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10e49c: 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 ) ) 10e49e: 85 c0 test %eax,%eax 10e4a0: 74 3b je 10e4dd <_Watchdog_Insert+0x9d> 10e4a2: 8b 0a mov (%edx),%ecx 10e4a4: 85 c9 test %ecx,%ecx 10e4a6: 74 35 je 10e4dd <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e4a8: 8b 4a 10 mov 0x10(%edx),%ecx 10e4ab: 39 c1 cmp %eax,%ecx 10e4ad: 77 29 ja 10e4d8 <_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 ); 10e4af: ff 75 f0 pushl -0x10(%ebp) 10e4b2: 9d popf 10e4b3: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e4b4: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e4b8: 74 d6 je 10e490 <_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; 10e4ba: 89 3d d4 77 12 00 mov %edi,0x1277d4 _Watchdog_Sync_count--; 10e4c0: a1 80 78 12 00 mov 0x127880,%eax 10e4c5: 48 dec %eax 10e4c6: a3 80 78 12 00 mov %eax,0x127880 _ISR_Enable( level ); 10e4cb: ff 75 f0 pushl -0x10(%ebp) 10e4ce: 9d popf } 10e4cf: 58 pop %eax 10e4d0: 5b pop %ebx 10e4d1: 5e pop %esi 10e4d2: 5f pop %edi 10e4d3: c9 leave 10e4d4: c3 ret 10e4d5: 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; 10e4d8: 29 c1 sub %eax,%ecx 10e4da: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e4dd: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e4e4: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e4e7: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e4ea: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e4ed: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e4ef: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e4f1: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e4f3: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e4f6: a1 84 78 12 00 mov 0x127884,%eax 10e4fb: 89 43 14 mov %eax,0x14(%ebx) 10e4fe: eb ba jmp 10e4ba <_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 ); 10e500: ff 75 f0 pushl -0x10(%ebp) 10e503: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e504: 58 pop %eax 10e505: 5b pop %ebx 10e506: 5e pop %esi 10e507: 5f pop %edi 10e508: c9 leave 10e509: c3 ret 10e50a: 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; 10e50c: 89 3d d4 77 12 00 mov %edi,0x1277d4 goto restart; 10e512: e9 5d ff ff ff jmp 10e474 <_Watchdog_Insert+0x34> 0010e578 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e578: 55 push %ebp 10e579: 89 e5 mov %esp,%ebp 10e57b: 56 push %esi 10e57c: 53 push %ebx 10e57d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e580: 9c pushf 10e581: fa cli 10e582: 59 pop %ecx previous_state = the_watchdog->state; 10e583: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e586: 83 f8 01 cmp $0x1,%eax 10e589: 74 4d je 10e5d8 <_Watchdog_Remove+0x60> 10e58b: 73 0f jae 10e59c <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e58d: 8b 1d 84 78 12 00 mov 0x127884,%ebx 10e593: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e596: 51 push %ecx 10e597: 9d popf return( previous_state ); } 10e598: 5b pop %ebx 10e599: 5e pop %esi 10e59a: c9 leave 10e59b: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e59c: 83 f8 03 cmp $0x3,%eax 10e59f: 77 ec ja 10e58d <_Watchdog_Remove+0x15> break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e5a1: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10e5a8: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e5aa: 8b 33 mov (%ebx),%esi 10e5ac: 85 f6 test %esi,%esi 10e5ae: 74 06 je 10e5b6 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e5b0: 8b 72 10 mov 0x10(%edx),%esi 10e5b3: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e5b6: 8b 35 80 78 12 00 mov 0x127880,%esi 10e5bc: 85 f6 test %esi,%esi 10e5be: 74 0c je 10e5cc <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e5c0: 8b 35 b4 77 12 00 mov 0x1277b4,%esi 10e5c6: 89 35 d4 77 12 00 mov %esi,0x1277d4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e5cc: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e5cf: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e5d2: 89 1e mov %ebx,(%esi) 10e5d4: eb b7 jmp 10e58d <_Watchdog_Remove+0x15> 10e5d6: 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; 10e5d8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e5df: eb ac jmp 10e58d <_Watchdog_Remove+0x15> 0010fa0c <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fa0c: 55 push %ebp 10fa0d: 89 e5 mov %esp,%ebp 10fa0f: 57 push %edi 10fa10: 56 push %esi 10fa11: 53 push %ebx 10fa12: 83 ec 2c sub $0x2c,%esp 10fa15: 8b 55 08 mov 0x8(%ebp),%edx 10fa18: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fa1b: 8b 78 24 mov 0x24(%eax),%edi 10fa1e: 8b 70 20 mov 0x20(%eax),%esi 10fa21: 8b 58 1c mov 0x1c(%eax),%ebx 10fa24: 8b 48 0c mov 0xc(%eax),%ecx 10fa27: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fa2a: 8b 48 10 mov 0x10(%eax),%ecx 10fa2d: 89 4d e0 mov %ecx,-0x20(%ebp) 10fa30: 85 d2 test %edx,%edx 10fa32: 74 2c je 10fa60 <_Watchdog_Report+0x54> 10fa34: b9 e3 2a 12 00 mov $0x122ae3,%ecx 10fa39: 83 ec 0c sub $0xc,%esp 10fa3c: 57 push %edi 10fa3d: 56 push %esi 10fa3e: 53 push %ebx 10fa3f: 50 push %eax 10fa40: ff 75 d4 pushl -0x2c(%ebp) 10fa43: ff 75 e0 pushl -0x20(%ebp) 10fa46: 51 push %ecx 10fa47: 52 push %edx 10fa48: 68 66 34 12 00 push $0x123466 10fa4d: e8 82 9e ff ff call 1098d4 10fa52: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fa55: 8d 65 f4 lea -0xc(%ebp),%esp 10fa58: 5b pop %ebx 10fa59: 5e pop %esi 10fa5a: 5f pop %edi 10fa5b: c9 leave 10fa5c: c3 ret 10fa5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fa60: b9 c5 32 12 00 mov $0x1232c5,%ecx 10fa65: 89 ca mov %ecx,%edx 10fa67: eb d0 jmp 10fa39 <_Watchdog_Report+0x2d> 0010e6b0 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e6b0: 55 push %ebp 10e6b1: 89 e5 mov %esp,%ebp 10e6b3: 57 push %edi 10e6b4: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e6b5: 8b 1d 40 35 12 00 mov 0x123540,%ebx uintptr_t size = Configuration.work_space_size; 10e6bb: 8b 15 44 35 12 00 mov 0x123544,%edx if ( Configuration.do_zero_of_workspace ) 10e6c1: 80 3d 68 35 12 00 00 cmpb $0x0,0x123568 10e6c8: 75 1e jne 10e6e8 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e6ca: 6a 04 push $0x4 10e6cc: 52 push %edx 10e6cd: 53 push %ebx 10e6ce: 68 40 77 12 00 push $0x127740 10e6d3: e8 3c dd ff ff call 10c414 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e6d8: 83 c4 10 add $0x10,%esp 10e6db: 85 c0 test %eax,%eax 10e6dd: 74 13 je 10e6f2 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e6df: 8d 65 f8 lea -0x8(%ebp),%esp 10e6e2: 5b pop %ebx 10e6e3: 5f pop %edi 10e6e4: c9 leave 10e6e5: c3 ret 10e6e6: 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 ); 10e6e8: 31 c0 xor %eax,%eax 10e6ea: 89 df mov %ebx,%edi 10e6ec: 89 d1 mov %edx,%ecx 10e6ee: f3 aa rep stos %al,%es:(%edi) 10e6f0: eb d8 jmp 10e6ca <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e6f2: 52 push %edx 10e6f3: 6a 03 push $0x3 10e6f5: 6a 01 push $0x1 10e6f7: 6a 00 push $0x0 10e6f9: e8 3a e0 ff ff call 10c738 <_Internal_error_Occurred> 0010b438 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10b438: 55 push %ebp 10b439: 89 e5 mov %esp,%ebp 10b43b: 57 push %edi 10b43c: 56 push %esi 10b43d: 53 push %ebx 10b43e: 83 ec 1c sub $0x1c,%esp 10b441: 8b 5d 08 mov 0x8(%ebp),%ebx 10b444: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10b447: 85 db test %ebx,%ebx 10b449: 0f 84 f1 00 00 00 je 10b540 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10b44f: 8b 53 04 mov 0x4(%ebx),%edx 10b452: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10b458: 0f 87 e2 00 00 00 ja 10b540 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10b45e: 85 f6 test %esi,%esi 10b460: 74 10 je 10b472 olddelta->tv_sec = 0; 10b462: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10b468: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10b46f: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10b472: 8b 03 mov (%ebx),%eax 10b474: 8d 04 80 lea (%eax,%eax,4),%eax 10b477: 8d 04 80 lea (%eax,%eax,4),%eax 10b47a: 8d 04 80 lea (%eax,%eax,4),%eax 10b47d: 8d 04 80 lea (%eax,%eax,4),%eax 10b480: 8d 04 80 lea (%eax,%eax,4),%eax 10b483: 8d 04 80 lea (%eax,%eax,4),%eax 10b486: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10b489: 8d 04 02 lea (%edx,%eax,1),%eax 10b48c: 3b 05 4c 49 12 00 cmp 0x12494c,%eax 10b492: 73 0c jae 10b4a0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 10b494: 31 c0 xor %eax,%eax return 0; } 10b496: 8d 65 f4 lea -0xc(%ebp),%esp 10b499: 5b pop %ebx 10b49a: 5e pop %esi 10b49b: 5f pop %edi 10b49c: c9 leave 10b49d: c3 ret 10b49e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b4a0: a1 58 8c 12 00 mov 0x128c58,%eax 10b4a5: 40 inc %eax 10b4a6: a3 58 8c 12 00 mov %eax,0x128c58 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10b4ab: 83 ec 0c sub $0xc,%esp 10b4ae: 8d 7d e0 lea -0x20(%ebp),%edi 10b4b1: 57 push %edi 10b4b2: e8 71 17 00 00 call 10cc28 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10b4b7: 8b 03 mov (%ebx),%eax 10b4b9: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10b4bc: 8b 43 04 mov 0x4(%ebx),%eax 10b4bf: 8d 04 80 lea (%eax,%eax,4),%eax 10b4c2: 8d 04 80 lea (%eax,%eax,4),%eax 10b4c5: 8d 04 80 lea (%eax,%eax,4),%eax 10b4c8: c1 e0 03 shl $0x3,%eax 10b4cb: 03 45 e4 add -0x1c(%ebp),%eax 10b4ce: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b4d1: 83 c4 10 add $0x10,%esp 10b4d4: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b4d9: 76 18 jbe 10b4f3 10b4db: 8b 55 e0 mov -0x20(%ebp),%edx 10b4de: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10b4e0: 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( 10b4e5: 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 ) { 10b4e6: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b4eb: 77 f3 ja 10b4e0 10b4ed: 89 45 e4 mov %eax,-0x1c(%ebp) 10b4f0: 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) ) { 10b4f3: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b4f8: 77 19 ja 10b513 10b4fa: 8b 55 e0 mov -0x20(%ebp),%edx 10b4fd: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10b500: 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( 10b505: 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) ) { 10b506: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b50b: 76 f3 jbe 10b500 10b50d: 89 45 e4 mov %eax,-0x1c(%ebp) 10b510: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10b513: 83 ec 0c sub $0xc,%esp 10b516: 57 push %edi 10b517: e8 98 17 00 00 call 10ccb4 <_TOD_Set> _Thread_Enable_dispatch(); 10b51c: e8 5b 29 00 00 call 10de7c <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10b521: 83 c4 10 add $0x10,%esp 10b524: 85 f6 test %esi,%esi 10b526: 0f 84 68 ff ff ff je 10b494 *olddelta = *delta; 10b52c: 8b 03 mov (%ebx),%eax 10b52e: 8b 53 04 mov 0x4(%ebx),%edx 10b531: 89 06 mov %eax,(%esi) 10b533: 89 56 04 mov %edx,0x4(%esi) 10b536: 31 c0 xor %eax,%eax return 0; } 10b538: 8d 65 f4 lea -0xc(%ebp),%esp 10b53b: 5b pop %ebx 10b53c: 5e pop %esi 10b53d: 5f pop %edi 10b53e: c9 leave 10b53f: c3 ret */ 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 ); 10b540: e8 f3 8c 00 00 call 114238 <__errno> 10b545: c7 00 16 00 00 00 movl $0x16,(%eax) 10b54b: b8 ff ff ff ff mov $0xffffffff,%eax 10b550: e9 41 ff ff ff jmp 10b496 0010b350 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10b350: 55 push %ebp 10b351: 89 e5 mov %esp,%ebp 10b353: 83 ec 08 sub $0x8,%esp 10b356: 8b 45 08 mov 0x8(%ebp),%eax 10b359: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b35c: 85 d2 test %edx,%edx 10b35e: 74 14 je 10b374 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b360: 83 f8 01 cmp $0x1,%eax 10b363: 74 47 je 10b3ac _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10b365: 83 f8 04 cmp $0x4,%eax 10b368: 74 32 je 10b39c return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10b36a: 83 f8 02 cmp $0x2,%eax 10b36d: 74 2d je 10b39c return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b36f: 83 f8 03 cmp $0x3,%eax 10b372: 74 14 je 10b388 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b374: e8 0b 93 00 00 call 114684 <__errno> 10b379: c7 00 16 00 00 00 movl $0x16,(%eax) 10b37f: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b384: c9 leave 10b385: c3 ret 10b386: 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 ); 10b388: e8 f7 92 00 00 call 114684 <__errno> 10b38d: c7 00 58 00 00 00 movl $0x58,(%eax) 10b393: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b398: c9 leave 10b399: c3 ret 10b39a: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10b39c: 83 ec 0c sub $0xc,%esp 10b39f: 52 push %edx 10b3a0: e8 87 1e 00 00 call 10d22c <_TOD_Get_uptime_as_timespec> 10b3a5: 31 c0 xor %eax,%eax return 0; 10b3a7: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b3aa: c9 leave 10b3ab: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10b3ac: 83 ec 0c sub $0xc,%esp 10b3af: 52 push %edx 10b3b0: e8 1f 1e 00 00 call 10d1d4 <_TOD_Get> 10b3b5: 31 c0 xor %eax,%eax return 0; 10b3b7: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b3ba: c9 leave 10b3bb: c3 ret 0012ce84 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 12ce84: 55 push %ebp 12ce85: 89 e5 mov %esp,%ebp 12ce87: 83 ec 08 sub $0x8,%esp 12ce8a: 8b 45 08 mov 0x8(%ebp),%eax 12ce8d: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 12ce90: 85 d2 test %edx,%edx 12ce92: 74 0f je 12cea3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 12ce94: 83 f8 01 cmp $0x1,%eax 12ce97: 74 1f je 12ceb8 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 12ce99: 83 f8 02 cmp $0x2,%eax 12ce9c: 74 42 je 12cee0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 12ce9e: 83 f8 03 cmp $0x3,%eax 12cea1: 74 3d je 12cee0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 12cea3: e8 fc 59 01 00 call 1428a4 <__errno> 12cea8: c7 00 16 00 00 00 movl $0x16,(%eax) 12ceae: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 12ceb3: c9 leave 12ceb4: c3 ret 12ceb5: 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 ) 12ceb8: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 12cebe: 76 e3 jbe 12cea3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 12cec0: a1 f8 ee 16 00 mov 0x16eef8,%eax 12cec5: 40 inc %eax 12cec6: a3 f8 ee 16 00 mov %eax,0x16eef8 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 12cecb: 83 ec 0c sub $0xc,%esp 12cece: 52 push %edx 12cecf: e8 ec 1b 00 00 call 12eac0 <_TOD_Set> _Thread_Enable_dispatch(); 12ced4: e8 3f 6a fe ff call 113918 <_Thread_Enable_dispatch> 12ced9: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 12cedb: 83 c4 10 add $0x10,%esp } 12cede: c9 leave 12cedf: 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 ); 12cee0: e8 bf 59 01 00 call 1428a4 <__errno> 12cee5: c7 00 58 00 00 00 movl $0x58,(%eax) 12ceeb: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 12cef0: c9 leave 12cef1: c3 ret 0010b130 : int getitimer( int which, struct itimerval *value ) { 10b130: 55 push %ebp 10b131: 89 e5 mov %esp,%ebp 10b133: 83 ec 08 sub $0x8,%esp if ( !value ) 10b136: 8b 45 0c mov 0xc(%ebp),%eax 10b139: 85 c0 test %eax,%eax 10b13b: 74 2f je 10b16c rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b13d: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b141: 76 15 jbe 10b158 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b143: e8 68 8e 00 00 call 113fb0 <__errno> 10b148: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b14e: b8 ff ff ff ff mov $0xffffffff,%eax 10b153: c9 leave 10b154: c3 ret 10b155: 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 ); 10b158: e8 53 8e 00 00 call 113fb0 <__errno> 10b15d: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b163: b8 ff ff ff ff mov $0xffffffff,%eax 10b168: c9 leave 10b169: c3 ret 10b16a: 66 90 xchg %ax,%ax <== NOT EXECUTED int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b16c: e8 3f 8e 00 00 call 113fb0 <__errno> 10b171: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b177: eb d5 jmp 10b14e 00113320 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 113320: 55 push %ebp 113321: 89 e5 mov %esp,%ebp 113323: 57 push %edi 113324: 56 push %esi 113325: 53 push %ebx 113326: 83 ec 3c sub $0x3c,%esp 113329: 8b 75 0c mov 0xc(%ebp),%esi 11332c: 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() ) 11332f: e8 70 f0 ff ff call 1123a4 113334: 3b 45 08 cmp 0x8(%ebp),%eax 113337: 0f 85 2f 02 00 00 jne 11356c rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 11333d: 85 f6 test %esi,%esi 11333f: 0f 84 3c 02 00 00 je 113581 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 113345: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 113348: 83 f9 1f cmp $0x1f,%ecx 11334b: 0f 87 30 02 00 00 ja 113581 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 ) 113351: 8d 04 76 lea (%esi,%esi,2),%eax 113354: 83 3c 85 08 7d 12 00 cmpl $0x1,0x127d08(,%eax,4) 11335b: 01 11335c: 0f 84 cf 00 00 00 je 113431 /* * 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 ) ) 113362: 83 fe 08 cmp $0x8,%esi 113365: 0f 84 d1 00 00 00 je 11343c 11336b: 83 fe 04 cmp $0x4,%esi 11336e: 0f 84 c8 00 00 00 je 11343c 113374: 83 fe 0b cmp $0xb,%esi 113377: 0f 84 bf 00 00 00 je 11343c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 11337d: bb 01 00 00 00 mov $0x1,%ebx 113382: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 113384: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 113387: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 11338e: 85 ff test %edi,%edi 113390: 0f 84 ca 01 00 00 je 113560 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 113396: 8b 07 mov (%edi),%eax 113398: 89 45 e4 mov %eax,-0x1c(%ebp) 11339b: a1 18 77 12 00 mov 0x127718,%eax 1133a0: 40 inc %eax 1133a1: a3 18 77 12 00 mov %eax,0x127718 /* * 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; 1133a6: 8b 0d d8 77 12 00 mov 0x1277d8,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1133ac: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 1133b2: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 1133b8: f7 d0 not %eax 1133ba: 85 c3 test %eax,%ebx 1133bc: 75 34 jne 1133f2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 1133be: a1 a0 7e 12 00 mov 0x127ea0,%eax 1133c3: 3d a4 7e 12 00 cmp $0x127ea4,%eax 1133c8: 75 1b jne 1133e5 1133ca: e9 89 00 00 00 jmp 113458 1133cf: 90 nop <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 1133d0: 8b 92 cc 00 00 00 mov 0xcc(%edx),%edx 1133d6: f7 d2 not %edx 1133d8: 85 d3 test %edx,%ebx 1133da: 75 16 jne 1133f2 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 ) { 1133dc: 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 ; 1133de: 3d a4 7e 12 00 cmp $0x127ea4,%eax 1133e3: 74 73 je 113458 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 1133e5: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1133e7: 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) 1133ed: 85 58 30 test %ebx,0x30(%eax) 1133f0: 74 de je 1133d0 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 1133f2: c6 41 74 01 movb $0x1,0x74(%ecx) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 1133f6: 50 push %eax 1133f7: 8d 45 dc lea -0x24(%ebp),%eax 1133fa: 50 push %eax 1133fb: 56 push %esi 1133fc: 51 push %ecx 1133fd: e8 1e 02 00 00 call 113620 <_POSIX_signals_Unblock_thread> 113402: 83 c4 10 add $0x10,%esp 113405: 84 c0 test %al,%al 113407: 0f 85 47 01 00 00 jne 113554 /* * 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 ); 11340d: 83 ec 0c sub $0xc,%esp 113410: 53 push %ebx 113411: e8 e6 01 00 00 call 1135fc <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 113416: 8d 1c 76 lea (%esi,%esi,2),%ebx 113419: c1 e3 02 shl $0x2,%ebx 11341c: 83 c4 10 add $0x10,%esp 11341f: 83 bb 00 7d 12 00 02 cmpl $0x2,0x127d00(%ebx) 113426: 0f 84 ec 00 00 00 je 113518 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 11342c: e8 c3 a0 ff ff call 10d4f4 <_Thread_Enable_dispatch> 113431: 31 c0 xor %eax,%eax return 0; } 113433: 8d 65 f4 lea -0xc(%ebp),%esp 113436: 5b pop %ebx 113437: 5e pop %esi 113438: 5f pop %edi 113439: c9 leave 11343a: c3 ret 11343b: 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 ); 11343c: e8 c3 03 00 00 call 113804 113441: 83 ec 08 sub $0x8,%esp 113444: 56 push %esi 113445: 50 push %eax 113446: e8 f1 02 00 00 call 11373c 11344b: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 11344e: 8d 65 f4 lea -0xc(%ebp),%esp 113451: 5b pop %ebx 113452: 5e pop %esi 113453: 5f pop %edi 113454: c9 leave 113455: c3 ret 113456: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 113458: 0f b6 05 34 35 12 00 movzbl 0x123534,%eax 11345f: 40 inc %eax 113460: 89 45 d4 mov %eax,-0x2c(%ebp) 113463: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 11346a: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) 113471: 89 5d cc mov %ebx,-0x34(%ebp) 113474: 89 75 c0 mov %esi,-0x40(%ebp) for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 113477: 8b 55 d0 mov -0x30(%ebp),%edx 11347a: 8b 04 95 ec 76 12 00 mov 0x1276ec(,%edx,4),%eax 113481: 85 c0 test %eax,%eax 113483: 74 6c je 1134f1 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 113485: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 113488: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 11348c: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 11348f: 85 f6 test %esi,%esi 113491: 74 5e je 1134f1 113493: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 113498: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 11349b: 85 d2 test %edx,%edx 11349d: 74 4d je 1134ec /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 11349f: 8b 4a 14 mov 0x14(%edx),%ecx 1134a2: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1134a5: 77 45 ja 1134ec DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1134a7: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 1134ad: 8b 9b cc 00 00 00 mov 0xcc(%ebx),%ebx 1134b3: f7 d3 not %ebx 1134b5: 85 5d cc test %ebx,-0x34(%ebp) 1134b8: 74 32 je 1134ec * * 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 ) { 1134ba: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1134bd: 72 25 jb 1134e4 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 1134bf: 8b 5d c8 mov -0x38(%ebp),%ebx 1134c2: 8b 5b 10 mov 0x10(%ebx),%ebx 1134c5: 89 5d c4 mov %ebx,-0x3c(%ebp) 1134c8: 85 db test %ebx,%ebx 1134ca: 74 20 je 1134ec /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 1134cc: 8b 5a 10 mov 0x10(%edx),%ebx 1134cf: 85 db test %ebx,%ebx 1134d1: 74 11 je 1134e4 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 1134d3: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 1134da: 75 10 jne 1134ec DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 1134dc: 81 e3 00 00 00 10 and $0x10000000,%ebx 1134e2: 74 08 je 1134ec 1134e4: 89 4d d4 mov %ecx,-0x2c(%ebp) 1134e7: 89 55 c8 mov %edx,-0x38(%ebp) 1134ea: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1134ec: 40 inc %eax 1134ed: 39 c6 cmp %eax,%esi 1134ef: 73 a7 jae 113498 * + 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++) { 1134f1: ff 45 d0 incl -0x30(%ebp) 1134f4: 83 7d d0 05 cmpl $0x5,-0x30(%ebp) 1134f8: 0f 85 79 ff ff ff jne 113477 1134fe: 8b 5d cc mov -0x34(%ebp),%ebx 113501: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 113504: 8b 55 c8 mov -0x38(%ebp),%edx 113507: 85 d2 test %edx,%edx 113509: 0f 84 fe fe ff ff je 11340d 11350f: 8b 4d c8 mov -0x38(%ebp),%ecx 113512: e9 db fe ff ff jmp 1133f2 113517: 90 nop <== NOT EXECUTED */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 113518: 83 ec 0c sub $0xc,%esp 11351b: 68 80 7e 12 00 push $0x127e80 113520: e8 b7 89 ff ff call 10bedc <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 113525: 83 c4 10 add $0x10,%esp 113528: 85 c0 test %eax,%eax 11352a: 74 6a je 113596 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 11352c: 8d 78 08 lea 0x8(%eax),%edi 11352f: 8d 75 dc lea -0x24(%ebp),%esi 113532: b9 03 00 00 00 mov $0x3,%ecx 113537: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 113539: 83 ec 08 sub $0x8,%esp 11353c: 50 push %eax 11353d: 81 c3 00 7f 12 00 add $0x127f00,%ebx 113543: 53 push %ebx 113544: e8 6f 89 ff ff call 10beb8 <_Chain_Append> 113549: 83 c4 10 add $0x10,%esp 11354c: e9 db fe ff ff jmp 11342c 113551: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 113554: e8 9b 9f ff ff call 10d4f4 <_Thread_Enable_dispatch> 113559: 31 c0 xor %eax,%eax return 0; 11355b: e9 ee fe ff ff jmp 11344e */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 113560: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 113567: e9 2f fe ff ff jmp 11339b /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 11356c: e8 23 03 00 00 call 113894 <__errno> 113571: c7 00 03 00 00 00 movl $0x3,(%eax) 113577: b8 ff ff ff ff mov $0xffffffff,%eax 11357c: e9 cd fe ff ff jmp 11344e */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 113581: e8 0e 03 00 00 call 113894 <__errno> 113586: c7 00 16 00 00 00 movl $0x16,(%eax) 11358c: b8 ff ff ff ff mov $0xffffffff,%eax 113591: e9 b8 fe ff ff jmp 11344e 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(); 113596: e8 59 9f ff ff call 10d4f4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 11359b: e8 f4 02 00 00 call 113894 <__errno> 1135a0: c7 00 0b 00 00 00 movl $0xb,(%eax) 1135a6: 83 c8 ff or $0xffffffff,%eax 1135a9: e9 a0 fe ff ff jmp 11344e 0010f7b8 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10f7b8: 55 push %ebp 10f7b9: 89 e5 mov %esp,%ebp 10f7bb: 57 push %edi 10f7bc: 56 push %esi 10f7bd: 83 ec 14 sub $0x14,%esp 10f7c0: 8b 75 0c mov 0xc(%ebp),%esi 10f7c3: 8d 45 f4 lea -0xc(%ebp),%eax 10f7c6: 50 push %eax 10f7c7: ff 75 08 pushl 0x8(%ebp) 10f7ca: 68 e0 06 13 00 push $0x1306e0 10f7cf: e8 94 31 00 00 call 112968 <_Objects_Get> POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10f7d4: 83 c4 10 add $0x10,%esp 10f7d7: 8b 4d f4 mov -0xc(%ebp),%ecx 10f7da: 85 c9 test %ecx,%ecx 10f7dc: 74 1a je 10f7f8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10f7de: e8 29 9f 00 00 call 11970c <__errno> 10f7e3: c7 00 09 00 00 00 movl $0x9,(%eax) 10f7e9: b8 ff ff ff ff mov $0xffffffff,%eax 10f7ee: 66 90 xchg %ax,%ax } 10f7f0: 8d 65 f8 lea -0x8(%ebp),%esp 10f7f3: 5e pop %esi 10f7f4: 5f pop %edi 10f7f5: c9 leave 10f7f6: c3 ret 10f7f7: 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; 10f7f8: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10f7fb: 85 f6 test %esi,%esi 10f7fd: 74 39 je 10f838 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10f7ff: 8b 50 7c mov 0x7c(%eax),%edx 10f802: 85 d2 test %edx,%edx 10f804: 75 46 jne 10f84c CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; the_message_queue->notify_argument = the_argument; 10f806: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10f80d: 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; 10f810: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10f816: b9 05 00 00 00 mov $0x5,%ecx 10f81b: 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; 10f81d: c7 40 7c 64 f8 10 00 movl $0x10f864,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10f824: 89 80 80 00 00 00 mov %eax,0x80(%eax) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10f82a: e8 fd 39 00 00 call 11322c <_Thread_Enable_dispatch> 10f82f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10f831: 8d 65 f8 lea -0x8(%ebp),%esp 10f834: 5e pop %esi 10f835: 5f pop %edi 10f836: c9 leave 10f837: 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; 10f838: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10f83f: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10f846: 00 00 00 10f849: eb df jmp 10f82a 10f84b: 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(); 10f84c: e8 db 39 00 00 call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10f851: e8 b6 9e 00 00 call 11970c <__errno> 10f856: c7 00 10 00 00 00 movl $0x10,(%eax) 10f85c: b8 ff ff ff ff mov $0xffffffff,%eax 10f861: eb 8d jmp 10f7f0 0010f89c : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10f89c: 55 push %ebp 10f89d: 89 e5 mov %esp,%ebp 10f89f: 57 push %edi 10f8a0: 56 push %esi 10f8a1: 53 push %ebx 10f8a2: 83 ec 2c sub $0x2c,%esp 10f8a5: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10f8a8: a1 78 01 13 00 mov 0x130178,%eax 10f8ad: 40 inc %eax 10f8ae: a3 78 01 13 00 mov %eax,0x130178 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10f8b3: 89 f0 mov %esi,%eax 10f8b5: 25 00 02 00 00 and $0x200,%eax 10f8ba: 89 45 d4 mov %eax,-0x2c(%ebp) 10f8bd: 0f 85 c9 00 00 00 jne 10f98c 10f8c3: 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 *) 10f8ca: 83 ec 0c sub $0xc,%esp 10f8cd: 68 e0 06 13 00 push $0x1306e0 10f8d2: e8 e1 2b 00 00 call 1124b8 <_Objects_Allocate> 10f8d7: 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 ) { 10f8d9: 83 c4 10 add $0x10,%esp 10f8dc: 85 c0 test %eax,%eax 10f8de: 0f 84 b4 00 00 00 je 10f998 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10f8e4: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10f8e7: 83 ec 08 sub $0x8,%esp 10f8ea: 8d 45 e4 lea -0x1c(%ebp),%eax 10f8ed: 50 push %eax 10f8ee: ff 75 08 pushl 0x8(%ebp) 10f8f1: e8 26 65 00 00 call 115e1c <_POSIX_Message_queue_Name_to_id> 10f8f6: 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 ) { 10f8f8: 83 c4 10 add $0x10,%esp 10f8fb: 85 c0 test %eax,%eax 10f8fd: 75 59 jne 10f958 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10f8ff: 81 e6 00 0a 00 00 and $0xa00,%esi 10f905: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10f90b: 0f 84 a7 00 00 00 je 10f9b8 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 10f911: 50 push %eax 10f912: 8d 45 dc lea -0x24(%ebp),%eax 10f915: 50 push %eax 10f916: ff 75 e4 pushl -0x1c(%ebp) 10f919: 68 40 05 13 00 push $0x130540 10f91e: e8 45 30 00 00 call 112968 <_Objects_Get> /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 10f923: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10f926: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10f929: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f92c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10f930: a1 fc 06 13 00 mov 0x1306fc,%eax 10f935: 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; 10f938: 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(); 10f93f: e8 e8 38 00 00 call 11322c <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10f944: e8 e3 38 00 00 call 11322c <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10f949: 8b 43 08 mov 0x8(%ebx),%eax 10f94c: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f94f: 8d 65 f4 lea -0xc(%ebp),%esp 10f952: 5b pop %ebx 10f953: 5e pop %esi 10f954: 5f pop %edi 10f955: c9 leave 10f956: c3 ret 10f957: 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) ) ) { 10f958: 83 f8 02 cmp $0x2,%eax 10f95b: 0f 84 87 00 00 00 je 10f9e8 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 ); 10f961: 83 ec 08 sub $0x8,%esp 10f964: 53 push %ebx 10f965: 68 e0 06 13 00 push $0x1306e0 10f96a: e8 c9 2e 00 00 call 112838 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f96f: e8 b8 38 00 00 call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10f974: e8 93 9d 00 00 call 11970c <__errno> 10f979: 89 38 mov %edi,(%eax) 10f97b: b8 ff ff ff ff mov $0xffffffff,%eax 10f980: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f983: 8d 65 f4 lea -0xc(%ebp),%esp 10f986: 5b pop %ebx 10f987: 5e pop %esi 10f988: 5f pop %edi 10f989: c9 leave 10f98a: c3 ret 10f98b: 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 * ); 10f98c: 8b 45 14 mov 0x14(%ebp),%eax 10f98f: 89 45 d0 mov %eax,-0x30(%ebp) 10f992: e9 33 ff ff ff jmp 10f8ca 10f997: 90 nop <== NOT EXECUTED va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10f998: e8 8f 38 00 00 call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10f99d: e8 6a 9d 00 00 call 11970c <__errno> 10f9a2: c7 00 17 00 00 00 movl $0x17,(%eax) 10f9a8: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f9ad: 8d 65 f4 lea -0xc(%ebp),%esp 10f9b0: 5b pop %ebx 10f9b1: 5e pop %esi 10f9b2: 5f pop %edi 10f9b3: c9 leave 10f9b4: c3 ret 10f9b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10f9b8: 83 ec 08 sub $0x8,%esp 10f9bb: 53 push %ebx 10f9bc: 68 e0 06 13 00 push $0x1306e0 10f9c1: e8 72 2e 00 00 call 112838 <_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(); 10f9c6: e8 61 38 00 00 call 11322c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10f9cb: e8 3c 9d 00 00 call 11970c <__errno> 10f9d0: c7 00 11 00 00 00 movl $0x11,(%eax) 10f9d6: b8 ff ff ff ff mov $0xffffffff,%eax 10f9db: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f9de: 8d 65 f4 lea -0xc(%ebp),%esp 10f9e1: 5b pop %ebx 10f9e2: 5e pop %esi 10f9e3: 5f pop %edi 10f9e4: c9 leave 10f9e5: c3 ret 10f9e6: 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) ) ) { 10f9e8: 8b 55 d4 mov -0x2c(%ebp),%edx 10f9eb: 85 d2 test %edx,%edx 10f9ed: 0f 84 6e ff ff ff je 10f961 /* * 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( 10f9f3: 8d 45 e0 lea -0x20(%ebp),%eax 10f9f6: 50 push %eax 10f9f7: ff 75 d0 pushl -0x30(%ebp) 10f9fa: 6a 01 push $0x1 10f9fc: ff 75 08 pushl 0x8(%ebp) 10f9ff: e8 84 62 00 00 call 115c88 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10fa04: 83 c4 10 add $0x10,%esp 10fa07: 40 inc %eax 10fa08: 74 26 je 10fa30 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10fa0a: 8b 45 e0 mov -0x20(%ebp),%eax 10fa0d: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10fa10: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10fa14: a1 fc 06 13 00 mov 0x1306fc,%eax 10fa19: 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; 10fa1c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10fa23: e8 04 38 00 00 call 11322c <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10fa28: 8b 43 08 mov 0x8(%ebx),%eax 10fa2b: e9 1f ff ff ff jmp 10f94f 10fa30: 83 ec 08 sub $0x8,%esp 10fa33: 53 push %ebx 10fa34: 68 e0 06 13 00 push $0x1306e0 10fa39: e8 fa 2d 00 00 call 112838 <_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(); 10fa3e: e8 e9 37 00 00 call 11322c <_Thread_Enable_dispatch> 10fa43: b8 ff ff ff ff mov $0xffffffff,%eax return (mqd_t) -1; 10fa48: 83 c4 10 add $0x10,%esp 10fa4b: e9 ff fe ff ff jmp 10f94f 0010fcb0 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10fcb0: 55 push %ebp 10fcb1: 89 e5 mov %esp,%ebp 10fcb3: 56 push %esi 10fcb4: 53 push %ebx 10fcb5: 83 ec 10 sub $0x10,%esp 10fcb8: 8b 75 0c mov 0xc(%ebp),%esi 10fcbb: 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 ) 10fcbe: 85 f6 test %esi,%esi 10fcc0: 74 60 je 10fd22 10fcc2: 51 push %ecx 10fcc3: 8d 45 f4 lea -0xc(%ebp),%eax 10fcc6: 50 push %eax 10fcc7: ff 75 08 pushl 0x8(%ebp) 10fcca: 68 e0 06 13 00 push $0x1306e0 10fccf: e8 94 2c 00 00 call 112968 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fcd4: 83 c4 10 add $0x10,%esp 10fcd7: 8b 55 f4 mov -0xc(%ebp),%edx 10fcda: 85 d2 test %edx,%edx 10fcdc: 75 32 jne 10fd10 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10fcde: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10fce1: 85 db test %ebx,%ebx 10fce3: 74 17 je 10fcfc omqstat->mq_flags = the_mq_fd->oflag; 10fce5: 8b 48 14 mov 0x14(%eax),%ecx 10fce8: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10fcea: 8b 4a 68 mov 0x68(%edx),%ecx 10fced: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10fcf0: 8b 4a 60 mov 0x60(%edx),%ecx 10fcf3: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10fcf6: 8b 52 64 mov 0x64(%edx),%edx 10fcf9: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10fcfc: 8b 16 mov (%esi),%edx 10fcfe: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10fd01: e8 26 35 00 00 call 11322c <_Thread_Enable_dispatch> 10fd06: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fd08: 8d 65 f8 lea -0x8(%ebp),%esp 10fd0b: 5b pop %ebx 10fd0c: 5e pop %esi 10fd0d: c9 leave 10fd0e: c3 ret 10fd0f: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fd10: e8 f7 99 00 00 call 11970c <__errno> 10fd15: c7 00 09 00 00 00 movl $0x9,(%eax) 10fd1b: b8 ff ff ff ff mov $0xffffffff,%eax 10fd20: eb e6 jmp 10fd08 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 ); 10fd22: e8 e5 99 00 00 call 11970c <__errno> 10fd27: c7 00 16 00 00 00 movl $0x16,(%eax) 10fd2d: b8 ff ff ff ff mov $0xffffffff,%eax 10fd32: eb d4 jmp 10fd08 00129290 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 129290: 55 push %ebp 129291: 89 e5 mov %esp,%ebp 129293: 56 push %esi 129294: 53 push %ebx 129295: 8b 5d 08 mov 0x8(%ebp),%ebx 129298: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 12929b: 83 ec 0c sub $0xc,%esp 12929e: 53 push %ebx 12929f: e8 18 01 00 00 call 1293bc <_Timespec_Is_valid> 1292a4: 83 c4 10 add $0x10,%esp 1292a7: 84 c0 test %al,%al 1292a9: 0f 84 e1 00 00 00 je 129390 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 1292af: 8b 13 mov (%ebx),%edx 1292b1: 85 d2 test %edx,%edx 1292b3: 0f 88 d7 00 00 00 js 129390 1292b9: 8b 43 04 mov 0x4(%ebx),%eax 1292bc: 85 c0 test %eax,%eax 1292be: 0f 88 cc 00 00 00 js 129390 rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 1292c4: 83 ec 0c sub $0xc,%esp 1292c7: 53 push %ebx 1292c8: e8 43 fb fe ff call 118e10 <_Timespec_To_ticks> 1292cd: 89 c3 mov %eax,%ebx * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 1292cf: 83 c4 10 add $0x10,%esp 1292d2: 85 c0 test %eax,%eax 1292d4: 75 36 jne 12930c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1292d6: a1 18 53 13 00 mov 0x135318,%eax 1292db: 40 inc %eax 1292dc: a3 18 53 13 00 mov %eax,0x135318 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 1292e1: e8 56 9b fe ff call 112e3c <_Thread_Yield_processor> _Thread_Enable_dispatch(); 1292e6: e8 49 8f fe ff call 112234 <_Thread_Enable_dispatch> if ( rmtp ) { 1292eb: 85 f6 test %esi,%esi 1292ed: 0f 84 93 00 00 00 je 129386 rmtp->tv_sec = 0; 1292f3: c7 06 00 00 00 00 movl $0x0,(%esi) rmtp->tv_nsec = 0; 1292f9: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 129300: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 129302: 8d 65 f8 lea -0x8(%ebp),%esp 129305: 5b pop %ebx 129306: 5e pop %esi 129307: c9 leave 129308: c3 ret 129309: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12930c: a1 18 53 13 00 mov 0x135318,%eax 129311: 40 inc %eax 129312: a3 18 53 13 00 mov %eax,0x135318 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 129317: 83 ec 08 sub $0x8,%esp 12931a: 68 08 00 00 10 push $0x10000008 12931f: ff 35 d8 53 13 00 pushl 0x1353d8 129325: e8 fa 97 fe ff call 112b24 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 12932a: 8b 15 d8 53 13 00 mov 0x1353d8,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 129330: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 129333: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 12933a: c7 42 64 9c 20 11 00 movl $0x11209c,0x64(%edx) the_watchdog->id = id; 129341: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 129344: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12934b: 89 5a 54 mov %ebx,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12934e: 58 pop %eax 12934f: 59 pop %ecx 129350: 83 c2 48 add $0x48,%edx 129353: 52 push %edx 129354: 68 f8 53 13 00 push $0x1353f8 129359: e8 be 9e fe ff call 11321c <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 12935e: e8 d1 8e fe ff call 112234 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 129363: 83 c4 10 add $0x10,%esp 129366: 85 f6 test %esi,%esi 129368: 74 1c je 129386 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 12936a: a1 d8 53 13 00 mov 0x1353d8,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 12936f: 03 58 5c add 0x5c(%eax),%ebx 129372: 2b 58 60 sub 0x60(%eax),%ebx _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 129375: 83 ec 08 sub $0x8,%esp 129378: 56 push %esi 129379: 53 push %ebx 12937a: e8 49 fa fe ff call 118dc8 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 12937f: 83 c4 10 add $0x10,%esp 129382: 85 db test %ebx,%ebx 129384: 75 1f jne 1293a5 rtems_set_errno_and_return_minus_one( EINTR ); 129386: 31 c0 xor %eax,%eax #endif } return 0; } 129388: 8d 65 f8 lea -0x8(%ebp),%esp 12938b: 5b pop %ebx 12938c: 5e pop %esi 12938d: c9 leave 12938e: c3 ret 12938f: 90 nop <== NOT EXECUTED * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); 129390: e8 0f 2b ff ff call 11bea4 <__errno> 129395: c7 00 16 00 00 00 movl $0x16,(%eax) 12939b: b8 ff ff ff ff mov $0xffffffff,%eax 1293a0: e9 5d ff ff ff jmp 129302 #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 1293a5: e8 fa 2a ff ff call 11bea4 <__errno> 1293aa: c7 00 04 00 00 00 movl $0x4,(%eax) 1293b0: b8 ff ff ff ff mov $0xffffffff,%eax 1293b5: e9 48 ff ff ff jmp 129302 0010fbd0 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10fbd0: 55 push %ebp 10fbd1: 89 e5 mov %esp,%ebp 10fbd3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10fbd6: 85 c0 test %eax,%eax 10fbd8: 74 12 je 10fbec 10fbda: 8b 10 mov (%eax),%edx 10fbdc: 85 d2 test %edx,%edx 10fbde: 74 0c je 10fbec return EINVAL; attr->is_initialized = false; 10fbe0: c7 00 00 00 00 00 movl $0x0,(%eax) 10fbe6: 31 c0 xor %eax,%eax return 0; } 10fbe8: c9 leave 10fbe9: c3 ret 10fbea: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10fbec: b8 16 00 00 00 mov $0x16,%eax } 10fbf1: c9 leave 10fbf2: c3 ret 0010fc44 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 10fc44: 55 push %ebp 10fc45: 89 e5 mov %esp,%ebp 10fc47: 57 push %edi 10fc48: 56 push %esi 10fc49: 8b 75 08 mov 0x8(%ebp),%esi 10fc4c: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 10fc4f: 85 f6 test %esi,%esi 10fc51: 74 1d je 10fc70 10fc53: 8b 16 mov (%esi),%edx 10fc55: 85 d2 test %edx,%edx 10fc57: 74 17 je 10fc70 10fc59: 85 c0 test %eax,%eax 10fc5b: 74 13 je 10fc70 return EINVAL; *param = attr->schedparam; 10fc5d: 83 c6 18 add $0x18,%esi 10fc60: b9 07 00 00 00 mov $0x7,%ecx 10fc65: 89 c7 mov %eax,%edi 10fc67: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10fc69: 31 c0 xor %eax,%eax return 0; } 10fc6b: 5e pop %esi 10fc6c: 5f pop %edi 10fc6d: c9 leave 10fc6e: c3 ret 10fc6f: 90 nop <== NOT EXECUTED { if ( !attr || !attr->is_initialized || !param ) return EINVAL; *param = attr->schedparam; return 0; 10fc70: b8 16 00 00 00 mov $0x16,%eax } 10fc75: 5e pop %esi 10fc76: 5f pop %edi 10fc77: c9 leave 10fc78: c3 ret 001106ac : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 1106ac: 55 push %ebp 1106ad: 89 e5 mov %esp,%ebp 1106af: 8b 45 08 mov 0x8(%ebp),%eax 1106b2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1106b5: 85 c0 test %eax,%eax 1106b7: 74 0b je 1106c4 1106b9: 8b 08 mov (%eax),%ecx 1106bb: 85 c9 test %ecx,%ecx 1106bd: 74 05 je 1106c4 return EINVAL; switch ( clock_allowed ) { 1106bf: 83 fa 01 cmp $0x1,%edx 1106c2: 76 08 jbe 1106cc case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; 1106c4: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 1106c9: c9 leave 1106ca: c3 ret 1106cb: 90 nop <== NOT EXECUTED return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 1106cc: 89 50 34 mov %edx,0x34(%eax) 1106cf: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 1106d1: c9 leave 1106d2: c3 ret 0010fd44 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 10fd44: 55 push %ebp 10fd45: 89 e5 mov %esp,%ebp 10fd47: 8b 45 08 mov 0x8(%ebp),%eax 10fd4a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fd4d: 85 c0 test %eax,%eax 10fd4f: 74 0b je 10fd5c 10fd51: 8b 08 mov (%eax),%ecx 10fd53: 85 c9 test %ecx,%ecx 10fd55: 74 05 je 10fd5c return EINVAL; switch ( detachstate ) { 10fd57: 83 fa 01 cmp $0x1,%edx 10fd5a: 76 08 jbe 10fd64 case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; 10fd5c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10fd61: c9 leave 10fd62: c3 ret 10fd63: 90 nop <== NOT EXECUTED return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 10fd64: 89 50 38 mov %edx,0x38(%eax) 10fd67: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10fd69: c9 leave 10fd6a: c3 ret 001113ac : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 1113ac: 55 push %ebp 1113ad: 89 e5 mov %esp,%ebp 1113af: 8b 45 08 mov 0x8(%ebp),%eax 1113b2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1113b5: 85 c0 test %eax,%eax 1113b7: 74 1f je 1113d8 1113b9: 8b 08 mov (%eax),%ecx 1113bb: 85 c9 test %ecx,%ecx 1113bd: 74 19 je 1113d8 return EINVAL; switch ( inheritsched ) { 1113bf: 8d 4a ff lea -0x1(%edx),%ecx 1113c2: 83 f9 01 cmp $0x1,%ecx 1113c5: 76 09 jbe 1113d0 1113c7: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 1113cc: c9 leave 1113cd: c3 ret 1113ce: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 1113d0: 89 50 10 mov %edx,0x10(%eax) 1113d3: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 1113d5: c9 leave 1113d6: c3 ret 1113d7: 90 nop <== NOT EXECUTED switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; 1113d8: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 1113dd: c9 leave 1113de: c3 ret 0010fda0 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 10fda0: 55 push %ebp 10fda1: 89 e5 mov %esp,%ebp 10fda3: 57 push %edi 10fda4: 56 push %esi 10fda5: 8b 7d 08 mov 0x8(%ebp),%edi 10fda8: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 10fdab: 85 ff test %edi,%edi 10fdad: 74 1d je 10fdcc 10fdaf: 8b 07 mov (%edi),%eax 10fdb1: 85 c0 test %eax,%eax 10fdb3: 74 17 je 10fdcc 10fdb5: 85 f6 test %esi,%esi 10fdb7: 74 13 je 10fdcc return EINVAL; attr->schedparam = *param; 10fdb9: 83 c7 18 add $0x18,%edi 10fdbc: b9 07 00 00 00 mov $0x7,%ecx 10fdc1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10fdc3: 31 c0 xor %eax,%eax return 0; } 10fdc5: 5e pop %esi 10fdc6: 5f pop %edi 10fdc7: c9 leave 10fdc8: c3 ret 10fdc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ( !attr || !attr->is_initialized || !param ) return EINVAL; attr->schedparam = *param; return 0; 10fdcc: b8 16 00 00 00 mov $0x16,%eax } 10fdd1: 5e pop %esi 10fdd2: 5f pop %edi 10fdd3: c9 leave 10fdd4: c3 ret 0010fdd8 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10fdd8: 55 push %ebp 10fdd9: 89 e5 mov %esp,%ebp 10fddb: 8b 45 08 mov 0x8(%ebp),%eax 10fdde: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fde1: 85 c0 test %eax,%eax 10fde3: 74 23 je 10fe08 10fde5: 8b 08 mov (%eax),%ecx 10fde7: 85 c9 test %ecx,%ecx 10fde9: 74 1d je 10fe08 return EINVAL; switch ( policy ) { 10fdeb: 85 d2 test %edx,%edx 10fded: 78 0a js 10fdf9 10fdef: 83 fa 02 cmp $0x2,%edx 10fdf2: 7e 0c jle 10fe00 10fdf4: 83 fa 04 cmp $0x4,%edx 10fdf7: 74 07 je 10fe00 10fdf9: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 10fdfe: c9 leave 10fdff: c3 ret switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10fe00: 89 50 14 mov %edx,0x14(%eax) 10fe03: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 10fe05: c9 leave 10fe06: c3 ret 10fe07: 90 nop <== NOT EXECUTED case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; 10fe08: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10fe0d: c9 leave 10fe0e: c3 ret 0010fe10 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 10fe10: 55 push %ebp 10fe11: 89 e5 mov %esp,%ebp 10fe13: 8b 45 08 mov 0x8(%ebp),%eax 10fe16: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fe19: 85 c0 test %eax,%eax 10fe1b: 74 1a je 10fe37 10fe1d: 8b 08 mov (%eax),%ecx 10fe1f: 85 c9 test %ecx,%ecx 10fe21: 74 14 je 10fe37 return EINVAL; switch ( contentionscope ) { 10fe23: 85 d2 test %edx,%edx 10fe25: 75 0d jne 10fe34 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 10fe27: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10fe2e: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 10fe30: c9 leave 10fe31: c3 ret 10fe32: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10fe34: 4a dec %edx 10fe35: 74 09 je 10fe40 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; 10fe37: b8 16 00 00 00 mov $0x16,%eax return ENOTSUP; default: return EINVAL; } } 10fe3c: c9 leave 10fe3d: c3 ret 10fe3e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10fe40: b8 86 00 00 00 mov $0x86,%eax return ENOTSUP; default: return EINVAL; } } 10fe45: c9 leave 10fe46: c3 ret 0010fe48 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 10fe48: 55 push %ebp 10fe49: 89 e5 mov %esp,%ebp 10fe4b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10fe4e: 85 c0 test %eax,%eax 10fe50: 74 12 je 10fe64 10fe52: 8b 10 mov (%eax),%edx 10fe54: 85 d2 test %edx,%edx 10fe56: 74 0c je 10fe64 return EINVAL; attr->stackaddr = stackaddr; 10fe58: 8b 55 0c mov 0xc(%ebp),%edx 10fe5b: 89 50 04 mov %edx,0x4(%eax) 10fe5e: 31 c0 xor %eax,%eax return 0; } 10fe60: c9 leave 10fe61: c3 ret 10fe62: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->stackaddr = stackaddr; return 0; 10fe64: b8 16 00 00 00 mov $0x16,%eax } 10fe69: c9 leave 10fe6a: c3 ret 001113e0 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 1113e0: 55 push %ebp 1113e1: 89 e5 mov %esp,%ebp 1113e3: 8b 45 08 mov 0x8(%ebp),%eax 1113e6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1113e9: 85 c0 test %eax,%eax 1113eb: 74 23 je 111410 1113ed: 8b 08 mov (%eax),%ecx 1113ef: 85 c9 test %ecx,%ecx 1113f1: 74 1d je 111410 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 1113f3: 8b 0d b8 46 12 00 mov 0x1246b8,%ecx 1113f9: d1 e1 shl %ecx 1113fb: 39 d1 cmp %edx,%ecx 1113fd: 77 09 ja 111408 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 1113ff: 89 50 08 mov %edx,0x8(%eax) 111402: 31 c0 xor %eax,%eax return 0; } 111404: c9 leave 111405: c3 ret 111406: 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; 111408: 89 48 08 mov %ecx,0x8(%eax) 11140b: 31 c0 xor %eax,%eax else attr->stacksize = stacksize; return 0; } 11140d: c9 leave 11140e: c3 ret 11140f: 90 nop <== NOT EXECUTED return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 111410: b8 16 00 00 00 mov $0x16,%eax return 0; } 111415: c9 leave 111416: c3 ret 0010b7e0 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10b7e0: 55 push %ebp 10b7e1: 89 e5 mov %esp,%ebp 10b7e3: 83 ec 28 sub $0x28,%esp 10b7e6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b7e9: 85 c0 test %eax,%eax 10b7eb: 74 2f je 10b81c RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b7ed: 51 push %ecx 10b7ee: 8d 55 f4 lea -0xc(%ebp),%edx 10b7f1: 52 push %edx 10b7f2: ff 30 pushl (%eax) 10b7f4: 68 a0 91 12 00 push $0x1291a0 10b7f9: e8 9e 25 00 00 call 10dd9c <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10b7fe: 83 c4 10 add $0x10,%esp 10b801: 8b 55 f4 mov -0xc(%ebp),%edx 10b804: 85 d2 test %edx,%edx 10b806: 75 14 jne 10b81c case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10b808: 8b 48 58 mov 0x58(%eax),%ecx 10b80b: 85 c9 test %ecx,%ecx 10b80d: 74 15 je 10b824 _Thread_Enable_dispatch(); 10b80f: e8 fc 2d 00 00 call 10e610 <_Thread_Enable_dispatch> 10b814: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b819: c9 leave 10b81a: c3 ret 10b81b: 90 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return 0; 10b81c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b821: c9 leave 10b822: c3 ret 10b823: 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 ); 10b824: 83 ec 08 sub $0x8,%esp 10b827: 50 push %eax 10b828: 68 a0 91 12 00 push $0x1291a0 10b82d: 89 45 e4 mov %eax,-0x1c(%ebp) 10b830: e8 33 21 00 00 call 10d968 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b835: 58 pop %eax 10b836: 5a pop %edx 10b837: 8b 45 e4 mov -0x1c(%ebp),%eax 10b83a: 50 push %eax 10b83b: 68 a0 91 12 00 push $0x1291a0 10b840: e8 27 24 00 00 call 10dc6c <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10b845: e8 c6 2d 00 00 call 10e610 <_Thread_Enable_dispatch> 10b84a: 31 c0 xor %eax,%eax return 0; 10b84c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b84f: c9 leave 10b850: c3 ret 0010b854 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10b854: 55 push %ebp 10b855: 89 e5 mov %esp,%ebp 10b857: 57 push %edi 10b858: 56 push %esi 10b859: 53 push %ebx 10b85a: 83 ec 2c sub $0x2c,%esp 10b85d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b860: 8b 7d 0c mov 0xc(%ebp),%edi 10b863: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10b866: 85 db test %ebx,%ebx 10b868: 0f 84 82 00 00 00 je 10b8f0 return EINVAL; if ( count == 0 ) 10b86e: 85 f6 test %esi,%esi 10b870: 74 7e je 10b8f0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b872: 85 ff test %edi,%edi 10b874: 0f 84 92 00 00 00 je 10b90c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b87a: 8b 17 mov (%edi),%edx 10b87c: 85 d2 test %edx,%edx 10b87e: 74 70 je 10b8f0 return EINVAL; switch ( the_attr->process_shared ) { 10b880: 8b 47 04 mov 0x4(%edi),%eax 10b883: 85 c0 test %eax,%eax 10b885: 75 69 jne 10b8f0 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10b887: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10b88e: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b891: a1 58 8d 12 00 mov 0x128d58,%eax 10b896: 40 inc %eax 10b897: a3 58 8d 12 00 mov %eax,0x128d58 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 10b89c: 83 ec 0c sub $0xc,%esp 10b89f: 68 a0 91 12 00 push $0x1291a0 10b8a4: e8 43 20 00 00 call 10d8ec <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10b8a9: 83 c4 10 add $0x10,%esp 10b8ac: 85 c0 test %eax,%eax 10b8ae: 74 50 je 10b900 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10b8b0: 83 ec 08 sub $0x8,%esp 10b8b3: 8d 55 e0 lea -0x20(%ebp),%edx 10b8b6: 52 push %edx 10b8b7: 8d 50 10 lea 0x10(%eax),%edx 10b8ba: 52 push %edx 10b8bb: 89 45 d4 mov %eax,-0x2c(%ebp) 10b8be: e8 a1 16 00 00 call 10cf64 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b8c3: 8b 45 d4 mov -0x2c(%ebp),%eax 10b8c6: 8b 50 08 mov 0x8(%eax),%edx 10b8c9: 0f b7 f2 movzwl %dx,%esi 10b8cc: 8b 0d bc 91 12 00 mov 0x1291bc,%ecx 10b8d2: 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; 10b8d5: 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; 10b8dc: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b8de: e8 2d 2d 00 00 call 10e610 <_Thread_Enable_dispatch> 10b8e3: 31 c0 xor %eax,%eax return 0; 10b8e5: 83 c4 10 add $0x10,%esp } 10b8e8: 8d 65 f4 lea -0xc(%ebp),%esp 10b8eb: 5b pop %ebx 10b8ec: 5e pop %esi 10b8ed: 5f pop %edi 10b8ee: c9 leave 10b8ef: c3 ret /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 10b8f0: b8 16 00 00 00 mov $0x16,%eax } 10b8f5: 8d 65 f4 lea -0xc(%ebp),%esp 10b8f8: 5b pop %ebx 10b8f9: 5e pop %esi 10b8fa: 5f pop %edi 10b8fb: c9 leave 10b8fc: c3 ret 10b8fd: 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(); 10b900: e8 0b 2d 00 00 call 10e610 <_Thread_Enable_dispatch> 10b905: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10b90a: eb e9 jmp 10b8f5 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10b90c: 83 ec 0c sub $0xc,%esp 10b90f: 8d 7d d8 lea -0x28(%ebp),%edi 10b912: 57 push %edi 10b913: e8 80 fe ff ff call 10b798 10b918: 83 c4 10 add $0x10,%esp 10b91b: e9 5a ff ff ff jmp 10b87a 0010b920 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10b920: 55 push %ebp 10b921: 89 e5 mov %esp,%ebp 10b923: 83 ec 18 sub $0x18,%esp 10b926: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b929: 85 c0 test %eax,%eax 10b92b: 74 4f je 10b97c RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b92d: 51 push %ecx 10b92e: 8d 55 f4 lea -0xc(%ebp),%edx 10b931: 52 push %edx 10b932: ff 30 pushl (%eax) 10b934: 68 a0 91 12 00 push $0x1291a0 10b939: e8 5e 24 00 00 call 10dd9c <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10b93e: 83 c4 10 add $0x10,%esp 10b941: 8b 55 f4 mov -0xc(%ebp),%edx 10b944: 85 d2 test %edx,%edx 10b946: 75 34 jne 10b97c case OBJECTS_LOCAL: _CORE_barrier_Wait( 10b948: 83 ec 0c sub $0xc,%esp 10b94b: 6a 00 push $0x0 10b94d: 6a 00 push $0x0 10b94f: 6a 01 push $0x1 10b951: ff 70 08 pushl 0x8(%eax) 10b954: 83 c0 10 add $0x10,%eax 10b957: 50 push %eax 10b958: e8 3b 16 00 00 call 10cf98 <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10b95d: 83 c4 20 add $0x20,%esp 10b960: e8 ab 2c 00 00 call 10e610 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10b965: 83 ec 0c sub $0xc,%esp 10b968: a1 18 8e 12 00 mov 0x128e18,%eax 10b96d: ff 70 34 pushl 0x34(%eax) 10b970: e8 d7 57 00 00 call 11114c <_POSIX_Barrier_Translate_core_barrier_return_code> 10b975: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b978: c9 leave 10b979: c3 ret 10b97a: 66 90 xchg %ax,%ax <== NOT EXECUTED true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10b97c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b981: c9 leave 10b982: c3 ret 0010b750 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10b750: 55 push %ebp 10b751: 89 e5 mov %esp,%ebp 10b753: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b756: 85 c0 test %eax,%eax 10b758: 74 12 je 10b76c 10b75a: 8b 10 mov (%eax),%edx 10b75c: 85 d2 test %edx,%edx 10b75e: 74 0c je 10b76c return EINVAL; attr->is_initialized = false; 10b760: c7 00 00 00 00 00 movl $0x0,(%eax) 10b766: 31 c0 xor %eax,%eax return 0; } 10b768: c9 leave 10b769: c3 ret 10b76a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10b76c: b8 16 00 00 00 mov $0x16,%eax } 10b771: c9 leave 10b772: c3 ret 0010b798 : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 10b798: 55 push %ebp 10b799: 89 e5 mov %esp,%ebp 10b79b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b79e: 85 c0 test %eax,%eax 10b7a0: 74 12 je 10b7b4 return EINVAL; attr->is_initialized = true; 10b7a2: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10b7a8: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10b7af: 31 c0 xor %eax,%eax return 0; } 10b7b1: c9 leave 10b7b2: c3 ret 10b7b3: 90 nop <== NOT EXECUTED int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { if ( !attr ) 10b7b4: b0 16 mov $0x16,%al return EINVAL; attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10b7b6: c9 leave 10b7b7: c3 ret 0010b7b8 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10b7b8: 55 push %ebp 10b7b9: 89 e5 mov %esp,%ebp 10b7bb: 8b 45 08 mov 0x8(%ebp),%eax 10b7be: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b7c1: 85 c0 test %eax,%eax 10b7c3: 74 0b je 10b7d0 return EINVAL; if ( !attr->is_initialized ) 10b7c5: 8b 08 mov (%eax),%ecx 10b7c7: 85 c9 test %ecx,%ecx 10b7c9: 74 05 je 10b7d0 return EINVAL; switch ( pshared ) { 10b7cb: 83 fa 01 cmp $0x1,%edx 10b7ce: 76 08 jbe 10b7d8 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10b7d0: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b7d5: c9 leave 10b7d6: c3 ret 10b7d7: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b7d8: 89 50 04 mov %edx,0x4(%eax) 10b7db: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b7dd: c9 leave 10b7de: c3 ret 0010b030 : */ int pthread_cancel( pthread_t thread ) { 10b030: 55 push %ebp 10b031: 89 e5 mov %esp,%ebp 10b033: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10b036: a1 94 8a 12 00 mov 0x128a94,%eax 10b03b: 85 c0 test %eax,%eax 10b03d: 74 09 je 10b048 10b03f: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b044: c9 leave 10b045: c3 ret 10b046: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b048: 51 push %ecx 10b049: 8d 45 f4 lea -0xc(%ebp),%eax 10b04c: 50 push %eax 10b04d: ff 75 08 pushl 0x8(%ebp) 10b050: 68 c0 8c 12 00 push $0x128cc0 10b055: e8 72 20 00 00 call 10d0cc <_Objects_Get> if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b05a: 83 c4 10 add $0x10,%esp 10b05d: 8b 55 f4 mov -0xc(%ebp),%edx 10b060: 85 d2 test %edx,%edx 10b062: 75 20 jne 10b084 case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10b064: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10b06a: c7 82 dc 00 00 00 01 movl $0x1,0xdc(%edx) 10b071: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10b074: 83 ec 0c sub $0xc,%esp 10b077: 50 push %eax 10b078: e8 3f 51 00 00 call 1101bc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b07d: 31 c0 xor %eax,%eax return 0; 10b07f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b082: c9 leave 10b083: c3 ret if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b084: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b089: c9 leave 10b08a: c3 ret 0010aeb0 : */ void pthread_cleanup_pop( int execute ) { 10aeb0: 55 push %ebp 10aeb1: 89 e5 mov %esp,%ebp 10aeb3: 57 push %edi 10aeb4: 56 push %esi 10aeb5: 53 push %ebx 10aeb6: 83 ec 1c sub $0x1c,%esp 10aeb9: 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 ]; 10aebc: a1 18 7c 12 00 mov 0x127c18,%eax 10aec1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aec7: 8b 15 58 7b 12 00 mov 0x127b58,%edx 10aecd: 42 inc %edx 10aece: 89 15 58 7b 12 00 mov %edx,0x127b58 * 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 ); 10aed4: 9c pushf 10aed5: fa cli 10aed6: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10aed7: 8d 90 e4 00 00 00 lea 0xe4(%eax),%edx POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10aedd: 39 90 e0 00 00 00 cmp %edx,0xe0(%eax) 10aee3: 74 4f je 10af34 _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10aee5: 8b 42 04 mov 0x4(%edx),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10aee8: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10aeea: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10aeed: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10aef0: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10aef2: 56 push %esi 10aef3: 9d popf tmp_handler = *handler; 10aef4: 8d 7d d8 lea -0x28(%ebp),%edi 10aef7: b9 04 00 00 00 mov $0x4,%ecx 10aefc: 89 c6 mov %eax,%esi 10aefe: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10af00: 8b 75 e0 mov -0x20(%ebp),%esi 10af03: 8b 7d e4 mov -0x1c(%ebp),%edi _Workspace_Free( handler ); 10af06: 83 ec 0c sub $0xc,%esp 10af09: 50 push %eax 10af0a: e8 5d 38 00 00 call 10e76c <_Workspace_Free> _Thread_Enable_dispatch(); 10af0f: e8 b4 26 00 00 call 10d5c8 <_Thread_Enable_dispatch> if ( execute ) 10af14: 83 c4 10 add $0x10,%esp 10af17: 85 db test %ebx,%ebx 10af19: 75 09 jne 10af24 (*tmp_handler.routine)( tmp_handler.arg ); } 10af1b: 8d 65 f4 lea -0xc(%ebp),%esp 10af1e: 5b pop %ebx 10af1f: 5e pop %esi 10af20: 5f pop %edi 10af21: c9 leave 10af22: c3 ret 10af23: 90 nop <== NOT EXECUTED _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10af24: 89 7d 08 mov %edi,0x8(%ebp) 10af27: 89 f0 mov %esi,%eax } 10af29: 8d 65 f4 lea -0xc(%ebp),%esp 10af2c: 5b pop %ebx 10af2d: 5e pop %esi 10af2e: 5f pop %edi 10af2f: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10af30: ff e0 jmp *%eax 10af32: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10af34: e8 8f 26 00 00 call 10d5c8 <_Thread_Enable_dispatch> _ISR_Enable( level ); 10af39: 56 push %esi 10af3a: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10af3b: 8d 65 f4 lea -0xc(%ebp),%esp 10af3e: 5b pop %ebx 10af3f: 5e pop %esi 10af40: 5f pop %edi 10af41: c9 leave 10af42: c3 ret 0010b23c : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10b23c: 55 push %ebp 10b23d: 89 e5 mov %esp,%ebp 10b23f: 56 push %esi 10b240: 53 push %ebx 10b241: 8b 5d 08 mov 0x8(%ebp),%ebx 10b244: 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 ) 10b247: 85 db test %ebx,%ebx 10b249: 74 4d je 10b298 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b24b: a1 78 91 12 00 mov 0x129178,%eax 10b250: 40 inc %eax 10b251: a3 78 91 12 00 mov %eax,0x129178 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10b256: 83 ec 0c sub $0xc,%esp 10b259: 6a 10 push $0x10 10b25b: e8 18 40 00 00 call 10f278 <_Workspace_Allocate> if ( handler ) { 10b260: 83 c4 10 add $0x10,%esp 10b263: 85 c0 test %eax,%eax 10b265: 74 25 je 10b28c thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10b267: 8b 15 38 92 12 00 mov 0x129238,%edx 10b26d: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10b273: 81 c2 e0 00 00 00 add $0xe0,%edx handler->routine = routine; 10b279: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10b27c: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10b27f: 83 ec 08 sub $0x8,%esp 10b282: 50 push %eax 10b283: 52 push %edx 10b284: e8 9b 17 00 00 call 10ca24 <_Chain_Append> 10b289: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10b28c: 8d 65 f8 lea -0x8(%ebp),%esp 10b28f: 5b pop %ebx 10b290: 5e pop %esi 10b291: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10b292: e9 c9 2d 00 00 jmp 10e060 <_Thread_Enable_dispatch> 10b297: 90 nop <== NOT EXECUTED } 10b298: 8d 65 f8 lea -0x8(%ebp),%esp 10b29b: 5b pop %ebx 10b29c: 5e pop %esi 10b29d: c9 leave 10b29e: c3 ret 0010bf48 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10bf48: 55 push %ebp 10bf49: 89 e5 mov %esp,%ebp 10bf4b: 53 push %ebx 10bf4c: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10bf4f: 8d 45 f4 lea -0xc(%ebp),%eax 10bf52: 50 push %eax 10bf53: ff 75 08 pushl 0x8(%ebp) 10bf56: e8 65 00 00 00 call 10bfc0 <_POSIX_Condition_variables_Get> 10bf5b: 89 c3 mov %eax,%ebx switch ( location ) { 10bf5d: 83 c4 10 add $0x10,%esp 10bf60: 8b 4d f4 mov -0xc(%ebp),%ecx 10bf63: 85 c9 test %ecx,%ecx 10bf65: 75 25 jne 10bf8c case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10bf67: 83 ec 0c sub $0xc,%esp 10bf6a: 8d 40 18 lea 0x18(%eax),%eax 10bf6d: 50 push %eax 10bf6e: e8 3d 3b 00 00 call 10fab0 <_Thread_queue_First> 10bf73: 83 c4 10 add $0x10,%esp 10bf76: 85 c0 test %eax,%eax 10bf78: 74 1e je 10bf98 _Thread_Enable_dispatch(); 10bf7a: e8 ed 33 00 00 call 10f36c <_Thread_Enable_dispatch> 10bf7f: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bf84: 8b 5d fc mov -0x4(%ebp),%ebx 10bf87: c9 leave 10bf88: c3 ret 10bf89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 10bf8c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bf91: 8b 5d fc mov -0x4(%ebp),%ebx 10bf94: c9 leave 10bf95: c3 ret 10bf96: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10bf98: 83 ec 08 sub $0x8,%esp 10bf9b: 53 push %ebx 10bf9c: 68 20 a3 12 00 push $0x12a320 10bfa1: e8 1e 27 00 00 call 10e6c4 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10bfa6: 58 pop %eax 10bfa7: 5a pop %edx 10bfa8: 53 push %ebx 10bfa9: 68 20 a3 12 00 push $0x12a320 10bfae: e8 15 2a 00 00 call 10e9c8 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10bfb3: e8 b4 33 00 00 call 10f36c <_Thread_Enable_dispatch> 10bfb8: 31 c0 xor %eax,%eax return 0; 10bfba: 83 c4 10 add $0x10,%esp 10bfbd: eb d2 jmp 10bf91 0010c014 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10c014: 55 push %ebp 10c015: 89 e5 mov %esp,%ebp 10c017: 53 push %ebx 10c018: 83 ec 14 sub $0x14,%esp 10c01b: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c01e: 85 db test %ebx,%ebx 10c020: 0f 84 86 00 00 00 je 10c0ac /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10c026: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10c02a: 74 06 je 10c032 return EINVAL; if ( !the_attr->is_initialized ) 10c02c: 8b 03 mov (%ebx),%eax 10c02e: 85 c0 test %eax,%eax 10c030: 75 0a jne 10c03c *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 10c032: b8 16 00 00 00 mov $0x16,%eax } 10c037: 8b 5d fc mov -0x4(%ebp),%ebx 10c03a: c9 leave 10c03b: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c03c: a1 38 9e 12 00 mov 0x129e38,%eax 10c041: 40 inc %eax 10c042: a3 38 9e 12 00 mov %eax,0x129e38 */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10c047: 83 ec 0c sub $0xc,%esp 10c04a: 68 20 a3 12 00 push $0x12a320 10c04f: e8 f4 25 00 00 call 10e648 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10c054: 83 c4 10 add $0x10,%esp 10c057: 85 c0 test %eax,%eax 10c059: 74 5d je 10c0b8 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10c05b: 8b 53 04 mov 0x4(%ebx),%edx 10c05e: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c061: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10c068: 6a 74 push $0x74 10c06a: 68 00 08 00 00 push $0x800 10c06f: 6a 00 push $0x0 10c071: 8d 50 18 lea 0x18(%eax),%edx 10c074: 52 push %edx 10c075: 89 45 f4 mov %eax,-0xc(%ebp) 10c078: e8 b3 3a 00 00 call 10fb30 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c07d: 8b 45 f4 mov -0xc(%ebp),%eax 10c080: 8b 50 08 mov 0x8(%eax),%edx 10c083: 0f b7 da movzwl %dx,%ebx 10c086: 8b 0d 3c a3 12 00 mov 0x12a33c,%ecx 10c08c: 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; 10c08f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10c096: 8b 45 08 mov 0x8(%ebp),%eax 10c099: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c09b: e8 cc 32 00 00 call 10f36c <_Thread_Enable_dispatch> 10c0a0: 31 c0 xor %eax,%eax return 0; 10c0a2: 83 c4 10 add $0x10,%esp } 10c0a5: 8b 5d fc mov -0x4(%ebp),%ebx 10c0a8: c9 leave 10c0a9: c3 ret 10c0aa: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c0ac: bb ec 34 12 00 mov $0x1234ec,%ebx 10c0b1: e9 70 ff ff ff jmp 10c026 10c0b6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10c0b8: e8 af 32 00 00 call 10f36c <_Thread_Enable_dispatch> 10c0bd: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10c0c2: e9 70 ff ff ff jmp 10c037 0010beac : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10beac: 55 push %ebp 10bead: 89 e5 mov %esp,%ebp 10beaf: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10beb2: 85 c0 test %eax,%eax 10beb4: 74 12 je 10bec8 10beb6: 8b 10 mov (%eax),%edx 10beb8: 85 d2 test %edx,%edx 10beba: 74 0c je 10bec8 return EINVAL; attr->is_initialized = false; 10bebc: c7 00 00 00 00 00 movl $0x0,(%eax) 10bec2: 31 c0 xor %eax,%eax return 0; } 10bec4: c9 leave 10bec5: c3 ret 10bec6: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10bec8: b8 16 00 00 00 mov $0x16,%eax } 10becd: c9 leave 10bece: c3 ret 0010bed0 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10bed0: 55 push %ebp 10bed1: 89 e5 mov %esp,%ebp 10bed3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10bed6: 85 c0 test %eax,%eax 10bed8: 74 0e je 10bee8 return EINVAL; *pshared = attr->process_shared; 10beda: 8b 50 04 mov 0x4(%eax),%edx 10bedd: 8b 45 0c mov 0xc(%ebp),%eax 10bee0: 89 10 mov %edx,(%eax) 10bee2: 31 c0 xor %eax,%eax return 0; } 10bee4: c9 leave 10bee5: c3 ret 10bee6: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) 10bee8: b0 16 mov $0x16,%al return EINVAL; *pshared = attr->process_shared; return 0; } 10beea: c9 leave 10beeb: c3 ret 0010beec : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 10beec: 55 push %ebp 10beed: 89 e5 mov %esp,%ebp 10beef: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10bef2: 85 c0 test %eax,%eax 10bef4: 74 16 je 10bf0c return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 10bef6: 8b 15 ec 34 12 00 mov 0x1234ec,%edx 10befc: 8b 0d f0 34 12 00 mov 0x1234f0,%ecx 10bf02: 89 10 mov %edx,(%eax) 10bf04: 89 48 04 mov %ecx,0x4(%eax) 10bf07: 31 c0 xor %eax,%eax return 0; } 10bf09: c9 leave 10bf0a: c3 ret 10bf0b: 90 nop <== NOT EXECUTED int pthread_condattr_init( pthread_condattr_t *attr ) { if ( !attr ) 10bf0c: b0 16 mov $0x16,%al return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; return 0; } 10bf0e: c9 leave 10bf0f: c3 ret 0010bf10 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10bf10: 55 push %ebp 10bf11: 89 e5 mov %esp,%ebp 10bf13: 8b 45 08 mov 0x8(%ebp),%eax 10bf16: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10bf19: 85 c0 test %eax,%eax 10bf1b: 74 05 je 10bf22 return EINVAL; switch ( pshared ) { 10bf1d: 83 fa 01 cmp $0x1,%edx 10bf20: 76 0a jbe 10bf2c case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10bf22: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bf27: c9 leave 10bf28: c3 ret 10bf29: 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; 10bf2c: 89 50 04 mov %edx,0x4(%eax) 10bf2f: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10bf31: c9 leave 10bf32: c3 ret 0010b5c4 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10b5c4: 55 push %ebp 10b5c5: 89 e5 mov %esp,%ebp 10b5c7: 57 push %edi 10b5c8: 56 push %esi 10b5c9: 53 push %ebx 10b5ca: 83 ec 5c sub $0x5c,%esp 10b5cd: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b5d0: 8b 7d 10 mov 0x10(%ebp),%edi 10b5d3: 85 ff test %edi,%edi 10b5d5: 0f 84 81 01 00 00 je 10b75c return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b5db: 85 db test %ebx,%ebx 10b5dd: 74 65 je 10b644 if ( !the_attr->is_initialized ) 10b5df: 8b 33 mov (%ebx),%esi 10b5e1: 85 f6 test %esi,%esi 10b5e3: 74 1f je 10b604 * 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) ) 10b5e5: 8b 4b 04 mov 0x4(%ebx),%ecx 10b5e8: 85 c9 test %ecx,%ecx 10b5ea: 74 0b je 10b5f7 10b5ec: 8b 43 08 mov 0x8(%ebx),%eax 10b5ef: 3b 05 b8 46 12 00 cmp 0x1246b8,%eax 10b5f5: 72 0d jb 10b604 * 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 ) { 10b5f7: 8b 43 10 mov 0x10(%ebx),%eax 10b5fa: 83 f8 01 cmp $0x1,%eax 10b5fd: 74 4d je 10b64c 10b5ff: 83 f8 02 cmp $0x2,%eax 10b602: 74 10 je 10b614 * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 10b604: ba 16 00 00 00 mov $0x16,%edx } 10b609: 89 d0 mov %edx,%eax 10b60b: 8d 65 f4 lea -0xc(%ebp),%esp 10b60e: 5b pop %ebx 10b60f: 5e pop %esi 10b610: 5f pop %edi 10b611: c9 leave 10b612: c3 ret 10b613: 90 nop <== NOT EXECUTED schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10b614: 8b 43 14 mov 0x14(%ebx),%eax 10b617: 89 45 b0 mov %eax,-0x50(%ebp) schedparam = the_attr->schedparam; 10b61a: 8d 4d c4 lea -0x3c(%ebp),%ecx 10b61d: 89 4d b4 mov %ecx,-0x4c(%ebp) 10b620: 8d 73 18 lea 0x18(%ebx),%esi 10b623: b9 07 00 00 00 mov $0x7,%ecx 10b628: 8b 7d b4 mov -0x4c(%ebp),%edi 10b62b: 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 ) 10b62d: 8b 53 0c mov 0xc(%ebx),%edx 10b630: 85 d2 test %edx,%edx 10b632: 74 49 je 10b67d 10b634: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b639: 89 d0 mov %edx,%eax 10b63b: 8d 65 f4 lea -0xc(%ebp),%esp 10b63e: 5b pop %ebx 10b63f: 5e pop %esi 10b640: 5f pop %edi 10b641: c9 leave 10b642: c3 ret 10b643: 90 nop <== NOT EXECUTED int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b644: bb 60 1f 12 00 mov $0x121f60,%ebx 10b649: eb 94 jmp 10b5df 10b64b: 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 ]; 10b64c: a1 38 89 12 00 mov 0x128938,%eax 10b651: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10b657: 8b 86 80 00 00 00 mov 0x80(%esi),%eax 10b65d: 89 45 b0 mov %eax,-0x50(%ebp) schedparam = api->schedparam; 10b660: 8d 4d c4 lea -0x3c(%ebp),%ecx 10b663: 89 4d b4 mov %ecx,-0x4c(%ebp) 10b666: 81 c6 84 00 00 00 add $0x84,%esi 10b66c: b9 07 00 00 00 mov $0x7,%ecx 10b671: 8b 7d b4 mov -0x4c(%ebp),%edi 10b674: 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 ) 10b676: 8b 53 0c mov 0xc(%ebx),%edx 10b679: 85 d2 test %edx,%edx 10b67b: 75 b7 jne 10b634 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10b67d: 83 ec 0c sub $0xc,%esp 10b680: ff 75 c4 pushl -0x3c(%ebp) 10b683: e8 f4 5b 00 00 call 11127c <_POSIX_Priority_Is_valid> 10b688: 83 c4 10 add $0x10,%esp 10b68b: 84 c0 test %al,%al 10b68d: 0f 84 71 ff ff ff je 10b604 return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10b693: 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); 10b696: 0f b6 35 bc 46 12 00 movzbl 0x1246bc,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10b69d: 8d 45 e0 lea -0x20(%ebp),%eax 10b6a0: 50 push %eax 10b6a1: 8d 45 e4 lea -0x1c(%ebp),%eax 10b6a4: 50 push %eax 10b6a5: ff 75 b4 pushl -0x4c(%ebp) 10b6a8: ff 75 b0 pushl -0x50(%ebp) 10b6ab: e8 e8 5b 00 00 call 111298 <_POSIX_Thread_Translate_sched_param> 10b6b0: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10b6b2: 83 c4 10 add $0x10,%esp 10b6b5: 85 c0 test %eax,%eax 10b6b7: 0f 85 4c ff ff ff jne 10b609 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b6bd: 83 ec 0c sub $0xc,%esp 10b6c0: ff 35 30 89 12 00 pushl 0x128930 10b6c6: 89 45 a4 mov %eax,-0x5c(%ebp) 10b6c9: e8 6e 17 00 00 call 10ce3c <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10b6ce: c7 04 24 40 8b 12 00 movl $0x128b40,(%esp) 10b6d5: e8 f2 20 00 00 call 10d7cc <_Objects_Allocate> 10b6da: 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 ) { 10b6dd: 83 c4 10 add $0x10,%esp 10b6e0: 85 c0 test %eax,%eax 10b6e2: 8b 55 a4 mov -0x5c(%ebp),%edx 10b6e5: 0f 84 06 01 00 00 je 10b7f1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10b6eb: 8b 4b 08 mov 0x8(%ebx),%ecx 10b6ee: 50 push %eax 10b6ef: 6a 00 push $0x0 10b6f1: 6a 00 push $0x0 10b6f3: ff 75 e0 pushl -0x20(%ebp) 10b6f6: ff 75 e4 pushl -0x1c(%ebp) 10b6f9: 6a 01 push $0x1 10b6fb: 81 e6 ff 00 00 00 and $0xff,%esi 10b701: 29 fe sub %edi,%esi 10b703: 56 push %esi 10b704: 6a 01 push $0x1 10b706: a1 b8 46 12 00 mov 0x1246b8,%eax 10b70b: d1 e0 shl %eax 10b70d: 39 c8 cmp %ecx,%eax 10b70f: 73 02 jae 10b713 10b711: 89 c8 mov %ecx,%eax 10b713: 50 push %eax 10b714: ff 73 04 pushl 0x4(%ebx) 10b717: ff 75 ac pushl -0x54(%ebp) 10b71a: 68 40 8b 12 00 push $0x128b40 10b71f: 89 55 a4 mov %edx,-0x5c(%ebp) 10b722: e8 91 2e 00 00 call 10e5b8 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10b727: 83 c4 30 add $0x30,%esp 10b72a: 84 c0 test %al,%al 10b72c: 8b 55 a4 mov -0x5c(%ebp),%edx 10b72f: 75 35 jne 10b766 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10b731: 83 ec 08 sub $0x8,%esp 10b734: ff 75 ac pushl -0x54(%ebp) 10b737: 68 40 8b 12 00 push $0x128b40 10b73c: e8 0b 24 00 00 call 10db4c <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b741: 59 pop %ecx 10b742: ff 35 30 89 12 00 pushl 0x128930 10b748: e8 37 17 00 00 call 10ce84 <_API_Mutex_Unlock> 10b74d: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10b752: 83 c4 10 add $0x10,%esp 10b755: e9 af fe ff ff jmp 10b609 10b75a: 66 90 xchg %ax,%ax <== NOT EXECUTED int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b75c: ba 0e 00 00 00 mov $0xe,%edx 10b761: e9 a3 fe ff ff jmp 10b609 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b766: 8b 45 ac mov -0x54(%ebp),%eax 10b769: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b76f: 89 45 a8 mov %eax,-0x58(%ebp) api->Attributes = *the_attr; 10b772: b9 0f 00 00 00 mov $0xf,%ecx 10b777: 89 c7 mov %eax,%edi 10b779: 89 de mov %ebx,%esi 10b77b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10b77d: 8b 43 38 mov 0x38(%ebx),%eax 10b780: 8b 4d a8 mov -0x58(%ebp),%ecx 10b783: 89 41 3c mov %eax,0x3c(%ecx) api->schedpolicy = schedpolicy; 10b786: 8b 45 b0 mov -0x50(%ebp),%eax 10b789: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = schedparam; 10b78f: 89 cf mov %ecx,%edi 10b791: 81 c7 84 00 00 00 add $0x84,%edi 10b797: b9 07 00 00 00 mov $0x7,%ecx 10b79c: 8b 75 b4 mov -0x4c(%ebp),%esi 10b79f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 10b7a1: 8b 4d ac mov -0x54(%ebp),%ecx 10b7a4: c6 41 74 01 movb $0x1,0x74(%ecx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10b7a8: 83 ec 0c sub $0xc,%esp 10b7ab: 6a 00 push $0x0 10b7ad: ff 75 14 pushl 0x14(%ebp) 10b7b0: ff 75 10 pushl 0x10(%ebp) 10b7b3: 6a 01 push $0x1 10b7b5: 51 push %ecx 10b7b6: 89 55 a4 mov %edx,-0x5c(%ebp) 10b7b9: e8 6e 38 00 00 call 10f02c <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10b7be: 83 c4 20 add $0x20,%esp 10b7c1: 83 7d b0 04 cmpl $0x4,-0x50(%ebp) 10b7c5: 8b 55 a4 mov -0x5c(%ebp),%edx 10b7c8: 74 42 je 10b80c } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10b7ca: 8b 45 ac mov -0x54(%ebp),%eax 10b7cd: 8b 48 08 mov 0x8(%eax),%ecx 10b7d0: 8b 45 08 mov 0x8(%ebp),%eax 10b7d3: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10b7d5: 83 ec 0c sub $0xc,%esp 10b7d8: ff 35 30 89 12 00 pushl 0x128930 10b7de: 89 55 a4 mov %edx,-0x5c(%ebp) 10b7e1: e8 9e 16 00 00 call 10ce84 <_API_Mutex_Unlock> return 0; 10b7e6: 83 c4 10 add $0x10,%esp 10b7e9: 8b 55 a4 mov -0x5c(%ebp),%edx 10b7ec: e9 18 fe ff ff jmp 10b609 * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b7f1: 83 ec 0c sub $0xc,%esp 10b7f4: ff 35 30 89 12 00 pushl 0x128930 10b7fa: e8 85 16 00 00 call 10ce84 <_API_Mutex_Unlock> 10b7ff: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10b804: 83 c4 10 add $0x10,%esp 10b807: e9 fd fd ff ff jmp 10b609 return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b80c: 83 ec 0c sub $0xc,%esp 10b80f: 8b 45 a8 mov -0x58(%ebp),%eax 10b812: 05 8c 00 00 00 add $0x8c,%eax 10b817: 50 push %eax 10b818: e8 ff 39 00 00 call 10f21c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b81d: 8b 4d a8 mov -0x58(%ebp),%ecx 10b820: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b826: 58 pop %eax 10b827: 5a pop %edx 10b828: 89 c8 mov %ecx,%eax 10b82a: 05 a4 00 00 00 add $0xa4,%eax 10b82f: 50 push %eax 10b830: 68 58 89 12 00 push $0x128958 10b835: e8 06 3d 00 00 call 10f540 <_Watchdog_Insert> 10b83a: 83 c4 10 add $0x10,%esp 10b83d: 8b 55 a4 mov -0x5c(%ebp),%edx 10b840: eb 88 jmp 10b7ca 0010b6e0 : #include int pthread_detach( pthread_t thread ) { 10b6e0: 55 push %ebp 10b6e1: 89 e5 mov %esp,%ebp 10b6e3: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b6e6: 8d 45 f4 lea -0xc(%ebp),%eax 10b6e9: 50 push %eax 10b6ea: ff 75 08 pushl 0x8(%ebp) 10b6ed: 68 00 98 12 00 push $0x129800 10b6f2: e8 a1 22 00 00 call 10d998 <_Objects_Get> register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b6f7: 83 c4 10 add $0x10,%esp 10b6fa: 8b 55 f4 mov -0xc(%ebp),%edx 10b6fd: 85 d2 test %edx,%edx 10b6ff: 75 17 jne 10b718 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10b701: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b707: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) _Thread_Enable_dispatch(); 10b70e: e8 f9 2a 00 00 call 10e20c <_Thread_Enable_dispatch> 10b713: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b715: c9 leave 10b716: c3 ret 10b717: 90 nop <== NOT EXECUTED register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b718: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b71d: c9 leave 10b71e: c3 ret 00112794 : } void pthread_exit( void *value_ptr ) { 112794: 55 push %ebp 112795: 89 e5 mov %esp,%ebp 112797: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 11279a: ff 75 08 pushl 0x8(%ebp) 11279d: ff 35 d8 77 12 00 pushl 0x1277d8 1127a3: e8 88 ff ff ff call 112730 <_POSIX_Thread_Exit> 1127a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1127ab: c9 leave <== NOT EXECUTED 1127ac: c3 ret <== NOT EXECUTED 0010d80c : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10d80c: 55 push %ebp 10d80d: 89 e5 mov %esp,%ebp 10d80f: 57 push %edi 10d810: 56 push %esi 10d811: 53 push %ebx 10d812: 83 ec 1c sub $0x1c,%esp 10d815: 8b 7d 0c mov 0xc(%ebp),%edi 10d818: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10d81b: 85 ff test %edi,%edi 10d81d: 74 69 je 10d888 10d81f: 85 db test %ebx,%ebx 10d821: 74 65 je 10d888 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10d823: 51 push %ecx 10d824: 8d 45 e4 lea -0x1c(%ebp),%eax 10d827: 50 push %eax 10d828: ff 75 08 pushl 0x8(%ebp) 10d82b: 68 a0 c8 12 00 push $0x12c8a0 10d830: e8 a3 23 00 00 call 10fbd8 <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10d835: 83 c4 10 add $0x10,%esp 10d838: 8b 55 e4 mov -0x1c(%ebp),%edx 10d83b: 85 d2 test %edx,%edx 10d83d: 75 39 jne 10d878 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d83f: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10d845: 8b 96 80 00 00 00 mov 0x80(%esi),%edx 10d84b: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10d84d: 81 c6 84 00 00 00 add $0x84,%esi 10d853: b9 07 00 00 00 mov $0x7,%ecx 10d858: 89 df mov %ebx,%edi 10d85a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10d85c: 0f b6 15 dc 83 12 00 movzbl 0x1283dc,%edx 10d863: 2b 50 14 sub 0x14(%eax),%edx 10d866: 89 13 mov %edx,(%ebx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10d868: e8 df 2b 00 00 call 11044c <_Thread_Enable_dispatch> 10d86d: 31 c0 xor %eax,%eax break; } return ESRCH; } 10d86f: 8d 65 f4 lea -0xc(%ebp),%esp 10d872: 5b pop %ebx 10d873: 5e pop %esi 10d874: 5f pop %edi 10d875: c9 leave 10d876: c3 ret 10d877: 90 nop <== NOT EXECUTED if ( !policy || !param ) return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10d878: b8 03 00 00 00 mov $0x3,%eax break; } return ESRCH; } 10d87d: 8d 65 f4 lea -0xc(%ebp),%esp 10d880: 5b pop %ebx 10d881: 5e pop %esi 10d882: 5f pop %edi 10d883: c9 leave 10d884: c3 ret 10d885: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); return 0; 10d888: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10d88d: 8d 65 f4 lea -0xc(%ebp),%esp 10d890: 5b pop %ebx 10d891: 5e pop %esi 10d892: 5f pop %edi 10d893: c9 leave 10d894: c3 ret 0010b5bc : */ void *pthread_getspecific( pthread_key_t key ) { 10b5bc: 55 push %ebp 10b5bd: 89 e5 mov %esp,%ebp 10b5bf: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 10b5c2: 8d 45 f4 lea -0xc(%ebp),%eax 10b5c5: 50 push %eax 10b5c6: ff 75 08 pushl 0x8(%ebp) 10b5c9: 68 80 9a 12 00 push $0x129a80 10b5ce: e8 e5 24 00 00 call 10dab8 <_Objects_Get> uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10b5d3: 83 c4 10 add $0x10,%esp 10b5d6: 8b 55 f4 mov -0xc(%ebp),%edx 10b5d9: 85 d2 test %edx,%edx 10b5db: 75 2b jne 10b608 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10b5dd: 8b 15 98 96 12 00 mov 0x129698,%edx 10b5e3: 8b 4a 08 mov 0x8(%edx),%ecx index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 10b5e6: 89 ca mov %ecx,%edx 10b5e8: c1 ea 18 shr $0x18,%edx 10b5eb: 83 e2 07 and $0x7,%edx 10b5ee: 0f b7 c9 movzwl %cx,%ecx 10b5f1: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10b5f5: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10b5f8: 89 45 e4 mov %eax,-0x1c(%ebp) 10b5fb: e8 2c 2d 00 00 call 10e32c <_Thread_Enable_dispatch> 10b600: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10b603: c9 leave 10b604: c3 ret 10b605: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10b608: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return NULL; } 10b60a: c9 leave 10b60b: c3 ret 001102cc : int pthread_join( pthread_t thread, void **value_ptr ) { 1102cc: 55 push %ebp 1102cd: 89 e5 mov %esp,%ebp 1102cf: 53 push %ebx 1102d0: 83 ec 18 sub $0x18,%esp 1102d3: 8b 5d 0c mov 0xc(%ebp),%ebx 1102d6: 8d 45 f4 lea -0xc(%ebp),%eax 1102d9: 50 push %eax 1102da: ff 75 08 pushl 0x8(%ebp) 1102dd: 68 e0 0b 13 00 push $0x130be0 1102e2: e8 45 23 00 00 call 11262c <_Objects_Get> POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 1102e7: 83 c4 10 add $0x10,%esp 1102ea: 8b 55 f4 mov -0xc(%ebp),%edx 1102ed: 85 d2 test %edx,%edx 1102ef: 74 0b je 1102fc 1102f1: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 1102f6: 8b 5d fc mov -0x4(%ebp),%ebx 1102f9: c9 leave 1102fa: c3 ret 1102fb: 90 nop <== NOT EXECUTED the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1102fc: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 110302: 8b 4a 3c mov 0x3c(%edx),%ecx 110305: 85 c9 test %ecx,%ecx 110307: 74 43 je 11034c RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 110309: 8b 0d d8 09 13 00 mov 0x1309d8,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 11030f: 39 c8 cmp %ecx,%eax 110311: 74 49 je 11035c /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 110313: 8d 45 f0 lea -0x10(%ebp),%eax 110316: 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; 110319: 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 ); 110320: 50 push %eax 110321: 68 c0 36 11 00 push $0x1136c0 110326: 6a 00 push $0x0 110328: 83 c2 40 add $0x40,%edx 11032b: 52 push %edx 11032c: e8 7f 30 00 00 call 1133b0 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 110331: e8 6a 2b 00 00 call 112ea0 <_Thread_Enable_dispatch> if ( value_ptr ) 110336: 83 c4 10 add $0x10,%esp 110339: 85 db test %ebx,%ebx 11033b: 74 05 je 110342 *value_ptr = return_pointer; 11033d: 8b 45 f0 mov -0x10(%ebp),%eax 110340: 89 03 mov %eax,(%ebx) 110342: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110344: 8b 5d fc mov -0x4(%ebp),%ebx 110347: c9 leave 110348: c3 ret 110349: 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(); 11034c: e8 4f 2b 00 00 call 112ea0 <_Thread_Enable_dispatch> 110351: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110356: 8b 5d fc mov -0x4(%ebp),%ebx 110359: c9 leave 11035a: c3 ret 11035b: 90 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 11035c: e8 3f 2b 00 00 call 112ea0 <_Thread_Enable_dispatch> 110361: b8 2d 00 00 00 mov $0x2d,%eax return EDEADLK; 110366: eb 8e jmp 1102f6 0010b440 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10b440: 55 push %ebp 10b441: 89 e5 mov %esp,%ebp 10b443: 57 push %edi 10b444: 56 push %esi 10b445: 53 push %ebx 10b446: 83 ec 28 sub $0x28,%esp 10b449: a1 d8 95 12 00 mov 0x1295d8,%eax 10b44e: 40 inc %eax 10b44f: a3 d8 95 12 00 mov %eax,0x1295d8 * 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 ); 10b454: 68 80 9a 12 00 push $0x129a80 10b459: e8 aa 21 00 00 call 10d608 <_Objects_Allocate> 10b45e: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10b460: 83 c4 10 add $0x10,%esp 10b463: 85 c0 test %eax,%eax 10b465: 0f 84 81 00 00 00 je 10b4ec _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10b46b: 8b 45 0c mov 0xc(%ebp),%eax 10b46e: 89 46 10 mov %eax,0x10(%esi) 10b471: bb 01 00 00 00 mov $0x1,%ebx for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 10b476: 8b 04 9d ac 95 12 00 mov 0x1295ac(,%ebx,4),%eax 10b47d: 85 c0 test %eax,%eax 10b47f: 74 5f je 10b4e0 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10b481: 8b 40 04 mov 0x4(%eax),%eax 10b484: 0f b7 40 10 movzwl 0x10(%eax),%eax 10b488: 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 ); 10b48f: 83 ec 0c sub $0xc,%esp 10b492: 51 push %ecx 10b493: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b496: e8 21 41 00 00 call 10f5bc <_Workspace_Allocate> if ( !table ) { 10b49b: 83 c4 10 add $0x10,%esp 10b49e: 85 c0 test %eax,%eax 10b4a0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b4a3: 74 5b je 10b500 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10b4a5: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10b4a9: 89 c7 mov %eax,%edi 10b4ab: 31 c0 xor %eax,%eax 10b4ad: f3 aa rep stos %al,%es:(%edi) * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10b4af: 43 inc %ebx * This is a bit more complex than one might initially expect because * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; 10b4b0: 83 fb 05 cmp $0x5,%ebx 10b4b3: 75 c1 jne 10b476 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b4b5: 8b 46 08 mov 0x8(%esi),%eax 10b4b8: 0f b7 c8 movzwl %ax,%ecx 10b4bb: 8b 15 9c 9a 12 00 mov 0x129a9c,%edx 10b4c1: 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; 10b4c4: 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; 10b4cb: 8b 55 08 mov 0x8(%ebp),%edx 10b4ce: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b4d0: e8 57 2e 00 00 call 10e32c <_Thread_Enable_dispatch> 10b4d5: 31 c0 xor %eax,%eax return 0; } 10b4d7: 8d 65 f4 lea -0xc(%ebp),%esp 10b4da: 5b pop %ebx 10b4db: 5e pop %esi 10b4dc: 5f pop %edi 10b4dd: c9 leave 10b4de: c3 ret 10b4df: 90 nop <== NOT EXECUTED } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 10b4e0: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) 10b4e7: 00 10b4e8: eb c5 jmp 10b4af 10b4ea: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10b4ec: e8 3b 2e 00 00 call 10e32c <_Thread_Enable_dispatch> 10b4f1: b8 0b 00 00 00 mov $0xb,%eax *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b4f6: 8d 65 f4 lea -0xc(%ebp),%esp 10b4f9: 5b pop %ebx 10b4fa: 5e pop %esi 10b4fb: 5f pop %edi 10b4fc: c9 leave 10b4fd: c3 ret 10b4fe: 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; 10b500: 89 df mov %ebx,%edi 10b502: 4f dec %edi 10b503: 74 1a je 10b51f 10b505: 8d 5c 9e 10 lea 0x10(%esi,%ebx,4),%ebx 10b509: 8d 76 00 lea 0x0(%esi),%esi the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 10b50c: 83 ec 0c sub $0xc,%esp 10b50f: ff 33 pushl (%ebx) 10b511: e8 c2 40 00 00 call 10f5d8 <_Workspace_Free> (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 10b516: 83 eb 04 sub $0x4,%ebx #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; 10b519: 83 c4 10 add $0x10,%esp 10b51c: 4f dec %edi 10b51d: 75 ed jne 10b50c */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b51f: 83 ec 08 sub $0x8,%esp 10b522: 56 push %esi 10b523: 68 80 9a 12 00 push $0x129a80 10b528: e8 5b 24 00 00 call 10d988 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10b52d: e8 fa 2d 00 00 call 10e32c <_Thread_Enable_dispatch> 10b532: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10b537: 83 c4 10 add $0x10,%esp 10b53a: eb 9b jmp 10b4d7 0011373c : int pthread_kill( pthread_t thread, int sig ) { 11373c: 55 push %ebp 11373d: 89 e5 mov %esp,%ebp 11373f: 57 push %edi 113740: 56 push %esi 113741: 53 push %ebx 113742: 83 ec 1c sub $0x1c,%esp 113745: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 113748: 85 db test %ebx,%ebx 11374a: 0f 84 8c 00 00 00 je 1137dc static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 113750: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 113753: 83 ff 1f cmp $0x1f,%edi 113756: 0f 87 80 00 00 00 ja 1137dc RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 11375c: 51 push %ecx 11375d: 8d 45 e4 lea -0x1c(%ebp),%eax 113760: 50 push %eax 113761: ff 75 08 pushl 0x8(%ebp) 113764: 68 e0 79 12 00 push $0x1279e0 113769: e8 12 95 ff ff call 10cc80 <_Objects_Get> 11376e: 89 c6 mov %eax,%esi rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 113770: 83 c4 10 add $0x10,%esp 113773: 8b 55 e4 mov -0x1c(%ebp),%edx 113776: 85 d2 test %edx,%edx 113778: 75 76 jne 1137f0 case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11377a: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 113780: 8d 04 5b lea (%ebx,%ebx,2),%eax 113783: 83 3c 85 08 7d 12 00 cmpl $0x1,0x127d08(,%eax,4) 11378a: 01 11378b: 74 31 je 1137be return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 11378d: b8 01 00 00 00 mov $0x1,%eax 113792: 89 f9 mov %edi,%ecx 113794: d3 e0 shl %cl,%eax 113796: 09 82 d0 00 00 00 or %eax,0xd0(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 11379c: 50 push %eax 11379d: 6a 00 push $0x0 11379f: 53 push %ebx 1137a0: 56 push %esi 1137a1: e8 7a fe ff ff call 113620 <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 1137a6: c6 46 74 01 movb $0x1,0x74(%esi) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1137aa: a1 b4 77 12 00 mov 0x1277b4,%eax 1137af: 83 c4 10 add $0x10,%esp 1137b2: 85 c0 test %eax,%eax 1137b4: 74 08 je 1137be 1137b6: 3b 35 d8 77 12 00 cmp 0x1277d8,%esi 1137bc: 74 12 je 1137d0 _ISR_Signals_to_thread_executing = true; } _Thread_Enable_dispatch(); 1137be: e8 31 9d ff ff call 10d4f4 <_Thread_Enable_dispatch> 1137c3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 1137c5: 8d 65 f4 lea -0xc(%ebp),%esp 1137c8: 5b pop %ebx 1137c9: 5e pop %esi 1137ca: 5f pop %edi 1137cb: c9 leave 1137cc: c3 ret 1137cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 1137d0: c6 05 88 78 12 00 01 movb $0x1,0x127888 1137d7: eb e5 jmp 1137be 1137d9: 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 ); 1137dc: e8 b3 00 00 00 call 113894 <__errno> 1137e1: c7 00 16 00 00 00 movl $0x16,(%eax) 1137e7: b8 ff ff ff ff mov $0xffffffff,%eax 1137ec: eb d7 jmp 1137c5 1137ee: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 1137f0: e8 9f 00 00 00 call 113894 <__errno> 1137f5: c7 00 03 00 00 00 movl $0x3,(%eax) 1137fb: b8 ff ff ff ff mov $0xffffffff,%eax 113800: eb c3 jmp 1137c5 0010cfec : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10cfec: 55 push %ebp 10cfed: 89 e5 mov %esp,%ebp 10cfef: 83 ec 30 sub $0x30,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10cff2: 8d 45 f4 lea -0xc(%ebp),%eax 10cff5: 50 push %eax 10cff6: ff 75 08 pushl 0x8(%ebp) 10cff9: e8 ba 00 00 00 call 10d0b8 <_POSIX_Mutex_Get> switch ( location ) { 10cffe: 83 c4 10 add $0x10,%esp 10d001: 8b 55 f4 mov -0xc(%ebp),%edx 10d004: 85 d2 test %edx,%edx 10d006: 74 08 je 10d010 10d008: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d00d: c9 leave 10d00e: c3 ret 10d00f: 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 ) ) { 10d010: 8b 48 64 mov 0x64(%eax),%ecx 10d013: 85 c9 test %ecx,%ecx 10d015: 75 0d jne 10d024 _Thread_Enable_dispatch(); 10d017: e8 30 34 00 00 call 11044c <_Thread_Enable_dispatch> 10d01c: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d021: c9 leave 10d022: c3 ret 10d023: 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 ); 10d024: 83 ec 08 sub $0x8,%esp 10d027: 50 push %eax 10d028: 68 e0 c9 12 00 push $0x12c9e0 10d02d: 89 45 e4 mov %eax,-0x1c(%ebp) 10d030: e8 6f 27 00 00 call 10f7a4 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10d035: 83 c4 0c add $0xc,%esp 10d038: 6a 16 push $0x16 10d03a: 6a 00 push $0x0 10d03c: 8b 45 e4 mov -0x1c(%ebp),%eax 10d03f: 8d 50 14 lea 0x14(%eax),%edx 10d042: 52 push %edx 10d043: e8 80 1e 00 00 call 10eec8 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 10d048: 58 pop %eax 10d049: 5a pop %edx 10d04a: 8b 45 e4 mov -0x1c(%ebp),%eax 10d04d: 50 push %eax 10d04e: 68 e0 c9 12 00 push $0x12c9e0 10d053: e8 50 2a 00 00 call 10faa8 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10d058: e8 ef 33 00 00 call 11044c <_Thread_Enable_dispatch> 10d05d: 31 c0 xor %eax,%eax return 0; 10d05f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d062: c9 leave 10d063: c3 ret 0010d10c : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10d10c: 55 push %ebp 10d10d: 89 e5 mov %esp,%ebp 10d10f: 53 push %ebx 10d110: 83 ec 14 sub $0x14,%esp 10d113: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10d116: 85 db test %ebx,%ebx 10d118: 74 19 je 10d133 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d11a: 83 ec 08 sub $0x8,%esp 10d11d: 8d 45 f4 lea -0xc(%ebp),%eax 10d120: 50 push %eax 10d121: ff 75 08 pushl 0x8(%ebp) 10d124: e8 8f ff ff ff call 10d0b8 <_POSIX_Mutex_Get> switch ( location ) { 10d129: 83 c4 10 add $0x10,%esp 10d12c: 8b 55 f4 mov -0xc(%ebp),%edx 10d12f: 85 d2 test %edx,%edx 10d131: 74 0d je 10d140 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; 10d133: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d138: 8b 5d fc mov -0x4(%ebp),%ebx 10d13b: c9 leave 10d13c: c3 ret 10d13d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 10d140: 0f b6 15 dc 83 12 00 movzbl 0x1283dc,%edx 10d147: 2b 50 60 sub 0x60(%eax),%edx 10d14a: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10d14c: e8 fb 32 00 00 call 11044c <_Thread_Enable_dispatch> 10d151: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d153: 8b 5d fc mov -0x4(%ebp),%ebx 10d156: c9 leave 10d157: c3 ret 0010d158 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10d158: 55 push %ebp 10d159: 89 e5 mov %esp,%ebp 10d15b: 57 push %edi 10d15c: 56 push %esi 10d15d: 53 push %ebx 10d15e: 83 ec 1c sub $0x1c,%esp 10d161: 8b 75 08 mov 0x8(%ebp),%esi 10d164: 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; 10d167: 85 db test %ebx,%ebx 10d169: 0f 84 09 01 00 00 je 10d278 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10d16f: 85 f6 test %esi,%esi 10d171: 0f 84 e5 00 00 00 je 10d25c } } } #endif if ( !the_attr->is_initialized ) 10d177: 8b 13 mov (%ebx),%edx 10d179: 85 d2 test %edx,%edx 10d17b: 0f 84 db 00 00 00 je 10d25c return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d181: 8b 43 04 mov 0x4(%ebx),%eax 10d184: 83 f8 01 cmp $0x1,%eax 10d187: 0f 84 f7 00 00 00 je 10d284 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10d18d: 85 c0 test %eax,%eax 10d18f: 0f 85 c7 00 00 00 jne 10d25c return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d195: 8b 43 0c mov 0xc(%ebx),%eax 10d198: 83 f8 01 cmp $0x1,%eax 10d19b: 0f 84 e7 00 00 00 je 10d288 10d1a1: 83 f8 02 cmp $0x2,%eax 10d1a4: 0f 84 c2 00 00 00 je 10d26c 10d1aa: 85 c0 test %eax,%eax 10d1ac: 0f 85 aa 00 00 00 jne 10d25c 10d1b2: 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 ) ) 10d1b9: 83 ec 0c sub $0xc,%esp 10d1bc: ff 73 08 pushl 0x8(%ebx) 10d1bf: e8 2c 03 00 00 call 10d4f0 <_POSIX_Priority_Is_valid> 10d1c4: 83 c4 10 add $0x10,%esp 10d1c7: 84 c0 test %al,%al 10d1c9: 0f 84 8d 00 00 00 je 10d25c #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10d1cf: 83 7b 10 03 cmpl $0x3,0x10(%ebx) 10d1d3: 0f 87 83 00 00 00 ja 10d25c 10d1d9: a1 d8 c5 12 00 mov 0x12c5d8,%eax 10d1de: 40 inc %eax 10d1df: a3 d8 c5 12 00 mov %eax,0x12c5d8 * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10d1e4: 83 ec 0c sub $0xc,%esp 10d1e7: 68 e0 c9 12 00 push $0x12c9e0 10d1ec: e8 37 25 00 00 call 10f728 <_Objects_Allocate> 10d1f1: 89 c7 mov %eax,%edi */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10d1f3: 83 c4 10 add $0x10,%esp 10d1f6: 85 c0 test %eax,%eax 10d1f8: 0f 84 96 00 00 00 je 10d294 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10d1fe: 8b 43 04 mov 0x4(%ebx),%eax 10d201: 89 47 10 mov %eax,0x10(%edi) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10d204: 31 c0 xor %eax,%eax 10d206: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10d20a: 0f 94 c0 sete %al 10d20d: 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; 10d210: c6 47 58 01 movb $0x1,0x58(%edi) the_mutex_attr->priority_ceiling = 10d214: 0f b6 05 dc 83 12 00 movzbl 0x1283dc,%eax 10d21b: 2b 43 08 sub 0x8(%ebx),%eax 10d21e: 89 47 60 mov %eax,0x60(%edi) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10d221: 8b 45 e4 mov -0x1c(%ebp),%eax 10d224: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10d227: 50 push %eax 10d228: 6a 01 push $0x1 10d22a: 8d 47 54 lea 0x54(%edi),%eax 10d22d: 50 push %eax 10d22e: 8d 47 14 lea 0x14(%edi),%eax 10d231: 50 push %eax 10d232: e8 9d 1c 00 00 call 10eed4 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d237: 8b 47 08 mov 0x8(%edi),%eax 10d23a: 0f b7 c8 movzwl %ax,%ecx 10d23d: 8b 15 fc c9 12 00 mov 0x12c9fc,%edx 10d243: 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; 10d246: 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; 10d24d: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10d24f: e8 f8 31 00 00 call 11044c <_Thread_Enable_dispatch> 10d254: 31 c0 xor %eax,%eax return 0; 10d256: 83 c4 10 add $0x10,%esp 10d259: eb 06 jmp 10d261 10d25b: 90 nop <== NOT EXECUTED 10d25c: b8 16 00 00 00 mov $0x16,%eax } 10d261: 8d 65 f4 lea -0xc(%ebp),%esp 10d264: 5b pop %ebx 10d265: 5e pop %esi 10d266: 5f pop %edi 10d267: c9 leave 10d268: c3 ret 10d269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d26c: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; break; case PTHREAD_PRIO_PROTECT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; break; 10d273: e9 41 ff ff ff jmp 10d1b9 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; 10d278: bb 60 ca 12 00 mov $0x12ca60,%ebx 10d27d: e9 ed fe ff ff jmp 10d16f 10d282: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d284: b0 58 mov $0x58,%al 10d286: eb d9 jmp 10d261 return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d288: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10d28f: e9 25 ff ff ff jmp 10d1b9 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10d294: e8 b3 31 00 00 call 11044c <_Thread_Enable_dispatch> 10d299: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10d29e: eb c1 jmp 10d261 0010d318 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10d318: 55 push %ebp 10d319: 89 e5 mov %esp,%ebp 10d31b: 57 push %edi 10d31c: 56 push %esi 10d31d: 53 push %ebx 10d31e: 83 ec 2c sub $0x2c,%esp 10d321: 8b 7d 08 mov 0x8(%ebp),%edi 10d324: 8b 75 0c mov 0xc(%ebp),%esi 10d327: 8b 5d 10 mov 0x10(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10d32a: 85 db test %ebx,%ebx 10d32c: 74 10 je 10d33e return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d32e: 83 ec 0c sub $0xc,%esp 10d331: 56 push %esi 10d332: e8 b9 01 00 00 call 10d4f0 <_POSIX_Priority_Is_valid> 10d337: 83 c4 10 add $0x10,%esp 10d33a: 84 c0 test %al,%al 10d33c: 75 0e jne 10d34c the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); return 0; 10d33e: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d343: 8d 65 f4 lea -0xc(%ebp),%esp 10d346: 5b pop %ebx 10d347: 5e pop %esi 10d348: 5f pop %edi 10d349: c9 leave 10d34a: c3 ret 10d34b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d34c: a0 dc 83 12 00 mov 0x1283dc,%al 10d351: 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 ); 10d354: 83 ec 0c sub $0xc,%esp 10d357: 57 push %edi 10d358: e8 43 ff ff ff call 10d2a0 * 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 ); 10d35d: 58 pop %eax 10d35e: 5a pop %edx 10d35f: 8d 45 e4 lea -0x1c(%ebp),%eax 10d362: 50 push %eax 10d363: 57 push %edi 10d364: e8 4f fd ff ff call 10d0b8 <_POSIX_Mutex_Get> switch ( location ) { 10d369: 83 c4 10 add $0x10,%esp 10d36c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d36f: 85 c9 test %ecx,%ecx 10d371: 75 cb jne 10d33e case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 10d373: 0f b6 15 dc 83 12 00 movzbl 0x1283dc,%edx 10d37a: 2b 50 60 sub 0x60(%eax),%edx 10d37d: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 10d37f: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10d383: 29 f2 sub %esi,%edx 10d385: 89 50 60 mov %edx,0x60(%eax) /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 10d388: 52 push %edx 10d389: 6a 00 push $0x0 10d38b: ff 70 08 pushl 0x8(%eax) 10d38e: 83 c0 14 add $0x14,%eax 10d391: 50 push %eax 10d392: e8 d5 1c 00 00 call 10f06c <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d397: e8 b0 30 00 00 call 11044c <_Thread_Enable_dispatch> 10d39c: 31 c0 xor %eax,%eax return 0; 10d39e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d3a1: 8d 65 f4 lea -0xc(%ebp),%esp 10d3a4: 5b pop %ebx 10d3a5: 5e pop %esi 10d3a6: 5f pop %edi 10d3a7: c9 leave 10d3a8: c3 ret 0010d3ac : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10d3ac: 55 push %ebp 10d3ad: 89 e5 mov %esp,%ebp 10d3af: 53 push %ebx 10d3b0: 83 ec 1c sub $0x1c,%esp 10d3b3: 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 ); 10d3b6: 8d 45 f4 lea -0xc(%ebp),%eax 10d3b9: 50 push %eax 10d3ba: ff 75 0c pushl 0xc(%ebp) 10d3bd: e8 a6 00 00 00 call 10d468 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10d3c2: 83 c4 10 add $0x10,%esp 10d3c5: 83 f8 03 cmp $0x3,%eax 10d3c8: 74 16 je 10d3e0 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d3ca: 50 push %eax 10d3cb: ff 75 f4 pushl -0xc(%ebp) 10d3ce: 6a 00 push $0x0 10d3d0: 53 push %ebx 10d3d1: e8 de fe ff ff call 10d2b4 <_POSIX_Mutex_Lock_support> 10d3d6: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d3d9: 8b 5d fc mov -0x4(%ebp),%ebx 10d3dc: c9 leave 10d3dd: c3 ret 10d3de: 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 ); 10d3e0: 52 push %edx 10d3e1: ff 75 f4 pushl -0xc(%ebp) 10d3e4: 6a 01 push $0x1 10d3e6: 53 push %ebx 10d3e7: e8 c8 fe ff ff call 10d2b4 <_POSIX_Mutex_Lock_support> 10d3ec: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d3ef: 8b 5d fc mov -0x4(%ebp),%ebx 10d3f2: c9 leave 10d3f3: c3 ret 0010d418 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10d418: 55 push %ebp 10d419: 89 e5 mov %esp,%ebp 10d41b: 53 push %ebx 10d41c: 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 ); 10d41f: 8d 45 f4 lea -0xc(%ebp),%eax 10d422: 50 push %eax 10d423: ff 75 08 pushl 0x8(%ebp) 10d426: e8 8d fc ff ff call 10d0b8 <_POSIX_Mutex_Get> switch ( location ) { 10d42b: 83 c4 10 add $0x10,%esp 10d42e: 8b 4d f4 mov -0xc(%ebp),%ecx 10d431: 85 c9 test %ecx,%ecx 10d433: 75 27 jne 10d45c case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10d435: 52 push %edx 10d436: 6a 00 push $0x0 10d438: ff 70 08 pushl 0x8(%eax) 10d43b: 83 c0 14 add $0x14,%eax 10d43e: 50 push %eax 10d43f: e8 28 1c 00 00 call 10f06c <_CORE_mutex_Surrender> 10d444: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d446: e8 01 30 00 00 call 11044c <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10d44b: 89 1c 24 mov %ebx,(%esp) 10d44e: e8 a1 ff ff ff call 10d3f4 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d453: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d456: 8b 5d fc mov -0x4(%ebp),%ebx 10d459: c9 leave 10d45a: c3 ret 10d45b: 90 nop <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 10d45c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d461: 8b 5d fc mov -0x4(%ebp),%ebx 10d464: c9 leave 10d465: c3 ret 0010ce98 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10ce98: 55 push %ebp 10ce99: 89 e5 mov %esp,%ebp 10ce9b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10ce9e: 85 c0 test %eax,%eax 10cea0: 74 12 je 10ceb4 10cea2: 8b 10 mov (%eax),%edx 10cea4: 85 d2 test %edx,%edx 10cea6: 74 0c je 10ceb4 return EINVAL; attr->is_initialized = false; 10cea8: c7 00 00 00 00 00 movl $0x0,(%eax) 10ceae: 31 c0 xor %eax,%eax return 0; } 10ceb0: c9 leave 10ceb1: c3 ret 10ceb2: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10ceb4: b8 16 00 00 00 mov $0x16,%eax } 10ceb9: c9 leave 10ceba: c3 ret 0010cf5c : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10cf5c: 55 push %ebp 10cf5d: 89 e5 mov %esp,%ebp 10cf5f: 56 push %esi 10cf60: 53 push %ebx 10cf61: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf64: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10cf67: 85 db test %ebx,%ebx 10cf69: 74 06 je 10cf71 10cf6b: 8b 03 mov (%ebx),%eax 10cf6d: 85 c0 test %eax,%eax 10cf6f: 75 0f jne 10cf80 if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; 10cf71: b8 16 00 00 00 mov $0x16,%eax } 10cf76: 8d 65 f8 lea -0x8(%ebp),%esp 10cf79: 5b pop %ebx 10cf7a: 5e pop %esi 10cf7b: c9 leave 10cf7c: c3 ret 10cf7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10cf80: 83 ec 0c sub $0xc,%esp 10cf83: 56 push %esi 10cf84: e8 67 05 00 00 call 10d4f0 <_POSIX_Priority_Is_valid> 10cf89: 83 c4 10 add $0x10,%esp 10cf8c: 84 c0 test %al,%al 10cf8e: 74 e1 je 10cf71 return EINVAL; attr->prio_ceiling = prioceiling; 10cf90: 89 73 08 mov %esi,0x8(%ebx) 10cf93: 31 c0 xor %eax,%eax return 0; } 10cf95: 8d 65 f8 lea -0x8(%ebp),%esp 10cf98: 5b pop %ebx 10cf99: 5e pop %esi 10cf9a: c9 leave 10cf9b: c3 ret 0010cf9c : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10cf9c: 55 push %ebp 10cf9d: 89 e5 mov %esp,%ebp 10cf9f: 8b 45 08 mov 0x8(%ebp),%eax 10cfa2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10cfa5: 85 c0 test %eax,%eax 10cfa7: 74 0b je 10cfb4 10cfa9: 8b 08 mov (%eax),%ecx 10cfab: 85 c9 test %ecx,%ecx 10cfad: 74 05 je 10cfb4 return EINVAL; switch ( protocol ) { 10cfaf: 83 fa 02 cmp $0x2,%edx 10cfb2: 76 08 jbe 10cfbc case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; 10cfb4: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cfb9: c9 leave 10cfba: c3 ret 10cfbb: 90 nop <== NOT EXECUTED switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10cfbc: 89 50 0c mov %edx,0xc(%eax) 10cfbf: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cfc1: c9 leave 10cfc2: c3 ret 0010cfc4 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10cfc4: 55 push %ebp 10cfc5: 89 e5 mov %esp,%ebp 10cfc7: 8b 45 08 mov 0x8(%ebp),%eax 10cfca: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10cfcd: 85 c0 test %eax,%eax 10cfcf: 74 0b je 10cfdc 10cfd1: 8b 08 mov (%eax),%ecx 10cfd3: 85 c9 test %ecx,%ecx 10cfd5: 74 05 je 10cfdc return EINVAL; switch ( pshared ) { 10cfd7: 83 fa 01 cmp $0x1,%edx 10cfda: 76 08 jbe 10cfe4 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10cfdc: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cfe1: c9 leave 10cfe2: c3 ret 10cfe3: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cfe4: 89 50 04 mov %edx,0x4(%eax) 10cfe7: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cfe9: c9 leave 10cfea: c3 ret 0010b130 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10b130: 55 push %ebp 10b131: 89 e5 mov %esp,%ebp 10b133: 8b 45 08 mov 0x8(%ebp),%eax 10b136: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b139: 85 c0 test %eax,%eax 10b13b: 74 0b je 10b148 10b13d: 8b 08 mov (%eax),%ecx 10b13f: 85 c9 test %ecx,%ecx 10b141: 74 05 je 10b148 return EINVAL; switch ( type ) { 10b143: 83 fa 03 cmp $0x3,%edx 10b146: 76 08 jbe 10b150 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 10b148: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b14d: c9 leave 10b14e: c3 ret 10b14f: 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; 10b150: 89 50 10 mov %edx,0x10(%eax) 10b153: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b155: c9 leave 10b156: c3 ret 0010bc80 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10bc80: 55 push %ebp 10bc81: 89 e5 mov %esp,%ebp 10bc83: 57 push %edi 10bc84: 56 push %esi 10bc85: 53 push %ebx 10bc86: 83 ec 1c sub $0x1c,%esp 10bc89: 8b 5d 08 mov 0x8(%ebp),%ebx 10bc8c: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10bc8f: 85 db test %ebx,%ebx 10bc91: 74 51 je 10bce4 10bc93: 85 f6 test %esi,%esi 10bc95: 74 4d je 10bce4 return EINVAL; if ( !once_control->init_executed ) { 10bc97: 8b 7b 04 mov 0x4(%ebx),%edi 10bc9a: 85 ff test %edi,%edi 10bc9c: 74 0a je 10bca8 10bc9e: 31 c0 xor %eax,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10bca0: 8d 65 f4 lea -0xc(%ebp),%esp 10bca3: 5b pop %ebx 10bca4: 5e pop %esi 10bca5: 5f pop %edi 10bca6: c9 leave 10bca7: c3 ret 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); 10bca8: 51 push %ecx 10bca9: 8d 7d e4 lea -0x1c(%ebp),%edi 10bcac: 57 push %edi 10bcad: 68 00 01 00 00 push $0x100 10bcb2: 68 00 01 00 00 push $0x100 10bcb7: e8 e0 0b 00 00 call 10c89c if ( !once_control->init_executed ) { 10bcbc: 83 c4 10 add $0x10,%esp 10bcbf: 8b 53 04 mov 0x4(%ebx),%edx 10bcc2: 85 d2 test %edx,%edx 10bcc4: 74 2e je 10bcf4 once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bcc6: 50 push %eax 10bcc7: 57 push %edi 10bcc8: 68 00 01 00 00 push $0x100 10bccd: ff 75 e4 pushl -0x1c(%ebp) 10bcd0: e8 c7 0b 00 00 call 10c89c 10bcd5: 31 c0 xor %eax,%eax 10bcd7: 83 c4 10 add $0x10,%esp } return 0; } 10bcda: 8d 65 f4 lea -0xc(%ebp),%esp 10bcdd: 5b pop %ebx 10bcde: 5e pop %esi 10bcdf: 5f pop %edi 10bce0: c9 leave 10bce1: c3 ret 10bce2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bce4: b8 16 00 00 00 mov $0x16,%eax } return 0; } 10bce9: 8d 65 f4 lea -0xc(%ebp),%esp 10bcec: 5b pop %ebx 10bced: 5e pop %esi 10bcee: 5f pop %edi 10bcef: c9 leave 10bcf0: c3 ret 10bcf1: 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; 10bcf4: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10bcfa: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10bd01: ff d6 call *%esi 10bd03: eb c1 jmp 10bcc6 0010c11c : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10c11c: 55 push %ebp 10c11d: 89 e5 mov %esp,%ebp 10c11f: 53 push %ebx 10c120: 83 ec 14 sub $0x14,%esp 10c123: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10c126: 85 c0 test %eax,%eax 10c128: 74 42 je 10c16c RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c12a: 53 push %ebx 10c12b: 8d 55 f4 lea -0xc(%ebp),%edx 10c12e: 52 push %edx 10c12f: ff 30 pushl (%eax) 10c131: 68 60 a5 12 00 push $0x12a560 10c136: e8 65 2b 00 00 call 10eca0 <_Objects_Get> 10c13b: 89 c3 mov %eax,%ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c13d: 83 c4 10 add $0x10,%esp 10c140: 8b 4d f4 mov -0xc(%ebp),%ecx 10c143: 85 c9 test %ecx,%ecx 10c145: 75 25 jne 10c16c 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 ) { 10c147: 83 ec 0c sub $0xc,%esp 10c14a: 8d 40 10 lea 0x10(%eax),%eax 10c14d: 50 push %eax 10c14e: e8 f1 3b 00 00 call 10fd44 <_Thread_queue_First> 10c153: 83 c4 10 add $0x10,%esp 10c156: 85 c0 test %eax,%eax 10c158: 74 1e je 10c178 _Thread_Enable_dispatch(); 10c15a: e8 b5 33 00 00 call 10f514 <_Thread_Enable_dispatch> 10c15f: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c164: 8b 5d fc mov -0x4(%ebp),%ebx 10c167: c9 leave 10c168: c3 ret 10c169: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0; 10c16c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c171: 8b 5d fc mov -0x4(%ebp),%ebx 10c174: c9 leave 10c175: c3 ret 10c176: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10c178: 83 ec 08 sub $0x8,%esp 10c17b: 53 push %ebx 10c17c: 68 60 a5 12 00 push $0x12a560 10c181: e8 e6 26 00 00 call 10e86c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10c186: 58 pop %eax 10c187: 5a pop %edx 10c188: 53 push %ebx 10c189: 68 60 a5 12 00 push $0x12a560 10c18e: e8 dd 29 00 00 call 10eb70 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10c193: e8 7c 33 00 00 call 10f514 <_Thread_Enable_dispatch> 10c198: 31 c0 xor %eax,%eax return 0; 10c19a: 83 c4 10 add $0x10,%esp 10c19d: eb d2 jmp 10c171 0010c1a0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10c1a0: 55 push %ebp 10c1a1: 89 e5 mov %esp,%ebp 10c1a3: 56 push %esi 10c1a4: 53 push %ebx 10c1a5: 83 ec 20 sub $0x20,%esp 10c1a8: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1ab: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10c1ae: 85 db test %ebx,%ebx 10c1b0: 74 15 je 10c1c7 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10c1b2: 85 f6 test %esi,%esi 10c1b4: 0f 84 86 00 00 00 je 10c240 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10c1ba: 8b 16 mov (%esi),%edx 10c1bc: 85 d2 test %edx,%edx 10c1be: 74 07 je 10c1c7 return EINVAL; switch ( the_attr->process_shared ) { 10c1c0: 8b 46 04 mov 0x4(%esi),%eax 10c1c3: 85 c0 test %eax,%eax 10c1c5: 74 0d je 10c1d4 ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 10c1c7: b8 16 00 00 00 mov $0x16,%eax } 10c1cc: 8d 65 f8 lea -0x8(%ebp),%esp 10c1cf: 5b pop %ebx 10c1d0: 5e pop %esi 10c1d1: c9 leave 10c1d2: c3 ret 10c1d3: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c1d4: a1 d8 a2 12 00 mov 0x12a2d8,%eax 10c1d9: 40 inc %eax 10c1da: a3 d8 a2 12 00 mov %eax,0x12a2d8 * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 10c1df: 83 ec 0c sub $0xc,%esp 10c1e2: 68 60 a5 12 00 push $0x12a560 10c1e7: e8 04 26 00 00 call 10e7f0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10c1ec: 83 c4 10 add $0x10,%esp 10c1ef: 85 c0 test %eax,%eax 10c1f1: 74 41 je 10c234 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10c1f3: 83 ec 08 sub $0x8,%esp 10c1f6: 8d 55 f4 lea -0xc(%ebp),%edx 10c1f9: 52 push %edx 10c1fa: 8d 50 10 lea 0x10(%eax),%edx 10c1fd: 52 push %edx 10c1fe: 89 45 e4 mov %eax,-0x1c(%ebp) 10c201: e8 06 1e 00 00 call 10e00c <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c206: 8b 45 e4 mov -0x1c(%ebp),%eax 10c209: 8b 50 08 mov 0x8(%eax),%edx 10c20c: 0f b7 f2 movzwl %dx,%esi 10c20f: 8b 0d 7c a5 12 00 mov 0x12a57c,%ecx 10c215: 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; 10c218: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10c21f: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c221: e8 ee 32 00 00 call 10f514 <_Thread_Enable_dispatch> 10c226: 31 c0 xor %eax,%eax return 0; 10c228: 83 c4 10 add $0x10,%esp } 10c22b: 8d 65 f8 lea -0x8(%ebp),%esp 10c22e: 5b pop %ebx 10c22f: 5e pop %esi 10c230: c9 leave 10c231: c3 ret 10c232: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10c234: e8 db 32 00 00 call 10f514 <_Thread_Enable_dispatch> 10c239: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10c23e: eb 8c jmp 10c1cc * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10c240: 83 ec 0c sub $0xc,%esp 10c243: 8d 75 ec lea -0x14(%ebp),%esi 10c246: 56 push %esi 10c247: e8 74 09 00 00 call 10cbc0 10c24c: 83 c4 10 add $0x10,%esp 10c24f: e9 66 ff ff ff jmp 10c1ba 0010c254 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10c254: 55 push %ebp 10c255: 89 e5 mov %esp,%ebp 10c257: 53 push %ebx 10c258: 83 ec 14 sub $0x14,%esp 10c25b: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c25e: 85 db test %ebx,%ebx 10c260: 74 1b je 10c27d RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c262: 51 push %ecx 10c263: 8d 45 f4 lea -0xc(%ebp),%eax 10c266: 50 push %eax 10c267: ff 33 pushl (%ebx) 10c269: 68 60 a5 12 00 push $0x12a560 10c26e: e8 2d 2a 00 00 call 10eca0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c273: 83 c4 10 add $0x10,%esp 10c276: 8b 55 f4 mov -0xc(%ebp),%edx 10c279: 85 d2 test %edx,%edx 10c27b: 74 0b je 10c288 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c27d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c282: 8b 5d fc mov -0x4(%ebp),%ebx 10c285: c9 leave 10c286: c3 ret 10c287: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c288: 83 ec 0c sub $0xc,%esp 10c28b: 6a 00 push $0x0 10c28d: 6a 00 push $0x0 10c28f: 6a 01 push $0x1 10c291: ff 33 pushl (%ebx) 10c293: 83 c0 10 add $0x10,%eax 10c296: 50 push %eax 10c297: e8 a4 1d 00 00 call 10e040 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c29c: 83 c4 20 add $0x20,%esp 10c29f: e8 70 32 00 00 call 10f514 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c2a4: 83 ec 0c sub $0xc,%esp 10c2a7: a1 98 a3 12 00 mov 0x12a398,%eax 10c2ac: ff 70 34 pushl 0x34(%eax) 10c2af: e8 70 01 00 00 call 10c424 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c2b4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c2b7: 8b 5d fc mov -0x4(%ebp),%ebx 10c2ba: c9 leave 10c2bb: c3 ret 0010c2bc : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c2bc: 55 push %ebp 10c2bd: 89 e5 mov %esp,%ebp 10c2bf: 56 push %esi 10c2c0: 53 push %ebx 10c2c1: 83 ec 20 sub $0x20,%esp 10c2c4: 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 ) 10c2c7: 85 db test %ebx,%ebx 10c2c9: 74 7d je 10c348 * * 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 ); 10c2cb: 83 ec 08 sub $0x8,%esp 10c2ce: 8d 45 f0 lea -0x10(%ebp),%eax 10c2d1: 50 push %eax 10c2d2: ff 75 0c pushl 0xc(%ebp) 10c2d5: e8 02 5f 00 00 call 1121dc <_POSIX_Absolute_timeout_to_ticks> 10c2da: 89 c6 mov %eax,%esi 10c2dc: 83 c4 0c add $0xc,%esp 10c2df: 8d 45 f4 lea -0xc(%ebp),%eax 10c2e2: 50 push %eax 10c2e3: ff 33 pushl (%ebx) 10c2e5: 68 60 a5 12 00 push $0x12a560 10c2ea: e8 b1 29 00 00 call 10eca0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c2ef: 83 c4 10 add $0x10,%esp 10c2f2: 8b 55 f4 mov -0xc(%ebp),%edx 10c2f5: 85 d2 test %edx,%edx 10c2f7: 75 4f jne 10c348 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, 10c2f9: 83 fe 03 cmp $0x3,%esi 10c2fc: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c2ff: 83 ec 0c sub $0xc,%esp 10c302: 6a 00 push $0x0 10c304: ff 75 f0 pushl -0x10(%ebp) 10c307: 0f b6 ca movzbl %dl,%ecx 10c30a: 51 push %ecx 10c30b: ff 33 pushl (%ebx) 10c30d: 83 c0 10 add $0x10,%eax 10c310: 50 push %eax 10c311: 88 55 e4 mov %dl,-0x1c(%ebp) 10c314: e8 27 1d 00 00 call 10e040 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c319: 83 c4 20 add $0x20,%esp 10c31c: e8 f3 31 00 00 call 10f514 <_Thread_Enable_dispatch> if ( !do_wait ) { 10c321: 8a 55 e4 mov -0x1c(%ebp),%dl 10c324: 84 d2 test %dl,%dl 10c326: 75 3c jne 10c364 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10c328: a1 98 a3 12 00 mov 0x12a398,%eax 10c32d: 8b 40 34 mov 0x34(%eax),%eax 10c330: 83 f8 02 cmp $0x2,%eax 10c333: 74 1f je 10c354 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c335: 83 ec 0c sub $0xc,%esp 10c338: 50 push %eax 10c339: e8 e6 00 00 00 call 10c424 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c33e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c341: 8d 65 f8 lea -0x8(%ebp),%esp 10c344: 5b pop %ebx 10c345: 5e pop %esi 10c346: c9 leave 10c347: c3 ret break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c348: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c34d: 8d 65 f8 lea -0x8(%ebp),%esp 10c350: 5b pop %ebx 10c351: 5e pop %esi 10c352: c9 leave 10c353: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 10c354: 85 f6 test %esi,%esi 10c356: 74 f0 je 10c348 10c358: 83 fe 02 cmp $0x2,%esi 10c35b: 77 d8 ja 10c335 10c35d: b0 74 mov $0x74,%al 10c35f: eb ec jmp 10c34d 10c361: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c364: a1 98 a3 12 00 mov 0x12a398,%eax 10c369: 8b 40 34 mov 0x34(%eax),%eax 10c36c: eb c7 jmp 10c335 0010c370 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c370: 55 push %ebp 10c371: 89 e5 mov %esp,%ebp 10c373: 56 push %esi 10c374: 53 push %ebx 10c375: 83 ec 20 sub $0x20,%esp 10c378: 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 ) 10c37b: 85 db test %ebx,%ebx 10c37d: 74 7d je 10c3fc * * 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 ); 10c37f: 83 ec 08 sub $0x8,%esp 10c382: 8d 45 f0 lea -0x10(%ebp),%eax 10c385: 50 push %eax 10c386: ff 75 0c pushl 0xc(%ebp) 10c389: e8 4e 5e 00 00 call 1121dc <_POSIX_Absolute_timeout_to_ticks> 10c38e: 89 c6 mov %eax,%esi 10c390: 83 c4 0c add $0xc,%esp 10c393: 8d 45 f4 lea -0xc(%ebp),%eax 10c396: 50 push %eax 10c397: ff 33 pushl (%ebx) 10c399: 68 60 a5 12 00 push $0x12a560 10c39e: e8 fd 28 00 00 call 10eca0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c3a3: 83 c4 10 add $0x10,%esp 10c3a6: 8b 55 f4 mov -0xc(%ebp),%edx 10c3a9: 85 d2 test %edx,%edx 10c3ab: 75 4f jne 10c3fc (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, 10c3ad: 83 fe 03 cmp $0x3,%esi 10c3b0: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c3b3: 83 ec 0c sub $0xc,%esp 10c3b6: 6a 00 push $0x0 10c3b8: ff 75 f0 pushl -0x10(%ebp) 10c3bb: 0f b6 ca movzbl %dl,%ecx 10c3be: 51 push %ecx 10c3bf: ff 33 pushl (%ebx) 10c3c1: 83 c0 10 add $0x10,%eax 10c3c4: 50 push %eax 10c3c5: 88 55 e4 mov %dl,-0x1c(%ebp) 10c3c8: e8 3b 1d 00 00 call 10e108 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c3cd: 83 c4 20 add $0x20,%esp 10c3d0: e8 3f 31 00 00 call 10f514 <_Thread_Enable_dispatch> if ( !do_wait && 10c3d5: 8a 55 e4 mov -0x1c(%ebp),%dl 10c3d8: 84 d2 test %dl,%dl 10c3da: 75 3c jne 10c418 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10c3dc: a1 98 a3 12 00 mov 0x12a398,%eax 10c3e1: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c3e4: 83 f8 02 cmp $0x2,%eax 10c3e7: 74 1f je 10c408 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c3e9: 83 ec 0c sub $0xc,%esp 10c3ec: 50 push %eax 10c3ed: e8 32 00 00 00 call 10c424 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c3f2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c3f5: 8d 65 f8 lea -0x8(%ebp),%esp 10c3f8: 5b pop %ebx 10c3f9: 5e pop %esi 10c3fa: c9 leave 10c3fb: c3 ret case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c3fc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c401: 8d 65 f8 lea -0x8(%ebp),%esp 10c404: 5b pop %ebx 10c405: 5e pop %esi 10c406: c9 leave 10c407: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10c408: 85 f6 test %esi,%esi 10c40a: 74 f0 je 10c3fc 10c40c: 83 fe 02 cmp $0x2,%esi 10c40f: 77 d8 ja 10c3e9 10c411: b0 74 mov $0x74,%al 10c413: eb ec jmp 10c401 10c415: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c418: a1 98 a3 12 00 mov 0x12a398,%eax 10c41d: 8b 40 34 mov 0x34(%eax),%eax 10c420: eb c7 jmp 10c3e9 0010c434 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10c434: 55 push %ebp 10c435: 89 e5 mov %esp,%ebp 10c437: 53 push %ebx 10c438: 83 ec 14 sub $0x14,%esp 10c43b: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c43e: 85 db test %ebx,%ebx 10c440: 74 1b je 10c45d 10c442: 51 push %ecx 10c443: 8d 45 f4 lea -0xc(%ebp),%eax 10c446: 50 push %eax 10c447: ff 33 pushl (%ebx) 10c449: 68 60 a5 12 00 push $0x12a560 10c44e: e8 4d 28 00 00 call 10eca0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c453: 83 c4 10 add $0x10,%esp 10c456: 8b 55 f4 mov -0xc(%ebp),%edx 10c459: 85 d2 test %edx,%edx 10c45b: 74 0b je 10c468 NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c45d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c462: 8b 5d fc mov -0x4(%ebp),%ebx 10c465: c9 leave 10c466: c3 ret 10c467: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c468: 83 ec 0c sub $0xc,%esp 10c46b: 6a 00 push $0x0 10c46d: 6a 00 push $0x0 10c46f: 6a 00 push $0x0 10c471: ff 33 pushl (%ebx) 10c473: 83 c0 10 add $0x10,%eax 10c476: 50 push %eax 10c477: e8 c4 1b 00 00 call 10e040 <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10c47c: 83 c4 20 add $0x20,%esp 10c47f: e8 90 30 00 00 call 10f514 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c484: 83 ec 0c sub $0xc,%esp 10c487: a1 98 a3 12 00 mov 0x12a398,%eax 10c48c: ff 70 34 pushl 0x34(%eax) 10c48f: e8 90 ff ff ff call 10c424 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c494: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c497: 8b 5d fc mov -0x4(%ebp),%ebx 10c49a: c9 leave 10c49b: c3 ret 0010c49c : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10c49c: 55 push %ebp 10c49d: 89 e5 mov %esp,%ebp 10c49f: 53 push %ebx 10c4a0: 83 ec 14 sub $0x14,%esp 10c4a3: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c4a6: 85 db test %ebx,%ebx 10c4a8: 74 1b je 10c4c5 10c4aa: 51 push %ecx 10c4ab: 8d 45 f4 lea -0xc(%ebp),%eax 10c4ae: 50 push %eax 10c4af: ff 33 pushl (%ebx) 10c4b1: 68 60 a5 12 00 push $0x12a560 10c4b6: e8 e5 27 00 00 call 10eca0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c4bb: 83 c4 10 add $0x10,%esp 10c4be: 8b 55 f4 mov -0xc(%ebp),%edx 10c4c1: 85 d2 test %edx,%edx 10c4c3: 74 0b je 10c4d0 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4c5: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c4ca: 8b 5d fc mov -0x4(%ebp),%ebx 10c4cd: c9 leave 10c4ce: c3 ret 10c4cf: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c4d0: 83 ec 0c sub $0xc,%esp 10c4d3: 6a 00 push $0x0 10c4d5: 6a 00 push $0x0 10c4d7: 6a 00 push $0x0 10c4d9: ff 33 pushl (%ebx) 10c4db: 83 c0 10 add $0x10,%eax 10c4de: 50 push %eax 10c4df: e8 24 1c 00 00 call 10e108 <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10c4e4: 83 c4 20 add $0x20,%esp 10c4e7: e8 28 30 00 00 call 10f514 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4ec: 83 ec 0c sub $0xc,%esp 10c4ef: a1 98 a3 12 00 mov 0x12a398,%eax 10c4f4: ff 70 34 pushl 0x34(%eax) 10c4f7: e8 28 ff ff ff call 10c424 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c4fc: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c4ff: 8b 5d fc mov -0x4(%ebp),%ebx 10c502: c9 leave 10c503: c3 ret 0010c504 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10c504: 55 push %ebp 10c505: 89 e5 mov %esp,%ebp 10c507: 53 push %ebx 10c508: 83 ec 14 sub $0x14,%esp 10c50b: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10c50e: 85 c0 test %eax,%eax 10c510: 74 1b je 10c52d 10c512: 51 push %ecx 10c513: 8d 55 f4 lea -0xc(%ebp),%edx 10c516: 52 push %edx 10c517: ff 30 pushl (%eax) 10c519: 68 60 a5 12 00 push $0x12a560 10c51e: e8 7d 27 00 00 call 10eca0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c523: 83 c4 10 add $0x10,%esp 10c526: 8b 55 f4 mov -0xc(%ebp),%edx 10c529: 85 d2 test %edx,%edx 10c52b: 74 0b je 10c538 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c52d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c532: 8b 5d fc mov -0x4(%ebp),%ebx 10c535: c9 leave 10c536: c3 ret 10c537: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10c538: 83 ec 0c sub $0xc,%esp 10c53b: 83 c0 10 add $0x10,%eax 10c53e: 50 push %eax 10c53f: e8 50 1c 00 00 call 10e194 <_CORE_RWLock_Release> 10c544: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10c546: e8 c9 2f 00 00 call 10f514 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c54b: 89 1c 24 mov %ebx,(%esp) 10c54e: e8 d1 fe ff ff call 10c424 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c553: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c556: 8b 5d fc mov -0x4(%ebp),%ebx 10c559: c9 leave 10c55a: c3 ret 0010c55c : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10c55c: 55 push %ebp 10c55d: 89 e5 mov %esp,%ebp 10c55f: 53 push %ebx 10c560: 83 ec 14 sub $0x14,%esp 10c563: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c566: 85 db test %ebx,%ebx 10c568: 74 1b je 10c585 10c56a: 51 push %ecx 10c56b: 8d 45 f4 lea -0xc(%ebp),%eax 10c56e: 50 push %eax 10c56f: ff 33 pushl (%ebx) 10c571: 68 60 a5 12 00 push $0x12a560 10c576: e8 25 27 00 00 call 10eca0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c57b: 83 c4 10 add $0x10,%esp 10c57e: 8b 55 f4 mov -0xc(%ebp),%edx 10c581: 85 d2 test %edx,%edx 10c583: 74 0b je 10c590 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c585: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c58a: 8b 5d fc mov -0x4(%ebp),%ebx 10c58d: c9 leave 10c58e: c3 ret 10c58f: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c590: 83 ec 0c sub $0xc,%esp 10c593: 6a 00 push $0x0 10c595: 6a 00 push $0x0 10c597: 6a 01 push $0x1 10c599: ff 33 pushl (%ebx) 10c59b: 83 c0 10 add $0x10,%eax 10c59e: 50 push %eax 10c59f: e8 64 1b 00 00 call 10e108 <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c5a4: 83 c4 20 add $0x20,%esp 10c5a7: e8 68 2f 00 00 call 10f514 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c5ac: 83 ec 0c sub $0xc,%esp 10c5af: a1 98 a3 12 00 mov 0x12a398,%eax 10c5b4: ff 70 34 pushl 0x34(%eax) 10c5b7: e8 68 fe ff ff call 10c424 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10c5bc: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c5bf: 8b 5d fc mov -0x4(%ebp),%ebx 10c5c2: c9 leave 10c5c3: c3 ret 0010cb78 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10cb78: 55 push %ebp 10cb79: 89 e5 mov %esp,%ebp 10cb7b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10cb7e: 85 c0 test %eax,%eax 10cb80: 74 12 je 10cb94 10cb82: 8b 10 mov (%eax),%edx 10cb84: 85 d2 test %edx,%edx 10cb86: 74 0c je 10cb94 return EINVAL; attr->is_initialized = false; 10cb88: c7 00 00 00 00 00 movl $0x0,(%eax) 10cb8e: 31 c0 xor %eax,%eax return 0; } 10cb90: c9 leave 10cb91: c3 ret 10cb92: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10cb94: b8 16 00 00 00 mov $0x16,%eax } 10cb99: c9 leave 10cb9a: c3 ret 0010cbc0 : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 10cbc0: 55 push %ebp 10cbc1: 89 e5 mov %esp,%ebp 10cbc3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10cbc6: 85 c0 test %eax,%eax 10cbc8: 74 12 je 10cbdc return EINVAL; attr->is_initialized = true; 10cbca: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10cbd0: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10cbd7: 31 c0 xor %eax,%eax return 0; } 10cbd9: c9 leave 10cbda: c3 ret 10cbdb: 90 nop <== NOT EXECUTED int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { if ( !attr ) 10cbdc: b0 16 mov $0x16,%al return EINVAL; attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10cbde: c9 leave 10cbdf: c3 ret 0010cbe0 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10cbe0: 55 push %ebp 10cbe1: 89 e5 mov %esp,%ebp 10cbe3: 8b 45 08 mov 0x8(%ebp),%eax 10cbe6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10cbe9: 85 c0 test %eax,%eax 10cbeb: 74 0b je 10cbf8 return EINVAL; if ( !attr->is_initialized ) 10cbed: 8b 08 mov (%eax),%ecx 10cbef: 85 c9 test %ecx,%ecx 10cbf1: 74 05 je 10cbf8 return EINVAL; switch ( pshared ) { 10cbf3: 83 fa 01 cmp $0x1,%edx 10cbf6: 76 08 jbe 10cc00 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10cbf8: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cbfd: c9 leave 10cbfe: c3 ret 10cbff: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cc00: 89 50 04 mov %edx,0x4(%eax) 10cc03: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cc05: c9 leave 10cc06: c3 ret 0010b110 : int pthread_setcancelstate( int state, int *oldstate ) { 10b110: 55 push %ebp 10b111: 89 e5 mov %esp,%ebp 10b113: 53 push %ebx 10b114: 83 ec 04 sub $0x4,%esp 10b117: 8b 4d 08 mov 0x8(%ebp),%ecx 10b11a: 8b 55 0c mov 0xc(%ebp),%edx * 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() ) 10b11d: a1 94 8a 12 00 mov 0x128a94,%eax 10b122: 85 c0 test %eax,%eax 10b124: 75 16 jne 10b13c return EPROTO; if ( !oldstate ) 10b126: 85 d2 test %edx,%edx 10b128: 74 05 je 10b12f return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10b12a: 83 f9 01 cmp $0x1,%ecx 10b12d: 76 19 jbe 10b148 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b12f: b8 16 00 00 00 mov $0x16,%eax } 10b134: 8b 5d fc mov -0x4(%ebp),%ebx 10b137: c9 leave 10b138: c3 ret 10b139: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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() ) 10b13c: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b141: 8b 5d fc mov -0x4(%ebp),%ebx 10b144: c9 leave 10b145: c3 ret 10b146: 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 ]; 10b148: a1 b8 8a 12 00 mov 0x128ab8,%eax 10b14d: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b153: 8b 1d f8 89 12 00 mov 0x1289f8,%ebx 10b159: 43 inc %ebx 10b15a: 89 1d f8 89 12 00 mov %ebx,0x1289f8 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10b160: 8b 98 d4 00 00 00 mov 0xd4(%eax),%ebx 10b166: 89 1a mov %ebx,(%edx) thread_support->cancelability_state = state; 10b168: 89 88 d4 00 00 00 mov %ecx,0xd4(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b16e: 83 ec 0c sub $0xc,%esp 10b171: ff 35 b8 8a 12 00 pushl 0x128ab8 10b177: e8 40 50 00 00 call 1101bc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b17c: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b17e: 83 c4 10 add $0x10,%esp } 10b181: 8b 5d fc mov -0x4(%ebp),%ebx 10b184: c9 leave 10b185: c3 ret 0010b188 : int pthread_setcanceltype( int type, int *oldtype ) { 10b188: 55 push %ebp 10b189: 89 e5 mov %esp,%ebp 10b18b: 53 push %ebx 10b18c: 83 ec 04 sub $0x4,%esp 10b18f: 8b 4d 08 mov 0x8(%ebp),%ecx 10b192: 8b 55 0c mov 0xc(%ebp),%edx * 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() ) 10b195: a1 94 8a 12 00 mov 0x128a94,%eax 10b19a: 85 c0 test %eax,%eax 10b19c: 75 16 jne 10b1b4 return EPROTO; if ( !oldtype ) 10b19e: 85 d2 test %edx,%edx 10b1a0: 74 05 je 10b1a7 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10b1a2: 83 f9 01 cmp $0x1,%ecx 10b1a5: 76 19 jbe 10b1c0 _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b1a7: b8 16 00 00 00 mov $0x16,%eax } 10b1ac: 8b 5d fc mov -0x4(%ebp),%ebx 10b1af: c9 leave 10b1b0: c3 ret 10b1b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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() ) 10b1b4: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b1b9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1bc: c9 leave 10b1bd: c3 ret 10b1be: 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 ]; 10b1c0: a1 b8 8a 12 00 mov 0x128ab8,%eax 10b1c5: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b1cb: 8b 1d f8 89 12 00 mov 0x1289f8,%ebx 10b1d1: 43 inc %ebx 10b1d2: 89 1d f8 89 12 00 mov %ebx,0x1289f8 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10b1d8: 8b 98 d8 00 00 00 mov 0xd8(%eax),%ebx 10b1de: 89 1a mov %ebx,(%edx) thread_support->cancelability_type = type; 10b1e0: 89 88 d8 00 00 00 mov %ecx,0xd8(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b1e6: 83 ec 0c sub $0xc,%esp 10b1e9: ff 35 b8 8a 12 00 pushl 0x128ab8 10b1ef: e8 c8 4f 00 00 call 1101bc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b1f4: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b1f6: 83 c4 10 add $0x10,%esp } 10b1f9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1fc: c9 leave 10b1fd: c3 ret 0010dc50 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10dc50: 55 push %ebp 10dc51: 89 e5 mov %esp,%ebp 10dc53: 57 push %edi 10dc54: 56 push %esi 10dc55: 53 push %ebx 10dc56: 83 ec 2c sub $0x2c,%esp 10dc59: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10dc5c: 85 f6 test %esi,%esi 10dc5e: 0f 84 cc 00 00 00 je 10dd30 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10dc64: 8d 45 e0 lea -0x20(%ebp),%eax 10dc67: 50 push %eax 10dc68: 8d 45 e4 lea -0x1c(%ebp),%eax 10dc6b: 50 push %eax 10dc6c: 56 push %esi 10dc6d: ff 75 0c pushl 0xc(%ebp) 10dc70: e8 2f 55 00 00 call 1131a4 <_POSIX_Thread_Translate_sched_param> 10dc75: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10dc77: 83 c4 10 add $0x10,%esp 10dc7a: 85 c0 test %eax,%eax 10dc7c: 74 0a je 10dc88 case OBJECTS_ERROR: break; } return ESRCH; } 10dc7e: 89 d8 mov %ebx,%eax 10dc80: 8d 65 f4 lea -0xc(%ebp),%esp 10dc83: 5b pop %ebx 10dc84: 5e pop %esi 10dc85: 5f pop %edi 10dc86: c9 leave 10dc87: c3 ret 10dc88: 50 push %eax 10dc89: 8d 45 dc lea -0x24(%ebp),%eax 10dc8c: 50 push %eax 10dc8d: ff 75 08 pushl 0x8(%ebp) 10dc90: 68 a0 c8 12 00 push $0x12c8a0 10dc95: e8 3e 1f 00 00 call 10fbd8 <_Objects_Get> 10dc9a: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10dc9c: 83 c4 10 add $0x10,%esp 10dc9f: 8b 7d dc mov -0x24(%ebp),%edi 10dca2: 85 ff test %edi,%edi 10dca4: 0f 85 96 00 00 00 jne 10dd40 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10dcaa: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10dcb0: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10dcb3: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 10dcba: 0f 84 c8 00 00 00 je 10dd88 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10dcc0: 8b 45 0c mov 0xc(%ebp),%eax 10dcc3: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dcc6: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = *param; 10dccc: 89 cf mov %ecx,%edi 10dcce: 81 c7 84 00 00 00 add $0x84,%edi 10dcd4: b9 07 00 00 00 mov $0x7,%ecx 10dcd9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10dcdb: 8b 45 e4 mov -0x1c(%ebp),%eax 10dcde: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10dce1: 8b 45 e0 mov -0x20(%ebp),%eax 10dce4: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10dcea: 8b 75 0c mov 0xc(%ebp),%esi 10dced: 85 f6 test %esi,%esi 10dcef: 78 2e js 10dd1f 10dcf1: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10dcf5: 7f 55 jg 10dd4c case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dcf7: a1 a4 c5 12 00 mov 0x12c5a4,%eax 10dcfc: 89 42 78 mov %eax,0x78(%edx) 10dcff: 0f b6 05 dc 83 12 00 movzbl 0x1283dc,%eax 10dd06: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dd09: 2b 81 84 00 00 00 sub 0x84(%ecx),%eax the_thread->real_priority = 10dd0f: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10dd12: 51 push %ecx 10dd13: 6a 01 push $0x1 10dd15: 50 push %eax 10dd16: 52 push %edx 10dd17: e8 48 22 00 00 call 10ff64 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10dd1c: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10dd1f: e8 28 27 00 00 call 11044c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10dd24: 89 d8 mov %ebx,%eax 10dd26: 8d 65 f4 lea -0xc(%ebp),%esp 10dd29: 5b pop %ebx 10dd2a: 5e pop %esi 10dd2b: 5f pop %edi 10dd2c: c9 leave 10dd2d: c3 ret 10dd2e: 66 90 xchg %ax,%ax <== NOT EXECUTED int rc; /* * Check all the parameters */ if ( !param ) 10dd30: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10dd35: 89 d8 mov %ebx,%eax 10dd37: 8d 65 f4 lea -0xc(%ebp),%esp 10dd3a: 5b pop %ebx 10dd3b: 5e pop %esi 10dd3c: 5f pop %edi 10dd3d: c9 leave 10dd3e: c3 ret 10dd3f: 90 nop <== NOT EXECUTED /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10dd40: b3 03 mov $0x3,%bl case OBJECTS_ERROR: break; } return ESRCH; } 10dd42: 89 d8 mov %ebx,%eax 10dd44: 8d 65 f4 lea -0xc(%ebp),%esp 10dd47: 5b pop %ebx 10dd48: 5e pop %esi 10dd49: 5f pop %edi 10dd4a: c9 leave 10dd4b: c3 ret api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10dd4c: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10dd50: 75 cd jne 10dd1f true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10dd52: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dd55: 8b 81 84 00 00 00 mov 0x84(%ecx),%eax 10dd5b: 89 81 a0 00 00 00 mov %eax,0xa0(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10dd61: 83 ec 0c sub $0xc,%esp 10dd64: 89 c8 mov %ecx,%eax 10dd66: 05 a4 00 00 00 add $0xa4,%eax 10dd6b: 50 push %eax 10dd6c: 89 55 d0 mov %edx,-0x30(%ebp) 10dd6f: e8 b0 38 00 00 call 111624 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10dd74: 58 pop %eax 10dd75: 5a pop %edx 10dd76: 8b 55 d0 mov -0x30(%ebp),%edx 10dd79: 52 push %edx 10dd7a: 6a 00 push $0x0 10dd7c: e8 3b fe ff ff call 10dbbc <_POSIX_Threads_Sporadic_budget_TSR> 10dd81: 83 c4 10 add $0x10,%esp 10dd84: eb 99 jmp 10dd1f 10dd86: 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 ); 10dd88: 83 ec 0c sub $0xc,%esp 10dd8b: 05 a4 00 00 00 add $0xa4,%eax 10dd90: 50 push %eax 10dd91: 89 55 d0 mov %edx,-0x30(%ebp) 10dd94: e8 8b 38 00 00 call 111624 <_Watchdog_Remove> 10dd99: 83 c4 10 add $0x10,%esp 10dd9c: 8b 55 d0 mov -0x30(%ebp),%edx 10dd9f: e9 1c ff ff ff jmp 10dcc0 001115d0 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 1115d0: 55 push %ebp 1115d1: 89 e5 mov %esp,%ebp 1115d3: 57 push %edi 1115d4: 56 push %esi 1115d5: 53 push %ebx 1115d6: 83 ec 0c sub $0xc,%esp 1115d9: 8b 4d 08 mov 0x8(%ebp),%ecx 1115dc: 8b 55 0c mov 0xc(%ebp),%edx 1115df: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 1115e2: 85 d2 test %edx,%edx 1115e4: 0f 84 9a 00 00 00 je 111684 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 1115ea: 8b 35 b8 95 12 00 mov 0x1295b8,%esi 1115f0: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax if ( oset ) 1115f6: 85 db test %ebx,%ebx 1115f8: 74 0c je 111606 *oset = api->signals_blocked; 1115fa: 8b b8 cc 00 00 00 mov 0xcc(%eax),%edi 111600: 89 3b mov %edi,(%ebx) if ( !set ) 111602: 85 d2 test %edx,%edx 111604: 74 42 je 111648 return 0; switch ( how ) { 111606: 83 f9 01 cmp $0x1,%ecx 111609: 74 6d je 111678 11160b: 83 f9 02 cmp $0x2,%ecx 11160e: 74 44 je 111654 111610: 85 c9 test %ecx,%ecx 111612: 75 4c jne 111660 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 111614: 8b 12 mov (%edx),%edx 111616: 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) ) { 11161c: 8b 15 c0 9c 12 00 mov 0x129cc0,%edx 111622: 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 & 111628: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 11162e: f7 d0 not %eax 111630: 85 c2 test %eax,%edx 111632: 74 14 je 111648 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 111634: c6 46 74 01 movb $0x1,0x74(%esi) _Thread_Dispatch(); 111638: e8 b3 cc ff ff call 10e2f0 <_Thread_Dispatch> 11163d: 31 c0 xor %eax,%eax } return 0; } 11163f: 83 c4 0c add $0xc,%esp 111642: 5b pop %ebx 111643: 5e pop %esi 111644: 5f pop %edi 111645: c9 leave 111646: c3 ret 111647: 90 nop <== NOT EXECUTED /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 111648: 31 c0 xor %eax,%eax } return 0; } 11164a: 83 c4 0c add $0xc,%esp 11164d: 5b pop %ebx 11164e: 5e pop %esi 11164f: 5f pop %edi 111650: c9 leave 111651: c3 ret 111652: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 111654: 8b 12 mov (%edx),%edx 111656: f7 d2 not %edx 111658: 21 90 cc 00 00 00 and %edx,0xcc(%eax) break; 11165e: eb bc jmp 11161c case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 111660: e8 1f 30 00 00 call 114684 <__errno> 111665: c7 00 16 00 00 00 movl $0x16,(%eax) 11166b: b8 ff ff ff ff mov $0xffffffff,%eax _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 111670: 83 c4 0c add $0xc,%esp 111673: 5b pop %ebx 111674: 5e pop %esi 111675: 5f pop %edi 111676: c9 leave 111677: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 111678: 8b 12 mov (%edx),%edx 11167a: 09 90 cc 00 00 00 or %edx,0xcc(%eax) break; 111680: eb 9a jmp 11161c 111682: 66 90 xchg %ax,%ax <== NOT EXECUTED sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 111684: 85 db test %ebx,%ebx 111686: 74 d8 je 111660 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111688: 8b 35 b8 95 12 00 mov 0x1295b8,%esi 11168e: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax 111694: e9 61 ff ff ff jmp 1115fa 0010b600 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10b600: 55 push %ebp 10b601: 89 e5 mov %esp,%ebp 10b603: 83 ec 28 sub $0x28,%esp 10b606: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10b609: 85 c0 test %eax,%eax 10b60b: 74 2f je 10b63c RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b60d: 52 push %edx 10b60e: 8d 55 f4 lea -0xc(%ebp),%edx 10b611: 52 push %edx 10b612: ff 30 pushl (%eax) 10b614: 68 e0 8a 12 00 push $0x128ae0 10b619: e8 ae 20 00 00 call 10d6cc <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b61e: 83 c4 10 add $0x10,%esp 10b621: 8b 4d f4 mov -0xc(%ebp),%ecx 10b624: 85 c9 test %ecx,%ecx 10b626: 75 14 jne 10b63c */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10b628: 8b 50 18 mov 0x18(%eax),%edx case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10b62b: 85 d2 test %edx,%edx 10b62d: 74 15 je 10b644 _Thread_Enable_dispatch(); 10b62f: e8 0c 29 00 00 call 10df40 <_Thread_Enable_dispatch> 10b634: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b639: c9 leave 10b63a: c3 ret 10b63b: 90 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); return 0; 10b63c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b641: c9 leave 10b642: c3 ret 10b643: 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 ); 10b644: 83 ec 08 sub $0x8,%esp 10b647: 50 push %eax 10b648: 68 e0 8a 12 00 push $0x128ae0 10b64d: 89 45 e4 mov %eax,-0x1c(%ebp) 10b650: e8 43 1c 00 00 call 10d298 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b655: 58 pop %eax 10b656: 5a pop %edx 10b657: 8b 45 e4 mov -0x1c(%ebp),%eax 10b65a: 50 push %eax 10b65b: 68 e0 8a 12 00 push $0x128ae0 10b660: e8 37 1f 00 00 call 10d59c <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10b665: e8 d6 28 00 00 call 10df40 <_Thread_Enable_dispatch> 10b66a: 31 c0 xor %eax,%eax return 0; 10b66c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b66f: c9 leave 10b670: c3 ret 0010b700 : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10b700: 55 push %ebp 10b701: 89 e5 mov %esp,%ebp 10b703: 53 push %ebx 10b704: 83 ec 14 sub $0x14,%esp 10b707: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b70a: 85 c0 test %eax,%eax 10b70c: 74 1b je 10b729 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b70e: 53 push %ebx 10b70f: 8d 55 f4 lea -0xc(%ebp),%edx 10b712: 52 push %edx 10b713: ff 30 pushl (%eax) 10b715: 68 e0 8a 12 00 push $0x128ae0 10b71a: e8 ad 1f 00 00 call 10d6cc <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b71f: 83 c4 10 add $0x10,%esp 10b722: 8b 4d f4 mov -0xc(%ebp),%ecx 10b725: 85 c9 test %ecx,%ecx 10b727: 74 0b je 10b734 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b729: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b72e: 8b 5d fc mov -0x4(%ebp),%ebx 10b731: c9 leave 10b732: c3 ret 10b733: 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 ); 10b734: 52 push %edx 10b735: 6a 00 push $0x0 10b737: 6a 01 push $0x1 10b739: 83 c0 10 add $0x10,%eax 10b73c: 50 push %eax 10b73d: e8 e2 15 00 00 call 10cd24 <_CORE_spinlock_Wait> 10b742: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b744: e8 f7 27 00 00 call 10df40 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b749: 89 1c 24 mov %ebx,(%esp) 10b74c: e8 0b 00 00 00 call 10b75c <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b751: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b754: 8b 5d fc mov -0x4(%ebp),%ebx 10b757: c9 leave 10b758: c3 ret 0010b76c : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10b76c: 55 push %ebp 10b76d: 89 e5 mov %esp,%ebp 10b76f: 53 push %ebx 10b770: 83 ec 14 sub $0x14,%esp 10b773: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b776: 85 c0 test %eax,%eax 10b778: 74 1b je 10b795 10b77a: 53 push %ebx 10b77b: 8d 55 f4 lea -0xc(%ebp),%edx 10b77e: 52 push %edx 10b77f: ff 30 pushl (%eax) 10b781: 68 e0 8a 12 00 push $0x128ae0 10b786: e8 41 1f 00 00 call 10d6cc <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b78b: 83 c4 10 add $0x10,%esp 10b78e: 8b 4d f4 mov -0xc(%ebp),%ecx 10b791: 85 c9 test %ecx,%ecx 10b793: 74 0b je 10b7a0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b795: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b79a: 8b 5d fc mov -0x4(%ebp),%ebx 10b79d: c9 leave 10b79e: c3 ret 10b79f: 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 ); 10b7a0: 52 push %edx 10b7a1: 6a 00 push $0x0 10b7a3: 6a 00 push $0x0 10b7a5: 83 c0 10 add $0x10,%eax 10b7a8: 50 push %eax 10b7a9: e8 76 15 00 00 call 10cd24 <_CORE_spinlock_Wait> 10b7ae: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b7b0: e8 8b 27 00 00 call 10df40 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b7b5: 89 1c 24 mov %ebx,(%esp) 10b7b8: e8 9f ff ff ff call 10b75c <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b7bd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b7c0: 8b 5d fc mov -0x4(%ebp),%ebx 10b7c3: c9 leave 10b7c4: c3 ret 0010b7c8 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10b7c8: 55 push %ebp 10b7c9: 89 e5 mov %esp,%ebp 10b7cb: 53 push %ebx 10b7cc: 83 ec 14 sub $0x14,%esp 10b7cf: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b7d2: 85 c0 test %eax,%eax 10b7d4: 74 1b je 10b7f1 10b7d6: 51 push %ecx 10b7d7: 8d 55 f4 lea -0xc(%ebp),%edx 10b7da: 52 push %edx 10b7db: ff 30 pushl (%eax) 10b7dd: 68 e0 8a 12 00 push $0x128ae0 10b7e2: e8 e5 1e 00 00 call 10d6cc <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b7e7: 83 c4 10 add $0x10,%esp 10b7ea: 8b 55 f4 mov -0xc(%ebp),%edx 10b7ed: 85 d2 test %edx,%edx 10b7ef: 74 0b je 10b7fc case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b7f1: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7f6: 8b 5d fc mov -0x4(%ebp),%ebx 10b7f9: c9 leave 10b7fa: c3 ret 10b7fb: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10b7fc: 83 ec 0c sub $0xc,%esp 10b7ff: 83 c0 10 add $0x10,%eax 10b802: 50 push %eax 10b803: e8 cc 14 00 00 call 10ccd4 <_CORE_spinlock_Release> 10b808: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b80a: e8 31 27 00 00 call 10df40 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b80f: 89 1c 24 mov %ebx,(%esp) 10b812: e8 45 ff ff ff call 10b75c <_POSIX_Spinlock_Translate_core_spinlock_return_code> 10b817: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b81a: 8b 5d fc mov -0x4(%ebp),%ebx 10b81d: c9 leave 10b81e: c3 ret 0010ba54 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10ba54: 55 push %ebp 10ba55: 89 e5 mov %esp,%ebp 10ba57: 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() ) 10ba5a: a1 14 92 12 00 mov 0x129214,%eax 10ba5f: 85 c0 test %eax,%eax 10ba61: 75 44 jne 10baa7 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10ba63: a1 38 92 12 00 mov 0x129238,%eax 10ba68: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10ba6e: 8b 15 78 91 12 00 mov 0x129178,%edx 10ba74: 42 inc %edx 10ba75: 89 15 78 91 12 00 mov %edx,0x129178 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10ba7b: 8b 90 d4 00 00 00 mov 0xd4(%eax),%edx 10ba81: 85 d2 test %edx,%edx 10ba83: 75 27 jne 10baac thread_support->cancelation_requested ) 10ba85: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax 10ba8b: 85 c0 test %eax,%eax 10ba8d: 74 1d je 10baac cancel = true; _Thread_Enable_dispatch(); 10ba8f: e8 cc 25 00 00 call 10e060 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10ba94: 83 ec 08 sub $0x8,%esp 10ba97: 6a ff push $0xffffffff 10ba99: ff 35 38 92 12 00 pushl 0x129238 10ba9f: e8 c4 54 00 00 call 110f68 <_POSIX_Thread_Exit> 10baa4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10baa7: c9 leave <== NOT EXECUTED 10baa8: c3 ret <== NOT EXECUTED 10baa9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10baac: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10baad: e9 ae 25 00 00 jmp 10e060 <_Thread_Enable_dispatch> 001127b0 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 1127b0: 55 push %ebp 1127b1: 89 e5 mov %esp,%ebp 1127b3: 57 push %edi 1127b4: 56 push %esi 1127b5: 53 push %ebx 1127b6: 83 ec 2c sub $0x2c,%esp 1127b9: 8b 5d 08 mov 0x8(%ebp),%ebx 1127bc: 8b 7d 0c mov 0xc(%ebp),%edi 1127bf: 8b 45 10 mov 0x10(%ebp),%eax 1127c2: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1127c5: 85 db test %ebx,%ebx 1127c7: 0f 84 87 00 00 00 je 112854 return RTEMS_INVALID_NAME; if ( !id ) 1127cd: 85 f6 test %esi,%esi 1127cf: 0f 84 bb 00 00 00 je 112890 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 1127d5: f7 c7 10 00 00 00 test $0x10,%edi 1127db: 0f 84 83 00 00 00 je 112864 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 1127e1: 85 c0 test %eax,%eax 1127e3: 0f 84 87 00 00 00 je 112870 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1127e9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 1127f0: 89 45 e4 mov %eax,-0x1c(%ebp) 1127f3: a1 18 77 12 00 mov 0x127718,%eax 1127f8: 40 inc %eax 1127f9: a3 18 77 12 00 mov %eax,0x127718 * 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 ); 1127fe: 83 ec 0c sub $0xc,%esp 112801: 68 a0 81 12 00 push $0x1281a0 112806: e8 c5 9f ff ff call 10c7d0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 11280b: 83 c4 10 add $0x10,%esp 11280e: 85 c0 test %eax,%eax 112810: 74 6a je 11287c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 112812: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112815: 83 ec 08 sub $0x8,%esp 112818: 8d 55 e0 lea -0x20(%ebp),%edx 11281b: 52 push %edx 11281c: 8d 50 14 lea 0x14(%eax),%edx 11281f: 52 push %edx 112820: 89 45 d4 mov %eax,-0x2c(%ebp) 112823: e8 5c 04 00 00 call 112c84 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112828: 8b 45 d4 mov -0x2c(%ebp),%eax 11282b: 8b 50 08 mov 0x8(%eax),%edx 11282e: 0f b7 fa movzwl %dx,%edi 112831: 8b 0d bc 81 12 00 mov 0x1281bc,%ecx 112837: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11283a: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 11283d: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11283f: e8 b0 ac ff ff call 10d4f4 <_Thread_Enable_dispatch> 112844: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 112846: 83 c4 10 add $0x10,%esp } 112849: 8d 65 f4 lea -0xc(%ebp),%esp 11284c: 5b pop %ebx 11284d: 5e pop %esi 11284e: 5f pop %edi 11284f: c9 leave 112850: c3 ret 112851: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112854: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112859: 8d 65 f4 lea -0xc(%ebp),%esp 11285c: 5b pop %ebx 11285d: 5e pop %esi 11285e: 5f pop %edi 11285f: c9 leave 112860: c3 ret 112861: 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; 112864: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 11286b: eb 83 jmp 1127f0 11286d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 112870: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112872: 8d 65 f4 lea -0xc(%ebp),%esp 112875: 5b pop %ebx 112876: 5e pop %esi 112877: 5f pop %edi 112878: c9 leave 112879: c3 ret 11287a: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 11287c: e8 73 ac ff ff call 10d4f4 <_Thread_Enable_dispatch> 112881: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112886: 8d 65 f4 lea -0xc(%ebp),%esp 112889: 5b pop %ebx 11288a: 5e pop %esi 11288b: 5f pop %edi 11288c: c9 leave 11288d: c3 ret 11288e: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 112890: b8 09 00 00 00 mov $0x9,%eax 112895: eb b2 jmp 112849 00112898 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 112898: 55 push %ebp 112899: 89 e5 mov %esp,%ebp 11289b: 53 push %ebx 11289c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 11289f: 8d 45 f4 lea -0xc(%ebp),%eax 1128a2: 50 push %eax 1128a3: ff 75 08 pushl 0x8(%ebp) 1128a6: 68 a0 81 12 00 push $0x1281a0 1128ab: e8 d0 a3 ff ff call 10cc80 <_Objects_Get> 1128b0: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1128b2: 83 c4 10 add $0x10,%esp 1128b5: 8b 4d f4 mov -0xc(%ebp),%ecx 1128b8: 85 c9 test %ecx,%ecx 1128ba: 75 38 jne 1128f4 case OBJECTS_LOCAL: _CORE_barrier_Flush( 1128bc: 52 push %edx 1128bd: 6a 02 push $0x2 1128bf: 6a 00 push $0x0 1128c1: 8d 40 14 lea 0x14(%eax),%eax 1128c4: 50 push %eax 1128c5: e8 6e b3 ff ff call 10dc38 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 1128ca: 59 pop %ecx 1128cb: 58 pop %eax 1128cc: 53 push %ebx 1128cd: 68 a0 81 12 00 push $0x1281a0 1128d2: e8 75 9f ff ff call 10c84c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 1128d7: 58 pop %eax 1128d8: 5a pop %edx 1128d9: 53 push %ebx 1128da: 68 a0 81 12 00 push $0x1281a0 1128df: e8 6c a2 ff ff call 10cb50 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 1128e4: e8 0b ac ff ff call 10d4f4 <_Thread_Enable_dispatch> 1128e9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1128eb: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1128ee: 8b 5d fc mov -0x4(%ebp),%ebx 1128f1: c9 leave 1128f2: c3 ret 1128f3: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1128f4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1128f9: 8b 5d fc mov -0x4(%ebp),%ebx 1128fc: c9 leave 1128fd: c3 ret 00112964 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 112964: 55 push %ebp 112965: 89 e5 mov %esp,%ebp 112967: 53 push %ebx 112968: 83 ec 18 sub $0x18,%esp 11296b: 8b 5d 08 mov 0x8(%ebp),%ebx 11296e: 8d 45 f4 lea -0xc(%ebp),%eax 112971: 50 push %eax 112972: 53 push %ebx 112973: 68 a0 81 12 00 push $0x1281a0 112978: e8 03 a3 ff ff call 10cc80 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 11297d: 83 c4 10 add $0x10,%esp 112980: 8b 55 f4 mov -0xc(%ebp),%edx 112983: 85 d2 test %edx,%edx 112985: 75 35 jne 1129bc case OBJECTS_LOCAL: _CORE_barrier_Wait( 112987: 83 ec 0c sub $0xc,%esp 11298a: 6a 00 push $0x0 11298c: ff 75 0c pushl 0xc(%ebp) 11298f: 6a 01 push $0x1 112991: 53 push %ebx 112992: 83 c0 14 add $0x14,%eax 112995: 50 push %eax 112996: e8 4d 03 00 00 call 112ce8 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 11299b: 83 c4 20 add $0x20,%esp 11299e: e8 51 ab ff ff call 10d4f4 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 1129a3: 83 ec 0c sub $0xc,%esp 1129a6: a1 d8 77 12 00 mov 0x1277d8,%eax 1129ab: ff 70 34 pushl 0x34(%eax) 1129ae: e8 61 0e 00 00 call 113814 <_Barrier_Translate_core_barrier_return_code> 1129b3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1129b6: 8b 5d fc mov -0x4(%ebp),%ebx 1129b9: c9 leave 1129ba: c3 ret 1129bb: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1129bc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1129c1: 8b 5d fc mov -0x4(%ebp),%ebx 1129c4: c9 leave 1129c5: c3 ret 00110a40 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 110a40: 55 push %ebp 110a41: 89 e5 mov %esp,%ebp 110a43: 53 push %ebx 110a44: 83 ec 04 sub $0x4,%esp 110a47: 8b 45 08 mov 0x8(%ebp),%eax 110a4a: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 110a4d: 85 db test %ebx,%ebx 110a4f: 74 3b je 110a8c return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 110a51: 85 c0 test %eax,%eax 110a53: 74 2b je 110a80 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 110a55: 83 f8 01 cmp $0x1,%eax 110a58: 74 3e je 110a98 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 110a5a: 83 f8 02 cmp $0x2,%eax 110a5d: 74 45 je 110aa4 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 110a5f: 83 f8 03 cmp $0x3,%eax 110a62: 74 4c je 110ab0 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 110a64: 83 f8 04 cmp $0x4,%eax 110a67: 74 0b je 110a74 110a69: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110a6e: 5a pop %edx 110a6f: 5b pop %ebx 110a70: c9 leave 110a71: c3 ret 110a72: 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 ); 110a74: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 110a77: 59 pop %ecx 110a78: 5b pop %ebx 110a79: 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 ); 110a7a: e9 49 01 00 00 jmp 110bc8 110a7f: 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 ); 110a80: 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; } 110a83: 58 pop %eax 110a84: 5b pop %ebx 110a85: 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 ); 110a86: e9 7d 00 00 00 jmp 110b08 110a8b: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 110a8c: 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; } 110a91: 5a pop %edx 110a92: 5b pop %ebx 110a93: c9 leave 110a94: c3 ret 110a95: 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); 110a98: 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; } 110a9b: 5b pop %ebx 110a9c: 5b pop %ebx 110a9d: 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); 110a9e: e9 19 00 00 00 jmp 110abc 110aa3: 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(); 110aa4: e8 53 00 00 00 call 110afc 110aa9: 89 03 mov %eax,(%ebx) 110aab: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110aad: eb bf jmp 110a6e 110aaf: 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(); 110ab0: e8 33 00 00 00 call 110ae8 110ab5: 89 03 mov %eax,(%ebx) 110ab7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110ab9: eb b3 jmp 110a6e 0010be74 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10be74: 55 push %ebp 10be75: 89 e5 mov %esp,%ebp 10be77: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10be7a: 85 c0 test %eax,%eax 10be7c: 74 1e je 10be9c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be7e: 80 3d 4c 22 13 00 00 cmpb $0x0,0x13224c 10be85: 74 0d je 10be94 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10be87: 8b 15 cc 22 13 00 mov 0x1322cc,%edx 10be8d: 89 10 mov %edx,(%eax) 10be8f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10be91: c9 leave 10be92: c3 ret 10be93: 90 nop <== NOT EXECUTED ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be94: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10be99: c9 leave 10be9a: c3 ret 10be9b: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) 10be9c: b0 09 mov $0x9,%al if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10be9e: c9 leave 10be9f: c3 ret 0010bec0 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10bec0: 55 push %ebp 10bec1: 89 e5 mov %esp,%ebp 10bec3: 56 push %esi 10bec4: 53 push %ebx 10bec5: 83 ec 50 sub $0x50,%esp 10bec8: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10becb: 85 db test %ebx,%ebx 10becd: 0f 84 a1 00 00 00 je 10bf74 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bed3: 80 3d 4c 22 13 00 00 cmpb $0x0,0x13224c 10beda: 75 0c jne 10bee8 10bedc: b8 0b 00 00 00 mov $0xb,%eax tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 10bee1: 8d 65 f8 lea -0x8(%ebp),%esp 10bee4: 5b pop %ebx 10bee5: 5e pop %esi 10bee6: c9 leave 10bee7: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10bee8: 9c pushf 10bee9: fa cli 10beea: 5e pop %esi _TOD_Get( &now ); 10beeb: 83 ec 0c sub $0xc,%esp 10beee: 8d 45 e8 lea -0x18(%ebp),%eax 10bef1: 50 push %eax 10bef2: e8 31 19 00 00 call 10d828 <_TOD_Get> _ISR_Enable(level); 10bef7: 56 push %esi 10bef8: 9d popf useconds = (suseconds_t)now.tv_nsec; 10bef9: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10befc: 8b 45 e8 mov -0x18(%ebp),%eax 10beff: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10bf02: be d3 4d 62 10 mov $0x10624dd3,%esi 10bf07: 89 c8 mov %ecx,%eax 10bf09: f7 ee imul %esi 10bf0b: 89 45 b0 mov %eax,-0x50(%ebp) 10bf0e: 89 55 b4 mov %edx,-0x4c(%ebp) 10bf11: 8b 75 b4 mov -0x4c(%ebp),%esi 10bf14: c1 fe 06 sar $0x6,%esi 10bf17: 89 c8 mov %ecx,%eax 10bf19: 99 cltd 10bf1a: 29 d6 sub %edx,%esi 10bf1c: 89 75 f4 mov %esi,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 10bf1f: 58 pop %eax 10bf20: 5a pop %edx 10bf21: 8d 45 c4 lea -0x3c(%ebp),%eax 10bf24: 50 push %eax 10bf25: 8d 45 f0 lea -0x10(%ebp),%eax 10bf28: 50 push %eax 10bf29: e8 a6 98 00 00 call 1157d4 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10bf2e: 8b 45 d8 mov -0x28(%ebp),%eax 10bf31: 05 6c 07 00 00 add $0x76c,%eax 10bf36: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10bf38: 8b 45 d4 mov -0x2c(%ebp),%eax 10bf3b: 40 inc %eax 10bf3c: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10bf3f: 8b 45 d0 mov -0x30(%ebp),%eax 10bf42: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10bf45: 8b 45 cc mov -0x34(%ebp),%eax 10bf48: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10bf4b: 8b 45 c8 mov -0x38(%ebp),%eax 10bf4e: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10bf51: 8b 45 c4 mov -0x3c(%ebp),%eax 10bf54: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10bf57: 8b 45 f4 mov -0xc(%ebp),%eax 10bf5a: 31 d2 xor %edx,%edx 10bf5c: f7 35 2c 62 12 00 divl 0x12622c 10bf62: 89 43 18 mov %eax,0x18(%ebx) 10bf65: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10bf67: 83 c4 10 add $0x10,%esp } 10bf6a: 8d 65 f8 lea -0x8(%ebp),%esp 10bf6d: 5b pop %ebx 10bf6e: 5e pop %esi 10bf6f: c9 leave 10bf70: c3 ret 10bf71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10bf74: b8 09 00 00 00 mov $0x9,%eax 10bf79: e9 63 ff ff ff jmp 10bee1 00110bc8 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 110bc8: 55 push %ebp 110bc9: 89 e5 mov %esp,%ebp 110bcb: 56 push %esi 110bcc: 53 push %ebx 110bcd: 83 ec 20 sub $0x20,%esp 110bd0: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 110bd3: 85 db test %ebx,%ebx 110bd5: 74 59 je 110c30 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 110bd7: 80 3d 0c ef 16 00 00 cmpb $0x0,0x16ef0c 110bde: 75 0c jne 110bec 110be0: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 110be5: 8d 65 f8 lea -0x8(%ebp),%esp 110be8: 5b pop %ebx 110be9: 5e pop %esi 110bea: c9 leave 110beb: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 110bec: 9c pushf 110bed: fa cli 110bee: 5e pop %esi _TOD_Get( &now ); 110bef: 83 ec 0c sub $0xc,%esp 110bf2: 8d 45 f0 lea -0x10(%ebp),%eax 110bf5: 50 push %eax 110bf6: e8 39 19 00 00 call 112534 <_TOD_Get> _ISR_Enable(level); 110bfb: 56 push %esi 110bfc: 9d popf useconds = (suseconds_t)now.tv_nsec; 110bfd: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 110c00: 8b 45 f0 mov -0x10(%ebp),%eax 110c03: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 110c05: be d3 4d 62 10 mov $0x10624dd3,%esi 110c0a: 89 c8 mov %ecx,%eax 110c0c: f7 ee imul %esi 110c0e: 89 45 e0 mov %eax,-0x20(%ebp) 110c11: 89 55 e4 mov %edx,-0x1c(%ebp) 110c14: 8b 75 e4 mov -0x1c(%ebp),%esi 110c17: c1 fe 06 sar $0x6,%esi 110c1a: 89 c8 mov %ecx,%eax 110c1c: 99 cltd 110c1d: 29 d6 sub %edx,%esi 110c1f: 89 73 04 mov %esi,0x4(%ebx) 110c22: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 110c24: 83 c4 10 add $0x10,%esp } 110c27: 8d 65 f8 lea -0x8(%ebp),%esp 110c2a: 5b pop %ebx 110c2b: 5e pop %esi 110c2c: c9 leave 110c2d: c3 ret 110c2e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 110c30: b8 09 00 00 00 mov $0x9,%eax 110c35: eb ae jmp 110be5 0012daa4 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 12daa4: 55 push %ebp 12daa5: 89 e5 mov %esp,%ebp 12daa7: 83 ec 08 sub $0x8,%esp 12daaa: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 12daad: 85 c0 test %eax,%eax 12daaf: 74 13 je 12dac4 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 12dab1: 83 ec 0c sub $0xc,%esp 12dab4: 50 push %eax 12dab5: e8 e2 0f 00 00 call 12ea9c <_TOD_Get_uptime_as_timespec> 12daba: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12dabc: 83 c4 10 add $0x10,%esp } 12dabf: c9 leave 12dac0: c3 ret 12dac1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 12dac4: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 12dac6: c9 leave 12dac7: c3 ret 0010bf98 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10bf98: 55 push %ebp 10bf99: 89 e5 mov %esp,%ebp 10bf9b: 53 push %ebx 10bf9c: 83 ec 14 sub $0x14,%esp 10bf9f: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10bfa2: 85 db test %ebx,%ebx 10bfa4: 74 66 je 10c00c return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10bfa6: 83 ec 0c sub $0xc,%esp 10bfa9: 53 push %ebx 10bfaa: e8 39 01 00 00 call 10c0e8 <_TOD_Validate> 10bfaf: 83 c4 10 add $0x10,%esp 10bfb2: 84 c0 test %al,%al 10bfb4: 75 0a jne 10bfc0 10bfb6: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10bfbb: 8b 5d fc mov -0x4(%ebp),%ebx 10bfbe: c9 leave 10bfbf: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10bfc0: 83 ec 0c sub $0xc,%esp 10bfc3: 53 push %ebx 10bfc4: e8 93 00 00 00 call 10c05c <_TOD_To_seconds> 10bfc9: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10bfcc: 8b 43 18 mov 0x18(%ebx),%eax 10bfcf: 0f af 05 2c 62 12 00 imul 0x12622c,%eax 10bfd6: 8d 04 80 lea (%eax,%eax,4),%eax 10bfd9: 8d 04 80 lea (%eax,%eax,4),%eax 10bfdc: 8d 04 80 lea (%eax,%eax,4),%eax 10bfdf: c1 e0 03 shl $0x3,%eax 10bfe2: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bfe5: a1 38 22 13 00 mov 0x132238,%eax 10bfea: 40 inc %eax 10bfeb: a3 38 22 13 00 mov %eax,0x132238 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10bff0: 8d 45 f0 lea -0x10(%ebp),%eax 10bff3: 89 04 24 mov %eax,(%esp) 10bff6: e8 11 19 00 00 call 10d90c <_TOD_Set> _Thread_Enable_dispatch(); 10bffb: e8 20 2c 00 00 call 10ec20 <_Thread_Enable_dispatch> 10c000: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c002: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10c005: 8b 5d fc mov -0x4(%ebp),%ebx 10c008: c9 leave 10c009: c3 ret 10c00a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10c00c: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c011: 8b 5d fc mov -0x4(%ebp),%ebx 10c014: c9 leave 10c015: c3 ret 0010aeb0 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10aeb0: 55 push %ebp 10aeb1: 89 e5 mov %esp,%ebp 10aeb3: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10aeb6: 85 c0 test %eax,%eax 10aeb8: 74 0a je 10aec4 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10aeba: a3 e4 78 12 00 mov %eax,0x1278e4 10aebf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10aec1: c9 leave 10aec2: c3 ret 10aec3: 90 nop <== NOT EXECUTED */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 10aec4: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10aec6: c9 leave 10aec7: c3 ret 0010aec8 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10aec8: 55 push %ebp 10aec9: 89 e5 mov %esp,%ebp 10aecb: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10aece: e8 c5 14 00 00 call 10c398 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10aed3: 83 ec 0c sub $0xc,%esp 10aed6: 68 f8 77 12 00 push $0x1277f8 10aedb: e8 04 37 00 00 call 10e5e4 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10aee0: e8 7f 31 00 00 call 10e064 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10aee5: a0 e8 77 12 00 mov 0x1277e8,%al if ( _Thread_Is_context_switch_necessary() && 10aeea: 83 c4 10 add $0x10,%esp 10aeed: 84 c0 test %al,%al 10aeef: 74 09 je 10aefa * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10aef1: a1 18 77 12 00 mov 0x127718,%eax 10aef6: 85 c0 test %eax,%eax 10aef8: 74 06 je 10af00 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10aefa: 31 c0 xor %eax,%eax 10aefc: c9 leave 10aefd: c3 ret 10aefe: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10af00: e8 93 24 00 00 call 10d398 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10af05: 31 c0 xor %eax,%eax 10af07: c9 leave 10af08: c3 ret 0010b090 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b090: 55 push %ebp 10b091: 89 e5 mov %esp,%ebp 10b093: 53 push %ebx 10b094: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b097: 8d 45 f4 lea -0xc(%ebp),%eax 10b09a: 50 push %eax 10b09b: ff 75 08 pushl 0x8(%ebp) 10b09e: e8 75 24 00 00 call 10d518 <_Thread_Get> switch ( location ) { 10b0a3: 83 c4 10 add $0x10,%esp 10b0a6: 8b 55 f4 mov -0xc(%ebp),%edx 10b0a9: 85 d2 test %edx,%edx 10b0ab: 75 2b jne 10b0d8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b0ad: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b0b3: 9c pushf 10b0b4: fa cli 10b0b5: 59 pop %ecx *the_event_set |= the_new_events; 10b0b6: 8b 5d 0c mov 0xc(%ebp),%ebx 10b0b9: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b0bb: 51 push %ecx 10b0bc: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b0bd: 83 ec 0c sub $0xc,%esp 10b0c0: 50 push %eax 10b0c1: e8 1e 00 00 00 call 10b0e4 <_Event_Surrender> _Thread_Enable_dispatch(); 10b0c6: e8 29 24 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10b0cb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b0cd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b0d0: 8b 5d fc mov -0x4(%ebp),%ebx 10b0d3: c9 leave 10b0d4: c3 ret 10b0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b0d8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b0dd: 8b 5d fc mov -0x4(%ebp),%ebx 10b0e0: c9 leave 10b0e1: c3 ret 00110778 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 110778: 55 push %ebp 110779: 89 e5 mov %esp,%ebp 11077b: 57 push %edi 11077c: 56 push %esi 11077d: 53 push %ebx 11077e: 83 ec 1c sub $0x1c,%esp 110781: 8b 75 0c mov 0xc(%ebp),%esi 110784: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 110787: 85 db test %ebx,%ebx 110789: 0f 84 85 00 00 00 je 110814 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 11078f: 8b 45 08 mov 0x8(%ebp),%eax 110792: 85 c0 test %eax,%eax 110794: 75 0e jne 1107a4 110796: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11079b: 8d 65 f4 lea -0xc(%ebp),%esp 11079e: 5b pop %ebx 11079f: 5e pop %esi 1107a0: 5f pop %edi 1107a1: c9 leave 1107a2: c3 ret 1107a3: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1107a4: a1 18 53 13 00 mov 0x135318,%eax 1107a9: 40 inc %eax 1107aa: a3 18 53 13 00 mov %eax,0x135318 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 1107af: 83 ec 0c sub $0xc,%esp 1107b2: 68 a0 55 13 00 push $0x1355a0 1107b7: e8 e4 0c 00 00 call 1114a0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 1107bc: 83 c4 10 add $0x10,%esp 1107bf: 85 c0 test %eax,%eax 1107c1: 74 45 je 110808 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 1107c3: 8d 78 24 lea 0x24(%eax),%edi 1107c6: b9 08 00 00 00 mov $0x8,%ecx 1107cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 1107cd: 83 ec 0c sub $0xc,%esp 1107d0: 8d 50 10 lea 0x10(%eax),%edx 1107d3: 52 push %edx 1107d4: 89 45 e4 mov %eax,-0x1c(%ebp) 1107d7: e8 3c 27 00 00 call 112f18 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1107dc: 8b 45 e4 mov -0x1c(%ebp),%eax 1107df: 8b 50 08 mov 0x8(%eax),%edx 1107e2: 0f b7 f2 movzwl %dx,%esi 1107e5: 8b 0d bc 55 13 00 mov 0x1355bc,%ecx 1107eb: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1107ee: 8b 4d 08 mov 0x8(%ebp),%ecx 1107f1: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 1107f4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 1107f6: e8 39 1a 00 00 call 112234 <_Thread_Enable_dispatch> 1107fb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1107fd: 83 c4 10 add $0x10,%esp } 110800: 8d 65 f4 lea -0xc(%ebp),%esp 110803: 5b pop %ebx 110804: 5e pop %esi 110805: 5f pop %edi 110806: c9 leave 110807: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 110808: e8 27 1a 00 00 call 112234 <_Thread_Enable_dispatch> 11080d: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 110812: eb 87 jmp 11079b rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 110814: b8 09 00 00 00 mov $0x9,%eax 110819: eb 80 jmp 11079b 0011081c : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 11081c: 55 push %ebp 11081d: 89 e5 mov %esp,%ebp 11081f: 53 push %ebx 110820: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 110823: 8d 45 f4 lea -0xc(%ebp),%eax 110826: 50 push %eax 110827: ff 75 08 pushl 0x8(%ebp) 11082a: 68 a0 55 13 00 push $0x1355a0 11082f: e8 1c 11 00 00 call 111950 <_Objects_Get> 110834: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110836: 83 c4 10 add $0x10,%esp 110839: 8b 55 f4 mov -0xc(%ebp),%edx 11083c: 85 d2 test %edx,%edx 11083e: 75 38 jne 110878 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 110840: 83 ec 0c sub $0xc,%esp 110843: 8d 40 10 lea 0x10(%eax),%eax 110846: 50 push %eax 110847: e8 cc 27 00 00 call 113018 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 11084c: 59 pop %ecx 11084d: 58 pop %eax 11084e: 53 push %ebx 11084f: 68 a0 55 13 00 push $0x1355a0 110854: e8 c3 0c 00 00 call 11151c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 110859: 58 pop %eax 11085a: 5a pop %edx 11085b: 53 push %ebx 11085c: 68 a0 55 13 00 push $0x1355a0 110861: e8 ba 0f 00 00 call 111820 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 110866: e8 c9 19 00 00 call 112234 <_Thread_Enable_dispatch> 11086b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11086d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110870: 8b 5d fc mov -0x4(%ebp),%ebx 110873: c9 leave 110874: c3 ret 110875: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110878: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11087d: 8b 5d fc mov -0x4(%ebp),%ebx 110880: c9 leave 110881: c3 ret 00112b08 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112b08: 55 push %ebp 112b09: 89 e5 mov %esp,%ebp 112b0b: 56 push %esi 112b0c: 53 push %ebx 112b0d: 8b 45 08 mov 0x8(%ebp),%eax 112b10: 8b 4d 0c mov 0xc(%ebp),%ecx 112b13: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b16: 39 05 40 81 12 00 cmp %eax,0x128140 112b1c: 76 22 jbe 112b40 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112b1e: 8d 34 40 lea (%eax,%eax,2),%esi 112b21: 8b 15 44 81 12 00 mov 0x128144,%edx 112b27: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b2b: 85 d2 test %edx,%edx 112b2d: 74 1d je 112b4c 112b2f: 89 5d 10 mov %ebx,0x10(%ebp) 112b32: 89 4d 0c mov %ecx,0xc(%ebp) 112b35: 89 45 08 mov %eax,0x8(%ebp) } 112b38: 5b pop %ebx 112b39: 5e pop %esi 112b3a: 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; 112b3b: ff e2 jmp *%edx 112b3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b40: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112b45: 5b pop %ebx 112b46: 5e pop %esi 112b47: c9 leave 112b48: c3 ret 112b49: 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; 112b4c: 31 c0 xor %eax,%eax } 112b4e: 5b pop %ebx 112b4f: 5e pop %esi 112b50: c9 leave 112b51: c3 ret 00112b54 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112b54: 55 push %ebp 112b55: 89 e5 mov %esp,%ebp 112b57: 56 push %esi 112b58: 53 push %ebx 112b59: 8b 45 08 mov 0x8(%ebp),%eax 112b5c: 8b 4d 0c mov 0xc(%ebp),%ecx 112b5f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b62: 39 05 40 81 12 00 cmp %eax,0x128140 112b68: 76 22 jbe 112b8c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112b6a: 8d 34 40 lea (%eax,%eax,2),%esi 112b6d: 8b 15 44 81 12 00 mov 0x128144,%edx 112b73: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b77: 85 d2 test %edx,%edx 112b79: 74 1d je 112b98 112b7b: 89 5d 10 mov %ebx,0x10(%ebp) 112b7e: 89 4d 0c mov %ecx,0xc(%ebp) 112b81: 89 45 08 mov %eax,0x8(%ebp) } 112b84: 5b pop %ebx 112b85: 5e pop %esi 112b86: 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; 112b87: ff e2 jmp *%edx 112b89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b8c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112b91: 5b pop %ebx 112b92: 5e pop %esi 112b93: c9 leave 112b94: c3 ret 112b95: 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; 112b98: 31 c0 xor %eax,%eax } 112b9a: 5b pop %ebx 112b9b: 5e pop %esi 112b9c: c9 leave 112b9d: c3 ret 001109cc : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1109cc: 55 push %ebp 1109cd: 89 e5 mov %esp,%ebp 1109cf: 56 push %esi 1109d0: 53 push %ebx 1109d1: 8b 45 08 mov 0x8(%ebp),%eax 1109d4: 8b 4d 0c mov 0xc(%ebp),%ecx 1109d7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1109da: 39 05 40 81 12 00 cmp %eax,0x128140 1109e0: 76 1e jbe 110a00 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 1109e2: 8d 34 40 lea (%eax,%eax,2),%esi 1109e5: 8b 15 44 81 12 00 mov 0x128144,%edx 1109eb: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1109ee: 85 d2 test %edx,%edx 1109f0: 74 1a je 110a0c 1109f2: 89 5d 10 mov %ebx,0x10(%ebp) 1109f5: 89 4d 0c mov %ecx,0xc(%ebp) 1109f8: 89 45 08 mov %eax,0x8(%ebp) } 1109fb: 5b pop %ebx 1109fc: 5e pop %esi 1109fd: 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; 1109fe: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110a00: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110a05: 5b pop %ebx 110a06: 5e pop %esi 110a07: c9 leave 110a08: c3 ret 110a09: 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; 110a0c: 31 c0 xor %eax,%eax } 110a0e: 5b pop %ebx 110a0f: 5e pop %esi 110a10: c9 leave 110a11: c3 ret 00112ba0 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112ba0: 55 push %ebp 112ba1: 89 e5 mov %esp,%ebp 112ba3: 56 push %esi 112ba4: 53 push %ebx 112ba5: 8b 45 08 mov 0x8(%ebp),%eax 112ba8: 8b 4d 0c mov 0xc(%ebp),%ecx 112bab: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112bae: 39 05 40 81 12 00 cmp %eax,0x128140 112bb4: 76 22 jbe 112bd8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 112bb6: 8d 34 40 lea (%eax,%eax,2),%esi 112bb9: 8b 15 44 81 12 00 mov 0x128144,%edx 112bbf: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112bc3: 85 d2 test %edx,%edx 112bc5: 74 1d je 112be4 112bc7: 89 5d 10 mov %ebx,0x10(%ebp) 112bca: 89 4d 0c mov %ecx,0xc(%ebp) 112bcd: 89 45 08 mov %eax,0x8(%ebp) } 112bd0: 5b pop %ebx 112bd1: 5e pop %esi 112bd2: 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; 112bd3: ff e2 jmp *%edx 112bd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112bd8: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112bdd: 5b pop %ebx 112bde: 5e pop %esi 112bdf: c9 leave 112be0: c3 ret 112be1: 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; 112be4: 31 c0 xor %eax,%eax } 112be6: 5b pop %ebx 112be7: 5e pop %esi 112be8: c9 leave 112be9: c3 ret 00112bec : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112bec: 55 push %ebp 112bed: 89 e5 mov %esp,%ebp 112bef: 56 push %esi 112bf0: 53 push %ebx 112bf1: 8b 45 08 mov 0x8(%ebp),%eax 112bf4: 8b 4d 0c mov 0xc(%ebp),%ecx 112bf7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112bfa: 39 05 40 81 12 00 cmp %eax,0x128140 112c00: 76 22 jbe 112c24 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 112c02: 8d 34 40 lea (%eax,%eax,2),%esi 112c05: 8b 15 44 81 12 00 mov 0x128144,%edx 112c0b: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112c0f: 85 d2 test %edx,%edx 112c11: 74 1d je 112c30 112c13: 89 5d 10 mov %ebx,0x10(%ebp) 112c16: 89 4d 0c mov %ecx,0xc(%ebp) 112c19: 89 45 08 mov %eax,0x8(%ebp) } 112c1c: 5b pop %ebx 112c1d: 5e pop %esi 112c1e: 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; 112c1f: ff e2 jmp *%edx 112c21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112c24: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112c29: 5b pop %ebx 112c2a: 5e pop %esi 112c2b: c9 leave 112c2c: c3 ret 112c2d: 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; 112c30: 31 c0 xor %eax,%eax } 112c32: 5b pop %ebx 112c33: 5e pop %esi 112c34: c9 leave 112c35: c3 ret 0010d3c4 : 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 ) { 10d3c4: 55 push %ebp 10d3c5: 89 e5 mov %esp,%ebp 10d3c7: 57 push %edi 10d3c8: 56 push %esi 10d3c9: 53 push %ebx 10d3ca: 83 ec 0c sub $0xc,%esp 10d3cd: 8b 5d 08 mov 0x8(%ebp),%ebx 10d3d0: 8b 75 0c mov 0xc(%ebp),%esi 10d3d3: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d3d6: a1 80 d7 12 00 mov 0x12d780,%eax if ( rtems_interrupt_is_in_progress() ) 10d3db: 8b 0d 94 cd 12 00 mov 0x12cd94,%ecx 10d3e1: 85 c9 test %ecx,%ecx 10d3e3: 0f 85 ab 00 00 00 jne 10d494 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d3e9: 85 d2 test %edx,%edx 10d3eb: 0f 84 e3 00 00 00 je 10d4d4 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d3f1: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d3f3: 85 f6 test %esi,%esi 10d3f5: 0f 84 d9 00 00 00 je 10d4d4 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d3fb: 8b 3e mov (%esi),%edi 10d3fd: 85 ff test %edi,%edi 10d3ff: 0f 84 c3 00 00 00 je 10d4c8 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d405: 39 d8 cmp %ebx,%eax 10d407: 76 7b jbe 10d484 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d409: a1 f8 cc 12 00 mov 0x12ccf8,%eax 10d40e: 40 inc %eax 10d40f: a3 f8 cc 12 00 mov %eax,0x12ccf8 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d414: 85 db test %ebx,%ebx 10d416: 0f 85 88 00 00 00 jne 10d4a4 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d41c: 8b 0d 80 d7 12 00 mov 0x12d780,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d422: 85 c9 test %ecx,%ecx 10d424: 0f 84 b7 00 00 00 je 10d4e1 10d42a: 8b 3d 84 d7 12 00 mov 0x12d784,%edi 10d430: 89 f8 mov %edi,%eax 10d432: eb 08 jmp 10d43c 10d434: 43 inc %ebx 10d435: 83 c0 18 add $0x18,%eax 10d438: 39 d9 cmp %ebx,%ecx 10d43a: 76 0b jbe 10d447 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d43c: 83 38 00 cmpl $0x0,(%eax) 10d43f: 75 f3 jne 10d434 10d441: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d445: 75 ed jne 10d434 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d447: 89 1a mov %ebx,(%edx) if ( m != n ) 10d449: 39 d9 cmp %ebx,%ecx 10d44b: 0f 84 97 00 00 00 je 10d4e8 10d451: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d454: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d457: b9 06 00 00 00 mov $0x6,%ecx 10d45c: 89 c7 mov %eax,%edi 10d45e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d460: e8 2f 1a 00 00 call 10ee94 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d465: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d46c: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d473: 89 5d 08 mov %ebx,0x8(%ebp) } 10d476: 83 c4 0c add $0xc,%esp 10d479: 5b pop %ebx 10d47a: 5e pop %esi 10d47b: 5f pop %edi 10d47c: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d47d: e9 da 84 00 00 jmp 11595c 10d482: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d484: 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 ); } 10d489: 83 c4 0c add $0xc,%esp 10d48c: 5b pop %ebx 10d48d: 5e pop %esi 10d48e: 5f pop %edi 10d48f: c9 leave 10d490: c3 ret 10d491: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 10d494: 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 ); } 10d499: 83 c4 0c add $0xc,%esp 10d49c: 5b pop %ebx 10d49d: 5e pop %esi 10d49e: 5f pop %edi 10d49f: c9 leave 10d4a0: c3 ret 10d4a1: 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; 10d4a4: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d4a7: c1 e0 03 shl $0x3,%eax 10d4aa: 03 05 84 d7 12 00 add 0x12d784,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d4b0: 8b 38 mov (%eax),%edi 10d4b2: 85 ff test %edi,%edi 10d4b4: 74 3e je 10d4f4 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(); 10d4b6: e8 d9 19 00 00 call 10ee94 <_Thread_Enable_dispatch> 10d4bb: 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 ); } 10d4c0: 83 c4 0c add $0xc,%esp 10d4c3: 5b pop %ebx 10d4c4: 5e pop %esi 10d4c5: 5f pop %edi 10d4c6: c9 leave 10d4c7: c3 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d4c8: 8b 4e 04 mov 0x4(%esi),%ecx 10d4cb: 85 c9 test %ecx,%ecx 10d4cd: 0f 85 32 ff ff ff jne 10d405 10d4d3: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d4d4: b8 09 00 00 00 mov $0x9,%eax } 10d4d9: 83 c4 0c add $0xc,%esp 10d4dc: 5b pop %ebx 10d4dd: 5e pop %esi 10d4de: 5f pop %edi 10d4df: c9 leave 10d4e0: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d4e1: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d4e7: 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(); 10d4e8: e8 a7 19 00 00 call 10ee94 <_Thread_Enable_dispatch> 10d4ed: b8 05 00 00 00 mov $0x5,%eax return sc; 10d4f2: eb 95 jmp 10d489 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d4f4: 8b 48 04 mov 0x4(%eax),%ecx 10d4f7: 85 c9 test %ecx,%ecx 10d4f9: 75 bb jne 10d4b6 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d4fb: 89 1a mov %ebx,(%edx) 10d4fd: e9 55 ff ff ff jmp 10d457 0010d504 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d504: 55 push %ebp 10d505: 89 e5 mov %esp,%ebp 10d507: 57 push %edi 10d508: 83 ec 04 sub $0x4,%esp 10d50b: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d50e: 8b 15 94 cd 12 00 mov 0x12cd94,%edx 10d514: 85 d2 test %edx,%edx 10d516: 75 44 jne 10d55c return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d518: 39 05 80 d7 12 00 cmp %eax,0x12d780 10d51e: 77 0c ja 10d52c 10d520: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d525: 5a pop %edx 10d526: 5f pop %edi 10d527: c9 leave 10d528: c3 ret 10d529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d52c: 8b 15 f8 cc 12 00 mov 0x12ccf8,%edx 10d532: 42 inc %edx 10d533: 89 15 f8 cc 12 00 mov %edx,0x12ccf8 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d539: 8d 14 40 lea (%eax,%eax,2),%edx 10d53c: c1 e2 03 shl $0x3,%edx 10d53f: 03 15 84 d7 12 00 add 0x12d784,%edx 10d545: b9 18 00 00 00 mov $0x18,%ecx 10d54a: 31 c0 xor %eax,%eax 10d54c: 89 d7 mov %edx,%edi 10d54e: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d550: e8 3f 19 00 00 call 10ee94 <_Thread_Enable_dispatch> 10d555: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d557: 5a pop %edx 10d558: 5f pop %edi 10d559: c9 leave 10d55a: c3 ret 10d55b: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d55c: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d561: 5a pop %edx 10d562: 5f pop %edi 10d563: c9 leave 10d564: c3 ret 00112c38 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112c38: 55 push %ebp 112c39: 89 e5 mov %esp,%ebp 112c3b: 56 push %esi 112c3c: 53 push %ebx 112c3d: 8b 45 08 mov 0x8(%ebp),%eax 112c40: 8b 4d 0c mov 0xc(%ebp),%ecx 112c43: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112c46: 39 05 40 81 12 00 cmp %eax,0x128140 112c4c: 76 22 jbe 112c70 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 112c4e: 8d 34 40 lea (%eax,%eax,2),%esi 112c51: 8b 15 44 81 12 00 mov 0x128144,%edx 112c57: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112c5b: 85 d2 test %edx,%edx 112c5d: 74 1d je 112c7c 112c5f: 89 5d 10 mov %ebx,0x10(%ebp) 112c62: 89 4d 0c mov %ecx,0xc(%ebp) 112c65: 89 45 08 mov %eax,0x8(%ebp) } 112c68: 5b pop %ebx 112c69: 5e pop %esi 112c6a: 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; 112c6b: ff e2 jmp *%edx 112c6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112c70: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112c75: 5b pop %ebx 112c76: 5e pop %esi 112c77: c9 leave 112c78: c3 ret 112c79: 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; 112c7c: 31 c0 xor %eax,%eax } 112c7e: 5b pop %ebx 112c7f: 5e pop %esi 112c80: c9 leave 112c81: c3 ret 00115f50 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 115f50: 55 push %ebp 115f51: 89 e5 mov %esp,%ebp 115f53: 57 push %edi 115f54: 56 push %esi 115f55: 53 push %ebx 115f56: 83 ec 1c sub $0x1c,%esp 115f59: 8b 7d 08 mov 0x8(%ebp),%edi 115f5c: 8b 5d 0c mov 0xc(%ebp),%ebx 115f5f: 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 ) 115f62: 85 db test %ebx,%ebx 115f64: 74 62 je 115fc8 return RTEMS_INVALID_ADDRESS; if ( !count ) 115f66: 85 f6 test %esi,%esi 115f68: 74 5e je 115fc8 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 115f6a: 51 push %ecx 115f6b: 8d 45 e4 lea -0x1c(%ebp),%eax 115f6e: 50 push %eax 115f6f: 57 push %edi 115f70: 68 a0 26 14 00 push $0x1426a0 115f75: e8 1e 4d 00 00 call 11ac98 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 115f7a: 83 c4 10 add $0x10,%esp 115f7d: 8b 55 e4 mov -0x1c(%ebp),%edx 115f80: 85 d2 test %edx,%edx 115f82: 74 10 je 115f94 115f84: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f89: 8d 65 f4 lea -0xc(%ebp),%esp 115f8c: 5b pop %ebx 115f8d: 5e pop %esi 115f8e: 5f pop %edi 115f8f: c9 leave 115f90: c3 ret 115f91: 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( 115f94: 83 ec 08 sub $0x8,%esp 115f97: 56 push %esi 115f98: 6a 00 push $0x0 115f9a: 57 push %edi 115f9b: ff 75 10 pushl 0x10(%ebp) 115f9e: 53 push %ebx 115f9f: 83 c0 14 add $0x14,%eax 115fa2: 50 push %eax 115fa3: e8 d4 34 00 00 call 11947c <_CORE_message_queue_Broadcast> 115fa8: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 115faa: 83 c4 20 add $0x20,%esp 115fad: e8 ca 55 00 00 call 11b57c <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 115fb2: 83 ec 0c sub $0xc,%esp 115fb5: 53 push %ebx 115fb6: e8 69 03 00 00 call 116324 <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 115fbb: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115fbe: 8d 65 f4 lea -0xc(%ebp),%esp 115fc1: 5b pop %ebx 115fc2: 5e pop %esi 115fc3: 5f pop %edi 115fc4: c9 leave 115fc5: c3 ret 115fc6: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif count ); _Thread_Enable_dispatch(); return 115fc8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115fcd: 8d 65 f4 lea -0xc(%ebp),%esp 115fd0: 5b pop %ebx 115fd1: 5e pop %esi 115fd2: 5f pop %edi 115fd3: c9 leave 115fd4: c3 ret 00113a24 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113a24: 55 push %ebp 113a25: 89 e5 mov %esp,%ebp 113a27: 57 push %edi 113a28: 56 push %esi 113a29: 53 push %ebx 113a2a: 83 ec 2c sub $0x2c,%esp 113a2d: 8b 5d 08 mov 0x8(%ebp),%ebx 113a30: 8b 75 0c mov 0xc(%ebp),%esi 113a33: 8b 4d 10 mov 0x10(%ebp),%ecx 113a36: 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 ) ) 113a39: 85 db test %ebx,%ebx 113a3b: 74 2f je 113a6c return RTEMS_INVALID_NAME; if ( !id ) 113a3d: 85 ff test %edi,%edi 113a3f: 0f 84 a3 00 00 00 je 113ae8 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113a45: 85 f6 test %esi,%esi 113a47: 74 13 je 113a5c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113a49: 85 c9 test %ecx,%ecx 113a4b: 75 2f jne 113a7c 113a4d: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113a52: 8d 65 f4 lea -0xc(%ebp),%esp 113a55: 5b pop %ebx 113a56: 5e pop %esi 113a57: 5f pop %edi 113a58: c9 leave 113a59: c3 ret 113a5a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113a5c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113a61: 8d 65 f4 lea -0xc(%ebp),%esp 113a64: 5b pop %ebx 113a65: 5e pop %esi 113a66: 5f pop %edi 113a67: c9 leave 113a68: c3 ret 113a69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113a6c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113a71: 8d 65 f4 lea -0xc(%ebp),%esp 113a74: 5b pop %ebx 113a75: 5e pop %esi 113a76: 5f pop %edi 113a77: c9 leave 113a78: c3 ret 113a79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 113a7c: a1 78 11 13 00 mov 0x131178,%eax 113a81: 40 inc %eax 113a82: a3 78 11 13 00 mov %eax,0x131178 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113a87: 89 4d d4 mov %ecx,-0x2c(%ebp) 113a8a: e8 a5 5a 00 00 call 119534 <_Message_queue_Allocate> 113a8f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113a91: 85 c0 test %eax,%eax 113a93: 8b 4d d4 mov -0x2c(%ebp),%ecx 113a96: 74 7c je 113b14 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113a98: 8b 45 14 mov 0x14(%ebp),%eax 113a9b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 113a9e: a8 04 test $0x4,%al 113aa0: 0f 95 c0 setne %al 113aa3: 0f b6 c0 movzbl %al,%eax 113aa6: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113aa9: 51 push %ecx 113aaa: 56 push %esi 113aab: 8d 45 e4 lea -0x1c(%ebp),%eax 113aae: 50 push %eax 113aaf: 8d 42 14 lea 0x14(%edx),%eax 113ab2: 50 push %eax 113ab3: 89 55 d4 mov %edx,-0x2c(%ebp) 113ab6: e8 f1 10 00 00 call 114bac <_CORE_message_queue_Initialize> 113abb: 83 c4 10 add $0x10,%esp 113abe: 84 c0 test %al,%al 113ac0: 8b 55 d4 mov -0x2c(%ebp),%edx 113ac3: 75 2f jne 113af4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113ac5: 83 ec 08 sub $0x8,%esp 113ac8: 52 push %edx 113ac9: 68 20 1b 13 00 push $0x131b20 113ace: e8 15 1f 00 00 call 1159e8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113ad3: e8 34 29 00 00 call 11640c <_Thread_Enable_dispatch> 113ad8: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 113add: 83 c4 10 add $0x10,%esp 113ae0: e9 6d ff ff ff jmp 113a52 113ae5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 113ae8: b8 09 00 00 00 mov $0x9,%eax 113aed: e9 60 ff ff ff jmp 113a52 113af2: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113af4: 8b 42 08 mov 0x8(%edx),%eax 113af7: 0f b7 f0 movzwl %ax,%esi 113afa: 8b 0d 3c 1b 13 00 mov 0x131b3c,%ecx 113b00: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113b03: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113b06: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113b08: e8 ff 28 00 00 call 11640c <_Thread_Enable_dispatch> 113b0d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113b0f: e9 3e ff ff ff jmp 113a52 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113b14: e8 f3 28 00 00 call 11640c <_Thread_Enable_dispatch> 113b19: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 113b1e: e9 2f ff ff ff jmp 113a52 00117b5c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 117b5c: 55 push %ebp 117b5d: 89 e5 mov %esp,%ebp 117b5f: 53 push %ebx 117b60: 83 ec 18 sub $0x18,%esp 117b63: 8d 45 f4 lea -0xc(%ebp),%eax 117b66: 50 push %eax 117b67: ff 75 08 pushl 0x8(%ebp) 117b6a: 68 20 5d 13 00 push $0x135d20 117b6f: e8 dc 9d ff ff call 111950 <_Objects_Get> 117b74: 89 c3 mov %eax,%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 117b76: 83 c4 10 add $0x10,%esp 117b79: 8b 4d f4 mov -0xc(%ebp),%ecx 117b7c: 85 c9 test %ecx,%ecx 117b7e: 75 3c jne 117bbc case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 117b80: 83 ec 08 sub $0x8,%esp 117b83: 50 push %eax 117b84: 68 20 5d 13 00 push $0x135d20 117b89: e8 8e 99 ff ff call 11151c <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 117b8e: 83 c4 0c add $0xc,%esp 117b91: 6a 05 push $0x5 117b93: 6a 00 push $0x0 117b95: 8d 43 14 lea 0x14(%ebx),%eax 117b98: 50 push %eax 117b99: e8 0e 05 00 00 call 1180ac <_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 ); 117b9e: 58 pop %eax 117b9f: 5a pop %edx 117ba0: 53 push %ebx 117ba1: 68 20 5d 13 00 push $0x135d20 117ba6: e8 75 9c ff ff call 111820 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 117bab: e8 84 a6 ff ff call 112234 <_Thread_Enable_dispatch> 117bb0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117bb2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117bb5: 8b 5d fc mov -0x4(%ebp),%ebx 117bb8: c9 leave 117bb9: c3 ret 117bba: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 117bbc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117bc1: 8b 5d fc mov -0x4(%ebp),%ebx 117bc4: c9 leave 117bc5: c3 ret 00116144 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 116144: 55 push %ebp 116145: 89 e5 mov %esp,%ebp 116147: 53 push %ebx 116148: 83 ec 14 sub $0x14,%esp 11614b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11614e: 85 db test %ebx,%ebx 116150: 74 46 je 116198 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116152: 51 push %ecx 116153: 8d 45 f4 lea -0xc(%ebp),%eax 116156: 50 push %eax 116157: ff 75 08 pushl 0x8(%ebp) 11615a: 68 a0 26 14 00 push $0x1426a0 11615f: e8 34 4b 00 00 call 11ac98 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116164: 83 c4 10 add $0x10,%esp 116167: 8b 55 f4 mov -0xc(%ebp),%edx 11616a: 85 d2 test %edx,%edx 11616c: 74 0a je 116178 11616e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116173: 8b 5d fc mov -0x4(%ebp),%ebx 116176: c9 leave 116177: 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 ); 116178: 83 ec 0c sub $0xc,%esp 11617b: 83 c0 14 add $0x14,%eax 11617e: 50 push %eax 11617f: e8 b8 33 00 00 call 11953c <_CORE_message_queue_Flush> 116184: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116186: e8 f1 53 00 00 call 11b57c <_Thread_Enable_dispatch> 11618b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11618d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116190: 8b 5d fc mov -0x4(%ebp),%ebx 116193: c9 leave 116194: c3 ret 116195: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116198: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11619d: 8b 5d fc mov -0x4(%ebp),%ebx 1161a0: c9 leave 1161a1: c3 ret 001161a4 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 1161a4: 55 push %ebp 1161a5: 89 e5 mov %esp,%ebp 1161a7: 53 push %ebx 1161a8: 83 ec 14 sub $0x14,%esp 1161ab: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1161ae: 85 db test %ebx,%ebx 1161b0: 74 3a je 1161ec 1161b2: 51 push %ecx 1161b3: 8d 45 f4 lea -0xc(%ebp),%eax 1161b6: 50 push %eax 1161b7: ff 75 08 pushl 0x8(%ebp) 1161ba: 68 a0 26 14 00 push $0x1426a0 1161bf: e8 d4 4a 00 00 call 11ac98 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1161c4: 83 c4 10 add $0x10,%esp 1161c7: 8b 55 f4 mov -0xc(%ebp),%edx 1161ca: 85 d2 test %edx,%edx 1161cc: 74 0a je 1161d8 1161ce: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161d3: 8b 5d fc mov -0x4(%ebp),%ebx 1161d6: c9 leave 1161d7: 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; 1161d8: 8b 40 5c mov 0x5c(%eax),%eax 1161db: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1161dd: e8 9a 53 00 00 call 11b57c <_Thread_Enable_dispatch> 1161e2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161e4: 8b 5d fc mov -0x4(%ebp),%ebx 1161e7: c9 leave 1161e8: c3 ret 1161e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1161ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161f1: 8b 5d fc mov -0x4(%ebp),%ebx 1161f4: c9 leave 1161f5: c3 ret 00113b48 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113b48: 55 push %ebp 113b49: 89 e5 mov %esp,%ebp 113b4b: 56 push %esi 113b4c: 53 push %ebx 113b4d: 83 ec 10 sub $0x10,%esp 113b50: 8b 5d 0c mov 0xc(%ebp),%ebx 113b53: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113b56: 85 db test %ebx,%ebx 113b58: 74 6e je 113bc8 return RTEMS_INVALID_ADDRESS; if ( !size ) 113b5a: 85 f6 test %esi,%esi 113b5c: 74 6a je 113bc8 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 113b5e: 51 push %ecx 113b5f: 8d 45 f4 lea -0xc(%ebp),%eax 113b62: 50 push %eax 113b63: ff 75 08 pushl 0x8(%ebp) 113b66: 68 20 1b 13 00 push $0x131b20 113b6b: e8 a8 1f 00 00 call 115b18 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113b70: 83 c4 10 add $0x10,%esp 113b73: 8b 55 f4 mov -0xc(%ebp),%edx 113b76: 85 d2 test %edx,%edx 113b78: 75 42 jne 113bbc if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 113b7a: 83 ec 08 sub $0x8,%esp 113b7d: ff 75 18 pushl 0x18(%ebp) 113b80: 8b 55 14 mov 0x14(%ebp),%edx 113b83: 83 e2 01 and $0x1,%edx 113b86: 83 f2 01 xor $0x1,%edx 113b89: 52 push %edx 113b8a: 56 push %esi 113b8b: 53 push %ebx 113b8c: ff 70 08 pushl 0x8(%eax) 113b8f: 83 c0 14 add $0x14,%eax 113b92: 50 push %eax 113b93: e8 d4 10 00 00 call 114c6c <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113b98: 83 c4 20 add $0x20,%esp 113b9b: e8 6c 28 00 00 call 11640c <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113ba0: 83 ec 0c sub $0xc,%esp 113ba3: a1 38 12 13 00 mov 0x131238,%eax 113ba8: ff 70 34 pushl 0x34(%eax) 113bab: e8 a0 00 00 00 call 113c50 <_Message_queue_Translate_core_message_queue_return_code> 113bb0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113bb3: 8d 65 f8 lea -0x8(%ebp),%esp 113bb6: 5b pop %ebx 113bb7: 5e pop %esi 113bb8: c9 leave 113bb9: c3 ret 113bba: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113bbc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113bc1: 8d 65 f8 lea -0x8(%ebp),%esp 113bc4: 5b pop %ebx 113bc5: 5e pop %esi 113bc6: c9 leave 113bc7: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113bc8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113bcd: 8d 65 f8 lea -0x8(%ebp),%esp 113bd0: 5b pop %ebx 113bd1: 5e pop %esi 113bd2: c9 leave 113bd3: c3 ret 0010b29c : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b29c: 55 push %ebp 10b29d: 89 e5 mov %esp,%ebp 10b29f: 56 push %esi 10b2a0: 53 push %ebx 10b2a1: 83 ec 10 sub $0x10,%esp 10b2a4: 8b 75 08 mov 0x8(%ebp),%esi 10b2a7: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b2aa: 85 db test %ebx,%ebx 10b2ac: 74 5e je 10b30c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b2ae: 51 push %ecx 10b2af: 8d 45 f4 lea -0xc(%ebp),%eax 10b2b2: 50 push %eax 10b2b3: 56 push %esi 10b2b4: 68 c0 80 12 00 push $0x1280c0 10b2b9: e8 c2 19 00 00 call 10cc80 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10b2be: 83 c4 10 add $0x10,%esp 10b2c1: 8b 55 f4 mov -0xc(%ebp),%edx 10b2c4: 85 d2 test %edx,%edx 10b2c6: 74 0c je 10b2d4 10b2c8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b2cd: 8d 65 f8 lea -0x8(%ebp),%esp 10b2d0: 5b pop %ebx 10b2d1: 5e pop %esi 10b2d2: c9 leave 10b2d3: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b2d4: 6a 00 push $0x0 10b2d6: 6a 00 push $0x0 10b2d8: 68 ff ff ff 7f push $0x7fffffff 10b2dd: 6a 00 push $0x0 10b2df: 56 push %esi 10b2e0: ff 75 10 pushl 0x10(%ebp) 10b2e3: 53 push %ebx 10b2e4: 83 c0 14 add $0x14,%eax 10b2e7: 50 push %eax 10b2e8: e8 13 0c 00 00 call 10bf00 <_CORE_message_queue_Submit> 10b2ed: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b2ef: 83 c4 20 add $0x20,%esp 10b2f2: e8 fd 21 00 00 call 10d4f4 <_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); 10b2f7: 83 ec 0c sub $0xc,%esp 10b2fa: 53 push %ebx 10b2fb: e8 18 00 00 00 call 10b318 <_Message_queue_Translate_core_message_queue_return_code> 10b300: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b303: 8d 65 f8 lea -0x8(%ebp),%esp 10b306: 5b pop %ebx 10b307: 5e pop %esi 10b308: c9 leave 10b309: c3 ret 10b30a: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b30c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b311: 8d 65 f8 lea -0x8(%ebp),%esp 10b314: 5b pop %ebx 10b315: 5e pop %esi 10b316: c9 leave 10b317: c3 ret 00116334 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 116334: 55 push %ebp 116335: 89 e5 mov %esp,%ebp 116337: 56 push %esi 116338: 53 push %ebx 116339: 83 ec 10 sub $0x10,%esp 11633c: 8b 75 08 mov 0x8(%ebp),%esi 11633f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 116342: 85 db test %ebx,%ebx 116344: 74 5e je 1163a4 116346: 51 push %ecx 116347: 8d 45 f4 lea -0xc(%ebp),%eax 11634a: 50 push %eax 11634b: 56 push %esi 11634c: 68 a0 26 14 00 push $0x1426a0 116351: e8 42 49 00 00 call 11ac98 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116356: 83 c4 10 add $0x10,%esp 116359: 8b 55 f4 mov -0xc(%ebp),%edx 11635c: 85 d2 test %edx,%edx 11635e: 74 0c je 11636c 116360: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116365: 8d 65 f8 lea -0x8(%ebp),%esp 116368: 5b pop %ebx 116369: 5e pop %esi 11636a: c9 leave 11636b: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 11636c: 6a 00 push $0x0 11636e: 6a 00 push $0x0 116370: 68 00 00 00 80 push $0x80000000 116375: 6a 00 push $0x0 116377: 56 push %esi 116378: ff 75 10 pushl 0x10(%ebp) 11637b: 53 push %ebx 11637c: 83 c0 14 add $0x14,%eax 11637f: 50 push %eax 116380: e8 0b 34 00 00 call 119790 <_CORE_message_queue_Submit> 116385: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 116387: 83 c4 20 add $0x20,%esp 11638a: e8 ed 51 00 00 call 11b57c <_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); 11638f: 83 ec 0c sub $0xc,%esp 116392: 53 push %ebx 116393: e8 8c ff ff ff call 116324 <_Message_queue_Translate_core_message_queue_return_code> 116398: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11639b: 8d 65 f8 lea -0x8(%ebp),%esp 11639e: 5b pop %ebx 11639f: 5e pop %esi 1163a0: c9 leave 1163a1: c3 ret 1163a2: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1163a4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1163a9: 8d 65 f8 lea -0x8(%ebp),%esp 1163ac: 5b pop %ebx 1163ad: 5e pop %esi 1163ae: c9 leave 1163af: c3 ret 0010b7fc : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10b7fc: 55 push %ebp 10b7fd: 89 e5 mov %esp,%ebp 10b7ff: 83 ec 08 sub $0x8,%esp 10b802: 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 ) 10b805: 83 f8 01 cmp $0x1,%eax 10b808: 74 36 je 10b840 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b80a: 83 f8 02 cmp $0x2,%eax 10b80d: 74 29 je 10b838 api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b80f: 83 f8 03 cmp $0x3,%eax 10b812: 74 08 je 10b81c 10b814: b8 37 21 12 00 mov $0x122137,%eax return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10b819: c9 leave 10b81a: c3 ret 10b81b: 90 nop <== NOT EXECUTED 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; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b81c: b8 20 61 12 00 mov $0x126120,%eax else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10b821: 83 ec 08 sub $0x8,%esp 10b824: ff 75 0c pushl 0xc(%ebp) 10b827: 50 push %eax 10b828: e8 2f 48 00 00 call 11005c if ( class_assoc ) 10b82d: 83 c4 10 add $0x10,%esp 10b830: 85 c0 test %eax,%eax 10b832: 74 14 je 10b848 return class_assoc->name; 10b834: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b836: c9 leave 10b837: c3 ret 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; else if ( the_api == OBJECTS_CLASSIC_API ) 10b838: b8 a0 60 12 00 mov $0x1260a0,%eax 10b83d: eb e2 jmp 10b821 10b83f: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10b840: b8 80 60 12 00 mov $0x126080,%eax 10b845: eb da jmp 10b821 10b847: 90 nop <== NOT EXECUTED api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 10b848: b8 3f 21 12 00 mov $0x12213f,%eax return class_assoc->name; return "BAD CLASS"; } 10b84d: c9 leave 10b84e: c3 ret 0010b850 : }; const char *rtems_object_get_api_name( int api ) { 10b850: 55 push %ebp 10b851: 89 e5 mov %esp,%ebp 10b853: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10b856: ff 75 08 pushl 0x8(%ebp) 10b859: 68 c0 61 12 00 push $0x1261c0 10b85e: e8 f9 47 00 00 call 11005c if ( api_assoc ) 10b863: 83 c4 10 add $0x10,%esp 10b866: 85 c0 test %eax,%eax 10b868: 74 06 je 10b870 return api_assoc->name; 10b86a: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b86c: c9 leave 10b86d: c3 ret 10b86e: 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 ) 10b870: b8 3f 21 12 00 mov $0x12213f,%eax return api_assoc->name; return "BAD CLASS"; } 10b875: c9 leave 10b876: c3 ret 0010cd78 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cd78: 55 push %ebp 10cd79: 89 e5 mov %esp,%ebp 10cd7b: 57 push %edi 10cd7c: 56 push %esi 10cd7d: 53 push %ebx 10cd7e: 83 ec 0c sub $0xc,%esp 10cd81: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cd84: 85 db test %ebx,%ebx 10cd86: 74 5c je 10cde4 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cd88: 83 ec 08 sub $0x8,%esp 10cd8b: ff 75 0c pushl 0xc(%ebp) 10cd8e: ff 75 08 pushl 0x8(%ebp) 10cd91: e8 a2 1a 00 00 call 10e838 <_Objects_Get_information> if ( !obj_info ) 10cd96: 83 c4 10 add $0x10,%esp 10cd99: 85 c0 test %eax,%eax 10cd9b: 74 57 je 10cdf4 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cd9d: 8b 50 08 mov 0x8(%eax),%edx 10cda0: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cda2: 8b 50 0c mov 0xc(%eax),%edx 10cda5: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cda8: 8a 50 12 mov 0x12(%eax),%dl 10cdab: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cdae: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cdb2: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cdb5: 85 f6 test %esi,%esi 10cdb7: 74 3f je 10cdf8 10cdb9: 8b 78 1c mov 0x1c(%eax),%edi 10cdbc: b9 01 00 00 00 mov $0x1,%ecx 10cdc1: b8 01 00 00 00 mov $0x1,%eax 10cdc6: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10cdc8: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cdcc: 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++ ) 10cdcf: 40 inc %eax 10cdd0: 89 c1 mov %eax,%ecx 10cdd2: 39 c6 cmp %eax,%esi 10cdd4: 73 f2 jae 10cdc8 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cdd6: 89 53 10 mov %edx,0x10(%ebx) 10cdd9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10cddb: 8d 65 f4 lea -0xc(%ebp),%esp 10cdde: 5b pop %ebx 10cddf: 5e pop %esi 10cde0: 5f pop %edi 10cde1: c9 leave 10cde2: c3 ret 10cde3: 90 nop <== NOT EXECUTED int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cde4: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cde9: 8d 65 f4 lea -0xc(%ebp),%esp 10cdec: 5b pop %ebx 10cded: 5e pop %esi 10cdee: 5f pop %edi 10cdef: c9 leave 10cdf0: c3 ret 10cdf1: 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 ) 10cdf4: b0 0a mov $0xa,%al 10cdf6: eb e3 jmp 10cddb 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++ ) 10cdf8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cdfa: eb da jmp 10cdd6 <== NOT EXECUTED 0010fcb0 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10fcb0: 55 push %ebp 10fcb1: 89 e5 mov %esp,%ebp 10fcb3: 53 push %ebx 10fcb4: 83 ec 14 sub $0x14,%esp 10fcb7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fcba: 85 db test %ebx,%ebx 10fcbc: 74 26 je 10fce4 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10fcbe: 83 ec 08 sub $0x8,%esp 10fcc1: 8d 45 f4 lea -0xc(%ebp),%eax 10fcc4: 50 push %eax 10fcc5: ff 75 08 pushl 0x8(%ebp) 10fcc8: e8 eb 1c 00 00 call 1119b8 <_Objects_Id_to_name> *name = name_u.name_u32; 10fccd: 8b 55 f4 mov -0xc(%ebp),%edx 10fcd0: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10fcd2: 8b 04 85 ac c1 12 00 mov 0x12c1ac(,%eax,4),%eax 10fcd9: 83 c4 10 add $0x10,%esp } 10fcdc: 8b 5d fc mov -0x4(%ebp),%ebx 10fcdf: c9 leave 10fce0: c3 ret 10fce1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fce4: 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 ]; } 10fce9: 8b 5d fc mov -0x4(%ebp),%ebx 10fcec: c9 leave 10fced: c3 ret 0010b884 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10b884: 55 push %ebp 10b885: 89 e5 mov %esp,%ebp 10b887: 57 push %edi 10b888: 56 push %esi 10b889: 53 push %ebx 10b88a: 83 ec 1c sub $0x1c,%esp 10b88d: 8b 75 08 mov 0x8(%ebp),%esi 10b890: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b893: 85 ff test %edi,%edi 10b895: 74 61 je 10b8f8 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b897: 85 f6 test %esi,%esi 10b899: 74 35 je 10b8d0 information = _Objects_Get_information_id( tmpId ); 10b89b: 83 ec 0c sub $0xc,%esp 10b89e: 56 push %esi 10b89f: e8 80 18 00 00 call 10d124 <_Objects_Get_information_id> 10b8a4: 89 c3 mov %eax,%ebx if ( !information ) 10b8a6: 83 c4 10 add $0x10,%esp 10b8a9: 85 c0 test %eax,%eax 10b8ab: 74 16 je 10b8c3 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10b8ad: 50 push %eax 10b8ae: 8d 45 e4 lea -0x1c(%ebp),%eax 10b8b1: 50 push %eax 10b8b2: 56 push %esi 10b8b3: 53 push %ebx 10b8b4: e8 0f 1a 00 00 call 10d2c8 <_Objects_Get> switch ( location ) { 10b8b9: 83 c4 10 add $0x10,%esp 10b8bc: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b8bf: 85 c9 test %ecx,%ecx 10b8c1: 74 19 je 10b8dc case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b8c3: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b8c8: 8d 65 f4 lea -0xc(%ebp),%esp 10b8cb: 5b pop %ebx 10b8cc: 5e pop %esi 10b8cd: 5f pop %edi 10b8ce: c9 leave 10b8cf: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b8d0: a1 58 86 12 00 mov 0x128658,%eax 10b8d5: 8b 70 08 mov 0x8(%eax),%esi 10b8d8: eb c1 jmp 10b89b 10b8da: 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 ); 10b8dc: 52 push %edx 10b8dd: 57 push %edi 10b8de: 50 push %eax 10b8df: 53 push %ebx 10b8e0: e8 df 1b 00 00 call 10d4c4 <_Objects_Set_name> _Thread_Enable_dispatch(); 10b8e5: e8 26 23 00 00 call 10dc10 <_Thread_Enable_dispatch> 10b8ea: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b8ec: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b8ef: 8d 65 f4 lea -0xc(%ebp),%esp 10b8f2: 5b pop %ebx 10b8f3: 5e pop %esi 10b8f4: 5f pop %edi 10b8f5: c9 leave 10b8f6: c3 ret 10b8f7: 90 nop <== NOT EXECUTED Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b8f8: b8 09 00 00 00 mov $0x9,%eax 10b8fd: eb c9 jmp 10b8c8 001163b0 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1163b0: 55 push %ebp 1163b1: 89 e5 mov %esp,%ebp 1163b3: 57 push %edi 1163b4: 56 push %esi 1163b5: 53 push %ebx 1163b6: 83 ec 1c sub $0x1c,%esp 1163b9: 8b 5d 08 mov 0x8(%ebp),%ebx 1163bc: 8b 75 0c mov 0xc(%ebp),%esi 1163bf: 8b 55 10 mov 0x10(%ebp),%edx 1163c2: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1163c5: 85 db test %ebx,%ebx 1163c7: 74 47 je 116410 return RTEMS_INVALID_NAME; if ( !starting_address ) 1163c9: 85 f6 test %esi,%esi 1163cb: 74 23 je 1163f0 return RTEMS_INVALID_ADDRESS; if ( !id ) 1163cd: 8b 45 1c mov 0x1c(%ebp),%eax 1163d0: 85 c0 test %eax,%eax 1163d2: 74 1c je 1163f0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1163d4: 85 d2 test %edx,%edx 1163d6: 74 28 je 116400 1163d8: 85 ff test %edi,%edi 1163da: 74 24 je 116400 1163dc: 39 fa cmp %edi,%edx 1163de: 72 20 jb 116400 1163e0: f7 c7 03 00 00 00 test $0x3,%edi 1163e6: 75 18 jne 116400 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 1163e8: f7 c6 03 00 00 00 test $0x3,%esi 1163ee: 74 30 je 116420 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1163f0: b8 09 00 00 00 mov $0x9,%eax } 1163f5: 8d 65 f4 lea -0xc(%ebp),%esp 1163f8: 5b pop %ebx 1163f9: 5e pop %esi 1163fa: 5f pop %edi 1163fb: c9 leave 1163fc: c3 ret 1163fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 116400: b8 08 00 00 00 mov $0x8,%eax } 116405: 8d 65 f4 lea -0xc(%ebp),%esp 116408: 5b pop %ebx 116409: 5e pop %esi 11640a: 5f pop %edi 11640b: c9 leave 11640c: c3 ret 11640d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116410: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116415: 8d 65 f4 lea -0xc(%ebp),%esp 116418: 5b pop %ebx 116419: 5e pop %esi 11641a: 5f pop %edi 11641b: c9 leave 11641c: c3 ret 11641d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116420: a1 f8 1c 14 00 mov 0x141cf8,%eax 116425: 40 inc %eax 116426: a3 f8 1c 14 00 mov %eax,0x141cf8 * 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 ); 11642b: 83 ec 0c sub $0xc,%esp 11642e: 68 80 1b 14 00 push $0x141b80 116433: 89 55 e0 mov %edx,-0x20(%ebp) 116436: e8 71 43 00 00 call 11a7ac <_Objects_Allocate> 11643b: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 11643e: 83 c4 10 add $0x10,%esp 116441: 85 c0 test %eax,%eax 116443: 8b 55 e0 mov -0x20(%ebp),%edx 116446: 74 58 je 1164a0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116448: 8b 45 e4 mov -0x1c(%ebp),%eax 11644b: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 11644e: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116451: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 116454: 8b 4d 18 mov 0x18(%ebp),%ecx 116457: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 11645a: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 116461: 57 push %edi 116462: 89 d0 mov %edx,%eax 116464: 31 d2 xor %edx,%edx 116466: f7 f7 div %edi 116468: 50 push %eax 116469: 56 push %esi 11646a: 8b 45 e4 mov -0x1c(%ebp),%eax 11646d: 83 c0 24 add $0x24,%eax 116470: 50 push %eax 116471: e8 c6 2f 00 00 call 11943c <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116476: 8b 7d e4 mov -0x1c(%ebp),%edi 116479: 8b 47 08 mov 0x8(%edi),%eax 11647c: 0f b7 f0 movzwl %ax,%esi 11647f: 8b 15 9c 1b 14 00 mov 0x141b9c,%edx 116485: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116488: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 11648b: 8b 55 1c mov 0x1c(%ebp),%edx 11648e: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116490: e8 e7 50 00 00 call 11b57c <_Thread_Enable_dispatch> 116495: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116497: 83 c4 10 add $0x10,%esp 11649a: e9 66 ff ff ff jmp 116405 11649f: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1164a0: e8 d7 50 00 00 call 11b57c <_Thread_Enable_dispatch> 1164a5: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1164aa: e9 56 ff ff ff jmp 116405 001164b0 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 1164b0: 55 push %ebp 1164b1: 89 e5 mov %esp,%ebp 1164b3: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1164b6: 8d 45 f4 lea -0xc(%ebp),%eax 1164b9: 50 push %eax 1164ba: ff 75 08 pushl 0x8(%ebp) 1164bd: 68 80 1b 14 00 push $0x141b80 1164c2: e8 d1 47 00 00 call 11ac98 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1164c7: 83 c4 10 add $0x10,%esp 1164ca: 8b 55 f4 mov -0xc(%ebp),%edx 1164cd: 85 d2 test %edx,%edx 1164cf: 74 07 je 1164d8 1164d1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1164d6: c9 leave 1164d7: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 1164d8: 8b 48 20 mov 0x20(%eax),%ecx 1164db: 85 c9 test %ecx,%ecx 1164dd: 74 0d je 1164ec #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1164df: e8 98 50 00 00 call 11b57c <_Thread_Enable_dispatch> 1164e4: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1164e9: c9 leave 1164ea: c3 ret 1164eb: 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 ); 1164ec: 83 ec 08 sub $0x8,%esp 1164ef: 50 push %eax 1164f0: 68 80 1b 14 00 push $0x141b80 1164f5: 89 45 e4 mov %eax,-0x1c(%ebp) 1164f8: e8 2b 43 00 00 call 11a828 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 1164fd: 58 pop %eax 1164fe: 5a pop %edx 1164ff: 8b 45 e4 mov -0x1c(%ebp),%eax 116502: 50 push %eax 116503: 68 80 1b 14 00 push $0x141b80 116508: e8 1f 46 00 00 call 11ab2c <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 11650d: e8 6a 50 00 00 call 11b57c <_Thread_Enable_dispatch> 116512: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116514: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116517: c9 leave 116518: c3 ret 0011651c : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 11651c: 55 push %ebp 11651d: 89 e5 mov %esp,%ebp 11651f: 56 push %esi 116520: 53 push %ebx 116521: 83 ec 20 sub $0x20,%esp 116524: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116527: 85 db test %ebx,%ebx 116529: 74 59 je 116584 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 11652b: 52 push %edx 11652c: 8d 45 f4 lea -0xc(%ebp),%eax 11652f: 50 push %eax 116530: ff 75 08 pushl 0x8(%ebp) 116533: 68 80 1b 14 00 push $0x141b80 116538: e8 5b 47 00 00 call 11ac98 <_Objects_Get> 11653d: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11653f: 83 c4 10 add $0x10,%esp 116542: 8b 45 f4 mov -0xc(%ebp),%eax 116545: 85 c0 test %eax,%eax 116547: 75 2f jne 116578 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116549: 83 ec 0c sub $0xc,%esp 11654c: 8d 46 24 lea 0x24(%esi),%eax 11654f: 50 push %eax 116550: e8 c3 2e 00 00 call 119418 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116555: 83 c4 10 add $0x10,%esp 116558: 85 c0 test %eax,%eax 11655a: 74 34 je 116590 the_partition->number_of_used_blocks += 1; 11655c: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 11655f: 89 45 e4 mov %eax,-0x1c(%ebp) 116562: e8 15 50 00 00 call 11b57c <_Thread_Enable_dispatch> *buffer = the_buffer; 116567: 8b 45 e4 mov -0x1c(%ebp),%eax 11656a: 89 03 mov %eax,(%ebx) 11656c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11656e: 8d 65 f8 lea -0x8(%ebp),%esp 116571: 5b pop %ebx 116572: 5e pop %esi 116573: c9 leave 116574: c3 ret 116575: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116578: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11657d: 8d 65 f8 lea -0x8(%ebp),%esp 116580: 5b pop %ebx 116581: 5e pop %esi 116582: c9 leave 116583: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116584: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116589: 8d 65 f8 lea -0x8(%ebp),%esp 11658c: 5b pop %ebx 11658d: 5e pop %esi 11658e: c9 leave 11658f: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116590: e8 e7 4f 00 00 call 11b57c <_Thread_Enable_dispatch> 116595: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 11659a: eb e1 jmp 11657d 001165c0 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 1165c0: 55 push %ebp 1165c1: 89 e5 mov %esp,%ebp 1165c3: 56 push %esi 1165c4: 53 push %ebx 1165c5: 83 ec 14 sub $0x14,%esp 1165c8: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1165cb: 8d 45 f4 lea -0xc(%ebp),%eax 1165ce: 50 push %eax 1165cf: ff 75 08 pushl 0x8(%ebp) 1165d2: 68 80 1b 14 00 push $0x141b80 1165d7: e8 bc 46 00 00 call 11ac98 <_Objects_Get> 1165dc: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1165de: 83 c4 10 add $0x10,%esp 1165e1: 8b 45 f4 mov -0xc(%ebp),%eax 1165e4: 85 c0 test %eax,%eax 1165e6: 74 0c je 1165f4 1165e8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165ed: 8d 65 f8 lea -0x8(%ebp),%esp 1165f0: 5b pop %ebx 1165f1: 5e pop %esi 1165f2: c9 leave 1165f3: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 1165f4: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 1165f7: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 1165fa: 39 c6 cmp %eax,%esi 1165fc: 72 3a jb 116638 1165fe: 8d 14 10 lea (%eax,%edx,1),%edx 116601: 39 d6 cmp %edx,%esi 116603: 77 33 ja 116638 return ( 116605: 89 f2 mov %esi,%edx 116607: 29 c2 sub %eax,%edx 116609: 89 d0 mov %edx,%eax 11660b: 31 d2 xor %edx,%edx 11660d: f7 73 18 divl 0x18(%ebx) 116610: 85 d2 test %edx,%edx 116612: 75 24 jne 116638 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116614: 83 ec 08 sub $0x8,%esp 116617: 56 push %esi 116618: 8d 43 24 lea 0x24(%ebx),%eax 11661b: 50 push %eax 11661c: e8 d3 2d 00 00 call 1193f4 <_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; 116621: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116624: e8 53 4f 00 00 call 11b57c <_Thread_Enable_dispatch> 116629: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11662b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11662e: 8d 65 f8 lea -0x8(%ebp),%esp 116631: 5b pop %ebx 116632: 5e pop %esi 116633: c9 leave 116634: c3 ret 116635: 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(); 116638: e8 3f 4f 00 00 call 11b57c <_Thread_Enable_dispatch> 11663d: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116642: 8d 65 f8 lea -0x8(%ebp),%esp 116645: 5b pop %ebx 116646: 5e pop %esi 116647: c9 leave 116648: c3 ret 001159e8 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 1159e8: 55 push %ebp 1159e9: 89 e5 mov %esp,%ebp 1159eb: 57 push %edi 1159ec: 56 push %esi 1159ed: 53 push %ebx 1159ee: 83 ec 1c sub $0x1c,%esp 1159f1: 8b 5d 08 mov 0x8(%ebp),%ebx 1159f4: 8b 55 0c mov 0xc(%ebp),%edx 1159f7: 8b 7d 10 mov 0x10(%ebp),%edi 1159fa: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1159fd: 85 db test %ebx,%ebx 1159ff: 74 1b je 115a1c return RTEMS_INVALID_NAME; if ( !id ) 115a01: 85 f6 test %esi,%esi 115a03: 74 08 je 115a0d return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115a05: 89 f8 mov %edi,%eax 115a07: 09 d0 or %edx,%eax 115a09: a8 03 test $0x3,%al 115a0b: 74 1f je 115a2c (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 115a0d: b8 09 00 00 00 mov $0x9,%eax } 115a12: 8d 65 f4 lea -0xc(%ebp),%esp 115a15: 5b pop %ebx 115a16: 5e pop %esi 115a17: 5f pop %edi 115a18: c9 leave 115a19: c3 ret 115a1a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115a1c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115a21: 8d 65 f4 lea -0xc(%ebp),%esp 115a24: 5b pop %ebx 115a25: 5e pop %esi 115a26: 5f pop %edi 115a27: c9 leave 115a28: c3 ret 115a29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115a2c: a1 f8 1c 14 00 mov 0x141cf8,%eax 115a31: 40 inc %eax 115a32: a3 f8 1c 14 00 mov %eax,0x141cf8 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 115a37: 83 ec 0c sub $0xc,%esp 115a3a: 68 40 1b 14 00 push $0x141b40 115a3f: 89 55 e4 mov %edx,-0x1c(%ebp) 115a42: e8 65 4d 00 00 call 11a7ac <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115a47: 83 c4 10 add $0x10,%esp 115a4a: 85 c0 test %eax,%eax 115a4c: 8b 55 e4 mov -0x1c(%ebp),%edx 115a4f: 74 33 je 115a84 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115a51: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115a54: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115a57: 8b 55 14 mov 0x14(%ebp),%edx 115a5a: 4a dec %edx 115a5b: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115a5e: 8b 50 08 mov 0x8(%eax),%edx 115a61: 0f b7 fa movzwl %dx,%edi 115a64: 8b 0d 5c 1b 14 00 mov 0x141b5c,%ecx 115a6a: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115a6d: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115a70: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115a72: e8 05 5b 00 00 call 11b57c <_Thread_Enable_dispatch> 115a77: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 115a79: 8d 65 f4 lea -0xc(%ebp),%esp 115a7c: 5b pop %ebx 115a7d: 5e pop %esi 115a7e: 5f pop %edi 115a7f: c9 leave 115a80: c3 ret 115a81: 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(); 115a84: e8 f3 5a 00 00 call 11b57c <_Thread_Enable_dispatch> 115a89: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 115a8e: eb 82 jmp 115a12 00115a90 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115a90: 55 push %ebp 115a91: 89 e5 mov %esp,%ebp 115a93: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 115a96: 8d 45 f4 lea -0xc(%ebp),%eax 115a99: 50 push %eax 115a9a: ff 75 08 pushl 0x8(%ebp) 115a9d: 68 40 1b 14 00 push $0x141b40 115aa2: e8 f1 51 00 00 call 11ac98 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115aa7: 83 c4 10 add $0x10,%esp 115aaa: 8b 4d f4 mov -0xc(%ebp),%ecx 115aad: 85 c9 test %ecx,%ecx 115aaf: 75 2f jne 115ae0 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115ab1: 83 ec 08 sub $0x8,%esp 115ab4: 50 push %eax 115ab5: 68 40 1b 14 00 push $0x141b40 115aba: 89 45 e4 mov %eax,-0x1c(%ebp) 115abd: e8 66 4d 00 00 call 11a828 <_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 ); 115ac2: 58 pop %eax 115ac3: 5a pop %edx 115ac4: 8b 45 e4 mov -0x1c(%ebp),%eax 115ac7: 50 push %eax 115ac8: 68 40 1b 14 00 push $0x141b40 115acd: e8 5a 50 00 00 call 11ab2c <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115ad2: e8 a5 5a 00 00 call 11b57c <_Thread_Enable_dispatch> 115ad7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115ad9: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115adc: c9 leave 115add: c3 ret 115ade: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115ae0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115ae5: c9 leave 115ae6: c3 ret 00115ae8 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115ae8: 55 push %ebp 115ae9: 89 e5 mov %esp,%ebp 115aeb: 56 push %esi 115aec: 53 push %ebx 115aed: 83 ec 10 sub $0x10,%esp 115af0: 8b 75 0c mov 0xc(%ebp),%esi 115af3: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115af6: 85 db test %ebx,%ebx 115af8: 74 4e je 115b48 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 115afa: 51 push %ecx 115afb: 8d 45 f4 lea -0xc(%ebp),%eax 115afe: 50 push %eax 115aff: ff 75 08 pushl 0x8(%ebp) 115b02: 68 40 1b 14 00 push $0x141b40 115b07: e8 8c 51 00 00 call 11ac98 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115b0c: 83 c4 10 add $0x10,%esp 115b0f: 8b 55 f4 mov -0xc(%ebp),%edx 115b12: 85 d2 test %edx,%edx 115b14: 74 0e je 115b24 115b16: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b1b: 8d 65 f8 lea -0x8(%ebp),%esp 115b1e: 5b pop %ebx 115b1f: 5e pop %esi 115b20: c9 leave 115b21: c3 ret 115b22: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 115b24: 89 f2 mov %esi,%edx 115b26: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 115b29: 3b 50 18 cmp 0x18(%eax),%edx 115b2c: 77 16 ja 115b44 *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 115b2e: 03 50 10 add 0x10(%eax),%edx 115b31: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 115b33: e8 44 5a 00 00 call 11b57c <_Thread_Enable_dispatch> 115b38: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b3a: 8d 65 f8 lea -0x8(%ebp),%esp 115b3d: 5b pop %ebx 115b3e: 5e pop %esi 115b3f: c9 leave 115b40: c3 ret 115b41: 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; 115b44: 89 33 mov %esi,(%ebx) 115b46: eb eb jmp 115b33 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115b48: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b4d: 8d 65 f8 lea -0x8(%ebp),%esp 115b50: 5b pop %ebx 115b51: 5e pop %esi 115b52: c9 leave 115b53: c3 ret 00115b78 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115b78: 55 push %ebp 115b79: 89 e5 mov %esp,%ebp 115b7b: 56 push %esi 115b7c: 53 push %ebx 115b7d: 83 ec 10 sub $0x10,%esp 115b80: 8b 75 0c mov 0xc(%ebp),%esi 115b83: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115b86: 85 db test %ebx,%ebx 115b88: 74 4e je 115bd8 115b8a: 51 push %ecx 115b8b: 8d 45 f4 lea -0xc(%ebp),%eax 115b8e: 50 push %eax 115b8f: ff 75 08 pushl 0x8(%ebp) 115b92: 68 40 1b 14 00 push $0x141b40 115b97: e8 fc 50 00 00 call 11ac98 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115b9c: 83 c4 10 add $0x10,%esp 115b9f: 8b 55 f4 mov -0xc(%ebp),%edx 115ba2: 85 d2 test %edx,%edx 115ba4: 74 0e je 115bb4 115ba6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115bab: 8d 65 f8 lea -0x8(%ebp),%esp 115bae: 5b pop %ebx 115baf: 5e pop %esi 115bb0: c9 leave 115bb1: c3 ret 115bb2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 115bb4: 89 f2 mov %esi,%edx 115bb6: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 115bb9: 3b 50 18 cmp 0x18(%eax),%edx 115bbc: 77 16 ja 115bd4 *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 115bbe: 03 50 14 add 0x14(%eax),%edx 115bc1: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 115bc3: e8 b4 59 00 00 call 11b57c <_Thread_Enable_dispatch> 115bc8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115bca: 8d 65 f8 lea -0x8(%ebp),%esp 115bcd: 5b pop %ebx 115bce: 5e pop %esi 115bcf: c9 leave 115bd0: c3 ret 115bd1: 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; 115bd4: 89 33 mov %esi,(%ebx) 115bd6: eb eb jmp 115bc3 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115bd8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115bdd: 8d 65 f8 lea -0x8(%ebp),%esp 115be0: 5b pop %ebx 115be1: 5e pop %esi 115be2: c9 leave 115be3: c3 ret 0011664c : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 11664c: 55 push %ebp 11664d: 89 e5 mov %esp,%ebp 11664f: 53 push %ebx 116650: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 116653: 8d 45 f4 lea -0xc(%ebp),%eax 116656: 50 push %eax 116657: ff 75 08 pushl 0x8(%ebp) 11665a: 68 c0 1b 14 00 push $0x141bc0 11665f: e8 34 46 00 00 call 11ac98 <_Objects_Get> 116664: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 116666: 83 c4 10 add $0x10,%esp 116669: 8b 45 f4 mov -0xc(%ebp),%eax 11666c: 85 c0 test %eax,%eax 11666e: 74 0c je 11667c 116670: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116675: 8b 5d fc mov -0x4(%ebp),%ebx 116678: c9 leave 116679: c3 ret 11667a: 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 ) ) { 11667c: 8b 43 40 mov 0x40(%ebx),%eax 11667f: 3b 05 b8 1d 14 00 cmp 0x141db8,%eax 116685: 74 11 je 116698 _Thread_Enable_dispatch(); 116687: e8 f0 4e 00 00 call 11b57c <_Thread_Enable_dispatch> 11668c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116691: 8b 5d fc mov -0x4(%ebp),%ebx 116694: c9 leave 116695: c3 ret 116696: 66 90 xchg %ax,%ax <== 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 ); 116698: 83 ec 0c sub $0xc,%esp 11669b: 8d 43 10 lea 0x10(%ebx),%eax 11669e: 50 push %eax 11669f: e8 1c 63 00 00 call 11c9c0 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1166a4: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1166ab: e8 cc 4e 00 00 call 11b57c <_Thread_Enable_dispatch> 1166b0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1166b2: 83 c4 10 add $0x10,%esp 1166b5: eb be jmp 116675 0010c1e8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c1e8: 55 push %ebp 10c1e9: 89 e5 mov %esp,%ebp 10c1eb: 57 push %edi 10c1ec: 56 push %esi 10c1ed: 53 push %ebx 10c1ee: 83 ec 1c sub $0x1c,%esp 10c1f1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1f4: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c1f7: 85 db test %ebx,%ebx 10c1f9: 0f 84 a9 00 00 00 je 10c2a8 return RTEMS_INVALID_NAME; if ( !id ) 10c1ff: 85 f6 test %esi,%esi 10c201: 0f 84 c5 00 00 00 je 10c2cc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c207: a1 98 a5 12 00 mov 0x12a598,%eax 10c20c: 40 inc %eax 10c20d: a3 98 a5 12 00 mov %eax,0x12a598 * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 10c212: 83 ec 0c sub $0xc,%esp 10c215: 68 a0 a4 12 00 push $0x12a4a0 10c21a: e8 51 1e 00 00 call 10e070 <_Objects_Allocate> 10c21f: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c221: 83 c4 10 add $0x10,%esp 10c224: 85 c0 test %eax,%eax 10c226: 0f 84 8c 00 00 00 je 10c2b8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c22c: a1 58 a6 12 00 mov 0x12a658,%eax 10c231: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c234: 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; 10c23b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c242: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c249: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c250: 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 ); 10c257: 8d 42 54 lea 0x54(%edx),%eax 10c25a: 89 45 e4 mov %eax,-0x1c(%ebp) 10c25d: b9 38 00 00 00 mov $0x38,%ecx 10c262: 31 c0 xor %eax,%eax 10c264: 8b 7d e4 mov -0x1c(%ebp),%edi 10c267: f3 aa rep stos %al,%es:(%edi) 10c269: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c270: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c277: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c27e: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c285: 8b 42 08 mov 0x8(%edx),%eax 10c288: 0f b7 f8 movzwl %ax,%edi 10c28b: 8b 0d bc a4 12 00 mov 0x12a4bc,%ecx 10c291: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c294: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c297: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c299: e8 da 2b 00 00 call 10ee78 <_Thread_Enable_dispatch> 10c29e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c2a0: 8d 65 f4 lea -0xc(%ebp),%esp 10c2a3: 5b pop %ebx 10c2a4: 5e pop %esi 10c2a5: 5f pop %edi 10c2a6: c9 leave 10c2a7: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c2a8: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c2ad: 8d 65 f4 lea -0xc(%ebp),%esp 10c2b0: 5b pop %ebx 10c2b1: 5e pop %esi 10c2b2: 5f pop %edi 10c2b3: c9 leave 10c2b4: c3 ret 10c2b5: 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(); 10c2b8: e8 bb 2b 00 00 call 10ee78 <_Thread_Enable_dispatch> 10c2bd: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c2c2: 8d 65 f4 lea -0xc(%ebp),%esp 10c2c5: 5b pop %ebx 10c2c6: 5e pop %esi 10c2c7: 5f pop %edi 10c2c8: c9 leave 10c2c9: c3 ret 10c2ca: 66 90 xchg %ax,%ax <== NOT EXECUTED Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10c2cc: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c2d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c2d4: 5b pop %ebx 10c2d5: 5e pop %esi 10c2d6: 5f pop %edi 10c2d7: c9 leave 10c2d8: c3 ret 0013d830 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 13d830: 55 push %ebp 13d831: 89 e5 mov %esp,%ebp 13d833: 53 push %ebx 13d834: 83 ec 24 sub $0x24,%esp 13d837: 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 ) 13d83a: 85 db test %ebx,%ebx 13d83c: 0f 84 92 00 00 00 je 13d8d4 13d842: 50 push %eax 13d843: 8d 45 f4 lea -0xc(%ebp),%eax 13d846: 50 push %eax 13d847: ff 75 08 pushl 0x8(%ebp) 13d84a: 68 a0 fb 16 00 push $0x16fba0 13d84f: e8 a0 57 fd ff call 112ff4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13d854: 83 c4 10 add $0x10,%esp 13d857: 8b 4d f4 mov -0xc(%ebp),%ecx 13d85a: 85 c9 test %ecx,%ecx 13d85c: 74 0a je 13d868 13d85e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d863: 8b 5d fc mov -0x4(%ebp),%ebx 13d866: c9 leave 13d867: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 13d868: 8b 50 40 mov 0x40(%eax),%edx 13d86b: 8b 52 08 mov 0x8(%edx),%edx 13d86e: 89 13 mov %edx,(%ebx) status->state = the_period->state; 13d870: 8b 50 38 mov 0x38(%eax),%edx 13d873: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 13d876: 85 d2 test %edx,%edx 13d878: 75 2a jne 13d8a4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 13d87a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 13d881: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 13d888: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 13d88f: 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(); 13d896: e8 7d 60 fd ff call 113918 <_Thread_Enable_dispatch> 13d89b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d89d: 8b 5d fc mov -0x4(%ebp),%ebx 13d8a0: c9 leave 13d8a1: c3 ret 13d8a2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 13d8a4: 52 push %edx 13d8a5: 8d 55 ec lea -0x14(%ebp),%edx 13d8a8: 52 push %edx 13d8a9: 8d 55 e4 lea -0x1c(%ebp),%edx 13d8ac: 52 push %edx 13d8ad: 50 push %eax 13d8ae: e8 b1 00 00 00 call 13d964 <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 13d8b3: 83 c4 10 add $0x10,%esp 13d8b6: 84 c0 test %al,%al 13d8b8: 74 26 je 13d8e0 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 13d8ba: 8b 45 e4 mov -0x1c(%ebp),%eax 13d8bd: 8b 55 e8 mov -0x18(%ebp),%edx 13d8c0: 89 43 08 mov %eax,0x8(%ebx) 13d8c3: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 13d8c6: 8b 45 ec mov -0x14(%ebp),%eax 13d8c9: 8b 55 f0 mov -0x10(%ebp),%edx 13d8cc: 89 43 10 mov %eax,0x10(%ebx) 13d8cf: 89 53 14 mov %edx,0x14(%ebx) 13d8d2: eb c2 jmp 13d896 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 13d8d4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d8d9: 8b 5d fc mov -0x4(%ebp),%ebx 13d8dc: c9 leave 13d8dd: c3 ret 13d8de: 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(); 13d8e0: e8 33 60 fd ff call 113918 <_Thread_Enable_dispatch> 13d8e5: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 13d8ea: e9 74 ff ff ff jmp 13d863 0013daec : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 13daec: 55 push %ebp 13daed: 89 e5 mov %esp,%ebp 13daef: 57 push %edi 13daf0: 56 push %esi 13daf1: 53 push %ebx 13daf2: 83 ec 30 sub $0x30,%esp 13daf5: 8b 5d 08 mov 0x8(%ebp),%ebx 13daf8: 8b 75 0c mov 0xc(%ebp),%esi 13dafb: 8d 45 e4 lea -0x1c(%ebp),%eax 13dafe: 50 push %eax 13daff: 53 push %ebx 13db00: 68 a0 fb 16 00 push $0x16fba0 13db05: e8 ea 54 fd ff call 112ff4 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13db0a: 83 c4 10 add $0x10,%esp 13db0d: 8b 7d e4 mov -0x1c(%ebp),%edi 13db10: 85 ff test %edi,%edi 13db12: 74 10 je 13db24 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 13db14: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13db19: 8d 65 f4 lea -0xc(%ebp),%esp 13db1c: 5b pop %ebx 13db1d: 5e pop %esi 13db1e: 5f pop %edi 13db1f: c9 leave 13db20: c3 ret 13db21: 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 ) ) { 13db24: 8b 50 40 mov 0x40(%eax),%edx 13db27: 3b 15 b8 ef 16 00 cmp 0x16efb8,%edx 13db2d: 74 15 je 13db44 _Thread_Enable_dispatch(); 13db2f: e8 e4 5d fd ff call 113918 <_Thread_Enable_dispatch> 13db34: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13db39: 8d 65 f4 lea -0xc(%ebp),%esp 13db3c: 5b pop %ebx 13db3d: 5e pop %esi 13db3e: 5f pop %edi 13db3f: c9 leave 13db40: c3 ret 13db41: 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 ) { 13db44: 85 f6 test %esi,%esi 13db46: 0f 84 b0 00 00 00 je 13dbfc } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 13db4c: 9c pushf 13db4d: fa cli 13db4e: 5f pop %edi switch ( the_period->state ) { 13db4f: 8b 50 38 mov 0x38(%eax),%edx 13db52: 83 fa 02 cmp $0x2,%edx 13db55: 0f 84 bd 00 00 00 je 13dc18 13db5b: 83 fa 04 cmp $0x4,%edx 13db5e: 74 5c je 13dbbc 13db60: 85 d2 test %edx,%edx 13db62: 75 b0 jne 13db14 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13db64: 57 push %edi 13db65: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13db66: 83 ec 0c sub $0xc,%esp 13db69: 50 push %eax 13db6a: 89 45 d4 mov %eax,-0x2c(%ebp) 13db6d: e8 7e fd ff ff call 13d8f0 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 13db72: 8b 45 d4 mov -0x2c(%ebp),%eax 13db75: 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; 13db7c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 13db83: c7 40 2c 9c dc 13 00 movl $0x13dc9c,0x2c(%eax) the_watchdog->id = id; 13db8a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 13db8d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 13db94: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13db97: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13db9a: 5a pop %edx 13db9b: 59 pop %ecx 13db9c: 83 c0 10 add $0x10,%eax 13db9f: 50 push %eax 13dba0: 68 d8 ef 16 00 push $0x16efd8 13dba5: e8 ba 6c fd ff call 114864 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13dbaa: e8 69 5d fd ff call 113918 <_Thread_Enable_dispatch> 13dbaf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13dbb1: 83 c4 10 add $0x10,%esp 13dbb4: e9 60 ff ff ff jmp 13db19 13dbb9: 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 ); 13dbbc: 83 ec 0c sub $0xc,%esp 13dbbf: 50 push %eax 13dbc0: 89 45 d4 mov %eax,-0x2c(%ebp) 13dbc3: e8 34 fe ff ff call 13d9fc <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 13dbc8: 57 push %edi 13dbc9: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13dbca: 8b 45 d4 mov -0x2c(%ebp),%eax 13dbcd: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 13dbd4: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13dbd7: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13dbda: 59 pop %ecx 13dbdb: 5b pop %ebx 13dbdc: 83 c0 10 add $0x10,%eax 13dbdf: 50 push %eax 13dbe0: 68 d8 ef 16 00 push $0x16efd8 13dbe5: e8 7a 6c fd ff call 114864 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13dbea: e8 29 5d fd ff call 113918 <_Thread_Enable_dispatch> 13dbef: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 13dbf4: 83 c4 10 add $0x10,%esp 13dbf7: e9 1d ff ff ff jmp 13db19 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13dbfc: 8b 40 38 mov 0x38(%eax),%eax 13dbff: 83 f8 04 cmp $0x4,%eax 13dc02: 76 74 jbe 13dc78 13dc04: 31 c0 xor %eax,%eax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 13dc06: 89 45 d4 mov %eax,-0x2c(%ebp) 13dc09: e8 0a 5d fd ff call 113918 <_Thread_Enable_dispatch> return( return_value ); 13dc0e: 8b 45 d4 mov -0x2c(%ebp),%eax 13dc11: e9 03 ff ff ff jmp 13db19 13dc16: 66 90 xchg %ax,%ax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 13dc18: 83 ec 0c sub $0xc,%esp 13dc1b: 50 push %eax 13dc1c: 89 45 d4 mov %eax,-0x2c(%ebp) 13dc1f: e8 d8 fd ff ff call 13d9fc <_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; 13dc24: 8b 45 d4 mov -0x2c(%ebp),%eax 13dc27: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 13dc2e: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 13dc31: 57 push %edi 13dc32: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 13dc33: 8b 15 b8 ef 16 00 mov 0x16efb8,%edx 13dc39: 8b 48 08 mov 0x8(%eax),%ecx 13dc3c: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13dc3f: 5e pop %esi 13dc40: 5f pop %edi 13dc41: 68 00 40 00 00 push $0x4000 13dc46: 52 push %edx 13dc47: 89 45 d4 mov %eax,-0x2c(%ebp) 13dc4a: e8 8d 65 fd ff call 1141dc <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 13dc4f: 9c pushf 13dc50: fa cli 13dc51: 59 pop %ecx local_state = the_period->state; 13dc52: 8b 45 d4 mov -0x2c(%ebp),%eax 13dc55: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 13dc58: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 13dc5f: 51 push %ecx 13dc60: 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 ) 13dc61: 83 c4 10 add $0x10,%esp 13dc64: 83 fa 03 cmp $0x3,%edx 13dc67: 74 18 je 13dc81 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 13dc69: e8 aa 5c fd ff call 113918 <_Thread_Enable_dispatch> 13dc6e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13dc70: e9 a4 fe ff ff jmp 13db19 13dc75: 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 ) { 13dc78: 8b 04 85 94 3f 16 00 mov 0x163f94(,%eax,4),%eax 13dc7f: eb 85 jmp 13dc06 /* * 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 ); 13dc81: 83 ec 08 sub $0x8,%esp 13dc84: 68 00 40 00 00 push $0x4000 13dc89: ff 35 b8 ef 16 00 pushl 0x16efb8 13dc8f: e8 dc 58 fd ff call 113570 <_Thread_Clear_state> 13dc94: 83 c4 10 add $0x10,%esp 13dc97: eb d0 jmp 13dc69 0012dd0c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12dd0c: 55 push %ebp 12dd0d: 89 e5 mov %esp,%ebp 12dd0f: 57 push %edi 12dd10: 56 push %esi 12dd11: 53 push %ebx 12dd12: 83 ec 7c sub $0x7c,%esp 12dd15: 8b 7d 08 mov 0x8(%ebp),%edi 12dd18: 8b 75 0c mov 0xc(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 12dd1b: 85 f6 test %esi,%esi 12dd1d: 0f 84 bd 00 00 00 je 12dde0 return; (*print)( context, "Period information by period\n" ); 12dd23: 83 ec 08 sub $0x8,%esp 12dd26: 68 88 05 16 00 push $0x160588 12dd2b: 57 push %edi 12dd2c: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12dd2e: 59 pop %ecx 12dd2f: 5b pop %ebx 12dd30: 68 c0 05 16 00 push $0x1605c0 12dd35: 57 push %edi 12dd36: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 12dd38: 58 pop %eax 12dd39: 5a pop %edx 12dd3a: 68 e4 05 16 00 push $0x1605e4 12dd3f: 57 push %edi 12dd40: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 12dd42: 59 pop %ecx 12dd43: 5b pop %ebx 12dd44: 68 08 06 16 00 push $0x160608 12dd49: 57 push %edi 12dd4a: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12dd4c: 58 pop %eax 12dd4d: 5a pop %edx 12dd4e: 68 54 06 16 00 push $0x160654 12dd53: 57 push %edi 12dd54: ff d6 call *%esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12dd56: 8b 1d a8 fb 16 00 mov 0x16fba8,%ebx 12dd5c: 83 c4 10 add $0x10,%esp 12dd5f: 3b 1d ac fb 16 00 cmp 0x16fbac,%ebx 12dd65: 77 79 ja 12dde0 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); 12dd67: 89 75 84 mov %esi,-0x7c(%ebp) 12dd6a: eb 09 jmp 12dd75 * 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++ ) { 12dd6c: 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 ; 12dd6d: 39 1d ac fb 16 00 cmp %ebx,0x16fbac 12dd73: 72 6b jb 12dde0 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 12dd75: 83 ec 08 sub $0x8,%esp 12dd78: 8d 45 88 lea -0x78(%ebp),%eax 12dd7b: 50 push %eax 12dd7c: 53 push %ebx 12dd7d: e8 02 fa 00 00 call 13d784 if ( status != RTEMS_SUCCESSFUL ) 12dd82: 83 c4 10 add $0x10,%esp 12dd85: 85 c0 test %eax,%eax 12dd87: 75 e3 jne 12dd6c continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 12dd89: 83 ec 08 sub $0x8,%esp 12dd8c: 8d 55 c0 lea -0x40(%ebp),%edx 12dd8f: 52 push %edx 12dd90: 53 push %ebx 12dd91: e8 9a fa 00 00 call 13d830 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 12dd96: 83 c4 0c add $0xc,%esp 12dd99: 8d 45 e3 lea -0x1d(%ebp),%eax 12dd9c: 50 push %eax 12dd9d: 6a 05 push $0x5 12dd9f: ff 75 c0 pushl -0x40(%ebp) 12dda2: e8 01 35 fe ff call 1112a8 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 12dda7: 59 pop %ecx 12dda8: 5e pop %esi 12dda9: ff 75 8c pushl -0x74(%ebp) 12ddac: ff 75 88 pushl -0x78(%ebp) 12ddaf: 8d 55 e3 lea -0x1d(%ebp),%edx 12ddb2: 52 push %edx 12ddb3: 53 push %ebx 12ddb4: 68 a6 05 16 00 push $0x1605a6 12ddb9: 57 push %edi 12ddba: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 12ddbd: 8b 45 88 mov -0x78(%ebp),%eax 12ddc0: 83 c4 20 add $0x20,%esp 12ddc3: 85 c0 test %eax,%eax 12ddc5: 75 21 jne 12dde8 (*print)( context, "\n" ); 12ddc7: 83 ec 08 sub $0x8,%esp 12ddca: 68 81 23 16 00 push $0x162381 12ddcf: 57 push %edi 12ddd0: ff 55 84 call *-0x7c(%ebp) continue; 12ddd3: 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++ ) { 12ddd6: 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 ; 12ddd7: 39 1d ac fb 16 00 cmp %ebx,0x16fbac 12dddd: 73 96 jae 12dd75 12dddf: 90 nop <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12dde0: 8d 65 f4 lea -0xc(%ebp),%esp 12dde3: 5b pop %ebx 12dde4: 5e pop %esi 12dde5: 5f pop %edi 12dde6: c9 leave 12dde7: 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 ); 12dde8: 52 push %edx 12dde9: 8d 55 d8 lea -0x28(%ebp),%edx 12ddec: 52 push %edx 12dded: 50 push %eax 12ddee: 8d 45 a0 lea -0x60(%ebp),%eax 12ddf1: 50 push %eax 12ddf2: e8 0d 17 00 00 call 12f504 <_Timespec_Divide_by_integer> (*print)( context, 12ddf7: 8b 4d dc mov -0x24(%ebp),%ecx 12ddfa: be d3 4d 62 10 mov $0x10624dd3,%esi 12ddff: 89 c8 mov %ecx,%eax 12de01: f7 ee imul %esi 12de03: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12de09: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12de0f: c1 f8 06 sar $0x6,%eax 12de12: c1 f9 1f sar $0x1f,%ecx 12de15: 29 c8 sub %ecx,%eax 12de17: 50 push %eax 12de18: ff 75 d8 pushl -0x28(%ebp) 12de1b: 8b 4d 9c mov -0x64(%ebp),%ecx 12de1e: 89 c8 mov %ecx,%eax 12de20: f7 ee imul %esi 12de22: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12de28: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12de2e: c1 f8 06 sar $0x6,%eax 12de31: c1 f9 1f sar $0x1f,%ecx 12de34: 29 c8 sub %ecx,%eax 12de36: 50 push %eax 12de37: ff 75 98 pushl -0x68(%ebp) 12de3a: 8b 4d 94 mov -0x6c(%ebp),%ecx 12de3d: 89 c8 mov %ecx,%eax 12de3f: f7 ee imul %esi 12de41: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12de47: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12de4d: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12de53: c1 f8 06 sar $0x6,%eax 12de56: c1 f9 1f sar $0x1f,%ecx 12de59: 29 c8 sub %ecx,%eax 12de5b: 50 push %eax 12de5c: ff 75 90 pushl -0x70(%ebp) 12de5f: 68 a0 06 16 00 push $0x1606a0 12de64: 57 push %edi 12de65: ff 55 84 call *-0x7c(%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); 12de68: 83 c4 2c add $0x2c,%esp 12de6b: 8d 55 d8 lea -0x28(%ebp),%edx 12de6e: 52 push %edx 12de6f: ff 75 88 pushl -0x78(%ebp) 12de72: 8d 45 b8 lea -0x48(%ebp),%eax 12de75: 50 push %eax 12de76: e8 89 16 00 00 call 12f504 <_Timespec_Divide_by_integer> (*print)( context, 12de7b: 8b 4d dc mov -0x24(%ebp),%ecx 12de7e: 89 c8 mov %ecx,%eax 12de80: f7 ee imul %esi 12de82: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12de88: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12de8e: c1 f8 06 sar $0x6,%eax 12de91: c1 f9 1f sar $0x1f,%ecx 12de94: 29 c8 sub %ecx,%eax 12de96: 50 push %eax 12de97: ff 75 d8 pushl -0x28(%ebp) 12de9a: 8b 4d b4 mov -0x4c(%ebp),%ecx 12de9d: 89 c8 mov %ecx,%eax 12de9f: f7 ee imul %esi 12dea1: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dea7: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dead: c1 f8 06 sar $0x6,%eax 12deb0: c1 f9 1f sar $0x1f,%ecx 12deb3: 29 c8 sub %ecx,%eax 12deb5: 50 push %eax 12deb6: ff 75 b0 pushl -0x50(%ebp) 12deb9: 8b 4d ac mov -0x54(%ebp),%ecx 12debc: 89 c8 mov %ecx,%eax 12debe: f7 ee imul %esi 12dec0: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12dec6: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12decc: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 12ded2: c1 fe 06 sar $0x6,%esi 12ded5: 89 c8 mov %ecx,%eax 12ded7: 99 cltd 12ded8: 29 d6 sub %edx,%esi 12deda: 56 push %esi 12dedb: ff 75 a8 pushl -0x58(%ebp) 12dede: 68 c0 06 16 00 push $0x1606c0 12dee3: 57 push %edi 12dee4: ff 55 84 call *-0x7c(%ebp) 12dee7: 83 c4 30 add $0x30,%esp 12deea: e9 7d fe ff ff jmp 12dd6c 0012df48 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 12df48: 55 push %ebp 12df49: 89 e5 mov %esp,%ebp 12df4b: 57 push %edi 12df4c: 53 push %ebx 12df4d: 83 ec 14 sub $0x14,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 12df50: 8d 45 f4 lea -0xc(%ebp),%eax 12df53: 50 push %eax 12df54: ff 75 08 pushl 0x8(%ebp) 12df57: 68 a0 fb 16 00 push $0x16fba0 12df5c: e8 93 50 fe ff call 112ff4 <_Objects_Get> 12df61: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12df63: 83 c4 10 add $0x10,%esp 12df66: 8b 45 f4 mov -0xc(%ebp),%eax 12df69: 85 c0 test %eax,%eax 12df6b: 75 3b jne 12dfa8 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 12df6d: 8d 5a 54 lea 0x54(%edx),%ebx 12df70: b9 38 00 00 00 mov $0x38,%ecx 12df75: 31 c0 xor %eax,%eax 12df77: 89 df mov %ebx,%edi 12df79: f3 aa rep stos %al,%es:(%edi) 12df7b: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 12df82: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 12df89: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 12df90: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 12df97: e8 7c 59 fe ff call 113918 <_Thread_Enable_dispatch> 12df9c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12df9e: 8d 65 f8 lea -0x8(%ebp),%esp 12dfa1: 5b pop %ebx 12dfa2: 5f pop %edi 12dfa3: c9 leave 12dfa4: c3 ret 12dfa5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12dfa8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12dfad: 8d 65 f8 lea -0x8(%ebp),%esp 12dfb0: 5b pop %ebx 12dfb1: 5f pop %edi 12dfb2: c9 leave 12dfb3: c3 ret 00116df0 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 116df0: 55 push %ebp 116df1: 89 e5 mov %esp,%ebp 116df3: 57 push %edi 116df4: 56 push %esi 116df5: 53 push %ebx 116df6: 83 ec 1c sub $0x1c,%esp 116df9: 8b 75 08 mov 0x8(%ebp),%esi 116dfc: 8b 5d 0c mov 0xc(%ebp),%ebx 116dff: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116e02: 85 f6 test %esi,%esi 116e04: 0f 84 92 00 00 00 je 116e9c return RTEMS_INVALID_NAME; if ( !starting_address ) 116e0a: 85 db test %ebx,%ebx 116e0c: 74 09 je 116e17 return RTEMS_INVALID_ADDRESS; if ( !id ) 116e0e: 85 ff test %edi,%edi 116e10: 74 05 je 116e17 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 116e12: f6 c3 03 test $0x3,%bl 116e15: 74 0d je 116e24 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 116e17: b8 09 00 00 00 mov $0x9,%eax } 116e1c: 8d 65 f4 lea -0xc(%ebp),%esp 116e1f: 5b pop %ebx 116e20: 5e pop %esi 116e21: 5f pop %edi 116e22: c9 leave 116e23: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116e24: 83 ec 0c sub $0xc,%esp 116e27: ff 35 b0 1d 14 00 pushl 0x141db0 116e2d: e8 4a 25 00 00 call 11937c <_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 ); 116e32: c7 04 24 00 1c 14 00 movl $0x141c00,(%esp) 116e39: e8 6e 39 00 00 call 11a7ac <_Objects_Allocate> 116e3e: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 116e40: 83 c4 10 add $0x10,%esp 116e43: 85 c0 test %eax,%eax 116e45: 74 65 je 116eac return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 116e47: ff 75 14 pushl 0x14(%ebp) 116e4a: ff 75 10 pushl 0x10(%ebp) 116e4d: 53 push %ebx 116e4e: 8d 40 68 lea 0x68(%eax),%eax 116e51: 50 push %eax 116e52: 89 55 e4 mov %edx,-0x1c(%ebp) 116e55: e8 36 34 00 00 call 11a290 <_Heap_Initialize> 116e5a: 8b 55 e4 mov -0x1c(%ebp),%edx 116e5d: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 116e60: 83 c4 10 add $0x10,%esp 116e63: 85 c0 test %eax,%eax 116e65: 75 4d jne 116eb4 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 116e67: 83 ec 08 sub $0x8,%esp 116e6a: 52 push %edx 116e6b: 68 00 1c 14 00 push $0x141c00 116e70: e8 b7 3c 00 00 call 11ab2c <_Objects_Free> 116e75: b8 08 00 00 00 mov $0x8,%eax 116e7a: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 116e7d: 83 ec 0c sub $0xc,%esp 116e80: ff 35 b0 1d 14 00 pushl 0x141db0 116e86: 89 45 e4 mov %eax,-0x1c(%ebp) 116e89: e8 36 25 00 00 call 1193c4 <_API_Mutex_Unlock> return return_status; 116e8e: 83 c4 10 add $0x10,%esp 116e91: 8b 45 e4 mov -0x1c(%ebp),%eax } 116e94: 8d 65 f4 lea -0xc(%ebp),%esp 116e97: 5b pop %ebx 116e98: 5e pop %esi 116e99: 5f pop %edi 116e9a: c9 leave 116e9b: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116e9c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 116ea1: 8d 65 f4 lea -0xc(%ebp),%esp 116ea4: 5b pop %ebx 116ea5: 5e pop %esi 116ea6: 5f pop %edi 116ea7: c9 leave 116ea8: c3 ret 116ea9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 116eac: b8 05 00 00 00 mov $0x5,%eax 116eb1: eb ca jmp 116e7d 116eb3: 90 nop <== NOT EXECUTED return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 116eb4: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 116eb7: 8b 45 10 mov 0x10(%ebp),%eax 116eba: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 116ebd: 8b 45 14 mov 0x14(%ebp),%eax 116ec0: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 116ec3: 8b 45 18 mov 0x18(%ebp),%eax 116ec6: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 116ec9: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 116ed0: 6a 06 push $0x6 116ed2: 6a 40 push $0x40 116ed4: 8b 45 18 mov 0x18(%ebp),%eax 116ed7: c1 e8 02 shr $0x2,%eax 116eda: 83 e0 01 and $0x1,%eax 116edd: 50 push %eax 116ede: 8d 42 10 lea 0x10(%edx),%eax 116ee1: 50 push %eax 116ee2: 89 55 e4 mov %edx,-0x1c(%ebp) 116ee5: e8 2e 4e 00 00 call 11bd18 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116eea: 8b 55 e4 mov -0x1c(%ebp),%edx 116eed: 8b 42 08 mov 0x8(%edx),%eax 116ef0: 0f b7 d8 movzwl %ax,%ebx 116ef3: 8b 0d 1c 1c 14 00 mov 0x141c1c,%ecx 116ef9: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116efc: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 116eff: 89 07 mov %eax,(%edi) 116f01: 31 c0 xor %eax,%eax 116f03: 83 c4 10 add $0x10,%esp 116f06: e9 72 ff ff ff jmp 116e7d 00116f0c : */ rtems_status_code rtems_region_delete( rtems_id id ) { 116f0c: 55 push %ebp 116f0d: 89 e5 mov %esp,%ebp 116f0f: 53 push %ebx 116f10: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 116f13: ff 35 b0 1d 14 00 pushl 0x141db0 116f19: e8 5e 24 00 00 call 11937c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 116f1e: 83 c4 0c add $0xc,%esp 116f21: 8d 45 f4 lea -0xc(%ebp),%eax 116f24: 50 push %eax 116f25: ff 75 08 pushl 0x8(%ebp) 116f28: 68 00 1c 14 00 push $0x141c00 116f2d: e8 2a 3d 00 00 call 11ac5c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 116f32: 83 c4 10 add $0x10,%esp 116f35: 8b 5d f4 mov -0xc(%ebp),%ebx 116f38: 85 db test %ebx,%ebx 116f3a: 74 1c je 116f58 116f3c: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116f41: 83 ec 0c sub $0xc,%esp 116f44: ff 35 b0 1d 14 00 pushl 0x141db0 116f4a: e8 75 24 00 00 call 1193c4 <_API_Mutex_Unlock> return return_status; } 116f4f: 89 d8 mov %ebx,%eax 116f51: 8b 5d fc mov -0x4(%ebp),%ebx 116f54: c9 leave 116f55: c3 ret 116f56: 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 ) 116f58: 8b 48 64 mov 0x64(%eax),%ecx 116f5b: 85 c9 test %ecx,%ecx 116f5d: 74 09 je 116f68 116f5f: bb 0c 00 00 00 mov $0xc,%ebx 116f64: eb db jmp 116f41 116f66: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 116f68: 83 ec 08 sub $0x8,%esp 116f6b: 50 push %eax 116f6c: 68 00 1c 14 00 push $0x141c00 116f71: 89 45 e4 mov %eax,-0x1c(%ebp) 116f74: e8 af 38 00 00 call 11a828 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 116f79: 58 pop %eax 116f7a: 5a pop %edx 116f7b: 8b 45 e4 mov -0x1c(%ebp),%eax 116f7e: 50 push %eax 116f7f: 68 00 1c 14 00 push $0x141c00 116f84: e8 a3 3b 00 00 call 11ab2c <_Objects_Free> 116f89: 31 db xor %ebx,%ebx 116f8b: 83 c4 10 add $0x10,%esp 116f8e: eb b1 jmp 116f41 00116f90 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 116f90: 55 push %ebp 116f91: 89 e5 mov %esp,%ebp 116f93: 56 push %esi 116f94: 53 push %ebx 116f95: 83 ec 10 sub $0x10,%esp 116f98: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 116f9b: 85 db test %ebx,%ebx 116f9d: 74 71 je 117010 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116f9f: 83 ec 0c sub $0xc,%esp 116fa2: ff 35 b0 1d 14 00 pushl 0x141db0 116fa8: e8 cf 23 00 00 call 11937c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 116fad: 83 c4 0c add $0xc,%esp 116fb0: 8d 45 f0 lea -0x10(%ebp),%eax 116fb3: 50 push %eax 116fb4: ff 75 08 pushl 0x8(%ebp) 116fb7: 68 00 1c 14 00 push $0x141c00 116fbc: e8 9b 3c 00 00 call 11ac5c <_Objects_Get_no_protection> 116fc1: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 116fc3: 83 c4 10 add $0x10,%esp 116fc6: 8b 45 f0 mov -0x10(%ebp),%eax 116fc9: 85 c0 test %eax,%eax 116fcb: 74 1f je 116fec 116fcd: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116fd2: 83 ec 0c sub $0xc,%esp 116fd5: ff 35 b0 1d 14 00 pushl 0x141db0 116fdb: e8 e4 23 00 00 call 1193c4 <_API_Mutex_Unlock> return return_status; 116fe0: 83 c4 10 add $0x10,%esp } 116fe3: 89 d8 mov %ebx,%eax 116fe5: 8d 65 f8 lea -0x8(%ebp),%esp 116fe8: 5b pop %ebx 116fe9: 5e pop %esi 116fea: c9 leave 116feb: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 116fec: 8d 45 f4 lea -0xc(%ebp),%eax 116fef: 50 push %eax 116ff0: ff 75 10 pushl 0x10(%ebp) 116ff3: 53 push %ebx 116ff4: 8d 46 68 lea 0x68(%esi),%eax 116ff7: 50 push %eax 116ff8: e8 9b 2f 00 00 call 119f98 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 116ffd: 83 c4 10 add $0x10,%esp 117000: 85 c0 test %eax,%eax 117002: 74 18 je 11701c the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117004: 48 dec %eax 117005: 74 25 je 11702c 117007: bb 18 00 00 00 mov $0x18,%ebx 11700c: eb c4 jmp 116fd2 11700e: 66 90 xchg %ax,%ax <== NOT EXECUTED Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 117010: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117012: 89 d8 mov %ebx,%eax 117014: 8d 65 f8 lea -0x8(%ebp),%esp 117017: 5b pop %ebx 117018: 5e pop %esi 117019: c9 leave 11701a: c3 ret 11701b: 90 nop <== NOT EXECUTED length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 11701c: 8b 45 f4 mov -0xc(%ebp),%eax 11701f: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 117022: 01 46 5c add %eax,0x5c(%esi) 117025: 31 db xor %ebx,%ebx 117027: eb a9 jmp 116fd2 117029: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 11702c: bb 09 00 00 00 mov $0x9,%ebx 117031: eb 9f jmp 116fd2 00117034 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117034: 55 push %ebp 117035: 89 e5 mov %esp,%ebp 117037: 53 push %ebx 117038: 83 ec 14 sub $0x14,%esp 11703b: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11703e: 85 db test %ebx,%ebx 117040: 74 76 je 1170b8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117042: 83 ec 0c sub $0xc,%esp 117045: ff 35 b0 1d 14 00 pushl 0x141db0 11704b: e8 2c 23 00 00 call 11937c <_API_Mutex_Lock> 117050: 83 c4 0c add $0xc,%esp 117053: 8d 45 f4 lea -0xc(%ebp),%eax 117056: 50 push %eax 117057: ff 75 08 pushl 0x8(%ebp) 11705a: 68 00 1c 14 00 push $0x141c00 11705f: e8 f8 3b 00 00 call 11ac5c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117064: 83 c4 10 add $0x10,%esp 117067: 8b 55 f4 mov -0xc(%ebp),%edx 11706a: 85 d2 test %edx,%edx 11706c: 74 1e je 11708c 11706e: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117073: 83 ec 0c sub $0xc,%esp 117076: ff 35 b0 1d 14 00 pushl 0x141db0 11707c: e8 43 23 00 00 call 1193c4 <_API_Mutex_Unlock> return return_status; 117081: 83 c4 10 add $0x10,%esp } 117084: 89 d8 mov %ebx,%eax 117086: 8b 5d fc mov -0x4(%ebp),%ebx 117089: c9 leave 11708a: c3 ret 11708b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 11708c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117093: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 11709a: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 1170a1: 83 ec 08 sub $0x8,%esp 1170a4: 53 push %ebx 1170a5: 83 c0 68 add $0x68,%eax 1170a8: 50 push %eax 1170a9: e8 fa 30 00 00 call 11a1a8 <_Heap_Get_free_information> 1170ae: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 1170b0: 83 c4 10 add $0x10,%esp 1170b3: eb be jmp 117073 1170b5: 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 ) 1170b8: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 1170ba: 89 d8 mov %ebx,%eax 1170bc: 8b 5d fc mov -0x4(%ebp),%ebx 1170bf: c9 leave 1170c0: c3 ret 001170c4 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 1170c4: 55 push %ebp 1170c5: 89 e5 mov %esp,%ebp 1170c7: 53 push %ebx 1170c8: 83 ec 14 sub $0x14,%esp 1170cb: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1170ce: 85 db test %ebx,%ebx 1170d0: 74 5e je 117130 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1170d2: 83 ec 0c sub $0xc,%esp 1170d5: ff 35 b0 1d 14 00 pushl 0x141db0 1170db: e8 9c 22 00 00 call 11937c <_API_Mutex_Lock> 1170e0: 83 c4 0c add $0xc,%esp 1170e3: 8d 45 f4 lea -0xc(%ebp),%eax 1170e6: 50 push %eax 1170e7: ff 75 08 pushl 0x8(%ebp) 1170ea: 68 00 1c 14 00 push $0x141c00 1170ef: e8 68 3b 00 00 call 11ac5c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1170f4: 83 c4 10 add $0x10,%esp 1170f7: 8b 55 f4 mov -0xc(%ebp),%edx 1170fa: 85 d2 test %edx,%edx 1170fc: 74 1e je 11711c 1170fe: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117103: 83 ec 0c sub $0xc,%esp 117106: ff 35 b0 1d 14 00 pushl 0x141db0 11710c: e8 b3 22 00 00 call 1193c4 <_API_Mutex_Unlock> return return_status; 117111: 83 c4 10 add $0x10,%esp } 117114: 89 d8 mov %ebx,%eax 117116: 8b 5d fc mov -0x4(%ebp),%ebx 117119: c9 leave 11711a: c3 ret 11711b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 11711c: 83 ec 08 sub $0x8,%esp 11711f: 53 push %ebx 117120: 83 c0 68 add $0x68,%eax 117123: 50 push %eax 117124: e8 d7 30 00 00 call 11a200 <_Heap_Get_information> 117129: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 11712b: 83 c4 10 add $0x10,%esp 11712e: eb d3 jmp 117103 { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117130: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117132: 89 d8 mov %ebx,%eax 117134: 8b 5d fc mov -0x4(%ebp),%ebx 117137: c9 leave 117138: c3 ret 0011713c : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 11713c: 55 push %ebp 11713d: 89 e5 mov %esp,%ebp 11713f: 57 push %edi 117140: 56 push %esi 117141: 53 push %ebx 117142: 83 ec 2c sub $0x2c,%esp 117145: 8b 75 0c mov 0xc(%ebp),%esi 117148: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 11714b: 85 db test %ebx,%ebx 11714d: 0f 84 a1 00 00 00 je 1171f4 return RTEMS_INVALID_ADDRESS; *segment = NULL; 117153: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117159: 85 f6 test %esi,%esi 11715b: 75 0f jne 11716c 11715d: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117162: 8d 65 f4 lea -0xc(%ebp),%esp 117165: 5b pop %ebx 117166: 5e pop %esi 117167: 5f pop %edi 117168: c9 leave 117169: c3 ret 11716a: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 11716c: 83 ec 0c sub $0xc,%esp 11716f: ff 35 b0 1d 14 00 pushl 0x141db0 117175: e8 02 22 00 00 call 11937c <_API_Mutex_Lock> executing = _Thread_Executing; 11717a: a1 b8 1d 14 00 mov 0x141db8,%eax 11717f: 89 45 d4 mov %eax,-0x2c(%ebp) 117182: 83 c4 0c add $0xc,%esp 117185: 8d 45 e4 lea -0x1c(%ebp),%eax 117188: 50 push %eax 117189: ff 75 08 pushl 0x8(%ebp) 11718c: 68 00 1c 14 00 push $0x141c00 117191: e8 c6 3a 00 00 call 11ac5c <_Objects_Get_no_protection> 117196: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117198: 83 c4 10 add $0x10,%esp 11719b: 8b 45 e4 mov -0x1c(%ebp),%eax 11719e: 85 c0 test %eax,%eax 1171a0: 75 2a jne 1171cc case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 1171a2: 3b 77 5c cmp 0x5c(%edi),%esi 1171a5: 76 2d jbe 1171d4 1171a7: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1171ac: 83 ec 0c sub $0xc,%esp 1171af: ff 35 b0 1d 14 00 pushl 0x141db0 1171b5: 89 45 d0 mov %eax,-0x30(%ebp) 1171b8: e8 07 22 00 00 call 1193c4 <_API_Mutex_Unlock> return return_status; 1171bd: 83 c4 10 add $0x10,%esp 1171c0: 8b 45 d0 mov -0x30(%ebp),%eax } 1171c3: 8d 65 f4 lea -0xc(%ebp),%esp 1171c6: 5b pop %ebx 1171c7: 5e pop %esi 1171c8: 5f pop %edi 1171c9: c9 leave 1171ca: c3 ret 1171cb: 90 nop <== NOT EXECUTED _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 1171cc: b8 04 00 00 00 mov $0x4,%eax 1171d1: eb d9 jmp 1171ac 1171d3: 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 ); 1171d4: 6a 00 push $0x0 1171d6: 6a 00 push $0x0 1171d8: 56 push %esi 1171d9: 8d 47 68 lea 0x68(%edi),%eax 1171dc: 50 push %eax 1171dd: e8 02 2c 00 00 call 119de4 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 1171e2: 83 c4 10 add $0x10,%esp 1171e5: 85 c0 test %eax,%eax 1171e7: 74 17 je 117200 the_region->number_of_used_blocks += 1; 1171e9: ff 47 64 incl 0x64(%edi) *segment = the_segment; 1171ec: 89 03 mov %eax,(%ebx) 1171ee: 31 c0 xor %eax,%eax 1171f0: eb ba jmp 1171ac 1171f2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1171f4: b8 09 00 00 00 mov $0x9,%eax 1171f9: e9 64 ff ff ff jmp 117162 1171fe: 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 ) ) { 117200: f6 45 10 01 testb $0x1,0x10(%ebp) 117204: 74 07 je 11720d 117206: b8 0d 00 00 00 mov $0xd,%eax 11720b: eb 9f jmp 1171ac rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11720d: a1 f8 1c 14 00 mov 0x141cf8,%eax 117212: 40 inc %eax 117213: a3 f8 1c 14 00 mov %eax,0x141cf8 * 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(); 117218: 83 ec 0c sub $0xc,%esp 11721b: ff 35 b0 1d 14 00 pushl 0x141db0 117221: e8 9e 21 00 00 call 1193c4 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117226: 8d 47 10 lea 0x10(%edi),%eax 117229: 8b 55 d4 mov -0x2c(%ebp),%edx 11722c: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11722f: 8b 4d 08 mov 0x8(%ebp),%ecx 117232: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117235: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117238: 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; 11723b: 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 ); 117242: 83 c4 0c add $0xc,%esp 117245: 68 c8 bd 11 00 push $0x11bdc8 11724a: ff 75 14 pushl 0x14(%ebp) 11724d: 50 push %eax 11724e: e8 65 48 00 00 call 11bab8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117253: e8 24 43 00 00 call 11b57c <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117258: 8b 55 d4 mov -0x2c(%ebp),%edx 11725b: 8b 42 34 mov 0x34(%edx),%eax 11725e: 83 c4 10 add $0x10,%esp 117261: e9 fc fe ff ff jmp 117162 00117268 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117268: 55 push %ebp 117269: 89 e5 mov %esp,%ebp 11726b: 56 push %esi 11726c: 53 push %ebx 11726d: 83 ec 20 sub $0x20,%esp 117270: 8b 5d 0c mov 0xc(%ebp),%ebx 117273: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 117276: 85 db test %ebx,%ebx 117278: 74 72 je 1172ec return RTEMS_INVALID_ADDRESS; if ( !size ) 11727a: 85 f6 test %esi,%esi 11727c: 74 6e je 1172ec return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11727e: 83 ec 0c sub $0xc,%esp 117281: ff 35 b0 1d 14 00 pushl 0x141db0 117287: e8 f0 20 00 00 call 11937c <_API_Mutex_Lock> 11728c: 83 c4 0c add $0xc,%esp 11728f: 8d 45 f4 lea -0xc(%ebp),%eax 117292: 50 push %eax 117293: ff 75 08 pushl 0x8(%ebp) 117296: 68 00 1c 14 00 push $0x141c00 11729b: e8 bc 39 00 00 call 11ac5c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1172a0: 83 c4 10 add $0x10,%esp 1172a3: 8b 55 f4 mov -0xc(%ebp),%edx 1172a6: 85 d2 test %edx,%edx 1172a8: 75 36 jne 1172e0 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 1172aa: 52 push %edx 1172ab: 56 push %esi 1172ac: 53 push %ebx 1172ad: 83 c0 68 add $0x68,%eax 1172b0: 50 push %eax 1172b1: e8 0a 34 00 00 call 11a6c0 <_Heap_Size_of_alloc_area> 1172b6: 83 c4 10 add $0x10,%esp 1172b9: 84 c0 test %al,%al 1172bb: 74 3b je 1172f8 1172bd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1172bf: 83 ec 0c sub $0xc,%esp 1172c2: ff 35 b0 1d 14 00 pushl 0x141db0 1172c8: 89 45 e4 mov %eax,-0x1c(%ebp) 1172cb: e8 f4 20 00 00 call 1193c4 <_API_Mutex_Unlock> return return_status; 1172d0: 83 c4 10 add $0x10,%esp 1172d3: 8b 45 e4 mov -0x1c(%ebp),%eax } 1172d6: 8d 65 f8 lea -0x8(%ebp),%esp 1172d9: 5b pop %ebx 1172da: 5e pop %esi 1172db: c9 leave 1172dc: c3 ret 1172dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 1172e0: 4a dec %edx 1172e1: 75 da jne 1172bd 1172e3: b8 04 00 00 00 mov $0x4,%eax 1172e8: eb d5 jmp 1172bf 1172ea: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1172ec: b8 09 00 00 00 mov $0x9,%eax } 1172f1: 8d 65 f8 lea -0x8(%ebp),%esp 1172f4: 5b pop %ebx 1172f5: 5e pop %esi 1172f6: c9 leave 1172f7: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 1172f8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 1172fd: eb c0 jmp 1172bf <== NOT EXECUTED 00117324 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117324: 55 push %ebp 117325: 89 e5 mov %esp,%ebp 117327: 56 push %esi 117328: 53 push %ebx 117329: 83 ec 20 sub $0x20,%esp 11732c: 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 ) 11732f: 85 db test %ebx,%ebx 117331: 0f 84 a5 00 00 00 je 1173dc return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117337: 83 ec 0c sub $0xc,%esp 11733a: ff 35 b0 1d 14 00 pushl 0x141db0 117340: e8 37 20 00 00 call 11937c <_API_Mutex_Lock> 117345: 83 c4 0c add $0xc,%esp 117348: 8d 45 f0 lea -0x10(%ebp),%eax 11734b: 50 push %eax 11734c: ff 75 08 pushl 0x8(%ebp) 11734f: 68 00 1c 14 00 push $0x141c00 117354: e8 03 39 00 00 call 11ac5c <_Objects_Get_no_protection> 117359: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 11735b: 83 c4 10 add $0x10,%esp 11735e: 8b 45 f0 mov -0x10(%ebp),%eax 117361: 85 c0 test %eax,%eax 117363: 74 1f je 117384 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117365: 83 ec 0c sub $0xc,%esp 117368: ff 35 b0 1d 14 00 pushl 0x141db0 11736e: e8 51 20 00 00 call 1193c4 <_API_Mutex_Unlock> 117373: b8 04 00 00 00 mov $0x4,%eax return return_status; 117378: 83 c4 10 add $0x10,%esp } 11737b: 8d 65 f8 lea -0x8(%ebp),%esp 11737e: 5b pop %ebx 11737f: 5e pop %esi 117380: c9 leave 117381: c3 ret 117382: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 117384: 83 ec 0c sub $0xc,%esp 117387: 8d 45 f4 lea -0xc(%ebp),%eax 11738a: 50 push %eax 11738b: 8d 45 ec lea -0x14(%ebp),%eax 11738e: 50 push %eax 11738f: ff 75 10 pushl 0x10(%ebp) 117392: ff 75 0c pushl 0xc(%ebp) 117395: 8d 46 68 lea 0x68(%esi),%eax 117398: 50 push %eax 117399: e8 16 32 00 00 call 11a5b4 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11739e: 8b 55 ec mov -0x14(%ebp),%edx 1173a1: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1173a3: 83 c4 20 add $0x20,%esp 1173a6: 85 c0 test %eax,%eax 1173a8: 75 16 jne 1173c0 _Region_Process_queue( the_region ); /* unlocks allocator */ 1173aa: 83 ec 0c sub $0xc,%esp 1173ad: 56 push %esi 1173ae: e8 d1 77 00 00 call 11eb84 <_Region_Process_queue> 1173b3: 31 c0 xor %eax,%eax 1173b5: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 1173b8: 8d 65 f8 lea -0x8(%ebp),%esp 1173bb: 5b pop %ebx 1173bc: 5e pop %esi 1173bd: c9 leave 1173be: c3 ret 1173bf: 90 nop <== NOT EXECUTED _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1173c0: 83 ec 0c sub $0xc,%esp 1173c3: ff 35 b0 1d 14 00 pushl 0x141db0 1173c9: 89 45 e4 mov %eax,-0x1c(%ebp) 1173cc: e8 f3 1f 00 00 call 1193c4 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1173d1: 83 c4 10 add $0x10,%esp 1173d4: 8b 45 e4 mov -0x1c(%ebp),%eax 1173d7: 83 f8 01 cmp $0x1,%eax 1173da: 74 0c je 1173e8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1173dc: b8 09 00 00 00 mov $0x9,%eax } 1173e1: 8d 65 f8 lea -0x8(%ebp),%esp 1173e4: 5b pop %ebx 1173e5: 5e pop %esi 1173e6: c9 leave 1173e7: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1173e8: b0 0d mov $0xd,%al 1173ea: eb 8f jmp 11737b 001173ec : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 1173ec: 55 push %ebp 1173ed: 89 e5 mov %esp,%ebp 1173ef: 53 push %ebx 1173f0: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 1173f3: ff 35 b0 1d 14 00 pushl 0x141db0 1173f9: e8 7e 1f 00 00 call 11937c <_API_Mutex_Lock> 1173fe: 83 c4 0c add $0xc,%esp 117401: 8d 45 f4 lea -0xc(%ebp),%eax 117404: 50 push %eax 117405: ff 75 08 pushl 0x8(%ebp) 117408: 68 00 1c 14 00 push $0x141c00 11740d: e8 4a 38 00 00 call 11ac5c <_Objects_Get_no_protection> 117412: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 117414: 83 c4 10 add $0x10,%esp 117417: 8b 45 f4 mov -0xc(%ebp),%eax 11741a: 85 c0 test %eax,%eax 11741c: 74 1e je 11743c 11741e: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117423: 83 ec 0c sub $0xc,%esp 117426: ff 35 b0 1d 14 00 pushl 0x141db0 11742c: e8 93 1f 00 00 call 1193c4 <_API_Mutex_Unlock> return return_status; 117431: 83 c4 10 add $0x10,%esp } 117434: 89 d8 mov %ebx,%eax 117436: 8b 5d fc mov -0x4(%ebp),%ebx 117439: c9 leave 11743a: c3 ret 11743b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11743c: 83 ec 08 sub $0x8,%esp 11743f: ff 75 0c pushl 0xc(%ebp) 117442: 8d 43 68 lea 0x68(%ebx),%eax 117445: 50 push %eax 117446: e8 ed 2b 00 00 call 11a038 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11744b: 83 c4 10 add $0x10,%esp 11744e: 84 c0 test %al,%al 117450: 75 0a jne 11745c else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 117452: bb 09 00 00 00 mov $0x9,%ebx 117457: eb ca jmp 117423 117459: 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; 11745c: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 11745f: 83 ec 0c sub $0xc,%esp 117462: 53 push %ebx 117463: e8 1c 77 00 00 call 11eb84 <_Region_Process_queue> 117468: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 11746a: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 11746d: 89 d8 mov %ebx,%eax 11746f: 8b 5d fc mov -0x4(%ebp),%ebx 117472: c9 leave 117473: c3 ret 0010b328 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b328: 55 push %ebp 10b329: 89 e5 mov %esp,%ebp 10b32b: 57 push %edi 10b32c: 56 push %esi 10b32d: 53 push %ebx 10b32e: 83 ec 3c sub $0x3c,%esp 10b331: 8b 75 08 mov 0x8(%ebp),%esi 10b334: 8b 5d 10 mov 0x10(%ebp),%ebx 10b337: 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 ) ) 10b33a: 85 f6 test %esi,%esi 10b33c: 74 4a je 10b388 return RTEMS_INVALID_NAME; if ( !id ) 10b33e: 85 ff test %edi,%edi 10b340: 0f 84 f6 00 00 00 je 10b43c return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b346: 89 da mov %ebx,%edx 10b348: 81 e2 c0 00 00 00 and $0xc0,%edx 10b34e: 74 48 je 10b398 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b350: 89 d8 mov %ebx,%eax 10b352: 83 e0 30 and $0x30,%eax 10b355: 83 f8 10 cmp $0x10,%eax 10b358: 74 0e je 10b368 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b35a: b8 0b 00 00 00 mov $0xb,%eax } 10b35f: 8d 65 f4 lea -0xc(%ebp),%esp 10b362: 5b pop %ebx 10b363: 5e pop %esi 10b364: 5f pop %edi 10b365: c9 leave 10b366: c3 ret 10b367: 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 ) && 10b368: f6 c3 04 test $0x4,%bl 10b36b: 74 ed je 10b35a _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b36d: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b373: 74 e5 je 10b35a 10b375: 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 ) ) 10b37a: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b37e: 76 1f jbe 10b39f 10b380: b8 0a 00 00 00 mov $0xa,%eax 10b385: eb d8 jmp 10b35f 10b387: 90 nop <== NOT EXECUTED 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 ) ) 10b388: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b38d: 8d 65 f4 lea -0xc(%ebp),%esp 10b390: 5b pop %ebx 10b391: 5e pop %esi 10b392: 5f pop %edi 10b393: c9 leave 10b394: c3 ret 10b395: 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 ) ) 10b398: 89 d9 mov %ebx,%ecx 10b39a: 83 e1 30 and $0x30,%ecx 10b39d: 75 db jne 10b37a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b39f: a1 18 77 12 00 mov 0x127718,%eax 10b3a4: 40 inc %eax 10b3a5: a3 18 77 12 00 mov %eax,0x127718 * 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 ); 10b3aa: 83 ec 0c sub $0xc,%esp 10b3ad: 68 60 76 12 00 push $0x127660 10b3b2: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b3b5: e8 16 14 00 00 call 10c7d0 <_Objects_Allocate> 10b3ba: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b3bc: 83 c4 10 add $0x10,%esp 10b3bf: 85 c0 test %eax,%eax 10b3c1: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b3c4: 0f 84 ba 00 00 00 je 10b484 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b3ca: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b3cd: 85 c9 test %ecx,%ecx 10b3cf: 74 77 je 10b448 /* * 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; 10b3d1: 31 c0 xor %eax,%eax 10b3d3: f6 c3 04 test $0x4,%bl 10b3d6: 0f 95 c0 setne %al 10b3d9: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b3dc: 83 f9 10 cmp $0x10,%ecx 10b3df: 0f 84 ae 00 00 00 je 10b493 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; 10b3e5: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b3ec: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b3f0: 50 push %eax 10b3f1: 31 c0 xor %eax,%eax 10b3f3: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b3f7: 0f 94 c0 sete %al 10b3fa: 50 push %eax 10b3fb: 8d 45 d0 lea -0x30(%ebp),%eax 10b3fe: 50 push %eax 10b3ff: 8d 42 14 lea 0x14(%edx),%eax 10b402: 50 push %eax 10b403: 89 55 c4 mov %edx,-0x3c(%ebp) 10b406: e8 35 0c 00 00 call 10c040 <_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 ) { 10b40b: 83 c4 10 add $0x10,%esp 10b40e: 83 f8 06 cmp $0x6,%eax 10b411: 8b 55 c4 mov -0x3c(%ebp),%edx 10b414: 0f 84 a9 00 00 00 je 10b4c3 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b41a: 8b 42 08 mov 0x8(%edx),%eax 10b41d: 0f b7 d8 movzwl %ax,%ebx 10b420: 8b 0d 7c 76 12 00 mov 0x12767c,%ecx 10b426: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b429: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b42c: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b42e: e8 c1 20 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10b433: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b435: e9 25 ff ff ff jmp 10b35f 10b43a: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10b43c: b8 09 00 00 00 mov $0x9,%eax 10b441: e9 19 ff ff ff jmp 10b35f 10b446: 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; 10b448: 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; 10b44f: 31 c0 xor %eax,%eax 10b451: f6 c3 04 test $0x4,%bl 10b454: 0f 95 c0 setne %al 10b457: 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; 10b45a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b461: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b468: 51 push %ecx 10b469: ff 75 0c pushl 0xc(%ebp) 10b46c: 8d 45 e0 lea -0x20(%ebp),%eax 10b46f: 50 push %eax 10b470: 8d 42 14 lea 0x14(%edx),%eax 10b473: 50 push %eax 10b474: 89 55 c4 mov %edx,-0x3c(%ebp) 10b477: e8 68 0e 00 00 call 10c2e4 <_CORE_semaphore_Initialize> 10b47c: 83 c4 10 add $0x10,%esp 10b47f: 8b 55 c4 mov -0x3c(%ebp),%edx 10b482: eb 96 jmp 10b41a _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b484: e8 6b 20 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10b489: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b48e: e9 cc fe ff ff jmp 10b35f 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; 10b493: 8b 45 14 mov 0x14(%ebp),%eax 10b496: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b499: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b4a0: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b4a4: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b4a8: 0f 85 42 ff ff ff jne 10b3f0 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b4ae: f6 c3 40 test $0x40,%bl 10b4b1: 74 30 je 10b4e3 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b4b3: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b4ba: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b4be: e9 2d ff ff ff jmp 10b3f0 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b4c3: 83 ec 08 sub $0x8,%esp 10b4c6: 52 push %edx 10b4c7: 68 60 76 12 00 push $0x127660 10b4cc: e8 7f 16 00 00 call 10cb50 <_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(); 10b4d1: e8 1e 20 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10b4d6: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10b4db: 83 c4 10 add $0x10,%esp 10b4de: e9 7c fe ff ff jmp 10b35f 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 ) ) { 10b4e3: 84 db test %bl,%bl 10b4e5: 0f 89 05 ff ff ff jns 10b3f0 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b4eb: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b4f2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b4f6: e9 f5 fe ff ff jmp 10b3f0 0010b4fc : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b4fc: 55 push %ebp 10b4fd: 89 e5 mov %esp,%ebp 10b4ff: 53 push %ebx 10b500: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b503: 8d 45 f4 lea -0xc(%ebp),%eax 10b506: 50 push %eax 10b507: ff 75 08 pushl 0x8(%ebp) 10b50a: 68 60 76 12 00 push $0x127660 10b50f: e8 6c 17 00 00 call 10cc80 <_Objects_Get> 10b514: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b516: 83 c4 10 add $0x10,%esp 10b519: 8b 4d f4 mov -0xc(%ebp),%ecx 10b51c: 85 c9 test %ecx,%ecx 10b51e: 74 0c je 10b52c 10b520: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b525: 8b 5d fc mov -0x4(%ebp),%ebx 10b528: c9 leave 10b529: c3 ret 10b52a: 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); 10b52c: 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) ) { 10b52f: 83 e0 30 and $0x30,%eax 10b532: 74 58 je 10b58c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b534: 8b 53 64 mov 0x64(%ebx),%edx 10b537: 85 d2 test %edx,%edx 10b539: 75 15 jne 10b550 10b53b: 83 f8 20 cmp $0x20,%eax 10b53e: 74 10 je 10b550 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b540: e8 af 1f 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10b545: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b54a: 8b 5d fc mov -0x4(%ebp),%ebx 10b54d: c9 leave 10b54e: c3 ret 10b54f: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b550: 50 push %eax 10b551: 6a 04 push $0x4 10b553: 6a 00 push $0x0 10b555: 8d 43 14 lea 0x14(%ebx),%eax 10b558: 50 push %eax 10b559: e8 d6 0a 00 00 call 10c034 <_CORE_mutex_Flush> 10b55e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b561: 83 ec 08 sub $0x8,%esp 10b564: 53 push %ebx 10b565: 68 60 76 12 00 push $0x127660 10b56a: e8 dd 12 00 00 call 10c84c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b56f: 58 pop %eax 10b570: 5a pop %edx 10b571: 53 push %ebx 10b572: 68 60 76 12 00 push $0x127660 10b577: e8 d4 15 00 00 call 10cb50 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b57c: e8 73 1f 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10b581: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b583: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b586: 8b 5d fc mov -0x4(%ebp),%ebx 10b589: c9 leave 10b58a: c3 ret 10b58b: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b58c: 51 push %ecx 10b58d: 6a 02 push $0x2 10b58f: 6a 00 push $0x0 10b591: 8d 43 14 lea 0x14(%ebx),%eax 10b594: 50 push %eax 10b595: e8 3e 0d 00 00 call 10c2d8 <_CORE_semaphore_Flush> 10b59a: 83 c4 10 add $0x10,%esp 10b59d: eb c2 jmp 10b561 0010b5a0 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b5a0: 55 push %ebp 10b5a1: 89 e5 mov %esp,%ebp 10b5a3: 57 push %edi 10b5a4: 56 push %esi 10b5a5: 53 push %ebx 10b5a6: 83 ec 1c sub $0x1c,%esp 10b5a9: 8b 5d 08 mov 0x8(%ebp),%ebx 10b5ac: 8b 75 0c mov 0xc(%ebp),%esi 10b5af: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10b5b2: 8d 45 e0 lea -0x20(%ebp),%eax 10b5b5: 50 push %eax 10b5b6: 8d 45 e4 lea -0x1c(%ebp),%eax 10b5b9: 50 push %eax 10b5ba: 53 push %ebx 10b5bb: 68 60 76 12 00 push $0x127660 10b5c0: e8 63 16 00 00 call 10cc28 <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 10b5c5: 83 c4 10 add $0x10,%esp 10b5c8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b5cb: 85 c9 test %ecx,%ecx 10b5cd: 74 0d je 10b5dc 10b5cf: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10b5d4: 8d 65 f4 lea -0xc(%ebp),%esp 10b5d7: 5b pop %ebx 10b5d8: 5e pop %esi 10b5d9: 5f pop %edi 10b5da: c9 leave 10b5db: 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) ) { 10b5dc: f6 40 10 30 testb $0x30,0x10(%eax) 10b5e0: 74 36 je 10b618 _CORE_mutex_Seize( 10b5e2: 83 ec 0c sub $0xc,%esp 10b5e5: ff 75 e0 pushl -0x20(%ebp) 10b5e8: 57 push %edi 10b5e9: 83 e6 01 and $0x1,%esi 10b5ec: 83 f6 01 xor $0x1,%esi 10b5ef: 56 push %esi 10b5f0: 53 push %ebx 10b5f1: 83 c0 14 add $0x14,%eax 10b5f4: 50 push %eax 10b5f5: e8 3e 0b 00 00 call 10c138 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b5fa: 83 c4 14 add $0x14,%esp 10b5fd: a1 d8 77 12 00 mov 0x1277d8,%eax 10b602: ff 70 34 pushl 0x34(%eax) 10b605: e8 12 01 00 00 call 10b71c <_Semaphore_Translate_core_mutex_return_code> 10b60a: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b60d: 8d 65 f4 lea -0xc(%ebp),%esp 10b610: 5b pop %ebx 10b611: 5e pop %esi 10b612: 5f pop %edi 10b613: c9 leave 10b614: c3 ret 10b615: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b618: 8b 15 d8 77 12 00 mov 0x1277d8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b61e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b625: 8b 48 5c mov 0x5c(%eax),%ecx 10b628: 85 c9 test %ecx,%ecx 10b62a: 75 2c jne 10b658 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b62c: 83 e6 01 and $0x1,%esi 10b62f: 74 33 je 10b664 _ISR_Enable( *level_p ); 10b631: ff 75 e0 pushl -0x20(%ebp) 10b634: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b635: 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( 10b63c: 83 ec 0c sub $0xc,%esp 10b63f: a1 d8 77 12 00 mov 0x1277d8,%eax 10b644: ff 70 34 pushl 0x34(%eax) 10b647: e8 e0 00 00 00 call 10b72c <_Semaphore_Translate_core_semaphore_return_code> 10b64c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b64f: 8d 65 f4 lea -0xc(%ebp),%esp 10b652: 5b pop %ebx 10b653: 5e pop %esi 10b654: 5f pop %edi 10b655: c9 leave 10b656: c3 ret 10b657: 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; 10b658: 49 dec %ecx 10b659: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b65c: ff 75 e0 pushl -0x20(%ebp) 10b65f: 9d popf 10b660: eb da jmp 10b63c 10b662: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b664: 8b 0d 18 77 12 00 mov 0x127718,%ecx 10b66a: 41 inc %ecx 10b66b: 89 0d 18 77 12 00 mov %ecx,0x127718 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; 10b671: 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; 10b678: 83 c0 14 add $0x14,%eax 10b67b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b67e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b681: ff 75 e0 pushl -0x20(%ebp) 10b684: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b685: 52 push %edx 10b686: 68 14 dd 10 00 push $0x10dd14 10b68b: 57 push %edi 10b68c: 50 push %eax 10b68d: e8 72 23 00 00 call 10da04 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b692: e8 5d 1e 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10b697: 83 c4 10 add $0x10,%esp 10b69a: eb a0 jmp 10b63c 0010b69c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b69c: 55 push %ebp 10b69d: 89 e5 mov %esp,%ebp 10b69f: 53 push %ebx 10b6a0: 83 ec 18 sub $0x18,%esp 10b6a3: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b6a6: 8d 45 f4 lea -0xc(%ebp),%eax 10b6a9: 50 push %eax 10b6aa: 53 push %ebx 10b6ab: 68 60 76 12 00 push $0x127660 10b6b0: e8 cb 15 00 00 call 10cc80 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b6b5: 83 c4 10 add $0x10,%esp 10b6b8: 8b 55 f4 mov -0xc(%ebp),%edx 10b6bb: 85 d2 test %edx,%edx 10b6bd: 74 0d je 10b6cc 10b6bf: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6c4: 8b 5d fc mov -0x4(%ebp),%ebx 10b6c7: c9 leave 10b6c8: c3 ret 10b6c9: 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) ) { 10b6cc: f6 40 10 30 testb $0x30,0x10(%eax) 10b6d0: 75 26 jne 10b6f8 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b6d2: 52 push %edx 10b6d3: 6a 00 push $0x0 10b6d5: 53 push %ebx 10b6d6: 83 c0 14 add $0x14,%eax 10b6d9: 50 push %eax 10b6da: e8 45 0c 00 00 call 10c324 <_CORE_semaphore_Surrender> 10b6df: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b6e1: e8 0e 1e 00 00 call 10d4f4 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10b6e6: 89 1c 24 mov %ebx,(%esp) 10b6e9: e8 3e 00 00 00 call 10b72c <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10b6ee: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6f1: 8b 5d fc mov -0x4(%ebp),%ebx 10b6f4: c9 leave 10b6f5: c3 ret 10b6f6: 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( 10b6f8: 51 push %ecx 10b6f9: 6a 00 push $0x0 10b6fb: 53 push %ebx 10b6fc: 83 c0 14 add $0x14,%eax 10b6ff: 50 push %eax 10b700: e8 d3 0a 00 00 call 10c1d8 <_CORE_mutex_Surrender> 10b705: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b707: e8 e8 1d 00 00 call 10d4f4 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b70c: 89 1c 24 mov %ebx,(%esp) 10b70f: e8 08 00 00 00 call 10b71c <_Semaphore_Translate_core_mutex_return_code> 10b714: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b717: 8b 5d fc mov -0x4(%ebp),%ebx 10b71a: c9 leave 10b71b: c3 ret 0010c63c : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c63c: 55 push %ebp 10c63d: 89 e5 mov %esp,%ebp 10c63f: 83 ec 08 sub $0x8,%esp 10c642: 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 ]; 10c645: a1 d8 9d 12 00 mov 0x129dd8,%eax 10c64a: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c650: 8b 0d 18 9d 12 00 mov 0x129d18,%ecx 10c656: 41 inc %ecx 10c657: 89 0d 18 9d 12 00 mov %ecx,0x129d18 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c65d: 85 d2 test %edx,%edx 10c65f: 74 13 je 10c674 asr->mode_set = mode_set; 10c661: 8b 4d 0c mov 0xc(%ebp),%ecx 10c664: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c667: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c66a: e8 41 21 00 00 call 10e7b0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c66f: 31 c0 xor %eax,%eax 10c671: c9 leave 10c672: c3 ret 10c673: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c674: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c678: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c67f: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c686: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c68d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c694: 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(); 10c69b: e8 10 21 00 00 call 10e7b0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c6a0: 31 c0 xor %eax,%eax 10c6a2: c9 leave 10c6a3: c3 ret 00117948 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117948: 55 push %ebp 117949: 89 e5 mov %esp,%ebp 11794b: 53 push %ebx 11794c: 83 ec 14 sub $0x14,%esp 11794f: 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 ) 117952: 85 db test %ebx,%ebx 117954: 75 0a jne 117960 117956: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11795b: 8b 5d fc mov -0x4(%ebp),%ebx 11795e: c9 leave 11795f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117960: 83 ec 08 sub $0x8,%esp 117963: 8d 45 f4 lea -0xc(%ebp),%eax 117966: 50 push %eax 117967: ff 75 08 pushl 0x8(%ebp) 11796a: e8 5d 3c 00 00 call 11b5cc <_Thread_Get> switch ( location ) { 11796f: 83 c4 10 add $0x10,%esp 117972: 8b 55 f4 mov -0xc(%ebp),%edx 117975: 85 d2 test %edx,%edx 117977: 74 0b je 117984 117979: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11797e: 8b 5d fc mov -0x4(%ebp),%ebx 117981: c9 leave 117982: c3 ret 117983: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117984: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx asr = &api->Signal; 11798a: 8b 4a 0c mov 0xc(%edx),%ecx 11798d: 85 c9 test %ecx,%ecx 11798f: 74 43 je 1179d4 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 117991: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117995: 74 29 je 1179c0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117997: 9c pushf 117998: fa cli 117999: 59 pop %ecx *signal_set |= signals; 11799a: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 11799d: 51 push %ecx 11799e: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 11799f: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1179a3: 8b 15 94 1d 14 00 mov 0x141d94,%edx 1179a9: 85 d2 test %edx,%edx 1179ab: 74 1b je 1179c8 1179ad: 3b 05 b8 1d 14 00 cmp 0x141db8,%eax 1179b3: 75 13 jne 1179c8 _ISR_Signals_to_thread_executing = true; 1179b5: c6 05 68 1e 14 00 01 movb $0x1,0x141e68 1179bc: eb 0a jmp 1179c8 1179be: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1179c0: 9c pushf 1179c1: fa cli 1179c2: 58 pop %eax *signal_set |= signals; 1179c3: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 1179c6: 50 push %eax 1179c7: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 1179c8: e8 af 3b 00 00 call 11b57c <_Thread_Enable_dispatch> 1179cd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1179cf: 8b 5d fc mov -0x4(%ebp),%ebx 1179d2: c9 leave 1179d3: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1179d4: e8 a3 3b 00 00 call 11b57c <_Thread_Enable_dispatch> 1179d9: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 1179de: e9 78 ff ff ff jmp 11795b 0010b73c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b73c: 55 push %ebp 10b73d: 89 e5 mov %esp,%ebp 10b73f: 57 push %edi 10b740: 56 push %esi 10b741: 53 push %ebx 10b742: 83 ec 1c sub $0x1c,%esp 10b745: 8b 5d 08 mov 0x8(%ebp),%ebx 10b748: 8b 4d 0c mov 0xc(%ebp),%ecx 10b74b: 8b 7d 18 mov 0x18(%ebp),%edi 10b74e: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b751: 85 f6 test %esi,%esi 10b753: 0f 84 37 01 00 00 je 10b890 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b759: 85 db test %ebx,%ebx 10b75b: 0f 84 cb 00 00 00 je 10b82c /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b761: 66 85 ff test %di,%di 10b764: 78 1d js 10b783 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b766: 85 c9 test %ecx,%ecx 10b768: 75 0e jne 10b778 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10b76a: b8 13 00 00 00 mov $0x13,%eax } 10b76f: 8d 65 f4 lea -0xc(%ebp),%esp 10b772: 5b pop %ebx 10b773: 5e pop %esi 10b774: 5f pop %edi 10b775: c9 leave 10b776: c3 ret 10b777: 90 nop <== NOT EXECUTED 10b778: 0f b6 05 34 35 12 00 movzbl 0x123534,%eax 10b77f: 39 c1 cmp %eax,%ecx 10b781: 77 e7 ja 10b76a */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b783: 83 ec 0c sub $0xc,%esp 10b786: ff 35 d0 77 12 00 pushl 0x1277d0 10b78c: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b78f: e8 ac 06 00 00 call 10be40 <_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 ); 10b794: c7 04 24 a0 76 12 00 movl $0x1276a0,(%esp) 10b79b: e8 30 10 00 00 call 10c7d0 <_Objects_Allocate> 10b7a0: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b7a2: 83 c4 10 add $0x10,%esp 10b7a5: 85 c0 test %eax,%eax 10b7a7: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b7aa: 0f 84 c0 00 00 00 je 10b870 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b7b0: 50 push %eax 10b7b1: 53 push %ebx 10b7b2: 8b 45 14 mov 0x14(%ebp),%eax 10b7b5: 83 e0 01 and $0x1,%eax 10b7b8: 50 push %eax 10b7b9: 6a 00 push $0x0 10b7bb: 8b 45 14 mov 0x14(%ebp),%eax 10b7be: c1 e8 09 shr $0x9,%eax 10b7c1: 83 e0 01 and $0x1,%eax 10b7c4: 50 push %eax 10b7c5: 8b 45 14 mov 0x14(%ebp),%eax 10b7c8: c1 e8 08 shr $0x8,%eax 10b7cb: 83 f0 01 xor $0x1,%eax 10b7ce: 83 e0 01 and $0x1,%eax 10b7d1: 50 push %eax 10b7d2: 51 push %ecx 10b7d3: 83 e7 01 and $0x1,%edi 10b7d6: 57 push %edi 10b7d7: ff 75 10 pushl 0x10(%ebp) 10b7da: 6a 00 push $0x0 10b7dc: 52 push %edx 10b7dd: 68 a0 76 12 00 push $0x1276a0 10b7e2: 89 55 e4 mov %edx,-0x1c(%ebp) 10b7e5: e8 a6 1d 00 00 call 10d590 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b7ea: 83 c4 30 add $0x30,%esp 10b7ed: 84 c0 test %al,%al 10b7ef: 8b 55 e4 mov -0x1c(%ebp),%edx 10b7f2: 74 48 je 10b83c } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b7f4: 8b 8a f4 00 00 00 mov 0xf4(%edx),%ecx 10b7fa: 8b 45 14 mov 0x14(%ebp),%eax 10b7fd: c1 e8 0a shr $0xa,%eax 10b800: 83 f0 01 xor $0x1,%eax 10b803: 83 e0 01 and $0x1,%eax 10b806: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10b809: 8b 42 08 mov 0x8(%edx),%eax 10b80c: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b80e: 83 ec 0c sub $0xc,%esp 10b811: ff 35 d0 77 12 00 pushl 0x1277d0 10b817: e8 6c 06 00 00 call 10be88 <_API_Mutex_Unlock> 10b81c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b81e: 83 c4 10 add $0x10,%esp } 10b821: 8d 65 f4 lea -0xc(%ebp),%esp 10b824: 5b pop %ebx 10b825: 5e pop %esi 10b826: 5f pop %edi 10b827: c9 leave 10b828: c3 ret 10b829: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b82c: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b831: 8d 65 f4 lea -0xc(%ebp),%esp 10b834: 5b pop %ebx 10b835: 5e pop %esi 10b836: 5f pop %edi 10b837: c9 leave 10b838: c3 ret 10b839: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b83c: 83 ec 0c sub $0xc,%esp 10b83f: ff 72 08 pushl 0x8(%edx) 10b842: e8 79 13 00 00 call 10cbc0 <_Objects_Get_information_id> 10b847: 5a pop %edx 10b848: 59 pop %ecx 10b849: 8b 55 e4 mov -0x1c(%ebp),%edx 10b84c: 52 push %edx 10b84d: 50 push %eax 10b84e: e8 fd 12 00 00 call 10cb50 <_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(); 10b853: 58 pop %eax 10b854: ff 35 d0 77 12 00 pushl 0x1277d0 10b85a: e8 29 06 00 00 call 10be88 <_API_Mutex_Unlock> 10b85f: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10b864: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b867: 8d 65 f4 lea -0xc(%ebp),%esp 10b86a: 5b pop %ebx 10b86b: 5e pop %esi 10b86c: 5f pop %edi 10b86d: c9 leave 10b86e: c3 ret 10b86f: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b870: 83 ec 0c sub $0xc,%esp 10b873: ff 35 d0 77 12 00 pushl 0x1277d0 10b879: e8 0a 06 00 00 call 10be88 <_API_Mutex_Unlock> 10b87e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b883: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b886: 8d 65 f4 lea -0xc(%ebp),%esp 10b889: 5b pop %ebx 10b88a: 5e pop %esi 10b88b: 5f pop %edi 10b88c: c9 leave 10b88d: c3 ret 10b88e: 66 90 xchg %ax,%ax <== NOT EXECUTED Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b890: b8 09 00 00 00 mov $0x9,%eax 10b895: e9 d5 fe ff ff jmp 10b76f 0010b89c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b89c: 55 push %ebp 10b89d: 89 e5 mov %esp,%ebp 10b89f: 53 push %ebx 10b8a0: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b8a3: ff 35 d0 77 12 00 pushl 0x1277d0 10b8a9: e8 92 05 00 00 call 10be40 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10b8ae: 5a pop %edx 10b8af: 59 pop %ecx 10b8b0: 8d 45 f4 lea -0xc(%ebp),%eax 10b8b3: 50 push %eax 10b8b4: ff 75 08 pushl 0x8(%ebp) 10b8b7: e8 5c 1c 00 00 call 10d518 <_Thread_Get> 10b8bc: 89 c3 mov %eax,%ebx switch ( location ) { 10b8be: 83 c4 10 add $0x10,%esp 10b8c1: 8b 45 f4 mov -0xc(%ebp),%eax 10b8c4: 85 c0 test %eax,%eax 10b8c6: 75 44 jne 10b90c case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b8c8: 83 ec 0c sub $0xc,%esp 10b8cb: ff 73 08 pushl 0x8(%ebx) 10b8ce: e8 ed 12 00 00 call 10cbc0 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b8d3: 5a pop %edx 10b8d4: 59 pop %ecx 10b8d5: 53 push %ebx 10b8d6: 50 push %eax 10b8d7: e8 04 19 00 00 call 10d1e0 <_Thread_Close> 10b8dc: 58 pop %eax 10b8dd: ff 73 08 pushl 0x8(%ebx) 10b8e0: e8 db 12 00 00 call 10cbc0 <_Objects_Get_information_id> 10b8e5: 5a pop %edx 10b8e6: 59 pop %ecx 10b8e7: 53 push %ebx 10b8e8: 50 push %eax 10b8e9: e8 62 12 00 00 call 10cb50 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b8ee: 58 pop %eax 10b8ef: ff 35 d0 77 12 00 pushl 0x1277d0 10b8f5: e8 8e 05 00 00 call 10be88 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10b8fa: e8 f5 1b 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10b8ff: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b901: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b904: 8b 5d fc mov -0x4(%ebp),%ebx 10b907: c9 leave 10b908: c3 ret 10b909: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b90c: 83 ec 0c sub $0xc,%esp 10b90f: ff 35 d0 77 12 00 pushl 0x1277d0 10b915: e8 6e 05 00 00 call 10be88 <_API_Mutex_Unlock> 10b91a: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10b91f: 83 c4 10 add $0x10,%esp } 10b922: 8b 5d fc mov -0x4(%ebp),%ebx 10b925: c9 leave 10b926: c3 ret 0010d2e8 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d2e8: 55 push %ebp 10d2e9: 89 e5 mov %esp,%ebp 10d2eb: 56 push %esi 10d2ec: 53 push %ebx 10d2ed: 83 ec 10 sub $0x10,%esp 10d2f0: 8b 45 08 mov 0x8(%ebp),%eax 10d2f3: 8b 75 0c mov 0xc(%ebp),%esi 10d2f6: 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() ) 10d2f9: 80 3d 04 6e 12 00 00 cmpb $0x0,0x126e04 10d300: 74 6e je 10d370 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d302: 85 db test %ebx,%ebx 10d304: 74 7e je 10d384 /* * 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 ) 10d306: 83 fe 0f cmp $0xf,%esi 10d309: 77 3d ja 10d348 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d30b: 85 c0 test %eax,%eax 10d30d: 74 45 je 10d354 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d30f: 8b 15 b8 b3 12 00 mov 0x12b3b8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d315: 3b 42 08 cmp 0x8(%edx),%eax 10d318: 74 40 je 10d35a api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d31a: 83 ec 08 sub $0x8,%esp 10d31d: 8d 55 f4 lea -0xc(%ebp),%edx 10d320: 52 push %edx 10d321: 50 push %eax 10d322: e8 45 1f 00 00 call 10f26c <_Thread_Get> switch ( location ) { 10d327: 83 c4 10 add $0x10,%esp 10d32a: 8b 55 f4 mov -0xc(%ebp),%edx 10d32d: 85 d2 test %edx,%edx 10d32f: 75 4b jne 10d37c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d331: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax <== NOT EXECUTED 10d337: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax <== NOT EXECUTED 10d33b: 89 03 mov %eax,(%ebx) <== NOT EXECUTED _Thread_Enable_dispatch(); 10d33d: e8 06 1f 00 00 call 10f248 <_Thread_Enable_dispatch> <== NOT EXECUTED 10d342: 31 c0 xor %eax,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; 10d344: eb 07 jmp 10d34d <== NOT EXECUTED 10d346: 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 ) 10d348: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d34d: 8d 65 f8 lea -0x8(%ebp),%esp 10d350: 5b pop %ebx 10d351: 5e pop %esi 10d352: c9 leave 10d353: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d354: 8b 15 b8 b3 12 00 mov 0x12b3b8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d35a: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d360: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d364: 89 03 mov %eax,(%ebx) 10d366: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d368: 8d 65 f8 lea -0x8(%ebp),%esp 10d36b: 5b pop %ebx 10d36c: 5e pop %esi 10d36d: c9 leave 10d36e: c3 ret 10d36f: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d370: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d375: 8d 65 f8 lea -0x8(%ebp),%esp 10d378: 5b pop %ebx 10d379: 5e pop %esi 10d37a: c9 leave 10d37b: c3 ret *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d37c: b8 04 00 00 00 mov $0x4,%eax 10d381: eb ca jmp 10d34d 10d383: 90 nop <== NOT EXECUTED RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10d384: b8 09 00 00 00 mov $0x9,%eax 10d389: eb c2 jmp 10d34d 0010b928 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10b928: 55 push %ebp 10b929: 89 e5 mov %esp,%ebp 10b92b: 83 ec 08 sub $0x8,%esp 10b92e: 8b 55 08 mov 0x8(%ebp),%edx 10b931: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10b934: 85 c0 test %eax,%eax 10b936: 74 30 je 10b968 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10b938: 85 d2 test %edx,%edx 10b93a: 75 10 jne 10b94c *id = _Thread_Executing->Object.id; 10b93c: 8b 15 d8 77 12 00 mov 0x1277d8,%edx 10b942: 8b 52 08 mov 0x8(%edx),%edx 10b945: 89 10 mov %edx,(%eax) 10b947: 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 ]; } 10b949: c9 leave 10b94a: c3 ret 10b94b: 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 ); 10b94c: 50 push %eax 10b94d: ff 75 0c pushl 0xc(%ebp) 10b950: 52 push %edx 10b951: 68 a0 76 12 00 push $0x1276a0 10b956: e8 a9 14 00 00 call 10ce04 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10b95b: 8b 04 85 ac 0e 12 00 mov 0x120eac(,%eax,4),%eax 10b962: 83 c4 10 add $0x10,%esp } 10b965: c9 leave 10b966: c3 ret 10b967: 90 nop <== NOT EXECUTED rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) 10b968: b0 09 mov $0x9,%al } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10b96a: c9 leave 10b96b: c3 ret 00117d2c : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 117d2c: 55 push %ebp 117d2d: 89 e5 mov %esp,%ebp 117d2f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 117d32: 8d 45 f4 lea -0xc(%ebp),%eax 117d35: 50 push %eax 117d36: ff 75 08 pushl 0x8(%ebp) 117d39: e8 8e 38 00 00 call 11b5cc <_Thread_Get> switch ( location ) { 117d3e: 83 c4 10 add $0x10,%esp 117d41: 8b 55 f4 mov -0xc(%ebp),%edx 117d44: 85 d2 test %edx,%edx 117d46: 74 08 je 117d50 117d48: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d4d: c9 leave 117d4e: c3 ret 117d4f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 117d50: f6 40 10 02 testb $0x2,0x10(%eax) 117d54: 74 0e je 117d64 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117d56: e8 21 38 00 00 call 11b57c <_Thread_Enable_dispatch> 117d5b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d60: c9 leave 117d61: c3 ret 117d62: 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(); 117d64: e8 13 38 00 00 call 11b57c <_Thread_Enable_dispatch> 117d69: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d6b: c9 leave 117d6c: c3 ret 001129c8 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 1129c8: 55 push %ebp 1129c9: 89 e5 mov %esp,%ebp 1129cb: 57 push %edi 1129cc: 56 push %esi 1129cd: 53 push %ebx 1129ce: 83 ec 1c sub $0x1c,%esp 1129d1: 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 ) 1129d4: 85 c9 test %ecx,%ecx 1129d6: 0f 84 1c 01 00 00 je 112af8 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 1129dc: 8b 1d d8 77 12 00 mov 0x1277d8,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 1129e2: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 1129e8: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 1129ec: 19 f6 sbb %esi,%esi 1129ee: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 1129f4: 8b 53 7c mov 0x7c(%ebx),%edx 1129f7: 85 d2 test %edx,%edx 1129f9: 0f 85 b5 00 00 00 jne 112ab4 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1129ff: 80 7f 08 01 cmpb $0x1,0x8(%edi) 112a03: 19 d2 sbb %edx,%edx 112a05: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 112a0b: 89 55 e4 mov %edx,-0x1c(%ebp) 112a0e: 89 4d e0 mov %ecx,-0x20(%ebp) 112a11: e8 d6 be ff ff call 10e8ec <_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; 112a16: 8b 55 e4 mov -0x1c(%ebp),%edx 112a19: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 112a1b: 09 f0 or %esi,%eax 112a1d: 8b 4d e0 mov -0x20(%ebp),%ecx 112a20: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 112a22: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 112a29: 74 0f je 112a3a executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 112a2b: 8b 45 08 mov 0x8(%ebp),%eax 112a2e: c1 e8 08 shr $0x8,%eax 112a31: 83 f0 01 xor $0x1,%eax 112a34: 83 e0 01 and $0x1,%eax 112a37: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 112a3a: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 112a41: 74 18 je 112a5b if ( _Modes_Is_timeslice(mode_set) ) { 112a43: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 112a4a: 74 74 je 112ac0 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 112a4c: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 112a53: a1 e4 76 12 00 mov 0x1276e4,%eax 112a58: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112a5b: f6 45 0c 01 testb $0x1,0xc(%ebp) 112a5f: 74 07 je 112a68 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 112a61: f6 45 08 01 testb $0x1,0x8(%ebp) 112a65: 74 69 je 112ad0 112a67: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 112a68: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 112a6f: 74 2c je 112a9d * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 112a71: 8b 45 08 mov 0x8(%ebp),%eax 112a74: c1 e8 0a shr $0xa,%eax 112a77: 83 f0 01 xor $0x1,%eax 112a7a: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 112a7d: 38 47 08 cmp %al,0x8(%edi) 112a80: 74 1b je 112a9d needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 112a82: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112a85: 9c pushf 112a86: fa cli 112a87: 58 pop %eax _signals = information->signals_pending; 112a88: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 112a8b: 8b 4f 14 mov 0x14(%edi),%ecx 112a8e: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 112a91: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 112a94: 50 push %eax 112a95: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 112a96: 8b 47 14 mov 0x14(%edi),%eax 112a99: 85 c0 test %eax,%eax 112a9b: 75 53 jne 112af0 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 112a9d: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 112a9f: 83 3d e0 78 12 00 03 cmpl $0x3,0x1278e0 112aa6: 74 2c je 112ad4 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 112aa8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 112aaa: 83 c4 1c add $0x1c,%esp 112aad: 5b pop %ebx 112aae: 5e pop %esi 112aaf: 5f pop %edi 112ab0: c9 leave 112ab1: c3 ret 112ab2: 66 90 xchg %ax,%ax <== 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; 112ab4: 81 ce 00 02 00 00 or $0x200,%esi 112aba: e9 40 ff ff ff jmp 1129ff 112abf: 90 nop <== 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; 112ac0: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112ac7: f6 45 0c 01 testb $0x1,0xc(%ebp) 112acb: 74 9b je 112a68 112acd: eb 92 jmp 112a61 112acf: 90 nop <== NOT EXECUTED 112ad0: fb sti 112ad1: eb 95 jmp 112a68 112ad3: 90 nop <== NOT EXECUTED } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 112ad4: e8 a7 02 00 00 call 112d80 <_Thread_Evaluate_mode> 112ad9: 84 c0 test %al,%al 112adb: 75 04 jne 112ae1 112add: 84 db test %bl,%bl 112adf: 74 c7 je 112aa8 _Thread_Dispatch(); 112ae1: e8 b2 a8 ff ff call 10d398 <_Thread_Dispatch> 112ae6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 112ae8: 83 c4 1c add $0x1c,%esp 112aeb: 5b pop %ebx 112aec: 5e pop %esi 112aed: 5f pop %edi 112aee: c9 leave 112aef: c3 ret if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 112af0: c6 43 74 01 movb $0x1,0x74(%ebx) 112af4: b3 01 mov $0x1,%bl 112af6: eb a7 jmp 112a9f ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 112af8: 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; } 112afd: 83 c4 1c add $0x1c,%esp 112b00: 5b pop %ebx 112b01: 5e pop %esi 112b02: 5f pop %edi 112b03: c9 leave 112b04: c3 ret 0010c3ac : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c3ac: 55 push %ebp 10c3ad: 89 e5 mov %esp,%ebp 10c3af: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c3b2: 8d 45 f4 lea -0xc(%ebp),%eax 10c3b5: 50 push %eax 10c3b6: ff 75 08 pushl 0x8(%ebp) 10c3b9: e8 32 1c 00 00 call 10dff0 <_Thread_Get> switch ( location ) { 10c3be: 83 c4 10 add $0x10,%esp 10c3c1: 8b 4d f4 mov -0xc(%ebp),%ecx 10c3c4: 85 c9 test %ecx,%ecx 10c3c6: 75 20 jne 10c3e8 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c3c8: 52 push %edx 10c3c9: ff 75 0c pushl 0xc(%ebp) 10c3cc: 6a 00 push $0x0 10c3ce: 50 push %eax 10c3cf: e8 50 24 00 00 call 10e824 <_Thread_Restart> 10c3d4: 83 c4 10 add $0x10,%esp 10c3d7: 84 c0 test %al,%al 10c3d9: 75 15 jne 10c3f0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c3db: e8 ec 1b 00 00 call 10dfcc <_Thread_Enable_dispatch> 10c3e0: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3e5: c9 leave 10c3e6: c3 ret 10c3e7: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c3e8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3ed: c9 leave 10c3ee: c3 ret 10c3ef: 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(); 10c3f0: e8 d7 1b 00 00 call 10dfcc <_Thread_Enable_dispatch> 10c3f5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3f7: c9 leave 10c3f8: c3 ret 0010f11c : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f11c: 55 push %ebp 10f11d: 89 e5 mov %esp,%ebp 10f11f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f122: 8d 45 f4 lea -0xc(%ebp),%eax 10f125: 50 push %eax 10f126: ff 75 08 pushl 0x8(%ebp) 10f129: e8 12 1d 00 00 call 110e40 <_Thread_Get> switch ( location ) { 10f12e: 83 c4 10 add $0x10,%esp 10f131: 8b 55 f4 mov -0xc(%ebp),%edx 10f134: 85 d2 test %edx,%edx 10f136: 74 08 je 10f140 10f138: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f13d: c9 leave 10f13e: c3 ret 10f13f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f140: f6 40 10 02 testb $0x2,0x10(%eax) 10f144: 75 0e jne 10f154 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f146: e8 a5 1c 00 00 call 110df0 <_Thread_Enable_dispatch> 10f14b: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f150: c9 leave 10f151: c3 ret 10f152: 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 ); 10f154: 83 ec 08 sub $0x8,%esp 10f157: 6a 01 push $0x1 10f159: 50 push %eax 10f15a: e8 15 25 00 00 call 111674 <_Thread_Resume> _Thread_Enable_dispatch(); 10f15f: e8 8c 1c 00 00 call 110df0 <_Thread_Enable_dispatch> 10f164: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f166: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f169: c9 leave 10f16a: c3 ret 0010d460 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d460: 55 push %ebp 10d461: 89 e5 mov %esp,%ebp 10d463: 56 push %esi 10d464: 53 push %ebx 10d465: 83 ec 10 sub $0x10,%esp 10d468: 8b 45 08 mov 0x8(%ebp),%eax 10d46b: 8b 5d 0c mov 0xc(%ebp),%ebx 10d46e: 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() ) 10d471: 80 3d 04 6e 12 00 00 cmpb $0x0,0x126e04 10d478: 74 66 je 10d4e0 /* * 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 ) 10d47a: 83 fb 0f cmp $0xf,%ebx 10d47d: 77 39 ja 10d4b8 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d47f: 85 c0 test %eax,%eax 10d481: 74 41 je 10d4c4 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d483: 8b 15 b8 b3 12 00 mov 0x12b3b8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d489: 3b 42 08 cmp 0x8(%edx),%eax 10d48c: 74 3c je 10d4ca api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d48e: 83 ec 08 sub $0x8,%esp 10d491: 8d 55 f4 lea -0xc(%ebp),%edx 10d494: 52 push %edx 10d495: 50 push %eax 10d496: e8 d1 1d 00 00 call 10f26c <_Thread_Get> switch ( location ) { 10d49b: 83 c4 10 add $0x10,%esp 10d49e: 8b 55 f4 mov -0xc(%ebp),%edx 10d4a1: 85 d2 test %edx,%edx 10d4a3: 75 47 jne 10d4ec case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d4a5: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d4ab: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d4af: e8 94 1d 00 00 call 10f248 <_Thread_Enable_dispatch> 10d4b4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d4b6: eb 05 jmp 10d4bd /* * 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 ) 10d4b8: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4bd: 8d 65 f8 lea -0x8(%ebp),%esp 10d4c0: 5b pop %ebx 10d4c1: 5e pop %esi 10d4c2: c9 leave 10d4c3: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4c4: 8b 15 b8 b3 12 00 mov 0x12b3b8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d4ca: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d4d0: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10d4d4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4d6: 8d 65 f8 lea -0x8(%ebp),%esp 10d4d9: 5b pop %ebx 10d4da: 5e pop %esi 10d4db: c9 leave 10d4dc: c3 ret 10d4dd: 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() ) 10d4e0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4e5: 8d 65 f8 lea -0x8(%ebp),%esp 10d4e8: 5b pop %ebx 10d4e9: 5e pop %esi 10d4ea: c9 leave 10d4eb: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d4ec: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4f1: 8d 65 f8 lea -0x8(%ebp),%esp 10d4f4: 5b pop %ebx 10d4f5: 5e pop %esi 10d4f6: c9 leave 10d4f7: c3 ret 0010fdd8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10fdd8: 55 push %ebp 10fdd9: 89 e5 mov %esp,%ebp 10fddb: 56 push %esi 10fddc: 53 push %ebx 10fddd: 83 ec 10 sub $0x10,%esp 10fde0: 8b 5d 0c mov 0xc(%ebp),%ebx 10fde3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fde6: 85 db test %ebx,%ebx 10fde8: 74 0b je 10fdf5 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fdea: 0f b6 05 34 8e 12 00 movzbl 0x128e34,%eax 10fdf1: 39 c3 cmp %eax,%ebx 10fdf3: 77 5f ja 10fe54 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fdf5: 85 f6 test %esi,%esi 10fdf7: 74 67 je 10fe60 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fdf9: 83 ec 08 sub $0x8,%esp 10fdfc: 8d 45 f4 lea -0xc(%ebp),%eax 10fdff: 50 push %eax 10fe00: ff 75 08 pushl 0x8(%ebp) 10fe03: e8 68 1e 00 00 call 111c70 <_Thread_Get> switch ( location ) { 10fe08: 83 c4 10 add $0x10,%esp 10fe0b: 8b 55 f4 mov -0xc(%ebp),%edx 10fe0e: 85 d2 test %edx,%edx 10fe10: 75 36 jne 10fe48 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fe12: 8b 50 14 mov 0x14(%eax),%edx 10fe15: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10fe17: 85 db test %ebx,%ebx 10fe19: 74 1c je 10fe37 the_thread->real_priority = new_priority; 10fe1b: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fe1e: 8b 48 1c mov 0x1c(%eax),%ecx 10fe21: 85 c9 test %ecx,%ecx 10fe23: 74 05 je 10fe2a the_thread->current_priority > new_priority ) 10fe25: 3b 58 14 cmp 0x14(%eax),%ebx 10fe28: 73 0d jae 10fe37 _Thread_Change_priority( the_thread, new_priority, false ); 10fe2a: 52 push %edx 10fe2b: 6a 00 push $0x0 10fe2d: 53 push %ebx 10fe2e: 50 push %eax 10fe2f: e8 04 19 00 00 call 111738 <_Thread_Change_priority> 10fe34: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fe37: e8 e4 1d 00 00 call 111c20 <_Thread_Enable_dispatch> 10fe3c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fe3e: 8d 65 f8 lea -0x8(%ebp),%esp 10fe41: 5b pop %ebx 10fe42: 5e pop %esi 10fe43: c9 leave 10fe44: c3 ret 10fe45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10fe48: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fe4d: 8d 65 f8 lea -0x8(%ebp),%esp 10fe50: 5b pop %ebx 10fe51: 5e pop %esi 10fe52: c9 leave 10fe53: c3 ret 10fe54: b8 13 00 00 00 mov $0x13,%eax 10fe59: 8d 65 f8 lea -0x8(%ebp),%esp 10fe5c: 5b pop %ebx 10fe5d: 5e pop %esi 10fe5e: c9 leave 10fe5f: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fe60: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fe65: 8d 65 f8 lea -0x8(%ebp),%esp 10fe68: 5b pop %ebx 10fe69: 5e pop %esi 10fe6a: c9 leave 10fe6b: c3 ret 0010b9e0 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10b9e0: 55 push %ebp 10b9e1: 89 e5 mov %esp,%ebp 10b9e3: 53 push %ebx 10b9e4: 83 ec 14 sub $0x14,%esp 10b9e7: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10b9ea: 85 db test %ebx,%ebx 10b9ec: 74 4e je 10ba3c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10b9ee: 83 ec 08 sub $0x8,%esp 10b9f1: 8d 45 f4 lea -0xc(%ebp),%eax 10b9f4: 50 push %eax 10b9f5: ff 75 08 pushl 0x8(%ebp) 10b9f8: e8 1b 1b 00 00 call 10d518 <_Thread_Get> switch ( location ) { 10b9fd: 83 c4 10 add $0x10,%esp 10ba00: 8b 55 f4 mov -0xc(%ebp),%edx 10ba03: 85 d2 test %edx,%edx 10ba05: 75 29 jne 10ba30 case OBJECTS_LOCAL: if ( _Thread_Start( 10ba07: 83 ec 0c sub $0xc,%esp 10ba0a: ff 75 10 pushl 0x10(%ebp) 10ba0d: 6a 00 push $0x0 10ba0f: 53 push %ebx 10ba10: 6a 00 push $0x0 10ba12: 50 push %eax 10ba13: e8 ec 25 00 00 call 10e004 <_Thread_Start> 10ba18: 83 c4 20 add $0x20,%esp 10ba1b: 84 c0 test %al,%al 10ba1d: 75 29 jne 10ba48 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ba1f: e8 d0 1a 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10ba24: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba29: 8b 5d fc mov -0x4(%ebp),%ebx 10ba2c: c9 leave 10ba2d: c3 ret 10ba2e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10ba30: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba35: 8b 5d fc mov -0x4(%ebp),%ebx 10ba38: c9 leave 10ba39: c3 ret 10ba3a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10ba3c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba41: 8b 5d fc mov -0x4(%ebp),%ebx 10ba44: c9 leave 10ba45: c3 ret 10ba46: 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(); 10ba48: e8 a7 1a 00 00 call 10d4f4 <_Thread_Enable_dispatch> 10ba4d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba4f: 8b 5d fc mov -0x4(%ebp),%ebx 10ba52: c9 leave 10ba53: c3 ret 001108f8 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 1108f8: 55 push %ebp 1108f9: 89 e5 mov %esp,%ebp 1108fb: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 1108fe: 8d 45 f4 lea -0xc(%ebp),%eax 110901: 50 push %eax 110902: ff 75 08 pushl 0x8(%ebp) 110905: e8 0e cc ff ff call 10d518 <_Thread_Get> switch ( location ) { 11090a: 83 c4 10 add $0x10,%esp 11090d: 8b 55 f4 mov -0xc(%ebp),%edx 110910: 85 d2 test %edx,%edx 110912: 74 08 je 11091c 110914: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110919: c9 leave 11091a: c3 ret 11091b: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 11091c: f6 40 10 02 testb $0x2,0x10(%eax) 110920: 74 0e je 110930 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 110922: e8 cd cb ff ff call 10d4f4 <_Thread_Enable_dispatch> 110927: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11092c: c9 leave 11092d: c3 ret 11092e: 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 ); 110930: 83 ec 0c sub $0xc,%esp 110933: 50 push %eax 110934: e8 5b 0a 00 00 call 111394 <_Thread_Suspend> _Thread_Enable_dispatch(); 110939: e8 b6 cb ff ff call 10d4f4 <_Thread_Enable_dispatch> 11093e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110940: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110943: c9 leave 110944: c3 ret 0012e47c : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 12e47c: 55 push %ebp 12e47d: 89 e5 mov %esp,%ebp 12e47f: 57 push %edi 12e480: 56 push %esi 12e481: 53 push %ebx 12e482: 83 ec 1c sub $0x1c,%esp 12e485: 8b 5d 0c mov 0xc(%ebp),%ebx 12e488: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12e48b: 85 db test %ebx,%ebx 12e48d: 0f 84 9d 00 00 00 je 12e530 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12e493: 83 ec 08 sub $0x8,%esp 12e496: 8d 45 e4 lea -0x1c(%ebp),%eax 12e499: 50 push %eax 12e49a: ff 75 08 pushl 0x8(%ebp) 12e49d: e8 9a 54 fe ff call 11393c <_Thread_Get> 12e4a2: 89 c6 mov %eax,%esi switch (location) { 12e4a4: 83 c4 10 add $0x10,%esp 12e4a7: 8b 45 e4 mov -0x1c(%ebp),%eax 12e4aa: 85 c0 test %eax,%eax 12e4ac: 74 0e je 12e4bc 12e4ae: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4b3: 8d 65 f4 lea -0xc(%ebp),%esp 12e4b6: 5b pop %ebx 12e4b7: 5e pop %esi 12e4b8: 5f pop %edi 12e4b9: c9 leave 12e4ba: c3 ret 12e4bb: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 12e4bc: 8b 86 04 01 00 00 mov 0x104(%esi),%eax while (tvp) { 12e4c2: 85 c0 test %eax,%eax 12e4c4: 75 44 jne 12e50a 12e4c6: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 12e4c8: 83 ec 0c sub $0xc,%esp 12e4cb: 6a 14 push $0x14 12e4cd: e8 ce 65 fe ff call 114aa0 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 12e4d2: 83 c4 10 add $0x10,%esp 12e4d5: 85 c0 test %eax,%eax 12e4d7: 74 4b je 12e524 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 12e4d9: 8b 13 mov (%ebx),%edx 12e4db: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 12e4de: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12e4e1: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12e4e4: 8b 96 04 01 00 00 mov 0x104(%esi),%edx 12e4ea: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 12e4ec: 89 86 04 01 00 00 mov %eax,0x104(%esi) _Thread_Enable_dispatch(); 12e4f2: e8 21 54 fe ff call 113918 <_Thread_Enable_dispatch> 12e4f7: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4f9: 8d 65 f4 lea -0xc(%ebp),%esp 12e4fc: 5b pop %ebx 12e4fd: 5e pop %esi 12e4fe: 5f pop %edi 12e4ff: c9 leave 12e500: c3 ret 12e501: 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; 12e504: 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) { 12e506: 85 c0 test %eax,%eax 12e508: 74 be je 12e4c8 if (tvp->ptr == ptr) { 12e50a: 39 58 04 cmp %ebx,0x4(%eax) 12e50d: 75 f5 jne 12e504 tvp->dtor = dtor; 12e50f: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 12e512: e8 01 54 fe ff call 113918 <_Thread_Enable_dispatch> 12e517: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e519: 8d 65 f4 lea -0xc(%ebp),%esp 12e51c: 5b pop %ebx 12e51d: 5e pop %esi 12e51e: 5f pop %edi 12e51f: c9 leave 12e520: c3 ret 12e521: 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(); 12e524: e8 ef 53 fe ff call 113918 <_Thread_Enable_dispatch> 12e529: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 12e52e: eb 83 jmp 12e4b3 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12e530: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e535: 8d 65 f4 lea -0xc(%ebp),%esp 12e538: 5b pop %ebx 12e539: 5e pop %esi 12e53a: 5f pop %edi 12e53b: c9 leave 12e53c: c3 ret 0012e540 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12e540: 55 push %ebp 12e541: 89 e5 mov %esp,%ebp 12e543: 53 push %ebx 12e544: 83 ec 14 sub $0x14,%esp 12e547: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 12e54a: 85 db test %ebx,%ebx 12e54c: 74 4c je 12e59a return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12e54e: 83 ec 08 sub $0x8,%esp 12e551: 8d 45 f4 lea -0xc(%ebp),%eax 12e554: 50 push %eax 12e555: ff 75 08 pushl 0x8(%ebp) 12e558: e8 df 53 fe ff call 11393c <_Thread_Get> switch (location) { 12e55d: 83 c4 10 add $0x10,%esp 12e560: 8b 55 f4 mov -0xc(%ebp),%edx 12e563: 85 d2 test %edx,%edx 12e565: 74 0d je 12e574 12e567: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e56c: 8b 5d fc mov -0x4(%ebp),%ebx 12e56f: c9 leave 12e570: c3 ret 12e571: 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; 12e574: 8b 90 04 01 00 00 mov 0x104(%eax),%edx while (tvp) { 12e57a: 85 d2 test %edx,%edx 12e57c: 74 17 je 12e595 if (tvp->ptr == ptr) { 12e57e: 39 5a 04 cmp %ebx,0x4(%edx) 12e581: 75 0a jne 12e58d 12e583: eb 3c jmp 12e5c1 12e585: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12e588: 39 5a 04 cmp %ebx,0x4(%edx) 12e58b: 74 17 je 12e5a4 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 12e58d: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 12e58f: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 12e591: 85 d2 test %edx,%edx 12e593: 75 f3 jne 12e588 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12e595: e8 7e 53 fe ff call 113918 <_Thread_Enable_dispatch> 12e59a: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e59f: 8b 5d fc mov -0x4(%ebp),%ebx 12e5a2: c9 leave 12e5a3: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 12e5a4: 8b 1a mov (%edx),%ebx 12e5a6: 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 ); 12e5a8: 83 ec 08 sub $0x8,%esp 12e5ab: 52 push %edx 12e5ac: 50 push %eax 12e5ad: e8 a2 00 00 00 call 12e654 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 12e5b2: e8 61 53 fe ff call 113918 <_Thread_Enable_dispatch> 12e5b7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12e5b9: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e5bc: 8b 5d fc mov -0x4(%ebp),%ebx 12e5bf: c9 leave 12e5c0: 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; 12e5c1: 8b 0a mov (%edx),%ecx 12e5c3: 89 88 04 01 00 00 mov %ecx,0x104(%eax) 12e5c9: eb dd jmp 12e5a8 0012e5cc : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 12e5cc: 55 push %ebp 12e5cd: 89 e5 mov %esp,%ebp 12e5cf: 56 push %esi 12e5d0: 53 push %ebx 12e5d1: 83 ec 10 sub $0x10,%esp 12e5d4: 8b 5d 0c mov 0xc(%ebp),%ebx 12e5d7: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 12e5da: 85 db test %ebx,%ebx 12e5dc: 74 56 je 12e634 return RTEMS_INVALID_ADDRESS; if ( !result ) 12e5de: 85 f6 test %esi,%esi 12e5e0: 74 52 je 12e634 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12e5e2: 83 ec 08 sub $0x8,%esp 12e5e5: 8d 45 f4 lea -0xc(%ebp),%eax 12e5e8: 50 push %eax 12e5e9: ff 75 08 pushl 0x8(%ebp) 12e5ec: e8 4b 53 fe ff call 11393c <_Thread_Get> switch (location) { 12e5f1: 83 c4 10 add $0x10,%esp 12e5f4: 8b 55 f4 mov -0xc(%ebp),%edx 12e5f7: 85 d2 test %edx,%edx 12e5f9: 75 2d jne 12e628 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 12e5fb: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 12e601: 85 c0 test %eax,%eax 12e603: 75 09 jne 12e60e 12e605: eb 39 jmp 12e640 12e607: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12e608: 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) { 12e60a: 85 c0 test %eax,%eax 12e60c: 74 32 je 12e640 if (tvp->ptr == ptr) { 12e60e: 39 58 04 cmp %ebx,0x4(%eax) 12e611: 75 f5 jne 12e608 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 12e613: 8b 40 0c mov 0xc(%eax),%eax 12e616: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 12e618: e8 fb 52 fe ff call 113918 <_Thread_Enable_dispatch> 12e61d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e61f: 8d 65 f8 lea -0x8(%ebp),%esp 12e622: 5b pop %ebx 12e623: 5e pop %esi 12e624: c9 leave 12e625: c3 ret 12e626: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 12e628: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e62d: 8d 65 f8 lea -0x8(%ebp),%esp 12e630: 5b pop %ebx 12e631: 5e pop %esi 12e632: c9 leave 12e633: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 12e634: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e639: 8d 65 f8 lea -0x8(%ebp),%esp 12e63c: 5b pop %ebx 12e63d: 5e pop %esi 12e63e: c9 leave 12e63f: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12e640: e8 d3 52 fe ff call 113918 <_Thread_Enable_dispatch> 12e645: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e64a: 8d 65 f8 lea -0x8(%ebp),%esp 12e64d: 5b pop %ebx 12e64e: 5e pop %esi 12e64f: c9 leave 12e650: c3 ret 0010ba54 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10ba54: 55 push %ebp 10ba55: 89 e5 mov %esp,%ebp 10ba57: 53 push %ebx 10ba58: 83 ec 04 sub $0x4,%esp 10ba5b: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba5e: a1 18 77 12 00 mov 0x127718,%eax 10ba63: 40 inc %eax 10ba64: a3 18 77 12 00 mov %eax,0x127718 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10ba69: 85 db test %ebx,%ebx 10ba6b: 74 53 je 10bac0 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10ba6d: 83 ec 08 sub $0x8,%esp 10ba70: 6a 08 push $0x8 10ba72: ff 35 d8 77 12 00 pushl 0x1277d8 10ba78: e8 3b 23 00 00 call 10ddb8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ba7d: a1 d8 77 12 00 mov 0x1277d8,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10ba82: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ba85: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10ba8c: c7 40 64 5c d3 10 00 movl $0x10d35c,0x64(%eax) the_watchdog->id = id; 10ba93: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10ba96: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10ba9d: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10baa0: 5a pop %edx 10baa1: 59 pop %ecx 10baa2: 83 c0 48 add $0x48,%eax 10baa5: 50 push %eax 10baa6: 68 f8 77 12 00 push $0x1277f8 10baab: e8 90 29 00 00 call 10e440 <_Watchdog_Insert> 10bab0: 83 c4 10 add $0x10,%esp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bab3: e8 3c 1a 00 00 call 10d4f4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bab8: 31 c0 xor %eax,%eax 10baba: 8b 5d fc mov -0x4(%ebp),%ebx 10babd: c9 leave 10babe: c3 ret 10babf: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bac0: e8 0b 26 00 00 call 10e0d0 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bac5: e8 2a 1a 00 00 call 10d4f4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10baca: 31 c0 xor %eax,%eax 10bacc: 8b 5d fc mov -0x4(%ebp),%ebx 10bacf: c9 leave 10bad0: c3 ret 0010c850 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 53 push %ebx 10c854: 83 ec 14 sub $0x14,%esp 10c857: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c85a: 80 3d 4c 9f 12 00 00 cmpb $0x0,0x129f4c 10c861: 0f 84 a9 00 00 00 je 10c910 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c867: 85 db test %ebx,%ebx 10c869: 0f 84 ad 00 00 00 je 10c91c return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c86f: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c876: 83 ec 0c sub $0xc,%esp 10c879: 53 push %ebx 10c87a: e8 d9 f3 ff ff call 10bc58 <_TOD_Validate> 10c87f: 83 c4 10 add $0x10,%esp 10c882: 84 c0 test %al,%al 10c884: 75 0a jne 10c890 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10c886: b8 14 00 00 00 mov $0x14,%eax } 10c88b: 8b 5d fc mov -0x4(%ebp),%ebx 10c88e: c9 leave 10c88f: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c890: 83 ec 0c sub $0xc,%esp 10c893: 53 push %ebx 10c894: e8 33 f3 ff ff call 10bbcc <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c899: 83 c4 10 add $0x10,%esp 10c89c: 3b 05 cc 9f 12 00 cmp 0x129fcc,%eax 10c8a2: 76 e2 jbe 10c886 10c8a4: 8b 15 38 9f 12 00 mov 0x129f38,%edx 10c8aa: 42 inc %edx 10c8ab: 89 15 38 9f 12 00 mov %edx,0x129f38 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c8b1: 83 ec 08 sub $0x8,%esp 10c8b4: 6a 10 push $0x10 10c8b6: ff 35 f8 9f 12 00 pushl 0x129ff8 10c8bc: 89 45 f4 mov %eax,-0xc(%ebp) 10c8bf: e8 34 24 00 00 call 10ecf8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10c8c4: 8b 15 f8 9f 12 00 mov 0x129ff8,%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( 10c8ca: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c8cd: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10c8d4: c7 42 64 9c e2 10 00 movl $0x10e29c,0x64(%edx) the_watchdog->id = id; 10c8db: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10c8de: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c8e5: 8b 45 f4 mov -0xc(%ebp),%eax 10c8e8: 2b 05 cc 9f 12 00 sub 0x129fcc,%eax 10c8ee: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10c8f1: 58 pop %eax 10c8f2: 59 pop %ecx 10c8f3: 83 c2 48 add $0x48,%edx 10c8f6: 52 push %edx 10c8f7: 68 0c a0 12 00 push $0x12a00c 10c8fc: e8 f7 2a 00 00 call 10f3f8 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10c901: e8 2e 1b 00 00 call 10e434 <_Thread_Enable_dispatch> 10c906: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c908: 83 c4 10 add $0x10,%esp 10c90b: e9 7b ff ff ff jmp 10c88b rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c910: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c915: 8b 5d fc mov -0x4(%ebp),%ebx 10c918: c9 leave 10c919: c3 ret 10c91a: 66 90 xchg %ax,%ax <== NOT EXECUTED Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c91c: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c921: 8b 5d fc mov -0x4(%ebp),%ebx 10c924: c9 leave 10c925: c3 ret 0010bd8c : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 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 0c sub $0xc,%esp 10bd95: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd98: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bd9b: 85 db test %ebx,%ebx 10bd9d: 74 6d je 10be0c return RTEMS_INVALID_NAME; if ( !id ) 10bd9f: 85 f6 test %esi,%esi 10bda1: 0f 84 89 00 00 00 je 10be30 10bda7: a1 f8 89 12 00 mov 0x1289f8,%eax 10bdac: 40 inc %eax 10bdad: a3 f8 89 12 00 mov %eax,0x1289f8 * 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 ); 10bdb2: 83 ec 0c sub $0xc,%esp 10bdb5: 68 e0 93 12 00 push $0x1293e0 10bdba: e8 5d 0e 00 00 call 10cc1c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10bdbf: 83 c4 10 add $0x10,%esp 10bdc2: 85 c0 test %eax,%eax 10bdc4: 74 56 je 10be1c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10bdc6: 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; 10bdcd: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10bdd4: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10bddb: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10bde2: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bde9: 8b 50 08 mov 0x8(%eax),%edx 10bdec: 0f b7 fa movzwl %dx,%edi 10bdef: 8b 0d fc 93 12 00 mov 0x1293fc,%ecx 10bdf5: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bdf8: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10bdfb: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10bdfd: e8 3e 1b 00 00 call 10d940 <_Thread_Enable_dispatch> 10be02: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 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 rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10be0c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10be11: 8d 65 f4 lea -0xc(%ebp),%esp 10be14: 5b pop %ebx 10be15: 5e pop %esi 10be16: 5f pop %edi 10be17: c9 leave 10be18: c3 ret 10be19: 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(); 10be1c: e8 1f 1b 00 00 call 10d940 <_Thread_Enable_dispatch> 10be21: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10be26: 8d 65 f4 lea -0xc(%ebp),%esp 10be29: 5b pop %ebx 10be2a: 5e pop %esi 10be2b: 5f pop %edi 10be2c: c9 leave 10be2d: c3 ret 10be2e: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10be30: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10be35: 8d 65 f4 lea -0xc(%ebp),%esp 10be38: 5b pop %ebx 10be39: 5e pop %esi 10be3a: 5f pop %edi 10be3b: c9 leave 10be3c: c3 ret 00118394 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 118394: 55 push %ebp 118395: 89 e5 mov %esp,%ebp 118397: 53 push %ebx 118398: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11839b: 8d 45 f4 lea -0xc(%ebp),%eax 11839e: 50 push %eax 11839f: ff 75 08 pushl 0x8(%ebp) 1183a2: 68 e0 26 14 00 push $0x1426e0 1183a7: e8 ec 28 00 00 call 11ac98 <_Objects_Get> 1183ac: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1183ae: 83 c4 10 add $0x10,%esp 1183b1: 8b 4d f4 mov -0xc(%ebp),%ecx 1183b4: 85 c9 test %ecx,%ecx 1183b6: 75 38 jne 1183f0 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1183b8: 83 ec 08 sub $0x8,%esp 1183bb: 50 push %eax 1183bc: 68 e0 26 14 00 push $0x1426e0 1183c1: e8 62 24 00 00 call 11a828 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1183c6: 8d 43 10 lea 0x10(%ebx),%eax 1183c9: 89 04 24 mov %eax,(%esp) 1183cc: e8 ef 45 00 00 call 11c9c0 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1183d1: 58 pop %eax 1183d2: 5a pop %edx 1183d3: 53 push %ebx 1183d4: 68 e0 26 14 00 push $0x1426e0 1183d9: e8 4e 27 00 00 call 11ab2c <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 1183de: e8 99 31 00 00 call 11b57c <_Thread_Enable_dispatch> 1183e3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1183e5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183e8: 8b 5d fc mov -0x4(%ebp),%ebx 1183eb: c9 leave 1183ec: c3 ret 1183ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1183f0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183f5: 8b 5d fc mov -0x4(%ebp),%ebx 1183f8: c9 leave 1183f9: c3 ret 0010be40 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10be40: 55 push %ebp 10be41: 89 e5 mov %esp,%ebp 10be43: 57 push %edi 10be44: 56 push %esi 10be45: 53 push %ebx 10be46: 83 ec 2c sub $0x2c,%esp 10be49: 8b 5d 0c mov 0xc(%ebp),%ebx 10be4c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10be4f: 85 db test %ebx,%ebx 10be51: 0f 84 99 00 00 00 je 10bef0 return RTEMS_INVALID_NUMBER; if ( !routine ) 10be57: 85 f6 test %esi,%esi 10be59: 0f 84 b1 00 00 00 je 10bf10 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 10be5f: 57 push %edi 10be60: 8d 45 e4 lea -0x1c(%ebp),%eax 10be63: 50 push %eax 10be64: ff 75 08 pushl 0x8(%ebp) 10be67: 68 e0 93 12 00 push $0x1293e0 10be6c: e8 5b 12 00 00 call 10d0cc <_Objects_Get> 10be71: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10be73: 83 c4 10 add $0x10,%esp 10be76: 8b 4d e4 mov -0x1c(%ebp),%ecx 10be79: 85 c9 test %ecx,%ecx 10be7b: 74 0f je 10be8c 10be7d: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be82: 8d 65 f4 lea -0xc(%ebp),%esp 10be85: 5b pop %ebx 10be86: 5e pop %esi 10be87: 5f pop %edi 10be88: c9 leave 10be89: c3 ret 10be8a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10be8c: 8d 50 10 lea 0x10(%eax),%edx 10be8f: 83 ec 0c sub $0xc,%esp 10be92: 52 push %edx 10be93: 89 55 d4 mov %edx,-0x2c(%ebp) 10be96: e8 29 2b 00 00 call 10e9c4 <_Watchdog_Remove> _ISR_Disable( level ); 10be9b: 9c pushf 10be9c: fa cli 10be9d: 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 ) { 10be9e: 83 c4 10 add $0x10,%esp 10bea1: 8b 57 18 mov 0x18(%edi),%edx 10bea4: 85 d2 test %edx,%edx 10bea6: 8b 55 d4 mov -0x2c(%ebp),%edx 10bea9: 75 55 jne 10bf00 /* * 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; 10beab: 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; 10beb2: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10beb9: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10bebc: 8b 4d 08 mov 0x8(%ebp),%ecx 10bebf: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10bec2: 8b 4d 14 mov 0x14(%ebp),%ecx 10bec5: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10bec8: 50 push %eax 10bec9: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10beca: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10becd: 83 ec 08 sub $0x8,%esp 10bed0: 52 push %edx 10bed1: 68 d8 8a 12 00 push $0x128ad8 10bed6: e8 b1 29 00 00 call 10e88c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10bedb: e8 60 1a 00 00 call 10d940 <_Thread_Enable_dispatch> 10bee0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bee2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bee5: 8d 65 f4 lea -0xc(%ebp),%esp 10bee8: 5b pop %ebx 10bee9: 5e pop %esi 10beea: 5f pop %edi 10beeb: c9 leave 10beec: c3 ret 10beed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10bef0: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bef5: 8d 65 f4 lea -0xc(%ebp),%esp 10bef8: 5b pop %ebx 10bef9: 5e pop %esi 10befa: 5f pop %edi 10befb: c9 leave 10befc: c3 ret 10befd: 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 ); 10bf00: 50 push %eax 10bf01: 9d popf _Thread_Enable_dispatch(); 10bf02: e8 39 1a 00 00 call 10d940 <_Thread_Enable_dispatch> 10bf07: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bf09: e9 74 ff ff ff jmp 10be82 10bf0e: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 10bf10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bf15: 8d 65 f4 lea -0xc(%ebp),%esp 10bf18: 5b pop %ebx 10bf19: 5e pop %esi 10bf1a: 5f pop %edi 10bf1b: c9 leave 10bf1c: c3 ret 001184dc : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1184dc: 55 push %ebp 1184dd: 89 e5 mov %esp,%ebp 1184df: 57 push %edi 1184e0: 56 push %esi 1184e1: 53 push %ebx 1184e2: 83 ec 2c sub $0x2c,%esp 1184e5: 8b 75 08 mov 0x8(%ebp),%esi 1184e8: 8b 7d 0c mov 0xc(%ebp),%edi 1184eb: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 1184ee: 80 3d 0c 1d 14 00 00 cmpb $0x0,0x141d0c 1184f5: 75 0d jne 118504 1184f7: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184fc: 8d 65 f4 lea -0xc(%ebp),%esp 1184ff: 5b pop %ebx 118500: 5e pop %esi 118501: 5f pop %edi 118502: c9 leave 118503: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 118504: 83 ec 0c sub $0xc,%esp 118507: 57 push %edi 118508: e8 67 d4 ff ff call 115974 <_TOD_Validate> 11850d: 83 c4 10 add $0x10,%esp 118510: 84 c0 test %al,%al 118512: 74 1e je 118532 return RTEMS_INVALID_CLOCK; if ( !routine ) 118514: 85 db test %ebx,%ebx 118516: 0f 84 a4 00 00 00 je 1185c0 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 11851c: 83 ec 0c sub $0xc,%esp 11851f: 57 push %edi 118520: e8 c3 d3 ff ff call 1158e8 <_TOD_To_seconds> 118525: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118527: 83 c4 10 add $0x10,%esp 11852a: 3b 05 8c 1d 14 00 cmp 0x141d8c,%eax 118530: 77 0e ja 118540 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 118532: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118537: 8d 65 f4 lea -0xc(%ebp),%esp 11853a: 5b pop %ebx 11853b: 5e pop %esi 11853c: 5f pop %edi 11853d: c9 leave 11853e: c3 ret 11853f: 90 nop <== NOT EXECUTED 118540: 50 push %eax 118541: 8d 45 e4 lea -0x1c(%ebp),%eax 118544: 50 push %eax 118545: 56 push %esi 118546: 68 e0 26 14 00 push $0x1426e0 11854b: e8 48 27 00 00 call 11ac98 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118550: 83 c4 10 add $0x10,%esp 118553: 8b 4d e4 mov -0x1c(%ebp),%ecx 118556: 85 c9 test %ecx,%ecx 118558: 75 5a jne 1185b4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11855a: 8d 48 10 lea 0x10(%eax),%ecx 11855d: 83 ec 0c sub $0xc,%esp 118560: 51 push %ecx 118561: 89 45 d4 mov %eax,-0x2c(%ebp) 118564: 89 4d d0 mov %ecx,-0x30(%ebp) 118567: e8 54 44 00 00 call 11c9c0 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 11856c: 8b 55 d4 mov -0x2c(%ebp),%edx 11856f: 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; 118576: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11857d: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118580: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118583: 8b 45 14 mov 0x14(%ebp),%eax 118586: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118589: 2b 3d 8c 1d 14 00 sub 0x141d8c,%edi 11858f: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118592: 58 pop %eax 118593: 5a pop %edx 118594: 8b 4d d0 mov -0x30(%ebp),%ecx 118597: 51 push %ecx 118598: 68 cc 1d 14 00 push $0x141dcc 11859d: e8 e6 42 00 00 call 11c888 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1185a2: e8 d5 2f 00 00 call 11b57c <_Thread_Enable_dispatch> 1185a7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1185a9: 83 c4 10 add $0x10,%esp 1185ac: e9 4b ff ff ff jmp 1184fc 1185b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1185b4: b8 04 00 00 00 mov $0x4,%eax 1185b9: e9 3e ff ff ff jmp 1184fc 1185be: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 1185c0: b8 09 00 00 00 mov $0x9,%eax 1185c5: e9 32 ff ff ff jmp 1184fc 001185cc : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 1185cc: 55 push %ebp 1185cd: 89 e5 mov %esp,%ebp 1185cf: 53 push %ebx 1185d0: 83 ec 14 sub $0x14,%esp 1185d3: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1185d6: 85 db test %ebx,%ebx 1185d8: 74 4a je 118624 1185da: 51 push %ecx 1185db: 8d 45 f4 lea -0xc(%ebp),%eax 1185de: 50 push %eax 1185df: ff 75 08 pushl 0x8(%ebp) 1185e2: 68 e0 26 14 00 push $0x1426e0 1185e7: e8 ac 26 00 00 call 11ac98 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1185ec: 83 c4 10 add $0x10,%esp 1185ef: 8b 55 f4 mov -0xc(%ebp),%edx 1185f2: 85 d2 test %edx,%edx 1185f4: 74 0a je 118600 1185f6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1185fb: 8b 5d fc mov -0x4(%ebp),%ebx 1185fe: c9 leave 1185ff: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118600: 8b 50 38 mov 0x38(%eax),%edx 118603: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118605: 8b 50 1c mov 0x1c(%eax),%edx 118608: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 11860b: 8b 50 24 mov 0x24(%eax),%edx 11860e: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118611: 8b 40 28 mov 0x28(%eax),%eax 118614: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118617: e8 60 2f 00 00 call 11b57c <_Thread_Enable_dispatch> 11861c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11861e: 8b 5d fc mov -0x4(%ebp),%ebx 118621: c9 leave 118622: c3 ret 118623: 90 nop <== NOT EXECUTED ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118624: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118629: 8b 5d fc mov -0x4(%ebp),%ebx 11862c: c9 leave 11862d: c3 ret 001188dc : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1188dc: 55 push %ebp 1188dd: 89 e5 mov %esp,%ebp 1188df: 56 push %esi 1188e0: 53 push %ebx 1188e1: 83 ec 10 sub $0x10,%esp 1188e4: 8b 45 08 mov 0x8(%ebp),%eax 1188e7: 85 c0 test %eax,%eax 1188e9: 75 0d jne 1188f8 if (status) { initialized = false; } #endif return status; 1188eb: b8 13 00 00 00 mov $0x13,%eax } 1188f0: 8d 65 f8 lea -0x8(%ebp),%esp 1188f3: 5b pop %ebx 1188f4: 5e pop %esi 1188f5: c9 leave 1188f6: c3 ret 1188f7: 90 nop <== NOT EXECUTED 1188f8: 0f b6 15 f4 96 13 00 movzbl 0x1396f4,%edx 1188ff: 39 d0 cmp %edx,%eax 118901: 76 35 jbe 118938 * 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 ) 118903: 40 inc %eax 118904: 75 e5 jne 1188eb 118906: 31 f6 xor %esi,%esi 118908: 8b 15 f8 1c 14 00 mov 0x141cf8,%edx 11890e: 42 inc %edx 11890f: 89 15 f8 1c 14 00 mov %edx,0x141cf8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 118915: 8a 1d 60 d5 13 00 mov 0x13d560,%bl initialized = true; 11891b: c6 05 60 d5 13 00 01 movb $0x1,0x13d560 _Thread_Enable_dispatch(); 118922: e8 55 2c 00 00 call 11b57c <_Thread_Enable_dispatch> if ( tmpInitialized ) 118927: 84 db test %bl,%bl 118929: 74 11 je 11893c 11892b: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 118930: 8d 65 f8 lea -0x8(%ebp),%esp 118933: 5b pop %ebx 118934: 5e pop %esi 118935: c9 leave 118936: c3 ret 118937: 90 nop <== NOT EXECUTED 118938: 89 c6 mov %eax,%esi 11893a: eb cc jmp 118908 * 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( 11893c: 83 ec 08 sub $0x8,%esp 11893f: 8d 45 f4 lea -0xc(%ebp),%eax 118942: 50 push %eax 118943: 8b 45 10 mov 0x10(%ebp),%eax 118946: 80 cc 80 or $0x80,%ah 118949: 50 push %eax 11894a: 68 00 01 00 00 push $0x100 11894f: ff 75 0c pushl 0xc(%ebp) 118952: 56 push %esi 118953: 68 45 4d 49 54 push $0x54494d45 118958: e8 87 f0 ff ff call 1179e4 /* 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) { 11895d: 83 c4 20 add $0x20,%esp 118960: 85 c0 test %eax,%eax 118962: 74 10 je 118974 initialized = false; 118964: c6 05 60 d5 13 00 00 movb $0x0,0x13d560 initialized = false; } #endif return status; } 11896b: 8d 65 f8 lea -0x8(%ebp),%esp 11896e: 5b pop %ebx 11896f: 5e pop %esi 118970: c9 leave 118971: c3 ret 118972: 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) 118974: 8b 45 f4 mov -0xc(%ebp),%eax /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 118977: 0f b7 c8 movzwl %ax,%ecx 11897a: 8b 15 9c 1c 14 00 mov 0x141c9c,%edx 118980: 8b 14 8a mov (%edx,%ecx,4),%edx 118983: 89 15 80 d5 13 00 mov %edx,0x13d580 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118989: c7 05 b0 d5 13 00 b4 movl $0x13d5b4,0x13d5b0 118990: d5 13 00 the_chain->permanent_null = NULL; 118993: c7 05 b4 d5 13 00 00 movl $0x0,0x13d5b4 11899a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11899d: c7 05 b8 d5 13 00 b0 movl $0x13d5b0,0x13d5b8 1189a4: d5 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1189a7: c7 05 e8 d5 13 00 ec movl $0x13d5ec,0x13d5e8 1189ae: d5 13 00 the_chain->permanent_null = NULL; 1189b1: c7 05 ec d5 13 00 00 movl $0x0,0x13d5ec 1189b8: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1189bb: c7 05 f0 d5 13 00 e8 movl $0x13d5e8,0x13d5f0 1189c2: d5 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1189c5: c7 05 90 d5 13 00 00 movl $0x0,0x13d590 1189cc: 00 00 00 the_watchdog->routine = routine; 1189cf: c7 05 a4 d5 13 00 e4 movl $0x11b3e4,0x13d5a4 1189d6: b3 11 00 the_watchdog->id = id; 1189d9: a3 a8 d5 13 00 mov %eax,0x13d5a8 the_watchdog->user_data = user_data; 1189de: c7 05 ac d5 13 00 00 movl $0x0,0x13d5ac 1189e5: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1189e8: c7 05 c8 d5 13 00 00 movl $0x0,0x13d5c8 1189ef: 00 00 00 the_watchdog->routine = routine; 1189f2: c7 05 dc d5 13 00 e4 movl $0x11b3e4,0x13d5dc 1189f9: b3 11 00 the_watchdog->id = id; 1189fc: a3 e0 d5 13 00 mov %eax,0x13d5e0 the_watchdog->user_data = user_data; 118a01: c7 05 e4 d5 13 00 00 movl $0x0,0x13d5e4 118a08: 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; 118a0b: c7 05 84 d5 13 00 b0 movl $0x118cb0,0x13d584 118a12: 8c 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 118a15: 8b 15 64 1e 14 00 mov 0x141e64,%edx 118a1b: 89 15 bc d5 13 00 mov %edx,0x13d5bc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118a21: 8b 15 8c 1d 14 00 mov 0x141d8c,%edx 118a27: 89 15 f4 d5 13 00 mov %edx,0x13d5f4 ts->insert_chain = NULL; 118a2d: c7 05 f8 d5 13 00 00 movl $0x0,0x13d5f8 118a34: 00 00 00 ts->active = false; 118a37: c6 05 fc d5 13 00 00 movb $0x0,0x13d5fc /* * The default timer server is now available. */ _Timer_server = ts; 118a3e: c7 05 20 27 14 00 80 movl $0x13d580,0x142720 118a45: d5 13 00 /* * Start the timer server */ status = rtems_task_start( 118a48: 52 push %edx 118a49: 68 80 d5 13 00 push $0x13d580 118a4e: 68 04 8b 11 00 push $0x118b04 118a53: 50 push %eax 118a54: e8 23 f6 ff ff call 11807c if (status) { initialized = false; } #endif return status; 118a59: 83 c4 10 add $0x10,%esp 118a5c: e9 8f fe ff ff jmp 1188f0 00118654 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118654: 55 push %ebp 118655: 89 e5 mov %esp,%ebp 118657: 56 push %esi 118658: 53 push %ebx 118659: 83 ec 24 sub $0x24,%esp 11865c: 8d 45 f4 lea -0xc(%ebp),%eax 11865f: 50 push %eax 118660: ff 75 08 pushl 0x8(%ebp) 118663: 68 e0 26 14 00 push $0x1426e0 118668: e8 2b 26 00 00 call 11ac98 <_Objects_Get> 11866d: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11866f: 83 c4 10 add $0x10,%esp 118672: 8b 45 f4 mov -0xc(%ebp),%eax 118675: 85 c0 test %eax,%eax 118677: 74 0f je 118688 118679: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11867e: 8d 65 f8 lea -0x8(%ebp),%esp 118681: 5b pop %ebx 118682: 5e pop %esi 118683: c9 leave 118684: c3 ret 118685: 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 ) { 118688: 8b 43 38 mov 0x38(%ebx),%eax 11868b: 85 c0 test %eax,%eax 11868d: 74 1d je 1186ac _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11868f: 48 dec %eax 118690: 74 3a je 1186cc 118692: b8 0b 00 00 00 mov $0xb,%eax * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 118697: 89 45 e4 mov %eax,-0x1c(%ebp) 11869a: e8 dd 2e 00 00 call 11b57c <_Thread_Enable_dispatch> 11869f: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186a2: 8d 65 f8 lea -0x8(%ebp),%esp 1186a5: 5b pop %ebx 1186a6: 5e pop %esi 1186a7: c9 leave 1186a8: c3 ret 1186a9: 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 ); 1186ac: 83 c3 10 add $0x10,%ebx 1186af: 83 ec 0c sub $0xc,%esp 1186b2: 53 push %ebx 1186b3: e8 08 43 00 00 call 11c9c0 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 1186b8: 59 pop %ecx 1186b9: 5e pop %esi 1186ba: 53 push %ebx 1186bb: 68 d8 1d 14 00 push $0x141dd8 1186c0: e8 c3 41 00 00 call 11c888 <_Watchdog_Insert> 1186c5: 31 c0 xor %eax,%eax 1186c7: 83 c4 10 add $0x10,%esp 1186ca: eb cb jmp 118697 } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 1186cc: 8b 35 20 27 14 00 mov 0x142720,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1186d2: 83 ec 0c sub $0xc,%esp 1186d5: 8d 43 10 lea 0x10(%ebx),%eax 1186d8: 50 push %eax 1186d9: e8 e2 42 00 00 call 11c9c0 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 1186de: 58 pop %eax 1186df: 5a pop %edx 1186e0: 53 push %ebx 1186e1: 56 push %esi 1186e2: ff 56 04 call *0x4(%esi) 1186e5: 31 c0 xor %eax,%eax 1186e7: 83 c4 10 add $0x10,%esp 1186ea: eb ab jmp 118697 001186ec : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1186ec: 55 push %ebp 1186ed: 89 e5 mov %esp,%ebp 1186ef: 57 push %edi 1186f0: 56 push %esi 1186f1: 53 push %ebx 1186f2: 83 ec 2c sub $0x2c,%esp 1186f5: 8b 7d 0c mov 0xc(%ebp),%edi 1186f8: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 1186fb: 8b 1d 20 27 14 00 mov 0x142720,%ebx if ( !timer_server ) 118701: 85 db test %ebx,%ebx 118703: 0f 84 9f 00 00 00 je 1187a8 return RTEMS_INCORRECT_STATE; if ( !routine ) 118709: 85 f6 test %esi,%esi 11870b: 0f 84 a3 00 00 00 je 1187b4 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118711: 85 ff test %edi,%edi 118713: 75 0f jne 118724 118715: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11871a: 8d 65 f4 lea -0xc(%ebp),%esp 11871d: 5b pop %ebx 11871e: 5e pop %esi 11871f: 5f pop %edi 118720: c9 leave 118721: c3 ret 118722: 66 90 xchg %ax,%ax <== NOT EXECUTED 118724: 52 push %edx 118725: 8d 45 e4 lea -0x1c(%ebp),%eax 118728: 50 push %eax 118729: ff 75 08 pushl 0x8(%ebp) 11872c: 68 e0 26 14 00 push $0x1426e0 118731: e8 62 25 00 00 call 11ac98 <_Objects_Get> 118736: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118738: 83 c4 10 add $0x10,%esp 11873b: 8b 45 e4 mov -0x1c(%ebp),%eax 11873e: 85 c0 test %eax,%eax 118740: 75 56 jne 118798 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118742: 83 ec 0c sub $0xc,%esp 118745: 8d 42 10 lea 0x10(%edx),%eax 118748: 50 push %eax 118749: 89 55 d4 mov %edx,-0x2c(%ebp) 11874c: e8 6f 42 00 00 call 11c9c0 <_Watchdog_Remove> _ISR_Disable( level ); 118751: 9c pushf 118752: fa cli 118753: 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 ) { 118754: 83 c4 10 add $0x10,%esp 118757: 8b 55 d4 mov -0x2c(%ebp),%edx 11875a: 8b 4a 18 mov 0x18(%edx),%ecx 11875d: 85 c9 test %ecx,%ecx 11875f: 75 5f jne 1187c0 /* * 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; 118761: 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; 118768: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11876f: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118772: 8b 4d 08 mov 0x8(%ebp),%ecx 118775: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118778: 8b 4d 14 mov 0x14(%ebp),%ecx 11877b: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 11877e: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118781: 50 push %eax 118782: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118783: 83 ec 08 sub $0x8,%esp 118786: 52 push %edx 118787: 53 push %ebx 118788: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 11878b: e8 ec 2d 00 00 call 11b57c <_Thread_Enable_dispatch> 118790: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118792: 83 c4 10 add $0x10,%esp 118795: eb 83 jmp 11871a 118797: 90 nop <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118798: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11879d: 8d 65 f4 lea -0xc(%ebp),%esp 1187a0: 5b pop %ebx 1187a1: 5e pop %esi 1187a2: 5f pop %edi 1187a3: c9 leave 1187a4: c3 ret 1187a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1187a8: b8 0e 00 00 00 mov $0xe,%eax 1187ad: e9 68 ff ff ff jmp 11871a 1187b2: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !routine ) 1187b4: b8 09 00 00 00 mov $0x9,%eax 1187b9: e9 5c ff ff ff jmp 11871a 1187be: 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 ); 1187c0: 50 push %eax 1187c1: 9d popf _Thread_Enable_dispatch(); 1187c2: e8 b5 2d 00 00 call 11b57c <_Thread_Enable_dispatch> 1187c7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1187c9: e9 4c ff ff ff jmp 11871a 001187d0 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1187d0: 55 push %ebp 1187d1: 89 e5 mov %esp,%ebp 1187d3: 57 push %edi 1187d4: 56 push %esi 1187d5: 53 push %ebx 1187d6: 83 ec 2c sub $0x2c,%esp 1187d9: 8b 7d 0c mov 0xc(%ebp),%edi 1187dc: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 1187df: 8b 1d 20 27 14 00 mov 0x142720,%ebx if ( !timer_server ) 1187e5: 85 db test %ebx,%ebx 1187e7: 0f 84 d7 00 00 00 je 1188c4 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1187ed: 80 3d 0c 1d 14 00 00 cmpb $0x0,0x141d0c 1187f4: 0f 84 aa 00 00 00 je 1188a4 return RTEMS_NOT_DEFINED; if ( !routine ) 1187fa: 85 f6 test %esi,%esi 1187fc: 0f 84 b2 00 00 00 je 1188b4 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118802: 83 ec 0c sub $0xc,%esp 118805: 57 push %edi 118806: e8 69 d1 ff ff call 115974 <_TOD_Validate> 11880b: 83 c4 10 add $0x10,%esp 11880e: 84 c0 test %al,%al 118810: 75 0e jne 118820 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 118812: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118817: 8d 65 f4 lea -0xc(%ebp),%esp 11881a: 5b pop %ebx 11881b: 5e pop %esi 11881c: 5f pop %edi 11881d: c9 leave 11881e: c3 ret 11881f: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118820: 83 ec 0c sub $0xc,%esp 118823: 57 push %edi 118824: e8 bf d0 ff ff call 1158e8 <_TOD_To_seconds> 118829: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11882b: 83 c4 10 add $0x10,%esp 11882e: 3b 05 8c 1d 14 00 cmp 0x141d8c,%eax 118834: 76 dc jbe 118812 118836: 52 push %edx 118837: 8d 45 e4 lea -0x1c(%ebp),%eax 11883a: 50 push %eax 11883b: ff 75 08 pushl 0x8(%ebp) 11883e: 68 e0 26 14 00 push $0x1426e0 118843: e8 50 24 00 00 call 11ac98 <_Objects_Get> 118848: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11884a: 83 c4 10 add $0x10,%esp 11884d: 8b 45 e4 mov -0x1c(%ebp),%eax 118850: 85 c0 test %eax,%eax 118852: 75 7c jne 1188d0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118854: 83 ec 0c sub $0xc,%esp 118857: 8d 42 10 lea 0x10(%edx),%eax 11885a: 50 push %eax 11885b: 89 55 d4 mov %edx,-0x2c(%ebp) 11885e: e8 5d 41 00 00 call 11c9c0 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118863: 8b 55 d4 mov -0x2c(%ebp),%edx 118866: 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; 11886d: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118874: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118877: 8b 45 08 mov 0x8(%ebp),%eax 11887a: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 11887d: 8b 45 14 mov 0x14(%ebp),%eax 118880: 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(); 118883: 2b 3d 8c 1d 14 00 sub 0x141d8c,%edi 118889: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 11888c: 58 pop %eax 11888d: 59 pop %ecx 11888e: 52 push %edx 11888f: 53 push %ebx 118890: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118893: e8 e4 2c 00 00 call 11b57c <_Thread_Enable_dispatch> 118898: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11889a: 83 c4 10 add $0x10,%esp 11889d: e9 75 ff ff ff jmp 118817 1188a2: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1188a4: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1188a9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1188ac: 5b pop %ebx <== NOT EXECUTED 1188ad: 5e pop %esi <== NOT EXECUTED 1188ae: 5f pop %edi <== NOT EXECUTED 1188af: c9 leave <== NOT EXECUTED 1188b0: c3 ret <== NOT EXECUTED 1188b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 1188b4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1188b9: 8d 65 f4 lea -0xc(%ebp),%esp 1188bc: 5b pop %ebx 1188bd: 5e pop %esi 1188be: 5f pop %edi 1188bf: c9 leave 1188c0: c3 ret 1188c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1188c4: b8 0e 00 00 00 mov $0xe,%eax 1188c9: e9 49 ff ff ff jmp 118817 1188ce: 66 90 xchg %ax,%ax <== NOT EXECUTED seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1188d0: b8 04 00 00 00 mov $0x4,%eax 1188d5: e9 3d ff ff ff jmp 118817 0010bd18 : #include int sched_get_priority_max( int policy ) { 10bd18: 55 push %ebp 10bd19: 89 e5 mov %esp,%ebp 10bd1b: 83 ec 08 sub $0x8,%esp 10bd1e: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10bd21: 85 c0 test %eax,%eax 10bd23: 78 0a js 10bd2f 10bd25: 83 f8 02 cmp $0x2,%eax 10bd28: 7e 1a jle 10bd44 10bd2a: 83 f8 04 cmp $0x4,%eax 10bd2d: 74 15 je 10bd44 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10bd2f: e8 dc 87 00 00 call 114510 <__errno> 10bd34: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd3a: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10bd3f: c9 leave 10bd40: c3 ret 10bd41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10bd44: 0f b6 05 bc 46 12 00 movzbl 0x1246bc,%eax 10bd4b: 48 dec %eax } 10bd4c: c9 leave 10bd4d: c3 ret 0010bd50 : #include int sched_get_priority_min( int policy ) { 10bd50: 55 push %ebp 10bd51: 89 e5 mov %esp,%ebp 10bd53: 83 ec 08 sub $0x8,%esp 10bd56: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10bd59: 85 c0 test %eax,%eax 10bd5b: 78 0a js 10bd67 10bd5d: 83 f8 02 cmp $0x2,%eax 10bd60: 7e 1a jle 10bd7c 10bd62: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10bd65: 74 15 je 10bd7c <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10bd67: e8 a4 87 00 00 call 114510 <__errno> 10bd6c: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd72: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10bd77: c9 leave 10bd78: c3 ret 10bd79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int sched_get_priority_min( int policy ) { switch ( policy ) { 10bd7c: b8 01 00 00 00 mov $0x1,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10bd81: c9 leave 10bd82: c3 ret 0010bd84 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10bd84: 55 push %ebp 10bd85: 89 e5 mov %esp,%ebp 10bd87: 56 push %esi 10bd88: 53 push %ebx 10bd89: 8b 75 08 mov 0x8(%ebp),%esi 10bd8c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bd8f: 85 f6 test %esi,%esi 10bd91: 75 21 jne 10bdb4 rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10bd93: 85 db test %ebx,%ebx 10bd95: 74 38 je 10bdcf rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10bd97: 83 ec 08 sub $0x8,%esp 10bd9a: 53 push %ebx 10bd9b: ff 35 44 88 12 00 pushl 0x128844 10bda1: e8 f2 33 00 00 call 10f198 <_Timespec_From_ticks> 10bda6: 31 c0 xor %eax,%eax return 0; 10bda8: 83 c4 10 add $0x10,%esp } 10bdab: 8d 65 f8 lea -0x8(%ebp),%esp 10bdae: 5b pop %ebx 10bdaf: 5e pop %esi 10bdb0: c9 leave 10bdb1: c3 ret 10bdb2: 66 90 xchg %ax,%ax <== NOT EXECUTED { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bdb4: e8 7f c9 ff ff call 108738 10bdb9: 39 f0 cmp %esi,%eax 10bdbb: 74 d6 je 10bd93 rtems_set_errno_and_return_minus_one( ESRCH ); 10bdbd: e8 4e 87 00 00 call 114510 <__errno> 10bdc2: c7 00 03 00 00 00 movl $0x3,(%eax) 10bdc8: b8 ff ff ff ff mov $0xffffffff,%eax 10bdcd: eb dc jmp 10bdab if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bdcf: e8 3c 87 00 00 call 114510 <__errno> 10bdd4: c7 00 16 00 00 00 movl $0x16,(%eax) 10bdda: b8 ff ff ff ff mov $0xffffffff,%eax 10bddf: eb ca jmp 10bdab 0010e214 : */ int sem_close( sem_t *sem ) { 10e214: 55 push %ebp 10e215: 89 e5 mov %esp,%ebp 10e217: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 10e21a: 8d 45 f4 lea -0xc(%ebp),%eax 10e21d: 50 push %eax 10e21e: 8b 45 08 mov 0x8(%ebp),%eax 10e221: ff 30 pushl (%eax) 10e223: 68 c0 d4 12 00 push $0x12d4c0 10e228: e8 0b 21 00 00 call 110338 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e22d: 83 c4 10 add $0x10,%esp 10e230: 8b 55 f4 mov -0xc(%ebp),%edx 10e233: 85 d2 test %edx,%edx 10e235: 74 15 je 10e24c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e237: e8 44 96 00 00 call 117880 <__errno> 10e23c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e242: b8 ff ff ff ff mov $0xffffffff,%eax } 10e247: c9 leave 10e248: c3 ret 10e249: 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; 10e24c: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10e24f: 83 ec 0c sub $0xc,%esp 10e252: 50 push %eax 10e253: e8 34 5d 00 00 call 113f8c <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e258: e8 9f 29 00 00 call 110bfc <_Thread_Enable_dispatch> 10e25d: 31 c0 xor %eax,%eax return 0; 10e25f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e262: c9 leave 10e263: c3 ret 0010e264 : */ int sem_destroy( sem_t *sem ) { 10e264: 55 push %ebp 10e265: 89 e5 mov %esp,%ebp 10e267: 83 ec 1c sub $0x1c,%esp 10e26a: 8d 45 f4 lea -0xc(%ebp),%eax 10e26d: 50 push %eax 10e26e: 8b 45 08 mov 0x8(%ebp),%eax 10e271: ff 30 pushl (%eax) 10e273: 68 c0 d4 12 00 push $0x12d4c0 10e278: e8 bb 20 00 00 call 110338 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e27d: 83 c4 10 add $0x10,%esp 10e280: 8b 55 f4 mov -0xc(%ebp),%edx 10e283: 85 d2 test %edx,%edx 10e285: 74 15 je 10e29c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e287: e8 f4 95 00 00 call 117880 <__errno> 10e28c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e292: b8 ff ff ff ff mov $0xffffffff,%eax } 10e297: c9 leave 10e298: c3 ret 10e299: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10e29c: 80 78 14 00 cmpb $0x0,0x14(%eax) 10e2a0: 75 16 jne 10e2b8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10e2a2: 83 ec 0c sub $0xc,%esp 10e2a5: 50 push %eax 10e2a6: e8 e1 5c 00 00 call 113f8c <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e2ab: e8 4c 29 00 00 call 110bfc <_Thread_Enable_dispatch> 10e2b0: 31 c0 xor %eax,%eax return 0; 10e2b2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e2b5: c9 leave 10e2b6: c3 ret 10e2b7: 90 nop <== NOT EXECUTED /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10e2b8: e8 3f 29 00 00 call 110bfc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10e2bd: e8 be 95 00 00 call 117880 <__errno> 10e2c2: c7 00 16 00 00 00 movl $0x16,(%eax) 10e2c8: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e2cd: c9 leave 10e2ce: c3 ret 0010e2d0 : int sem_getvalue( sem_t *sem, int *sval ) { 10e2d0: 55 push %ebp 10e2d1: 89 e5 mov %esp,%ebp 10e2d3: 83 ec 1c sub $0x1c,%esp 10e2d6: 8d 45 f4 lea -0xc(%ebp),%eax 10e2d9: 50 push %eax 10e2da: 8b 45 08 mov 0x8(%ebp),%eax 10e2dd: ff 30 pushl (%eax) 10e2df: 68 c0 d4 12 00 push $0x12d4c0 10e2e4: e8 4f 20 00 00 call 110338 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e2e9: 83 c4 10 add $0x10,%esp 10e2ec: 8b 55 f4 mov -0xc(%ebp),%edx 10e2ef: 85 d2 test %edx,%edx 10e2f1: 74 15 je 10e308 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e2f3: e8 88 95 00 00 call 117880 <__errno> 10e2f8: c7 00 16 00 00 00 movl $0x16,(%eax) 10e2fe: b8 ff ff ff ff mov $0xffffffff,%eax } 10e303: c9 leave 10e304: c3 ret 10e305: 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 ); 10e308: 8b 50 64 mov 0x64(%eax),%edx 10e30b: 8b 45 0c mov 0xc(%ebp),%eax 10e30e: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e310: e8 e7 28 00 00 call 110bfc <_Thread_Enable_dispatch> 10e315: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e317: c9 leave 10e318: c3 ret 0010e364 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10e364: 55 push %ebp 10e365: 89 e5 mov %esp,%ebp 10e367: 57 push %edi 10e368: 56 push %esi 10e369: 53 push %ebx 10e36a: 83 ec 2c sub $0x2c,%esp 10e36d: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e370: a1 78 d1 12 00 mov 0x12d178,%eax 10e375: 40 inc %eax 10e376: a3 78 d1 12 00 mov %eax,0x12d178 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10e37b: 8b 7d 0c mov 0xc(%ebp),%edi 10e37e: 81 e7 00 02 00 00 and $0x200,%edi 10e384: 0f 85 86 00 00 00 jne 10e410 10e38a: 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 ); 10e391: 83 ec 08 sub $0x8,%esp 10e394: 8d 45 e4 lea -0x1c(%ebp),%eax 10e397: 50 push %eax 10e398: 56 push %esi 10e399: e8 3e 5c 00 00 call 113fdc <_POSIX_Semaphore_Name_to_id> 10e39e: 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 ) { 10e3a0: 83 c4 10 add $0x10,%esp 10e3a3: 85 c0 test %eax,%eax 10e3a5: 74 25 je 10e3cc /* * 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) ) ) { 10e3a7: 83 f8 02 cmp $0x2,%eax 10e3aa: 75 04 jne 10e3b0 10e3ac: 85 ff test %edi,%edi 10e3ae: 75 6c jne 10e41c _Thread_Enable_dispatch(); 10e3b0: e8 47 28 00 00 call 110bfc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10e3b5: e8 c6 94 00 00 call 117880 <__errno> 10e3ba: 89 18 mov %ebx,(%eax) 10e3bc: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10e3c1: 8d 65 f4 lea -0xc(%ebp),%esp 10e3c4: 5b pop %ebx 10e3c5: 5e pop %esi 10e3c6: 5f pop %edi 10e3c7: c9 leave 10e3c8: c3 ret 10e3c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10e3cc: 8b 45 0c mov 0xc(%ebp),%eax 10e3cf: 25 00 0a 00 00 and $0xa00,%eax 10e3d4: 3d 00 0a 00 00 cmp $0xa00,%eax 10e3d9: 74 65 je 10e440 10e3db: 50 push %eax 10e3dc: 8d 45 dc lea -0x24(%ebp),%eax 10e3df: 50 push %eax 10e3e0: ff 75 e4 pushl -0x1c(%ebp) 10e3e3: 68 c0 d4 12 00 push $0x12d4c0 10e3e8: e8 4b 1f 00 00 call 110338 <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10e3ed: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10e3f0: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10e3f3: e8 04 28 00 00 call 110bfc <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10e3f8: e8 ff 27 00 00 call 110bfc <_Thread_Enable_dispatch> goto return_id; 10e3fd: 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; 10e400: 8b 45 e0 mov -0x20(%ebp),%eax 10e403: 83 c0 08 add $0x8,%eax #endif return id; } 10e406: 8d 65 f4 lea -0xc(%ebp),%esp 10e409: 5b pop %ebx 10e40a: 5e pop %esi 10e40b: 5f pop %edi 10e40c: c9 leave 10e40d: c3 ret 10e40e: 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 ); 10e410: 8b 45 14 mov 0x14(%ebp),%eax 10e413: 89 45 d4 mov %eax,-0x2c(%ebp) 10e416: e9 76 ff ff ff jmp 10e391 10e41b: 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( 10e41c: 8d 45 e0 lea -0x20(%ebp),%eax 10e41f: 50 push %eax 10e420: ff 75 d4 pushl -0x2c(%ebp) 10e423: 6a 00 push $0x0 10e425: 56 push %esi 10e426: e8 55 5a 00 00 call 113e80 <_POSIX_Semaphore_Create_support> 10e42b: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10e42d: e8 ca 27 00 00 call 110bfc <_Thread_Enable_dispatch> if ( status == -1 ) 10e432: 83 c4 10 add $0x10,%esp 10e435: 43 inc %ebx 10e436: 75 c8 jne 10e400 10e438: b8 ff ff ff ff mov $0xffffffff,%eax 10e43d: eb c7 jmp 10e406 10e43f: 90 nop <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10e440: e8 b7 27 00 00 call 110bfc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10e445: e8 36 94 00 00 call 117880 <__errno> 10e44a: c7 00 11 00 00 00 movl $0x11,(%eax) 10e450: b8 ff ff ff ff mov $0xffffffff,%eax 10e455: eb af jmp 10e406 0010e458 : */ int sem_post( sem_t *sem ) { 10e458: 55 push %ebp 10e459: 89 e5 mov %esp,%ebp 10e45b: 83 ec 1c sub $0x1c,%esp 10e45e: 8d 45 f4 lea -0xc(%ebp),%eax 10e461: 50 push %eax 10e462: 8b 45 08 mov 0x8(%ebp),%eax 10e465: ff 30 pushl (%eax) 10e467: 68 c0 d4 12 00 push $0x12d4c0 10e46c: e8 c7 1e 00 00 call 110338 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e471: 83 c4 10 add $0x10,%esp 10e474: 8b 4d f4 mov -0xc(%ebp),%ecx 10e477: 85 c9 test %ecx,%ecx 10e479: 74 15 je 10e490 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e47b: e8 00 94 00 00 call 117880 <__errno> 10e480: c7 00 16 00 00 00 movl $0x16,(%eax) 10e486: b8 ff ff ff ff mov $0xffffffff,%eax } 10e48b: c9 leave 10e48c: c3 ret 10e48d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10e490: 52 push %edx 10e491: 6a 00 push $0x0 10e493: ff 70 08 pushl 0x8(%eax) 10e496: 83 c0 1c add $0x1c,%eax 10e499: 50 push %eax 10e49a: e8 3d 15 00 00 call 10f9dc <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10e49f: e8 58 27 00 00 call 110bfc <_Thread_Enable_dispatch> 10e4a4: 31 c0 xor %eax,%eax return 0; 10e4a6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e4a9: c9 leave 10e4aa: c3 ret 0010e4ac : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10e4ac: 55 push %ebp 10e4ad: 89 e5 mov %esp,%ebp 10e4af: 53 push %ebx 10e4b0: 83 ec 1c sub $0x1c,%esp 10e4b3: 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 ); 10e4b6: 8d 45 f4 lea -0xc(%ebp),%eax 10e4b9: 50 push %eax 10e4ba: ff 75 0c pushl 0xc(%ebp) 10e4bd: e8 e6 50 00 00 call 1135a8 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10e4c2: 83 c4 10 add $0x10,%esp 10e4c5: 83 f8 03 cmp $0x3,%eax 10e4c8: 74 16 je 10e4e0 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e4ca: 50 push %eax <== NOT EXECUTED 10e4cb: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10e4ce: 6a 00 push $0x0 <== NOT EXECUTED 10e4d0: 53 push %ebx <== NOT EXECUTED 10e4d1: e8 72 5b 00 00 call 114048 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 10e4d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } return lock_status; } 10e4d9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e4dc: c9 leave <== NOT EXECUTED 10e4dd: c3 ret <== NOT EXECUTED 10e4de: 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 ); 10e4e0: 52 push %edx 10e4e1: ff 75 f4 pushl -0xc(%ebp) 10e4e4: 6a 01 push $0x1 10e4e6: 53 push %ebx 10e4e7: e8 5c 5b 00 00 call 114048 <_POSIX_Semaphore_Wait_support> 10e4ec: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10e4ef: 8b 5d fc mov -0x4(%ebp),%ebx 10e4f2: c9 leave 10e4f3: c3 ret 0010b1f0 : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10b1f0: 55 push %ebp 10b1f1: 89 e5 mov %esp,%ebp 10b1f3: 83 ec 08 sub $0x8,%esp if ( !value ) 10b1f6: 8b 55 0c mov 0xc(%ebp),%edx 10b1f9: 85 d2 test %edx,%edx 10b1fb: 74 33 je 10b230 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10b1fd: 8b 45 10 mov 0x10(%ebp),%eax 10b200: 85 c0 test %eax,%eax 10b202: 74 2c je 10b230 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b204: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b208: 76 12 jbe 10b21c case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b20a: e8 a1 8d 00 00 call 113fb0 <__errno> 10b20f: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b215: b8 ff ff ff ff mov $0xffffffff,%eax 10b21a: c9 leave 10b21b: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b21c: e8 8f 8d 00 00 call 113fb0 <__errno> 10b221: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b227: b8 ff ff ff ff mov $0xffffffff,%eax 10b22c: c9 leave 10b22d: c3 ret 10b22e: 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 ); 10b230: e8 7b 8d 00 00 call 113fb0 <__errno> 10b235: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b23b: eb d8 jmp 10b215 0010bc58 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10bc58: 55 push %ebp 10bc59: 89 e5 mov %esp,%ebp 10bc5b: 57 push %edi 10bc5c: 56 push %esi 10bc5d: 53 push %ebx 10bc5e: 83 ec 1c sub $0x1c,%esp 10bc61: 8b 5d 08 mov 0x8(%ebp),%ebx 10bc64: 8b 45 0c mov 0xc(%ebp),%eax 10bc67: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10bc6a: 85 d2 test %edx,%edx 10bc6c: 74 13 je 10bc81 *oact = _POSIX_signals_Vectors[ sig ]; 10bc6e: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10bc71: 8d 34 8d e0 9a 12 00 lea 0x129ae0(,%ecx,4),%esi 10bc78: b9 03 00 00 00 mov $0x3,%ecx 10bc7d: 89 d7 mov %edx,%edi 10bc7f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10bc81: 85 db test %ebx,%ebx 10bc83: 74 6f je 10bcf4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10bc85: 8d 53 ff lea -0x1(%ebx),%edx 10bc88: 83 fa 1f cmp $0x1f,%edx 10bc8b: 77 67 ja 10bcf4 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10bc8d: 83 fb 09 cmp $0x9,%ebx 10bc90: 74 62 je 10bcf4 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10bc92: 85 c0 test %eax,%eax 10bc94: 74 37 je 10bccd /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 10bc96: 9c pushf 10bc97: fa cli 10bc98: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10bc9b: 8b 50 08 mov 0x8(%eax),%edx 10bc9e: 85 d2 test %edx,%edx 10bca0: 74 36 je 10bcd8 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10bca2: 83 ec 0c sub $0xc,%esp 10bca5: 53 push %ebx 10bca6: 89 45 e0 mov %eax,-0x20(%ebp) 10bca9: e8 e6 53 00 00 call 111094 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10bcae: 8d 14 5b lea (%ebx,%ebx,2),%edx 10bcb1: 8d 3c 95 e0 9a 12 00 lea 0x129ae0(,%edx,4),%edi 10bcb8: b9 03 00 00 00 mov $0x3,%ecx 10bcbd: 8b 45 e0 mov -0x20(%ebp),%eax 10bcc0: 89 c6 mov %eax,%esi 10bcc2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bcc4: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10bcc7: ff 75 e4 pushl -0x1c(%ebp) 10bcca: 9d popf 10bccb: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10bccd: 8d 65 f4 lea -0xc(%ebp),%esp 10bcd0: 5b pop %ebx 10bcd1: 5e pop %esi 10bcd2: 5f pop %edi 10bcd3: c9 leave 10bcd4: c3 ret 10bcd5: 8d 76 00 lea 0x0(%esi),%esi <== 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 ]; 10bcd8: 8d 34 5b lea (%ebx,%ebx,2),%esi 10bcdb: c1 e6 02 shl $0x2,%esi 10bcde: 8d be e0 9a 12 00 lea 0x129ae0(%esi),%edi 10bce4: 81 c6 60 30 12 00 add $0x123060,%esi 10bcea: b9 03 00 00 00 mov $0x3,%ecx 10bcef: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bcf1: eb d4 jmp 10bcc7 10bcf3: 90 nop <== 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 ); 10bcf4: e8 8b 89 00 00 call 114684 <__errno> 10bcf9: c7 00 16 00 00 00 movl $0x16,(%eax) 10bcff: b8 ff ff ff ff mov $0xffffffff,%eax 10bd04: eb c7 jmp 10bccd 0010bd08 : int sigaddset( sigset_t *set, int signo ) { 10bd08: 55 push %ebp 10bd09: 89 e5 mov %esp,%ebp 10bd0b: 83 ec 08 sub $0x8,%esp 10bd0e: 8b 45 08 mov 0x8(%ebp),%eax 10bd11: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10bd14: 85 c0 test %eax,%eax 10bd16: 74 18 je 10bd30 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10bd18: 85 c9 test %ecx,%ecx 10bd1a: 74 14 je 10bd30 10bd1c: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10bd1d: 83 f9 1f cmp $0x1f,%ecx 10bd20: 77 0e ja 10bd30 rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 10bd22: ba 01 00 00 00 mov $0x1,%edx 10bd27: d3 e2 shl %cl,%edx 10bd29: 09 10 or %edx,(%eax) 10bd2b: 31 c0 xor %eax,%eax return 0; } 10bd2d: c9 leave 10bd2e: c3 ret 10bd2f: 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 ); 10bd30: e8 4f 89 00 00 call 114684 <__errno> 10bd35: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd3b: b8 ff ff ff ff mov $0xffffffff,%eax *set |= signo_to_mask(signo); return 0; } 10bd40: c9 leave 10bd41: c3 ret 0010d690 : int sigdelset( sigset_t *set, int signo ) { 10d690: 55 push %ebp 10d691: 89 e5 mov %esp,%ebp 10d693: 83 ec 08 sub $0x8,%esp 10d696: 8b 45 08 mov 0x8(%ebp),%eax 10d699: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10d69c: 85 c0 test %eax,%eax 10d69e: 74 18 je 10d6b8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d6a0: 85 c9 test %ecx,%ecx 10d6a2: 74 0f je 10d6b3 10d6a4: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10d6a5: 83 f9 1f cmp $0x1f,%ecx 10d6a8: 77 0e ja 10d6b8 rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); 10d6aa: ba fe ff ff ff mov $0xfffffffe,%edx 10d6af: d3 c2 rol %cl,%edx 10d6b1: 21 10 and %edx,(%eax) 10d6b3: 31 c0 xor %eax,%eax return 0; } 10d6b5: c9 leave 10d6b6: c3 ret 10d6b7: 90 nop <== NOT EXECUTED if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10d6b8: e8 f3 89 00 00 call 1160b0 <__errno> 10d6bd: c7 00 16 00 00 00 movl $0x16,(%eax) 10d6c3: b8 ff ff ff ff mov $0xffffffff,%eax *set &= ~signo_to_mask(signo); return 0; } 10d6c8: c9 leave 10d6c9: c3 ret 0010d724 : int sigismember( const sigset_t *set, int signo ) { 10d724: 55 push %ebp 10d725: 89 e5 mov %esp,%ebp 10d727: 83 ec 08 sub $0x8,%esp 10d72a: 8b 45 08 mov 0x8(%ebp),%eax 10d72d: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10d730: 85 c0 test %eax,%eax 10d732: 74 20 je 10d754 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d734: 85 c9 test %ecx,%ecx 10d736: 74 18 je 10d750 10d738: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10d739: 83 f9 1f cmp $0x1f,%ecx 10d73c: 77 16 ja 10d754 rtems_set_errno_and_return_minus_one( EINVAL ); 10d73e: ba 01 00 00 00 mov $0x1,%edx 10d743: d3 e2 shl %cl,%edx 10d745: 85 10 test %edx,(%eax) 10d747: 0f 95 c0 setne %al 10d74a: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d74d: c9 leave 10d74e: c3 ret 10d74f: 90 nop <== NOT EXECUTED ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d750: 31 c0 xor %eax,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d752: c9 leave 10d753: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10d754: e8 57 89 00 00 call 1160b0 <__errno> 10d759: c7 00 16 00 00 00 movl $0x16,(%eax) 10d75f: b8 ff ff ff ff mov $0xffffffff,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d764: c9 leave 10d765: c3 ret 0010d7c8 : #include int sigsuspend( const sigset_t *sigmask ) { 10d7c8: 55 push %ebp 10d7c9: 89 e5 mov %esp,%ebp 10d7cb: 56 push %esi 10d7cc: 53 push %ebx 10d7cd: 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 ); 10d7d0: 8d 5d f4 lea -0xc(%ebp),%ebx 10d7d3: 53 push %ebx 10d7d4: ff 75 08 pushl 0x8(%ebp) 10d7d7: 6a 01 push $0x1 10d7d9: e8 c6 ff ff ff call 10d7a4 (void) sigfillset( &all_signals ); 10d7de: 8d 75 f0 lea -0x10(%ebp),%esi 10d7e1: 89 34 24 mov %esi,(%esp) 10d7e4: e8 0f ff ff ff call 10d6f8 status = sigtimedwait( &all_signals, NULL, NULL ); 10d7e9: 83 c4 0c add $0xc,%esp 10d7ec: 6a 00 push $0x0 10d7ee: 6a 00 push $0x0 10d7f0: 56 push %esi 10d7f1: e8 76 00 00 00 call 10d86c 10d7f6: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10d7f8: 83 c4 0c add $0xc,%esp 10d7fb: 6a 00 push $0x0 10d7fd: 53 push %ebx 10d7fe: 6a 00 push $0x0 10d800: e8 9f ff ff ff call 10d7a4 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10d805: 83 c4 10 add $0x10,%esp 10d808: 46 inc %esi 10d809: 75 0d jne 10d818 rtems_set_errno_and_return_minus_one( EINTR ); return status; } 10d80b: b8 ff ff ff ff mov $0xffffffff,%eax 10d810: 8d 65 f8 lea -0x8(%ebp),%esp 10d813: 5b pop %ebx 10d814: 5e pop %esi 10d815: c9 leave 10d816: c3 ret 10d817: 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 ); 10d818: e8 93 88 00 00 call 1160b0 <__errno> 10d81d: c7 00 04 00 00 00 movl $0x4,(%eax) 10d823: eb e6 jmp 10d80b 0010c004 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10c004: 55 push %ebp 10c005: 89 e5 mov %esp,%ebp 10c007: 57 push %edi 10c008: 56 push %esi 10c009: 53 push %ebx 10c00a: 83 ec 2c sub $0x2c,%esp 10c00d: 8b 75 08 mov 0x8(%ebp),%esi 10c010: 8b 5d 0c mov 0xc(%ebp),%ebx 10c013: 8b 7d 10 mov 0x10(%ebp),%edi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10c016: 85 f6 test %esi,%esi 10c018: 0f 84 7a 01 00 00 je 10c198 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10c01e: 85 ff test %edi,%edi 10c020: 0f 84 1e 01 00 00 je 10c144 if ( !_Timespec_Is_valid( timeout ) ) 10c026: 83 ec 0c sub $0xc,%esp 10c029: 57 push %edi 10c02a: e8 91 34 00 00 call 10f4c0 <_Timespec_Is_valid> 10c02f: 83 c4 10 add $0x10,%esp 10c032: 84 c0 test %al,%al 10c034: 0f 84 5e 01 00 00 je 10c198 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10c03a: 83 ec 0c sub $0xc,%esp 10c03d: 57 push %edi 10c03e: e8 e1 34 00 00 call 10f524 <_Timespec_To_ticks> if ( !interval ) 10c043: 83 c4 10 add $0x10,%esp 10c046: 85 c0 test %eax,%eax 10c048: 0f 84 4a 01 00 00 je 10c198 /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c04e: 85 db test %ebx,%ebx 10c050: 0f 84 f8 00 00 00 je 10c14e the_thread = _Thread_Executing; 10c056: 8b 15 98 99 12 00 mov 0x129998,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c05c: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10c062: 9c pushf 10c063: fa cli 10c064: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10c067: 8b 0e mov (%esi),%ecx 10c069: 89 4d d4 mov %ecx,-0x2c(%ebp) 10c06c: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx 10c072: 85 4d d4 test %ecx,-0x2c(%ebp) 10c075: 0f 85 dd 00 00 00 jne 10c158 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10c07b: 8b 0d a0 a0 12 00 mov 0x12a0a0,%ecx 10c081: 85 4d d4 test %ecx,-0x2c(%ebp) 10c084: 75 7e jne 10c104 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10c086: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10c08c: 8b 0d d8 98 12 00 mov 0x1298d8,%ecx 10c092: 41 inc %ecx 10c093: 89 0d d8 98 12 00 mov %ecx,0x1298d8 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10c099: c7 42 44 60 a0 12 00 movl $0x12a060,0x44(%edx) the_thread->Wait.return_code = EINTR; 10c0a0: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10c0a7: 8b 0e mov (%esi),%ecx 10c0a9: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10c0ac: 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; 10c0af: c7 05 90 a0 12 00 01 movl $0x1,0x12a090 10c0b6: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10c0b9: ff 75 d0 pushl -0x30(%ebp) 10c0bc: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10c0bd: 52 push %edx 10c0be: 68 64 f0 10 00 push $0x10f064 10c0c3: 50 push %eax 10c0c4: 68 60 a0 12 00 push $0x12a060 10c0c9: e8 86 2c 00 00 call 10ed54 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c0ce: e8 71 27 00 00 call 10e844 <_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 ); 10c0d3: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c0da: 6a 00 push $0x0 10c0dc: 53 push %ebx 10c0dd: ff 33 pushl (%ebx) 10c0df: 57 push %edi 10c0e0: e8 3b 56 00 00 call 111720 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10c0e5: 83 c4 20 add $0x20,%esp 10c0e8: e8 df 88 00 00 call 1149cc <__errno> 10c0ed: 8b 15 98 99 12 00 mov 0x129998,%edx 10c0f3: 8b 52 34 mov 0x34(%edx),%edx 10c0f6: 89 10 mov %edx,(%eax) return the_info->si_signo; 10c0f8: 8b 33 mov (%ebx),%esi } 10c0fa: 89 f0 mov %esi,%eax 10c0fc: 8d 65 f4 lea -0xc(%ebp),%esp 10c0ff: 5b pop %ebx 10c100: 5e pop %esi 10c101: 5f pop %edi 10c102: c9 leave 10c103: c3 ret } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10c104: 83 ec 0c sub $0xc,%esp 10c107: 51 push %ecx 10c108: e8 b3 fe ff ff call 10bfc0 <_POSIX_signals_Get_highest> 10c10d: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10c10f: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c116: 6a 01 push $0x1 10c118: 53 push %ebx 10c119: 50 push %eax 10c11a: 57 push %edi 10c11b: e8 00 56 00 00 call 111720 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10c120: ff 75 d0 pushl -0x30(%ebp) 10c123: 9d popf the_info->si_signo = signo; 10c124: 89 33 mov %esi,(%ebx) the_info->si_code = SI_USER; 10c126: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c12d: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10c134: 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; } 10c137: 89 f0 mov %esi,%eax 10c139: 8d 65 f4 lea -0xc(%ebp),%esp 10c13c: 5b pop %ebx 10c13d: 5e pop %esi 10c13e: 5f pop %edi 10c13f: c9 leave 10c140: c3 ret 10c141: 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 ); 10c144: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c146: 85 db test %ebx,%ebx 10c148: 0f 85 08 ff ff ff jne 10c056 10c14e: 8d 5d dc lea -0x24(%ebp),%ebx 10c151: e9 00 ff ff ff jmp 10c056 10c156: 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 ); 10c158: 83 ec 0c sub $0xc,%esp 10c15b: 51 push %ecx 10c15c: e8 5f fe ff ff call 10bfc0 <_POSIX_signals_Get_highest> 10c161: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10c163: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c16a: 6a 00 push $0x0 10c16c: 53 push %ebx 10c16d: 50 push %eax 10c16e: 57 push %edi 10c16f: e8 ac 55 00 00 call 111720 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10c174: ff 75 d0 pushl -0x30(%ebp) 10c177: 9d popf the_info->si_code = SI_USER; 10c178: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c17f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10c186: 8b 33 mov (%ebx),%esi 10c188: 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; } 10c18b: 89 f0 mov %esi,%eax 10c18d: 8d 65 f4 lea -0xc(%ebp),%esp 10c190: 5b pop %ebx 10c191: 5e pop %esi 10c192: 5f pop %edi 10c193: c9 leave 10c194: c3 ret 10c195: 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 ); 10c198: e8 2f 88 00 00 call 1149cc <__errno> 10c19d: c7 00 16 00 00 00 movl $0x16,(%eax) 10c1a3: be ff ff ff ff mov $0xffffffff,%esi 10c1a8: e9 4d ff ff ff jmp 10c0fa 0010da30 : int sigwait( const sigset_t *set, int *sig ) { 10da30: 55 push %ebp 10da31: 89 e5 mov %esp,%ebp 10da33: 53 push %ebx 10da34: 83 ec 08 sub $0x8,%esp 10da37: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10da3a: 6a 00 push $0x0 10da3c: 6a 00 push $0x0 10da3e: ff 75 08 pushl 0x8(%ebp) 10da41: e8 26 fe ff ff call 10d86c if ( status != -1 ) { 10da46: 83 c4 10 add $0x10,%esp 10da49: 83 f8 ff cmp $0xffffffff,%eax 10da4c: 74 0e je 10da5c if ( sig ) 10da4e: 85 db test %ebx,%ebx 10da50: 74 02 je 10da54 *sig = status; 10da52: 89 03 mov %eax,(%ebx) 10da54: 31 c0 xor %eax,%eax return 0; } return errno; } 10da56: 8b 5d fc mov -0x4(%ebp),%ebx 10da59: c9 leave 10da5a: c3 ret 10da5b: 90 nop <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 10da5c: e8 4f 86 00 00 call 1160b0 <__errno> 10da61: 8b 00 mov (%eax),%eax } 10da63: 8b 5d fc mov -0x4(%ebp),%ebx 10da66: c9 leave 10da67: c3 ret 0010b0b0 : */ long sysconf( int name ) { 10b0b0: 55 push %ebp 10b0b1: 89 e5 mov %esp,%ebp 10b0b3: 83 ec 08 sub $0x8,%esp 10b0b6: 8b 45 08 mov 0x8(%ebp),%eax if ( name == _SC_CLK_TCK ) 10b0b9: 83 f8 02 cmp $0x2,%eax 10b0bc: 74 16 je 10b0d4 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 10b0be: 83 f8 04 cmp $0x4,%eax 10b0c1: 74 21 je 10b0e4 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b0c3: 83 f8 33 cmp $0x33,%eax 10b0c6: 74 24 je 10b0ec return 1024; if ( name == _SC_PAGESIZE ) 10b0c8: 83 f8 08 cmp $0x8,%eax 10b0cb: 75 27 jne 10b0f4 10b0cd: 66 b8 00 10 mov $0x1000,%ax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b0d1: c9 leave 10b0d2: c3 ret 10b0d3: 90 nop <== NOT EXECUTED long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 10b0d4: b8 40 42 0f 00 mov $0xf4240,%eax 10b0d9: 31 d2 xor %edx,%edx 10b0db: f7 35 4c 46 12 00 divl 0x12464c if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b0e1: c9 leave 10b0e2: c3 ret 10b0e3: 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; 10b0e4: a1 2c 45 12 00 mov 0x12452c,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b0e9: c9 leave 10b0ea: c3 ret 10b0eb: 90 nop <== NOT EXECUTED rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b0ec: 66 b8 00 04 mov $0x400,%ax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b0f0: c9 leave 10b0f1: c3 ret 10b0f2: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b0f4: e8 77 8d 00 00 call 113e70 <__errno> 10b0f9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b0ff: b8 ff ff ff ff mov $0xffffffff,%eax } 10b104: c9 leave 10b105: c3 ret 0010b3e0 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10b3e0: 55 push %ebp 10b3e1: 89 e5 mov %esp,%ebp 10b3e3: 56 push %esi 10b3e4: 53 push %ebx 10b3e5: 8b 5d 0c mov 0xc(%ebp),%ebx 10b3e8: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10b3eb: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10b3ef: 0f 85 db 00 00 00 jne 10b4d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10b3f5: 85 f6 test %esi,%esi 10b3f7: 0f 84 d3 00 00 00 je 10b4d0 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10b3fd: 85 db test %ebx,%ebx 10b3ff: 74 21 je 10b422 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10b401: 8b 03 mov (%ebx),%eax 10b403: 48 dec %eax 10b404: 83 f8 01 cmp $0x1,%eax 10b407: 0f 87 c3 00 00 00 ja 10b4d0 ( 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 ) 10b40d: 8b 43 04 mov 0x4(%ebx),%eax 10b410: 85 c0 test %eax,%eax 10b412: 0f 84 b8 00 00 00 je 10b4d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10b418: 48 dec %eax 10b419: 83 f8 1f cmp $0x1f,%eax 10b41c: 0f 87 ae 00 00 00 ja 10b4d0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b422: a1 18 95 12 00 mov 0x129518,%eax 10b427: 40 inc %eax 10b428: a3 18 95 12 00 mov %eax,0x129518 * 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 ); 10b42d: 83 ec 0c sub $0xc,%esp 10b430: 68 a0 98 12 00 push $0x1298a0 10b435: e8 2a 1e 00 00 call 10d264 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10b43a: 83 c4 10 add $0x10,%esp 10b43d: 85 c0 test %eax,%eax 10b43f: 0f 84 a2 00 00 00 je 10b4e7 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; 10b445: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10b449: 8b 15 d8 95 12 00 mov 0x1295d8,%edx 10b44f: 8b 52 08 mov 0x8(%edx),%edx 10b452: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10b455: 85 db test %ebx,%ebx 10b457: 74 11 je 10b46a ptimer->inf.sigev_notify = evp->sigev_notify; 10b459: 8b 13 mov (%ebx),%edx 10b45b: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10b45e: 8b 53 04 mov 0x4(%ebx),%edx 10b461: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10b464: 8b 53 08 mov 0x8(%ebx),%edx 10b467: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10b46a: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10b471: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10b478: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10b47f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10b486: 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; 10b48d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b494: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b49b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b4a2: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b4a9: 8b 50 08 mov 0x8(%eax),%edx 10b4ac: 0f b7 da movzwl %dx,%ebx 10b4af: 8b 0d bc 98 12 00 mov 0x1298bc,%ecx 10b4b5: 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; 10b4b8: 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; 10b4bf: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b4c1: e8 c2 2a 00 00 call 10df88 <_Thread_Enable_dispatch> 10b4c6: 31 c0 xor %eax,%eax return 0; } 10b4c8: 8d 65 f8 lea -0x8(%ebp),%esp 10b4cb: 5b pop %ebx 10b4cc: 5e pop %esi 10b4cd: c9 leave 10b4ce: c3 ret 10b4cf: 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 ); 10b4d0: e8 e3 8e 00 00 call 1143b8 <__errno> 10b4d5: c7 00 16 00 00 00 movl $0x16,(%eax) 10b4db: 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; } 10b4e0: 8d 65 f8 lea -0x8(%ebp),%esp 10b4e3: 5b pop %ebx 10b4e4: 5e pop %esi 10b4e5: c9 leave 10b4e6: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10b4e7: e8 9c 2a 00 00 call 10df88 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10b4ec: e8 c7 8e 00 00 call 1143b8 <__errno> 10b4f1: c7 00 0b 00 00 00 movl $0xb,(%eax) 10b4f7: b8 ff ff ff ff mov $0xffffffff,%eax 10b4fc: eb ca jmp 10b4c8 0010b8d0 : int timer_delete( timer_t timerid ) { 10b8d0: 55 push %ebp 10b8d1: 89 e5 mov %esp,%ebp 10b8d3: 53 push %ebx 10b8d4: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10b8d7: 8d 45 f4 lea -0xc(%ebp),%eax 10b8da: 50 push %eax 10b8db: ff 75 08 pushl 0x8(%ebp) 10b8de: 68 c0 99 12 00 push $0x1299c0 10b8e3: e8 34 21 00 00 call 10da1c <_Objects_Get> 10b8e8: 89 c3 mov %eax,%ebx */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b8ea: 83 c4 10 add $0x10,%esp 10b8ed: 8b 4d f4 mov -0xc(%ebp),%ecx 10b8f0: 85 c9 test %ecx,%ecx 10b8f2: 74 18 je 10b90c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b8f4: e8 8b 91 00 00 call 114a84 <__errno> 10b8f9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b8ff: b8 ff ff ff ff mov $0xffffffff,%eax } 10b904: 8b 5d fc mov -0x4(%ebp),%ebx 10b907: c9 leave 10b908: c3 ret 10b909: 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 ); 10b90c: 83 ec 08 sub $0x8,%esp 10b90f: 50 push %eax 10b910: 68 c0 99 12 00 push $0x1299c0 10b915: e8 ce 1c 00 00 call 10d5e8 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10b91a: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10b91e: 8d 43 10 lea 0x10(%ebx),%eax 10b921: 89 04 24 mov %eax,(%esp) 10b924: e8 ab 3a 00 00 call 10f3d4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10b929: 58 pop %eax 10b92a: 5a pop %edx 10b92b: 53 push %ebx 10b92c: 68 c0 99 12 00 push $0x1299c0 10b931: e8 b6 1f 00 00 call 10d8ec <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10b936: e8 55 29 00 00 call 10e290 <_Thread_Enable_dispatch> 10b93b: 31 c0 xor %eax,%eax return 0; 10b93d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b940: 8b 5d fc mov -0x4(%ebp),%ebx 10b943: c9 leave 10b944: c3 ret 0010c7f8 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10c7f8: 55 push %ebp 10c7f9: 89 e5 mov %esp,%ebp 10c7fb: 53 push %ebx 10c7fc: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10c7ff: 8d 45 f4 lea -0xc(%ebp),%eax 10c802: 50 push %eax 10c803: ff 75 08 pushl 0x8(%ebp) 10c806: 68 c0 b1 12 00 push $0x12b1c0 10c80b: e8 bc 20 00 00 call 10e8cc <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c810: 83 c4 10 add $0x10,%esp 10c813: 8b 55 f4 mov -0xc(%ebp),%edx 10c816: 85 d2 test %edx,%edx 10c818: 74 1a je 10c834 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c81a: e8 49 8d 00 00 call 115568 <__errno> 10c81f: c7 00 16 00 00 00 movl $0x16,(%eax) 10c825: bb ff ff ff ff mov $0xffffffff,%ebx } 10c82a: 89 d8 mov %ebx,%eax 10c82c: 8b 5d fc mov -0x4(%ebp),%ebx 10c82f: c9 leave 10c830: c3 ret 10c831: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10c834: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10c837: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10c83e: e8 fd 28 00 00 call 10f140 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c843: 89 d8 mov %ebx,%eax 10c845: 8b 5d fc mov -0x4(%ebp),%ebx 10c848: c9 leave 10c849: c3 ret 0010c84c : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10c84c: 55 push %ebp 10c84d: 89 e5 mov %esp,%ebp 10c84f: 56 push %esi 10c850: 53 push %ebx 10c851: 83 ec 10 sub $0x10,%esp 10c854: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10c857: 85 db test %ebx,%ebx 10c859: 74 65 je 10c8c0 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10c85b: 83 ec 0c sub $0xc,%esp 10c85e: 8d 45 ec lea -0x14(%ebp),%eax 10c861: 50 push %eax 10c862: e8 cd 16 00 00 call 10df34 <_TOD_Get> 10c867: 83 c4 0c add $0xc,%esp 10c86a: 8d 45 f4 lea -0xc(%ebp),%eax 10c86d: 50 push %eax 10c86e: ff 75 08 pushl 0x8(%ebp) 10c871: 68 c0 b1 12 00 push $0x12b1c0 10c876: e8 51 20 00 00 call 10e8cc <_Objects_Get> 10c87b: 89 c6 mov %eax,%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c87d: 83 c4 10 add $0x10,%esp 10c880: 8b 45 f4 mov -0xc(%ebp),%eax 10c883: 85 c0 test %eax,%eax 10c885: 75 39 jne 10c8c0 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10c887: a1 a4 af 12 00 mov 0x12afa4,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10c88c: 83 ec 08 sub $0x8,%esp 10c88f: 8d 53 08 lea 0x8(%ebx),%edx 10c892: 52 push %edx 10c893: 8b 56 1c mov 0x1c(%esi),%edx 10c896: 03 56 24 add 0x24(%esi),%edx 10c899: 29 c2 sub %eax,%edx 10c89b: 52 push %edx 10c89c: e8 1b 35 00 00 call 10fdbc <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10c8a1: 8b 46 54 mov 0x54(%esi),%eax 10c8a4: 8b 56 58 mov 0x58(%esi),%edx 10c8a7: 89 03 mov %eax,(%ebx) 10c8a9: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10c8ac: e8 8f 28 00 00 call 10f140 <_Thread_Enable_dispatch> 10c8b1: 31 c0 xor %eax,%eax return 0; 10c8b3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c8b6: 8d 65 f8 lea -0x8(%ebp),%esp 10c8b9: 5b pop %ebx 10c8ba: 5e pop %esi 10c8bb: c9 leave 10c8bc: c3 ret 10c8bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c8c0: e8 a3 8c 00 00 call 115568 <__errno> 10c8c5: c7 00 16 00 00 00 movl $0x16,(%eax) 10c8cb: b8 ff ff ff ff mov $0xffffffff,%eax 10c8d0: eb e4 jmp 10c8b6 0010b500 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10b500: 55 push %ebp 10b501: 89 e5 mov %esp,%ebp 10b503: 57 push %edi 10b504: 56 push %esi 10b505: 53 push %ebx 10b506: 83 ec 3c sub $0x3c,%esp 10b509: 8b 4d 0c mov 0xc(%ebp),%ecx 10b50c: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10b50f: 85 db test %ebx,%ebx 10b511: 0f 84 39 01 00 00 je 10b650 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 10b517: 81 7b 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%ebx) 10b51e: 0f 87 2c 01 00 00 ja 10b650 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 10b524: 81 7b 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%ebx) 10b52b: 0f 87 1f 01 00 00 ja 10b650 ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10b531: 83 f9 04 cmp $0x4,%ecx 10b534: 0f 84 da 00 00 00 je 10b614 10b53a: 85 c9 test %ecx,%ecx 10b53c: 0f 85 0e 01 00 00 jne 10b650 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b542: 8d 45 cc lea -0x34(%ebp),%eax 10b545: 89 45 c4 mov %eax,-0x3c(%ebp) 10b548: b9 04 00 00 00 mov $0x4,%ecx 10b54d: 89 c7 mov %eax,%edi 10b54f: 89 de mov %ebx,%esi 10b551: f3 a5 rep movsl %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10b553: 50 push %eax 10b554: 8d 45 e4 lea -0x1c(%ebp),%eax 10b557: 50 push %eax 10b558: ff 75 08 pushl 0x8(%ebp) 10b55b: 68 a0 98 12 00 push $0x1298a0 10b560: e8 af 21 00 00 call 10d714 <_Objects_Get> 10b565: 89 c2 mov %eax,%edx * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b567: 83 c4 10 add $0x10,%esp 10b56a: 8b 7d e4 mov -0x1c(%ebp),%edi 10b56d: 85 ff test %edi,%edi 10b56f: 0f 85 db 00 00 00 jne 10b650 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 ) { 10b575: 8b 75 d4 mov -0x2c(%ebp),%esi 10b578: 85 f6 test %esi,%esi 10b57a: 75 0b jne 10b587 10b57c: 8b 4d d8 mov -0x28(%ebp),%ecx 10b57f: 85 c9 test %ecx,%ecx 10b581: 0f 84 e1 00 00 00 je 10b668 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10b587: 83 ec 0c sub $0xc,%esp 10b58a: 53 push %ebx 10b58b: 89 55 c0 mov %edx,-0x40(%ebp) 10b58e: e8 d1 36 00 00 call 10ec64 <_Timespec_To_ticks> 10b593: 8b 55 c0 mov -0x40(%ebp),%edx 10b596: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10b599: 8d 45 d4 lea -0x2c(%ebp),%eax 10b59c: 89 04 24 mov %eax,(%esp) 10b59f: e8 c0 36 00 00 call 10ec64 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10b5a4: 8b 55 c0 mov -0x40(%ebp),%edx 10b5a7: 89 14 24 mov %edx,(%esp) 10b5aa: 68 d4 b6 10 00 push $0x10b6d4 10b5af: ff 72 08 pushl 0x8(%edx) 10b5b2: 50 push %eax 10b5b3: 8d 42 10 lea 0x10(%edx),%eax 10b5b6: 50 push %eax 10b5b7: e8 cc 5a 00 00 call 111088 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10b5bc: 83 c4 20 add $0x20,%esp 10b5bf: 84 c0 test %al,%al 10b5c1: 8b 55 c0 mov -0x40(%ebp),%edx 10b5c4: 0f 84 ea 00 00 00 je 10b6b4 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10b5ca: 8b 45 14 mov 0x14(%ebp),%eax 10b5cd: 85 c0 test %eax,%eax 10b5cf: 0f 84 ef 00 00 00 je 10b6c4 *ovalue = ptimer->timer_data; 10b5d5: 8d 42 54 lea 0x54(%edx),%eax 10b5d8: b9 04 00 00 00 mov $0x4,%ecx 10b5dd: 8b 7d 14 mov 0x14(%ebp),%edi 10b5e0: 89 c6 mov %eax,%esi 10b5e2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10b5e4: b9 04 00 00 00 mov $0x4,%ecx 10b5e9: 89 c7 mov %eax,%edi 10b5eb: 8b 75 c4 mov -0x3c(%ebp),%esi 10b5ee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b5f0: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10b5f4: 83 ec 0c sub $0xc,%esp 10b5f7: 83 c2 6c add $0x6c,%edx 10b5fa: 52 push %edx 10b5fb: e8 a0 17 00 00 call 10cda0 <_TOD_Get> _Thread_Enable_dispatch(); 10b600: e8 83 29 00 00 call 10df88 <_Thread_Enable_dispatch> 10b605: 31 c0 xor %eax,%eax return 0; 10b607: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b60a: 8d 65 f4 lea -0xc(%ebp),%esp 10b60d: 5b pop %ebx 10b60e: 5e pop %esi 10b60f: 5f pop %edi 10b610: c9 leave 10b611: c3 ret 10b612: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b614: 8d 45 cc lea -0x34(%ebp),%eax 10b617: 89 45 c4 mov %eax,-0x3c(%ebp) 10b61a: 89 c7 mov %eax,%edi 10b61c: 89 de mov %ebx,%esi 10b61e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10b620: 83 ec 0c sub $0xc,%esp 10b623: 8d 75 dc lea -0x24(%ebp),%esi 10b626: 56 push %esi 10b627: e8 74 17 00 00 call 10cda0 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10b62c: 59 pop %ecx 10b62d: 5f pop %edi 10b62e: 8d 7d d4 lea -0x2c(%ebp),%edi 10b631: 57 push %edi 10b632: 56 push %esi 10b633: e8 cc 35 00 00 call 10ec04 <_Timespec_Greater_than> 10b638: 83 c4 10 add $0x10,%esp 10b63b: 84 c0 test %al,%al 10b63d: 75 11 jne 10b650 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10b63f: 52 push %edx 10b640: 57 push %edi 10b641: 57 push %edi 10b642: 56 push %esi 10b643: e8 e0 35 00 00 call 10ec28 <_Timespec_Subtract> 10b648: 83 c4 10 add $0x10,%esp 10b64b: e9 03 ff ff ff jmp 10b553 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b650: e8 63 8d 00 00 call 1143b8 <__errno> 10b655: c7 00 16 00 00 00 movl $0x16,(%eax) 10b65b: b8 ff ff ff ff mov $0xffffffff,%eax } 10b660: 8d 65 f4 lea -0xc(%ebp),%esp 10b663: 5b pop %ebx 10b664: 5e pop %esi 10b665: 5f pop %edi 10b666: c9 leave 10b667: c3 ret case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10b668: 83 ec 0c sub $0xc,%esp 10b66b: 8d 40 10 lea 0x10(%eax),%eax 10b66e: 50 push %eax 10b66f: 89 55 c0 mov %edx,-0x40(%ebp) 10b672: e8 0d 3a 00 00 call 10f084 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10b677: 83 c4 10 add $0x10,%esp 10b67a: 8b 55 14 mov 0x14(%ebp),%edx 10b67d: 85 d2 test %edx,%edx 10b67f: 8b 55 c0 mov -0x40(%ebp),%edx 10b682: 74 48 je 10b6cc *ovalue = ptimer->timer_data; 10b684: 8d 42 54 lea 0x54(%edx),%eax 10b687: b9 04 00 00 00 mov $0x4,%ecx 10b68c: 8b 7d 14 mov 0x14(%ebp),%edi 10b68f: 89 c6 mov %eax,%esi 10b691: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10b693: b9 04 00 00 00 mov $0x4,%ecx 10b698: 89 c7 mov %eax,%edi 10b69a: 8b 75 c4 mov -0x3c(%ebp),%esi 10b69d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b69f: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10b6a3: e8 e0 28 00 00 call 10df88 <_Thread_Enable_dispatch> 10b6a8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b6aa: 8d 65 f4 lea -0xc(%ebp),%esp 10b6ad: 5b pop %ebx 10b6ae: 5e pop %esi 10b6af: 5f pop %edi 10b6b0: c9 leave 10b6b1: c3 ret 10b6b2: 66 90 xchg %ax,%ax <== NOT EXECUTED ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10b6b4: e8 cf 28 00 00 call 10df88 <_Thread_Enable_dispatch> 10b6b9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b6bb: 8d 65 f4 lea -0xc(%ebp),%esp 10b6be: 5b pop %ebx 10b6bf: 5e pop %esi 10b6c0: 5f pop %edi 10b6c1: c9 leave 10b6c2: c3 ret 10b6c3: 90 nop <== NOT EXECUTED 10b6c4: 8d 42 54 lea 0x54(%edx),%eax 10b6c7: e9 18 ff ff ff jmp 10b5e4 10b6cc: 8d 42 54 lea 0x54(%edx),%eax 10b6cf: eb c2 jmp 10b693 00110428 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 110428: 55 push %ebp 110429: 89 e5 mov %esp,%ebp 11042b: 57 push %edi 11042c: 56 push %esi 11042d: 53 push %ebx 11042e: 83 ec 2c sub $0x2c,%esp 110431: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 110434: 8b 0d 9c 80 12 00 mov 0x12809c,%ecx 11043a: 85 c9 test %ecx,%ecx 11043c: 0f 84 8e 00 00 00 je 1104d0 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 110442: 83 ec 0c sub $0xc,%esp 110445: 68 80 80 12 00 push $0x128080 11044a: e8 29 e1 ff ff call 10e578 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 11044f: 83 e8 02 sub $0x2,%eax 110452: 83 c4 10 add $0x10,%esp 110455: 83 f8 01 cmp $0x1,%eax 110458: 0f 86 a2 00 00 00 jbe 110500 11045e: 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 ) { 110460: 85 db test %ebx,%ebx 110462: 74 62 je 1104c6 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 110464: ba 83 de 1b 43 mov $0x431bde83,%edx 110469: 89 d8 mov %ebx,%eax 11046b: f7 e2 mul %edx 11046d: c1 ea 12 shr $0x12,%edx 110470: 89 55 e0 mov %edx,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 110473: 8d 04 92 lea (%edx,%edx,4),%eax 110476: 8d 04 80 lea (%eax,%eax,4),%eax 110479: 8d 04 80 lea (%eax,%eax,4),%eax 11047c: 8d 04 80 lea (%eax,%eax,4),%eax 11047f: 8d 04 80 lea (%eax,%eax,4),%eax 110482: 8d 04 80 lea (%eax,%eax,4),%eax 110485: c1 e0 06 shl $0x6,%eax 110488: 29 c3 sub %eax,%ebx 11048a: 8d 04 9b lea (%ebx,%ebx,4),%eax 11048d: 8d 04 80 lea (%eax,%eax,4),%eax 110490: 8d 04 80 lea (%eax,%eax,4),%eax 110493: c1 e0 03 shl $0x3,%eax 110496: 89 45 e4 mov %eax,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 110499: 83 ec 0c sub $0xc,%esp 11049c: 8d 5d e0 lea -0x20(%ebp),%ebx 11049f: 53 push %ebx 1104a0: e8 17 10 00 00 call 1114bc <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 1104a5: 89 1c 24 mov %ebx,(%esp) 1104a8: e8 0f 10 00 00 call 1114bc <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1104ad: a3 8c 80 12 00 mov %eax,0x12808c _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1104b2: 58 pop %eax 1104b3: 5a pop %edx 1104b4: 68 80 80 12 00 push $0x128080 1104b9: 68 f8 77 12 00 push $0x1277f8 1104be: e8 7d df ff ff call 10e440 <_Watchdog_Insert> 1104c3: 83 c4 10 add $0x10,%esp } return remaining; } 1104c6: 89 f0 mov %esi,%eax 1104c8: 8d 65 f4 lea -0xc(%ebp),%esp 1104cb: 5b pop %ebx 1104cc: 5e pop %esi 1104cd: 5f pop %edi 1104ce: c9 leave 1104cf: c3 ret Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1104d0: c7 05 88 80 12 00 00 movl $0x0,0x128088 1104d7: 00 00 00 the_watchdog->routine = routine; 1104da: c7 05 9c 80 12 00 5c movl $0x11055c,0x12809c 1104e1: 05 11 00 the_watchdog->id = id; 1104e4: c7 05 a0 80 12 00 00 movl $0x0,0x1280a0 1104eb: 00 00 00 the_watchdog->user_data = user_data; 1104ee: c7 05 a4 80 12 00 00 movl $0x0,0x1280a4 1104f5: 00 00 00 1104f8: 31 f6 xor %esi,%esi 1104fa: e9 61 ff ff ff jmp 110460 1104ff: 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); 110500: a1 94 80 12 00 mov 0x128094,%eax 110505: 03 05 8c 80 12 00 add 0x12808c,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 11050b: 83 ec 08 sub $0x8,%esp 11050e: 8d 55 e0 lea -0x20(%ebp),%edx 110511: 52 push %edx 110512: 2b 05 98 80 12 00 sub 0x128098,%eax 110518: 50 push %eax 110519: e8 56 0f 00 00 call 111474 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 11051e: 8b 45 e0 mov -0x20(%ebp),%eax 110521: 8d 04 80 lea (%eax,%eax,4),%eax 110524: 8d 04 80 lea (%eax,%eax,4),%eax 110527: 8d 04 80 lea (%eax,%eax,4),%eax 11052a: 8d 04 80 lea (%eax,%eax,4),%eax 11052d: 8d 04 80 lea (%eax,%eax,4),%eax 110530: 8d 3c 80 lea (%eax,%eax,4),%edi 110533: c1 e7 06 shl $0x6,%edi remaining += tp.tv_nsec / 1000; 110536: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 11053b: 8b 45 e4 mov -0x1c(%ebp),%eax 11053e: f7 e9 imul %ecx 110540: 89 45 d0 mov %eax,-0x30(%ebp) 110543: 89 55 d4 mov %edx,-0x2c(%ebp) 110546: 8b 75 d4 mov -0x2c(%ebp),%esi 110549: c1 fe 06 sar $0x6,%esi 11054c: 8b 45 e4 mov -0x1c(%ebp),%eax 11054f: 99 cltd 110550: 29 d6 sub %edx,%esi 110552: 01 fe add %edi,%esi 110554: 83 c4 10 add $0x10,%esp 110557: e9 04 ff ff ff jmp 110460