=============================================================================== 00100200 <_Barrier_Manager_initialization>: #include #include #include void _Barrier_Manager_initialization(void) { 100200: 55 push %ebp 100201: 89 e5 mov %esp,%ebp } 100203: c9 leave 100204: c3 ret =============================================================================== 0010cedc <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10cedc: 55 push %ebp 10cedd: 89 e5 mov %esp,%ebp 10cedf: 57 push %edi 10cee0: 56 push %esi 10cee1: 53 push %ebx 10cee2: 83 ec 1c sub $0x1c,%esp 10cee5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cee8: 8b 4d 0c mov 0xc(%ebp),%ecx 10ceeb: 8b 45 14 mov 0x14(%ebp),%eax 10ceee: 89 45 e4 mov %eax,-0x1c(%ebp) 10cef1: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10cef4: 8b 35 dc 92 12 00 mov 0x1292dc,%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 ); 10cefa: 9c pushf 10cefb: fa cli 10cefc: 5f pop %edi switch ( the_rwlock->current_state ) { 10cefd: 8b 43 44 mov 0x44(%ebx),%eax 10cf00: 85 c0 test %eax,%eax 10cf02: 74 05 je 10cf09 <_CORE_RWLock_Obtain_for_reading+0x2d> 10cf04: 48 dec %eax 10cf05: 75 35 jne 10cf3c <_CORE_RWLock_Obtain_for_reading+0x60> 10cf07: eb 09 jmp 10cf12 <_CORE_RWLock_Obtain_for_reading+0x36> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10cf09: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10cf10: eb 1c jmp 10cf2e <_CORE_RWLock_Obtain_for_reading+0x52> 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 ); 10cf12: 83 ec 0c sub $0xc,%esp 10cf15: 53 push %ebx 10cf16: 88 55 dc mov %dl,-0x24(%ebp) 10cf19: 89 4d e0 mov %ecx,-0x20(%ebp) 10cf1c: e8 77 1a 00 00 call 10e998 <_Thread_queue_First> if ( !waiter ) { 10cf21: 83 c4 10 add $0x10,%esp 10cf24: 85 c0 test %eax,%eax 10cf26: 8a 55 dc mov -0x24(%ebp),%dl 10cf29: 8b 4d e0 mov -0x20(%ebp),%ecx 10cf2c: 75 0e jne 10cf3c <_CORE_RWLock_Obtain_for_reading+0x60><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10cf2e: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10cf31: 57 push %edi 10cf32: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cf33: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10cf3a: eb 48 jmp 10cf84 <_CORE_RWLock_Obtain_for_reading+0xa8> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10cf3c: 84 d2 test %dl,%dl 10cf3e: 75 0b jne 10cf4b <_CORE_RWLock_Obtain_for_reading+0x6f> _ISR_Enable( level ); 10cf40: 57 push %edi 10cf41: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10cf42: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) 10cf49: eb 39 jmp 10cf84 <_CORE_RWLock_Obtain_for_reading+0xa8> 10cf4b: 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; 10cf52: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10cf55: 89 4e 20 mov %ecx,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10cf58: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cf5f: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10cf66: 57 push %edi 10cf67: 9d popf _Thread_queue_Enqueue_with_handler( 10cf68: c7 45 10 b0 d0 10 00 movl $0x10d0b0,0x10(%ebp) 10cf6f: 8b 45 e4 mov -0x1c(%ebp),%eax 10cf72: 89 45 0c mov %eax,0xc(%ebp) 10cf75: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf78: 8d 65 f4 lea -0xc(%ebp),%esp 10cf7b: 5b pop %ebx 10cf7c: 5e pop %esi 10cf7d: 5f pop %edi 10cf7e: 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( 10cf7f: e9 54 17 00 00 jmp 10e6d8 <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf84: 8d 65 f4 lea -0xc(%ebp),%esp 10cf87: 5b pop %ebx 10cf88: 5e pop %esi 10cf89: 5f pop %edi 10cf8a: c9 leave 10cf8b: c3 ret =============================================================================== 0010d010 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10d010: 55 push %ebp 10d011: 89 e5 mov %esp,%ebp 10d013: 53 push %ebx 10d014: 83 ec 04 sub $0x4,%esp 10d017: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10d01a: 8b 15 dc 92 12 00 mov 0x1292dc,%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 ); 10d020: 9c pushf 10d021: fa cli 10d022: 58 pop %eax if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10d023: 8b 4b 44 mov 0x44(%ebx),%ecx 10d026: 85 c9 test %ecx,%ecx 10d028: 75 0b jne 10d035 <_CORE_RWLock_Release+0x25> _ISR_Enable( level ); 10d02a: 50 push %eax 10d02b: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10d02c: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) return CORE_RWLOCK_SUCCESSFUL; 10d033: eb 72 jmp 10d0a7 <_CORE_RWLock_Release+0x97> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10d035: 49 dec %ecx 10d036: 75 0f jne 10d047 <_CORE_RWLock_Release+0x37> the_rwlock->number_of_readers -= 1; 10d038: 8b 4b 48 mov 0x48(%ebx),%ecx 10d03b: 49 dec %ecx 10d03c: 89 4b 48 mov %ecx,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10d03f: 85 c9 test %ecx,%ecx 10d041: 74 04 je 10d047 <_CORE_RWLock_Release+0x37> /* must be unlocked again */ _ISR_Enable( level ); 10d043: 50 push %eax 10d044: 9d popf return CORE_RWLOCK_SUCCESSFUL; 10d045: eb 60 jmp 10d0a7 <_CORE_RWLock_Release+0x97> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d047: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10d04e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10d055: 50 push %eax 10d056: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10d057: 83 ec 0c sub $0xc,%esp 10d05a: 53 push %ebx 10d05b: e8 74 15 00 00 call 10e5d4 <_Thread_queue_Dequeue> if ( next ) { 10d060: 83 c4 10 add $0x10,%esp 10d063: 85 c0 test %eax,%eax 10d065: 74 40 je 10d0a7 <_CORE_RWLock_Release+0x97> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10d067: 83 78 30 01 cmpl $0x1,0x30(%eax) 10d06b: 75 09 jne 10d076 <_CORE_RWLock_Release+0x66> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10d06d: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10d074: eb 31 jmp 10d0a7 <_CORE_RWLock_Release+0x97> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10d076: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10d079: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10d080: 83 ec 0c sub $0xc,%esp 10d083: 53 push %ebx 10d084: e8 0f 19 00 00 call 10e998 <_Thread_queue_First> if ( !next || 10d089: 83 c4 10 add $0x10,%esp 10d08c: 85 c0 test %eax,%eax 10d08e: 74 17 je 10d0a7 <_CORE_RWLock_Release+0x97> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10d090: 83 78 30 01 cmpl $0x1,0x30(%eax) 10d094: 74 11 je 10d0a7 <_CORE_RWLock_Release+0x97><== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10d096: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10d099: 52 push %edx 10d09a: 52 push %edx 10d09b: 50 push %eax 10d09c: 53 push %ebx 10d09d: e8 f2 17 00 00 call 10e894 <_Thread_queue_Extract> } 10d0a2: 83 c4 10 add $0x10,%esp 10d0a5: eb d9 jmp 10d080 <_CORE_RWLock_Release+0x70> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10d0a7: 31 c0 xor %eax,%eax 10d0a9: 8b 5d fc mov -0x4(%ebp),%ebx 10d0ac: c9 leave 10d0ad: c3 ret =============================================================================== 0010d0b0 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10d0b0: 55 push %ebp 10d0b1: 89 e5 mov %esp,%ebp 10d0b3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d0b6: 8d 45 f4 lea -0xc(%ebp),%eax 10d0b9: 50 push %eax 10d0ba: ff 75 08 pushl 0x8(%ebp) 10d0bd: e8 82 11 00 00 call 10e244 <_Thread_Get> switch ( location ) { 10d0c2: 83 c4 10 add $0x10,%esp 10d0c5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10d0c9: 75 17 jne 10d0e2 <_CORE_RWLock_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10d0cb: 83 ec 0c sub $0xc,%esp 10d0ce: 50 push %eax 10d0cf: e8 84 19 00 00 call 10ea58 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d0d4: a1 20 92 12 00 mov 0x129220,%eax 10d0d9: 48 dec %eax 10d0da: a3 20 92 12 00 mov %eax,0x129220 10d0df: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10d0e2: c9 leave 10d0e3: c3 ret =============================================================================== 00117a5c <_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 ) { 117a5c: 55 push %ebp 117a5d: 89 e5 mov %esp,%ebp 117a5f: 57 push %edi 117a60: 56 push %esi 117a61: 53 push %ebx 117a62: 83 ec 1c sub $0x1c,%esp 117a65: 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 ) { 117a68: b8 01 00 00 00 mov $0x1,%eax 117a6d: 8b 55 10 mov 0x10(%ebp),%edx 117a70: 3b 53 4c cmp 0x4c(%ebx),%edx 117a73: 77 4c ja 117ac1 <_CORE_message_queue_Broadcast+0x65><== NEVER TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 117a75: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) * 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 ) { 117a7c: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117a80: 74 23 je 117aa5 <_CORE_message_queue_Broadcast+0x49> *count = 0; 117a82: 8b 45 1c mov 0x1c(%ebp),%eax 117a85: c7 00 00 00 00 00 movl $0x0,(%eax) 117a8b: eb 32 jmp 117abf <_CORE_message_queue_Broadcast+0x63> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 117a8d: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 117a90: 8b 42 2c mov 0x2c(%edx),%eax 117a93: 89 c7 mov %eax,%edi 117a95: 8b 75 0c mov 0xc(%ebp),%esi 117a98: 8b 4d 10 mov 0x10(%ebp),%ecx 117a9b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 117a9d: 8b 42 28 mov 0x28(%edx),%eax 117aa0: 8b 55 10 mov 0x10(%ebp),%edx 117aa3: 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))) { 117aa5: 83 ec 0c sub $0xc,%esp 117aa8: 53 push %ebx 117aa9: e8 ca 21 00 00 call 119c78 <_Thread_queue_Dequeue> 117aae: 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 = 117ab0: 83 c4 10 add $0x10,%esp 117ab3: 85 c0 test %eax,%eax 117ab5: 75 d6 jne 117a8d <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 117ab7: 8b 55 e4 mov -0x1c(%ebp),%edx 117aba: 8b 45 1c mov 0x1c(%ebp),%eax 117abd: 89 10 mov %edx,(%eax) 117abf: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 117ac1: 8d 65 f4 lea -0xc(%ebp),%esp 117ac4: 5b pop %ebx 117ac5: 5e pop %esi 117ac6: 5f pop %edi 117ac7: c9 leave 117ac8: c3 ret =============================================================================== 001128e4 <_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 ) { 1128e4: 55 push %ebp 1128e5: 89 e5 mov %esp,%ebp 1128e7: 57 push %edi 1128e8: 56 push %esi 1128e9: 53 push %ebx 1128ea: 83 ec 0c sub $0xc,%esp 1128ed: 8b 5d 08 mov 0x8(%ebp),%ebx 1128f0: 8b 75 10 mov 0x10(%ebp),%esi 1128f3: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1128f6: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1128f9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 112900: 89 53 4c mov %edx,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; 112903: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 11290a: 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)) { 112911: 89 d0 mov %edx,%eax 112913: f6 c2 03 test $0x3,%dl 112916: 74 0a je 112922 <_CORE_message_queue_Initialize+0x3e> allocated_message_size += sizeof(uint32_t); 112918: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 11291b: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 11291e: 39 d0 cmp %edx,%eax 112920: 72 5f jb 112981 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 112922: 8d 78 14 lea 0x14(%eax),%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 * 112925: 89 fa mov %edi,%edx 112927: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 11292a: 39 c2 cmp %eax,%edx 11292c: 72 53 jb 112981 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11292e: 83 ec 0c sub $0xc,%esp 112931: 52 push %edx 112932: e8 85 26 00 00 call 114fbc <_Workspace_Allocate> 112937: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 11293a: 83 c4 10 add $0x10,%esp 11293d: 85 c0 test %eax,%eax 11293f: 74 40 je 112981 <_CORE_message_queue_Initialize+0x9d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112941: 57 push %edi 112942: 56 push %esi 112943: 50 push %eax 112944: 8d 43 68 lea 0x68(%ebx),%eax 112947: 50 push %eax 112948: e8 db 53 00 00 call 117d28 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11294d: 8d 43 54 lea 0x54(%ebx),%eax 112950: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112953: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 11295a: 8d 43 50 lea 0x50(%ebx),%eax 11295d: 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( 112960: 6a 06 push $0x6 112962: 68 80 00 00 00 push $0x80 112967: 8b 45 0c mov 0xc(%ebp),%eax 11296a: 83 38 01 cmpl $0x1,(%eax) 11296d: 0f 94 c0 sete %al 112970: 0f b6 c0 movzbl %al,%eax 112973: 50 push %eax 112974: 53 push %ebx 112975: e8 22 1d 00 00 call 11469c <_Thread_queue_Initialize> 11297a: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11297c: 83 c4 20 add $0x20,%esp 11297f: eb 02 jmp 112983 <_CORE_message_queue_Initialize+0x9f> 112981: 31 c0 xor %eax,%eax } 112983: 8d 65 f4 lea -0xc(%ebp),%esp 112986: 5b pop %ebx 112987: 5e pop %esi 112988: 5f pop %edi 112989: c9 leave 11298a: c3 ret =============================================================================== 0011298c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 11298c: 55 push %ebp 11298d: 89 e5 mov %esp,%ebp 11298f: 57 push %edi 112990: 56 push %esi 112991: 53 push %ebx 112992: 83 ec 2c sub $0x2c,%esp 112995: 8b 55 08 mov 0x8(%ebp),%edx 112998: 8b 45 0c mov 0xc(%ebp),%eax 11299b: 89 45 dc mov %eax,-0x24(%ebp) 11299e: 8b 5d 10 mov 0x10(%ebp),%ebx 1129a1: 89 5d e0 mov %ebx,-0x20(%ebp) 1129a4: 8b 4d 14 mov 0x14(%ebp),%ecx 1129a7: 8b 75 1c mov 0x1c(%ebp),%esi 1129aa: 89 75 d4 mov %esi,-0x2c(%ebp) 1129ad: 8a 45 18 mov 0x18(%ebp),%al 1129b0: 88 45 db mov %al,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1129b3: a1 34 e4 12 00 mov 0x12e434,%eax executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1129b8: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Disable( level ); 1129bf: 9c pushf 1129c0: fa cli 1129c1: 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)); 1129c4: 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; 1129c7: 8d 72 54 lea 0x54(%edx),%esi 1129ca: 39 f3 cmp %esi,%ebx 1129cc: 0f 84 8a 00 00 00 je 112a5c <_CORE_message_queue_Seize+0xd0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 1129d2: 8b 33 mov (%ebx),%esi the_chain->first = new_first; 1129d4: 89 72 50 mov %esi,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 1129d7: 8d 7a 50 lea 0x50(%edx),%edi 1129da: 89 7e 04 mov %edi,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 1129dd: 85 db test %ebx,%ebx 1129df: 74 7b je 112a5c <_CORE_message_queue_Seize+0xd0><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 1129e1: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 1129e4: ff 75 e4 pushl -0x1c(%ebp) 1129e7: 9d popf *size_p = the_message->Contents.size; 1129e8: 8b 43 0c mov 0xc(%ebx),%eax 1129eb: 89 01 mov %eax,(%ecx) _Thread_Executing->Wait.count = 1129ed: 8b 73 08 mov 0x8(%ebx),%esi 1129f0: a1 34 e4 12 00 mov 0x12e434,%eax 1129f5: 89 70 24 mov %esi,0x24(%eax) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 1129f8: 8d 73 10 lea 0x10(%ebx),%esi 1129fb: 89 75 e4 mov %esi,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1129fe: 8b 09 mov (%ecx),%ecx 112a00: 8b 7d e0 mov -0x20(%ebp),%edi 112a03: 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 ); 112a05: 83 ec 0c sub $0xc,%esp 112a08: 52 push %edx 112a09: 89 55 d0 mov %edx,-0x30(%ebp) 112a0c: e8 7b 19 00 00 call 11438c <_Thread_queue_Dequeue> if ( !the_thread ) { 112a11: 83 c4 10 add $0x10,%esp 112a14: 85 c0 test %eax,%eax 112a16: 8b 55 d0 mov -0x30(%ebp),%edx 112a19: 75 15 jne 112a30 <_CORE_message_queue_Seize+0xa4> 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 ); 112a1b: 89 5d 0c mov %ebx,0xc(%ebp) 112a1e: 83 c2 68 add $0x68,%edx 112a21: 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 ); } 112a24: 8d 65 f4 lea -0xc(%ebp),%esp 112a27: 5b pop %ebx 112a28: 5e pop %esi 112a29: 5f pop %edi 112a2a: c9 leave 112a2b: e9 34 fe ff ff jmp 112864 <_Chain_Append> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 112a30: 8b 48 24 mov 0x24(%eax),%ecx 112a33: 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; 112a36: 8b 48 30 mov 0x30(%eax),%ecx 112a39: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 112a3c: 8b 70 2c mov 0x2c(%eax),%esi 112a3f: 8b 7d e4 mov -0x1c(%ebp),%edi 112a42: 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( 112a44: 8b 43 08 mov 0x8(%ebx),%eax 112a47: 89 45 10 mov %eax,0x10(%ebp) 112a4a: 89 5d 0c mov %ebx,0xc(%ebp) 112a4d: 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 ); } 112a50: 8d 65 f4 lea -0xc(%ebp),%esp 112a53: 5b pop %ebx 112a54: 5e pop %esi 112a55: 5f pop %edi 112a56: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 112a57: e9 ec 53 00 00 jmp 117e48 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 112a5c: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 112a60: 75 13 jne 112a75 <_CORE_message_queue_Seize+0xe9> _ISR_Enable( level ); 112a62: ff 75 e4 pushl -0x1c(%ebp) 112a65: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112a66: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax) 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 ); } 112a6d: 8d 65 f4 lea -0xc(%ebp),%esp 112a70: 5b pop %ebx 112a71: 5e pop %esi 112a72: 5f pop %edi 112a73: c9 leave 112a74: c3 ret 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; 112a75: 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; 112a7c: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 112a7f: 8b 5d dc mov -0x24(%ebp),%ebx 112a82: 89 58 20 mov %ebx,0x20(%eax) executing->Wait.return_argument_second.mutable_object = buffer; 112a85: 8b 75 e0 mov -0x20(%ebp),%esi 112a88: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.return_argument = size_p; 112a8b: 89 48 28 mov %ecx,0x28(%eax) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 112a8e: ff 75 e4 pushl -0x1c(%ebp) 112a91: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112a92: c7 45 10 40 47 11 00 movl $0x114740,0x10(%ebp) 112a99: 8b 45 d4 mov -0x2c(%ebp),%eax 112a9c: 89 45 0c mov %eax,0xc(%ebp) 112a9f: 89 55 08 mov %edx,0x8(%ebp) } 112aa2: 8d 65 f4 lea -0xc(%ebp),%esp 112aa5: 5b pop %ebx 112aa6: 5e pop %esi 112aa7: 5f pop %edi 112aa8: 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 ); 112aa9: e9 e2 19 00 00 jmp 114490 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010b081 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10b081: 55 push %ebp 10b082: 89 e5 mov %esp,%ebp 10b084: 53 push %ebx 10b085: 83 ec 14 sub $0x14,%esp 10b088: 8b 5d 08 mov 0x8(%ebp),%ebx 10b08b: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10b08e: a1 08 62 12 00 mov 0x126208,%eax 10b093: 85 c0 test %eax,%eax 10b095: 74 19 je 10b0b0 <_CORE_mutex_Seize+0x2f> 10b097: 84 d2 test %dl,%dl 10b099: 74 15 je 10b0b0 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10b09b: 83 3d a0 63 12 00 01 cmpl $0x1,0x1263a0 10b0a2: 76 0c jbe 10b0b0 <_CORE_mutex_Seize+0x2f> 10b0a4: 53 push %ebx 10b0a5: 6a 13 push $0x13 10b0a7: 6a 00 push $0x0 10b0a9: 6a 00 push $0x0 10b0ab: e8 c4 05 00 00 call 10b674 <_Internal_error_Occurred> 10b0b0: 51 push %ecx 10b0b1: 51 push %ecx 10b0b2: 8d 45 18 lea 0x18(%ebp),%eax 10b0b5: 50 push %eax 10b0b6: 53 push %ebx 10b0b7: 88 55 f4 mov %dl,-0xc(%ebp) 10b0ba: e8 01 50 00 00 call 1100c0 <_CORE_mutex_Seize_interrupt_trylock> 10b0bf: 83 c4 10 add $0x10,%esp 10b0c2: 85 c0 test %eax,%eax 10b0c4: 8a 55 f4 mov -0xc(%ebp),%dl 10b0c7: 74 48 je 10b111 <_CORE_mutex_Seize+0x90> 10b0c9: 84 d2 test %dl,%dl 10b0cb: 75 12 jne 10b0df <_CORE_mutex_Seize+0x5e> 10b0cd: ff 75 18 pushl 0x18(%ebp) 10b0d0: 9d popf 10b0d1: a1 c4 62 12 00 mov 0x1262c4,%eax 10b0d6: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10b0dd: eb 32 jmp 10b111 <_CORE_mutex_Seize+0x90> 10b0df: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10b0e6: a1 c4 62 12 00 mov 0x1262c4,%eax 10b0eb: 89 58 44 mov %ebx,0x44(%eax) 10b0ee: 8b 55 0c mov 0xc(%ebp),%edx 10b0f1: 89 50 20 mov %edx,0x20(%eax) 10b0f4: a1 08 62 12 00 mov 0x126208,%eax 10b0f9: 40 inc %eax 10b0fa: a3 08 62 12 00 mov %eax,0x126208 10b0ff: ff 75 18 pushl 0x18(%ebp) 10b102: 9d popf 10b103: 50 push %eax 10b104: 50 push %eax 10b105: ff 75 14 pushl 0x14(%ebp) 10b108: 53 push %ebx 10b109: e8 26 ff ff ff call 10b034 <_CORE_mutex_Seize_interrupt_blocking> 10b10e: 83 c4 10 add $0x10,%esp } 10b111: 8b 5d fc mov -0x4(%ebp),%ebx 10b114: c9 leave 10b115: c3 ret =============================================================================== 0010b244 <_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 ) { 10b244: 55 push %ebp 10b245: 89 e5 mov %esp,%ebp 10b247: 53 push %ebx 10b248: 83 ec 10 sub $0x10,%esp 10b24b: 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)) ) { 10b24e: 53 push %ebx 10b24f: e8 70 14 00 00 call 10c6c4 <_Thread_queue_Dequeue> 10b254: 89 c2 mov %eax,%edx 10b256: 83 c4 10 add $0x10,%esp 10b259: 31 c0 xor %eax,%eax 10b25b: 85 d2 test %edx,%edx 10b25d: 75 15 jne 10b274 <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10b25f: 9c pushf 10b260: fa cli 10b261: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b262: 8b 53 48 mov 0x48(%ebx),%edx 10b265: b0 04 mov $0x4,%al 10b267: 3b 53 40 cmp 0x40(%ebx),%edx 10b26a: 73 06 jae 10b272 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10b26c: 42 inc %edx 10b26d: 89 53 48 mov %edx,0x48(%ebx) 10b270: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10b272: 51 push %ecx 10b273: 9d popf } return status; } 10b274: 8b 5d fc mov -0x4(%ebp),%ebx 10b277: c9 leave 10b278: c3 ret =============================================================================== 00100208 <_Dual_ported_memory_Manager_initialization>: #include #include #include void _Dual_ported_memory_Manager_initialization(void) { 100208: 55 push %ebp 100209: 89 e5 mov %esp,%ebp } 10020b: c9 leave 10020c: c3 ret =============================================================================== 00100210 <_Event_Manager_initialization>: #include #include #include void _Event_Manager_initialization(void) { 100210: 55 push %ebp 100211: 89 e5 mov %esp,%ebp } 100213: c9 leave 100214: c3 ret =============================================================================== 0010a088 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10a088: 55 push %ebp 10a089: 89 e5 mov %esp,%ebp 10a08b: 57 push %edi 10a08c: 56 push %esi 10a08d: 53 push %ebx 10a08e: 83 ec 1c sub $0x1c,%esp 10a091: 8b 45 08 mov 0x8(%ebp),%eax 10a094: 8b 75 0c mov 0xc(%ebp),%esi 10a097: 8b 55 10 mov 0x10(%ebp),%edx 10a09a: 89 55 dc mov %edx,-0x24(%ebp) 10a09d: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10a0a0: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10a0a6: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10a0ad: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi _ISR_Disable( level ); 10a0b3: 9c pushf 10a0b4: fa cli 10a0b5: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10a0b8: 8b 17 mov (%edi),%edx 10a0ba: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10a0bd: 21 c2 and %eax,%edx 10a0bf: 74 1b je 10a0dc <_Event_Seize+0x54> 10a0c1: 39 c2 cmp %eax,%edx 10a0c3: 74 08 je 10a0cd <_Event_Seize+0x45> 10a0c5: f7 c6 02 00 00 00 test $0x2,%esi 10a0cb: 74 0f je 10a0dc <_Event_Seize+0x54> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10a0cd: 89 d0 mov %edx,%eax 10a0cf: f7 d0 not %eax 10a0d1: 23 45 e0 and -0x20(%ebp),%eax 10a0d4: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10a0d6: ff 75 e4 pushl -0x1c(%ebp) 10a0d9: 9d popf 10a0da: eb 13 jmp 10a0ef <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10a0dc: f7 c6 01 00 00 00 test $0x1,%esi 10a0e2: 74 12 je 10a0f6 <_Event_Seize+0x6e> _ISR_Enable( level ); 10a0e4: ff 75 e4 pushl -0x1c(%ebp) 10a0e7: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10a0e8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10a0ef: 89 11 mov %edx,(%ecx) return; 10a0f1: e9 91 00 00 00 jmp 10a187 <_Event_Seize+0xff> * 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; 10a0f6: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10a0f9: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10a0fc: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10a0ff: c7 05 48 6b 12 00 01 movl $0x1,0x126b48 10a106: 00 00 00 _ISR_Enable( level ); 10a109: ff 75 e4 pushl -0x1c(%ebp) 10a10c: 9d popf if ( ticks ) { 10a10d: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10a111: 74 34 je 10a147 <_Event_Seize+0xbf> _Watchdog_Initialize( 10a113: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a116: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10a11d: c7 43 64 c0 a2 10 00 movl $0x10a2c0,0x64(%ebx) the_watchdog->id = id; 10a124: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10a127: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a12e: 8b 45 dc mov -0x24(%ebp),%eax 10a131: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a134: 52 push %edx 10a135: 52 push %edx 10a136: 8d 43 48 lea 0x48(%ebx),%eax 10a139: 50 push %eax 10a13a: 68 e4 62 12 00 push $0x1262e4 10a13f: e8 a0 2f 00 00 call 10d0e4 <_Watchdog_Insert> 10a144: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10a147: 50 push %eax 10a148: 50 push %eax 10a149: 68 00 01 00 00 push $0x100 10a14e: 53 push %ebx 10a14f: e8 c0 29 00 00 call 10cb14 <_Thread_Set_state> _ISR_Disable( level ); 10a154: 9c pushf 10a155: fa cli 10a156: 5a pop %edx sync_state = _Event_Sync_state; 10a157: a1 48 6b 12 00 mov 0x126b48,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10a15c: c7 05 48 6b 12 00 00 movl $0x0,0x126b48 10a163: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10a166: 83 c4 10 add $0x10,%esp 10a169: 83 f8 01 cmp $0x1,%eax 10a16c: 75 04 jne 10a172 <_Event_Seize+0xea> _ISR_Enable( level ); 10a16e: 52 push %edx 10a16f: 9d popf 10a170: eb 15 jmp 10a187 <_Event_Seize+0xff> * 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 ); 10a172: 89 55 10 mov %edx,0x10(%ebp) 10a175: 89 5d 0c mov %ebx,0xc(%ebp) 10a178: 89 45 08 mov %eax,0x8(%ebp) } 10a17b: 8d 65 f4 lea -0xc(%ebp),%esp 10a17e: 5b pop %ebx 10a17f: 5e pop %esi 10a180: 5f pop %edi 10a181: 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 ); 10a182: e9 a1 1c 00 00 jmp 10be28 <_Thread_blocking_operation_Cancel> } 10a187: 8d 65 f4 lea -0xc(%ebp),%esp 10a18a: 5b pop %ebx 10a18b: 5e pop %esi 10a18c: 5f pop %edi 10a18d: c9 leave 10a18e: c3 ret =============================================================================== 0010a1dc <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10a1dc: 55 push %ebp 10a1dd: 89 e5 mov %esp,%ebp 10a1df: 57 push %edi 10a1e0: 56 push %esi 10a1e1: 53 push %ebx 10a1e2: 83 ec 2c sub $0x2c,%esp 10a1e5: 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 ]; 10a1e8: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 10a1ee: 8b 43 30 mov 0x30(%ebx),%eax 10a1f1: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 10a1f4: 9c pushf 10a1f5: fa cli 10a1f6: 58 pop %eax pending_events = api->pending_events; 10a1f7: 8b 17 mov (%edi),%edx 10a1f9: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 10a1fc: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10a1ff: 21 f2 and %esi,%edx 10a201: 0f 84 ac 00 00 00 je 10a2b3 <_Event_Surrender+0xd7> /* * 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() && 10a207: 8b 0d a0 62 12 00 mov 0x1262a0,%ecx 10a20d: 85 c9 test %ecx,%ecx 10a20f: 74 47 je 10a258 <_Event_Surrender+0x7c> 10a211: 3b 1d c4 62 12 00 cmp 0x1262c4,%ebx 10a217: 75 3f jne 10a258 <_Event_Surrender+0x7c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10a219: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx /* * 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() && 10a21f: 83 f9 02 cmp $0x2,%ecx 10a222: 74 09 je 10a22d <_Event_Surrender+0x51> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10a224: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx /* * 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() && 10a22a: 49 dec %ecx 10a22b: 75 2b jne 10a258 <_Event_Surrender+0x7c> _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) ) { 10a22d: 39 f2 cmp %esi,%edx 10a22f: 74 06 je 10a237 <_Event_Surrender+0x5b> 10a231: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a235: 74 7c je 10a2b3 <_Event_Surrender+0xd7> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10a237: 89 d6 mov %edx,%esi 10a239: f7 d6 not %esi 10a23b: 23 75 d4 and -0x2c(%ebp),%esi 10a23e: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a240: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a247: 8b 4b 28 mov 0x28(%ebx),%ecx 10a24a: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a24c: c7 05 48 6b 12 00 03 movl $0x3,0x126b48 10a253: 00 00 00 10a256: eb 5b jmp 10a2b3 <_Event_Surrender+0xd7> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10a258: f6 43 11 01 testb $0x1,0x11(%ebx) 10a25c: 74 55 je 10a2b3 <_Event_Surrender+0xd7> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10a25e: 39 f2 cmp %esi,%edx 10a260: 74 06 je 10a268 <_Event_Surrender+0x8c> 10a262: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a266: 74 4b je 10a2b3 <_Event_Surrender+0xd7> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10a268: 89 d6 mov %edx,%esi 10a26a: f7 d6 not %esi 10a26c: 23 75 d4 and -0x2c(%ebp),%esi 10a26f: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a271: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a278: 8b 4b 28 mov 0x28(%ebx),%ecx 10a27b: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 10a27d: 50 push %eax 10a27e: 9d popf 10a27f: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10a280: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10a284: 74 06 je 10a28c <_Event_Surrender+0xb0> _ISR_Enable( level ); 10a286: 50 push %eax 10a287: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10a288: 51 push %ecx 10a289: 51 push %ecx 10a28a: eb 17 jmp 10a2a3 <_Event_Surrender+0xc7> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10a28c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10a293: 50 push %eax 10a294: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10a295: 83 ec 0c sub $0xc,%esp 10a298: 8d 43 48 lea 0x48(%ebx),%eax 10a29b: 50 push %eax 10a29c: e8 57 2f 00 00 call 10d1f8 <_Watchdog_Remove> 10a2a1: 58 pop %eax 10a2a2: 5a pop %edx 10a2a3: 68 f8 ff 03 10 push $0x1003fff8 10a2a8: 53 push %ebx 10a2a9: e8 e6 1c 00 00 call 10bf94 <_Thread_Clear_state> 10a2ae: 83 c4 10 add $0x10,%esp 10a2b1: eb 02 jmp 10a2b5 <_Event_Surrender+0xd9> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10a2b3: 50 push %eax 10a2b4: 9d popf } 10a2b5: 8d 65 f4 lea -0xc(%ebp),%esp 10a2b8: 5b pop %ebx 10a2b9: 5e pop %esi 10a2ba: 5f pop %edi 10a2bb: c9 leave 10a2bc: c3 ret =============================================================================== 0010a2c0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a2c0: 55 push %ebp 10a2c1: 89 e5 mov %esp,%ebp 10a2c3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a2c6: 8d 45 f4 lea -0xc(%ebp),%eax 10a2c9: 50 push %eax 10a2ca: ff 75 08 pushl 0x8(%ebp) 10a2cd: e8 62 20 00 00 call 10c334 <_Thread_Get> switch ( location ) { 10a2d2: 83 c4 10 add $0x10,%esp 10a2d5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a2d9: 75 49 jne 10a324 <_Event_Timeout+0x64> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10a2db: 9c pushf 10a2dc: fa cli 10a2dd: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10a2de: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10a2e5: 3b 05 c4 62 12 00 cmp 0x1262c4,%eax 10a2eb: 75 13 jne 10a300 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10a2ed: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx 10a2f3: 49 dec %ecx 10a2f4: 75 0a jne 10a300 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a2f6: c7 05 48 6b 12 00 02 movl $0x2,0x126b48 10a2fd: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10a300: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10a307: 52 push %edx 10a308: 9d popf 10a309: 52 push %edx 10a30a: 52 push %edx 10a30b: 68 f8 ff 03 10 push $0x1003fff8 10a310: 50 push %eax 10a311: e8 7e 1c 00 00 call 10bf94 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10a316: a1 08 62 12 00 mov 0x126208,%eax 10a31b: 48 dec %eax 10a31c: a3 08 62 12 00 mov %eax,0x126208 10a321: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a324: c9 leave 10a325: c3 ret =============================================================================== 00100248 <_Extension_Manager_initialization>: #include #include #include void _Extension_Manager_initialization(void) { 100248: 55 push %ebp 100249: 89 e5 mov %esp,%ebp } 10024b: c9 leave 10024c: c3 ret =============================================================================== 001101e8 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 1101e8: 55 push %ebp 1101e9: 89 e5 mov %esp,%ebp 1101eb: 57 push %edi 1101ec: 56 push %esi 1101ed: 53 push %ebx 1101ee: 83 ec 2c sub $0x2c,%esp 1101f1: 8b 75 08 mov 0x8(%ebp),%esi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 1101f4: 8b 4e 08 mov 0x8(%esi),%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; 1101f7: 8b 46 10 mov 0x10(%esi),%eax 1101fa: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 1101fd: 8b 45 0c mov 0xc(%ebp),%eax 110200: 83 c0 04 add $0x4,%eax 110203: 89 45 cc mov %eax,-0x34(%ebp) 110206: 0f 82 2f 01 00 00 jb 11033b <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11020c: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 110210: 74 18 je 11022a <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 110212: 8b 45 0c mov 0xc(%ebp),%eax 110215: 39 45 14 cmp %eax,0x14(%ebp) 110218: 0f 82 1d 01 00 00 jb 11033b <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 11021e: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 110222: 75 06 jne 11022a <_Heap_Allocate_aligned_with_boundary+0x42> 110224: 8b 45 e0 mov -0x20(%ebp),%eax 110227: 89 45 10 mov %eax,0x10(%ebp) 11022a: 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; 110231: 8b 45 e0 mov -0x20(%ebp),%eax 110234: 83 c0 07 add $0x7,%eax 110237: 89 45 c8 mov %eax,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 11023a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 110241: 8b 45 0c mov 0xc(%ebp),%eax 110244: 29 45 d8 sub %eax,-0x28(%ebp) 110247: 89 f7 mov %esi,%edi 110249: e9 ba 00 00 00 jmp 110308 <_Heap_Allocate_aligned_with_boundary+0x120> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 11024e: 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 ) { 110251: 8b 59 04 mov 0x4(%ecx),%ebx 110254: 3b 5d cc cmp -0x34(%ebp),%ebx 110257: 0f 86 a8 00 00 00 jbe 110305 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 11025d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 110261: 8d 41 08 lea 0x8(%ecx),%eax 110264: 89 45 dc mov %eax,-0x24(%ebp) 110267: 75 07 jne 110270 <_Heap_Allocate_aligned_with_boundary+0x88> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 110269: 89 c3 mov %eax,%ebx 11026b: e9 91 00 00 00 jmp 110301 <_Heap_Allocate_aligned_with_boundary+0x119> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 110270: 8b 47 14 mov 0x14(%edi),%eax 110273: 89 45 d4 mov %eax,-0x2c(%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; 110276: 83 e3 fe and $0xfffffffe,%ebx 110279: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 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; 11027c: 8b 75 c8 mov -0x38(%ebp),%esi 11027f: 29 c6 sub %eax,%esi 110281: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110283: 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); 110286: 89 d8 mov %ebx,%eax 110288: 31 d2 xor %edx,%edx 11028a: f7 75 10 divl 0x10(%ebp) 11028d: 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 ) { 11028f: 39 f3 cmp %esi,%ebx 110291: 76 0b jbe 11029e <_Heap_Allocate_aligned_with_boundary+0xb6> 110293: 89 f0 mov %esi,%eax 110295: 31 d2 xor %edx,%edx 110297: f7 75 10 divl 0x10(%ebp) 11029a: 89 f3 mov %esi,%ebx 11029c: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 11029e: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1102a2: 74 3f je 1102e3 <_Heap_Allocate_aligned_with_boundary+0xfb> /* 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; 1102a4: 8b 45 0c mov 0xc(%ebp),%eax 1102a7: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 1102aa: 8b 45 dc mov -0x24(%ebp),%eax 1102ad: 03 45 0c add 0xc(%ebp),%eax 1102b0: 89 45 d0 mov %eax,-0x30(%ebp) 1102b3: eb 19 jmp 1102ce <_Heap_Allocate_aligned_with_boundary+0xe6> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 1102b5: 3b 55 d0 cmp -0x30(%ebp),%edx 1102b8: 72 4b jb 110305 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 1102ba: 89 d3 mov %edx,%ebx 1102bc: 2b 5d 0c sub 0xc(%ebp),%ebx 1102bf: 89 d8 mov %ebx,%eax 1102c1: 31 d2 xor %edx,%edx 1102c3: f7 75 10 divl 0x10(%ebp) 1102c6: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 1102c8: 8b 45 0c mov 0xc(%ebp),%eax 1102cb: 8d 34 03 lea (%ebx,%eax,1),%esi 1102ce: 89 f0 mov %esi,%eax 1102d0: 31 d2 xor %edx,%edx 1102d2: f7 75 14 divl 0x14(%ebp) 1102d5: 89 f0 mov %esi,%eax 1102d7: 29 d0 sub %edx,%eax 1102d9: 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 ) { 1102db: 39 f0 cmp %esi,%eax 1102dd: 73 04 jae 1102e3 <_Heap_Allocate_aligned_with_boundary+0xfb> 1102df: 39 c3 cmp %eax,%ebx 1102e1: 72 d2 jb 1102b5 <_Heap_Allocate_aligned_with_boundary+0xcd> 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 ) { 1102e3: 3b 5d dc cmp -0x24(%ebp),%ebx 1102e6: 72 1d jb 110305 <_Heap_Allocate_aligned_with_boundary+0x11d> 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; 1102e8: be f8 ff ff ff mov $0xfffffff8,%esi 1102ed: 29 ce sub %ecx,%esi 1102ef: 01 de add %ebx,%esi 1102f1: 89 d8 mov %ebx,%eax 1102f3: 31 d2 xor %edx,%edx 1102f5: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 1102f8: 29 d6 sub %edx,%esi 1102fa: 74 05 je 110301 <_Heap_Allocate_aligned_with_boundary+0x119> 1102fc: 3b 75 d4 cmp -0x2c(%ebp),%esi 1102ff: 72 04 jb 110305 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 110301: 85 db test %ebx,%ebx 110303: 75 11 jne 110316 <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN break; } block = block->next; 110305: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110308: 39 f9 cmp %edi,%ecx 11030a: 0f 85 3e ff ff ff jne 11024e <_Heap_Allocate_aligned_with_boundary+0x66> 110310: 89 fe mov %edi,%esi 110312: 31 db xor %ebx,%ebx 110314: eb 16 jmp 11032c <_Heap_Allocate_aligned_with_boundary+0x144> 110316: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 110318: 8b 45 e4 mov -0x1c(%ebp),%eax 11031b: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 11031e: ff 75 0c pushl 0xc(%ebp) 110321: 53 push %ebx 110322: 51 push %ecx 110323: 57 push %edi 110324: e8 6f b2 ff ff call 10b598 <_Heap_Block_allocate> 110329: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 11032c: 8b 45 e4 mov -0x1c(%ebp),%eax 11032f: 39 46 44 cmp %eax,0x44(%esi) 110332: 73 03 jae 110337 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110334: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 110337: 89 d8 mov %ebx,%eax 110339: eb 02 jmp 11033d <_Heap_Allocate_aligned_with_boundary+0x155> 11033b: 31 c0 xor %eax,%eax } 11033d: 8d 65 f4 lea -0xc(%ebp),%esp 110340: 5b pop %ebx 110341: 5e pop %esi 110342: 5f pop %edi 110343: c9 leave 110344: c3 ret =============================================================================== 00113640 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 113640: 55 push %ebp 113641: 89 e5 mov %esp,%ebp 113643: 56 push %esi 113644: 53 push %ebx 113645: 8b 4d 08 mov 0x8(%ebp),%ecx 113648: 8b 55 0c mov 0xc(%ebp),%edx 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; 11364b: 8b 71 1c mov 0x1c(%ecx),%esi 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; 11364e: 8b 59 24 mov 0x24(%ecx),%ebx * 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 ) { 113651: 39 f2 cmp %esi,%edx 113653: 73 0a jae 11365f <_Heap_Extend+0x1f> 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; 113655: b8 01 00 00 00 mov $0x1,%eax 11365a: 3b 51 18 cmp 0x18(%ecx),%edx 11365d: 73 5f jae 1136be <_Heap_Extend+0x7e> * 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 ) { 11365f: b8 02 00 00 00 mov $0x2,%eax 113664: 39 f2 cmp %esi,%edx 113666: 75 56 jne 1136be <_Heap_Extend+0x7e> { 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; 113668: 03 55 10 add 0x10(%ebp),%edx * 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; 11366b: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 11366e: 29 da sub %ebx,%edx 113670: 8d 72 f8 lea -0x8(%edx),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 113673: 89 f0 mov %esi,%eax 113675: 31 d2 xor %edx,%edx 113677: f7 71 10 divl 0x10(%ecx) 11367a: 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; 11367c: 8b 45 14 mov 0x14(%ebp),%eax 11367f: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 113681: 31 c0 xor %eax,%eax 113683: 3b 71 14 cmp 0x14(%ecx),%esi 113686: 72 36 jb 1136be <_Heap_Extend+0x7e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 113688: 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; 11368b: 8b 43 04 mov 0x4(%ebx),%eax 11368e: 83 e0 01 and $0x1,%eax 113691: 09 f0 or %esi,%eax 113693: 89 43 04 mov %eax,0x4(%ebx) 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 = 113696: 8b 41 20 mov 0x20(%ecx),%eax 113699: 29 d0 sub %edx,%eax 11369b: 83 c8 01 or $0x1,%eax 11369e: 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; 1136a1: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1136a4: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1136a7: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1136aa: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1136ad: 50 push %eax 1136ae: 50 push %eax 1136af: 83 c3 08 add $0x8,%ebx 1136b2: 53 push %ebx 1136b3: 51 push %ecx 1136b4: e8 df a8 ff ff call 10df98 <_Heap_Free> 1136b9: 31 c0 xor %eax,%eax 1136bb: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 1136be: 8d 65 f8 lea -0x8(%ebp),%esp 1136c1: 5b pop %ebx 1136c2: 5e pop %esi 1136c3: c9 leave 1136c4: c3 ret =============================================================================== 00110348 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110348: 55 push %ebp 110349: 89 e5 mov %esp,%ebp 11034b: 57 push %edi 11034c: 56 push %esi 11034d: 53 push %ebx 11034e: 83 ec 14 sub $0x14,%esp 110351: 8b 4d 08 mov 0x8(%ebp),%ecx 110354: 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 ) 110357: 8d 58 f8 lea -0x8(%eax),%ebx 11035a: 31 d2 xor %edx,%edx 11035c: f7 71 10 divl 0x10(%ecx) 11035f: 29 d3 sub %edx,%ebx 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; 110361: 8b 41 20 mov 0x20(%ecx),%eax 110364: 89 45 f0 mov %eax,-0x10(%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 110367: 31 c0 xor %eax,%eax 110369: 3b 5d f0 cmp -0x10(%ebp),%ebx 11036c: 72 08 jb 110376 <_Heap_Free+0x2e> 11036e: 31 c0 xor %eax,%eax 110370: 39 59 24 cmp %ebx,0x24(%ecx) 110373: 0f 93 c0 setae %al Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 110376: 85 c0 test %eax,%eax 110378: 0f 84 2d 01 00 00 je 1104ab <_Heap_Free+0x163> - 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; 11037e: 8b 7b 04 mov 0x4(%ebx),%edi 110381: 89 fa mov %edi,%edx 110383: 83 e2 fe and $0xfffffffe,%edx 110386: 89 55 e0 mov %edx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110389: 8d 04 13 lea (%ebx,%edx,1),%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 11038c: 31 f6 xor %esi,%esi 11038e: 3b 45 f0 cmp -0x10(%ebp),%eax 110391: 72 0e jb 1103a1 <_Heap_Free+0x59> <== NEVER TAKEN 110393: 39 41 24 cmp %eax,0x24(%ecx) 110396: 0f 93 c2 setae %dl 110399: 89 d6 mov %edx,%esi 11039b: 81 e6 ff 00 00 00 and $0xff,%esi } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 1103a1: 85 f6 test %esi,%esi 1103a3: 0f 84 02 01 00 00 je 1104ab <_Heap_Free+0x163> <== NEVER TAKEN 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; 1103a9: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 1103ac: f7 c6 01 00 00 00 test $0x1,%esi 1103b2: 0f 84 f3 00 00 00 je 1104ab <_Heap_Free+0x163> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1103b8: 83 e6 fe and $0xfffffffe,%esi 1103bb: 89 75 e8 mov %esi,-0x18(%ebp) return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 1103be: 8b 51 24 mov 0x24(%ecx),%edx 1103c1: 89 55 e4 mov %edx,-0x1c(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 1103c4: 31 f6 xor %esi,%esi 1103c6: 39 d0 cmp %edx,%eax 1103c8: 74 0d je 1103d7 <_Heap_Free+0x8f> 1103ca: 8b 55 e8 mov -0x18(%ebp),%edx 1103cd: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 1103d1: 83 e6 01 and $0x1,%esi 1103d4: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 1103d7: 83 e7 01 and $0x1,%edi 1103da: 75 64 jne 110440 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 1103dc: 8b 13 mov (%ebx),%edx 1103de: 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); 1103e1: 29 d3 sub %edx,%ebx 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 1103e3: 31 ff xor %edi,%edi 1103e5: 3b 5d f0 cmp -0x10(%ebp),%ebx 1103e8: 72 0e jb 1103f8 <_Heap_Free+0xb0> <== NEVER TAKEN 1103ea: 39 5d e4 cmp %ebx,-0x1c(%ebp) 1103ed: 0f 93 c2 setae %dl 1103f0: 89 d7 mov %edx,%edi 1103f2: 81 e7 ff 00 00 00 and $0xff,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 1103f8: 85 ff test %edi,%edi 1103fa: 0f 84 ab 00 00 00 je 1104ab <_Heap_Free+0x163> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 110400: f6 43 04 01 testb $0x1,0x4(%ebx) 110404: 0f 84 a1 00 00 00 je 1104ab <_Heap_Free+0x163> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 11040a: 89 f2 mov %esi,%edx 11040c: 84 d2 test %dl,%dl 11040e: 74 1a je 11042a <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 110410: 8b 75 e0 mov -0x20(%ebp),%esi 110413: 03 75 e8 add -0x18(%ebp),%esi 110416: 03 75 ec add -0x14(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 110419: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 11041c: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 11041f: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 110422: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 110425: ff 49 38 decl 0x38(%ecx) 110428: eb 34 jmp 11045e <_Heap_Free+0x116> 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; 11042a: 8b 75 e0 mov -0x20(%ebp),%esi 11042d: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110430: 89 f7 mov %esi,%edi 110432: 83 cf 01 or $0x1,%edi 110435: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110438: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 11043c: 89 30 mov %esi,(%eax) 11043e: eb 5b jmp 11049b <_Heap_Free+0x153> } } else if ( next_is_free ) { /* coalesce next */ 110440: 89 f2 mov %esi,%edx 110442: 84 d2 test %dl,%dl 110444: 74 25 je 11046b <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 110446: 8b 75 e8 mov -0x18(%ebp),%esi 110449: 03 75 e0 add -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 11044c: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 11044f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 110452: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 110455: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 110458: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 11045b: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11045e: 89 f0 mov %esi,%eax 110460: 83 c8 01 or $0x1,%eax 110463: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 110466: 89 34 33 mov %esi,(%ebx,%esi,1) 110469: eb 30 jmp 11049b <_Heap_Free+0x153> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 11046b: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 11046e: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 110471: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 110474: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 110477: 89 5e 0c mov %ebx,0xc(%esi) } 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; 11047a: 8b 75 e0 mov -0x20(%ebp),%esi 11047d: 83 ce 01 or $0x1,%esi 110480: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110483: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 110487: 8b 55 e0 mov -0x20(%ebp),%edx 11048a: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 11048c: 8b 41 38 mov 0x38(%ecx),%eax 11048f: 40 inc %eax 110490: 89 41 38 mov %eax,0x38(%ecx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 110493: 39 41 3c cmp %eax,0x3c(%ecx) 110496: 73 03 jae 11049b <_Heap_Free+0x153> 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; 110498: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 11049b: ff 49 40 decl 0x40(%ecx) ++stats->frees; 11049e: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 1104a1: 8b 45 e0 mov -0x20(%ebp),%eax 1104a4: 01 41 30 add %eax,0x30(%ecx) 1104a7: b0 01 mov $0x1,%al return( true ); 1104a9: eb 02 jmp 1104ad <_Heap_Free+0x165> 1104ab: 31 c0 xor %eax,%eax } 1104ad: 83 c4 14 add $0x14,%esp 1104b0: 5b pop %ebx 1104b1: 5e pop %esi 1104b2: 5f pop %edi 1104b3: c9 leave 1104b4: c3 ret =============================================================================== 0011e5e4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11e5e4: 55 push %ebp 11e5e5: 89 e5 mov %esp,%ebp 11e5e7: 56 push %esi 11e5e8: 53 push %ebx 11e5e9: 8b 5d 08 mov 0x8(%ebp),%ebx 11e5ec: 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 ) 11e5ef: 8d 4e f8 lea -0x8(%esi),%ecx 11e5f2: 89 f0 mov %esi,%eax 11e5f4: 31 d2 xor %edx,%edx 11e5f6: f7 73 10 divl 0x10(%ebx) 11e5f9: 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; 11e5fb: 8b 53 20 mov 0x20(%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 11e5fe: 31 c0 xor %eax,%eax 11e600: 39 d1 cmp %edx,%ecx 11e602: 72 08 jb 11e60c <_Heap_Size_of_alloc_area+0x28> 11e604: 31 c0 xor %eax,%eax 11e606: 39 4b 24 cmp %ecx,0x24(%ebx) 11e609: 0f 93 c0 setae %al uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11e60c: 85 c0 test %eax,%eax 11e60e: 74 2e je 11e63e <_Heap_Size_of_alloc_area+0x5a> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11e610: 8b 41 04 mov 0x4(%ecx),%eax 11e613: 83 e0 fe and $0xfffffffe,%eax 11e616: 01 c1 add %eax,%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 11e618: 31 c0 xor %eax,%eax 11e61a: 39 d1 cmp %edx,%ecx 11e61c: 72 08 jb 11e626 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN 11e61e: 31 c0 xor %eax,%eax 11e620: 39 4b 24 cmp %ecx,0x24(%ebx) 11e623: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11e626: 85 c0 test %eax,%eax 11e628: 74 14 je 11e63e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN 11e62a: f6 41 04 01 testb $0x1,0x4(%ecx) 11e62e: 74 0e je 11e63e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11e630: 29 f1 sub %esi,%ecx 11e632: 8d 51 04 lea 0x4(%ecx),%edx 11e635: 8b 45 10 mov 0x10(%ebp),%eax 11e638: 89 10 mov %edx,(%eax) 11e63a: b0 01 mov $0x1,%al return true; 11e63c: eb 02 jmp 11e640 <_Heap_Size_of_alloc_area+0x5c> 11e63e: 31 c0 xor %eax,%eax } 11e640: 5b pop %ebx 11e641: 5e pop %esi 11e642: c9 leave 11e643: c3 ret =============================================================================== 0010c06d <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10c06d: 55 push %ebp 10c06e: 89 e5 mov %esp,%ebp 10c070: 57 push %edi 10c071: 56 push %esi 10c072: 53 push %ebx 10c073: 83 ec 4c sub $0x4c,%esp 10c076: 8b 7d 08 mov 0x8(%ebp),%edi 10c079: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10c07c: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10c07f: 8b 47 14 mov 0x14(%edi),%eax 10c082: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10c085: 8b 57 24 mov 0x24(%edi),%edx 10c088: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10c08b: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10c08e: c7 45 e4 7f c3 10 00 movl $0x10c37f,-0x1c(%ebp) 10c095: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10c099: 75 07 jne 10c0a2 <_Heap_Walk+0x35> 10c09b: c7 45 e4 68 c0 10 00 movl $0x10c068,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c0a2: 83 3d 28 84 12 00 03 cmpl $0x3,0x128428 10c0a9: 0f 85 c6 02 00 00 jne 10c375 <_Heap_Walk+0x308> 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)( 10c0af: 50 push %eax 10c0b0: ff 77 0c pushl 0xc(%edi) 10c0b3: ff 77 08 pushl 0x8(%edi) 10c0b6: ff 75 d0 pushl -0x30(%ebp) 10c0b9: 53 push %ebx 10c0ba: ff 77 1c pushl 0x1c(%edi) 10c0bd: ff 77 18 pushl 0x18(%edi) 10c0c0: ff 75 dc pushl -0x24(%ebp) 10c0c3: 51 push %ecx 10c0c4: 68 f4 12 12 00 push $0x1212f4 10c0c9: 6a 00 push $0x0 10c0cb: 56 push %esi 10c0cc: 89 4d bc mov %ecx,-0x44(%ebp) 10c0cf: 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 ) { 10c0d2: 83 c4 30 add $0x30,%esp 10c0d5: 8b 4d bc mov -0x44(%ebp),%ecx 10c0d8: 85 c9 test %ecx,%ecx 10c0da: 75 0b jne 10c0e7 <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10c0dc: 53 push %ebx 10c0dd: 68 85 13 12 00 push $0x121385 10c0e2: e9 5b 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10c0e7: f6 c1 03 test $0x3,%cl 10c0ea: 74 0b je 10c0f7 <_Heap_Walk+0x8a> (*printer)( 10c0ec: 51 push %ecx 10c0ed: 68 98 13 12 00 push $0x121398 10c0f2: e9 4b 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10c0f7: 8b 45 dc mov -0x24(%ebp),%eax 10c0fa: 31 d2 xor %edx,%edx 10c0fc: f7 f1 div %ecx 10c0fe: 85 d2 test %edx,%edx 10c100: 74 0d je 10c10f <_Heap_Walk+0xa2> (*printer)( 10c102: ff 75 dc pushl -0x24(%ebp) 10c105: 68 b6 13 12 00 push $0x1213b6 10c10a: e9 33 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( 10c10f: 8d 43 08 lea 0x8(%ebx),%eax 10c112: 31 d2 xor %edx,%edx 10c114: f7 f1 div %ecx 10c116: 85 d2 test %edx,%edx 10c118: 74 0b je 10c125 <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10c11a: 53 push %ebx 10c11b: 68 da 13 12 00 push $0x1213da 10c120: e9 1d 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10c125: f6 43 04 01 testb $0x1,0x4(%ebx) 10c129: 75 0b jne 10c136 <_Heap_Walk+0xc9> (*printer)( 10c12b: 51 push %ecx 10c12c: 68 0b 14 12 00 push $0x12140b 10c131: e9 0c 02 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( first_block->prev_size != page_size ) { 10c136: 8b 03 mov (%ebx),%eax 10c138: 89 45 d4 mov %eax,-0x2c(%ebp) 10c13b: 39 c8 cmp %ecx,%eax 10c13d: 74 0f je 10c14e <_Heap_Walk+0xe1> (*printer)( 10c13f: 83 ec 0c sub $0xc,%esp 10c142: 51 push %ecx 10c143: 50 push %eax 10c144: 68 39 14 12 00 push $0x121439 10c149: e9 3d 01 00 00 jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10c14e: 8b 55 d0 mov -0x30(%ebp),%edx 10c151: 8b 42 04 mov 0x4(%edx),%eax 10c154: 83 e0 fe and $0xfffffffe,%eax 10c157: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10c15c: 75 0b jne 10c169 <_Heap_Walk+0xfc> (*printer)( 10c15e: 52 push %edx 10c15f: 68 64 14 12 00 push $0x121464 10c164: e9 d9 01 00 00 jmp 10c342 <_Heap_Walk+0x2d5> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10c169: 8b 4f 10 mov 0x10(%edi),%ecx 10c16c: 89 4d d8 mov %ecx,-0x28(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c16f: 8b 4f 08 mov 0x8(%edi),%ecx 10c172: 89 7d e0 mov %edi,-0x20(%ebp) 10c175: eb 6a jmp 10c1e1 <_Heap_Walk+0x174> 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 10c177: 31 c0 xor %eax,%eax 10c179: 39 4f 20 cmp %ecx,0x20(%edi) 10c17c: 77 08 ja 10c186 <_Heap_Walk+0x119> 10c17e: 31 c0 xor %eax,%eax 10c180: 39 4f 24 cmp %ecx,0x24(%edi) 10c183: 0f 93 c0 setae %al 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 ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10c186: 85 c0 test %eax,%eax 10c188: 75 0b jne 10c195 <_Heap_Walk+0x128> (*printer)( 10c18a: 51 push %ecx 10c18b: 68 79 14 12 00 push $0x121479 10c190: e9 ad 01 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( 10c195: 8d 41 08 lea 0x8(%ecx),%eax 10c198: 31 d2 xor %edx,%edx 10c19a: f7 75 d8 divl -0x28(%ebp) 10c19d: 85 d2 test %edx,%edx 10c19f: 74 0b je 10c1ac <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10c1a1: 51 push %ecx 10c1a2: 68 99 14 12 00 push $0x121499 10c1a7: e9 96 01 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c1ac: 8b 41 04 mov 0x4(%ecx),%eax 10c1af: 83 e0 fe and $0xfffffffe,%eax 10c1b2: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10c1b7: 74 0b je 10c1c4 <_Heap_Walk+0x157> (*printer)( 10c1b9: 51 push %ecx 10c1ba: 68 c9 14 12 00 push $0x1214c9 10c1bf: e9 7e 01 00 00 jmp 10c342 <_Heap_Walk+0x2d5> ); return false; } if ( free_block->prev != prev_block ) { 10c1c4: 8b 41 0c mov 0xc(%ecx),%eax 10c1c7: 3b 45 e0 cmp -0x20(%ebp),%eax 10c1ca: 74 0f je 10c1db <_Heap_Walk+0x16e> (*printer)( 10c1cc: 83 ec 0c sub $0xc,%esp 10c1cf: 50 push %eax 10c1d0: 51 push %ecx 10c1d1: 68 e5 14 12 00 push $0x1214e5 10c1d6: e9 b0 00 00 00 jmp 10c28b <_Heap_Walk+0x21e> return false; } prev_block = free_block; free_block = free_block->next; 10c1db: 89 4d e0 mov %ecx,-0x20(%ebp) 10c1de: 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 ) { 10c1e1: 39 f9 cmp %edi,%ecx 10c1e3: 75 92 jne 10c177 <_Heap_Walk+0x10a> 10c1e5: 89 75 e0 mov %esi,-0x20(%ebp) 10c1e8: e9 7f 01 00 00 jmp 10c36c <_Heap_Walk+0x2ff> - 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; 10c1ed: 8b 43 04 mov 0x4(%ebx),%eax 10c1f0: 89 c1 mov %eax,%ecx 10c1f2: 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); 10c1f5: 8d 34 0b lea (%ebx,%ecx,1),%esi 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 ) { 10c1f8: a8 01 test $0x1,%al 10c1fa: 74 0c je 10c208 <_Heap_Walk+0x19b> (*printer)( 10c1fc: 83 ec 0c sub $0xc,%esp 10c1ff: 51 push %ecx 10c200: 53 push %ebx 10c201: 68 17 15 12 00 push $0x121517 10c206: eb 0b jmp 10c213 <_Heap_Walk+0x1a6> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10c208: 50 push %eax 10c209: 50 push %eax 10c20a: ff 33 pushl (%ebx) 10c20c: 51 push %ecx 10c20d: 53 push %ebx 10c20e: 68 2e 15 12 00 push $0x12152e 10c213: 6a 00 push $0x0 10c215: ff 75 e0 pushl -0x20(%ebp) 10c218: 89 4d bc mov %ecx,-0x44(%ebp) 10c21b: ff 55 e4 call *-0x1c(%ebp) 10c21e: 83 c4 20 add $0x20,%esp 10c221: 8b 4d bc mov -0x44(%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 10c224: 31 c0 xor %eax,%eax 10c226: 39 77 20 cmp %esi,0x20(%edi) 10c229: 77 08 ja 10c233 <_Heap_Walk+0x1c6> <== NEVER TAKEN 10c22b: 31 c0 xor %eax,%eax 10c22d: 39 77 24 cmp %esi,0x24(%edi) 10c230: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10c233: 85 c0 test %eax,%eax 10c235: 75 11 jne 10c248 <_Heap_Walk+0x1db> 10c237: 89 f1 mov %esi,%ecx 10c239: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c23c: 83 ec 0c sub $0xc,%esp 10c23f: 51 push %ecx 10c240: 53 push %ebx 10c241: 68 53 15 12 00 push $0x121553 10c246: eb 43 jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10c248: 89 c8 mov %ecx,%eax 10c24a: 31 d2 xor %edx,%edx 10c24c: f7 75 d4 divl -0x2c(%ebp) 10c24f: 85 d2 test %edx,%edx 10c251: 74 0f je 10c262 <_Heap_Walk+0x1f5> 10c253: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c256: 83 ec 0c sub $0xc,%esp 10c259: 51 push %ecx 10c25a: 53 push %ebx 10c25b: 68 80 15 12 00 push $0x121580 10c260: eb 29 jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( block_size < min_block_size ) { 10c262: 3b 4d dc cmp -0x24(%ebp),%ecx 10c265: 73 11 jae 10c278 <_Heap_Walk+0x20b> 10c267: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c26a: 57 push %edi 10c26b: 57 push %edi 10c26c: ff 75 dc pushl -0x24(%ebp) 10c26f: 51 push %ecx 10c270: 53 push %ebx 10c271: 68 ae 15 12 00 push $0x1215ae 10c276: eb 13 jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( next_block_begin <= block_begin ) { 10c278: 39 de cmp %ebx,%esi 10c27a: 77 1f ja 10c29b <_Heap_Walk+0x22e> 10c27c: 89 f1 mov %esi,%ecx 10c27e: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c281: 83 ec 0c sub $0xc,%esp 10c284: 51 push %ecx 10c285: 53 push %ebx 10c286: 68 d9 15 12 00 push $0x1215d9 10c28b: 6a 01 push $0x1 10c28d: 56 push %esi 10c28e: ff 55 e4 call *-0x1c(%ebp) 10c291: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10c293: 83 c4 20 add $0x20,%esp 10c296: e9 dc 00 00 00 jmp 10c377 <_Heap_Walk+0x30a> } if ( !_Heap_Is_prev_used( next_block ) ) { 10c29b: f6 46 04 01 testb $0x1,0x4(%esi) 10c29f: 0f 85 c5 00 00 00 jne 10c36a <_Heap_Walk+0x2fd> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c2a5: 8b 47 08 mov 0x8(%edi),%eax 10c2a8: 89 45 c0 mov %eax,-0x40(%ebp) 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; 10c2ab: 8b 53 04 mov 0x4(%ebx),%edx 10c2ae: 89 55 c4 mov %edx,-0x3c(%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; 10c2b1: 83 e2 fe and $0xfffffffe,%edx 10c2b4: 89 55 cc mov %edx,-0x34(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c2b7: 01 da add %ebx,%edx 10c2b9: 89 55 c8 mov %edx,-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)( 10c2bc: 8b 4b 08 mov 0x8(%ebx),%ecx 10c2bf: 89 4d b4 mov %ecx,-0x4c(%ebp) 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; 10c2c2: ba 0d 16 12 00 mov $0x12160d,%edx 10c2c7: 3b 4f 0c cmp 0xc(%edi),%ecx 10c2ca: 74 0e je 10c2da <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10c2cc: ba 17 16 12 00 mov $0x121617,%edx 10c2d1: 39 f9 cmp %edi,%ecx 10c2d3: 74 05 je 10c2da <_Heap_Walk+0x26d> 10c2d5: ba 41 12 12 00 mov $0x121241,%edx 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)( 10c2da: 8b 43 0c mov 0xc(%ebx),%eax 10c2dd: 89 45 d8 mov %eax,-0x28(%ebp) 10c2e0: b8 21 16 12 00 mov $0x121621,%eax 10c2e5: 8b 4d c0 mov -0x40(%ebp),%ecx 10c2e8: 39 4d d8 cmp %ecx,-0x28(%ebp) 10c2eb: 74 0f je 10c2fc <_Heap_Walk+0x28f> "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)" : ""), 10c2ed: b8 2c 16 12 00 mov $0x12162c,%eax 10c2f2: 39 7d d8 cmp %edi,-0x28(%ebp) 10c2f5: 74 05 je 10c2fc <_Heap_Walk+0x28f> 10c2f7: b8 41 12 12 00 mov $0x121241,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10c2fc: 52 push %edx 10c2fd: ff 75 b4 pushl -0x4c(%ebp) 10c300: 50 push %eax 10c301: ff 75 d8 pushl -0x28(%ebp) 10c304: 53 push %ebx 10c305: 68 36 16 12 00 push $0x121636 10c30a: 6a 00 push $0x0 10c30c: ff 75 e0 pushl -0x20(%ebp) 10c30f: 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 ) { 10c312: 8b 55 c8 mov -0x38(%ebp),%edx 10c315: 8b 02 mov (%edx),%eax 10c317: 83 c4 20 add $0x20,%esp 10c31a: 39 45 cc cmp %eax,-0x34(%ebp) 10c31d: 74 14 je 10c333 <_Heap_Walk+0x2c6> 10c31f: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c322: 51 push %ecx 10c323: 52 push %edx 10c324: 50 push %eax 10c325: ff 75 cc pushl -0x34(%ebp) 10c328: 53 push %ebx 10c329: 68 62 16 12 00 push $0x121662 10c32e: e9 58 ff ff ff jmp 10c28b <_Heap_Walk+0x21e> ); return false; } if ( !prev_used ) { 10c333: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10c337: 75 16 jne 10c34f <_Heap_Walk+0x2e2> 10c339: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c33c: 53 push %ebx 10c33d: 68 9b 16 12 00 push $0x12169b 10c342: 6a 01 push $0x1 10c344: 56 push %esi 10c345: ff 55 e4 call *-0x1c(%ebp) 10c348: 31 c0 xor %eax,%eax 10c34a: 83 c4 10 add $0x10,%esp 10c34d: eb 28 jmp 10c377 <_Heap_Walk+0x30a> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c34f: 8b 47 08 mov 0x8(%edi),%eax 10c352: eb 07 jmp 10c35b <_Heap_Walk+0x2ee> { 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 ) { if ( free_block == block ) { 10c354: 39 d8 cmp %ebx,%eax 10c356: 74 12 je 10c36a <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10c358: 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 ) { 10c35b: 39 f8 cmp %edi,%eax 10c35d: 75 f5 jne 10c354 <_Heap_Walk+0x2e7> 10c35f: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c362: 53 push %ebx 10c363: 68 ca 16 12 00 push $0x1216ca 10c368: eb d8 jmp 10c342 <_Heap_Walk+0x2d5> ) { 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 ) { 10c36a: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10c36c: 3b 5d d0 cmp -0x30(%ebp),%ebx 10c36f: 0f 85 78 fe ff ff jne 10c1ed <_Heap_Walk+0x180> 10c375: b0 01 mov $0x1,%al block = next_block; } return true; } 10c377: 8d 65 f4 lea -0xc(%ebp),%esp 10c37a: 5b pop %ebx 10c37b: 5e pop %esi 10c37c: 5f pop %edi 10c37d: c9 leave 10c37e: c3 ret =============================================================================== 0010b674 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b674: 55 push %ebp 10b675: 89 e5 mov %esp,%ebp 10b677: 53 push %ebx 10b678: 83 ec 08 sub $0x8,%esp 10b67b: 8b 45 08 mov 0x8(%ebp),%eax 10b67e: 8b 55 0c mov 0xc(%ebp),%edx 10b681: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b684: a3 ac 62 12 00 mov %eax,0x1262ac _Internal_errors_What_happened.is_internal = is_internal; 10b689: 88 15 b0 62 12 00 mov %dl,0x1262b0 _Internal_errors_What_happened.the_error = the_error; 10b68f: 89 1d b4 62 12 00 mov %ebx,0x1262b4 _User_extensions_Fatal( the_source, is_internal, the_error ); 10b695: 53 push %ebx 10b696: 0f b6 d2 movzbl %dl,%edx 10b699: 52 push %edx 10b69a: 50 push %eax 10b69b: e8 27 19 00 00 call 10cfc7 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b6a0: c7 05 a0 63 12 00 05 movl $0x5,0x1263a0 <== NOT EXECUTED 10b6a7: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b6aa: fa cli <== NOT EXECUTED 10b6ab: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b6ad: f4 hlt <== NOT EXECUTED 10b6ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b6b1: eb fe jmp 10b6b1 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00100218 <_Message_queue_Manager_initialization>: #include #include #include void _Message_queue_Manager_initialization(void) { 100218: 55 push %ebp 100219: 89 e5 mov %esp,%ebp } 10021b: c9 leave 10021c: c3 ret =============================================================================== 0010b70c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b70c: 55 push %ebp 10b70d: 89 e5 mov %esp,%ebp 10b70f: 56 push %esi 10b710: 53 push %ebx 10b711: 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 ) 10b714: 31 c9 xor %ecx,%ecx 10b716: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b71a: 74 53 je 10b76f <_Objects_Allocate+0x63><== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b71c: 8d 73 20 lea 0x20(%ebx),%esi 10b71f: 83 ec 0c sub $0xc,%esp 10b722: 56 push %esi 10b723: e8 48 f7 ff ff call 10ae70 <_Chain_Get> 10b728: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b72a: 83 c4 10 add $0x10,%esp 10b72d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b731: 74 3c je 10b76f <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b733: 85 c0 test %eax,%eax 10b735: 75 1a jne 10b751 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b737: 83 ec 0c sub $0xc,%esp 10b73a: 53 push %ebx 10b73b: e8 60 00 00 00 call 10b7a0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b740: 89 34 24 mov %esi,(%esp) 10b743: e8 28 f7 ff ff call 10ae70 <_Chain_Get> 10b748: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b74a: 83 c4 10 add $0x10,%esp 10b74d: 85 c0 test %eax,%eax 10b74f: 74 1e je 10b76f <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b751: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b755: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b759: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b75b: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b75f: 31 d2 xor %edx,%edx 10b761: f7 f6 div %esi 10b763: c1 e0 02 shl $0x2,%eax 10b766: 03 43 30 add 0x30(%ebx),%eax 10b769: ff 08 decl (%eax) information->inactive--; 10b76b: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b76f: 89 c8 mov %ecx,%eax 10b771: 8d 65 f8 lea -0x8(%ebp),%esp 10b774: 5b pop %ebx 10b775: 5e pop %esi 10b776: c9 leave 10b777: c3 ret =============================================================================== 0010b7a0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b7a0: 55 push %ebp 10b7a1: 89 e5 mov %esp,%ebp 10b7a3: 57 push %edi 10b7a4: 56 push %esi 10b7a5: 53 push %ebx 10b7a6: 83 ec 4c sub $0x4c,%esp 10b7a9: 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 ); 10b7ac: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b7b0: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b7b3: 8b 4b 34 mov 0x34(%ebx),%ecx 10b7b6: 85 c9 test %ecx,%ecx 10b7b8: 75 0e jne 10b7c8 <_Objects_Extend_information+0x28> 10b7ba: 89 45 d4 mov %eax,-0x2c(%ebp) 10b7bd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b7c4: 31 d2 xor %edx,%edx 10b7c6: eb 31 jmp 10b7f9 <_Objects_Extend_information+0x59> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b7c8: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b7cc: 8b 43 10 mov 0x10(%ebx),%eax 10b7cf: 31 d2 xor %edx,%edx 10b7d1: 66 f7 f6 div %si 10b7d4: 0f b7 d0 movzwl %ax,%edx 10b7d7: 8b 7d c8 mov -0x38(%ebp),%edi 10b7da: 89 7d d4 mov %edi,-0x2c(%ebp) 10b7dd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b7e4: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b7e6: eb 0a jmp 10b7f2 <_Objects_Extend_information+0x52> if ( information->object_blocks[ block ] == NULL ) 10b7e8: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b7ec: 74 08 je 10b7f6 <_Objects_Extend_information+0x56> 10b7ee: 01 75 d4 add %esi,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b7f1: 40 inc %eax 10b7f2: 39 d0 cmp %edx,%eax 10b7f4: 72 f2 jb 10b7e8 <_Objects_Extend_information+0x48> 10b7f6: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b7f9: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b7fd: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b801: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b804: 89 4d b8 mov %ecx,-0x48(%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 ) { 10b807: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b80d: 0f 87 db 01 00 00 ja 10b9ee <_Objects_Extend_information+0x24e><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10b813: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b817: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b81b: 74 1e je 10b83b <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b81d: 83 ec 0c sub $0xc,%esp 10b820: 50 push %eax 10b821: 89 55 b4 mov %edx,-0x4c(%ebp) 10b824: e8 cb 1a 00 00 call 10d2f4 <_Workspace_Allocate> 10b829: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b82c: 83 c4 10 add $0x10,%esp 10b82f: 85 c0 test %eax,%eax 10b831: 8b 55 b4 mov -0x4c(%ebp),%edx 10b834: 75 1a jne 10b850 <_Objects_Extend_information+0xb0> 10b836: e9 b3 01 00 00 jmp 10b9ee <_Objects_Extend_information+0x24e> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b83b: 83 ec 0c sub $0xc,%esp 10b83e: 50 push %eax 10b83f: 89 55 b4 mov %edx,-0x4c(%ebp) 10b842: e8 81 1a 00 00 call 10d2c8 <_Workspace_Allocate_or_fatal_error> 10b847: 89 45 bc mov %eax,-0x44(%ebp) 10b84a: 83 c4 10 add $0x10,%esp 10b84d: 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 ) { 10b850: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b854: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b857: 0f 82 14 01 00 00 jb 10b971 <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b85d: 8d 72 01 lea 0x1(%edx),%esi * 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 ); 10b860: 83 ec 0c sub $0xc,%esp 10b863: 8b 4d b8 mov -0x48(%ebp),%ecx 10b866: 03 4d c8 add -0x38(%ebp),%ecx 10b869: 8d 04 76 lea (%esi,%esi,2),%eax 10b86c: 8d 04 01 lea (%ecx,%eax,1),%eax 10b86f: c1 e0 02 shl $0x2,%eax 10b872: 50 push %eax 10b873: 89 55 b4 mov %edx,-0x4c(%ebp) 10b876: e8 79 1a 00 00 call 10d2f4 <_Workspace_Allocate> if ( !object_blocks ) { 10b87b: 83 c4 10 add $0x10,%esp 10b87e: 85 c0 test %eax,%eax 10b880: 8b 55 b4 mov -0x4c(%ebp),%edx 10b883: 75 13 jne 10b898 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b885: 83 ec 0c sub $0xc,%esp 10b888: ff 75 bc pushl -0x44(%ebp) 10b88b: e8 7d 1a 00 00 call 10d30d <_Workspace_Free> return; 10b890: 83 c4 10 add $0x10,%esp 10b893: e9 56 01 00 00 jmp 10b9ee <_Objects_Extend_information+0x24e> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b898: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b89b: 89 4d c0 mov %ecx,-0x40(%ebp) 10b89e: 8d 34 f0 lea (%eax,%esi,8),%esi 10b8a1: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b8a4: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b8a8: 31 c9 xor %ecx,%ecx 10b8aa: 3b 75 c8 cmp -0x38(%ebp),%esi 10b8ad: 76 3e jbe 10b8ed <_Objects_Extend_information+0x14d> /* * 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, 10b8af: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b8b6: 89 75 d0 mov %esi,-0x30(%ebp) 10b8b9: 8b 73 34 mov 0x34(%ebx),%esi 10b8bc: 89 c7 mov %eax,%edi 10b8be: 8b 4d d0 mov -0x30(%ebp),%ecx 10b8c1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b8c3: 8b 73 30 mov 0x30(%ebx),%esi 10b8c6: 8b 7d c0 mov -0x40(%ebp),%edi 10b8c9: 8b 4d d0 mov -0x30(%ebp),%ecx 10b8cc: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b8ce: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b8d2: 03 4d c8 add -0x38(%ebp),%ecx 10b8d5: c1 e1 02 shl $0x2,%ecx 10b8d8: 8b 73 1c mov 0x1c(%ebx),%esi 10b8db: 8b 7d c4 mov -0x3c(%ebp),%edi 10b8de: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b8e0: eb 10 jmp 10b8f2 <_Objects_Extend_information+0x152> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b8e2: 8b 7d c4 mov -0x3c(%ebp),%edi 10b8e5: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b8ec: 41 inc %ecx 10b8ed: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b8f0: 72 f0 jb 10b8e2 <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b8f2: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b8f9: 8b 4d c0 mov -0x40(%ebp),%ecx 10b8fc: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b903: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b907: 8b 75 d4 mov -0x2c(%ebp),%esi 10b90a: 01 d6 add %edx,%esi 10b90c: 8b 7d d4 mov -0x2c(%ebp),%edi 10b90f: 8b 55 c4 mov -0x3c(%ebp),%edx 10b912: 8d 0c ba lea (%edx,%edi,4),%ecx 10b915: 89 fa mov %edi,%edx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b917: eb 0a jmp 10b923 <_Objects_Extend_information+0x183> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b919: 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++ ) { 10b91f: 42 inc %edx 10b920: 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 ; 10b923: 39 f2 cmp %esi,%edx 10b925: 72 f2 jb 10b919 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b927: 9c pushf 10b928: fa cli 10b929: 5e pop %esi old_tables = information->object_blocks; 10b92a: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b92d: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b930: 8b 4d c0 mov -0x40(%ebp),%ecx 10b933: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b936: 8b 7d c4 mov -0x3c(%ebp),%edi 10b939: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b93c: 8b 45 b8 mov -0x48(%ebp),%eax 10b93f: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b943: 8b 03 mov (%ebx),%eax 10b945: c1 e0 18 shl $0x18,%eax 10b948: 0d 00 00 01 00 or $0x10000,%eax 10b94d: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b951: c1 e1 1b shl $0x1b,%ecx 10b954: 09 c8 or %ecx,%eax 10b956: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b95a: 09 c8 or %ecx,%eax 10b95c: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b95f: 56 push %esi 10b960: 9d popf if ( old_tables ) 10b961: 85 d2 test %edx,%edx 10b963: 74 0c je 10b971 <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b965: 83 ec 0c sub $0xc,%esp 10b968: 52 push %edx 10b969: e8 9f 19 00 00 call 10d30d <_Workspace_Free> 10b96e: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b971: 8b 55 cc mov -0x34(%ebp),%edx 10b974: c1 e2 02 shl $0x2,%edx 10b977: 89 55 d0 mov %edx,-0x30(%ebp) 10b97a: 8b 43 34 mov 0x34(%ebx),%eax 10b97d: 8b 75 bc mov -0x44(%ebp),%esi 10b980: 8b 4d cc mov -0x34(%ebp),%ecx 10b983: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b986: ff 73 18 pushl 0x18(%ebx) 10b989: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b98d: 52 push %edx 10b98e: ff 34 88 pushl (%eax,%ecx,4) 10b991: 8d 45 dc lea -0x24(%ebp),%eax 10b994: 50 push %eax 10b995: 89 45 b4 mov %eax,-0x4c(%ebp) 10b998: e8 6f 45 00 00 call 10ff0c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b99d: 8d 7b 20 lea 0x20(%ebx),%edi 10b9a0: 8b 75 d4 mov -0x2c(%ebp),%esi 10b9a3: eb 23 jmp 10b9c8 <_Objects_Extend_information+0x228> */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b9a5: 8b 13 mov (%ebx),%edx 10b9a7: c1 e2 18 shl $0x18,%edx 10b9aa: 81 ca 00 00 01 00 or $0x10000,%edx 10b9b0: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b9b4: c1 e1 1b shl $0x1b,%ecx 10b9b7: 09 ca or %ecx,%edx 10b9b9: 09 f2 or %esi,%edx 10b9bb: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b9be: 52 push %edx 10b9bf: 52 push %edx 10b9c0: 50 push %eax 10b9c1: 57 push %edi 10b9c2: e8 6d f4 ff ff call 10ae34 <_Chain_Append> index++; 10b9c7: 46 inc %esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b9c8: 8d 45 dc lea -0x24(%ebp),%eax 10b9cb: 89 04 24 mov %eax,(%esp) 10b9ce: e8 9d f4 ff ff call 10ae70 <_Chain_Get> 10b9d3: 83 c4 10 add $0x10,%esp 10b9d6: 85 c0 test %eax,%eax 10b9d8: 75 cb jne 10b9a5 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b9da: 8b 43 30 mov 0x30(%ebx),%eax 10b9dd: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b9e1: 8b 4d d0 mov -0x30(%ebp),%ecx 10b9e4: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b9e7: 8b 43 14 mov 0x14(%ebx),%eax 10b9ea: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b9ee: 8d 65 f4 lea -0xc(%ebp),%esp 10b9f1: 5b pop %ebx 10b9f2: 5e pop %esi 10b9f3: 5f pop %edi 10b9f4: c9 leave 10b9f5: c3 ret =============================================================================== 0010ba88 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10ba88: 55 push %ebp 10ba89: 89 e5 mov %esp,%ebp 10ba8b: 56 push %esi 10ba8c: 53 push %ebx 10ba8d: 8b 75 08 mov 0x8(%ebp),%esi 10ba90: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10ba93: 85 db test %ebx,%ebx 10ba95: 74 2d je 10bac4 <_Objects_Get_information+0x3c> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10ba97: 83 ec 0c sub $0xc,%esp 10ba9a: 56 push %esi 10ba9b: e8 18 4a 00 00 call 1104b8 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10baa0: 83 c4 10 add $0x10,%esp 10baa3: 85 c0 test %eax,%eax 10baa5: 74 1d je 10bac4 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10baa7: 39 c3 cmp %eax,%ebx 10baa9: 77 19 ja 10bac4 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10baab: 8b 04 b5 dc 61 12 00 mov 0x1261dc(,%esi,4),%eax 10bab2: 85 c0 test %eax,%eax 10bab4: 74 0e je 10bac4 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10bab6: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10bab9: 85 c0 test %eax,%eax 10babb: 74 09 je 10bac6 <_Objects_Get_information+0x3e><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10babd: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10bac2: 75 02 jne 10bac6 <_Objects_Get_information+0x3e> 10bac4: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10bac6: 8d 65 f8 lea -0x8(%ebp),%esp 10bac9: 5b pop %ebx 10baca: 5e pop %esi 10bacb: c9 leave 10bacc: c3 ret =============================================================================== 00118ff8 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118ff8: 55 push %ebp 118ff9: 89 e5 mov %esp,%ebp 118ffb: 53 push %ebx 118ffc: 8b 55 08 mov 0x8(%ebp),%edx 118fff: 8b 4d 10 mov 0x10(%ebp),%ecx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 119002: b8 01 00 00 00 mov $0x1,%eax 119007: 2b 42 08 sub 0x8(%edx),%eax 11900a: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11900d: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 119011: 39 c3 cmp %eax,%ebx 119013: 72 12 jb 119027 <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 119015: 8b 52 1c mov 0x1c(%edx),%edx 119018: 8b 04 82 mov (%edx,%eax,4),%eax 11901b: 85 c0 test %eax,%eax 11901d: 74 08 je 119027 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 11901f: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 119025: eb 08 jmp 11902f <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 119027: c7 01 01 00 00 00 movl $0x1,(%ecx) 11902d: 31 c0 xor %eax,%eax return NULL; } 11902f: 5b pop %ebx 119030: c9 leave 119031: c3 ret =============================================================================== 0010f120 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10f120: 55 push %ebp 10f121: 89 e5 mov %esp,%ebp 10f123: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10f126: 8b 45 08 mov 0x8(%ebp),%eax 10f129: 85 c0 test %eax,%eax 10f12b: 75 08 jne 10f135 <_Objects_Id_to_name+0x15> 10f12d: a1 a8 1b 13 00 mov 0x131ba8,%eax 10f132: 8b 40 08 mov 0x8(%eax),%eax */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10f135: 89 c2 mov %eax,%edx 10f137: c1 ea 18 shr $0x18,%edx 10f13a: 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 ) 10f13d: 8d 4a ff lea -0x1(%edx),%ecx 10f140: 83 f9 03 cmp $0x3,%ecx 10f143: 77 38 ja 10f17d <_Objects_Id_to_name+0x5d> 10f145: eb 3d jmp 10f184 <_Objects_Id_to_name+0x64> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10f147: 89 c1 mov %eax,%ecx 10f149: c1 e9 1b shr $0x1b,%ecx 10f14c: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10f14f: 85 d2 test %edx,%edx 10f151: 74 2a je 10f17d <_Objects_Id_to_name+0x5d><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10f153: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10f157: 75 24 jne 10f17d <_Objects_Id_to_name+0x5d><== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10f159: 51 push %ecx 10f15a: 8d 4d f4 lea -0xc(%ebp),%ecx 10f15d: 51 push %ecx 10f15e: 50 push %eax 10f15f: 52 push %edx 10f160: e8 63 ff ff ff call 10f0c8 <_Objects_Get> if ( !the_object ) 10f165: 83 c4 10 add $0x10,%esp 10f168: 85 c0 test %eax,%eax 10f16a: 74 11 je 10f17d <_Objects_Id_to_name+0x5d> return OBJECTS_INVALID_ID; *name = the_object->name; 10f16c: 8b 50 0c mov 0xc(%eax),%edx 10f16f: 8b 45 0c mov 0xc(%ebp),%eax 10f172: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10f174: e8 b4 07 00 00 call 10f92d <_Thread_Enable_dispatch> 10f179: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10f17b: eb 05 jmp 10f182 <_Objects_Id_to_name+0x62> 10f17d: b8 03 00 00 00 mov $0x3,%eax } 10f182: c9 leave 10f183: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10f184: 8b 14 95 c0 1a 13 00 mov 0x131ac0(,%edx,4),%edx 10f18b: 85 d2 test %edx,%edx 10f18d: 75 b8 jne 10f147 <_Objects_Id_to_name+0x27> 10f18f: eb ec jmp 10f17d <_Objects_Id_to_name+0x5d> =============================================================================== 0010c2e0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10c2e0: 55 push %ebp 10c2e1: 89 e5 mov %esp,%ebp 10c2e3: 57 push %edi 10c2e4: 56 push %esi 10c2e5: 53 push %ebx 10c2e6: 83 ec 34 sub $0x34,%esp 10c2e9: 8b 55 08 mov 0x8(%ebp),%edx 10c2ec: 8b 7d 0c mov 0xc(%ebp),%edi 10c2ef: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10c2f2: 0f b7 42 3a movzwl 0x3a(%edx),%eax 10c2f6: 50 push %eax 10c2f7: 53 push %ebx 10c2f8: 89 55 d4 mov %edx,-0x2c(%ebp) 10c2fb: e8 c4 83 00 00 call 1146c4 10c300: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10c302: 83 c4 10 add $0x10,%esp 10c305: 8b 55 d4 mov -0x2c(%ebp),%edx 10c308: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10c30c: 74 54 je 10c362 <_Objects_Set_name+0x82> char *d; d = _Workspace_Allocate( length + 1 ); 10c30e: 83 ec 0c sub $0xc,%esp 10c311: 8d 40 01 lea 0x1(%eax),%eax 10c314: 50 push %eax 10c315: e8 8e 16 00 00 call 10d9a8 <_Workspace_Allocate> 10c31a: 89 c2 mov %eax,%edx if ( !d ) 10c31c: 83 c4 10 add $0x10,%esp 10c31f: 31 c0 xor %eax,%eax 10c321: 85 d2 test %edx,%edx 10c323: 74 79 je 10c39e <_Objects_Set_name+0xbe><== NEVER TAKEN return false; if ( the_object->name.name_p ) { 10c325: 8b 47 0c mov 0xc(%edi),%eax 10c328: 85 c0 test %eax,%eax 10c32a: 74 19 je 10c345 <_Objects_Set_name+0x65> _Workspace_Free( (void *)the_object->name.name_p ); 10c32c: 83 ec 0c sub $0xc,%esp 10c32f: 50 push %eax 10c330: 89 55 d4 mov %edx,-0x2c(%ebp) 10c333: e8 89 16 00 00 call 10d9c1 <_Workspace_Free> the_object->name.name_p = NULL; 10c338: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) 10c33f: 83 c4 10 add $0x10,%esp 10c342: 8b 55 d4 mov -0x2c(%ebp),%edx } strncpy( d, name, length ); 10c345: 50 push %eax 10c346: 56 push %esi 10c347: 53 push %ebx 10c348: 52 push %edx 10c349: 89 55 d4 mov %edx,-0x2c(%ebp) 10c34c: e8 f7 82 00 00 call 114648 d[length] = '\0'; 10c351: 8b 55 d4 mov -0x2c(%ebp),%edx 10c354: c6 04 32 00 movb $0x0,(%edx,%esi,1) the_object->name.name_p = d; 10c358: 89 57 0c mov %edx,0xc(%edi) 10c35b: b0 01 mov $0x1,%al 10c35d: 83 c4 10 add $0x10,%esp 10c360: eb 3c jmp 10c39e <_Objects_Set_name+0xbe> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10c362: 8a 03 mov (%ebx),%al 10c364: 88 45 d8 mov %al,-0x28(%ebp) 10c367: 83 fe 01 cmp $0x1,%esi 10c36a: 76 3a jbe 10c3a6 <_Objects_Set_name+0xc6> 10c36c: 0f be 53 01 movsbl 0x1(%ebx),%edx 10c370: c1 e2 10 shl $0x10,%edx 10c373: 83 fe 02 cmp $0x2,%esi 10c376: 76 33 jbe 10c3ab <_Objects_Set_name+0xcb> 10c378: 0f be 43 02 movsbl 0x2(%ebx),%eax 10c37c: c1 e0 08 shl $0x8,%eax 10c37f: b9 20 00 00 00 mov $0x20,%ecx 10c384: 83 fe 03 cmp $0x3,%esi 10c387: 76 04 jbe 10c38d <_Objects_Set_name+0xad> 10c389: 0f be 4b 03 movsbl 0x3(%ebx),%ecx 10c38d: 8a 5d d8 mov -0x28(%ebp),%bl 10c390: c1 e3 18 shl $0x18,%ebx 10c393: 09 d3 or %edx,%ebx 10c395: 09 c3 or %eax,%ebx 10c397: 09 cb or %ecx,%ebx 10c399: 89 5f 0c mov %ebx,0xc(%edi) 10c39c: b0 01 mov $0x1,%al ); } return true; } 10c39e: 8d 65 f4 lea -0xc(%ebp),%esp 10c3a1: 5b pop %ebx 10c3a2: 5e pop %esi 10c3a3: 5f pop %edi 10c3a4: c9 leave 10c3a5: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10c3a6: ba 00 00 20 00 mov $0x200000,%edx 10c3ab: b8 00 20 00 00 mov $0x2000,%eax 10c3b0: b9 20 00 00 00 mov $0x20,%ecx 10c3b5: eb d6 jmp 10c38d <_Objects_Set_name+0xad> =============================================================================== 0010b1e4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10b1e4: 55 push %ebp 10b1e5: 89 e5 mov %esp,%ebp 10b1e7: 57 push %edi 10b1e8: 56 push %esi 10b1e9: 53 push %ebx 10b1ea: 83 ec 34 sub $0x34,%esp 10b1ed: 8b 7d 08 mov 0x8(%ebp),%edi 10b1f0: 8b 75 0c mov 0xc(%ebp),%esi 10b1f3: 8a 45 14 mov 0x14(%ebp),%al 10b1f6: 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 ) ) { 10b1f9: 8d 5d e4 lea -0x1c(%ebp),%ebx 10b1fc: 53 push %ebx 10b1fd: 56 push %esi 10b1fe: e8 82 01 00 00 call 10b385 <_POSIX_Mutex_Get> 10b203: 83 c4 10 add $0x10,%esp 10b206: 85 c0 test %eax,%eax 10b208: 0f 84 ae 00 00 00 je 10b2bc <_POSIX_Condition_variables_Wait_support+0xd8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b20e: a1 08 82 12 00 mov 0x128208,%eax 10b213: 48 dec %eax 10b214: a3 08 82 12 00 mov %eax,0x128208 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10b219: 52 push %edx 10b21a: 52 push %edx 10b21b: 53 push %ebx 10b21c: 57 push %edi 10b21d: e8 16 fe ff ff call 10b038 <_POSIX_Condition_variables_Get> 10b222: 89 c3 mov %eax,%ebx switch ( location ) { 10b224: 83 c4 10 add $0x10,%esp 10b227: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b22b: 0f 85 8b 00 00 00 jne 10b2bc <_POSIX_Condition_variables_Wait_support+0xd8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10b231: 8b 40 14 mov 0x14(%eax),%eax 10b234: 85 c0 test %eax,%eax 10b236: 74 0b je 10b243 <_POSIX_Condition_variables_Wait_support+0x5f> 10b238: 3b 06 cmp (%esi),%eax 10b23a: 74 07 je 10b243 <_POSIX_Condition_variables_Wait_support+0x5f> _Thread_Enable_dispatch(); 10b23c: e8 b4 2d 00 00 call 10dff5 <_Thread_Enable_dispatch> 10b241: eb 79 jmp 10b2bc <_POSIX_Condition_variables_Wait_support+0xd8> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10b243: 83 ec 0c sub $0xc,%esp 10b246: 56 push %esi 10b247: e8 20 03 00 00 call 10b56c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10b24c: 83 c4 10 add $0x10,%esp 10b24f: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10b253: 75 4d jne 10b2a2 <_POSIX_Condition_variables_Wait_support+0xbe> the_cond->Mutex = *mutex; 10b255: 8b 06 mov (%esi),%eax 10b257: 89 43 14 mov %eax,0x14(%ebx) 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; 10b25a: c7 43 48 01 00 00 00 movl $0x1,0x48(%ebx) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10b261: a1 c4 82 12 00 mov 0x1282c4,%eax 10b266: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10b26d: 83 c3 18 add $0x18,%ebx 10b270: 89 58 44 mov %ebx,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10b273: 8b 17 mov (%edi),%edx 10b275: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10b278: 50 push %eax 10b279: 68 a4 e7 10 00 push $0x10e7a4 10b27e: ff 75 10 pushl 0x10(%ebp) 10b281: 53 push %ebx 10b282: e8 25 32 00 00 call 10e4ac <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b287: e8 69 2d 00 00 call 10dff5 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10b28c: a1 c4 82 12 00 mov 0x1282c4,%eax 10b291: 8b 58 34 mov 0x34(%eax),%ebx if ( status && status != ETIMEDOUT ) 10b294: 83 c4 10 add $0x10,%esp 10b297: 83 fb 74 cmp $0x74,%ebx 10b29a: 74 10 je 10b2ac <_POSIX_Condition_variables_Wait_support+0xc8> 10b29c: 85 db test %ebx,%ebx 10b29e: 74 0c je 10b2ac <_POSIX_Condition_variables_Wait_support+0xc8><== ALWAYS TAKEN 10b2a0: eb 1f jmp 10b2c1 <_POSIX_Condition_variables_Wait_support+0xdd><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 10b2a2: e8 4e 2d 00 00 call 10dff5 <_Thread_Enable_dispatch> 10b2a7: bb 74 00 00 00 mov $0x74,%ebx /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10b2ac: 83 ec 0c sub $0xc,%esp 10b2af: 56 push %esi 10b2b0: e8 37 02 00 00 call 10b4ec if ( mutex_status ) 10b2b5: 83 c4 10 add $0x10,%esp 10b2b8: 85 c0 test %eax,%eax 10b2ba: 74 05 je 10b2c1 <_POSIX_Condition_variables_Wait_support+0xdd> 10b2bc: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10b2c1: 89 d8 mov %ebx,%eax 10b2c3: 8d 65 f4 lea -0xc(%ebp),%esp 10b2c6: 5b pop %ebx 10b2c7: 5e pop %esi 10b2c8: 5f pop %edi 10b2c9: c9 leave 10b2ca: c3 ret =============================================================================== 00111ec4 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 111ec4: 55 push %ebp 111ec5: 89 e5 mov %esp,%ebp 111ec7: 57 push %edi 111ec8: 56 push %esi 111ec9: 53 push %ebx 111eca: 83 ec 1c sub $0x1c,%esp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 111ecd: 8b 45 08 mov 0x8(%ebp),%eax 111ed0: 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); 111ed3: 89 d0 mov %edx,%eax 111ed5: c1 e8 18 shr $0x18,%eax 111ed8: 83 e0 07 and $0x7,%eax for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 111edb: 0f b7 d2 movzwl %dx,%edx 111ede: c1 e2 02 shl $0x2,%edx 111ee1: 89 55 e4 mov %edx,-0x1c(%ebp) 111ee4: 83 c0 04 add $0x4,%eax 111ee7: 89 45 e0 mov %eax,-0x20(%ebp) * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 111eea: 8b 3d 58 66 12 00 mov 0x126658,%edi 111ef0: bb 01 00 00 00 mov $0x1,%ebx 111ef5: b2 01 mov $0x1,%dl done = true; for ( index = 1 ; index <= max ; ++index ) { 111ef7: eb 38 jmp 111f31 <_POSIX_Keys_Run_destructors+0x6d> POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 111ef9: 0f b7 cb movzwl %bx,%ecx 111efc: a1 64 66 12 00 mov 0x126664,%eax 111f01: 8b 04 88 mov (%eax,%ecx,4),%eax if ( key != NULL && key->destructor != NULL ) { 111f04: 85 c0 test %eax,%eax 111f06: 74 28 je 111f30 <_POSIX_Keys_Run_destructors+0x6c> 111f08: 83 78 10 00 cmpl $0x0,0x10(%eax) 111f0c: 74 22 je 111f30 <_POSIX_Keys_Run_destructors+0x6c> void *value = key->Values [ thread_api ][ thread_index ]; 111f0e: 8b 75 e4 mov -0x1c(%ebp),%esi 111f11: 8b 4d e0 mov -0x20(%ebp),%ecx 111f14: 03 74 88 04 add 0x4(%eax,%ecx,4),%esi 111f18: 8b 0e mov (%esi),%ecx if ( value != NULL ) { 111f1a: 85 c9 test %ecx,%ecx 111f1c: 74 12 je 111f30 <_POSIX_Keys_Run_destructors+0x6c><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; 111f1e: c7 06 00 00 00 00 movl $0x0,(%esi) <== NOT EXECUTED (*key->destructor)( value ); 111f24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f27: 51 push %ecx <== NOT EXECUTED 111f28: ff 50 10 call *0x10(%eax) <== NOT EXECUTED 111f2b: 31 d2 xor %edx,%edx <== NOT EXECUTED 111f2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 111f30: 43 inc %ebx 111f31: 66 39 fb cmp %di,%bx 111f34: 76 c3 jbe 111ef9 <_POSIX_Keys_Run_destructors+0x35> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 111f36: 84 d2 test %dl,%dl 111f38: 74 b0 je 111eea <_POSIX_Keys_Run_destructors+0x26><== NEVER TAKEN done = false; } } } } } 111f3a: 8d 65 f4 lea -0xc(%ebp),%esp 111f3d: 5b pop %ebx 111f3e: 5e pop %esi 111f3f: 5f pop %edi 111f40: c9 leave 111f41: c3 ret =============================================================================== 0010e6e0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10e6e0: 55 push %ebp 10e6e1: 89 e5 mov %esp,%ebp 10e6e3: 57 push %edi 10e6e4: 56 push %esi 10e6e5: 53 push %ebx 10e6e6: 83 ec 30 sub $0x30,%esp 10e6e9: 8b 75 08 mov 0x8(%ebp),%esi 10e6ec: 8b 5d 14 mov 0x14(%ebp),%ebx 10e6ef: 8a 55 18 mov 0x18(%ebp),%dl 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( 10e6f2: 8d 45 e4 lea -0x1c(%ebp),%eax 10e6f5: 50 push %eax 10e6f6: 56 push %esi 10e6f7: 68 3c f3 12 00 push $0x12f33c 10e6fc: 88 55 d4 mov %dl,-0x2c(%ebp) 10e6ff: e8 1c 2b 00 00 call 111220 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10e704: 83 c4 10 add $0x10,%esp 10e707: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10e70b: 8a 55 d4 mov -0x2c(%ebp),%dl 10e70e: 0f 85 b9 00 00 00 jne 10e7cd <_POSIX_Message_queue_Receive_support+0xed> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10e714: 8b 78 14 mov 0x14(%eax),%edi 10e717: 89 f9 mov %edi,%ecx 10e719: 83 e1 03 and $0x3,%ecx 10e71c: 49 dec %ecx 10e71d: 75 0a jne 10e729 <_POSIX_Message_queue_Receive_support+0x49> _Thread_Enable_dispatch(); 10e71f: e8 35 33 00 00 call 111a59 <_Thread_Enable_dispatch> 10e724: e9 a4 00 00 00 jmp 10e7cd <_POSIX_Message_queue_Receive_support+0xed> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10e729: 8b 48 10 mov 0x10(%eax),%ecx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10e72c: 8b 45 10 mov 0x10(%ebp),%eax 10e72f: 3b 41 68 cmp 0x68(%ecx),%eax 10e732: 73 15 jae 10e749 <_POSIX_Message_queue_Receive_support+0x69> _Thread_Enable_dispatch(); 10e734: e8 20 33 00 00 call 111a59 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10e739: e8 6a 9c 00 00 call 1183a8 <__errno> 10e73e: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10e744: e9 8f 00 00 00 jmp 10e7d8 <_POSIX_Message_queue_Receive_support+0xf8> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10e749: 31 c0 xor %eax,%eax 10e74b: 84 d2 test %dl,%dl 10e74d: 74 0b je 10e75a <_POSIX_Message_queue_Receive_support+0x7a><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10e74f: 89 f8 mov %edi,%eax 10e751: c1 e8 0e shr $0xe,%eax 10e754: 83 f0 01 xor $0x1,%eax 10e757: 83 e0 01 and $0x1,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10e75a: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10e761: 52 push %edx 10e762: 52 push %edx 10e763: ff 75 1c pushl 0x1c(%ebp) 10e766: 0f b6 c0 movzbl %al,%eax 10e769: 50 push %eax 10e76a: 8d 45 e0 lea -0x20(%ebp),%eax 10e76d: 50 push %eax 10e76e: ff 75 0c pushl 0xc(%ebp) 10e771: 56 push %esi 10e772: 83 c1 1c add $0x1c,%ecx 10e775: 51 push %ecx 10e776: e8 d1 1c 00 00 call 11044c <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10e77b: 83 c4 20 add $0x20,%esp 10e77e: e8 d6 32 00 00 call 111a59 <_Thread_Enable_dispatch> if (msg_prio) { 10e783: 85 db test %ebx,%ebx 10e785: 74 15 je 10e79c <_POSIX_Message_queue_Receive_support+0xbc><== NEVER TAKEN *msg_prio = _POSIX_Message_queue_Priority_from_core( 10e787: 8b 15 04 ef 12 00 mov 0x12ef04,%edx 10e78d: 8b 42 24 mov 0x24(%edx),%eax 10e790: c1 f8 1f sar $0x1f,%eax 10e793: 8b 52 24 mov 0x24(%edx),%edx 10e796: 31 c2 xor %eax,%edx 10e798: 89 13 mov %edx,(%ebx) 10e79a: 29 03 sub %eax,(%ebx) _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 10e79c: a1 04 ef 12 00 mov 0x12ef04,%eax 10e7a1: 83 78 34 00 cmpl $0x0,0x34(%eax) 10e7a5: 75 05 jne 10e7ac <_POSIX_Message_queue_Receive_support+0xcc> return length_out; 10e7a7: 8b 45 e0 mov -0x20(%ebp),%eax 10e7aa: eb 2f jmp 10e7db <_POSIX_Message_queue_Receive_support+0xfb> rtems_set_errno_and_return_minus_one( 10e7ac: e8 f7 9b 00 00 call 1183a8 <__errno> 10e7b1: 89 c3 mov %eax,%ebx 10e7b3: 83 ec 0c sub $0xc,%esp 10e7b6: a1 04 ef 12 00 mov 0x12ef04,%eax 10e7bb: ff 70 34 pushl 0x34(%eax) 10e7be: e8 fd 01 00 00 call 10e9c0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10e7c3: 89 03 mov %eax,(%ebx) 10e7c5: 83 c8 ff or $0xffffffff,%eax 10e7c8: 83 c4 10 add $0x10,%esp 10e7cb: eb 0e jmp 10e7db <_POSIX_Message_queue_Receive_support+0xfb> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e7cd: e8 d6 9b 00 00 call 1183a8 <__errno> 10e7d2: c7 00 09 00 00 00 movl $0x9,(%eax) 10e7d8: 83 c8 ff or $0xffffffff,%eax } 10e7db: 8d 65 f4 lea -0xc(%ebp),%esp 10e7de: 5b pop %ebx 10e7df: 5e pop %esi 10e7e0: 5f pop %edi 10e7e1: c9 leave 10e7e2: c3 ret =============================================================================== 0010f704 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10f704: 55 push %ebp 10f705: 89 e5 mov %esp,%ebp 10f707: 83 ec 08 sub $0x8,%esp 10f70a: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f70d: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10f713: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10f71a: 75 2c jne 10f748 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 10f71c: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax) 10f723: 75 23 jne 10f748 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> thread_support->cancelation_requested ) { 10f725: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax) 10f72c: 74 1a je 10f748 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10f72e: a1 00 72 12 00 mov 0x127200,%eax 10f733: 48 dec %eax 10f734: a3 00 72 12 00 mov %eax,0x127200 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10f739: 50 push %eax 10f73a: 50 push %eax 10f73b: 6a ff push $0xffffffff 10f73d: 52 push %edx 10f73e: e8 fd 05 00 00 call 10fd40 <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10f743: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 10f746: c9 leave 10f747: c3 ret 10f748: c9 leave thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 10f749: e9 53 cf ff ff jmp 10c6a1 <_Thread_Enable_dispatch> =============================================================================== 001107b0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 1107b0: 55 push %ebp 1107b1: 89 e5 mov %esp,%ebp 1107b3: 57 push %edi 1107b4: 56 push %esi 1107b5: 53 push %ebx 1107b6: 83 ec 18 sub $0x18,%esp 1107b9: 8b 7d 08 mov 0x8(%ebp),%edi 1107bc: 8b 5d 0c mov 0xc(%ebp),%ebx 1107bf: 8b 75 10 mov 0x10(%ebp),%esi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 1107c2: ff 33 pushl (%ebx) 1107c4: e8 c7 ff ff ff call 110790 <_POSIX_Priority_Is_valid> 1107c9: 83 c4 10 add $0x10,%esp 1107cc: 84 c0 test %al,%al 1107ce: 0f 84 97 00 00 00 je 11086b <_POSIX_Thread_Translate_sched_param+0xbb><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1107d4: c7 06 00 00 00 00 movl $0x0,(%esi) *budget_callout = NULL; 1107da: 8b 45 14 mov 0x14(%ebp),%eax 1107dd: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 1107e3: 85 ff test %edi,%edi 1107e5: 75 08 jne 1107ef <_POSIX_Thread_Translate_sched_param+0x3f> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1107e7: c7 06 01 00 00 00 movl $0x1,(%esi) 1107ed: eb 18 jmp 110807 <_POSIX_Thread_Translate_sched_param+0x57> return 0; } if ( policy == SCHED_FIFO ) { 1107ef: 83 ff 01 cmp $0x1,%edi 1107f2: 75 08 jne 1107fc <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1107f4: c7 06 00 00 00 00 movl $0x0,(%esi) 1107fa: eb 0b jmp 110807 <_POSIX_Thread_Translate_sched_param+0x57> return 0; } if ( policy == SCHED_RR ) { 1107fc: 83 ff 02 cmp $0x2,%edi 1107ff: 75 0a jne 11080b <_POSIX_Thread_Translate_sched_param+0x5b> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 110801: c7 06 02 00 00 00 movl $0x2,(%esi) 110807: 31 c0 xor %eax,%eax return 0; 110809: eb 65 jmp 110870 <_POSIX_Thread_Translate_sched_param+0xc0> } if ( policy == SCHED_SPORADIC ) { 11080b: 83 ff 04 cmp $0x4,%edi 11080e: 75 5b jne 11086b <_POSIX_Thread_Translate_sched_param+0xbb> if ( (param->sched_ss_repl_period.tv_sec == 0) && 110810: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 110814: 75 06 jne 11081c <_POSIX_Thread_Translate_sched_param+0x6c> (param->sched_ss_repl_period.tv_nsec == 0) ) 110816: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 11081a: 74 4f je 11086b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 11081c: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 110820: 75 06 jne 110828 <_POSIX_Thread_Translate_sched_param+0x78> (param->sched_ss_init_budget.tv_nsec == 0) ) 110822: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 110826: 74 43 je 11086b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 110828: 83 ec 0c sub $0xc,%esp 11082b: 8d 43 08 lea 0x8(%ebx),%eax 11082e: 50 push %eax 11082f: e8 14 d6 ff ff call 10de48 <_Timespec_To_ticks> 110834: 89 c7 mov %eax,%edi 110836: 8d 43 10 lea 0x10(%ebx),%eax 110839: 89 04 24 mov %eax,(%esp) 11083c: e8 07 d6 ff ff call 10de48 <_Timespec_To_ticks> 110841: 83 c4 10 add $0x10,%esp 110844: 39 c7 cmp %eax,%edi 110846: 72 23 jb 11086b <_POSIX_Thread_Translate_sched_param+0xbb> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 110848: 83 ec 0c sub $0xc,%esp 11084b: ff 73 04 pushl 0x4(%ebx) 11084e: e8 3d ff ff ff call 110790 <_POSIX_Priority_Is_valid> 110853: 83 c4 10 add $0x10,%esp 110856: 84 c0 test %al,%al 110858: 74 11 je 11086b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 11085a: c7 06 03 00 00 00 movl $0x3,(%esi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 110860: 8b 45 14 mov 0x14(%ebp),%eax 110863: c7 00 57 ac 10 00 movl $0x10ac57,(%eax) 110869: eb 9c jmp 110807 <_POSIX_Thread_Translate_sched_param+0x57> return 0; 11086b: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 110870: 8d 65 f4 lea -0xc(%ebp),%esp 110873: 5b pop %ebx 110874: 5e pop %esi 110875: 5f pop %edi 110876: c9 leave 110877: c3 ret =============================================================================== 0010f723 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 10f723: 55 push %ebp 10f724: 89 e5 mov %esp,%ebp 10f726: 57 push %edi 10f727: 56 push %esi 10f728: 53 push %ebx 10f729: 83 ec 28 sub $0x28,%esp 10f72c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 10f72f: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 10f735: 53 push %ebx 10f736: e8 2d 27 00 00 call 111e68 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 10f73b: 89 1c 24 mov %ebx,(%esp) 10f73e: e8 81 27 00 00 call 111ec4 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 10f743: 8b 53 28 mov 0x28(%ebx),%edx while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10f746: 8d 7e 40 lea 0x40(%esi),%edi 10f749: 83 c4 10 add $0x10,%esp 10f74c: eb 05 jmp 10f753 <_POSIX_Threads_Delete_extension+0x30> *(void **)the_thread->Wait.return_argument = value_ptr; 10f74e: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 10f751: 89 10 mov %edx,(%eax) <== NOT EXECUTED /* * 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 )) ) 10f753: 83 ec 0c sub $0xc,%esp 10f756: 57 push %edi 10f757: 89 55 e4 mov %edx,-0x1c(%ebp) 10f75a: e8 65 cf ff ff call 10c6c4 <_Thread_queue_Dequeue> 10f75f: 83 c4 10 add $0x10,%esp 10f762: 85 c0 test %eax,%eax 10f764: 8b 55 e4 mov -0x1c(%ebp),%edx 10f767: 75 e5 jne 10f74e <_POSIX_Threads_Delete_extension+0x2b><== NEVER TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 10f769: 83 be 80 00 00 00 04 cmpl $0x4,0x80(%esi) 10f770: 75 12 jne 10f784 <_POSIX_Threads_Delete_extension+0x61> (void) _Watchdog_Remove( &api->Sporadic_timer ); 10f772: 83 ec 0c sub $0xc,%esp 10f775: 8d 86 a4 00 00 00 lea 0xa4(%esi),%eax 10f77b: 50 push %eax 10f77c: e8 77 da ff ff call 10d1f8 <_Watchdog_Remove> 10f781: 83 c4 10 add $0x10,%esp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 10f784: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10f78b: 00 00 00 (void) _Workspace_Free( api ); 10f78e: 89 75 08 mov %esi,0x8(%ebp) } 10f791: 8d 65 f4 lea -0xc(%ebp),%esp 10f794: 5b pop %ebx 10f795: 5e pop %esi 10f796: 5f pop %edi 10f797: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 10f798: e9 70 db ff ff jmp 10d30d <_Workspace_Free> =============================================================================== 0010a994 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10a994: 55 push %ebp 10a995: 89 e5 mov %esp,%ebp 10a997: 57 push %edi 10a998: 56 push %esi 10a999: 53 push %ebx 10a99a: 83 ec 5c sub $0x5c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10a99d: 8b 3d 10 32 12 00 mov 0x123210,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10a9a3: 8b 15 0c 32 12 00 mov 0x12320c,%edx if ( !user_threads || maximum == 0 ) 10a9a9: 85 d2 test %edx,%edx 10a9ab: 74 54 je 10aa01 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a9ad: 85 ff test %edi,%edi 10a9af: 74 50 je 10aa01 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a9b1: 31 db xor %ebx,%ebx for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10a9b3: 8d 75 a8 lea -0x58(%ebp),%esi 10a9b6: 83 ec 0c sub $0xc,%esp 10a9b9: 56 push %esi 10a9ba: 89 55 a4 mov %edx,-0x5c(%ebp) 10a9bd: e8 b6 5e 00 00 call 110878 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10a9c2: 5a pop %edx 10a9c3: 59 pop %ecx 10a9c4: 6a 02 push $0x2 10a9c6: 56 push %esi 10a9c7: e8 d4 5e 00 00 call 1108a0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10a9cc: 59 pop %ecx 10a9cd: 58 pop %eax 10a9ce: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10a9d2: 56 push %esi 10a9d3: e8 f8 5e 00 00 call 1108d0 status = pthread_create( 10a9d8: 6a 00 push $0x0 10a9da: ff 34 df pushl (%edi,%ebx,8) 10a9dd: 56 push %esi 10a9de: 8d 45 e4 lea -0x1c(%ebp),%eax 10a9e1: 50 push %eax 10a9e2: e8 75 fc ff ff call 10a65c &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10a9e7: 83 c4 20 add $0x20,%esp 10a9ea: 85 c0 test %eax,%eax 10a9ec: 8b 55 a4 mov -0x5c(%ebp),%edx 10a9ef: 74 0b je 10a9fc <_POSIX_Threads_Initialize_user_threads_body+0x68> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10a9f1: 52 push %edx 10a9f2: 50 push %eax 10a9f3: 6a 01 push $0x1 10a9f5: 6a 02 push $0x2 10a9f7: e8 b8 1b 00 00 call 10c5b4 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10a9fc: 43 inc %ebx 10a9fd: 39 d3 cmp %edx,%ebx 10a9ff: 72 b5 jb 10a9b6 <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10aa01: 8d 65 f4 lea -0xc(%ebp),%esp 10aa04: 5b pop %ebx 10aa05: 5e pop %esi 10aa06: 5f pop %edi 10aa07: c9 leave 10aa08: c3 ret =============================================================================== 0010f933 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 10f933: 55 push %ebp 10f934: 89 e5 mov %esp,%ebp 10f936: 56 push %esi 10f937: 53 push %ebx 10f938: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f93b: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 10f941: 83 ec 0c sub $0xc,%esp 10f944: 8d 86 94 00 00 00 lea 0x94(%esi),%eax 10f94a: 50 push %eax 10f94b: e8 a0 0f 00 00 call 1108f0 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 10f950: 89 43 78 mov %eax,0x78(%ebx) 10f953: 0f b6 05 f4 21 12 00 movzbl 0x1221f4,%eax 10f95a: 2b 86 84 00 00 00 sub 0x84(%esi),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 10f960: 89 43 18 mov %eax,0x18(%ebx) */ #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 ) { 10f963: 83 c4 10 add $0x10,%esp 10f966: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10f96a: 75 12 jne 10f97e <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 10f96c: 39 43 14 cmp %eax,0x14(%ebx) 10f96f: 76 0d jbe 10f97e <_POSIX_Threads_Sporadic_budget_TSR+0x4b> _Thread_Change_priority( the_thread, new_priority, true ); 10f971: 52 push %edx 10f972: 6a 01 push $0x1 10f974: 50 push %eax 10f975: 53 push %ebx 10f976: e8 f9 c4 ff ff call 10be74 <_Thread_Change_priority> 10f97b: 83 c4 10 add $0x10,%esp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 10f97e: 83 ec 0c sub $0xc,%esp 10f981: 8d 86 8c 00 00 00 lea 0x8c(%esi),%eax 10f987: 50 push %eax 10f988: e8 63 0f 00 00 call 1108f0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10f98d: 89 86 b0 00 00 00 mov %eax,0xb0(%esi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10f993: 83 c4 10 add $0x10,%esp 10f996: 81 c6 a4 00 00 00 add $0xa4,%esi 10f99c: 89 75 0c mov %esi,0xc(%ebp) 10f99f: c7 45 08 e4 62 12 00 movl $0x1262e4,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 10f9a6: 8d 65 f8 lea -0x8(%ebp),%esp 10f9a9: 5b pop %ebx 10f9aa: 5e pop %esi 10f9ab: c9 leave 10f9ac: e9 33 d7 ff ff jmp 10d0e4 <_Watchdog_Insert> =============================================================================== 0010f8f3 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10f8f3: 55 push %ebp 10f8f4: 89 e5 mov %esp,%ebp 10f8f6: 83 ec 08 sub $0x8,%esp 10f8f9: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f8fc: 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 */ 10f902: 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); 10f909: 0f b6 15 f4 21 12 00 movzbl 0x1221f4,%edx 10f910: 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; 10f916: 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 ) { 10f919: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10f91d: 75 12 jne 10f931 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 10f91f: 39 50 14 cmp %edx,0x14(%eax) 10f922: 73 0d jae 10f931 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); 10f924: 51 push %ecx 10f925: 6a 01 push $0x1 10f927: 52 push %edx 10f928: 50 push %eax 10f929: e8 46 c5 ff ff call 10be74 <_Thread_Change_priority> 10f92e: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 10f931: c9 leave 10f932: c3 ret =============================================================================== 0010a6cc <_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) { 10a6cc: 55 push %ebp 10a6cd: 89 e5 mov %esp,%ebp 10a6cf: 53 push %ebx 10a6d0: 83 ec 04 sub $0x4,%esp 10a6d3: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10a6d6: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a6d9: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 10a6dd: 75 06 jne 10a6e5 <_POSIX_Timer_TSR+0x19> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10a6df: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10a6e3: 74 34 je 10a719 <_POSIX_Timer_TSR+0x4d> <== NEVER TAKEN activated = _POSIX_Timer_Insert_helper( 10a6e5: 83 ec 0c sub $0xc,%esp 10a6e8: 53 push %ebx 10a6e9: 68 cc a6 10 00 push $0x10a6cc 10a6ee: ff 73 08 pushl 0x8(%ebx) 10a6f1: ff 73 64 pushl 0x64(%ebx) 10a6f4: 8d 43 10 lea 0x10(%ebx),%eax 10a6f7: 50 push %eax 10a6f8: e8 9f 5d 00 00 call 11049c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10a6fd: 83 c4 20 add $0x20,%esp 10a700: 84 c0 test %al,%al 10a702: 74 30 je 10a734 <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10a704: 83 ec 0c sub $0xc,%esp 10a707: 8d 43 6c lea 0x6c(%ebx),%eax 10a70a: 50 push %eax 10a70b: e8 48 14 00 00 call 10bb58 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a710: 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 ) || 10a714: 83 c4 10 add $0x10,%esp 10a717: eb 04 jmp 10a71d <_POSIX_Timer_TSR+0x51> /* 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; 10a719: 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 ) ) { 10a71d: 50 push %eax 10a71e: 50 push %eax 10a71f: ff 73 44 pushl 0x44(%ebx) 10a722: ff 73 38 pushl 0x38(%ebx) 10a725: e8 46 59 00 00 call 110070 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10a72a: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10a731: 83 c4 10 add $0x10,%esp } 10a734: 8b 5d fc mov -0x4(%ebp),%ebx 10a737: c9 leave 10a738: c3 ret =============================================================================== 00112170 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 112170: 55 push %ebp 112171: 89 e5 mov %esp,%ebp 112173: 57 push %edi 112174: 56 push %esi 112175: 53 push %ebx 112176: 83 ec 38 sub $0x38,%esp 112179: 8b 5d 08 mov 0x8(%ebp),%ebx 11217c: 8b 75 0c mov 0xc(%ebp),%esi siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 11217f: 6a 01 push $0x1 112181: 0f b6 45 10 movzbl 0x10(%ebp),%eax 112185: 50 push %eax 112186: 8d 7d dc lea -0x24(%ebp),%edi 112189: 57 push %edi 11218a: 56 push %esi 11218b: 53 push %ebx 11218c: e8 5b 00 00 00 call 1121ec <_POSIX_signals_Clear_signals> 112191: 83 c4 20 add $0x20,%esp 112194: 84 c0 test %al,%al 112196: 74 48 je 1121e0 <_POSIX_signals_Check_signal+0x70> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 112198: 6b d6 0c imul $0xc,%esi,%edx 11219b: 8b 82 70 67 12 00 mov 0x126770(%edx),%eax 1121a1: 83 f8 01 cmp $0x1,%eax 1121a4: 74 3a je 1121e0 <_POSIX_signals_Check_signal+0x70><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 1121a6: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 1121ac: 89 4d d4 mov %ecx,-0x2c(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 1121af: 0b 8a 6c 67 12 00 or 0x12676c(%edx),%ecx 1121b5: 89 8b cc 00 00 00 mov %ecx,0xcc(%ebx) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 1121bb: 83 ba 68 67 12 00 02 cmpl $0x2,0x126768(%edx) 1121c2: 75 06 jne 1121ca <_POSIX_signals_Check_signal+0x5a> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 1121c4: 52 push %edx 1121c5: 6a 00 push $0x0 1121c7: 57 push %edi 1121c8: eb 03 jmp 1121cd <_POSIX_signals_Check_signal+0x5d> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 1121ca: 83 ec 0c sub $0xc,%esp 1121cd: 56 push %esi 1121ce: ff d0 call *%eax 1121d0: 83 c4 10 add $0x10,%esp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 1121d3: 8b 45 d4 mov -0x2c(%ebp),%eax 1121d6: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 1121dc: b0 01 mov $0x1,%al return true; 1121de: eb 02 jmp 1121e2 <_POSIX_signals_Check_signal+0x72> 1121e0: 31 c0 xor %eax,%eax } 1121e2: 8d 65 f4 lea -0xc(%ebp),%esp 1121e5: 5b pop %ebx 1121e6: 5e pop %esi 1121e7: 5f pop %edi 1121e8: c9 leave 1121e9: c3 ret =============================================================================== 0011296c <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 11296c: 55 push %ebp 11296d: 89 e5 mov %esp,%ebp 11296f: 53 push %ebx 112970: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 112973: 9c pushf 112974: fa cli 112975: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 112976: 6b c1 0c imul $0xc,%ecx,%eax 112979: 83 b8 68 67 12 00 02 cmpl $0x2,0x126768(%eax) 112980: 75 0e jne 112990 <_POSIX_signals_Clear_process_signals+0x24> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112982: 8d 98 64 69 12 00 lea 0x126964(%eax),%ebx 112988: 39 98 60 69 12 00 cmp %ebx,0x126960(%eax) 11298e: 75 1d jne 1129ad <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 112990: 49 dec %ecx 112991: b8 fe ff ff ff mov $0xfffffffe,%eax 112996: d3 c0 rol %cl,%eax 112998: 23 05 5c 69 12 00 and 0x12695c,%eax 11299e: a3 5c 69 12 00 mov %eax,0x12695c if ( !_POSIX_signals_Pending ) 1129a3: 85 c0 test %eax,%eax 1129a5: 75 06 jne 1129ad <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 1129a7: ff 0d a8 62 12 00 decl 0x1262a8 } _ISR_Enable( level ); 1129ad: 52 push %edx 1129ae: 9d popf } 1129af: 5b pop %ebx 1129b0: c9 leave 1129b1: c3 ret =============================================================================== 0010b014 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10b014: 55 push %ebp 10b015: 89 e5 mov %esp,%ebp 10b017: 56 push %esi 10b018: 53 push %ebx 10b019: 8b 55 08 mov 0x8(%ebp),%edx 10b01c: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10b021: bb 01 00 00 00 mov $0x1,%ebx 10b026: 8d 48 ff lea -0x1(%eax),%ecx 10b029: 89 de mov %ebx,%esi 10b02b: d3 e6 shl %cl,%esi 10b02d: 85 d6 test %edx,%esi 10b02f: 75 1e jne 10b04f <_POSIX_signals_Get_highest+0x3b><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10b031: 40 inc %eax 10b032: 83 f8 20 cmp $0x20,%eax 10b035: 75 ef jne 10b026 <_POSIX_signals_Get_highest+0x12> 10b037: b0 01 mov $0x1,%al #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10b039: bb 01 00 00 00 mov $0x1,%ebx 10b03e: 8d 48 ff lea -0x1(%eax),%ecx 10b041: 89 de mov %ebx,%esi 10b043: d3 e6 shl %cl,%esi 10b045: 85 d6 test %edx,%esi 10b047: 75 06 jne 10b04f <_POSIX_signals_Get_highest+0x3b> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10b049: 40 inc %eax 10b04a: 83 f8 1b cmp $0x1b,%eax 10b04d: 75 ef jne 10b03e <_POSIX_signals_Get_highest+0x2a><== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10b04f: 5b pop %ebx 10b050: 5e pop %esi 10b051: c9 leave 10b052: c3 ret =============================================================================== 0010f5d9 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10f5d9: 55 push %ebp 10f5da: 89 e5 mov %esp,%ebp 10f5dc: 57 push %edi 10f5dd: 56 push %esi 10f5de: 53 push %ebx 10f5df: 83 ec 0c sub $0xc,%esp POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f5e2: 8b 45 08 mov 0x8(%ebp),%eax 10f5e5: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; 10f5eb: a1 c4 62 12 00 mov 0x1262c4,%eax 10f5f0: 8b 78 34 mov 0x34(%eax),%edi /* * api may be NULL in case of a thread close in progress */ if ( !api ) 10f5f3: 85 db test %ebx,%ebx 10f5f5: 74 72 je 10f669 <_POSIX_signals_Post_switch_extension+0x90><== NEVER TAKEN * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 10f5f7: 9c pushf 10f5f8: fa cli 10f5f9: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 10f5fa: 8b 15 5c 69 12 00 mov 0x12695c,%edx 10f600: 0b 93 d0 00 00 00 or 0xd0(%ebx),%edx * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 10f606: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10f60c: f7 d0 not %eax 10f60e: 85 c2 test %eax,%edx 10f610: 75 0c jne 10f61e <_POSIX_signals_Post_switch_extension+0x45> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10f612: 51 push %ecx 10f613: 9d popf _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; 10f614: a1 c4 62 12 00 mov 0x1262c4,%eax 10f619: 89 78 34 mov %edi,0x34(%eax) 10f61c: eb 4b jmp 10f669 <_POSIX_signals_Post_switch_extension+0x90> if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 10f61e: 51 push %ecx 10f61f: 9d popf 10f620: be 1b 00 00 00 mov $0x1b,%esi for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10f625: 52 push %edx 10f626: 6a 00 push $0x0 10f628: 56 push %esi 10f629: 53 push %ebx 10f62a: e8 41 2b 00 00 call 112170 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10f62f: 83 c4 0c add $0xc,%esp 10f632: 6a 01 push $0x1 10f634: 56 push %esi 10f635: 53 push %ebx 10f636: e8 35 2b 00 00 call 112170 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10f63b: 46 inc %esi 10f63c: 83 c4 10 add $0x10,%esp 10f63f: 83 fe 20 cmp $0x20,%esi 10f642: 75 e1 jne 10f625 <_POSIX_signals_Post_switch_extension+0x4c> 10f644: 66 be 01 00 mov $0x1,%si _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10f648: 50 push %eax 10f649: 6a 00 push $0x0 10f64b: 56 push %esi 10f64c: 53 push %ebx 10f64d: e8 1e 2b 00 00 call 112170 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10f652: 83 c4 0c add $0xc,%esp 10f655: 6a 01 push $0x1 10f657: 56 push %esi 10f658: 53 push %ebx 10f659: e8 12 2b 00 00 call 112170 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10f65e: 46 inc %esi 10f65f: 83 c4 10 add $0x10,%esp 10f662: 83 fe 1b cmp $0x1b,%esi 10f665: 75 e1 jne 10f648 <_POSIX_signals_Post_switch_extension+0x6f> 10f667: eb 8e jmp 10f5f7 <_POSIX_signals_Post_switch_extension+0x1e> _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; } 10f669: 8d 65 f4 lea -0xc(%ebp),%esp 10f66c: 5b pop %ebx 10f66d: 5e pop %esi 10f66e: 5f pop %edi 10f66f: c9 leave 10f670: c3 ret =============================================================================== 001122fc <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 1122fc: 55 push %ebp 1122fd: 89 e5 mov %esp,%ebp 1122ff: 57 push %edi 112300: 56 push %esi 112301: 53 push %ebx 112302: 83 ec 0c sub $0xc,%esp 112305: 8b 5d 08 mov 0x8(%ebp),%ebx 112308: 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 ]; 11230b: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 112311: 8d 4a ff lea -0x1(%edx),%ecx 112314: b8 01 00 00 00 mov $0x1,%eax 112319: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 11231b: 8b 4b 10 mov 0x10(%ebx),%ecx 11231e: 89 cf mov %ecx,%edi 112320: 81 e7 00 80 00 10 and $0x10008000,%edi 112326: 81 ff 00 80 00 10 cmp $0x10008000,%edi 11232c: 75 50 jne 11237e <_POSIX_signals_Unblock_thread+0x82> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 11232e: 85 43 30 test %eax,0x30(%ebx) 112331: 75 10 jne 112343 <_POSIX_signals_Unblock_thread+0x47> 112333: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 112339: f7 d1 not %ecx 11233b: 85 c8 test %ecx,%eax 11233d: 0f 84 ae 00 00 00 je 1123f1 <_POSIX_signals_Unblock_thread+0xf5> the_thread->Wait.return_code = EINTR; 112343: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 11234a: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 11234d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 112351: 75 12 jne 112365 <_POSIX_signals_Unblock_thread+0x69> the_info->si_signo = signo; 112353: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 112355: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 11235c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 112363: eb 0c jmp 112371 <_POSIX_signals_Unblock_thread+0x75> } else { *the_info = *info; 112365: b9 03 00 00 00 mov $0x3,%ecx 11236a: 89 c7 mov %eax,%edi 11236c: 8b 75 10 mov 0x10(%ebp),%esi 11236f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 112371: 83 ec 0c sub $0xc,%esp 112374: 53 push %ebx 112375: e8 0a a6 ff ff call 10c984 <_Thread_queue_Extract_with_proxy> 11237a: b0 01 mov $0x1,%al 11237c: eb 52 jmp 1123d0 <_POSIX_signals_Unblock_thread+0xd4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 11237e: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 112384: f7 d2 not %edx 112386: 85 d0 test %edx,%eax 112388: 74 67 je 1123f1 <_POSIX_signals_Unblock_thread+0xf5> * 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; 11238a: c6 43 74 01 movb $0x1,0x74(%ebx) if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 11238e: f7 c1 00 00 00 10 test $0x10000000,%ecx 112394: 74 3f je 1123d5 <_POSIX_signals_Unblock_thread+0xd9> the_thread->Wait.return_code = EINTR; 112396: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 11239d: f7 c1 e0 be 03 00 test $0x3bee0,%ecx 1123a3: 74 0b je 1123b0 <_POSIX_signals_Unblock_thread+0xb4> _Thread_queue_Extract_with_proxy( the_thread ); 1123a5: 83 ec 0c sub $0xc,%esp 1123a8: 53 push %ebx 1123a9: e8 d6 a5 ff ff call 10c984 <_Thread_queue_Extract_with_proxy> 1123ae: eb 1e jmp 1123ce <_POSIX_signals_Unblock_thread+0xd2> else if ( _States_Is_delaying(the_thread->current_state) ){ 1123b0: 80 e1 08 and $0x8,%cl 1123b3: 74 3c je 1123f1 <_POSIX_signals_Unblock_thread+0xf5><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 1123b5: 83 ec 0c sub $0xc,%esp 1123b8: 8d 43 48 lea 0x48(%ebx),%eax 1123bb: 50 push %eax 1123bc: e8 37 ae ff ff call 10d1f8 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1123c1: 58 pop %eax 1123c2: 5a pop %edx 1123c3: 68 f8 ff 03 10 push $0x1003fff8 1123c8: 53 push %ebx 1123c9: e8 c6 9b ff ff call 10bf94 <_Thread_Clear_state> 1123ce: 31 c0 xor %eax,%eax 1123d0: 83 c4 10 add $0x10,%esp 1123d3: eb 1e jmp 1123f3 <_POSIX_signals_Unblock_thread+0xf7> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 1123d5: 85 c9 test %ecx,%ecx 1123d7: 75 18 jne 1123f1 <_POSIX_signals_Unblock_thread+0xf5><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1123d9: a1 a0 62 12 00 mov 0x1262a0,%eax 1123de: 85 c0 test %eax,%eax 1123e0: 74 0f je 1123f1 <_POSIX_signals_Unblock_thread+0xf5> 1123e2: 3b 1d c4 62 12 00 cmp 0x1262c4,%ebx 1123e8: 75 07 jne 1123f1 <_POSIX_signals_Unblock_thread+0xf5><== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 1123ea: c6 05 58 63 12 00 01 movb $0x1,0x126358 1123f1: 31 c0 xor %eax,%eax } } return false; } 1123f3: 8d 65 f4 lea -0xc(%ebp),%esp 1123f6: 5b pop %ebx 1123f7: 5e pop %esi 1123f8: 5f pop %edi 1123f9: c9 leave 1123fa: c3 ret =============================================================================== 00100220 <_Partition_Manager_initialization>: #include #include #include void _Partition_Manager_initialization(void) { 100220: 55 push %ebp 100221: 89 e5 mov %esp,%ebp } 100223: c9 leave 100224: c3 ret =============================================================================== 0010fcce <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10fcce: 55 push %ebp 10fccf: 89 e5 mov %esp,%ebp 10fcd1: 57 push %edi 10fcd2: 56 push %esi 10fcd3: 53 push %ebx 10fcd4: 83 ec 1c sub $0x1c,%esp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10fcd7: 8b 45 08 mov 0x8(%ebp),%eax 10fcda: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 10fce0: 85 db test %ebx,%ebx 10fce2: 74 45 je 10fd29 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10fce4: 9c pushf 10fce5: fa cli 10fce6: 58 pop %eax signal_set = asr->signals_posted; 10fce7: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10fcea: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10fcf1: 50 push %eax 10fcf2: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10fcf3: 85 ff test %edi,%edi 10fcf5: 74 32 je 10fd29 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10fcf7: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fcfa: 50 push %eax 10fcfb: 8d 75 e4 lea -0x1c(%ebp),%esi 10fcfe: 56 push %esi 10fcff: 68 ff ff 00 00 push $0xffff 10fd04: ff 73 10 pushl 0x10(%ebx) 10fd07: e8 ac 28 00 00 call 1125b8 (*asr->handler)( signal_set ); 10fd0c: 89 3c 24 mov %edi,(%esp) 10fd0f: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10fd12: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fd15: 83 c4 0c add $0xc,%esp 10fd18: 56 push %esi 10fd19: 68 ff ff 00 00 push $0xffff 10fd1e: ff 75 e4 pushl -0x1c(%ebp) 10fd21: e8 92 28 00 00 call 1125b8 10fd26: 83 c4 10 add $0x10,%esp } 10fd29: 8d 65 f4 lea -0xc(%ebp),%esp 10fd2c: 5b pop %ebx 10fd2d: 5e pop %esi 10fd2e: 5f pop %edi 10fd2f: c9 leave 10fd30: c3 ret =============================================================================== 00100240 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { 100240: 55 push %ebp 100241: 89 e5 mov %esp,%ebp } 100243: c9 leave 100244: c3 ret =============================================================================== 0013b98c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13b98c: 55 push %ebp 13b98d: 89 e5 mov %esp,%ebp 13b98f: 53 push %ebx 13b990: 83 ec 18 sub $0x18,%esp 13b993: 8d 45 f4 lea -0xc(%ebp),%eax 13b996: 50 push %eax 13b997: ff 75 08 pushl 0x8(%ebp) 13b99a: 68 24 ac 16 00 push $0x16ac24 13b99f: e8 64 6d fd ff call 112708 <_Objects_Get> 13b9a4: 89 c3 mov %eax,%ebx /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13b9a6: 83 c4 10 add $0x10,%esp 13b9a9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 13b9ad: 75 64 jne 13ba13 <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 13b9af: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13b9b2: f6 40 11 40 testb $0x40,0x11(%eax) 13b9b6: 74 18 je 13b9d0 <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 13b9b8: 8b 50 20 mov 0x20(%eax),%edx 13b9bb: 3b 53 08 cmp 0x8(%ebx),%edx 13b9be: 75 10 jne 13b9d0 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 13b9c0: 52 push %edx 13b9c1: 52 push %edx 13b9c2: 68 f8 ff 03 10 push $0x1003fff8 13b9c7: 50 push %eax 13b9c8: e8 5f 72 fd ff call 112c2c <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 13b9cd: 59 pop %ecx 13b9ce: eb 10 jmp 13b9e0 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 13b9d0: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 13b9d4: 75 2b jne 13ba01 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 13b9d6: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 13b9dd: 83 ec 0c sub $0xc,%esp 13b9e0: 53 push %ebx 13b9e1: e8 52 fc ff ff call 13b638 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13b9e6: 8b 43 3c mov 0x3c(%ebx),%eax 13b9e9: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13b9ec: 58 pop %eax 13b9ed: 5a pop %edx 13b9ee: 83 c3 10 add $0x10,%ebx 13b9f1: 53 push %ebx 13b9f2: 68 00 a2 16 00 push $0x16a200 13b9f7: e8 ac 83 fd ff call 113da8 <_Watchdog_Insert> 13b9fc: 83 c4 10 add $0x10,%esp 13b9ff: eb 07 jmp 13ba08 <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 13ba01: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 13ba08: a1 24 a1 16 00 mov 0x16a124,%eax 13ba0d: 48 dec %eax 13ba0e: a3 24 a1 16 00 mov %eax,0x16a124 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13ba13: 8b 5d fc mov -0x4(%ebp),%ebx 13ba16: c9 leave 13ba17: c3 ret =============================================================================== 00100228 <_Region_Manager_initialization>: #include #include #include void _Region_Manager_initialization(void) { 100228: 55 push %ebp 100229: 89 e5 mov %esp,%ebp } 10022b: c9 leave 10022c: c3 ret =============================================================================== 0010b120 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10b120: 55 push %ebp 10b121: 89 e5 mov %esp,%ebp 10b123: 53 push %ebx 10b124: 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(); 10b127: 8b 1d 64 5c 12 00 mov 0x125c64,%ebx if ((!the_tod) || 10b12d: 85 c9 test %ecx,%ecx 10b12f: 74 59 je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10b131: b8 40 42 0f 00 mov $0xf4240,%eax 10b136: 31 d2 xor %edx,%edx 10b138: f7 f3 div %ebx 10b13a: 39 41 18 cmp %eax,0x18(%ecx) 10b13d: 73 4b jae 10b18a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10b13f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10b143: 77 45 ja 10b18a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10b145: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10b149: 77 3f ja 10b18a <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10b14b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10b14f: 77 39 ja 10b18a <_TOD_Validate+0x6a> (the_tod->month == 0) || 10b151: 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) || 10b154: 85 c0 test %eax,%eax 10b156: 74 32 je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN 10b158: 83 f8 0c cmp $0xc,%eax 10b15b: 77 2d ja 10b18a <_TOD_Validate+0x6a> (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) || 10b15d: 8b 19 mov (%ecx),%ebx 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) || 10b15f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10b165: 76 23 jbe 10b18a <_TOD_Validate+0x6a> (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) ) 10b167: 8b 51 08 mov 0x8(%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) || 10b16a: 85 d2 test %edx,%edx 10b16c: 74 1c je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10b16e: 80 e3 03 and $0x3,%bl 10b171: 75 09 jne 10b17c <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10b173: 8b 04 85 20 2b 12 00 mov 0x122b20(,%eax,4),%eax 10b17a: eb 07 jmp 10b183 <_TOD_Validate+0x63> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10b17c: 8b 04 85 ec 2a 12 00 mov 0x122aec(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10b183: 39 c2 cmp %eax,%edx 10b185: 0f 96 c0 setbe %al 10b188: eb 02 jmp 10b18c <_TOD_Validate+0x6c> 10b18a: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10b18c: 5b pop %ebx 10b18d: c9 leave 10b18e: c3 ret =============================================================================== 0010be74 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10be74: 55 push %ebp 10be75: 89 e5 mov %esp,%ebp 10be77: 57 push %edi 10be78: 56 push %esi 10be79: 53 push %ebx 10be7a: 83 ec 28 sub $0x28,%esp 10be7d: 8b 5d 08 mov 0x8(%ebp),%ebx 10be80: 8b 7d 0c mov 0xc(%ebp),%edi 10be83: 8a 45 10 mov 0x10(%ebp),%al 10be86: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10be89: 8b 73 10 mov 0x10(%ebx),%esi /* * 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 ); 10be8c: 53 push %ebx 10be8d: e8 4e 0d 00 00 call 10cbe0 <_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 ) 10be92: 83 c4 10 add $0x10,%esp 10be95: 39 7b 14 cmp %edi,0x14(%ebx) 10be98: 74 0c je 10bea6 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10be9a: 50 push %eax 10be9b: 50 push %eax 10be9c: 57 push %edi 10be9d: 53 push %ebx 10be9e: e8 09 0c 00 00 call 10caac <_Thread_Set_priority> 10bea3: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10bea6: 9c pushf 10bea7: fa cli 10bea8: 59 pop %ecx /* * 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; 10bea9: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10beac: 83 f8 04 cmp $0x4,%eax 10beaf: 74 2f je 10bee0 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10beb1: 83 e6 04 and $0x4,%esi 10beb4: 75 08 jne 10bebe <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10beb6: 89 c2 mov %eax,%edx 10beb8: 83 e2 fb and $0xfffffffb,%edx 10bebb: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10bebe: 51 push %ecx 10bebf: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10bec0: a9 e0 be 03 00 test $0x3bee0,%eax 10bec5: 0f 84 c0 00 00 00 je 10bf8b <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10becb: 89 5d 0c mov %ebx,0xc(%ebp) 10bece: 8b 43 44 mov 0x44(%ebx),%eax 10bed1: 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 ); } 10bed4: 8d 65 f4 lea -0xc(%ebp),%esp 10bed7: 5b pop %ebx 10bed8: 5e pop %esi 10bed9: 5f pop %edi 10beda: 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 ); 10bedb: e9 44 0b 00 00 jmp 10ca24 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10bee0: 83 e6 04 and $0x4,%esi 10bee3: 75 53 jne 10bf38 <_Thread_Change_priority+0xc4><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bee5: 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; 10beec: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10bef2: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10bef9: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10befc: 66 a1 b8 62 12 00 mov 0x1262b8,%ax 10bf02: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10bf08: 66 a3 b8 62 12 00 mov %ax,0x1262b8 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10bf0e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10bf12: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10bf18: 74 0e je 10bf28 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10bf1a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10bf1d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10bf1f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10bf21: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10bf23: 89 5a 04 mov %ebx,0x4(%edx) 10bf26: eb 10 jmp 10bf38 <_Thread_Change_priority+0xc4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10bf28: 8d 50 04 lea 0x4(%eax),%edx 10bf2b: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10bf2d: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10bf30: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10bf33: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10bf35: 89 53 04 mov %edx,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10bf38: 51 push %ecx 10bf39: 9d popf 10bf3a: 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 ); 10bf3b: 66 8b 1d b8 62 12 00 mov 0x1262b8,%bx 10bf42: 31 c0 xor %eax,%eax 10bf44: 89 c2 mov %eax,%edx 10bf46: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10bf4a: 0f b7 d2 movzwl %dx,%edx 10bf4d: 66 8b 9c 12 30 63 12 mov 0x126330(%edx,%edx,1),%bx 10bf54: 00 10bf55: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10bf59: c1 e2 04 shl $0x4,%edx 10bf5c: 0f b7 c0 movzwl %ax,%eax 10bf5f: 01 c2 add %eax,%edx 10bf61: 6b d2 0c imul $0xc,%edx,%edx 10bf64: 8b 1d d0 61 12 00 mov 0x1261d0,%ebx 10bf6a: 8b 14 1a mov (%edx,%ebx,1),%edx 10bf6d: 89 15 94 62 12 00 mov %edx,0x126294 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10bf73: a1 c4 62 12 00 mov 0x1262c4,%eax * 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() && 10bf78: 39 d0 cmp %edx,%eax 10bf7a: 74 0d je 10bf89 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10bf7c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10bf80: 74 07 je 10bf89 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10bf82: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 _ISR_Enable( level ); 10bf89: 51 push %ecx 10bf8a: 9d popf } 10bf8b: 8d 65 f4 lea -0xc(%ebp),%esp 10bf8e: 5b pop %ebx 10bf8f: 5e pop %esi 10bf90: 5f pop %edi 10bf91: c9 leave 10bf92: c3 ret =============================================================================== 0010bf94 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10bf94: 55 push %ebp 10bf95: 89 e5 mov %esp,%ebp 10bf97: 53 push %ebx 10bf98: 8b 45 08 mov 0x8(%ebp),%eax 10bf9b: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10bf9e: 9c pushf 10bf9f: fa cli 10bfa0: 59 pop %ecx current_state = the_thread->current_state; 10bfa1: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10bfa4: 85 da test %ebx,%edx 10bfa6: 74 71 je 10c019 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10bfa8: f7 d2 not %edx 10bfaa: 21 da and %ebx,%edx current_state = 10bfac: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10bfaf: 85 d2 test %edx,%edx 10bfb1: 75 66 jne 10c019 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10bfb3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10bfb9: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10bfc0: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10bfc3: 66 8b 15 b8 62 12 00 mov 0x1262b8,%dx 10bfca: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10bfd0: 66 89 15 b8 62 12 00 mov %dx,0x1262b8 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10bfd7: 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); 10bfdd: 8d 5a 04 lea 0x4(%edx),%ebx 10bfe0: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10bfe2: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10bfe5: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10bfe8: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10bfea: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10bfed: 51 push %ecx 10bfee: 9d popf 10bfef: 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 ) { 10bff0: 8b 50 14 mov 0x14(%eax),%edx 10bff3: 8b 1d 94 62 12 00 mov 0x126294,%ebx 10bff9: 3b 53 14 cmp 0x14(%ebx),%edx 10bffc: 73 1b jae 10c019 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10bffe: a3 94 62 12 00 mov %eax,0x126294 if ( _Thread_Executing->is_preemptible || 10c003: a1 c4 62 12 00 mov 0x1262c4,%eax 10c008: 80 78 75 00 cmpb $0x0,0x75(%eax) 10c00c: 75 04 jne 10c012 <_Thread_Clear_state+0x7e> 10c00e: 85 d2 test %edx,%edx 10c010: 75 07 jne 10c019 <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10c012: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 } } } _ISR_Enable( level ); 10c019: 51 push %ecx 10c01a: 9d popf } 10c01b: 5b pop %ebx 10c01c: c9 leave 10c01d: c3 ret =============================================================================== 0010c194 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c194: 55 push %ebp 10c195: 89 e5 mov %esp,%ebp 10c197: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c19a: 8d 45 f4 lea -0xc(%ebp),%eax 10c19d: 50 push %eax 10c19e: ff 75 08 pushl 0x8(%ebp) 10c1a1: e8 8e 01 00 00 call 10c334 <_Thread_Get> switch ( location ) { 10c1a6: 83 c4 10 add $0x10,%esp 10c1a9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c1ad: 75 1b jne 10c1ca <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10c1af: 52 push %edx 10c1b0: 52 push %edx 10c1b1: 68 18 00 00 10 push $0x10000018 10c1b6: 50 push %eax 10c1b7: e8 d8 fd ff ff call 10bf94 <_Thread_Clear_state> 10c1bc: a1 08 62 12 00 mov 0x126208,%eax 10c1c1: 48 dec %eax 10c1c2: a3 08 62 12 00 mov %eax,0x126208 10c1c7: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10c1ca: c9 leave 10c1cb: c3 ret =============================================================================== 0010c1cc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10c1cc: 55 push %ebp 10c1cd: 89 e5 mov %esp,%ebp 10c1cf: 57 push %edi 10c1d0: 56 push %esi 10c1d1: 53 push %ebx 10c1d2: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10c1d5: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx _ISR_Disable( level ); 10c1db: 9c pushf 10c1dc: fa cli 10c1dd: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10c1de: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c1e1: e9 f1 00 00 00 jmp 10c2d7 <_Thread_Dispatch+0x10b> heir = _Thread_Heir; 10c1e6: 8b 35 94 62 12 00 mov 0x126294,%esi _Thread_Dispatch_disable_level = 1; 10c1ec: c7 05 08 62 12 00 01 movl $0x1,0x126208 10c1f3: 00 00 00 _Context_Switch_necessary = false; 10c1f6: c6 05 d4 62 12 00 00 movb $0x0,0x1262d4 _Thread_Executing = heir; 10c1fd: 89 35 c4 62 12 00 mov %esi,0x1262c4 #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 ) 10c203: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10c207: 75 09 jne 10c212 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c209: 8b 15 d4 61 12 00 mov 0x1261d4,%edx 10c20f: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10c212: 50 push %eax 10c213: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10c214: 83 ec 0c sub $0xc,%esp 10c217: 8d 45 e0 lea -0x20(%ebp),%eax 10c21a: 50 push %eax 10c21b: e8 6c 3f 00 00 call 11018c <_TOD_Get_uptime> _Timestamp_Subtract( 10c220: 83 c4 0c add $0xc,%esp 10c223: 57 push %edi 10c224: 8d 45 e0 lea -0x20(%ebp),%eax 10c227: 50 push %eax 10c228: 68 cc 62 12 00 push $0x1262cc 10c22d: e8 4e 0c 00 00 call 10ce80 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10c232: 58 pop %eax 10c233: 5a pop %edx 10c234: 57 push %edi 10c235: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c23b: 50 push %eax 10c23c: e8 0f 0c 00 00 call 10ce50 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c241: 8b 45 e0 mov -0x20(%ebp),%eax 10c244: 8b 55 e4 mov -0x1c(%ebp),%edx 10c247: a3 cc 62 12 00 mov %eax,0x1262cc 10c24c: 89 15 d0 62 12 00 mov %edx,0x1262d0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c252: a1 90 62 12 00 mov 0x126290,%eax 10c257: 83 c4 10 add $0x10,%esp 10c25a: 85 c0 test %eax,%eax 10c25c: 74 10 je 10c26e <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c25e: 8b 10 mov (%eax),%edx 10c260: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10c266: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10c26c: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10c26e: 51 push %ecx 10c26f: 51 push %ecx 10c270: 56 push %esi 10c271: 53 push %ebx 10c272: e8 39 0e 00 00 call 10d0b0 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c277: 58 pop %eax 10c278: 5a pop %edx 10c279: 81 c6 d4 00 00 00 add $0xd4,%esi 10c27f: 56 push %esi 10c280: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10c286: 50 push %eax 10c287: e8 e4 10 00 00 call 10d370 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c28c: 83 c4 10 add $0x10,%esp 10c28f: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10c296: 74 36 je 10c2ce <_Thread_Dispatch+0x102> #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 ); 10c298: a1 8c 62 12 00 mov 0x12628c,%eax 10c29d: 39 c3 cmp %eax,%ebx 10c29f: 74 2d je 10c2ce <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c2a1: 85 c0 test %eax,%eax 10c2a3: 74 11 je 10c2b6 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c2a5: 83 ec 0c sub $0xc,%esp 10c2a8: 05 ec 00 00 00 add $0xec,%eax 10c2ad: 50 push %eax 10c2ae: e8 f1 10 00 00 call 10d3a4 <_CPU_Context_save_fp> 10c2b3: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c2b6: 83 ec 0c sub $0xc,%esp 10c2b9: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10c2bf: 50 push %eax 10c2c0: e8 e9 10 00 00 call 10d3ae <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c2c5: 89 1d 8c 62 12 00 mov %ebx,0x12628c 10c2cb: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c2ce: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx _ISR_Disable( level ); 10c2d4: 9c pushf 10c2d5: fa cli 10c2d6: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c2d7: 8a 15 d4 62 12 00 mov 0x1262d4,%dl 10c2dd: 84 d2 test %dl,%dl 10c2df: 0f 85 01 ff ff ff jne 10c1e6 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10c2e5: c7 05 08 62 12 00 00 movl $0x0,0x126208 10c2ec: 00 00 00 _ISR_Enable( level ); 10c2ef: 50 push %eax 10c2f0: 9d popf if ( _Thread_Do_post_task_switch_extension || 10c2f1: 83 3d a8 62 12 00 00 cmpl $0x0,0x1262a8 10c2f8: 75 06 jne 10c300 <_Thread_Dispatch+0x134> executing->do_post_task_switch_extension ) { 10c2fa: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10c2fe: 74 09 je 10c309 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10c300: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10c304: e8 16 ea ff ff call 10ad1f <_API_extensions_Run_postswitch> } } 10c309: 8d 65 f4 lea -0xc(%ebp),%esp 10c30c: 5b pop %ebx 10c30d: 5e pop %esi 10c30e: 5f pop %edi 10c30f: c9 leave 10c310: c3 ret =============================================================================== 001127d4 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 1127d4: 55 push %ebp 1127d5: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 1127d7: a1 c4 62 12 00 mov 0x1262c4,%eax if ( !_States_Is_ready( executing->current_state ) || 1127dc: 83 78 10 00 cmpl $0x0,0x10(%eax) 1127e0: 75 0e jne 1127f0 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 1127e2: 3b 05 94 62 12 00 cmp 0x126294,%eax 1127e8: 74 11 je 1127fb <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 1127ea: 80 78 75 00 cmpb $0x0,0x75(%eax) 1127ee: 74 0b je 1127fb <_Thread_Evaluate_mode+0x27><== NEVER TAKEN _Context_Switch_necessary = true; 1127f0: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 1127f7: b0 01 mov $0x1,%al return true; 1127f9: eb 02 jmp 1127fd <_Thread_Evaluate_mode+0x29> 1127fb: 31 c0 xor %eax,%eax } return false; } 1127fd: c9 leave 1127fe: c3 ret =============================================================================== 00112800 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112800: 55 push %ebp 112801: 89 e5 mov %esp,%ebp 112803: 53 push %ebx 112804: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112807: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 11280d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 112813: 85 c0 test %eax,%eax 112815: 74 03 je 11281a <_Thread_Handler+0x1a> 112817: fa cli 112818: eb 01 jmp 11281b <_Thread_Handler+0x1b> 11281a: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 11281b: a0 c4 5e 12 00 mov 0x125ec4,%al 112820: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112823: c6 05 c4 5e 12 00 01 movb $0x1,0x125ec4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 11282a: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 112831: 74 24 je 112857 <_Thread_Handler+0x57> #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 ); 112833: a1 8c 62 12 00 mov 0x12628c,%eax 112838: 39 c3 cmp %eax,%ebx 11283a: 74 1b je 112857 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 11283c: 85 c0 test %eax,%eax 11283e: 74 11 je 112851 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 112840: 83 ec 0c sub $0xc,%esp 112843: 05 ec 00 00 00 add $0xec,%eax 112848: 50 push %eax 112849: e8 56 ab ff ff call 10d3a4 <_CPU_Context_save_fp> 11284e: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 112851: 89 1d 8c 62 12 00 mov %ebx,0x12628c /* * 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 ); 112857: 83 ec 0c sub $0xc,%esp 11285a: 53 push %ebx 11285b: e8 04 a7 ff ff call 10cf64 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 112860: e8 ac 9a ff ff call 10c311 <_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) */ { 112865: 83 c4 10 add $0x10,%esp 112868: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11286c: 75 05 jne 112873 <_Thread_Handler+0x73> INIT_NAME (); 11286e: e8 dd bf 00 00 call 11e850 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112873: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112879: 85 c0 test %eax,%eax 11287b: 75 0b jne 112888 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 11287d: 83 ec 0c sub $0xc,%esp 112880: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112886: eb 0c jmp 112894 <_Thread_Handler+0x94> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 112888: 48 dec %eax 112889: 75 15 jne 1128a0 <_Thread_Handler+0xa0> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 11288b: 83 ec 0c sub $0xc,%esp 11288e: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 112894: 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 = 11289a: 89 43 28 mov %eax,0x28(%ebx) 11289d: 83 c4 10 add $0x10,%esp * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 1128a0: 83 ec 0c sub $0xc,%esp 1128a3: 53 push %ebx 1128a4: e8 ec a6 ff ff call 10cf95 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1128a9: 83 c4 0c add $0xc,%esp 1128ac: 6a 06 push $0x6 1128ae: 6a 01 push $0x1 1128b0: 6a 00 push $0x0 1128b2: e8 bd 8d ff ff call 10b674 <_Internal_error_Occurred> =============================================================================== 0010c3a8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c3a8: 55 push %ebp 10c3a9: 89 e5 mov %esp,%ebp 10c3ab: 57 push %edi 10c3ac: 56 push %esi 10c3ad: 53 push %ebx 10c3ae: 83 ec 1c sub $0x1c,%esp 10c3b1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c3b4: 8b 4d 10 mov 0x10(%ebp),%ecx 10c3b7: 8b 75 14 mov 0x14(%ebp),%esi 10c3ba: 8a 55 18 mov 0x18(%ebp),%dl 10c3bd: 8a 45 20 mov 0x20(%ebp),%al 10c3c0: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10c3c3: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10c3ca: 00 00 00 10c3cd: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10c3d4: 00 00 00 10c3d7: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10c3de: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10c3e1: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10c3e8: 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 ) { 10c3eb: 85 c9 test %ecx,%ecx 10c3ed: 75 30 jne 10c41f <_Thread_Initialize+0x77> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10c3ef: 51 push %ecx 10c3f0: 51 push %ecx 10c3f1: 56 push %esi 10c3f2: 53 push %ebx 10c3f3: 88 55 e0 mov %dl,-0x20(%ebp) 10c3f6: e8 59 08 00 00 call 10cc54 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c3fb: 83 c4 10 add $0x10,%esp 10c3fe: 39 f0 cmp %esi,%eax 10c400: 8a 55 e0 mov -0x20(%ebp),%dl 10c403: 72 04 jb 10c409 <_Thread_Initialize+0x61> 10c405: 85 c0 test %eax,%eax 10c407: 75 07 jne 10c410 <_Thread_Initialize+0x68><== ALWAYS TAKEN 10c409: 31 c0 xor %eax,%eax 10c40b: e9 d9 01 00 00 jmp 10c5e9 <_Thread_Initialize+0x241> return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10c410: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10c416: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10c41d: eb 09 jmp 10c428 <_Thread_Initialize+0x80> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10c41f: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10c426: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10c428: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10c42e: 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 ) { 10c434: 31 ff xor %edi,%edi 10c436: 84 d2 test %dl,%dl 10c438: 74 19 je 10c453 <_Thread_Initialize+0xab> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c43a: 83 ec 0c sub $0xc,%esp 10c43d: 6a 6c push $0x6c 10c43f: e8 b0 0e 00 00 call 10d2f4 <_Workspace_Allocate> 10c444: 89 c7 mov %eax,%edi if ( !fp_area ) 10c446: 83 c4 10 add $0x10,%esp 10c449: 31 f6 xor %esi,%esi 10c44b: 85 c0 test %eax,%eax 10c44d: 0f 84 10 01 00 00 je 10c563 <_Thread_Initialize+0x1bb> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10c453: 89 bb ec 00 00 00 mov %edi,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10c459: 89 bb cc 00 00 00 mov %edi,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c45f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c466: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10c46d: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10c474: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c47b: a1 a4 62 12 00 mov 0x1262a4,%eax 10c480: 31 f6 xor %esi,%esi 10c482: 85 c0 test %eax,%eax 10c484: 74 1d je 10c4a3 <_Thread_Initialize+0xfb> extensions_area = _Workspace_Allocate( 10c486: 83 ec 0c sub $0xc,%esp 10c489: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c490: 50 push %eax 10c491: e8 5e 0e 00 00 call 10d2f4 <_Workspace_Allocate> 10c496: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10c498: 83 c4 10 add $0x10,%esp 10c49b: 85 c0 test %eax,%eax 10c49d: 0f 84 c0 00 00 00 je 10c563 <_Thread_Initialize+0x1bb> goto failed; } the_thread->extensions = (void **) extensions_area; 10c4a3: 89 b3 00 01 00 00 mov %esi,0x100(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10c4a9: 85 f6 test %esi,%esi 10c4ab: 74 1c je 10c4c9 <_Thread_Initialize+0x121> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c4ad: 8b 0d a4 62 12 00 mov 0x1262a4,%ecx 10c4b3: 31 c0 xor %eax,%eax 10c4b5: eb 0e jmp 10c4c5 <_Thread_Initialize+0x11d> the_thread->extensions[i] = NULL; 10c4b7: 8b 93 00 01 00 00 mov 0x100(%ebx),%edx 10c4bd: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,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++ ) 10c4c4: 40 inc %eax 10c4c5: 39 c8 cmp %ecx,%eax 10c4c7: 76 ee jbe 10c4b7 <_Thread_Initialize+0x10f> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c4c9: 8a 45 e7 mov -0x19(%ebp),%al 10c4cc: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c4d2: 8b 45 24 mov 0x24(%ebp),%eax 10c4d5: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10c4db: 8b 45 28 mov 0x28(%ebp),%eax 10c4de: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10c4e4: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10c4e8: 75 08 jne 10c4f2 <_Thread_Initialize+0x14a> 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; 10c4ea: a1 d4 61 12 00 mov 0x1261d4,%eax 10c4ef: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10c4f2: 8b 45 2c mov 0x2c(%ebp),%eax 10c4f5: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10c4fb: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c502: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c509: 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; 10c510: 8b 45 1c mov 0x1c(%ebp),%eax 10c513: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c516: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10c51c: 52 push %edx 10c51d: 52 push %edx 10c51e: 50 push %eax 10c51f: 53 push %ebx 10c520: e8 87 05 00 00 call 10caac <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c525: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c52c: 00 00 00 10c52f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c536: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c539: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c53d: 8b 45 08 mov 0x8(%ebp),%eax 10c540: 8b 40 1c mov 0x1c(%eax),%eax 10c543: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c546: 8b 45 30 mov 0x30(%ebp),%eax 10c549: 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 ); 10c54c: 89 1c 24 mov %ebx,(%esp) 10c54f: e8 b0 0a 00 00 call 10d004 <_User_extensions_Thread_create> 10c554: 88 c2 mov %al,%dl if ( extension_status ) 10c556: 83 c4 10 add $0x10,%esp 10c559: b0 01 mov $0x1,%al 10c55b: 84 d2 test %dl,%dl 10c55d: 0f 85 86 00 00 00 jne 10c5e9 <_Thread_Initialize+0x241> return true; failed: if ( the_thread->libc_reent ) 10c563: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10c569: 85 c0 test %eax,%eax 10c56b: 74 0c je 10c579 <_Thread_Initialize+0x1d1> _Workspace_Free( the_thread->libc_reent ); 10c56d: 83 ec 0c sub $0xc,%esp 10c570: 50 push %eax 10c571: e8 97 0d 00 00 call 10d30d <_Workspace_Free> 10c576: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c579: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10c57f: 85 c0 test %eax,%eax 10c581: 74 0c je 10c58f <_Thread_Initialize+0x1e7> _Workspace_Free( the_thread->API_Extensions[i] ); 10c583: 83 ec 0c sub $0xc,%esp 10c586: 50 push %eax 10c587: e8 81 0d 00 00 call 10d30d <_Workspace_Free> 10c58c: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c58f: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10c595: 85 c0 test %eax,%eax 10c597: 74 0c je 10c5a5 <_Thread_Initialize+0x1fd> _Workspace_Free( the_thread->API_Extensions[i] ); 10c599: 83 ec 0c sub $0xc,%esp 10c59c: 50 push %eax 10c59d: e8 6b 0d 00 00 call 10d30d <_Workspace_Free> 10c5a2: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c5a5: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10c5ab: 85 c0 test %eax,%eax 10c5ad: 74 0c je 10c5bb <_Thread_Initialize+0x213><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c5af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c5b2: 50 push %eax <== NOT EXECUTED 10c5b3: e8 55 0d 00 00 call 10d30d <_Workspace_Free> <== NOT EXECUTED 10c5b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10c5bb: 85 f6 test %esi,%esi 10c5bd: 74 0c je 10c5cb <_Thread_Initialize+0x223> (void) _Workspace_Free( extensions_area ); 10c5bf: 83 ec 0c sub $0xc,%esp 10c5c2: 56 push %esi 10c5c3: e8 45 0d 00 00 call 10d30d <_Workspace_Free> 10c5c8: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10c5cb: 85 ff test %edi,%edi 10c5cd: 74 0c je 10c5db <_Thread_Initialize+0x233> (void) _Workspace_Free( fp_area ); 10c5cf: 83 ec 0c sub $0xc,%esp 10c5d2: 57 push %edi 10c5d3: e8 35 0d 00 00 call 10d30d <_Workspace_Free> 10c5d8: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10c5db: 83 ec 0c sub $0xc,%esp 10c5de: 53 push %ebx 10c5df: e8 c0 06 00 00 call 10cca4 <_Thread_Stack_Free> 10c5e4: 31 c0 xor %eax,%eax return false; 10c5e6: 83 c4 10 add $0x10,%esp } 10c5e9: 8d 65 f4 lea -0xc(%ebp),%esp 10c5ec: 5b pop %ebx 10c5ed: 5e pop %esi 10c5ee: 5f pop %edi 10c5ef: c9 leave 10c5f0: c3 ret =============================================================================== 0010f8bc <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f8bc: 55 push %ebp 10f8bd: 89 e5 mov %esp,%ebp 10f8bf: 53 push %ebx 10f8c0: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f8c3: 9c pushf 10f8c4: fa cli 10f8c5: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f8c6: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f8c9: f6 c2 02 test $0x2,%dl 10f8cc: 74 70 je 10f93e <_Thread_Resume+0x82> <== NEVER TAKEN 10f8ce: 83 e2 fd and $0xfffffffd,%edx current_state = 10f8d1: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f8d4: 85 d2 test %edx,%edx 10f8d6: 75 66 jne 10f93e <_Thread_Resume+0x82> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f8d8: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f8de: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f8e5: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f8e8: 66 8b 15 88 93 12 00 mov 0x129388,%dx 10f8ef: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f8f5: 66 89 15 88 93 12 00 mov %dx,0x129388 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f8fc: 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); 10f902: 8d 5a 04 lea 0x4(%edx),%ebx 10f905: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f907: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f90a: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f90d: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f90f: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f912: 51 push %ecx 10f913: 9d popf 10f914: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f915: 8b 50 14 mov 0x14(%eax),%edx 10f918: 8b 1d 64 93 12 00 mov 0x129364,%ebx 10f91e: 3b 53 14 cmp 0x14(%ebx),%edx 10f921: 73 1b jae 10f93e <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f923: a3 64 93 12 00 mov %eax,0x129364 if ( _Thread_Executing->is_preemptible || 10f928: a1 94 93 12 00 mov 0x129394,%eax 10f92d: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f931: 75 04 jne 10f937 <_Thread_Resume+0x7b> 10f933: 85 d2 test %edx,%edx 10f935: 75 07 jne 10f93e <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f937: c6 05 a4 93 12 00 01 movb $0x1,0x1293a4 } } } _ISR_Enable( level ); 10f93e: 51 push %ecx 10f93f: 9d popf } 10f940: 5b pop %ebx 10f941: c9 leave 10f942: c3 ret =============================================================================== 0010cca4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10cca4: 55 push %ebp 10cca5: 89 e5 mov %esp,%ebp 10cca7: 83 ec 08 sub $0x8,%esp 10ccaa: 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 ) 10ccad: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10ccb4: 74 1f je 10ccd5 <_Thread_Stack_Free+0x31><== NEVER TAKEN * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10ccb6: 8b 15 1c 22 12 00 mov 0x12221c,%edx 10ccbc: 85 d2 test %edx,%edx 10ccbe: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10ccc4: 74 06 je 10cccc <_Thread_Stack_Free+0x28> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10ccc6: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10ccc9: 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 ); 10ccca: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10cccc: 89 45 08 mov %eax,0x8(%ebp) } 10cccf: 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 ); 10ccd0: e9 38 06 00 00 jmp 10d30d <_Workspace_Free> } 10ccd5: c9 leave <== NOT EXECUTED 10ccd6: c3 ret <== NOT EXECUTED =============================================================================== 0010cd8c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10cd8c: 55 push %ebp 10cd8d: 89 e5 mov %esp,%ebp 10cd8f: 53 push %ebx 10cd90: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10cd93: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10cd99: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10cd9d: 74 4c je 10cdeb <_Thread_Tickle_timeslice+0x5f> return; if ( !_States_Is_ready( executing->current_state ) ) 10cd9f: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cda3: 75 46 jne 10cdeb <_Thread_Tickle_timeslice+0x5f> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10cda5: 8b 43 7c mov 0x7c(%ebx),%eax 10cda8: 83 f8 01 cmp $0x1,%eax 10cdab: 72 3e jb 10cdeb <_Thread_Tickle_timeslice+0x5f> 10cdad: 83 f8 02 cmp $0x2,%eax 10cdb0: 76 07 jbe 10cdb9 <_Thread_Tickle_timeslice+0x2d> 10cdb2: 83 f8 03 cmp $0x3,%eax 10cdb5: 75 34 jne 10cdeb <_Thread_Tickle_timeslice+0x5f><== NEVER TAKEN 10cdb7: eb 1a jmp 10cdd3 <_Thread_Tickle_timeslice+0x47> 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 ) { 10cdb9: 8b 43 78 mov 0x78(%ebx),%eax 10cdbc: 48 dec %eax 10cdbd: 89 43 78 mov %eax,0x78(%ebx) 10cdc0: 85 c0 test %eax,%eax 10cdc2: 7f 27 jg 10cdeb <_Thread_Tickle_timeslice+0x5f> _Thread_Reset_timeslice(); 10cdc4: e8 03 3a 00 00 call 1107cc <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10cdc9: a1 d4 61 12 00 mov 0x1261d4,%eax 10cdce: 89 43 78 mov %eax,0x78(%ebx) 10cdd1: eb 18 jmp 10cdeb <_Thread_Tickle_timeslice+0x5f> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10cdd3: 8b 43 78 mov 0x78(%ebx),%eax 10cdd6: 48 dec %eax 10cdd7: 89 43 78 mov %eax,0x78(%ebx) 10cdda: 85 c0 test %eax,%eax 10cddc: 75 0d jne 10cdeb <_Thread_Tickle_timeslice+0x5f> (*executing->budget_callout)( executing ); 10cdde: 83 ec 0c sub $0xc,%esp 10cde1: 53 push %ebx 10cde2: ff 93 80 00 00 00 call *0x80(%ebx) 10cde8: 83 c4 10 add $0x10,%esp break; #endif } } 10cdeb: 8b 5d fc mov -0x4(%ebp),%ebx 10cdee: c9 leave 10cdef: c3 ret =============================================================================== 0010cdf0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10cdf0: 55 push %ebp 10cdf1: 89 e5 mov %esp,%ebp 10cdf3: 56 push %esi 10cdf4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10cdf5: a1 c4 62 12 00 mov 0x1262c4,%eax ready = executing->ready; 10cdfa: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10ce00: 9c pushf 10ce01: fa cli 10ce02: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10ce03: 8b 1a mov (%edx),%ebx 10ce05: 3b 5a 08 cmp 0x8(%edx),%ebx 10ce08: 74 2e je 10ce38 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ce0a: 8b 30 mov (%eax),%esi previous = the_node->previous; 10ce0c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10ce0f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ce12: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ce14: 8d 5a 04 lea 0x4(%edx),%ebx 10ce17: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ce19: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ce1c: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ce1f: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10ce21: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10ce24: 51 push %ecx 10ce25: 9d popf 10ce26: fa cli if ( _Thread_Is_heir( executing ) ) 10ce27: 3b 05 94 62 12 00 cmp 0x126294,%eax 10ce2d: 75 11 jne 10ce40 <_Thread_Yield_processor+0x50><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10ce2f: 8b 02 mov (%edx),%eax 10ce31: a3 94 62 12 00 mov %eax,0x126294 10ce36: eb 08 jmp 10ce40 <_Thread_Yield_processor+0x50> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10ce38: 3b 05 94 62 12 00 cmp 0x126294,%eax 10ce3e: 74 07 je 10ce47 <_Thread_Yield_processor+0x57><== ALWAYS TAKEN _Context_Switch_necessary = true; 10ce40: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 _ISR_Enable( level ); 10ce47: 51 push %ecx 10ce48: 9d popf } 10ce49: 5b pop %ebx 10ce4a: 5e pop %esi 10ce4b: c9 leave 10ce4c: c3 ret =============================================================================== 0010c854 <_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 ) { 10c854: 55 push %ebp 10c855: 89 e5 mov %esp,%ebp 10c857: 57 push %edi 10c858: 56 push %esi 10c859: 53 push %ebx 10c85a: 83 ec 10 sub $0x10,%esp 10c85d: 8b 4d 08 mov 0x8(%ebp),%ecx 10c860: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c863: 8d 50 3c lea 0x3c(%eax),%edx 10c866: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c869: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c870: 8d 50 38 lea 0x38(%eax),%edx 10c873: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c876: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c879: 89 de mov %ebx,%esi 10c87b: c1 ee 06 shr $0x6,%esi 10c87e: 6b f6 0c imul $0xc,%esi,%esi 10c881: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c884: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c887: f6 c3 20 test $0x20,%bl 10c88a: 75 65 jne 10c8f1 <_Thread_queue_Enqueue_priority+0x9d> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c88c: 8d 56 04 lea 0x4(%esi),%edx 10c88f: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c892: 9c pushf 10c893: fa cli 10c894: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c897: 8b 16 mov (%esi),%edx 10c899: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c8a0: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c8a3: eb 1f jmp 10c8c4 <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c8a5: 8b 72 14 mov 0x14(%edx),%esi 10c8a8: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c8ab: 39 f3 cmp %esi,%ebx 10c8ad: 76 1a jbe 10c8c9 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c8af: ff 75 f0 pushl -0x10(%ebp) 10c8b2: 9d popf 10c8b3: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c8b4: 85 7a 10 test %edi,0x10(%edx) 10c8b7: 75 09 jne 10c8c2 <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN 10c8b9: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c8bc: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c8bf: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c8c0: eb d0 jmp 10c892 <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c8c2: 8b 12 mov (%edx),%edx restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c8c4: 3b 55 e8 cmp -0x18(%ebp),%edx 10c8c7: 75 dc jne 10c8a5 <_Thread_queue_Enqueue_priority+0x51> 10c8c9: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c8cc: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c8d0: 0f 85 9e 00 00 00 jne 10c974 <_Thread_queue_Enqueue_priority+0x120><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c8d6: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c8dd: 3b 5d ec cmp -0x14(%ebp),%ebx 10c8e0: 74 7b je 10c95d <_Thread_queue_Enqueue_priority+0x109> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c8e2: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c8e5: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c8e7: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c8ea: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c8ec: 89 42 04 mov %eax,0x4(%edx) 10c8ef: eb 5e jmp 10c94f <_Thread_queue_Enqueue_priority+0xfb> the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c8f1: 0f b6 15 f4 21 12 00 movzbl 0x1221f4,%edx 10c8f8: 42 inc %edx 10c8f9: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c8fc: 9c pushf 10c8fd: fa cli 10c8fe: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c901: 8b 56 08 mov 0x8(%esi),%edx 10c904: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c907: eb 20 jmp 10c929 <_Thread_queue_Enqueue_priority+0xd5> search_priority = search_thread->current_priority; 10c909: 8b 72 14 mov 0x14(%edx),%esi 10c90c: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c90f: 39 f3 cmp %esi,%ebx 10c911: 73 1b jae 10c92e <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c913: ff 75 f0 pushl -0x10(%ebp) 10c916: 9d popf 10c917: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c918: 85 7a 10 test %edi,0x10(%edx) 10c91b: 75 09 jne 10c926 <_Thread_queue_Enqueue_priority+0xd2> 10c91d: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c920: ff 75 f0 pushl -0x10(%ebp) 10c923: 9d popf goto restart_reverse_search; 10c924: eb cb jmp 10c8f1 <_Thread_queue_Enqueue_priority+0x9d> } search_thread = (Thread_Control *) 10c926: 8b 52 04 mov 0x4(%edx),%edx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c929: 3b 55 e8 cmp -0x18(%ebp),%edx 10c92c: 75 db jne 10c909 <_Thread_queue_Enqueue_priority+0xb5> 10c92e: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c931: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c935: 75 3d jne 10c974 <_Thread_queue_Enqueue_priority+0x120> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c937: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c93e: 3b 5d ec cmp -0x14(%ebp),%ebx 10c941: 74 1a je 10c95d <_Thread_queue_Enqueue_priority+0x109> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c943: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c945: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c947: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c94a: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c94c: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c94f: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c952: ff 75 f0 pushl -0x10(%ebp) 10c955: 9d popf 10c956: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c95b: eb 1f jmp 10c97c <_Thread_queue_Enqueue_priority+0x128> 10c95d: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c960: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c963: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c965: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c968: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c96a: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c96d: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c970: 56 push %esi 10c971: 9d popf 10c972: eb e2 jmp 10c956 <_Thread_queue_Enqueue_priority+0x102> * 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; 10c974: 8b 45 10 mov 0x10(%ebp),%eax 10c977: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c979: 8b 41 30 mov 0x30(%ecx),%eax } 10c97c: 83 c4 10 add $0x10,%esp 10c97f: 5b pop %ebx 10c980: 5e pop %esi 10c981: 5f pop %edi 10c982: c9 leave 10c983: c3 ret =============================================================================== 0010ca24 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10ca24: 55 push %ebp 10ca25: 89 e5 mov %esp,%ebp 10ca27: 57 push %edi 10ca28: 56 push %esi 10ca29: 53 push %ebx 10ca2a: 83 ec 1c sub $0x1c,%esp 10ca2d: 8b 75 08 mov 0x8(%ebp),%esi 10ca30: 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 ) 10ca33: 85 f6 test %esi,%esi 10ca35: 74 36 je 10ca6d <_Thread_queue_Requeue+0x49><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10ca37: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10ca3b: 75 30 jne 10ca6d <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10ca3d: 9c pushf 10ca3e: fa cli 10ca3f: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10ca40: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10ca47: 74 22 je 10ca6b <_Thread_queue_Requeue+0x47><== NEVER TAKEN 10ca49: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10ca50: 50 push %eax 10ca51: 6a 01 push $0x1 10ca53: 57 push %edi 10ca54: 56 push %esi 10ca55: e8 da 3b 00 00 call 110634 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10ca5a: 83 c4 0c add $0xc,%esp 10ca5d: 8d 45 e4 lea -0x1c(%ebp),%eax 10ca60: 50 push %eax 10ca61: 57 push %edi 10ca62: 56 push %esi 10ca63: e8 ec fd ff ff call 10c854 <_Thread_queue_Enqueue_priority> 10ca68: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10ca6b: 53 push %ebx 10ca6c: 9d popf } } 10ca6d: 8d 65 f4 lea -0xc(%ebp),%esp 10ca70: 5b pop %ebx 10ca71: 5e pop %esi 10ca72: 5f pop %edi 10ca73: c9 leave 10ca74: c3 ret =============================================================================== 0010ca78 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10ca78: 55 push %ebp 10ca79: 89 e5 mov %esp,%ebp 10ca7b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ca7e: 8d 45 f4 lea -0xc(%ebp),%eax 10ca81: 50 push %eax 10ca82: ff 75 08 pushl 0x8(%ebp) 10ca85: e8 aa f8 ff ff call 10c334 <_Thread_Get> switch ( location ) { 10ca8a: 83 c4 10 add $0x10,%esp 10ca8d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ca91: 75 17 jne 10caaa <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10ca93: 83 ec 0c sub $0xc,%esp 10ca96: 50 push %eax 10ca97: e8 44 3c 00 00 call 1106e0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ca9c: a1 08 62 12 00 mov 0x126208,%eax 10caa1: 48 dec %eax 10caa2: a3 08 62 12 00 mov %eax,0x126208 10caa7: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10caaa: c9 leave 10caab: c3 ret =============================================================================== 00100238 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { 100238: 55 push %ebp 100239: 89 e5 mov %esp,%ebp } 10023b: c9 leave 10023c: c3 ret =============================================================================== 0011721c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 11721c: 55 push %ebp 11721d: 89 e5 mov %esp,%ebp 11721f: 57 push %edi 117220: 56 push %esi 117221: 53 push %ebx 117222: 83 ec 4c sub $0x4c,%esp 117225: 8b 5d 08 mov 0x8(%ebp),%ebx 117228: 8d 45 dc lea -0x24(%ebp),%eax 11722b: 8d 55 e0 lea -0x20(%ebp),%edx 11722e: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117231: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 117234: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 11723b: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11723e: 8d 75 d0 lea -0x30(%ebp),%esi 117241: 8d 55 d4 lea -0x2c(%ebp),%edx 117244: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117247: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 11724a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 117251: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 117254: 8d 53 30 lea 0x30(%ebx),%edx 117257: 89 55 c0 mov %edx,-0x40(%ebp) /* * 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 ); 11725a: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 11725d: 8d 4b 08 lea 0x8(%ebx),%ecx 117260: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 117263: 8d 53 40 lea 0x40(%ebx),%edx 117266: 89 55 bc mov %edx,-0x44(%ebp) { /* * 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; 117269: 8d 4d dc lea -0x24(%ebp),%ecx 11726c: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 11726f: a1 28 f7 13 00 mov 0x13f728,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 117274: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 117277: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11727a: 51 push %ecx 11727b: 8d 4d d0 lea -0x30(%ebp),%ecx 11727e: 51 push %ecx 11727f: 29 d0 sub %edx,%eax 117281: 50 push %eax 117282: ff 75 c0 pushl -0x40(%ebp) 117285: e8 d6 36 00 00 call 11a960 <_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(); 11728a: a1 6c f6 13 00 mov 0x13f66c,%eax 11728f: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 117292: 8b 43 74 mov 0x74(%ebx),%eax /* * 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 ) { 117295: 83 c4 10 add $0x10,%esp 117298: 39 45 c4 cmp %eax,-0x3c(%ebp) 11729b: 76 13 jbe 1172b0 <_Timer_server_Body+0x94> /* * 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 ); 11729d: 52 push %edx 11729e: 8d 55 d0 lea -0x30(%ebp),%edx 1172a1: 52 push %edx 1172a2: 8b 4d c4 mov -0x3c(%ebp),%ecx 1172a5: 29 c1 sub %eax,%ecx 1172a7: 51 push %ecx 1172a8: 57 push %edi 1172a9: e8 b2 36 00 00 call 11a960 <_Watchdog_Adjust_to_chain> 1172ae: eb 0f jmp 1172bf <_Timer_server_Body+0xa3> } else if ( snapshot < last_snapshot ) { 1172b0: 73 10 jae 1172c2 <_Timer_server_Body+0xa6> /* * 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 ); 1172b2: 51 push %ecx 1172b3: 2b 45 c4 sub -0x3c(%ebp),%eax 1172b6: 50 push %eax 1172b7: 6a 01 push $0x1 1172b9: 57 push %edi 1172ba: e8 35 36 00 00 call 11a8f4 <_Watchdog_Adjust> 1172bf: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 1172c2: 8b 45 c4 mov -0x3c(%ebp),%eax 1172c5: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1172c8: 8b 43 78 mov 0x78(%ebx),%eax 1172cb: 83 ec 0c sub $0xc,%esp 1172ce: 50 push %eax 1172cf: e8 2c 07 00 00 call 117a00 <_Chain_Get> if ( timer == NULL ) { 1172d4: 83 c4 10 add $0x10,%esp 1172d7: 85 c0 test %eax,%eax 1172d9: 74 29 je 117304 <_Timer_server_Body+0xe8><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1172db: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1172de: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1172e1: 75 0b jne 1172ee <_Timer_server_Body+0xd2><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1172e3: 52 push %edx <== NOT EXECUTED 1172e4: 52 push %edx <== NOT EXECUTED 1172e5: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1172e8: 50 push %eax <== NOT EXECUTED 1172e9: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 1172ec: eb 0c jmp 1172fa <_Timer_server_Body+0xde><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1172ee: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 1172f1: 75 d5 jne 1172c8 <_Timer_server_Body+0xac><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1172f3: 51 push %ecx <== NOT EXECUTED 1172f4: 51 push %ecx <== NOT EXECUTED 1172f5: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1172f8: 50 push %eax <== NOT EXECUTED 1172f9: 57 push %edi <== NOT EXECUTED 1172fa: e8 e9 36 00 00 call 11a9e8 <_Watchdog_Insert> <== NOT EXECUTED 1172ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 117302: eb c4 jmp 1172c8 <_Timer_server_Body+0xac><== 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 ); 117304: 9c pushf 117305: fa cli 117306: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 117307: 8b 55 b4 mov -0x4c(%ebp),%edx 11730a: 39 55 dc cmp %edx,-0x24(%ebp) 11730d: 75 13 jne 117322 <_Timer_server_Body+0x106><== NEVER TAKEN ts->insert_chain = NULL; 11730f: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 117316: 50 push %eax 117317: 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 ) ) { 117318: 8b 4d b0 mov -0x50(%ebp),%ecx 11731b: 39 4d d0 cmp %ecx,-0x30(%ebp) 11731e: 75 09 jne 117329 <_Timer_server_Body+0x10d> 117320: eb 3e jmp 117360 <_Timer_server_Body+0x144> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 117322: 50 push %eax <== NOT EXECUTED 117323: 9d popf <== NOT EXECUTED 117324: e9 46 ff ff ff jmp 11726f <_Timer_server_Body+0x53><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 117329: 9c pushf 11732a: fa cli 11732b: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11732c: 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)) 11732f: 3b 45 b0 cmp -0x50(%ebp),%eax 117332: 74 25 je 117359 <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 117334: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 117336: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 117339: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 11733c: 85 c0 test %eax,%eax 11733e: 74 19 je 117359 <_Timer_server_Body+0x13d><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 117340: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 117347: 52 push %edx 117348: 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 ); 117349: 52 push %edx 11734a: 52 push %edx 11734b: ff 70 24 pushl 0x24(%eax) 11734e: ff 70 20 pushl 0x20(%eax) 117351: ff 50 1c call *0x1c(%eax) } 117354: 83 c4 10 add $0x10,%esp 117357: eb d0 jmp 117329 <_Timer_server_Body+0x10d> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 117359: 52 push %edx 11735a: 9d popf 11735b: e9 09 ff ff ff jmp 117269 <_Timer_server_Body+0x4d> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 117360: c6 43 7c 00 movb $0x0,0x7c(%ebx) 117364: a1 dc f5 13 00 mov 0x13f5dc,%eax 117369: 40 inc %eax 11736a: a3 dc f5 13 00 mov %eax,0x13f5dc /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 11736f: 50 push %eax 117370: 50 push %eax 117371: 6a 08 push $0x8 117373: ff 33 pushl (%ebx) 117375: e8 5a 2e 00 00 call 11a1d4 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 11737a: 89 d8 mov %ebx,%eax 11737c: e8 0f fe ff ff call 117190 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 117381: 89 d8 mov %ebx,%eax 117383: e8 4e fe ff ff call 1171d6 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 117388: e8 0c 25 00 00 call 119899 <_Thread_Enable_dispatch> ts->active = true; 11738d: 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 ); 117391: 59 pop %ecx 117392: ff 75 b8 pushl -0x48(%ebp) 117395: e8 62 37 00 00 call 11aafc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11739a: 5a pop %edx 11739b: ff 75 bc pushl -0x44(%ebp) 11739e: e8 59 37 00 00 call 11aafc <_Watchdog_Remove> 1173a3: 83 c4 10 add $0x10,%esp 1173a6: e9 be fe ff ff jmp 117269 <_Timer_server_Body+0x4d> =============================================================================== 001173ab <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1173ab: 55 push %ebp 1173ac: 89 e5 mov %esp,%ebp 1173ae: 57 push %edi 1173af: 56 push %esi 1173b0: 53 push %ebx 1173b1: 83 ec 2c sub $0x2c,%esp 1173b4: 8b 5d 08 mov 0x8(%ebp),%ebx 1173b7: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1173ba: 8b 53 78 mov 0x78(%ebx),%edx 1173bd: 85 d2 test %edx,%edx 1173bf: 0f 85 e6 00 00 00 jne 1174ab <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN 1173c5: 8b 15 dc f5 13 00 mov 0x13f5dc,%edx 1173cb: 42 inc %edx 1173cc: 89 15 dc f5 13 00 mov %edx,0x13f5dc * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1173d2: 8b 50 38 mov 0x38(%eax),%edx 1173d5: 83 fa 01 cmp $0x1,%edx 1173d8: 75 5a jne 117434 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 1173da: 9c pushf 1173db: fa cli 1173dc: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 1173df: 8b 0d 28 f7 13 00 mov 0x13f728,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 1173e5: 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)); 1173e8: 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; 1173eb: 8d 7b 34 lea 0x34(%ebx),%edi 1173ee: 39 fa cmp %edi,%edx 1173f0: 74 19 je 11740b <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 1173f2: 89 cf mov %ecx,%edi 1173f4: 29 f7 sub %esi,%edi 1173f6: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 1173f9: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 1173fc: 31 f6 xor %esi,%esi 1173fe: 3b 7d e4 cmp -0x1c(%ebp),%edi 117401: 76 05 jbe 117408 <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 117403: 89 fe mov %edi,%esi 117405: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 117408: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 11740b: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11740e: ff 75 e0 pushl -0x20(%ebp) 117411: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 117412: 57 push %edi 117413: 57 push %edi 117414: 83 c0 10 add $0x10,%eax 117417: 50 push %eax 117418: 8d 43 30 lea 0x30(%ebx),%eax 11741b: 50 push %eax 11741c: e8 c7 35 00 00 call 11a9e8 <_Watchdog_Insert> if ( !ts->active ) { 117421: 8a 43 7c mov 0x7c(%ebx),%al 117424: 83 c4 10 add $0x10,%esp 117427: 84 c0 test %al,%al 117429: 75 74 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 11742b: 89 d8 mov %ebx,%eax 11742d: e8 5e fd ff ff call 117190 <_Timer_server_Reset_interval_system_watchdog> 117432: eb 6b jmp 11749f <_Timer_server_Schedule_operation_method+0xf4> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 117434: 83 fa 03 cmp $0x3,%edx 117437: 75 66 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117439: 9c pushf 11743a: fa cli 11743b: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 11743e: 8b 0d 6c f6 13 00 mov 0x13f66c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 117444: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117447: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11744a: 8d 7b 6c lea 0x6c(%ebx),%edi 11744d: 39 fe cmp %edi,%esi 11744f: 74 27 je 117478 <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 117451: 8b 7e 10 mov 0x10(%esi),%edi 117454: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 117457: 39 d1 cmp %edx,%ecx 117459: 76 15 jbe 117470 <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 11745b: 89 cf mov %ecx,%edi 11745d: 29 d7 sub %edx,%edi 11745f: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 117462: 31 d2 xor %edx,%edx 117464: 39 7d d4 cmp %edi,-0x2c(%ebp) 117467: 76 0c jbe 117475 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN delta_interval -= delta; 117469: 8b 55 d4 mov -0x2c(%ebp),%edx 11746c: 29 fa sub %edi,%edx 11746e: eb 05 jmp 117475 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 117470: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 117473: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 117475: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 117478: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 11747b: ff 75 e0 pushl -0x20(%ebp) 11747e: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11747f: 56 push %esi 117480: 56 push %esi 117481: 83 c0 10 add $0x10,%eax 117484: 50 push %eax 117485: 8d 43 68 lea 0x68(%ebx),%eax 117488: 50 push %eax 117489: e8 5a 35 00 00 call 11a9e8 <_Watchdog_Insert> if ( !ts->active ) { 11748e: 8a 43 7c mov 0x7c(%ebx),%al 117491: 83 c4 10 add $0x10,%esp 117494: 84 c0 test %al,%al 117496: 75 07 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 117498: 89 d8 mov %ebx,%eax 11749a: e8 37 fd ff ff call 1171d6 <_Timer_server_Reset_tod_system_watchdog> * 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 ); } } 11749f: 8d 65 f4 lea -0xc(%ebp),%esp 1174a2: 5b pop %ebx 1174a3: 5e pop %esi 1174a4: 5f pop %edi 1174a5: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1174a6: e9 ee 23 00 00 jmp 119899 <_Thread_Enable_dispatch> * 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 ); 1174ab: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1174ae: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1174b1: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1174b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1174b7: 5b pop %ebx <== NOT EXECUTED 1174b8: 5e pop %esi <== NOT EXECUTED 1174b9: 5f pop %edi <== NOT EXECUTED 1174ba: 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 ); 1174bb: e9 04 05 00 00 jmp 1179c4 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010e918 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e918: 55 push %ebp 10e919: 89 e5 mov %esp,%ebp 10e91b: 57 push %edi 10e91c: 56 push %esi 10e91d: 53 push %ebx 10e91e: 83 ec 1c sub $0x1c,%esp 10e921: 8b 75 08 mov 0x8(%ebp),%esi 10e924: 8b 7d 0c mov 0xc(%ebp),%edi 10e927: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e92a: 9c pushf 10e92b: fa cli 10e92c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e92d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e92f: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e932: 39 ca cmp %ecx,%edx 10e934: 74 44 je 10e97a <_Watchdog_Adjust+0x62> switch ( direction ) { 10e936: 85 ff test %edi,%edi 10e938: 74 3c je 10e976 <_Watchdog_Adjust+0x5e> 10e93a: 4f dec %edi 10e93b: 75 3d jne 10e97a <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e93d: 01 5a 10 add %ebx,0x10(%edx) break; 10e940: eb 38 jmp 10e97a <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e942: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e944: 8b 7a 10 mov 0x10(%edx),%edi 10e947: 39 fb cmp %edi,%ebx 10e949: 73 07 jae 10e952 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e94b: 29 df sub %ebx,%edi 10e94d: 89 7a 10 mov %edi,0x10(%edx) break; 10e950: eb 28 jmp 10e97a <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e952: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e959: 50 push %eax 10e95a: 9d popf _Watchdog_Tickle( header ); 10e95b: 83 ec 0c sub $0xc,%esp 10e95e: 56 push %esi 10e95f: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e962: e8 99 01 00 00 call 10eb00 <_Watchdog_Tickle> _ISR_Disable( level ); 10e967: 9c pushf 10e968: fa cli 10e969: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e96a: 83 c4 10 add $0x10,%esp 10e96d: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e970: 39 0e cmp %ecx,(%esi) 10e972: 74 06 je 10e97a <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e974: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e976: 85 db test %ebx,%ebx 10e978: 75 c8 jne 10e942 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e97a: 50 push %eax 10e97b: 9d popf } 10e97c: 8d 65 f4 lea -0xc(%ebp),%esp 10e97f: 5b pop %ebx 10e980: 5e pop %esi 10e981: 5f pop %edi 10e982: c9 leave 10e983: c3 ret =============================================================================== 0010d1f8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10d1f8: 55 push %ebp 10d1f9: 89 e5 mov %esp,%ebp 10d1fb: 56 push %esi 10d1fc: 53 push %ebx 10d1fd: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10d200: 9c pushf 10d201: fa cli 10d202: 5e pop %esi previous_state = the_watchdog->state; 10d203: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10d206: 83 f8 01 cmp $0x1,%eax 10d209: 74 09 je 10d214 <_Watchdog_Remove+0x1c> 10d20b: 72 44 jb 10d251 <_Watchdog_Remove+0x59> 10d20d: 83 f8 03 cmp $0x3,%eax 10d210: 77 3f ja 10d251 <_Watchdog_Remove+0x59> <== NEVER TAKEN 10d212: eb 09 jmp 10d21d <_Watchdog_Remove+0x25> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10d214: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10d21b: eb 34 jmp 10d251 <_Watchdog_Remove+0x59> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10d21d: 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 ); 10d224: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10d226: 83 39 00 cmpl $0x0,(%ecx) 10d229: 74 06 je 10d231 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10d22b: 8b 5a 10 mov 0x10(%edx),%ebx 10d22e: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10d231: 8b 0d 50 63 12 00 mov 0x126350,%ecx 10d237: 85 c9 test %ecx,%ecx 10d239: 74 0c je 10d247 <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10d23b: 8b 0d a0 62 12 00 mov 0x1262a0,%ecx 10d241: 89 0d c0 62 12 00 mov %ecx,0x1262c0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d247: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10d249: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10d24c: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10d24f: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10d251: 8b 0d 54 63 12 00 mov 0x126354,%ecx 10d257: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10d25a: 56 push %esi 10d25b: 9d popf return( previous_state ); } 10d25c: 5b pop %ebx 10d25d: 5e pop %esi 10d25e: c9 leave 10d25f: c3 ret =============================================================================== 0010e428 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10e428: 55 push %ebp 10e429: 89 e5 mov %esp,%ebp 10e42b: 57 push %edi 10e42c: 56 push %esi 10e42d: 53 push %ebx 10e42e: 83 ec 20 sub $0x20,%esp 10e431: 8b 7d 08 mov 0x8(%ebp),%edi 10e434: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10e437: 9c pushf 10e438: fa cli 10e439: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10e43c: 56 push %esi 10e43d: 57 push %edi 10e43e: 68 24 27 12 00 push $0x122724 10e443: e8 34 aa ff ff call 108e7c */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e448: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e44a: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10e44d: 83 c4 10 add $0x10,%esp 10e450: 39 f3 cmp %esi,%ebx 10e452: 74 1d je 10e471 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10e454: 52 push %edx 10e455: 52 push %edx 10e456: 53 push %ebx 10e457: 6a 00 push $0x0 10e459: e8 32 00 00 00 call 10e490 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 10e45e: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 10e460: 83 c4 10 add $0x10,%esp 10e463: 39 f3 cmp %esi,%ebx 10e465: 75 ed jne 10e454 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10e467: 50 push %eax 10e468: 50 push %eax 10e469: 57 push %edi 10e46a: 68 3b 27 12 00 push $0x12273b 10e46f: eb 08 jmp 10e479 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10e471: 83 ec 0c sub $0xc,%esp 10e474: 68 4a 27 12 00 push $0x12274a 10e479: e8 fe a9 ff ff call 108e7c 10e47e: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10e481: ff 75 e4 pushl -0x1c(%ebp) 10e484: 9d popf } 10e485: 8d 65 f4 lea -0xc(%ebp),%esp 10e488: 5b pop %ebx 10e489: 5e pop %esi 10e48a: 5f pop %edi 10e48b: c9 leave 10e48c: c3 ret =============================================================================== 0010a458 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10a458: 55 push %ebp 10a459: 89 e5 mov %esp,%ebp 10a45b: 56 push %esi 10a45c: 53 push %ebx 10a45d: 83 ec 10 sub $0x10,%esp 10a460: 8b 5d 08 mov 0x8(%ebp),%ebx 10a463: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10a466: 85 db test %ebx,%ebx 10a468: 74 09 je 10a473 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10a46a: 81 7b 04 3f 42 0f 00 cmpl $0xf423f,0x4(%ebx) 10a471: 76 13 jbe 10a486 rtems_set_errno_and_return_minus_one( EINVAL ); 10a473: e8 58 8f 00 00 call 1133d0 <__errno> 10a478: c7 00 16 00 00 00 movl $0x16,(%eax) 10a47e: 83 c8 ff or $0xffffffff,%eax 10a481: e9 9a 00 00 00 jmp 10a520 if ( olddelta ) { 10a486: 85 f6 test %esi,%esi 10a488: 74 0d je 10a497 olddelta->tv_sec = 0; 10a48a: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10a490: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10a497: 69 03 40 42 0f 00 imul $0xf4240,(%ebx),%eax adjustment += delta->tv_usec; 10a49d: 03 43 04 add 0x4(%ebx),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10a4a0: 3b 05 04 32 12 00 cmp 0x123204,%eax 10a4a6: 72 76 jb 10a51e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a4a8: a1 30 73 12 00 mov 0x127330,%eax 10a4ad: 40 inc %eax 10a4ae: a3 30 73 12 00 mov %eax,0x127330 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10a4b3: 83 ec 0c sub $0xc,%esp 10a4b6: 8d 45 f0 lea -0x10(%ebp),%eax 10a4b9: 50 push %eax 10a4ba: e8 f1 14 00 00 call 10b9b0 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10a4bf: 8b 03 mov (%ebx),%eax 10a4c1: 01 45 f0 add %eax,-0x10(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10a4c4: 69 43 04 e8 03 00 00 imul $0x3e8,0x4(%ebx),%eax 10a4cb: 8b 4d f0 mov -0x10(%ebp),%ecx 10a4ce: 03 45 f4 add -0xc(%ebp),%eax /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10a4d1: 83 c4 10 add $0x10,%esp 10a4d4: eb 05 jmp 10a4db 10a4d6: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax 10a4db: 89 ca mov %ecx,%edx 10a4dd: 41 inc %ecx 10a4de: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10a4e3: 77 f1 ja 10a4d6 10a4e5: eb 05 jmp 10a4ec 10a4e7: 05 00 ca 9a 3b add $0x3b9aca00,%eax 10a4ec: 89 d1 mov %edx,%ecx 10a4ee: 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) ) { 10a4ef: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10a4f4: 76 f1 jbe 10a4e7 10a4f6: 89 45 f4 mov %eax,-0xc(%ebp) 10a4f9: 89 4d f0 mov %ecx,-0x10(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10a4fc: 83 ec 0c sub $0xc,%esp 10a4ff: 8d 45 f0 lea -0x10(%ebp),%eax 10a502: 50 push %eax 10a503: e8 38 15 00 00 call 10ba40 <_TOD_Set> _Thread_Enable_dispatch(); 10a508: e8 94 25 00 00 call 10caa1 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10a50d: 83 c4 10 add $0x10,%esp 10a510: 85 f6 test %esi,%esi 10a512: 74 0a je 10a51e <== NEVER TAKEN *olddelta = *delta; 10a514: 8b 03 mov (%ebx),%eax 10a516: 8b 53 04 mov 0x4(%ebx),%edx 10a519: 89 06 mov %eax,(%esi) 10a51b: 89 56 04 mov %edx,0x4(%esi) 10a51e: 31 c0 xor %eax,%eax return 0; } 10a520: 8d 65 f8 lea -0x8(%ebp),%esp 10a523: 5b pop %ebx 10a524: 5e pop %esi 10a525: c9 leave 10a526: c3 ret =============================================================================== 0010a3e8 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10a3e8: 55 push %ebp 10a3e9: 89 e5 mov %esp,%ebp 10a3eb: 83 ec 08 sub $0x8,%esp 10a3ee: 8b 45 08 mov 0x8(%ebp),%eax 10a3f1: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10a3f4: 85 d2 test %edx,%edx 10a3f6: 74 3c je 10a434 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10a3f8: 83 f8 01 cmp $0x1,%eax 10a3fb: 75 0b jne 10a408 _TOD_Get(tp); 10a3fd: 83 ec 0c sub $0xc,%esp 10a400: 52 push %edx 10a401: e8 96 1b 00 00 call 10bf9c <_TOD_Get> 10a406: eb 13 jmp 10a41b return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10a408: 83 f8 04 cmp $0x4,%eax 10a40b: 74 05 je 10a412 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 10a40d: 83 f8 02 cmp $0x2,%eax 10a410: 75 10 jne 10a422 _TOD_Get_uptime_as_timespec( tp ); 10a412: 83 ec 0c sub $0xc,%esp 10a415: 52 push %edx 10a416: e8 dd 1b 00 00 call 10bff8 <_TOD_Get_uptime_as_timespec> 10a41b: 31 c0 xor %eax,%eax return 0; 10a41d: 83 c4 10 add $0x10,%esp 10a420: eb 20 jmp 10a442 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 10a422: 83 f8 03 cmp $0x3,%eax 10a425: 75 0d jne 10a434 rtems_set_errno_and_return_minus_one( ENOSYS ); 10a427: e8 d0 93 00 00 call 1137fc <__errno> 10a42c: c7 00 58 00 00 00 movl $0x58,(%eax) 10a432: eb 0b jmp 10a43f #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10a434: e8 c3 93 00 00 call 1137fc <__errno> 10a439: c7 00 16 00 00 00 movl $0x16,(%eax) 10a43f: 83 c8 ff or $0xffffffff,%eax return 0; } 10a442: c9 leave 10a443: c3 ret =============================================================================== 00129a40 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 129a40: 55 push %ebp 129a41: 89 e5 mov %esp,%ebp 129a43: 83 ec 08 sub $0x8,%esp 129a46: 8b 45 08 mov 0x8(%ebp),%eax 129a49: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 129a4c: 85 d2 test %edx,%edx 129a4e: 74 44 je 129a94 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 129a50: 83 f8 01 cmp $0x1,%eax 129a53: 75 28 jne 129a7d if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 129a55: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 129a5b: 76 37 jbe 129a94 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 129a5d: a1 24 a1 16 00 mov 0x16a124,%eax 129a62: 40 inc %eax 129a63: a3 24 a1 16 00 mov %eax,0x16a124 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 129a68: 83 ec 0c sub $0xc,%esp 129a6b: 52 push %edx 129a6c: e8 33 15 00 00 call 12afa4 <_TOD_Set> _Thread_Enable_dispatch(); 129a71: e8 33 95 fe ff call 112fa9 <_Thread_Enable_dispatch> 129a76: 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; 129a78: 83 c4 10 add $0x10,%esp 129a7b: eb 25 jmp 129aa2 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 129a7d: 83 f8 02 cmp $0x2,%eax 129a80: 74 05 je 129a87 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 129a82: 83 f8 03 cmp $0x3,%eax 129a85: 75 0d jne 129a94 rtems_set_errno_and_return_minus_one( ENOSYS ); 129a87: e8 88 45 01 00 call 13e014 <__errno> 129a8c: c7 00 58 00 00 00 movl $0x58,(%eax) 129a92: eb 0b jmp 129a9f #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 129a94: e8 7b 45 01 00 call 13e014 <__errno> 129a99: c7 00 16 00 00 00 movl $0x16,(%eax) 129a9f: 83 c8 ff or $0xffffffff,%eax return 0; } 129aa2: c9 leave 129aa3: c3 ret =============================================================================== 00111f44 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 111f44: 55 push %ebp 111f45: 89 e5 mov %esp,%ebp 111f47: 57 push %edi 111f48: 56 push %esi 111f49: 53 push %ebx 111f4a: 83 ec 3c sub $0x3c,%esp 111f4d: 8b 5d 0c mov 0xc(%ebp),%ebx 111f50: 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() ) 111f53: e8 78 cf ff ff call 10eed0 111f58: 39 45 08 cmp %eax,0x8(%ebp) 111f5b: 74 0d je 111f6a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); 111f5d: e8 b2 0a 00 00 call 112a14 <__errno> <== NOT EXECUTED 111f62: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 111f68: eb 0f jmp 111f79 <== NOT EXECUTED /* * Validate the signal passed. */ if ( !sig ) 111f6a: 85 db test %ebx,%ebx 111f6c: 75 13 jne 111f81 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 111f6e: e8 a1 0a 00 00 call 112a14 <__errno> <== NOT EXECUTED 111f73: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 111f79: 83 c8 ff or $0xffffffff,%eax 111f7c: e9 e7 01 00 00 jmp 112168 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 111f81: 8d 4b ff lea -0x1(%ebx),%ecx if ( !is_valid_signo(sig) ) 111f84: 83 f9 1f cmp $0x1f,%ecx 111f87: 77 e5 ja 111f6e <== NEVER TAKEN 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 ) 111f89: 6b d3 0c imul $0xc,%ebx,%edx 111f8c: 31 c0 xor %eax,%eax 111f8e: 83 ba 70 67 12 00 01 cmpl $0x1,0x126770(%edx) 111f95: 0f 84 cd 01 00 00 je 112168 /* * 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 ) ) 111f9b: 83 fb 04 cmp $0x4,%ebx 111f9e: 74 0a je 111faa 111fa0: 83 fb 08 cmp $0x8,%ebx 111fa3: 74 05 je 111faa 111fa5: 83 fb 0b cmp $0xb,%ebx 111fa8: 75 16 jne 111fc0 return pthread_kill( pthread_self(), sig ); 111faa: e8 e9 05 00 00 call 112598 111faf: 56 push %esi 111fb0: 56 push %esi 111fb1: 53 push %ebx 111fb2: 50 push %eax 111fb3: e8 38 05 00 00 call 1124f0 111fb8: 83 c4 10 add $0x10,%esp 111fbb: e9 a8 01 00 00 jmp 112168 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 111fc0: be 01 00 00 00 mov $0x1,%esi 111fc5: d3 e6 shl %cl,%esi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 111fc7: 89 5d dc mov %ebx,-0x24(%ebp) siginfo->si_code = SI_USER; 111fca: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 111fd1: 85 ff test %edi,%edi 111fd3: 75 09 jne 111fde siginfo->si_value.sival_int = 0; 111fd5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111fdc: eb 05 jmp 111fe3 } else { siginfo->si_value = *value; 111fde: 8b 07 mov (%edi),%eax 111fe0: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 111fe3: a1 08 62 12 00 mov 0x126208,%eax 111fe8: 40 inc %eax 111fe9: a3 08 62 12 00 mov %eax,0x126208 /* * 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; 111fee: 8b 15 c4 62 12 00 mov 0x1262c4,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111ff4: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax 111ffa: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 112000: f7 d0 not %eax 112002: 85 c6 test %eax,%esi 112004: 0f 85 e0 00 00 00 jne 1120ea /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11200a: a1 f4 68 12 00 mov 0x1268f4,%eax 11200f: eb 23 jmp 112034 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 112011: 89 c2 mov %eax,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 112013: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 112019: 85 70 30 test %esi,0x30(%eax) 11201c: 0f 85 c8 00 00 00 jne 1120ea /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 112022: 8b 89 cc 00 00 00 mov 0xcc(%ecx),%ecx 112028: f7 d1 not %ecx 11202a: 85 ce test %ecx,%esi 11202c: 0f 85 b8 00 00 00 jne 1120ea 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 ) { 112032: 8b 00 mov (%eax),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112034: 3d f8 68 12 00 cmp $0x1268f8,%eax 112039: 75 d6 jne 112011 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 11203b: 0f b6 05 f4 21 12 00 movzbl 0x1221f4,%eax 112042: 40 inc %eax 112043: 89 45 d4 mov %eax,-0x2c(%ebp) 112046: 31 d2 xor %edx,%edx 112048: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%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 ] ) 11204f: 8b 4d cc mov -0x34(%ebp),%ecx 112052: 8b 04 8d dc 61 12 00 mov 0x1261dc(,%ecx,4),%eax 112059: 85 c0 test %eax,%eax 11205b: 74 7c je 1120d9 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 11205d: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 112060: 0f b7 78 10 movzwl 0x10(%eax),%edi 112064: 89 7d c0 mov %edi,-0x40(%ebp) object_table = the_info->local_table; 112067: 8b 40 1c mov 0x1c(%eax),%eax 11206a: 89 45 c4 mov %eax,-0x3c(%ebp) 11206d: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 112074: eb 5b jmp 1120d1 the_thread = (Thread_Control *) object_table[ index ]; 112076: 8b 4d d0 mov -0x30(%ebp),%ecx 112079: 8b 7d c4 mov -0x3c(%ebp),%edi 11207c: 8b 04 8f mov (%edi,%ecx,4),%eax if ( !the_thread ) 11207f: 85 c0 test %eax,%eax 112081: 74 41 je 1120c4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 112083: 8b 48 14 mov 0x14(%eax),%ecx 112086: 3b 4d d4 cmp -0x2c(%ebp),%ecx 112089: 77 39 ja 1120c4 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11208b: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi 112091: 8b bf cc 00 00 00 mov 0xcc(%edi),%edi 112097: f7 d7 not %edi 112099: 85 fe test %edi,%esi 11209b: 74 27 je 1120c4 * * 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 ) { 11209d: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1120a0: 72 27 jb 1120c9 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 1120a2: 8b 7a 10 mov 0x10(%edx),%edi 1120a5: 89 7d c8 mov %edi,-0x38(%ebp) 1120a8: 85 ff test %edi,%edi 1120aa: 74 18 je 1120c4 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 1120ac: 8b 78 10 mov 0x10(%eax),%edi 1120af: 85 ff test %edi,%edi 1120b1: 74 16 je 1120c9 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 1120b3: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp) 1120ba: 75 08 jne 1120c4 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 1120bc: 81 e7 00 00 00 10 and $0x10000000,%edi 1120c2: 75 05 jne 1120c9 1120c4: 8b 4d d4 mov -0x2c(%ebp),%ecx 1120c7: eb 02 jmp 1120cb 1120c9: 89 c2 mov %eax,%edx #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1120cb: ff 45 d0 incl -0x30(%ebp) 1120ce: 89 4d d4 mov %ecx,-0x2c(%ebp) 1120d1: 8b 45 c0 mov -0x40(%ebp),%eax 1120d4: 39 45 d0 cmp %eax,-0x30(%ebp) 1120d7: 76 9d jbe 112076 * + 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++) { 1120d9: ff 45 cc incl -0x34(%ebp) 1120dc: 83 7d cc 05 cmpl $0x5,-0x34(%ebp) 1120e0: 0f 85 69 ff ff ff jne 11204f } } } } if ( interested ) { 1120e6: 85 d2 test %edx,%edx 1120e8: 74 17 je 112101 * 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; 1120ea: c6 42 74 01 movb $0x1,0x74(%edx) /* * 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 ) ) { 1120ee: 51 push %ecx 1120ef: 8d 45 dc lea -0x24(%ebp),%eax 1120f2: 50 push %eax 1120f3: 53 push %ebx 1120f4: 52 push %edx 1120f5: e8 02 02 00 00 call 1122fc <_POSIX_signals_Unblock_thread> 1120fa: 83 c4 10 add $0x10,%esp 1120fd: 84 c0 test %al,%al 1120ff: 75 60 jne 112161 /* * 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 ); 112101: 83 ec 0c sub $0xc,%esp 112104: 56 push %esi 112105: e8 ce 01 00 00 call 1122d8 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 11210a: 6b db 0c imul $0xc,%ebx,%ebx 11210d: 83 c4 10 add $0x10,%esp 112110: 83 bb 68 67 12 00 02 cmpl $0x2,0x126768(%ebx) 112117: 75 48 jne 112161 psiginfo = (POSIX_signals_Siginfo_node *) 112119: 83 ec 0c sub $0xc,%esp 11211c: 68 e8 68 12 00 push $0x1268e8 112121: e8 4a 8d ff ff call 10ae70 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 112126: 83 c4 10 add $0x10,%esp 112129: 85 c0 test %eax,%eax 11212b: 75 15 jne 112142 _Thread_Enable_dispatch(); 11212d: e8 df a1 ff ff call 10c311 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 112132: e8 dd 08 00 00 call 112a14 <__errno> 112137: c7 00 0b 00 00 00 movl $0xb,(%eax) 11213d: e9 37 fe ff ff jmp 111f79 } psiginfo->Info = *siginfo; 112142: 8d 78 08 lea 0x8(%eax),%edi 112145: 8d 75 dc lea -0x24(%ebp),%esi 112148: b9 03 00 00 00 mov $0x3,%ecx 11214d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 11214f: 52 push %edx 112150: 52 push %edx 112151: 50 push %eax 112152: 81 c3 60 69 12 00 add $0x126960,%ebx 112158: 53 push %ebx 112159: e8 d6 8c ff ff call 10ae34 <_Chain_Append> 11215e: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 112161: e8 ab a1 ff ff call 10c311 <_Thread_Enable_dispatch> 112166: 31 c0 xor %eax,%eax return 0; } 112168: 8d 65 f4 lea -0xc(%ebp),%esp 11216b: 5b pop %ebx 11216c: 5e pop %esi 11216d: 5f pop %edi 11216e: c9 leave 11216f: c3 ret =============================================================================== 001269dc : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 1269dc: 55 push %ebp 1269dd: 89 e5 mov %esp,%ebp 1269df: 56 push %esi 1269e0: 53 push %ebx 1269e1: 8b 75 08 mov 0x8(%ebp),%esi 1269e4: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 1269e7: 83 ec 0c sub $0xc,%esp 1269ea: 56 push %esi 1269eb: e8 1c 01 00 00 call 126b0c <_Timespec_Is_valid> 1269f0: 83 c4 10 add $0x10,%esp 1269f3: 84 c0 test %al,%al 1269f5: 74 0b je 126a02 * 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 ) 1269f7: 83 3e 00 cmpl $0x0,(%esi) 1269fa: 78 06 js 126a02 <== NEVER TAKEN 1269fc: 83 7e 04 00 cmpl $0x0,0x4(%esi) 126a00: 79 10 jns 126a12 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 126a02: e8 f1 29 ff ff call 1193f8 <__errno> 126a07: c7 00 16 00 00 00 movl $0x16,(%eax) 126a0d: e9 c4 00 00 00 jmp 126ad6 ticks = _Timespec_To_ticks( rqtp ); 126a12: 83 ec 0c sub $0xc,%esp 126a15: 56 push %esi 126a16: e8 fd fc fe ff call 116718 <_Timespec_To_ticks> 126a1b: 89 c6 mov %eax,%esi * 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 ) { 126a1d: 83 c4 10 add $0x10,%esp 126a20: 85 c0 test %eax,%eax 126a22: 75 2f jne 126a53 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 126a24: a1 ec 1a 13 00 mov 0x131aec,%eax 126a29: 40 inc %eax 126a2a: a3 ec 1a 13 00 mov %eax,0x131aec _Thread_Disable_dispatch(); _Thread_Yield_processor(); 126a2f: e8 04 9a fe ff call 110438 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 126a34: e8 f4 8e fe ff call 10f92d <_Thread_Enable_dispatch> if ( rmtp ) { 126a39: 85 db test %ebx,%ebx 126a3b: 0f 84 9a 00 00 00 je 126adb rmtp->tv_sec = 0; 126a41: c7 03 00 00 00 00 movl $0x0,(%ebx) rmtp->tv_nsec = 0; 126a47: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 126a4e: e9 88 00 00 00 jmp 126adb 126a53: a1 ec 1a 13 00 mov 0x131aec,%eax 126a58: 40 inc %eax 126a59: a3 ec 1a 13 00 mov %eax,0x131aec /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 126a5e: 52 push %edx 126a5f: 52 push %edx 126a60: 68 08 00 00 10 push $0x10000008 126a65: ff 35 a8 1b 13 00 pushl 0x131ba8 126a6b: e8 ec 96 fe ff call 11015c <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 126a70: 8b 15 a8 1b 13 00 mov 0x131ba8,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 126a76: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 126a79: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 126a80: c7 42 64 b0 f7 10 00 movl $0x10f7b0,0x64(%edx) the_watchdog->id = id; 126a87: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 126a8a: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 126a91: 89 72 54 mov %esi,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 126a94: 59 pop %ecx 126a95: 58 pop %eax 126a96: 83 c2 48 add $0x48,%edx 126a99: 52 push %edx 126a9a: 68 c8 1b 13 00 push $0x131bc8 126a9f: e8 f4 9c fe ff call 110798 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 126aa4: e8 84 8e fe ff call 10f92d <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 126aa9: 83 c4 10 add $0x10,%esp 126aac: 85 db test %ebx,%ebx 126aae: 74 2b je 126adb ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 126ab0: a1 a8 1b 13 00 mov 0x131ba8,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 126ab5: 03 70 5c add 0x5c(%eax),%esi 126ab8: 2b 70 60 sub 0x60(%eax),%esi _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 126abb: 50 push %eax 126abc: 50 push %eax 126abd: 53 push %ebx 126abe: 56 push %esi 126abf: e8 20 00 00 00 call 126ae4 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 126ac4: 83 c4 10 add $0x10,%esp 126ac7: 85 f6 test %esi,%esi 126ac9: 74 10 je 126adb rtems_set_errno_and_return_minus_one( EINTR ); 126acb: e8 28 29 ff ff call 1193f8 <__errno> 126ad0: c7 00 04 00 00 00 movl $0x4,(%eax) 126ad6: 83 c8 ff or $0xffffffff,%eax 126ad9: eb 02 jmp 126add 126adb: 31 c0 xor %eax,%eax #endif } return 0; } 126add: 8d 65 f8 lea -0x8(%ebp),%esp 126ae0: 5b pop %ebx 126ae1: 5e pop %esi 126ae2: c9 leave 126ae3: c3 ret =============================================================================== 0010eab4 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10eab4: 55 push %ebp 10eab5: 89 e5 mov %esp,%ebp 10eab7: 8b 45 08 mov 0x8(%ebp),%eax 10eaba: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) 10eabd: 85 c0 test %eax,%eax 10eabf: 74 24 je 10eae5 10eac1: 83 38 00 cmpl $0x0,(%eax) 10eac4: 74 1f je 10eae5 return EINVAL; switch ( policy ) { 10eac6: 83 f9 04 cmp $0x4,%ecx 10eac9: 77 0c ja 10ead7 10eacb: ba 01 00 00 00 mov $0x1,%edx 10ead0: d3 e2 shl %cl,%edx 10ead2: 80 e2 17 and $0x17,%dl 10ead5: 75 07 jne 10eade <== ALWAYS TAKEN 10ead7: b8 86 00 00 00 mov $0x86,%eax 10eadc: eb 0c jmp 10eaea case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10eade: 89 48 14 mov %ecx,0x14(%eax) 10eae1: 31 c0 xor %eax,%eax return 0; 10eae3: eb 05 jmp 10eaea 10eae5: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10eaea: c9 leave 10eaeb: c3 ret =============================================================================== 0010a920 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10a920: 55 push %ebp 10a921: 89 e5 mov %esp,%ebp 10a923: 57 push %edi 10a924: 56 push %esi 10a925: 53 push %ebx 10a926: 83 ec 1c sub $0x1c,%esp 10a929: 8b 5d 08 mov 0x8(%ebp),%ebx 10a92c: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10a92f: 85 db test %ebx,%ebx 10a931: 0f 84 93 00 00 00 je 10a9ca return EINVAL; if ( count == 0 ) 10a937: 85 f6 test %esi,%esi 10a939: 0f 84 8b 00 00 00 je 10a9ca return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10a93f: 8b 7d 0c mov 0xc(%ebp),%edi 10a942: 85 ff test %edi,%edi 10a944: 75 0f jne 10a955 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10a946: 83 ec 0c sub $0xc,%esp 10a949: 8d 7d d8 lea -0x28(%ebp),%edi 10a94c: 57 push %edi 10a94d: e8 1a ff ff ff call 10a86c 10a952: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10a955: 83 3f 00 cmpl $0x0,(%edi) 10a958: 74 70 je 10a9ca return EINVAL; switch ( the_attr->process_shared ) { 10a95a: 83 7f 04 00 cmpl $0x0,0x4(%edi) 10a95e: 75 6a jne 10a9ca <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10a960: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10a967: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a96a: a1 20 72 12 00 mov 0x127220,%eax 10a96f: 40 inc %eax 10a970: a3 20 72 12 00 mov %eax,0x127220 * 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 *) 10a975: 83 ec 0c sub $0xc,%esp 10a978: 68 08 76 12 00 push $0x127608 10a97d: e8 e2 1d 00 00 call 10c764 <_Objects_Allocate> 10a982: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10a984: 83 c4 10 add $0x10,%esp 10a987: 85 c0 test %eax,%eax 10a989: 75 0c jne 10a997 _Thread_Enable_dispatch(); 10a98b: e8 d9 29 00 00 call 10d369 <_Thread_Enable_dispatch> 10a990: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10a995: eb 38 jmp 10a9cf } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10a997: 50 push %eax 10a998: 50 push %eax 10a999: 8d 45 e0 lea -0x20(%ebp),%eax 10a99c: 50 push %eax 10a99d: 8d 46 10 lea 0x10(%esi),%eax 10a9a0: 50 push %eax 10a9a1: e8 8e 14 00 00 call 10be34 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a9a6: 8b 46 08 mov 0x8(%esi),%eax 10a9a9: 0f b7 c8 movzwl %ax,%ecx 10a9ac: 8b 15 24 76 12 00 mov 0x127624,%edx 10a9b2: 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; 10a9b5: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10a9bc: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10a9be: e8 a6 29 00 00 call 10d369 <_Thread_Enable_dispatch> 10a9c3: 31 c0 xor %eax,%eax return 0; 10a9c5: 83 c4 10 add $0x10,%esp 10a9c8: eb 05 jmp 10a9cf 10a9ca: b8 16 00 00 00 mov $0x16,%eax } 10a9cf: 8d 65 f4 lea -0xc(%ebp),%esp 10a9d2: 5b pop %ebx 10a9d3: 5e pop %esi 10a9d4: 5f pop %edi 10a9d5: c9 leave 10a9d6: c3 ret =============================================================================== 00109f88 : */ void pthread_cleanup_pop( int execute ) { 109f88: 55 push %ebp 109f89: 89 e5 mov %esp,%ebp 109f8b: 57 push %edi 109f8c: 56 push %esi 109f8d: 53 push %ebx 109f8e: 83 ec 1c sub $0x1c,%esp 109f91: 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 ]; 109f94: a1 8c 62 12 00 mov 0x12628c,%eax 109f99: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109f9f: a1 d0 61 12 00 mov 0x1261d0,%eax 109fa4: 40 inc %eax 109fa5: a3 d0 61 12 00 mov %eax,0x1261d0 * 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 ); 109faa: 9c pushf 109fab: fa cli 109fac: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 109fad: 8d 82 e4 00 00 00 lea 0xe4(%edx),%eax POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 109fb3: 39 82 e0 00 00 00 cmp %eax,0xe0(%edx) 109fb9: 75 09 jne 109fc4 _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 109fbb: e8 f5 23 00 00 call 10c3b5 <_Thread_Enable_dispatch> _ISR_Enable( level ); 109fc0: 56 push %esi 109fc1: 9d popf return; 109fc2: eb 44 jmp 10a008 } handler = (POSIX_Cancel_Handler_control *) 109fc4: 8b 40 04 mov 0x4(%eax),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 109fc7: 8b 08 mov (%eax),%ecx previous = the_node->previous; 109fc9: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 109fcc: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 109fcf: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 109fd1: 56 push %esi 109fd2: 9d popf tmp_handler = *handler; 109fd3: 8d 7d d8 lea -0x28(%ebp),%edi 109fd6: b9 04 00 00 00 mov $0x4,%ecx 109fdb: 89 c6 mov %eax,%esi 109fdd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 109fdf: 8b 75 e0 mov -0x20(%ebp),%esi 109fe2: 8b 7d e4 mov -0x1c(%ebp),%edi _Workspace_Free( handler ); 109fe5: 83 ec 0c sub $0xc,%esp 109fe8: 50 push %eax 109fe9: e8 c3 33 00 00 call 10d3b1 <_Workspace_Free> _Thread_Enable_dispatch(); 109fee: e8 c2 23 00 00 call 10c3b5 <_Thread_Enable_dispatch> if ( execute ) 109ff3: 83 c4 10 add $0x10,%esp 109ff6: 85 db test %ebx,%ebx 109ff8: 74 0e je 10a008 <== NEVER TAKEN (*tmp_handler.routine)( tmp_handler.arg ); 109ffa: 89 7d 08 mov %edi,0x8(%ebp) 109ffd: 89 f0 mov %esi,%eax } 109fff: 8d 65 f4 lea -0xc(%ebp),%esp 10a002: 5b pop %ebx 10a003: 5e pop %esi 10a004: 5f pop %edi 10a005: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10a006: ff e0 jmp *%eax } 10a008: 8d 65 f4 lea -0xc(%ebp),%esp 10a00b: 5b pop %ebx 10a00c: 5e pop %esi 10a00d: 5f pop %edi 10a00e: c9 leave 10a00f: c3 ret =============================================================================== 0010a30c : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10a30c: 55 push %ebp 10a30d: 89 e5 mov %esp,%ebp 10a30f: 56 push %esi 10a310: 53 push %ebx 10a311: 8b 5d 08 mov 0x8(%ebp),%ebx 10a314: 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 ) 10a317: 85 db test %ebx,%ebx 10a319: 74 4b je 10a366 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a31b: a1 f8 81 12 00 mov 0x1281f8,%eax 10a320: 40 inc %eax 10a321: a3 f8 81 12 00 mov %eax,0x1281f8 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10a326: 83 ec 0c sub $0xc,%esp 10a329: 6a 10 push $0x10 10a32b: e8 28 3b 00 00 call 10de58 <_Workspace_Allocate> if ( handler ) { 10a330: 83 c4 10 add $0x10,%esp 10a333: 85 c0 test %eax,%eax 10a335: 74 24 je 10a35b <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10a337: 8b 15 b4 82 12 00 mov 0x1282b4,%edx 10a33d: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10a343: 81 c2 e0 00 00 00 add $0xe0,%edx handler->routine = routine; 10a349: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10a34c: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10a34f: 51 push %ecx 10a350: 51 push %ecx 10a351: 50 push %eax 10a352: 52 push %edx 10a353: e8 bc 15 00 00 call 10b914 <_Chain_Append> 10a358: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10a35b: 8d 65 f8 lea -0x8(%ebp),%esp 10a35e: 5b pop %ebx 10a35f: 5e pop %esi 10a360: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10a361: e9 8b 2a 00 00 jmp 10cdf1 <_Thread_Enable_dispatch> } 10a366: 8d 65 f8 lea -0x8(%ebp),%esp 10a369: 5b pop %ebx 10a36a: 5e pop %esi 10a36b: c9 leave 10a36c: c3 ret =============================================================================== 0010afcc : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10afcc: 55 push %ebp 10afcd: 89 e5 mov %esp,%ebp 10afcf: 53 push %ebx 10afd0: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10afd3: 8d 45 f4 lea -0xc(%ebp),%eax 10afd6: 50 push %eax 10afd7: ff 75 08 pushl 0x8(%ebp) 10afda: e8 59 00 00 00 call 10b038 <_POSIX_Condition_variables_Get> 10afdf: 89 c3 mov %eax,%ebx switch ( location ) { 10afe1: 83 c4 10 add $0x10,%esp 10afe4: b8 16 00 00 00 mov $0x16,%eax 10afe9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10afed: 75 43 jne 10b032 <== NEVER TAKEN case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10afef: 83 ec 0c sub $0xc,%esp 10aff2: 8d 43 18 lea 0x18(%ebx),%eax 10aff5: 50 push %eax 10aff6: e8 95 36 00 00 call 10e690 <_Thread_queue_First> 10affb: 83 c4 10 add $0x10,%esp 10affe: 85 c0 test %eax,%eax 10b000: 74 0c je 10b00e _Thread_Enable_dispatch(); 10b002: e8 ee 2f 00 00 call 10dff5 <_Thread_Enable_dispatch> 10b007: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10b00c: eb 24 jmp 10b032 } _Objects_Close( 10b00e: 51 push %ecx 10b00f: 51 push %ecx 10b010: 53 push %ebx 10b011: 68 88 86 12 00 push $0x128688 10b016: e8 41 24 00 00 call 10d45c <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10b01b: 58 pop %eax 10b01c: 5a pop %edx 10b01d: 53 push %ebx 10b01e: 68 88 86 12 00 push $0x128688 10b023: e8 b4 26 00 00 call 10d6dc <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10b028: e8 c8 2f 00 00 call 10dff5 <_Thread_Enable_dispatch> 10b02d: 31 c0 xor %eax,%eax return 0; 10b02f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b032: 8b 5d fc mov -0x4(%ebp),%ebx 10b035: c9 leave 10b036: c3 ret =============================================================================== 0010b080 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10b080: 55 push %ebp 10b081: 89 e5 mov %esp,%ebp 10b083: 56 push %esi 10b084: 53 push %ebx 10b085: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10b088: bb cc 27 12 00 mov $0x1227cc,%ebx 10b08d: 85 c0 test %eax,%eax 10b08f: 74 02 je 10b093 10b091: 89 c3 mov %eax,%ebx /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10b093: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10b097: 74 78 je 10b111 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10b099: 83 3b 00 cmpl $0x0,(%ebx) 10b09c: 74 73 je 10b111 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b09e: a1 08 82 12 00 mov 0x128208,%eax 10b0a3: 40 inc %eax 10b0a4: a3 08 82 12 00 mov %eax,0x128208 */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10b0a9: 83 ec 0c sub $0xc,%esp 10b0ac: 68 88 86 12 00 push $0x128688 10b0b1: e8 3a 23 00 00 call 10d3f0 <_Objects_Allocate> 10b0b6: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10b0b8: 83 c4 10 add $0x10,%esp 10b0bb: 85 c0 test %eax,%eax 10b0bd: 75 0c jne 10b0cb _Thread_Enable_dispatch(); 10b0bf: e8 31 2f 00 00 call 10dff5 <_Thread_Enable_dispatch> 10b0c4: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10b0c9: eb 4b jmp 10b116 } the_cond->process_shared = the_attr->process_shared; 10b0cb: 8b 43 04 mov 0x4(%ebx),%eax 10b0ce: 89 46 10 mov %eax,0x10(%esi) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10b0d1: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10b0d8: 6a 74 push $0x74 10b0da: 68 00 08 00 00 push $0x800 10b0df: 6a 00 push $0x0 10b0e1: 8d 46 18 lea 0x18(%esi),%eax 10b0e4: 50 push %eax 10b0e5: e8 16 36 00 00 call 10e700 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b0ea: 8b 46 08 mov 0x8(%esi),%eax 10b0ed: 0f b7 c8 movzwl %ax,%ecx 10b0f0: 8b 15 a4 86 12 00 mov 0x1286a4,%edx 10b0f6: 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; 10b0f9: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10b100: 8b 55 08 mov 0x8(%ebp),%edx 10b103: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b105: e8 eb 2e 00 00 call 10dff5 <_Thread_Enable_dispatch> 10b10a: 31 c0 xor %eax,%eax return 0; 10b10c: 83 c4 10 add $0x10,%esp 10b10f: eb 05 jmp 10b116 10b111: b8 16 00 00 00 mov $0x16,%eax } 10b116: 8d 65 f8 lea -0x8(%ebp),%esp 10b119: 5b pop %ebx 10b11a: 5e pop %esi 10b11b: c9 leave 10b11c: c3 ret =============================================================================== 0010af34 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10af34: 55 push %ebp 10af35: 89 e5 mov %esp,%ebp 10af37: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10af3a: 85 c0 test %eax,%eax 10af3c: 74 0f je 10af4d 10af3e: 83 38 00 cmpl $0x0,(%eax) 10af41: 74 0a je 10af4d <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10af43: c7 00 00 00 00 00 movl $0x0,(%eax) 10af49: 31 c0 xor %eax,%eax return 0; 10af4b: eb 05 jmp 10af52 10af4d: b8 16 00 00 00 mov $0x16,%eax } 10af52: c9 leave 10af53: c3 ret =============================================================================== 0010a65c : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10a65c: 55 push %ebp 10a65d: 89 e5 mov %esp,%ebp 10a65f: 57 push %edi 10a660: 56 push %esi 10a661: 53 push %ebx 10a662: 83 ec 4c sub $0x4c,%esp 10a665: 8b 45 0c mov 0xc(%ebp),%eax int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10a668: c7 45 b0 0e 00 00 00 movl $0xe,-0x50(%ebp) 10a66f: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a673: 0f 84 08 02 00 00 je 10a881 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10a679: bb 24 13 12 00 mov $0x121324,%ebx 10a67e: 85 c0 test %eax,%eax 10a680: 74 02 je 10a684 10a682: 89 c3 mov %eax,%ebx if ( !the_attr->is_initialized ) 10a684: 83 3b 00 cmpl $0x0,(%ebx) 10a687: 0f 84 ed 01 00 00 je 10a87a * 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) ) 10a68d: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a691: 74 0f je 10a6a2 10a693: 8b 43 08 mov 0x8(%ebx),%eax 10a696: 3b 05 14 32 12 00 cmp 0x123214,%eax 10a69c: 0f 82 d8 01 00 00 jb 10a87a * 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 ) { 10a6a2: 8b 43 10 mov 0x10(%ebx),%eax 10a6a5: 83 f8 01 cmp $0x1,%eax 10a6a8: 74 0b je 10a6b5 10a6aa: 83 f8 02 cmp $0x2,%eax 10a6ad: 0f 85 c7 01 00 00 jne 10a87a 10a6b3: eb 1f jmp 10a6d4 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a6b5: a1 b4 72 12 00 mov 0x1272b4,%eax 10a6ba: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10a6c0: 8b 86 80 00 00 00 mov 0x80(%esi),%eax 10a6c6: 89 45 ac mov %eax,-0x54(%ebp) schedparam = api->schedparam; 10a6c9: 8d 7d c4 lea -0x3c(%ebp),%edi 10a6cc: 81 c6 84 00 00 00 add $0x84,%esi 10a6d2: eb 0c jmp 10a6e0 break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10a6d4: 8b 53 14 mov 0x14(%ebx),%edx 10a6d7: 89 55 ac mov %edx,-0x54(%ebp) schedparam = the_attr->schedparam; 10a6da: 8d 7d c4 lea -0x3c(%ebp),%edi 10a6dd: 8d 73 18 lea 0x18(%ebx),%esi 10a6e0: b9 07 00 00 00 mov $0x7,%ecx 10a6e5: 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 ) 10a6e7: c7 45 b0 86 00 00 00 movl $0x86,-0x50(%ebp) 10a6ee: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10a6f2: 0f 85 89 01 00 00 jne 10a881 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10a6f8: 83 ec 0c sub $0xc,%esp 10a6fb: ff 75 c4 pushl -0x3c(%ebp) 10a6fe: e8 8d 60 00 00 call 110790 <_POSIX_Priority_Is_valid> 10a703: 83 c4 10 add $0x10,%esp 10a706: 84 c0 test %al,%al 10a708: 0f 84 6c 01 00 00 je 10a87a <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10a70e: 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); 10a711: 0f b6 35 18 32 12 00 movzbl 0x123218,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10a718: 8d 45 e0 lea -0x20(%ebp),%eax 10a71b: 50 push %eax 10a71c: 8d 45 e4 lea -0x1c(%ebp),%eax 10a71f: 50 push %eax 10a720: 8d 45 c4 lea -0x3c(%ebp),%eax 10a723: 50 push %eax 10a724: ff 75 ac pushl -0x54(%ebp) 10a727: e8 84 60 00 00 call 1107b0 <_POSIX_Thread_Translate_sched_param> 10a72c: 89 45 b0 mov %eax,-0x50(%ebp) schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10a72f: 83 c4 10 add $0x10,%esp 10a732: 85 c0 test %eax,%eax 10a734: 0f 85 47 01 00 00 jne 10a881 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a73a: 83 ec 0c sub $0xc,%esp 10a73d: ff 35 ac 72 12 00 pushl 0x1272ac 10a743: e8 b4 15 00 00 call 10bcfc <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10a748: c7 04 24 60 74 12 00 movl $0x127460,(%esp) 10a74f: e8 f8 1e 00 00 call 10c64c <_Objects_Allocate> 10a754: 89 c2 mov %eax,%edx * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10a756: 83 c4 10 add $0x10,%esp 10a759: 85 c0 test %eax,%eax 10a75b: 75 05 jne 10a762 _RTEMS_Unlock_allocator(); 10a75d: 83 ec 0c sub $0xc,%esp 10a760: eb 53 jmp 10a7b5 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10a762: 8b 43 08 mov 0x8(%ebx),%eax 10a765: 51 push %ecx 10a766: 6a 00 push $0x0 10a768: 6a 00 push $0x0 10a76a: ff 75 e0 pushl -0x20(%ebp) 10a76d: ff 75 e4 pushl -0x1c(%ebp) 10a770: 6a 01 push $0x1 10a772: 81 e6 ff 00 00 00 and $0xff,%esi 10a778: 29 fe sub %edi,%esi 10a77a: 56 push %esi 10a77b: 6a 01 push $0x1 10a77d: 8b 0d 14 32 12 00 mov 0x123214,%ecx 10a783: d1 e1 shl %ecx 10a785: 39 c1 cmp %eax,%ecx 10a787: 73 02 jae 10a78b 10a789: 89 c1 mov %eax,%ecx 10a78b: 51 push %ecx 10a78c: ff 73 04 pushl 0x4(%ebx) 10a78f: 52 push %edx 10a790: 68 60 74 12 00 push $0x127460 10a795: 89 55 a8 mov %edx,-0x58(%ebp) 10a798: e8 77 2b 00 00 call 10d314 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10a79d: 83 c4 30 add $0x30,%esp 10a7a0: 84 c0 test %al,%al 10a7a2: 8b 55 a8 mov -0x58(%ebp),%edx 10a7a5: 75 25 jne 10a7cc RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10a7a7: 53 push %ebx 10a7a8: 53 push %ebx 10a7a9: 52 push %edx 10a7aa: 68 60 74 12 00 push $0x127460 10a7af: e8 84 21 00 00 call 10c938 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a7b4: 59 pop %ecx 10a7b5: ff 35 ac 72 12 00 pushl 0x1272ac 10a7bb: e8 84 15 00 00 call 10bd44 <_API_Mutex_Unlock> 10a7c0: c7 45 b0 0b 00 00 00 movl $0xb,-0x50(%ebp) 10a7c7: e9 a9 00 00 00 jmp 10a875 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10a7cc: 8b 8a f8 00 00 00 mov 0xf8(%edx),%ecx 10a7d2: 89 4d b4 mov %ecx,-0x4c(%ebp) api->Attributes = *the_attr; 10a7d5: b9 0f 00 00 00 mov $0xf,%ecx 10a7da: 8b 7d b4 mov -0x4c(%ebp),%edi 10a7dd: 89 de mov %ebx,%esi 10a7df: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10a7e1: 8b 43 38 mov 0x38(%ebx),%eax 10a7e4: 8b 4d b4 mov -0x4c(%ebp),%ecx 10a7e7: 89 41 3c mov %eax,0x3c(%ecx) api->schedpolicy = schedpolicy; 10a7ea: 8b 45 ac mov -0x54(%ebp),%eax 10a7ed: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = schedparam; 10a7f3: 89 cf mov %ecx,%edi 10a7f5: 81 c7 84 00 00 00 add $0x84,%edi 10a7fb: 8d 75 c4 lea -0x3c(%ebp),%esi 10a7fe: b9 07 00 00 00 mov $0x7,%ecx 10a803: 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; 10a805: c6 42 74 01 movb $0x1,0x74(%edx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10a809: 83 ec 0c sub $0xc,%esp 10a80c: 6a 00 push $0x0 10a80e: ff 75 14 pushl 0x14(%ebp) 10a811: ff 75 10 pushl 0x10(%ebp) 10a814: 6a 01 push $0x1 10a816: 52 push %edx 10a817: 89 55 a8 mov %edx,-0x58(%ebp) 10a81a: e8 7d 34 00 00 call 10dc9c <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10a81f: 83 c4 20 add $0x20,%esp 10a822: 83 7d ac 04 cmpl $0x4,-0x54(%ebp) 10a826: 8b 55 a8 mov -0x58(%ebp),%edx 10a829: 75 34 jne 10a85f _Watchdog_Insert_ticks( 10a82b: 83 ec 0c sub $0xc,%esp 10a82e: 8b 45 b4 mov -0x4c(%ebp),%eax 10a831: 05 8c 00 00 00 add $0x8c,%eax 10a836: 50 push %eax 10a837: e8 0c 36 00 00 call 10de48 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a83c: 8b 4d b4 mov -0x4c(%ebp),%ecx 10a83f: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a845: 58 pop %eax 10a846: 5a pop %edx 10a847: 89 c8 mov %ecx,%eax 10a849: 05 a4 00 00 00 add $0xa4,%eax 10a84e: 50 push %eax 10a84f: 68 d4 72 12 00 push $0x1272d4 10a854: e8 a3 38 00 00 call 10e0fc <_Watchdog_Insert> 10a859: 83 c4 10 add $0x10,%esp 10a85c: 8b 55 a8 mov -0x58(%ebp),%edx } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10a85f: 8b 52 08 mov 0x8(%edx),%edx 10a862: 8b 45 08 mov 0x8(%ebp),%eax 10a865: 89 10 mov %edx,(%eax) _RTEMS_Unlock_allocator(); 10a867: 83 ec 0c sub $0xc,%esp 10a86a: ff 35 ac 72 12 00 pushl 0x1272ac 10a870: e8 cf 14 00 00 call 10bd44 <_API_Mutex_Unlock> return 0; 10a875: 83 c4 10 add $0x10,%esp 10a878: eb 07 jmp 10a881 10a87a: c7 45 b0 16 00 00 00 movl $0x16,-0x50(%ebp) } 10a881: 8b 45 b0 mov -0x50(%ebp),%eax 10a884: 8d 65 f4 lea -0xc(%ebp),%esp 10a887: 5b pop %ebx 10a888: 5e pop %esi 10a889: 5f pop %edi 10a88a: c9 leave 10a88b: c3 ret =============================================================================== 001124d4 : } void pthread_exit( void *value_ptr ) { 1124d4: 55 push %ebp 1124d5: 89 e5 mov %esp,%ebp 1124d7: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 1124da: ff 75 08 pushl 0x8(%ebp) 1124dd: ff 35 c4 62 12 00 pushl 0x1262c4 1124e3: e8 14 ff ff ff call 1123fc <_POSIX_Thread_Exit> 1124e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1124eb: c9 leave <== NOT EXECUTED 1124ec: c3 ret <== NOT EXECUTED =============================================================================== 001124f0 : int pthread_kill( pthread_t thread, int sig ) { 1124f0: 55 push %ebp 1124f1: 89 e5 mov %esp,%ebp 1124f3: 57 push %edi 1124f4: 56 push %esi 1124f5: 53 push %ebx 1124f6: 83 ec 1c sub $0x1c,%esp 1124f9: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1124fc: 85 f6 test %esi,%esi 1124fe: 74 08 je 112508 <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 112500: 8d 7e ff lea -0x1(%esi),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 112503: 83 ff 1f cmp $0x1f,%edi 112506: 76 0d jbe 112515 rtems_set_errno_and_return_minus_one( EINVAL ); 112508: e8 07 05 00 00 call 112a14 <__errno> 11250d: c7 00 16 00 00 00 movl $0x16,(%eax) 112513: eb 77 jmp 11258c the_thread = _Thread_Get( thread, &location ); 112515: 52 push %edx 112516: 52 push %edx 112517: 8d 45 e4 lea -0x1c(%ebp),%eax 11251a: 50 push %eax 11251b: ff 75 08 pushl 0x8(%ebp) 11251e: e8 11 9e ff ff call 10c334 <_Thread_Get> 112523: 89 c3 mov %eax,%ebx switch ( location ) { 112525: 83 c4 10 add $0x10,%esp 112528: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 11252c: 75 53 jne 112581 <== NEVER TAKEN case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11252e: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 112534: 6b c6 0c imul $0xc,%esi,%eax 112537: 83 b8 70 67 12 00 01 cmpl $0x1,0x126770(%eax) 11253e: 74 38 je 112578 <== NEVER TAKEN return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 112540: b8 01 00 00 00 mov $0x1,%eax 112545: 89 f9 mov %edi,%ecx 112547: d3 e0 shl %cl,%eax 112549: 09 82 d0 00 00 00 or %eax,0xd0(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 11254f: 50 push %eax 112550: 6a 00 push $0x0 112552: 56 push %esi 112553: 53 push %ebx 112554: e8 a3 fd ff ff call 1122fc <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 112559: c6 43 74 01 movb $0x1,0x74(%ebx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11255d: a1 a0 62 12 00 mov 0x1262a0,%eax 112562: 83 c4 10 add $0x10,%esp 112565: 85 c0 test %eax,%eax 112567: 74 0f je 112578 112569: 3b 1d c4 62 12 00 cmp 0x1262c4,%ebx 11256f: 75 07 jne 112578 _ISR_Signals_to_thread_executing = true; 112571: c6 05 58 63 12 00 01 movb $0x1,0x126358 } _Thread_Enable_dispatch(); 112578: e8 94 9d ff ff call 10c311 <_Thread_Enable_dispatch> 11257d: 31 c0 xor %eax,%eax return 0; 11257f: eb 0e jmp 11258f #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 112581: e8 8e 04 00 00 call 112a14 <__errno> <== NOT EXECUTED 112586: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 11258c: 83 c8 ff or $0xffffffff,%eax } 11258f: 8d 65 f4 lea -0xc(%ebp),%esp 112592: 5b pop %ebx 112593: 5e pop %esi 112594: 5f pop %edi 112595: c9 leave 112596: c3 ret =============================================================================== 0010a1b8 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 10a1b8: 55 push %ebp 10a1b9: 89 e5 mov %esp,%ebp 10a1bb: 8b 45 08 mov 0x8(%ebp),%eax 10a1be: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10a1c1: 85 c0 test %eax,%eax 10a1c3: 74 12 je 10a1d7 return EINVAL; if ( !attr->is_initialized ) 10a1c5: 83 38 00 cmpl $0x0,(%eax) 10a1c8: 74 0d je 10a1d7 return EINVAL; if ( !type ) 10a1ca: 85 d2 test %edx,%edx 10a1cc: 74 09 je 10a1d7 <== NEVER TAKEN return EINVAL; *type = attr->type; 10a1ce: 8b 40 10 mov 0x10(%eax),%eax 10a1d1: 89 02 mov %eax,(%edx) 10a1d3: 31 c0 xor %eax,%eax return 0; 10a1d5: eb 05 jmp 10a1dc 10a1d7: b8 16 00 00 00 mov $0x16,%eax } 10a1dc: c9 leave 10a1dd: c3 ret =============================================================================== 0010bfdc : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10bfdc: 55 push %ebp 10bfdd: 89 e5 mov %esp,%ebp 10bfdf: 8b 45 08 mov 0x8(%ebp),%eax 10bfe2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10bfe5: 85 c0 test %eax,%eax 10bfe7: 74 11 je 10bffa 10bfe9: 83 38 00 cmpl $0x0,(%eax) 10bfec: 74 0c je 10bffa return EINVAL; switch ( pshared ) { 10bfee: 83 fa 01 cmp $0x1,%edx 10bff1: 77 07 ja 10bffa <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10bff3: 89 50 04 mov %edx,0x4(%eax) 10bff6: 31 c0 xor %eax,%eax return 0; 10bff8: eb 05 jmp 10bfff 10bffa: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bfff: c9 leave 10c000: c3 ret =============================================================================== 0010a208 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10a208: 55 push %ebp 10a209: 89 e5 mov %esp,%ebp 10a20b: 8b 45 08 mov 0x8(%ebp),%eax 10a20e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10a211: 85 c0 test %eax,%eax 10a213: 74 11 je 10a226 10a215: 83 38 00 cmpl $0x0,(%eax) 10a218: 74 0c je 10a226 <== NEVER TAKEN return EINVAL; switch ( type ) { 10a21a: 83 fa 03 cmp $0x3,%edx 10a21d: 77 07 ja 10a226 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 10a21f: 89 50 10 mov %edx,0x10(%eax) 10a222: 31 c0 xor %eax,%eax return 0; 10a224: eb 05 jmp 10a22b 10a226: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a22b: c9 leave 10a22c: c3 ret =============================================================================== 0010ad18 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10ad18: 55 push %ebp 10ad19: 89 e5 mov %esp,%ebp 10ad1b: 56 push %esi 10ad1c: 53 push %ebx 10ad1d: 83 ec 10 sub $0x10,%esp 10ad20: 8b 5d 08 mov 0x8(%ebp),%ebx 10ad23: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10ad26: 85 f6 test %esi,%esi 10ad28: 74 04 je 10ad2e 10ad2a: 85 db test %ebx,%ebx 10ad2c: 75 07 jne 10ad35 10ad2e: b8 16 00 00 00 mov $0x16,%eax 10ad33: eb 4b jmp 10ad80 return EINVAL; if ( !once_control->init_executed ) { 10ad35: 31 c0 xor %eax,%eax 10ad37: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10ad3b: 75 43 jne 10ad80 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10ad3d: 52 push %edx 10ad3e: 8d 45 f4 lea -0xc(%ebp),%eax 10ad41: 50 push %eax 10ad42: 68 00 01 00 00 push $0x100 10ad47: 68 00 01 00 00 push $0x100 10ad4c: e8 8f 0a 00 00 call 10b7e0 if ( !once_control->init_executed ) { 10ad51: 83 c4 10 add $0x10,%esp 10ad54: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10ad58: 75 0f jne 10ad69 <== NEVER TAKEN once_control->is_initialized = true; 10ad5a: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10ad60: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10ad67: ff d6 call *%esi } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10ad69: 50 push %eax 10ad6a: 8d 45 f4 lea -0xc(%ebp),%eax 10ad6d: 50 push %eax 10ad6e: 68 00 01 00 00 push $0x100 10ad73: ff 75 f4 pushl -0xc(%ebp) 10ad76: e8 65 0a 00 00 call 10b7e0 10ad7b: 31 c0 xor %eax,%eax 10ad7d: 83 c4 10 add $0x10,%esp } return 0; } 10ad80: 8d 65 f8 lea -0x8(%ebp),%esp 10ad83: 5b pop %ebx 10ad84: 5e pop %esi 10ad85: c9 leave 10ad86: c3 ret =============================================================================== 0010b290 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10b290: 55 push %ebp 10b291: 89 e5 mov %esp,%ebp 10b293: 56 push %esi 10b294: 53 push %ebx 10b295: 83 ec 10 sub $0x10,%esp 10b298: 8b 5d 08 mov 0x8(%ebp),%ebx const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10b29b: 85 db test %ebx,%ebx 10b29d: 0f 84 81 00 00 00 je 10b324 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b2a3: 8b 75 0c mov 0xc(%ebp),%esi 10b2a6: 85 f6 test %esi,%esi 10b2a8: 75 0f jne 10b2b9 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10b2aa: 83 ec 0c sub $0xc,%esp 10b2ad: 8d 75 ec lea -0x14(%ebp),%esi 10b2b0: 56 push %esi 10b2b1: e8 86 09 00 00 call 10bc3c 10b2b6: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b2b9: 83 3e 00 cmpl $0x0,(%esi) 10b2bc: 74 66 je 10b324 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10b2be: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10b2c2: 75 60 jne 10b324 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b2c4: a1 20 92 12 00 mov 0x129220,%eax 10b2c9: 40 inc %eax 10b2ca: a3 20 92 12 00 mov %eax,0x129220 * 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 *) 10b2cf: 83 ec 0c sub $0xc,%esp 10b2d2: 68 48 94 12 00 push $0x129448 10b2d7: e8 40 23 00 00 call 10d61c <_Objects_Allocate> 10b2dc: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10b2de: 83 c4 10 add $0x10,%esp 10b2e1: 85 c0 test %eax,%eax 10b2e3: 75 0c jne 10b2f1 _Thread_Enable_dispatch(); 10b2e5: e8 37 2f 00 00 call 10e221 <_Thread_Enable_dispatch> 10b2ea: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10b2ef: eb 38 jmp 10b329 } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10b2f1: 50 push %eax 10b2f2: 50 push %eax 10b2f3: 8d 45 f4 lea -0xc(%ebp),%eax 10b2f6: 50 push %eax 10b2f7: 8d 46 10 lea 0x10(%esi),%eax 10b2fa: 50 push %eax 10b2fb: e8 a8 1b 00 00 call 10cea8 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b300: 8b 46 08 mov 0x8(%esi),%eax 10b303: 0f b7 c8 movzwl %ax,%ecx 10b306: 8b 15 64 94 12 00 mov 0x129464,%edx 10b30c: 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; 10b30f: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10b316: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10b318: e8 04 2f 00 00 call 10e221 <_Thread_Enable_dispatch> 10b31d: 31 c0 xor %eax,%eax return 0; 10b31f: 83 c4 10 add $0x10,%esp 10b322: eb 05 jmp 10b329 10b324: b8 16 00 00 00 mov $0x16,%eax } 10b329: 8d 65 f8 lea -0x8(%ebp),%esp 10b32c: 5b pop %ebx 10b32d: 5e pop %esi 10b32e: c9 leave 10b32f: c3 ret =============================================================================== 0010b394 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10b394: 55 push %ebp 10b395: 89 e5 mov %esp,%ebp 10b397: 56 push %esi 10b398: 53 push %ebx 10b399: 83 ec 20 sub $0x20,%esp 10b39c: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10b39f: 85 f6 test %esi,%esi 10b3a1: 0f 84 89 00 00 00 je 10b430 * * 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 ); 10b3a7: 50 push %eax 10b3a8: 50 push %eax 10b3a9: 8d 45 f0 lea -0x10(%ebp),%eax 10b3ac: 50 push %eax 10b3ad: ff 75 0c pushl 0xc(%ebp) 10b3b0: e8 df 62 00 00 call 111694 <_POSIX_Absolute_timeout_to_ticks> 10b3b5: 89 c3 mov %eax,%ebx 10b3b7: 83 c4 0c add $0xc,%esp 10b3ba: 8d 45 f4 lea -0xc(%ebp),%eax 10b3bd: 50 push %eax 10b3be: ff 36 pushl (%esi) 10b3c0: 68 48 94 12 00 push $0x129448 10b3c5: e8 66 26 00 00 call 10da30 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10b3ca: 83 c4 10 add $0x10,%esp 10b3cd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b3d1: 75 5d jne 10b430 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, 10b3d3: 83 fb 03 cmp $0x3,%ebx 10b3d6: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10b3d9: 83 ec 0c sub $0xc,%esp 10b3dc: 6a 00 push $0x0 10b3de: ff 75 f0 pushl -0x10(%ebp) 10b3e1: 0f b6 ca movzbl %dl,%ecx 10b3e4: 51 push %ecx 10b3e5: ff 36 pushl (%esi) 10b3e7: 83 c0 10 add $0x10,%eax 10b3ea: 50 push %eax 10b3eb: 88 55 e4 mov %dl,-0x1c(%ebp) 10b3ee: e8 e9 1a 00 00 call 10cedc <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10b3f3: 83 c4 20 add $0x20,%esp 10b3f6: e8 26 2e 00 00 call 10e221 <_Thread_Enable_dispatch> if ( !do_wait ) { 10b3fb: 8a 55 e4 mov -0x1c(%ebp),%dl 10b3fe: 84 d2 test %dl,%dl 10b400: 75 19 jne 10b41b if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10b402: a1 dc 92 12 00 mov 0x1292dc,%eax 10b407: 83 78 34 02 cmpl $0x2,0x34(%eax) 10b40b: 75 0e jne 10b41b switch (status) { 10b40d: 85 db test %ebx,%ebx 10b40f: 74 1f je 10b430 <== NEVER TAKEN 10b411: b8 74 00 00 00 mov $0x74,%eax 10b416: 83 fb 02 cmp $0x2,%ebx 10b419: 76 1a jbe 10b435 <== ALWAYS TAKEN break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10b41b: 83 ec 0c sub $0xc,%esp 10b41e: a1 dc 92 12 00 mov 0x1292dc,%eax 10b423: ff 70 34 pushl 0x34(%eax) 10b426: e8 b9 00 00 00 call 10b4e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10b42b: 83 c4 10 add $0x10,%esp 10b42e: eb 05 jmp 10b435 10b430: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b435: 8d 65 f8 lea -0x8(%ebp),%esp 10b438: 5b pop %ebx 10b439: 5e pop %esi 10b43a: c9 leave 10b43b: c3 ret =============================================================================== 0010b43c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10b43c: 55 push %ebp 10b43d: 89 e5 mov %esp,%ebp 10b43f: 56 push %esi 10b440: 53 push %ebx 10b441: 83 ec 20 sub $0x20,%esp 10b444: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10b447: 85 f6 test %esi,%esi 10b449: 0f 84 89 00 00 00 je 10b4d8 * * 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 ); 10b44f: 50 push %eax 10b450: 50 push %eax 10b451: 8d 45 f0 lea -0x10(%ebp),%eax 10b454: 50 push %eax 10b455: ff 75 0c pushl 0xc(%ebp) 10b458: e8 37 62 00 00 call 111694 <_POSIX_Absolute_timeout_to_ticks> 10b45d: 89 c3 mov %eax,%ebx 10b45f: 83 c4 0c add $0xc,%esp 10b462: 8d 45 f4 lea -0xc(%ebp),%eax 10b465: 50 push %eax 10b466: ff 36 pushl (%esi) 10b468: 68 48 94 12 00 push $0x129448 10b46d: e8 be 25 00 00 call 10da30 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10b472: 83 c4 10 add $0x10,%esp 10b475: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b479: 75 5d jne 10b4d8 (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, 10b47b: 83 fb 03 cmp $0x3,%ebx 10b47e: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10b481: 83 ec 0c sub $0xc,%esp 10b484: 6a 00 push $0x0 10b486: ff 75 f0 pushl -0x10(%ebp) 10b489: 0f b6 ca movzbl %dl,%ecx 10b48c: 51 push %ecx 10b48d: ff 36 pushl (%esi) 10b48f: 83 c0 10 add $0x10,%eax 10b492: 50 push %eax 10b493: 88 55 e4 mov %dl,-0x1c(%ebp) 10b496: e8 f1 1a 00 00 call 10cf8c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10b49b: 83 c4 20 add $0x20,%esp 10b49e: e8 7e 2d 00 00 call 10e221 <_Thread_Enable_dispatch> if ( !do_wait && 10b4a3: 8a 55 e4 mov -0x1c(%ebp),%dl 10b4a6: 84 d2 test %dl,%dl 10b4a8: 75 19 jne 10b4c3 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10b4aa: a1 dc 92 12 00 mov 0x1292dc,%eax 10b4af: 83 78 34 02 cmpl $0x2,0x34(%eax) 10b4b3: 75 0e jne 10b4c3 switch (status) { 10b4b5: 85 db test %ebx,%ebx 10b4b7: 74 1f je 10b4d8 <== NEVER TAKEN 10b4b9: b8 74 00 00 00 mov $0x74,%eax 10b4be: 83 fb 02 cmp $0x2,%ebx 10b4c1: 76 1a jbe 10b4dd <== ALWAYS TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10b4c3: 83 ec 0c sub $0xc,%esp 10b4c6: a1 dc 92 12 00 mov 0x1292dc,%eax 10b4cb: ff 70 34 pushl 0x34(%eax) 10b4ce: e8 11 00 00 00 call 10b4e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10b4d3: 83 c4 10 add $0x10,%esp 10b4d6: eb 05 jmp 10b4dd 10b4d8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b4dd: 8d 65 f8 lea -0x8(%ebp),%esp 10b4e0: 5b pop %ebx 10b4e1: 5e pop %esi 10b4e2: c9 leave 10b4e3: c3 ret =============================================================================== 0010bc5c : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10bc5c: 55 push %ebp 10bc5d: 89 e5 mov %esp,%ebp 10bc5f: 8b 45 08 mov 0x8(%ebp),%eax 10bc62: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10bc65: 85 c0 test %eax,%eax 10bc67: 74 11 je 10bc7a return EINVAL; if ( !attr->is_initialized ) 10bc69: 83 38 00 cmpl $0x0,(%eax) 10bc6c: 74 0c je 10bc7a return EINVAL; switch ( pshared ) { 10bc6e: 83 fa 01 cmp $0x1,%edx 10bc71: 77 07 ja 10bc7a <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10bc73: 89 50 04 mov %edx,0x4(%eax) 10bc76: 31 c0 xor %eax,%eax return 0; 10bc78: eb 05 jmp 10bc7f 10bc7a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bc7f: c9 leave 10bc80: c3 ret =============================================================================== 0010cbc4 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10cbc4: 55 push %ebp 10cbc5: 89 e5 mov %esp,%ebp 10cbc7: 57 push %edi 10cbc8: 56 push %esi 10cbc9: 53 push %ebx 10cbca: 83 ec 2c sub $0x2c,%esp 10cbcd: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10cbd0: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp) 10cbd7: 85 f6 test %esi,%esi 10cbd9: 0f 84 fb 00 00 00 je 10ccda return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10cbdf: 8d 45 e0 lea -0x20(%ebp),%eax 10cbe2: 50 push %eax 10cbe3: 8d 45 e4 lea -0x1c(%ebp),%eax 10cbe6: 50 push %eax 10cbe7: 56 push %esi 10cbe8: ff 75 0c pushl 0xc(%ebp) 10cbeb: e8 04 5a 00 00 call 1125f4 <_POSIX_Thread_Translate_sched_param> 10cbf0: 89 45 d4 mov %eax,-0x2c(%ebp) policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10cbf3: 83 c4 10 add $0x10,%esp 10cbf6: 85 c0 test %eax,%eax 10cbf8: 0f 85 dc 00 00 00 jne 10ccda return rc; /* * Actually change the scheduling policy and parameters */ the_thread = _Thread_Get( thread, &location ); 10cbfe: 53 push %ebx 10cbff: 53 push %ebx 10cc00: 8d 45 dc lea -0x24(%ebp),%eax 10cc03: 50 push %eax 10cc04: ff 75 08 pushl 0x8(%ebp) 10cc07: e8 58 24 00 00 call 10f064 <_Thread_Get> 10cc0c: 89 c2 mov %eax,%edx switch ( location ) { 10cc0e: 83 c4 10 add $0x10,%esp 10cc11: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10cc15: 74 0c je 10cc23 10cc17: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp) 10cc1e: e9 b7 00 00 00 jmp 10ccda case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10cc23: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx if ( api->schedpolicy == SCHED_SPORADIC ) 10cc29: 83 bb 80 00 00 00 04 cmpl $0x4,0x80(%ebx) 10cc30: 75 18 jne 10cc4a (void) _Watchdog_Remove( &api->Sporadic_timer ); 10cc32: 83 ec 0c sub $0xc,%esp 10cc35: 8d 83 a4 00 00 00 lea 0xa4(%ebx),%eax 10cc3b: 50 push %eax 10cc3c: 89 55 d0 mov %edx,-0x30(%ebp) 10cc3f: e8 1c 34 00 00 call 110060 <_Watchdog_Remove> 10cc44: 83 c4 10 add $0x10,%esp 10cc47: 8b 55 d0 mov -0x30(%ebp),%edx api->schedpolicy = policy; 10cc4a: 8b 45 0c mov 0xc(%ebp),%eax 10cc4d: 89 83 80 00 00 00 mov %eax,0x80(%ebx) api->schedparam = *param; 10cc53: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi 10cc59: b9 07 00 00 00 mov $0x7,%ecx 10cc5e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10cc60: 8b 45 e4 mov -0x1c(%ebp),%eax 10cc63: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10cc66: 8b 45 e0 mov -0x20(%ebp),%eax 10cc69: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10cc6f: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10cc73: 78 60 js 10ccd5 <== NEVER TAKEN 10cc75: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10cc79: 7e 08 jle 10cc83 10cc7b: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10cc7f: 75 54 jne 10ccd5 <== NEVER TAKEN 10cc81: eb 24 jmp 10cca7 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10cc83: a1 24 b2 12 00 mov 0x12b224,%eax 10cc88: 89 42 78 mov %eax,0x78(%edx) 10cc8b: 0f b6 05 18 72 12 00 movzbl 0x127218,%eax 10cc92: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax the_thread->real_priority = 10cc98: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10cc9b: 51 push %ecx 10cc9c: 6a 01 push $0x1 10cc9e: 50 push %eax 10cc9f: 52 push %edx 10cca0: e8 ff 1e 00 00 call 10eba4 <_Thread_Change_priority> 10cca5: eb 2b jmp 10ccd2 true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10cca7: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10ccad: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) _Watchdog_Remove( &api->Sporadic_timer ); 10ccb3: 83 ec 0c sub $0xc,%esp 10ccb6: 81 c3 a4 00 00 00 add $0xa4,%ebx 10ccbc: 53 push %ebx 10ccbd: 89 55 d0 mov %edx,-0x30(%ebp) 10ccc0: e8 9b 33 00 00 call 110060 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10ccc5: 58 pop %eax 10ccc6: 5a pop %edx 10ccc7: 8b 55 d0 mov -0x30(%ebp),%edx 10ccca: 52 push %edx 10cccb: 6a 00 push $0x0 10cccd: e8 61 fe ff ff call 10cb33 <_POSIX_Threads_Sporadic_budget_TSR> 10ccd2: 83 c4 10 add $0x10,%esp break; } _Thread_Enable_dispatch(); 10ccd5: e8 67 23 00 00 call 10f041 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10ccda: 8b 45 d4 mov -0x2c(%ebp),%eax 10ccdd: 8d 65 f4 lea -0xc(%ebp),%esp 10cce0: 5b pop %ebx 10cce1: 5e pop %esi 10cce2: 5f pop %edi 10cce3: c9 leave 10cce4: c3 ret =============================================================================== 0010aac8 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10aac8: 55 push %ebp 10aac9: 89 e5 mov %esp,%ebp 10aacb: 53 push %ebx 10aacc: 83 ec 04 sub $0x4,%esp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10aacf: a1 90 82 12 00 mov 0x128290,%eax 10aad4: 85 c0 test %eax,%eax 10aad6: 75 48 jne 10ab20 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10aad8: a1 b4 82 12 00 mov 0x1282b4,%eax 10aadd: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10aae3: 8b 15 f8 81 12 00 mov 0x1281f8,%edx 10aae9: 42 inc %edx 10aaea: 89 15 f8 81 12 00 mov %edx,0x1281f8 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10aaf0: 31 db xor %ebx,%ebx 10aaf2: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10aaf9: 75 0a jne 10ab05 <== NEVER TAKEN /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 10aafb: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax) 10ab02: 0f 95 c3 setne %bl thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10ab05: e8 e7 22 00 00 call 10cdf1 <_Thread_Enable_dispatch> if ( cancel ) 10ab0a: 84 db test %bl,%bl 10ab0c: 74 12 je 10ab20 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10ab0e: 50 push %eax 10ab0f: 50 push %eax 10ab10: 6a ff push $0xffffffff 10ab12: ff 35 b4 82 12 00 pushl 0x1282b4 10ab18: e8 87 59 00 00 call 1104a4 <_POSIX_Thread_Exit> 10ab1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10ab20: 8b 5d fc mov -0x4(%ebp),%ebx 10ab23: c9 leave 10ab24: c3 ret =============================================================================== 0010cb7c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10cb7c: 55 push %ebp 10cb7d: 89 e5 mov %esp,%ebp 10cb7f: 57 push %edi 10cb80: 56 push %esi 10cb81: 53 push %ebx 10cb82: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10cb85: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10cb89: 74 41 je 10cbcc <== NEVER TAKEN 10cb8b: bb 01 00 00 00 mov $0x1,%ebx return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10cb90: 8b 04 9d 40 a0 12 00 mov 0x12a040(,%ebx,4),%eax 10cb97: 85 c0 test %eax,%eax 10cb99: 74 2b je 10cbc6 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10cb9b: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10cb9e: be 01 00 00 00 mov $0x1,%esi 10cba3: 85 ff test %edi,%edi 10cba5: 75 17 jne 10cbbe 10cba7: eb 1d jmp 10cbc6 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10cba9: 8b 47 1c mov 0x1c(%edi),%eax 10cbac: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10cbaf: 85 c0 test %eax,%eax 10cbb1: 74 0a je 10cbbd <== NEVER TAKEN continue; (*routine)(the_thread); 10cbb3: 83 ec 0c sub $0xc,%esp 10cbb6: 50 push %eax 10cbb7: ff 55 08 call *0x8(%ebp) 10cbba: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10cbbd: 46 inc %esi 10cbbe: 0f b7 47 10 movzwl 0x10(%edi),%eax 10cbc2: 39 c6 cmp %eax,%esi 10cbc4: 76 e3 jbe 10cba9 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10cbc6: 43 inc %ebx 10cbc7: 83 fb 05 cmp $0x5,%ebx 10cbca: 75 c4 jne 10cb90 (*routine)(the_thread); } } } 10cbcc: 8d 65 f4 lea -0xc(%ebp),%esp 10cbcf: 5b pop %ebx 10cbd0: 5e pop %esi 10cbd1: 5f pop %edi 10cbd2: c9 leave 10cbd3: c3 ret =============================================================================== 00114edc : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114edc: 55 push %ebp 114edd: 89 e5 mov %esp,%ebp 114edf: 57 push %edi 114ee0: 56 push %esi 114ee1: 53 push %ebx 114ee2: 83 ec 1c sub $0x1c,%esp 114ee5: 8b 75 0c mov 0xc(%ebp),%esi 114ee8: 8b 55 10 mov 0x10(%ebp),%edx 114eeb: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114eee: b8 03 00 00 00 mov $0x3,%eax 114ef3: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114ef7: 0f 84 cf 00 00 00 je 114fcc return RTEMS_INVALID_NAME; if ( !starting_address ) 114efd: 85 f6 test %esi,%esi 114eff: 0f 84 bb 00 00 00 je 114fc0 return RTEMS_INVALID_ADDRESS; if ( !id ) 114f05: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 114f09: 0f 84 b1 00 00 00 je 114fc0 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114f0f: 85 ff test %edi,%edi 114f11: 0f 84 b0 00 00 00 je 114fc7 114f17: 85 d2 test %edx,%edx 114f19: 0f 84 a8 00 00 00 je 114fc7 114f1f: 39 fa cmp %edi,%edx 114f21: 0f 82 a0 00 00 00 jb 114fc7 114f27: f7 c7 03 00 00 00 test $0x3,%edi 114f2d: 0f 85 94 00 00 00 jne 114fc7 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114f33: f7 c6 03 00 00 00 test $0x3,%esi 114f39: 0f 85 81 00 00 00 jne 114fc0 114f3f: a1 dc f5 13 00 mov 0x13f5dc,%eax 114f44: 40 inc %eax 114f45: a3 dc f5 13 00 mov %eax,0x13f5dc * 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 ); 114f4a: 83 ec 0c sub $0xc,%esp 114f4d: 68 64 f4 13 00 push $0x13f464 114f52: 89 55 e4 mov %edx,-0x1c(%ebp) 114f55: e8 8a 3c 00 00 call 118be4 <_Objects_Allocate> 114f5a: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 114f5c: 83 c4 10 add $0x10,%esp 114f5f: 85 c0 test %eax,%eax 114f61: 8b 55 e4 mov -0x1c(%ebp),%edx 114f64: 75 0c jne 114f72 _Thread_Enable_dispatch(); 114f66: e8 2e 49 00 00 call 119899 <_Thread_Enable_dispatch> 114f6b: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 114f70: eb 5a jmp 114fcc _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 114f72: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 114f75: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 114f78: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 114f7b: 8b 45 18 mov 0x18(%ebp),%eax 114f7e: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 114f81: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 114f88: 57 push %edi 114f89: 89 d0 mov %edx,%eax 114f8b: 31 d2 xor %edx,%edx 114f8d: f7 f7 div %edi 114f8f: 50 push %eax 114f90: 56 push %esi 114f91: 8d 43 24 lea 0x24(%ebx),%eax 114f94: 50 push %eax 114f95: e8 8a 2a 00 00 call 117a24 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114f9a: 8b 43 08 mov 0x8(%ebx),%eax 114f9d: 0f b7 c8 movzwl %ax,%ecx 114fa0: 8b 15 80 f4 13 00 mov 0x13f480,%edx 114fa6: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114fa9: 8b 55 08 mov 0x8(%ebp),%edx 114fac: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 114faf: 8b 55 1c mov 0x1c(%ebp),%edx 114fb2: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 114fb4: e8 e0 48 00 00 call 119899 <_Thread_Enable_dispatch> 114fb9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114fbb: 83 c4 10 add $0x10,%esp 114fbe: eb 0c jmp 114fcc 114fc0: b8 09 00 00 00 mov $0x9,%eax 114fc5: eb 05 jmp 114fcc 114fc7: b8 08 00 00 00 mov $0x8,%eax } 114fcc: 8d 65 f4 lea -0xc(%ebp),%esp 114fcf: 5b pop %ebx 114fd0: 5e pop %esi 114fd1: 5f pop %edi 114fd2: c9 leave 114fd3: c3 ret =============================================================================== 00114fd4 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 114fd4: 55 push %ebp 114fd5: 89 e5 mov %esp,%ebp 114fd7: 53 push %ebx 114fd8: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 114fdb: 8d 45 f4 lea -0xc(%ebp),%eax 114fde: 50 push %eax 114fdf: ff 75 08 pushl 0x8(%ebp) 114fe2: 68 64 f4 13 00 push $0x13f464 114fe7: e8 48 40 00 00 call 119034 <_Objects_Get> 114fec: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 114fee: 83 c4 10 add $0x10,%esp 114ff1: b8 04 00 00 00 mov $0x4,%eax 114ff6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114ffa: 75 36 jne 115032 <== NEVER TAKEN case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 114ffc: 83 7b 20 00 cmpl $0x0,0x20(%ebx) 115000: 75 26 jne 115028 _Objects_Close( &_Partition_Information, &the_partition->Object ); 115002: 51 push %ecx 115003: 51 push %ecx 115004: 53 push %ebx 115005: 68 64 f4 13 00 push $0x13f464 11500a: e8 41 3c 00 00 call 118c50 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 11500f: 58 pop %eax 115010: 5a pop %edx 115011: 53 push %ebx 115012: 68 64 f4 13 00 push $0x13f464 115017: e8 b4 3e 00 00 call 118ed0 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 11501c: e8 78 48 00 00 call 119899 <_Thread_Enable_dispatch> 115021: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115023: 83 c4 10 add $0x10,%esp 115026: eb 0a jmp 115032 } _Thread_Enable_dispatch(); 115028: e8 6c 48 00 00 call 119899 <_Thread_Enable_dispatch> 11502d: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115032: 8b 5d fc mov -0x4(%ebp),%ebx 115035: c9 leave 115036: c3 ret =============================================================================== 0013b80d : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 13b80d: 55 push %ebp 13b80e: 89 e5 mov %esp,%ebp 13b810: 57 push %edi 13b811: 56 push %esi 13b812: 53 push %ebx 13b813: 83 ec 30 sub $0x30,%esp 13b816: 8b 75 08 mov 0x8(%ebp),%esi 13b819: 8b 5d 0c mov 0xc(%ebp),%ebx 13b81c: 8d 45 e4 lea -0x1c(%ebp),%eax 13b81f: 50 push %eax 13b820: 56 push %esi 13b821: 68 24 ac 16 00 push $0x16ac24 13b826: e8 dd 6e fd ff call 112708 <_Objects_Get> 13b82b: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13b82d: 83 c4 10 add $0x10,%esp 13b830: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 13b834: 0f 85 40 01 00 00 jne 13b97a case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 13b83a: 8b 40 40 mov 0x40(%eax),%eax 13b83d: 3b 05 e0 a1 16 00 cmp 0x16a1e0,%eax 13b843: 74 0f je 13b854 _Thread_Enable_dispatch(); 13b845: e8 5f 77 fd ff call 112fa9 <_Thread_Enable_dispatch> 13b84a: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 13b84f: e9 2b 01 00 00 jmp 13b97f } if ( length == RTEMS_PERIOD_STATUS ) { 13b854: 85 db test %ebx,%ebx 13b856: 75 19 jne 13b871 switch ( the_period->state ) { 13b858: 8b 47 38 mov 0x38(%edi),%eax 13b85b: 83 f8 04 cmp $0x4,%eax 13b85e: 77 07 ja 13b867 <== NEVER TAKEN 13b860: 8b 1c 85 18 ed 15 00 mov 0x15ed18(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 13b867: e8 3d 77 fd ff call 112fa9 <_Thread_Enable_dispatch> return( return_value ); 13b86c: e9 0e 01 00 00 jmp 13b97f } _ISR_Disable( level ); 13b871: 9c pushf 13b872: fa cli 13b873: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 13b876: 8b 47 38 mov 0x38(%edi),%eax 13b879: 83 f8 02 cmp $0x2,%eax 13b87c: 74 5f je 13b8dd 13b87e: 83 f8 04 cmp $0x4,%eax 13b881: 0f 84 ba 00 00 00 je 13b941 13b887: 85 c0 test %eax,%eax 13b889: 0f 85 eb 00 00 00 jne 13b97a <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13b88f: ff 75 d4 pushl -0x2c(%ebp) 13b892: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13b893: 83 ec 0c sub $0xc,%esp 13b896: 57 push %edi 13b897: e8 9c fd ff ff call 13b638 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 13b89c: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 13b8a3: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 13b8aa: c7 47 2c 8c b9 13 00 movl $0x13b98c,0x2c(%edi) the_watchdog->id = id; 13b8b1: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 13b8b4: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 13b8bb: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13b8be: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13b8c1: 5b pop %ebx 13b8c2: 5e pop %esi 13b8c3: 83 c7 10 add $0x10,%edi 13b8c6: 57 push %edi 13b8c7: 68 00 a2 16 00 push $0x16a200 13b8cc: e8 d7 84 fd ff call 113da8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13b8d1: e8 d3 76 fd ff call 112fa9 <_Thread_Enable_dispatch> 13b8d6: 31 db xor %ebx,%ebx 13b8d8: e9 98 00 00 00 jmp 13b975 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 13b8dd: 83 ec 0c sub $0xc,%esp 13b8e0: 57 push %edi 13b8e1: e8 4c fe ff ff call 13b732 <_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; 13b8e6: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 13b8ed: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 13b8f0: ff 75 d4 pushl -0x2c(%ebp) 13b8f3: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 13b8f4: a1 e0 a1 16 00 mov 0x16a1e0,%eax 13b8f9: 8b 57 08 mov 0x8(%edi),%edx 13b8fc: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13b8ff: 5a pop %edx 13b900: 59 pop %ecx 13b901: 68 00 40 00 00 push $0x4000 13b906: 50 push %eax 13b907: e8 cc 7e fd ff call 1137d8 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 13b90c: 9c pushf 13b90d: fa cli 13b90e: 5a pop %edx local_state = the_period->state; 13b90f: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 13b912: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 13b919: 52 push %edx 13b91a: 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 ) 13b91b: 83 c4 10 add $0x10,%esp 13b91e: 83 f8 03 cmp $0x3,%eax 13b921: 75 15 jne 13b938 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13b923: 56 push %esi 13b924: 56 push %esi 13b925: 68 00 40 00 00 push $0x4000 13b92a: ff 35 e0 a1 16 00 pushl 0x16a1e0 13b930: e8 f7 72 fd ff call 112c2c <_Thread_Clear_state> 13b935: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 13b938: e8 6c 76 fd ff call 112fa9 <_Thread_Enable_dispatch> 13b93d: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 13b93f: eb 3e jmp 13b97f case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 13b941: 83 ec 0c sub $0xc,%esp 13b944: 57 push %edi 13b945: e8 e8 fd ff ff call 13b732 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 13b94a: ff 75 d4 pushl -0x2c(%ebp) 13b94d: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13b94e: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 13b955: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13b958: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13b95b: 59 pop %ecx 13b95c: 5b pop %ebx 13b95d: 83 c7 10 add $0x10,%edi 13b960: 57 push %edi 13b961: 68 00 a2 16 00 push $0x16a200 13b966: e8 3d 84 fd ff call 113da8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13b96b: e8 39 76 fd ff call 112fa9 <_Thread_Enable_dispatch> 13b970: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 13b975: 83 c4 10 add $0x10,%esp 13b978: eb 05 jmp 13b97f 13b97a: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13b97f: 89 d8 mov %ebx,%eax 13b981: 8d 65 f4 lea -0xc(%ebp),%esp 13b984: 5b pop %ebx 13b985: 5e pop %esi 13b986: 5f pop %edi 13b987: c9 leave 13b988: c3 ret =============================================================================== 0012a5dc : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12a5dc: 55 push %ebp 12a5dd: 89 e5 mov %esp,%ebp 12a5df: 57 push %edi 12a5e0: 56 push %esi 12a5e1: 53 push %ebx 12a5e2: 83 ec 7c sub $0x7c,%esp 12a5e5: 8b 5d 08 mov 0x8(%ebp),%ebx 12a5e8: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 12a5eb: 85 ff test %edi,%edi 12a5ed: 0f 84 2b 01 00 00 je 12a71e <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 12a5f3: 52 push %edx 12a5f4: 52 push %edx 12a5f5: 68 88 b4 15 00 push $0x15b488 12a5fa: 53 push %ebx 12a5fb: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12a5fd: 5e pop %esi 12a5fe: 58 pop %eax 12a5ff: 68 a6 b4 15 00 push $0x15b4a6 12a604: 53 push %ebx 12a605: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 12a607: 5a pop %edx 12a608: 59 pop %ecx 12a609: 68 c8 b4 15 00 push $0x15b4c8 12a60e: 53 push %ebx 12a60f: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 12a611: 5e pop %esi 12a612: 58 pop %eax 12a613: 68 eb b4 15 00 push $0x15b4eb 12a618: 53 push %ebx 12a619: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12a61b: 5a pop %edx 12a61c: 59 pop %ecx 12a61d: 68 36 b5 15 00 push $0x15b536 12a622: 53 push %ebx 12a623: ff d7 call *%edi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12a625: 8b 35 2c ac 16 00 mov 0x16ac2c,%esi 12a62b: 83 c4 10 add $0x10,%esp 12a62e: e9 df 00 00 00 jmp 12a712 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 12a633: 50 push %eax 12a634: 50 push %eax 12a635: 8d 45 88 lea -0x78(%ebp),%eax 12a638: 50 push %eax 12a639: 56 push %esi 12a63a: e8 a5 0e 01 00 call 13b4e4 if ( status != RTEMS_SUCCESSFUL ) 12a63f: 83 c4 10 add $0x10,%esp 12a642: 85 c0 test %eax,%eax 12a644: 0f 85 c7 00 00 00 jne 12a711 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 12a64a: 51 push %ecx 12a64b: 51 push %ecx 12a64c: 8d 55 c0 lea -0x40(%ebp),%edx 12a64f: 52 push %edx 12a650: 56 push %esi 12a651: e8 32 0f 01 00 call 13b588 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 12a656: 83 c4 0c add $0xc,%esp 12a659: 8d 45 e3 lea -0x1d(%ebp),%eax 12a65c: 50 push %eax 12a65d: 6a 05 push $0x5 12a65f: ff 75 c0 pushl -0x40(%ebp) 12a662: e8 15 63 fe ff call 11097c /* * Print part of report line that is not dependent on granularity */ (*print)( context, 12a667: 58 pop %eax 12a668: 5a pop %edx 12a669: ff 75 8c pushl -0x74(%ebp) 12a66c: ff 75 88 pushl -0x78(%ebp) 12a66f: 8d 55 e3 lea -0x1d(%ebp),%edx 12a672: 52 push %edx 12a673: 56 push %esi 12a674: 68 82 b5 15 00 push $0x15b582 12a679: 53 push %ebx 12a67a: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 12a67c: 8b 45 88 mov -0x78(%ebp),%eax 12a67f: 83 c4 20 add $0x20,%esp 12a682: 85 c0 test %eax,%eax 12a684: 75 0f jne 12a695 (*print)( context, "\n" ); 12a686: 51 push %ecx 12a687: 51 push %ecx 12a688: 68 45 cf 15 00 push $0x15cf45 12a68d: 53 push %ebx 12a68e: ff d7 call *%edi continue; 12a690: 83 c4 10 add $0x10,%esp 12a693: eb 7c jmp 12a711 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 ); 12a695: 52 push %edx 12a696: 8d 55 d8 lea -0x28(%ebp),%edx 12a699: 52 push %edx 12a69a: 50 push %eax 12a69b: 8d 45 a0 lea -0x60(%ebp),%eax 12a69e: 50 push %eax 12a69f: e8 3c 12 00 00 call 12b8e0 <_Timespec_Divide_by_integer> (*print)( context, 12a6a4: 8b 45 dc mov -0x24(%ebp),%eax 12a6a7: b9 e8 03 00 00 mov $0x3e8,%ecx 12a6ac: 99 cltd 12a6ad: f7 f9 idiv %ecx 12a6af: 50 push %eax 12a6b0: ff 75 d8 pushl -0x28(%ebp) 12a6b3: 8b 45 9c mov -0x64(%ebp),%eax 12a6b6: 99 cltd 12a6b7: f7 f9 idiv %ecx 12a6b9: 50 push %eax 12a6ba: ff 75 98 pushl -0x68(%ebp) 12a6bd: 8b 45 94 mov -0x6c(%ebp),%eax 12a6c0: 99 cltd 12a6c1: f7 f9 idiv %ecx 12a6c3: 50 push %eax 12a6c4: ff 75 90 pushl -0x70(%ebp) 12a6c7: 68 99 b5 15 00 push $0x15b599 12a6cc: 53 push %ebx 12a6cd: 89 4d 84 mov %ecx,-0x7c(%ebp) 12a6d0: ff d7 call *%edi 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); 12a6d2: 83 c4 2c add $0x2c,%esp 12a6d5: 8d 55 d8 lea -0x28(%ebp),%edx 12a6d8: 52 push %edx 12a6d9: ff 75 88 pushl -0x78(%ebp) 12a6dc: 8d 45 b8 lea -0x48(%ebp),%eax 12a6df: 50 push %eax 12a6e0: e8 fb 11 00 00 call 12b8e0 <_Timespec_Divide_by_integer> (*print)( context, 12a6e5: 8b 45 dc mov -0x24(%ebp),%eax 12a6e8: 8b 4d 84 mov -0x7c(%ebp),%ecx 12a6eb: 99 cltd 12a6ec: f7 f9 idiv %ecx 12a6ee: 50 push %eax 12a6ef: ff 75 d8 pushl -0x28(%ebp) 12a6f2: 8b 45 b4 mov -0x4c(%ebp),%eax 12a6f5: 99 cltd 12a6f6: f7 f9 idiv %ecx 12a6f8: 50 push %eax 12a6f9: ff 75 b0 pushl -0x50(%ebp) 12a6fc: 8b 45 ac mov -0x54(%ebp),%eax 12a6ff: 99 cltd 12a700: f7 f9 idiv %ecx 12a702: 50 push %eax 12a703: ff 75 a8 pushl -0x58(%ebp) 12a706: 68 b8 b5 15 00 push $0x15b5b8 12a70b: 53 push %ebx 12a70c: ff d7 call *%edi 12a70e: 83 c4 30 add $0x30,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 12a711: 46 inc %esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12a712: 3b 35 30 ac 16 00 cmp 0x16ac30,%esi 12a718: 0f 86 15 ff ff ff jbe 12a633 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12a71e: 8d 65 f4 lea -0xc(%ebp),%esp 12a721: 5b pop %ebx 12a722: 5e pop %esi 12a723: 5f pop %edi 12a724: c9 leave 12a725: c3 ret =============================================================================== 00116284 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 116284: 55 push %ebp 116285: 89 e5 mov %esp,%ebp 116287: 53 push %ebx 116288: 83 ec 14 sub $0x14,%esp 11628b: 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 ) 11628e: b8 0a 00 00 00 mov $0xa,%eax 116293: 85 db test %ebx,%ebx 116295: 74 71 je 116308 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 116297: 50 push %eax 116298: 50 push %eax 116299: 8d 45 f4 lea -0xc(%ebp),%eax 11629c: 50 push %eax 11629d: ff 75 08 pushl 0x8(%ebp) 1162a0: e8 43 36 00 00 call 1198e8 <_Thread_Get> 1162a5: 89 c1 mov %eax,%ecx switch ( location ) { 1162a7: 83 c4 10 add $0x10,%esp 1162aa: b8 04 00 00 00 mov $0x4,%eax 1162af: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1162b3: 75 53 jne 116308 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1162b5: 8b 91 f4 00 00 00 mov 0xf4(%ecx),%edx asr = &api->Signal; 1162bb: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 1162bf: 74 3d je 1162fe if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 1162c1: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1162c5: 74 26 je 1162ed rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1162c7: 9c pushf 1162c8: fa cli 1162c9: 58 pop %eax *signal_set |= signals; 1162ca: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1162cd: 50 push %eax 1162ce: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 1162cf: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1162d3: a1 74 f6 13 00 mov 0x13f674,%eax 1162d8: 85 c0 test %eax,%eax 1162da: 74 19 je 1162f5 1162dc: 3b 0d 98 f6 13 00 cmp 0x13f698,%ecx 1162e2: 75 11 jne 1162f5 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 1162e4: c6 05 2c f7 13 00 01 movb $0x1,0x13f72c 1162eb: eb 08 jmp 1162f5 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1162ed: 9c pushf 1162ee: fa cli 1162ef: 58 pop %eax *signal_set |= signals; 1162f0: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 1162f3: 50 push %eax 1162f4: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 1162f5: e8 9f 35 00 00 call 119899 <_Thread_Enable_dispatch> 1162fa: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1162fc: eb 0a jmp 116308 } _Thread_Enable_dispatch(); 1162fe: e8 96 35 00 00 call 119899 <_Thread_Enable_dispatch> 116303: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116308: 8b 5d fc mov -0x4(%ebp),%ebx 11630b: c9 leave 11630c: c3 ret =============================================================================== 0010e214 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10e214: 55 push %ebp 10e215: 89 e5 mov %esp,%ebp 10e217: 56 push %esi 10e218: 53 push %ebx 10e219: 83 ec 10 sub $0x10,%esp 10e21c: 8b 5d 0c mov 0xc(%ebp),%ebx 10e21f: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10e222: 85 db test %ebx,%ebx 10e224: 74 10 je 10e236 10e226: 0f b6 05 14 62 12 00 movzbl 0x126214,%eax 10e22d: ba 13 00 00 00 mov $0x13,%edx 10e232: 39 c3 cmp %eax,%ebx 10e234: 77 50 ja 10e286 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e236: ba 09 00 00 00 mov $0x9,%edx 10e23b: 85 f6 test %esi,%esi 10e23d: 74 47 je 10e286 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e23f: 51 push %ecx 10e240: 51 push %ecx 10e241: 8d 45 f4 lea -0xc(%ebp),%eax 10e244: 50 push %eax 10e245: ff 75 08 pushl 0x8(%ebp) 10e248: e8 d3 1b 00 00 call 10fe20 <_Thread_Get> switch ( location ) { 10e24d: 83 c4 10 add $0x10,%esp 10e250: ba 04 00 00 00 mov $0x4,%edx 10e255: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e259: 75 2b jne 10e286 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e25b: 8b 50 14 mov 0x14(%eax),%edx 10e25e: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e260: 85 db test %ebx,%ebx 10e262: 74 1b je 10e27f the_thread->real_priority = new_priority; 10e264: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e267: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e26b: 74 05 je 10e272 the_thread->current_priority > new_priority ) 10e26d: 39 58 14 cmp %ebx,0x14(%eax) 10e270: 76 0d jbe 10e27f <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e272: 52 push %edx 10e273: 6a 00 push $0x0 10e275: 53 push %ebx 10e276: 50 push %eax 10e277: e8 b8 16 00 00 call 10f934 <_Thread_Change_priority> 10e27c: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e27f: e8 4d 1b 00 00 call 10fdd1 <_Thread_Enable_dispatch> 10e284: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e286: 89 d0 mov %edx,%eax 10e288: 8d 65 f8 lea -0x8(%ebp),%esp 10e28b: 5b pop %ebx 10e28c: 5e pop %esi 10e28d: c9 leave 10e28e: c3 ret =============================================================================== 00116acc : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 116acc: 55 push %ebp 116acd: 89 e5 mov %esp,%ebp 116acf: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 116ad2: 8d 45 f4 lea -0xc(%ebp),%eax 116ad5: 50 push %eax 116ad6: ff 75 08 pushl 0x8(%ebp) 116ad9: 68 68 ff 13 00 push $0x13ff68 116ade: e8 51 25 00 00 call 119034 <_Objects_Get> 116ae3: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116ae5: 83 c4 10 add $0x10,%esp 116ae8: b8 04 00 00 00 mov $0x4,%eax 116aed: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116af1: 75 1c jne 116b0f case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 116af3: 83 7a 38 04 cmpl $0x4,0x38(%edx) 116af7: 74 0f je 116b08 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 116af9: 83 ec 0c sub $0xc,%esp 116afc: 83 c2 10 add $0x10,%edx 116aff: 52 push %edx 116b00: e8 f7 3f 00 00 call 11aafc <_Watchdog_Remove> 116b05: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 116b08: e8 8c 2d 00 00 call 119899 <_Thread_Enable_dispatch> 116b0d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116b0f: c9 leave 116b10: c3 ret =============================================================================== 00116f34 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116f34: 55 push %ebp 116f35: 89 e5 mov %esp,%ebp 116f37: 57 push %edi 116f38: 56 push %esi 116f39: 53 push %ebx 116f3a: 83 ec 1c sub $0x1c,%esp 116f3d: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116f40: 8b 35 a8 ff 13 00 mov 0x13ffa8,%esi if ( !timer_server ) 116f46: b8 0e 00 00 00 mov $0xe,%eax 116f4b: 85 f6 test %esi,%esi 116f4d: 0f 84 b4 00 00 00 je 117007 <== NEVER TAKEN return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 116f53: b0 0b mov $0xb,%al 116f55: 80 3d f0 f5 13 00 00 cmpb $0x0,0x13f5f0 116f5c: 0f 84 a5 00 00 00 je 117007 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 116f62: b0 09 mov $0x9,%al 116f64: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 116f68: 0f 84 99 00 00 00 je 117007 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116f6e: 83 ec 0c sub $0xc,%esp 116f71: 53 push %ebx 116f72: e8 65 d6 ff ff call 1145dc <_TOD_Validate> 116f77: 83 c4 10 add $0x10,%esp 116f7a: 84 c0 test %al,%al 116f7c: 0f 84 80 00 00 00 je 117002 <== NEVER TAKEN return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 116f82: 83 ec 0c sub $0xc,%esp 116f85: 53 push %ebx 116f86: e8 e9 d5 ff ff call 114574 <_TOD_To_seconds> 116f8b: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 116f8d: 83 c4 10 add $0x10,%esp 116f90: 3b 05 6c f6 13 00 cmp 0x13f66c,%eax 116f96: 76 6a jbe 117002 <== NEVER TAKEN 116f98: 51 push %ecx 116f99: 8d 45 e4 lea -0x1c(%ebp),%eax 116f9c: 50 push %eax 116f9d: ff 75 08 pushl 0x8(%ebp) 116fa0: 68 68 ff 13 00 push $0x13ff68 116fa5: e8 8a 20 00 00 call 119034 <_Objects_Get> 116faa: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116fac: 83 c4 10 add $0x10,%esp 116faf: b8 04 00 00 00 mov $0x4,%eax 116fb4: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116fb8: 75 4d jne 117007 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116fba: 83 ec 0c sub $0xc,%esp 116fbd: 8d 43 10 lea 0x10(%ebx),%eax 116fc0: 50 push %eax 116fc1: e8 36 3b 00 00 call 11aafc <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 116fc6: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116fcd: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116fd4: 8b 45 10 mov 0x10(%ebp),%eax 116fd7: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 116fda: 8b 45 08 mov 0x8(%ebp),%eax 116fdd: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 116fe0: 8b 45 14 mov 0x14(%ebp),%eax 116fe3: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 116fe6: 2b 3d 6c f6 13 00 sub 0x13f66c,%edi 116fec: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 116fef: 58 pop %eax 116ff0: 5a pop %edx 116ff1: 53 push %ebx 116ff2: 56 push %esi 116ff3: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 116ff6: e8 9e 28 00 00 call 119899 <_Thread_Enable_dispatch> 116ffb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116ffd: 83 c4 10 add $0x10,%esp 117000: eb 05 jmp 117007 117002: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117007: 8d 65 f4 lea -0xc(%ebp),%esp 11700a: 5b pop %ebx 11700b: 5e pop %esi 11700c: 5f pop %edi 11700d: c9 leave 11700e: c3 ret =============================================================================== 0010ad98 : #include int sched_get_priority_max( int policy ) { 10ad98: 55 push %ebp 10ad99: 89 e5 mov %esp,%ebp 10ad9b: 83 ec 08 sub $0x8,%esp 10ad9e: 8b 4d 08 mov 0x8(%ebp),%ecx switch ( policy ) { 10ada1: 83 f9 04 cmp $0x4,%ecx 10ada4: 77 0b ja 10adb1 10ada6: b8 01 00 00 00 mov $0x1,%eax 10adab: d3 e0 shl %cl,%eax 10adad: a8 17 test $0x17,%al 10adaf: 75 10 jne 10adc1 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10adb1: e8 3e 89 00 00 call 1136f4 <__errno> 10adb6: c7 00 16 00 00 00 movl $0x16,(%eax) 10adbc: 83 c8 ff or $0xffffffff,%eax 10adbf: eb 08 jmp 10adc9 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10adc1: 0f b6 05 18 32 12 00 movzbl 0x123218,%eax 10adc8: 48 dec %eax } 10adc9: c9 leave 10adca: c3 ret =============================================================================== 0010adcc : #include int sched_get_priority_min( int policy ) { 10adcc: 55 push %ebp 10adcd: 89 e5 mov %esp,%ebp 10adcf: 83 ec 08 sub $0x8,%esp 10add2: 8b 4d 08 mov 0x8(%ebp),%ecx switch ( policy ) { 10add5: 83 f9 04 cmp $0x4,%ecx 10add8: 77 11 ja 10adeb 10adda: ba 01 00 00 00 mov $0x1,%edx 10addf: d3 e2 shl %cl,%edx 10ade1: b8 01 00 00 00 mov $0x1,%eax 10ade6: 80 e2 17 and $0x17,%dl 10ade9: 75 0e jne 10adf9 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10adeb: e8 04 89 00 00 call 1136f4 <__errno> 10adf0: c7 00 16 00 00 00 movl $0x16,(%eax) 10adf6: 83 c8 ff or $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10adf9: c9 leave 10adfa: c3 ret =============================================================================== 0010adfc : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10adfc: 55 push %ebp 10adfd: 89 e5 mov %esp,%ebp 10adff: 56 push %esi 10ae00: 53 push %ebx 10ae01: 8b 75 08 mov 0x8(%ebp),%esi 10ae04: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10ae07: 85 f6 test %esi,%esi 10ae09: 74 16 je 10ae21 <== NEVER TAKEN 10ae0b: e8 14 cf ff ff call 107d24 10ae10: 39 c6 cmp %eax,%esi 10ae12: 74 0d je 10ae21 rtems_set_errno_and_return_minus_one( ESRCH ); 10ae14: e8 db 88 00 00 call 1136f4 <__errno> 10ae19: c7 00 03 00 00 00 movl $0x3,(%eax) 10ae1f: eb 0f jmp 10ae30 if ( !interval ) 10ae21: 85 db test %ebx,%ebx 10ae23: 75 10 jne 10ae35 rtems_set_errno_and_return_minus_one( EINVAL ); 10ae25: e8 ca 88 00 00 call 1136f4 <__errno> 10ae2a: c7 00 16 00 00 00 movl $0x16,(%eax) 10ae30: 83 c8 ff or $0xffffffff,%eax 10ae33: eb 13 jmp 10ae48 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10ae35: 50 push %eax 10ae36: 50 push %eax 10ae37: 53 push %ebx 10ae38: ff 35 c4 71 12 00 pushl 0x1271c4 10ae3e: e8 a9 2f 00 00 call 10ddec <_Timespec_From_ticks> 10ae43: 31 c0 xor %eax,%eax return 0; 10ae45: 83 c4 10 add $0x10,%esp } 10ae48: 8d 65 f8 lea -0x8(%ebp),%esp 10ae4b: 5b pop %ebx 10ae4c: 5e pop %esi 10ae4d: c9 leave 10ae4e: c3 ret =============================================================================== 0010d3f8 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10d3f8: 55 push %ebp 10d3f9: 89 e5 mov %esp,%ebp 10d3fb: 57 push %edi 10d3fc: 56 push %esi 10d3fd: 53 push %ebx 10d3fe: 83 ec 2c sub $0x2c,%esp 10d401: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d404: a1 f8 b3 12 00 mov 0x12b3f8,%eax 10d409: 40 inc %eax 10d40a: a3 f8 b3 12 00 mov %eax,0x12b3f8 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10d40f: 8b 45 0c mov 0xc(%ebp),%eax 10d412: 25 00 02 00 00 and $0x200,%eax 10d417: 89 45 d4 mov %eax,-0x2c(%ebp) 10d41a: 75 04 jne 10d420 10d41c: 31 ff xor %edi,%edi 10d41e: eb 03 jmp 10d423 va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10d420: 8b 7d 14 mov 0x14(%ebp),%edi va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10d423: 52 push %edx 10d424: 52 push %edx 10d425: 8d 45 e4 lea -0x1c(%ebp),%eax 10d428: 50 push %eax 10d429: 56 push %esi 10d42a: e8 65 60 00 00 call 113494 <_POSIX_Semaphore_Name_to_id> 10d42f: 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 ) { 10d431: 83 c4 10 add $0x10,%esp 10d434: 85 c0 test %eax,%eax 10d436: 74 19 je 10d451 /* * 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) ) ) { 10d438: 83 f8 02 cmp $0x2,%eax 10d43b: 75 06 jne 10d443 <== NEVER TAKEN 10d43d: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10d441: 75 59 jne 10d49c _Thread_Enable_dispatch(); 10d443: e8 11 25 00 00 call 10f959 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10d448: e8 23 95 00 00 call 116970 <__errno> 10d44d: 89 18 mov %ebx,(%eax) 10d44f: eb 1f jmp 10d470 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10d451: 8b 45 0c mov 0xc(%ebp),%eax 10d454: 25 00 0a 00 00 and $0xa00,%eax 10d459: 3d 00 0a 00 00 cmp $0xa00,%eax 10d45e: 75 15 jne 10d475 _Thread_Enable_dispatch(); 10d460: e8 f4 24 00 00 call 10f959 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10d465: e8 06 95 00 00 call 116970 <__errno> 10d46a: c7 00 11 00 00 00 movl $0x11,(%eax) 10d470: 83 c8 ff or $0xffffffff,%eax 10d473: eb 4a jmp 10d4bf 10d475: 50 push %eax 10d476: 8d 45 dc lea -0x24(%ebp),%eax 10d479: 50 push %eax 10d47a: ff 75 e4 pushl -0x1c(%ebp) 10d47d: 68 e0 b6 12 00 push $0x12b6e0 10d482: e8 99 1c 00 00 call 10f120 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10d487: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10d48a: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10d48d: e8 c7 24 00 00 call 10f959 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10d492: e8 c2 24 00 00 call 10f959 <_Thread_Enable_dispatch> goto return_id; 10d497: 83 c4 10 add $0x10,%esp 10d49a: eb 1d jmp 10d4b9 /* * 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( 10d49c: 8d 45 e0 lea -0x20(%ebp),%eax 10d49f: 50 push %eax 10d4a0: 57 push %edi 10d4a1: 6a 00 push $0x0 10d4a3: 56 push %esi 10d4a4: e8 b7 5e 00 00 call 113360 <_POSIX_Semaphore_Create_support> 10d4a9: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10d4ab: e8 a9 24 00 00 call 10f959 <_Thread_Enable_dispatch> if ( status == -1 ) 10d4b0: 83 c4 10 add $0x10,%esp 10d4b3: 83 c8 ff or $0xffffffff,%eax 10d4b6: 43 inc %ebx 10d4b7: 74 06 je 10d4bf 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; 10d4b9: 8b 45 e0 mov -0x20(%ebp),%eax 10d4bc: 83 c0 08 add $0x8,%eax #endif return id; } 10d4bf: 8d 65 f4 lea -0xc(%ebp),%esp 10d4c2: 5b pop %ebx 10d4c3: 5e pop %esi 10d4c4: 5f pop %edi 10d4c5: c9 leave 10d4c6: c3 ret =============================================================================== 0010ac1c : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10ac1c: 55 push %ebp 10ac1d: 89 e5 mov %esp,%ebp 10ac1f: 57 push %edi 10ac20: 56 push %esi 10ac21: 53 push %ebx 10ac22: 83 ec 1c sub $0x1c,%esp 10ac25: 8b 5d 08 mov 0x8(%ebp),%ebx 10ac28: 8b 55 0c mov 0xc(%ebp),%edx 10ac2b: 8b 45 10 mov 0x10(%ebp),%eax ISR_Level level; if ( oact ) 10ac2e: 85 c0 test %eax,%eax 10ac30: 74 12 je 10ac44 *oact = _POSIX_signals_Vectors[ sig ]; 10ac32: 6b f3 0c imul $0xc,%ebx,%esi 10ac35: 81 c6 a8 87 12 00 add $0x1287a8,%esi 10ac3b: b9 03 00 00 00 mov $0x3,%ecx 10ac40: 89 c7 mov %eax,%edi 10ac42: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10ac44: 85 db test %ebx,%ebx 10ac46: 74 0d je 10ac55 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10ac48: 8d 43 ff lea -0x1(%ebx),%eax 10ac4b: 83 f8 1f cmp $0x1f,%eax 10ac4e: 77 05 ja 10ac55 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10ac50: 83 fb 09 cmp $0x9,%ebx 10ac53: 75 10 jne 10ac65 rtems_set_errno_and_return_minus_one( EINVAL ); 10ac55: e8 a2 8b 00 00 call 1137fc <__errno> 10ac5a: c7 00 16 00 00 00 movl $0x16,(%eax) 10ac60: 83 c8 ff or $0xffffffff,%eax 10ac63: eb 53 jmp 10acb8 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10ac65: 31 c0 xor %eax,%eax 10ac67: 85 d2 test %edx,%edx 10ac69: 74 4d je 10acb8 <== NEVER TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 10ac6b: 9c pushf 10ac6c: fa cli 10ac6d: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10ac70: 83 7a 08 00 cmpl $0x0,0x8(%edx) 10ac74: 75 18 jne 10ac8e _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10ac76: 6b db 0c imul $0xc,%ebx,%ebx 10ac79: 8d bb a8 87 12 00 lea 0x1287a8(%ebx),%edi 10ac7f: 8d b3 38 24 12 00 lea 0x122438(%ebx),%esi 10ac85: b9 03 00 00 00 mov $0x3,%ecx 10ac8a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10ac8c: eb 24 jmp 10acb2 } else { _POSIX_signals_Clear_process_signals( sig ); 10ac8e: 83 ec 0c sub $0xc,%esp 10ac91: 53 push %ebx 10ac92: 89 55 e0 mov %edx,-0x20(%ebp) 10ac95: e8 02 58 00 00 call 11049c <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10ac9a: 6b db 0c imul $0xc,%ebx,%ebx 10ac9d: 8d bb a8 87 12 00 lea 0x1287a8(%ebx),%edi 10aca3: b9 03 00 00 00 mov $0x3,%ecx 10aca8: 8b 55 e0 mov -0x20(%ebp),%edx 10acab: 89 d6 mov %edx,%esi 10acad: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10acaf: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10acb2: ff 75 e4 pushl -0x1c(%ebp) 10acb5: 9d popf 10acb6: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10acb8: 8d 65 f4 lea -0xc(%ebp),%esp 10acbb: 5b pop %ebx 10acbc: 5e pop %esi 10acbd: 5f pop %edi 10acbe: c9 leave 10acbf: c3 ret =============================================================================== 0010ca00 : #include int sigsuspend( const sigset_t *sigmask ) { 10ca00: 55 push %ebp 10ca01: 89 e5 mov %esp,%ebp 10ca03: 56 push %esi 10ca04: 53 push %ebx 10ca05: 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 ); 10ca08: 8d 5d f4 lea -0xc(%ebp),%ebx 10ca0b: 53 push %ebx 10ca0c: ff 75 08 pushl 0x8(%ebp) 10ca0f: 6a 01 push $0x1 10ca11: e8 c6 ff ff ff call 10c9dc (void) sigfillset( &all_signals ); 10ca16: 8d 75 f0 lea -0x10(%ebp),%esi 10ca19: 89 34 24 mov %esi,(%esp) 10ca1c: e8 17 ff ff ff call 10c938 status = sigtimedwait( &all_signals, NULL, NULL ); 10ca21: 83 c4 0c add $0xc,%esp 10ca24: 6a 00 push $0x0 10ca26: 6a 00 push $0x0 10ca28: 56 push %esi 10ca29: e8 69 00 00 00 call 10ca97 10ca2e: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10ca30: 83 c4 0c add $0xc,%esp 10ca33: 6a 00 push $0x0 10ca35: 53 push %ebx 10ca36: 6a 00 push $0x0 10ca38: e8 9f ff ff ff call 10c9dc /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10ca3d: 83 c4 10 add $0x10,%esp 10ca40: 46 inc %esi 10ca41: 74 0b je 10ca4e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); 10ca43: e8 bc 88 00 00 call 115304 <__errno> 10ca48: c7 00 04 00 00 00 movl $0x4,(%eax) return status; } 10ca4e: 83 c8 ff or $0xffffffff,%eax 10ca51: 8d 65 f8 lea -0x8(%ebp),%esp 10ca54: 5b pop %ebx 10ca55: 5e pop %esi 10ca56: c9 leave 10ca57: c3 ret =============================================================================== 0010b053 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10b053: 55 push %ebp 10b054: 89 e5 mov %esp,%ebp 10b056: 57 push %edi 10b057: 56 push %esi 10b058: 53 push %ebx 10b059: 83 ec 2c sub $0x2c,%esp 10b05c: 8b 7d 08 mov 0x8(%ebp),%edi 10b05f: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10b062: 85 ff test %edi,%edi 10b064: 74 24 je 10b08a /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10b066: 85 db test %ebx,%ebx 10b068: 74 33 je 10b09d if ( !_Timespec_Is_valid( timeout ) ) 10b06a: 83 ec 0c sub $0xc,%esp 10b06d: 53 push %ebx 10b06e: e8 01 30 00 00 call 10e074 <_Timespec_Is_valid> 10b073: 83 c4 10 add $0x10,%esp 10b076: 84 c0 test %al,%al 10b078: 74 10 je 10b08a rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10b07a: 83 ec 0c sub $0xc,%esp 10b07d: 53 push %ebx 10b07e: e8 49 30 00 00 call 10e0cc <_Timespec_To_ticks> if ( !interval ) 10b083: 83 c4 10 add $0x10,%esp 10b086: 85 c0 test %eax,%eax 10b088: 75 15 jne 10b09f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10b08a: e8 7d 8a 00 00 call 113b0c <__errno> 10b08f: c7 00 16 00 00 00 movl $0x16,(%eax) 10b095: 83 cf ff or $0xffffffff,%edi 10b098: e9 13 01 00 00 jmp 10b1b0 10b09d: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10b09f: 8b 5d 0c mov 0xc(%ebp),%ebx 10b0a2: 85 db test %ebx,%ebx 10b0a4: 75 03 jne 10b0a9 10b0a6: 8d 5d dc lea -0x24(%ebp),%ebx the_thread = _Thread_Executing; 10b0a9: 8b 15 04 83 12 00 mov 0x128304,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b0af: 8b b2 f8 00 00 00 mov 0xf8(%edx),%esi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10b0b5: 9c pushf 10b0b6: fa cli 10b0b7: 8f 45 d4 popl -0x2c(%ebp) if ( *set & api->signals_pending ) { 10b0ba: 8b 0f mov (%edi),%ecx 10b0bc: 89 4d d0 mov %ecx,-0x30(%ebp) 10b0bf: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx 10b0c5: 85 4d d0 test %ecx,-0x30(%ebp) 10b0c8: 74 32 je 10b0fc /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 10b0ca: 83 ec 0c sub $0xc,%esp 10b0cd: 51 push %ecx 10b0ce: e8 41 ff ff ff call 10b014 <_POSIX_signals_Get_highest> 10b0d3: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10b0d5: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b0dc: 6a 00 push $0x0 10b0de: 53 push %ebx 10b0df: 50 push %eax 10b0e0: 56 push %esi 10b0e1: e8 2e 5a 00 00 call 110b14 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10b0e6: ff 75 d4 pushl -0x2c(%ebp) 10b0e9: 9d popf the_info->si_code = SI_USER; 10b0ea: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10b0f1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10b0f8: 8b 3b mov (%ebx),%edi 10b0fa: eb 3b jmp 10b137 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10b0fc: 8b 0d 9c 89 12 00 mov 0x12899c,%ecx 10b102: 85 4d d0 test %ecx,-0x30(%ebp) 10b105: 74 35 je 10b13c signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10b107: 83 ec 0c sub $0xc,%esp 10b10a: 51 push %ecx 10b10b: e8 04 ff ff ff call 10b014 <_POSIX_signals_Get_highest> 10b110: 89 c7 mov %eax,%edi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10b112: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b119: 6a 01 push $0x1 10b11b: 53 push %ebx 10b11c: 50 push %eax 10b11d: 56 push %esi 10b11e: e8 f1 59 00 00 call 110b14 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10b123: ff 75 d4 pushl -0x2c(%ebp) 10b126: 9d popf the_info->si_signo = signo; 10b127: 89 3b mov %edi,(%ebx) the_info->si_code = SI_USER; 10b129: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10b130: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10b137: 83 c4 20 add $0x20,%esp 10b13a: eb 74 jmp 10b1b0 } the_info->si_signo = -1; 10b13c: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b142: 8b 0d 48 82 12 00 mov 0x128248,%ecx 10b148: 41 inc %ecx 10b149: 89 0d 48 82 12 00 mov %ecx,0x128248 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10b14f: c7 42 44 34 89 12 00 movl $0x128934,0x44(%edx) the_thread->Wait.return_code = EINTR; 10b156: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10b15d: 8b 0f mov (%edi),%ecx 10b15f: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10b162: 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; 10b165: c7 05 64 89 12 00 01 movl $0x1,0x128964 10b16c: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10b16f: ff 75 d4 pushl -0x2c(%ebp) 10b172: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10b173: 52 push %edx 10b174: 68 6c dc 10 00 push $0x10dc6c 10b179: 50 push %eax 10b17a: 68 34 89 12 00 push $0x128934 10b17f: e8 38 28 00 00 call 10d9bc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b184: e8 7c 23 00 00 call 10d505 <_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 ); 10b189: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b190: 6a 00 push $0x0 10b192: 53 push %ebx 10b193: ff 33 pushl (%ebx) 10b195: 56 push %esi 10b196: e8 79 59 00 00 call 110b14 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10b19b: 83 c4 20 add $0x20,%esp 10b19e: e8 69 89 00 00 call 113b0c <__errno> 10b1a3: 8b 15 04 83 12 00 mov 0x128304,%edx 10b1a9: 8b 52 34 mov 0x34(%edx),%edx 10b1ac: 89 10 mov %edx,(%eax) return the_info->si_signo; 10b1ae: 8b 3b mov (%ebx),%edi } 10b1b0: 89 f8 mov %edi,%eax 10b1b2: 8d 65 f4 lea -0xc(%ebp),%esp 10b1b5: 5b pop %ebx 10b1b6: 5e pop %esi 10b1b7: 5f pop %edi 10b1b8: c9 leave 10b1b9: c3 ret =============================================================================== 0010cc18 : int sigwait( const sigset_t *set, int *sig ) { 10cc18: 55 push %ebp 10cc19: 89 e5 mov %esp,%ebp 10cc1b: 53 push %ebx 10cc1c: 83 ec 08 sub $0x8,%esp 10cc1f: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10cc22: 6a 00 push $0x0 10cc24: 6a 00 push $0x0 10cc26: ff 75 08 pushl 0x8(%ebp) 10cc29: e8 69 fe ff ff call 10ca97 10cc2e: 89 c2 mov %eax,%edx if ( status != -1 ) { 10cc30: 83 c4 10 add $0x10,%esp 10cc33: 83 f8 ff cmp $0xffffffff,%eax 10cc36: 74 0a je 10cc42 if ( sig ) 10cc38: 31 c0 xor %eax,%eax 10cc3a: 85 db test %ebx,%ebx 10cc3c: 74 0b je 10cc49 <== NEVER TAKEN *sig = status; 10cc3e: 89 13 mov %edx,(%ebx) 10cc40: eb 07 jmp 10cc49 return 0; } return errno; 10cc42: e8 bd 86 00 00 call 115304 <__errno> 10cc47: 8b 00 mov (%eax),%eax } 10cc49: 8b 5d fc mov -0x4(%ebp),%ebx 10cc4c: c9 leave 10cc4d: c3 ret =============================================================================== 0010a45c : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10a45c: 55 push %ebp 10a45d: 89 e5 mov %esp,%ebp 10a45f: 56 push %esi 10a460: 53 push %ebx 10a461: 8b 5d 0c mov 0xc(%ebp),%ebx 10a464: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10a467: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10a46b: 75 1d jne 10a48a rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10a46d: 85 f6 test %esi,%esi 10a46f: 74 19 je 10a48a /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10a471: 85 db test %ebx,%ebx 10a473: 74 22 je 10a497 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10a475: 8b 03 mov (%ebx),%eax 10a477: 48 dec %eax 10a478: 83 f8 01 cmp $0x1,%eax 10a47b: 77 0d ja 10a48a <== NEVER TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 10a47d: 8b 43 04 mov 0x4(%ebx),%eax 10a480: 85 c0 test %eax,%eax 10a482: 74 06 je 10a48a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10a484: 48 dec %eax 10a485: 83 f8 1f cmp $0x1f,%eax 10a488: 76 0d jbe 10a497 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10a48a: e8 7d 90 00 00 call 11350c <__errno> 10a48f: c7 00 16 00 00 00 movl $0x16,(%eax) 10a495: eb 2f jmp 10a4c6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a497: a1 5c 82 12 00 mov 0x12825c,%eax 10a49c: 40 inc %eax 10a49d: a3 5c 82 12 00 mov %eax,0x12825c * 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 ); 10a4a2: 83 ec 0c sub $0xc,%esp 10a4a5: 68 84 85 12 00 push $0x128584 10a4aa: e8 39 1b 00 00 call 10bfe8 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10a4af: 83 c4 10 add $0x10,%esp 10a4b2: 85 c0 test %eax,%eax 10a4b4: 75 18 jne 10a4ce _Thread_Enable_dispatch(); 10a4b6: e8 32 27 00 00 call 10cbed <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10a4bb: e8 4c 90 00 00 call 11350c <__errno> 10a4c0: c7 00 0b 00 00 00 movl $0xb,(%eax) 10a4c6: 83 c8 ff or $0xffffffff,%eax 10a4c9: e9 83 00 00 00 jmp 10a551 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 10a4ce: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10a4d2: 8b 15 18 83 12 00 mov 0x128318,%edx 10a4d8: 8b 52 08 mov 0x8(%edx),%edx 10a4db: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10a4de: 85 db test %ebx,%ebx 10a4e0: 74 11 je 10a4f3 ptimer->inf.sigev_notify = evp->sigev_notify; 10a4e2: 8b 13 mov (%ebx),%edx 10a4e4: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10a4e7: 8b 53 04 mov 0x4(%ebx),%edx 10a4ea: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10a4ed: 8b 53 08 mov 0x8(%ebx),%edx 10a4f0: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10a4f3: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10a4fa: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10a501: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10a508: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10a50f: 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; 10a516: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10a51d: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10a524: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10a52b: 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; 10a532: 8b 50 08 mov 0x8(%eax),%edx 10a535: 0f b7 da movzwl %dx,%ebx 10a538: 8b 0d a0 85 12 00 mov 0x1285a0,%ecx 10a53e: 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; 10a541: 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; 10a548: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10a54a: e8 9e 26 00 00 call 10cbed <_Thread_Enable_dispatch> 10a54f: 31 c0 xor %eax,%eax return 0; } 10a551: 8d 65 f8 lea -0x8(%ebp),%esp 10a554: 5b pop %ebx 10a555: 5e pop %esi 10a556: c9 leave 10a557: c3 ret =============================================================================== 0010a558 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10a558: 55 push %ebp 10a559: 89 e5 mov %esp,%ebp 10a55b: 57 push %edi 10a55c: 56 push %esi 10a55d: 53 push %ebx 10a55e: 83 ec 2c sub $0x2c,%esp 10a561: 8b 45 0c mov 0xc(%ebp),%eax Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10a564: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a568: 0f 84 47 01 00 00 je 10a6b5 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 10a56e: 8b 55 10 mov 0x10(%ebp),%edx 10a571: 81 7a 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%edx) 10a578: 0f 87 37 01 00 00 ja 10a6b5 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 10a57e: 81 7a 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%edx) 10a585: 0f 87 2a 01 00 00 ja 10a6b5 <== NEVER TAKEN ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10a58b: 85 c0 test %eax,%eax 10a58d: 74 09 je 10a598 10a58f: 83 f8 04 cmp $0x4,%eax 10a592: 0f 85 1d 01 00 00 jne 10a6b5 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10a598: 8d 7d cc lea -0x34(%ebp),%edi 10a59b: b9 04 00 00 00 mov $0x4,%ecx 10a5a0: 8b 75 10 mov 0x10(%ebp),%esi 10a5a3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 10a5a5: 83 f8 04 cmp $0x4,%eax 10a5a8: 75 2f jne 10a5d9 struct timespec now; _TOD_Get( &now ); 10a5aa: 83 ec 0c sub $0xc,%esp 10a5ad: 8d 5d dc lea -0x24(%ebp),%ebx 10a5b0: 53 push %ebx 10a5b1: e8 a2 15 00 00 call 10bb58 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10a5b6: 59 pop %ecx 10a5b7: 5e pop %esi 10a5b8: 8d 75 d4 lea -0x2c(%ebp),%esi 10a5bb: 56 push %esi 10a5bc: 53 push %ebx 10a5bd: e8 9a 31 00 00 call 10d75c <_Timespec_Greater_than> 10a5c2: 83 c4 10 add $0x10,%esp 10a5c5: 84 c0 test %al,%al 10a5c7: 0f 85 e8 00 00 00 jne 10a6b5 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10a5cd: 52 push %edx 10a5ce: 56 push %esi 10a5cf: 56 push %esi 10a5d0: 53 push %ebx 10a5d1: e8 aa 31 00 00 call 10d780 <_Timespec_Subtract> 10a5d6: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10a5d9: 50 push %eax 10a5da: 8d 45 e4 lea -0x1c(%ebp),%eax 10a5dd: 50 push %eax 10a5de: ff 75 08 pushl 0x8(%ebp) 10a5e1: 68 84 85 12 00 push $0x128584 10a5e6: e8 11 1e 00 00 call 10c3fc <_Objects_Get> 10a5eb: 89 c3 mov %eax,%ebx * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10a5ed: 83 c4 10 add $0x10,%esp 10a5f0: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10a5f4: 0f 85 bb 00 00 00 jne 10a6b5 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 ) { 10a5fa: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10a5fe: 75 3b jne 10a63b 10a600: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 10a604: 75 35 jne 10a63b /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10a606: 83 ec 0c sub $0xc,%esp 10a609: 8d 40 10 lea 0x10(%eax),%eax 10a60c: 50 push %eax 10a60d: e8 2e 35 00 00 call 10db40 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10a612: 83 c4 10 add $0x10,%esp 10a615: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a619: 74 0d je 10a628 *ovalue = ptimer->timer_data; 10a61b: 8d 73 54 lea 0x54(%ebx),%esi 10a61e: b9 04 00 00 00 mov $0x4,%ecx 10a623: 8b 7d 14 mov 0x14(%ebp),%edi 10a626: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10a628: 8d 7b 54 lea 0x54(%ebx),%edi 10a62b: 8d 75 cc lea -0x34(%ebp),%esi 10a62e: b9 04 00 00 00 mov $0x4,%ecx 10a633: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a635: c6 43 3c 04 movb $0x4,0x3c(%ebx) 10a639: eb 35 jmp 10a670 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10a63b: 83 ec 0c sub $0xc,%esp 10a63e: ff 75 10 pushl 0x10(%ebp) 10a641: e8 6e 31 00 00 call 10d7b4 <_Timespec_To_ticks> 10a646: 89 43 64 mov %eax,0x64(%ebx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10a649: 8d 45 d4 lea -0x2c(%ebp),%eax 10a64c: 89 04 24 mov %eax,(%esp) 10a64f: e8 60 31 00 00 call 10d7b4 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10a654: 89 1c 24 mov %ebx,(%esp) 10a657: 68 cc a6 10 00 push $0x10a6cc 10a65c: ff 73 08 pushl 0x8(%ebx) 10a65f: 50 push %eax 10a660: 8d 43 10 lea 0x10(%ebx),%eax 10a663: 50 push %eax 10a664: e8 33 5e 00 00 call 11049c <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10a669: 83 c4 20 add $0x20,%esp 10a66c: 84 c0 test %al,%al 10a66e: 75 09 jne 10a679 _Thread_Enable_dispatch(); 10a670: e8 78 25 00 00 call 10cbed <_Thread_Enable_dispatch> 10a675: 31 c0 xor %eax,%eax return 0; 10a677: eb 4a jmp 10a6c3 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10a679: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a67d: 74 0d je 10a68c *ovalue = ptimer->timer_data; 10a67f: 8d 73 54 lea 0x54(%ebx),%esi 10a682: b9 04 00 00 00 mov $0x4,%ecx 10a687: 8b 7d 14 mov 0x14(%ebp),%edi 10a68a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10a68c: 8d 7b 54 lea 0x54(%ebx),%edi 10a68f: 8d 75 cc lea -0x34(%ebp),%esi 10a692: b9 04 00 00 00 mov $0x4,%ecx 10a697: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a699: c6 43 3c 03 movb $0x3,0x3c(%ebx) _TOD_Get( &ptimer->time ); 10a69d: 83 ec 0c sub $0xc,%esp 10a6a0: 83 c3 6c add $0x6c,%ebx 10a6a3: 53 push %ebx 10a6a4: e8 af 14 00 00 call 10bb58 <_TOD_Get> _Thread_Enable_dispatch(); 10a6a9: e8 3f 25 00 00 call 10cbed <_Thread_Enable_dispatch> 10a6ae: 31 c0 xor %eax,%eax return 0; 10a6b0: 83 c4 10 add $0x10,%esp 10a6b3: eb 0e jmp 10a6c3 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a6b5: e8 52 8e 00 00 call 11350c <__errno> 10a6ba: c7 00 16 00 00 00 movl $0x16,(%eax) 10a6c0: 83 c8 ff or $0xffffffff,%eax } 10a6c3: 8d 65 f4 lea -0xc(%ebp),%esp 10a6c6: 5b pop %ebx 10a6c7: 5e pop %esi 10a6c8: 5f pop %edi 10a6c9: c9 leave 10a6ca: c3 ret =============================================================================== 0010a370 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10a370: 55 push %ebp 10a371: 89 e5 mov %esp,%ebp 10a373: 57 push %edi 10a374: 56 push %esi 10a375: 53 push %ebx 10a376: 83 ec 1c sub $0x1c,%esp 10a379: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10a37c: 83 3d ec 8c 12 00 00 cmpl $0x0,0x128cec 10a383: 75 2c jne 10a3b1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a385: c7 05 d8 8c 12 00 00 movl $0x0,0x128cd8 10a38c: 00 00 00 the_watchdog->routine = routine; 10a38f: c7 05 ec 8c 12 00 52 movl $0x10a452,0x128cec 10a396: a4 10 00 the_watchdog->id = id; 10a399: c7 05 f0 8c 12 00 00 movl $0x0,0x128cf0 10a3a0: 00 00 00 the_watchdog->user_data = user_data; 10a3a3: c7 05 f4 8c 12 00 00 movl $0x0,0x128cf4 10a3aa: 00 00 00 10a3ad: 31 db xor %ebx,%ebx 10a3af: eb 4f jmp 10a400 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10a3b1: 83 ec 0c sub $0xc,%esp 10a3b4: 68 d0 8c 12 00 push $0x128cd0 10a3b9: e8 b6 33 00 00 call 10d774 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10a3be: 83 e8 02 sub $0x2,%eax 10a3c1: 83 c4 10 add $0x10,%esp 10a3c4: 31 db xor %ebx,%ebx 10a3c6: 83 f8 01 cmp $0x1,%eax 10a3c9: 77 35 ja 10a400 <== NEVER TAKEN * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 10a3cb: a1 e4 8c 12 00 mov 0x128ce4,%eax 10a3d0: 03 05 dc 8c 12 00 add 0x128cdc,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10a3d6: 51 push %ecx 10a3d7: 51 push %ecx 10a3d8: 8d 55 e0 lea -0x20(%ebp),%edx 10a3db: 52 push %edx 10a3dc: 2b 05 e8 8c 12 00 sub 0x128ce8,%eax 10a3e2: 50 push %eax 10a3e3: e8 38 2f 00 00 call 10d320 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10a3e8: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx remaining += tp.tv_nsec / 1000; 10a3ef: 8b 45 e4 mov -0x1c(%ebp),%eax 10a3f2: bf e8 03 00 00 mov $0x3e8,%edi 10a3f7: 99 cltd 10a3f8: f7 ff idiv %edi 10a3fa: 8d 1c 08 lea (%eax,%ecx,1),%ebx 10a3fd: 83 c4 10 add $0x10,%esp /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 10a400: 85 f6 test %esi,%esi 10a402: 74 44 je 10a448 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10a404: b9 40 42 0f 00 mov $0xf4240,%ecx 10a409: 89 f0 mov %esi,%eax 10a40b: 31 d2 xor %edx,%edx 10a40d: f7 f1 div %ecx 10a40f: 89 45 e0 mov %eax,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10a412: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 10a418: 89 55 e4 mov %edx,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 10a41b: 83 ec 0c sub $0xc,%esp 10a41e: 8d 75 e0 lea -0x20(%ebp),%esi 10a421: 56 push %esi 10a422: e8 55 2f 00 00 call 10d37c <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10a427: 89 34 24 mov %esi,(%esp) 10a42a: e8 4d 2f 00 00 call 10d37c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a42f: a3 dc 8c 12 00 mov %eax,0x128cdc _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a434: 58 pop %eax 10a435: 5a pop %edx 10a436: 68 d0 8c 12 00 push $0x128cd0 10a43b: 68 d4 84 12 00 push $0x1284d4 10a440: e8 1b 32 00 00 call 10d660 <_Watchdog_Insert> 10a445: 83 c4 10 add $0x10,%esp } return remaining; } 10a448: 89 d8 mov %ebx,%eax 10a44a: 8d 65 f4 lea -0xc(%ebp),%esp 10a44d: 5b pop %ebx 10a44e: 5e pop %esi 10a44f: 5f pop %edi 10a450: c9 leave 10a451: c3 ret