0010c890 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10c890: 55 push %ebp 10c891: 89 e5 mov %esp,%ebp 10c893: 57 push %edi 10c894: 56 push %esi 10c895: 53 push %ebx 10c896: 83 ec 1c sub $0x1c,%esp 10c899: 8b 5d 08 mov 0x8(%ebp),%ebx 10c89c: 8b 4d 0c mov 0xc(%ebp),%ecx 10c89f: 8b 45 14 mov 0x14(%ebp),%eax 10c8a2: 89 45 e4 mov %eax,-0x1c(%ebp) 10c8a5: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c8a8: 8b 35 c0 72 12 00 mov 0x1272c0,%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 ); 10c8ae: 9c pushf 10c8af: fa cli 10c8b0: 5f pop %edi switch ( the_rwlock->current_state ) { 10c8b1: 8b 43 44 mov 0x44(%ebx),%eax 10c8b4: 85 c0 test %eax,%eax 10c8b6: 74 05 je 10c8bd <_CORE_RWLock_Obtain_for_reading+0x2d> 10c8b8: 48 dec %eax 10c8b9: 75 3a jne 10c8f5 <_CORE_RWLock_Obtain_for_reading+0x65> 10c8bb: eb 0e jmp 10c8cb <_CORE_RWLock_Obtain_for_reading+0x3b> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10c8bd: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10c8c4: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10c8c7: 57 push %edi 10c8c8: 9d popf 10c8c9: eb 21 jmp 10c8ec <_CORE_RWLock_Obtain_for_reading+0x5c> 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 ); 10c8cb: 83 ec 0c sub $0xc,%esp 10c8ce: 53 push %ebx 10c8cf: 88 55 dc mov %dl,-0x24(%ebp) 10c8d2: 89 4d e0 mov %ecx,-0x20(%ebp) 10c8d5: e8 8a 1a 00 00 call 10e364 <_Thread_queue_First> if ( !waiter ) { 10c8da: 83 c4 10 add $0x10,%esp 10c8dd: 85 c0 test %eax,%eax 10c8df: 8a 55 dc mov -0x24(%ebp),%dl 10c8e2: 8b 4d e0 mov -0x20(%ebp),%ecx 10c8e5: 75 0e jne 10c8f5 <_CORE_RWLock_Obtain_for_reading+0x65><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10c8e7: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10c8ea: 57 push %edi 10c8eb: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c8ec: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10c8f3: eb 48 jmp 10c93d <_CORE_RWLock_Obtain_for_reading+0xad> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10c8f5: 84 d2 test %dl,%dl 10c8f7: 75 0b jne 10c904 <_CORE_RWLock_Obtain_for_reading+0x74> _ISR_Enable( level ); 10c8f9: 57 push %edi 10c8fa: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c8fb: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) 10c902: eb 39 jmp 10c93d <_CORE_RWLock_Obtain_for_reading+0xad> 10c904: 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; 10c90b: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10c90e: 89 4e 20 mov %ecx,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10c911: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c918: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10c91f: 57 push %edi 10c920: 9d popf _Thread_queue_Enqueue_with_handler( 10c921: c7 45 10 6c ca 10 00 movl $0x10ca6c,0x10(%ebp) 10c928: 8b 45 e4 mov -0x1c(%ebp),%eax 10c92b: 89 45 0c mov %eax,0xc(%ebp) 10c92e: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c931: 8d 65 f4 lea -0xc(%ebp),%esp 10c934: 5b pop %ebx 10c935: 5e pop %esi 10c936: 5f pop %edi 10c937: 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( 10c938: e9 4f 17 00 00 jmp 10e08c <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c93d: 8d 65 f4 lea -0xc(%ebp),%esp 10c940: 5b pop %ebx 10c941: 5e pop %esi 10c942: 5f pop %edi 10c943: c9 leave 10c944: c3 ret 0010c9cc <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10c9cc: 55 push %ebp 10c9cd: 89 e5 mov %esp,%ebp 10c9cf: 53 push %ebx 10c9d0: 83 ec 04 sub $0x4,%esp 10c9d3: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c9d6: 8b 15 c0 72 12 00 mov 0x1272c0,%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 ); 10c9dc: 9c pushf 10c9dd: fa cli 10c9de: 58 pop %eax if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10c9df: 8b 4b 44 mov 0x44(%ebx),%ecx 10c9e2: 85 c9 test %ecx,%ecx 10c9e4: 75 0b jne 10c9f1 <_CORE_RWLock_Release+0x25> _ISR_Enable( level ); 10c9e6: 50 push %eax 10c9e7: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c9e8: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) return CORE_RWLOCK_SUCCESSFUL; 10c9ef: eb 72 jmp 10ca63 <_CORE_RWLock_Release+0x97> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10c9f1: 49 dec %ecx 10c9f2: 75 0f jne 10ca03 <_CORE_RWLock_Release+0x37> the_rwlock->number_of_readers -= 1; 10c9f4: 8b 4b 48 mov 0x48(%ebx),%ecx 10c9f7: 49 dec %ecx 10c9f8: 89 4b 48 mov %ecx,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10c9fb: 85 c9 test %ecx,%ecx 10c9fd: 74 04 je 10ca03 <_CORE_RWLock_Release+0x37> /* must be unlocked again */ _ISR_Enable( level ); 10c9ff: 50 push %eax 10ca00: 9d popf return CORE_RWLOCK_SUCCESSFUL; 10ca01: eb 60 jmp 10ca63 <_CORE_RWLock_Release+0x97> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10ca03: 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; 10ca0a: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10ca11: 50 push %eax 10ca12: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10ca13: 83 ec 0c sub $0xc,%esp 10ca16: 53 push %ebx 10ca17: e8 6c 15 00 00 call 10df88 <_Thread_queue_Dequeue> if ( next ) { 10ca1c: 83 c4 10 add $0x10,%esp 10ca1f: 85 c0 test %eax,%eax 10ca21: 74 40 je 10ca63 <_CORE_RWLock_Release+0x97> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10ca23: 83 78 30 01 cmpl $0x1,0x30(%eax) 10ca27: 75 09 jne 10ca32 <_CORE_RWLock_Release+0x66> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10ca29: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10ca30: eb 31 jmp 10ca63 <_CORE_RWLock_Release+0x97> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10ca32: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10ca35: 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 ); 10ca3c: 83 ec 0c sub $0xc,%esp 10ca3f: 53 push %ebx 10ca40: e8 1f 19 00 00 call 10e364 <_Thread_queue_First> if ( !next || 10ca45: 83 c4 10 add $0x10,%esp 10ca48: 85 c0 test %eax,%eax 10ca4a: 74 17 je 10ca63 <_CORE_RWLock_Release+0x97> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10ca4c: 83 78 30 01 cmpl $0x1,0x30(%eax) 10ca50: 74 11 je 10ca63 <_CORE_RWLock_Release+0x97><== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10ca52: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10ca55: 52 push %edx 10ca56: 52 push %edx 10ca57: 50 push %eax 10ca58: 53 push %ebx 10ca59: e8 f6 17 00 00 call 10e254 <_Thread_queue_Extract> } 10ca5e: 83 c4 10 add $0x10,%esp 10ca61: eb d9 jmp 10ca3c <_CORE_RWLock_Release+0x70> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10ca63: 31 c0 xor %eax,%eax 10ca65: 8b 5d fc mov -0x4(%ebp),%ebx 10ca68: c9 leave 10ca69: c3 ret 0010ca6c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10ca6c: 55 push %ebp 10ca6d: 89 e5 mov %esp,%ebp 10ca6f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ca72: 8d 45 f4 lea -0xc(%ebp),%eax 10ca75: 50 push %eax 10ca76: ff 75 08 pushl 0x8(%ebp) 10ca79: e8 7a 11 00 00 call 10dbf8 <_Thread_Get> switch ( location ) { 10ca7e: 83 c4 10 add $0x10,%esp 10ca81: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ca85: 75 17 jne 10ca9e <_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 ); 10ca87: 83 ec 0c sub $0xc,%esp 10ca8a: 50 push %eax 10ca8b: e8 94 19 00 00 call 10e424 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ca90: a1 04 72 12 00 mov 0x127204,%eax 10ca95: 48 dec %eax 10ca96: a3 04 72 12 00 mov %eax,0x127204 10ca9b: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10ca9e: c9 leave 10ca9f: c3 ret 001174a0 <_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 ) { 1174a0: 55 push %ebp 1174a1: 89 e5 mov %esp,%ebp 1174a3: 57 push %edi 1174a4: 56 push %esi 1174a5: 53 push %ebx 1174a6: 83 ec 1c sub $0x1c,%esp 1174a9: 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 ) { 1174ac: b8 01 00 00 00 mov $0x1,%eax 1174b1: 8b 55 10 mov 0x10(%ebp),%edx 1174b4: 3b 53 4c cmp 0x4c(%ebx),%edx 1174b7: 77 4c ja 117505 <_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))) { 1174b9: 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 ) { 1174c0: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 1174c4: 74 23 je 1174e9 <_CORE_message_queue_Broadcast+0x49> *count = 0; 1174c6: 8b 45 1c mov 0x1c(%ebp),%eax 1174c9: c7 00 00 00 00 00 movl $0x0,(%eax) 1174cf: eb 32 jmp 117503 <_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; 1174d1: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1174d4: 8b 42 2c mov 0x2c(%edx),%eax 1174d7: 89 c7 mov %eax,%edi 1174d9: 8b 75 0c mov 0xc(%ebp),%esi 1174dc: 8b 4d 10 mov 0x10(%ebp),%ecx 1174df: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1174e1: 8b 42 28 mov 0x28(%edx),%eax 1174e4: 8b 55 10 mov 0x10(%ebp),%edx 1174e7: 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))) { 1174e9: 83 ec 0c sub $0xc,%esp 1174ec: 53 push %ebx 1174ed: e8 c2 21 00 00 call 1196b4 <_Thread_queue_Dequeue> 1174f2: 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 = 1174f4: 83 c4 10 add $0x10,%esp 1174f7: 85 c0 test %eax,%eax 1174f9: 75 d6 jne 1174d1 <_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; 1174fb: 8b 55 e4 mov -0x1c(%ebp),%edx 1174fe: 8b 45 1c mov 0x1c(%ebp),%eax 117501: 89 10 mov %edx,(%eax) 117503: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 117505: 8d 65 f4 lea -0xc(%ebp),%esp 117508: 5b pop %ebx 117509: 5e pop %esi 11750a: 5f pop %edi 11750b: c9 leave 11750c: c3 ret 00112384 <_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 ) { 112384: 55 push %ebp 112385: 89 e5 mov %esp,%ebp 112387: 57 push %edi 112388: 56 push %esi 112389: 53 push %ebx 11238a: 83 ec 0c sub $0xc,%esp 11238d: 8b 5d 08 mov 0x8(%ebp),%ebx 112390: 8b 75 10 mov 0x10(%ebp),%esi 112393: 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; 112396: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 112399: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1123a0: 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; 1123a3: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 1123aa: 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)) { 1123b1: 89 d0 mov %edx,%eax 1123b3: f6 c2 03 test $0x3,%dl 1123b6: 74 0a je 1123c2 <_CORE_message_queue_Initialize+0x3e> allocated_message_size += sizeof(uint32_t); 1123b8: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 1123bb: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 1123be: 39 d0 cmp %edx,%eax 1123c0: 72 5f jb 112421 <_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)); 1123c2: 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 * 1123c5: 89 fa mov %edi,%edx 1123c7: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1123ca: 39 c2 cmp %eax,%edx 1123cc: 72 53 jb 112421 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 1123ce: 83 ec 0c sub $0xc,%esp 1123d1: 52 push %edx 1123d2: e8 35 26 00 00 call 114a0c <_Workspace_Allocate> 1123d7: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 1123da: 83 c4 10 add $0x10,%esp 1123dd: 85 c0 test %eax,%eax 1123df: 74 40 je 112421 <_CORE_message_queue_Initialize+0x9d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 1123e1: 57 push %edi 1123e2: 56 push %esi 1123e3: 50 push %eax 1123e4: 8d 43 68 lea 0x68(%ebx),%eax 1123e7: 50 push %eax 1123e8: e8 27 45 00 00 call 116914 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1123ed: 8d 43 54 lea 0x54(%ebx),%eax 1123f0: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 1123f3: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 1123fa: 8d 43 50 lea 0x50(%ebx),%eax 1123fd: 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( 112400: 6a 06 push $0x6 112402: 68 80 00 00 00 push $0x80 112407: 8b 45 0c mov 0xc(%ebp),%eax 11240a: 83 38 01 cmpl $0x1,(%eax) 11240d: 0f 94 c0 sete %al 112410: 0f b6 c0 movzbl %al,%eax 112413: 50 push %eax 112414: 53 push %ebx 112415: e8 ca 1c 00 00 call 1140e4 <_Thread_queue_Initialize> 11241a: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11241c: 83 c4 20 add $0x20,%esp 11241f: eb 02 jmp 112423 <_CORE_message_queue_Initialize+0x9f> 112421: 31 c0 xor %eax,%eax } 112423: 8d 65 f4 lea -0xc(%ebp),%esp 112426: 5b pop %ebx 112427: 5e pop %esi 112428: 5f pop %edi 112429: c9 leave 11242a: c3 ret 0011242c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 11242c: 55 push %ebp 11242d: 89 e5 mov %esp,%ebp 11242f: 57 push %edi 112430: 56 push %esi 112431: 53 push %ebx 112432: 83 ec 2c sub $0x2c,%esp 112435: 8b 55 08 mov 0x8(%ebp),%edx 112438: 8b 45 0c mov 0xc(%ebp),%eax 11243b: 89 45 dc mov %eax,-0x24(%ebp) 11243e: 8b 5d 10 mov 0x10(%ebp),%ebx 112441: 89 5d e0 mov %ebx,-0x20(%ebp) 112444: 8b 4d 14 mov 0x14(%ebp),%ecx 112447: 8b 75 1c mov 0x1c(%ebp),%esi 11244a: 89 75 d4 mov %esi,-0x2c(%ebp) 11244d: 8a 45 18 mov 0x18(%ebp),%al 112450: 88 45 db mov %al,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 112453: a1 18 d4 12 00 mov 0x12d418,%eax executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 112458: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Disable( level ); 11245f: 9c pushf 112460: fa cli 112461: 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)); 112464: 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; 112467: 8d 72 54 lea 0x54(%edx),%esi 11246a: 39 f3 cmp %esi,%ebx 11246c: 0f 84 8a 00 00 00 je 1124fc <_CORE_message_queue_Seize+0xd0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112472: 8b 33 mov (%ebx),%esi the_chain->first = new_first; 112474: 89 72 50 mov %esi,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 112477: 8d 7a 50 lea 0x50(%edx),%edi 11247a: 89 7e 04 mov %edi,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 11247d: 85 db test %ebx,%ebx 11247f: 74 7b je 1124fc <_CORE_message_queue_Seize+0xd0><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 112481: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 112484: ff 75 e4 pushl -0x1c(%ebp) 112487: 9d popf *size_p = the_message->Contents.size; 112488: 8b 43 0c mov 0xc(%ebx),%eax 11248b: 89 01 mov %eax,(%ecx) _Thread_Executing->Wait.count = 11248d: 8b 73 08 mov 0x8(%ebx),%esi 112490: a1 18 d4 12 00 mov 0x12d418,%eax 112495: 89 70 24 mov %esi,0x24(%eax) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 112498: 8d 73 10 lea 0x10(%ebx),%esi 11249b: 89 75 e4 mov %esi,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11249e: 8b 09 mov (%ecx),%ecx 1124a0: 8b 7d e0 mov -0x20(%ebp),%edi 1124a3: 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 ); 1124a5: 83 ec 0c sub $0xc,%esp 1124a8: 52 push %edx 1124a9: 89 55 d0 mov %edx,-0x30(%ebp) 1124ac: e8 17 19 00 00 call 113dc8 <_Thread_queue_Dequeue> if ( !the_thread ) { 1124b1: 83 c4 10 add $0x10,%esp 1124b4: 85 c0 test %eax,%eax 1124b6: 8b 55 d0 mov -0x30(%ebp),%edx 1124b9: 75 15 jne 1124d0 <_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 ); 1124bb: 89 5d 0c mov %ebx,0xc(%ebp) 1124be: 83 c2 68 add $0x68,%edx 1124c1: 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 ); } 1124c4: 8d 65 f4 lea -0xc(%ebp),%esp 1124c7: 5b pop %ebx 1124c8: 5e pop %esi 1124c9: 5f pop %edi 1124ca: c9 leave 1124cb: e9 34 fe ff ff jmp 112304 <_Chain_Append> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 1124d0: 8b 48 24 mov 0x24(%eax),%ecx 1124d3: 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; 1124d6: 8b 48 30 mov 0x30(%eax),%ecx 1124d9: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1124dc: 8b 70 2c mov 0x2c(%eax),%esi 1124df: 8b 7d e4 mov -0x1c(%ebp),%edi 1124e2: 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( 1124e4: 8b 43 08 mov 0x8(%ebx),%eax 1124e7: 89 45 10 mov %eax,0x10(%ebp) 1124ea: 89 5d 0c mov %ebx,0xc(%ebp) 1124ed: 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 ); } 1124f0: 8d 65 f4 lea -0xc(%ebp),%esp 1124f3: 5b pop %ebx 1124f4: 5e pop %esi 1124f5: 5f pop %edi 1124f6: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 1124f7: e9 50 44 00 00 jmp 11694c <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 1124fc: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 112500: 75 13 jne 112515 <_CORE_message_queue_Seize+0xe9> _ISR_Enable( level ); 112502: ff 75 e4 pushl -0x1c(%ebp) 112505: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112506: 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 ); } 11250d: 8d 65 f4 lea -0xc(%ebp),%esp 112510: 5b pop %ebx 112511: 5e pop %esi 112512: 5f pop %edi 112513: c9 leave 112514: 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; 112515: 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; 11251c: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 11251f: 8b 5d dc mov -0x24(%ebp),%ebx 112522: 89 58 20 mov %ebx,0x20(%eax) executing->Wait.return_argument_second.mutable_object = buffer; 112525: 8b 75 e0 mov -0x20(%ebp),%esi 112528: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.return_argument = size_p; 11252b: 89 48 28 mov %ecx,0x28(%eax) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 11252e: ff 75 e4 pushl -0x1c(%ebp) 112531: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112532: c7 45 10 88 41 11 00 movl $0x114188,0x10(%ebp) 112539: 8b 45 d4 mov -0x2c(%ebp),%eax 11253c: 89 45 0c mov %eax,0xc(%ebp) 11253f: 89 55 08 mov %edx,0x8(%ebp) } 112542: 8d 65 f4 lea -0xc(%ebp),%esp 112545: 5b pop %ebx 112546: 5e pop %esi 112547: 5f pop %edi 112548: 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 ); 112549: e9 7e 19 00 00 jmp 113ecc <_Thread_queue_Enqueue_with_handler> 0010aa85 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10aa85: 55 push %ebp 10aa86: 89 e5 mov %esp,%ebp 10aa88: 53 push %ebx 10aa89: 83 ec 14 sub $0x14,%esp 10aa8c: 8b 5d 08 mov 0x8(%ebp),%ebx 10aa8f: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10aa92: a1 f4 41 12 00 mov 0x1241f4,%eax 10aa97: 85 c0 test %eax,%eax 10aa99: 74 19 je 10aab4 <_CORE_mutex_Seize+0x2f> 10aa9b: 84 d2 test %dl,%dl 10aa9d: 74 15 je 10aab4 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10aa9f: 83 3d 8c 43 12 00 01 cmpl $0x1,0x12438c 10aaa6: 76 0c jbe 10aab4 <_CORE_mutex_Seize+0x2f> 10aaa8: 53 push %ebx 10aaa9: 6a 13 push $0x13 10aaab: 6a 00 push $0x0 10aaad: 6a 00 push $0x0 10aaaf: e8 60 05 00 00 call 10b014 <_Internal_error_Occurred> 10aab4: 51 push %ecx 10aab5: 51 push %ecx 10aab6: 8d 45 18 lea 0x18(%ebp),%eax 10aab9: 50 push %eax 10aaba: 53 push %ebx 10aabb: 88 55 f4 mov %dl,-0xc(%ebp) 10aabe: e8 f1 41 00 00 call 10ecb4 <_CORE_mutex_Seize_interrupt_trylock> 10aac3: 83 c4 10 add $0x10,%esp 10aac6: 85 c0 test %eax,%eax 10aac8: 8a 55 f4 mov -0xc(%ebp),%dl 10aacb: 74 48 je 10ab15 <_CORE_mutex_Seize+0x90> 10aacd: 84 d2 test %dl,%dl 10aacf: 75 12 jne 10aae3 <_CORE_mutex_Seize+0x5e> 10aad1: ff 75 18 pushl 0x18(%ebp) 10aad4: 9d popf 10aad5: a1 b0 42 12 00 mov 0x1242b0,%eax 10aada: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10aae1: eb 32 jmp 10ab15 <_CORE_mutex_Seize+0x90> 10aae3: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10aaea: a1 b0 42 12 00 mov 0x1242b0,%eax 10aaef: 89 58 44 mov %ebx,0x44(%eax) 10aaf2: 8b 55 0c mov 0xc(%ebp),%edx 10aaf5: 89 50 20 mov %edx,0x20(%eax) 10aaf8: a1 f4 41 12 00 mov 0x1241f4,%eax 10aafd: 40 inc %eax 10aafe: a3 f4 41 12 00 mov %eax,0x1241f4 10ab03: ff 75 18 pushl 0x18(%ebp) 10ab06: 9d popf 10ab07: 50 push %eax 10ab08: 50 push %eax 10ab09: ff 75 14 pushl 0x14(%ebp) 10ab0c: 53 push %ebx 10ab0d: e8 26 ff ff ff call 10aa38 <_CORE_mutex_Seize_interrupt_blocking> 10ab12: 83 c4 10 add $0x10,%esp } 10ab15: 8b 5d fc mov -0x4(%ebp),%ebx 10ab18: c9 leave 10ab19: c3 ret 0010ac48 <_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 ) { 10ac48: 55 push %ebp 10ac49: 89 e5 mov %esp,%ebp 10ac4b: 53 push %ebx 10ac4c: 83 ec 10 sub $0x10,%esp 10ac4f: 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)) ) { 10ac52: 53 push %ebx 10ac53: e8 0c 14 00 00 call 10c064 <_Thread_queue_Dequeue> 10ac58: 89 c2 mov %eax,%edx 10ac5a: 83 c4 10 add $0x10,%esp 10ac5d: 31 c0 xor %eax,%eax 10ac5f: 85 d2 test %edx,%edx 10ac61: 75 15 jne 10ac78 <_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 ); 10ac63: 9c pushf 10ac64: fa cli 10ac65: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10ac66: 8b 53 48 mov 0x48(%ebx),%edx 10ac69: b0 04 mov $0x4,%al 10ac6b: 3b 53 40 cmp 0x40(%ebx),%edx 10ac6e: 73 06 jae 10ac76 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10ac70: 42 inc %edx 10ac71: 89 53 48 mov %edx,0x48(%ebx) 10ac74: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10ac76: 51 push %ecx 10ac77: 9d popf } return status; } 10ac78: 8b 5d fc mov -0x4(%ebp),%ebx 10ac7b: c9 leave 10ac7c: c3 ret 00109a78 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 109a78: 55 push %ebp 109a79: 89 e5 mov %esp,%ebp 109a7b: 57 push %edi 109a7c: 56 push %esi 109a7d: 53 push %ebx 109a7e: 83 ec 1c sub $0x1c,%esp 109a81: 8b 45 08 mov 0x8(%ebp),%eax 109a84: 8b 75 0c mov 0xc(%ebp),%esi 109a87: 8b 55 10 mov 0x10(%ebp),%edx 109a8a: 89 55 dc mov %edx,-0x24(%ebp) 109a8d: 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; 109a90: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 109a96: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 109a9d: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi _ISR_Disable( level ); 109aa3: 9c pushf 109aa4: fa cli 109aa5: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 109aa8: 8b 17 mov (%edi),%edx 109aaa: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 109aad: 21 c2 and %eax,%edx 109aaf: 74 1b je 109acc <_Event_Seize+0x54> 109ab1: 39 c2 cmp %eax,%edx 109ab3: 74 08 je 109abd <_Event_Seize+0x45> 109ab5: f7 c6 02 00 00 00 test $0x2,%esi 109abb: 74 0f je 109acc <_Event_Seize+0x54> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 109abd: 89 d0 mov %edx,%eax 109abf: f7 d0 not %eax 109ac1: 23 45 e0 and -0x20(%ebp),%eax 109ac4: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 109ac6: ff 75 e4 pushl -0x1c(%ebp) 109ac9: 9d popf 109aca: eb 13 jmp 109adf <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 109acc: f7 c6 01 00 00 00 test $0x1,%esi 109ad2: 74 12 je 109ae6 <_Event_Seize+0x6e> _ISR_Enable( level ); 109ad4: ff 75 e4 pushl -0x1c(%ebp) 109ad7: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 109ad8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 109adf: 89 11 mov %edx,(%ecx) return; 109ae1: e9 91 00 00 00 jmp 109b77 <_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; 109ae6: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 109ae9: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 109aec: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 109aef: c7 05 f4 4a 12 00 01 movl $0x1,0x124af4 109af6: 00 00 00 _ISR_Enable( level ); 109af9: ff 75 e4 pushl -0x1c(%ebp) 109afc: 9d popf if ( ticks ) { 109afd: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 109b01: 74 34 je 109b37 <_Event_Seize+0xbf> _Watchdog_Initialize( 109b03: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109b06: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 109b0d: c7 43 64 b4 9c 10 00 movl $0x109cb4,0x64(%ebx) the_watchdog->id = id; 109b14: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 109b17: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 109b1e: 8b 45 dc mov -0x24(%ebp),%eax 109b21: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 109b24: 52 push %edx 109b25: 52 push %edx 109b26: 8d 43 48 lea 0x48(%ebx),%eax 109b29: 50 push %eax 109b2a: 68 d0 42 12 00 push $0x1242d0 109b2f: e8 60 2f 00 00 call 10ca94 <_Watchdog_Insert> 109b34: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 109b37: 50 push %eax 109b38: 50 push %eax 109b39: 68 00 01 00 00 push $0x100 109b3e: 53 push %ebx 109b3f: e8 7c 29 00 00 call 10c4c0 <_Thread_Set_state> _ISR_Disable( level ); 109b44: 9c pushf 109b45: fa cli 109b46: 5a pop %edx sync_state = _Event_Sync_state; 109b47: a1 f4 4a 12 00 mov 0x124af4,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 109b4c: c7 05 f4 4a 12 00 00 movl $0x0,0x124af4 109b53: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 109b56: 83 c4 10 add $0x10,%esp 109b59: 83 f8 01 cmp $0x1,%eax 109b5c: 75 04 jne 109b62 <_Event_Seize+0xea> _ISR_Enable( level ); 109b5e: 52 push %edx 109b5f: 9d popf 109b60: eb 15 jmp 109b77 <_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 ); 109b62: 89 55 10 mov %edx,0x10(%ebp) 109b65: 89 5d 0c mov %ebx,0xc(%ebp) 109b68: 89 45 08 mov %eax,0x8(%ebp) } 109b6b: 8d 65 f4 lea -0xc(%ebp),%esp 109b6e: 5b pop %ebx 109b6f: 5e pop %esi 109b70: 5f pop %edi 109b71: 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 ); 109b72: e9 51 1c 00 00 jmp 10b7c8 <_Thread_blocking_operation_Cancel> } 109b77: 8d 65 f4 lea -0xc(%ebp),%esp 109b7a: 5b pop %ebx 109b7b: 5e pop %esi 109b7c: 5f pop %edi 109b7d: c9 leave 109b7e: c3 ret 00109bcc <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109bcc: 55 push %ebp 109bcd: 89 e5 mov %esp,%ebp 109bcf: 57 push %edi 109bd0: 56 push %esi 109bd1: 53 push %ebx 109bd2: 83 ec 2c sub $0x2c,%esp 109bd5: 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 ]; 109bd8: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109bde: 8b 43 30 mov 0x30(%ebx),%eax 109be1: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109be4: 9c pushf 109be5: fa cli 109be6: 58 pop %eax pending_events = api->pending_events; 109be7: 8b 17 mov (%edi),%edx 109be9: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109bec: 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 ) ) { 109bef: 21 f2 and %esi,%edx 109bf1: 75 07 jne 109bfa <_Event_Surrender+0x2e> _ISR_Enable( level ); 109bf3: 50 push %eax 109bf4: 9d popf return; 109bf5: e9 b0 00 00 00 jmp 109caa <_Event_Surrender+0xde> /* * 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() && 109bfa: 8b 0d 8c 42 12 00 mov 0x12428c,%ecx 109c00: 85 c9 test %ecx,%ecx 109c02: 74 49 je 109c4d <_Event_Surrender+0x81> 109c04: 3b 1d b0 42 12 00 cmp 0x1242b0,%ebx 109c0a: 75 41 jne 109c4d <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109c0c: 8b 0d f4 4a 12 00 mov 0x124af4,%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() && 109c12: 83 f9 02 cmp $0x2,%ecx 109c15: 74 09 je 109c20 <_Event_Surrender+0x54> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109c17: 8b 0d f4 4a 12 00 mov 0x124af4,%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() && 109c1d: 49 dec %ecx 109c1e: 75 2d jne 109c4d <_Event_Surrender+0x81> _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) ) { 109c20: 39 f2 cmp %esi,%edx 109c22: 74 06 je 109c2a <_Event_Surrender+0x5e> 109c24: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109c28: 74 1f je 109c49 <_Event_Surrender+0x7d> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 109c2a: 89 d6 mov %edx,%esi 109c2c: f7 d6 not %esi 109c2e: 23 75 d4 and -0x2c(%ebp),%esi 109c31: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109c33: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109c3a: 8b 4b 28 mov 0x28(%ebx),%ecx 109c3d: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109c3f: c7 05 f4 4a 12 00 03 movl $0x3,0x124af4 109c46: 00 00 00 } _ISR_Enable( level ); 109c49: 50 push %eax 109c4a: 9d popf return; 109c4b: eb 5d jmp 109caa <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109c4d: f6 43 11 01 testb $0x1,0x11(%ebx) 109c51: 74 55 je 109ca8 <_Event_Surrender+0xdc> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109c53: 39 f2 cmp %esi,%edx 109c55: 74 06 je 109c5d <_Event_Surrender+0x91> 109c57: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109c5b: 74 4b je 109ca8 <_Event_Surrender+0xdc> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 109c5d: 89 d6 mov %edx,%esi 109c5f: f7 d6 not %esi 109c61: 23 75 d4 and -0x2c(%ebp),%esi 109c64: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109c66: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109c6d: 8b 4b 28 mov 0x28(%ebx),%ecx 109c70: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109c72: 50 push %eax 109c73: 9d popf 109c74: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109c75: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109c79: 74 06 je 109c81 <_Event_Surrender+0xb5> _ISR_Enable( level ); 109c7b: 50 push %eax 109c7c: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109c7d: 51 push %ecx 109c7e: 51 push %ecx 109c7f: eb 17 jmp 109c98 <_Event_Surrender+0xcc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109c81: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109c88: 50 push %eax 109c89: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109c8a: 83 ec 0c sub $0xc,%esp 109c8d: 8d 43 48 lea 0x48(%ebx),%eax 109c90: 50 push %eax 109c91: e8 16 2f 00 00 call 10cbac <_Watchdog_Remove> 109c96: 58 pop %eax 109c97: 5a pop %edx 109c98: 68 f8 ff 03 10 push $0x1003fff8 109c9d: 53 push %ebx 109c9e: e8 91 1c 00 00 call 10b934 <_Thread_Clear_state> 109ca3: 83 c4 10 add $0x10,%esp 109ca6: eb 02 jmp 109caa <_Event_Surrender+0xde> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109ca8: 50 push %eax 109ca9: 9d popf } 109caa: 8d 65 f4 lea -0xc(%ebp),%esp 109cad: 5b pop %ebx 109cae: 5e pop %esi 109caf: 5f pop %edi 109cb0: c9 leave 109cb1: c3 ret 00109cb4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109cb4: 55 push %ebp 109cb5: 89 e5 mov %esp,%ebp 109cb7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109cba: 8d 45 f4 lea -0xc(%ebp),%eax 109cbd: 50 push %eax 109cbe: ff 75 08 pushl 0x8(%ebp) 109cc1: e8 0e 20 00 00 call 10bcd4 <_Thread_Get> switch ( location ) { 109cc6: 83 c4 10 add $0x10,%esp 109cc9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ccd: 75 49 jne 109d18 <_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 ); 109ccf: 9c pushf 109cd0: fa cli 109cd1: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109cd2: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109cd9: 3b 05 b0 42 12 00 cmp 0x1242b0,%eax 109cdf: 75 13 jne 109cf4 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109ce1: 8b 0d f4 4a 12 00 mov 0x124af4,%ecx 109ce7: 49 dec %ecx 109ce8: 75 0a jne 109cf4 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109cea: c7 05 f4 4a 12 00 02 movl $0x2,0x124af4 109cf1: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109cf4: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109cfb: 52 push %edx 109cfc: 9d popf 109cfd: 52 push %edx 109cfe: 52 push %edx 109cff: 68 f8 ff 03 10 push $0x1003fff8 109d04: 50 push %eax 109d05: e8 2a 1c 00 00 call 10b934 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109d0a: a1 f4 41 12 00 mov 0x1241f4,%eax 109d0f: 48 dec %eax 109d10: a3 f4 41 12 00 mov %eax,0x1241f4 109d15: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109d18: c9 leave 109d19: c3 ret 0010ee4c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10ee4c: 55 push %ebp 10ee4d: 89 e5 mov %esp,%ebp 10ee4f: 57 push %edi 10ee50: 56 push %esi 10ee51: 53 push %ebx 10ee52: 83 ec 2c sub $0x2c,%esp 10ee55: 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; 10ee58: 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; 10ee5b: 8b 46 10 mov 0x10(%esi),%eax 10ee5e: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10ee61: 8b 45 0c mov 0xc(%ebp),%eax 10ee64: 83 c0 04 add $0x4,%eax 10ee67: 89 45 cc mov %eax,-0x34(%ebp) 10ee6a: 0f 82 2f 01 00 00 jb 10ef9f <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10ee70: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10ee74: 74 18 je 10ee8e <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10ee76: 8b 45 0c mov 0xc(%ebp),%eax 10ee79: 39 45 14 cmp %eax,0x14(%ebp) 10ee7c: 0f 82 1d 01 00 00 jb 10ef9f <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10ee82: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10ee86: 75 06 jne 10ee8e <_Heap_Allocate_aligned_with_boundary+0x42> 10ee88: 8b 45 e0 mov -0x20(%ebp),%eax 10ee8b: 89 45 10 mov %eax,0x10(%ebp) 10ee8e: 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; 10ee95: 8b 45 e0 mov -0x20(%ebp),%eax 10ee98: 83 c0 07 add $0x7,%eax 10ee9b: 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; 10ee9e: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10eea5: 8b 45 0c mov 0xc(%ebp),%eax 10eea8: 29 45 d8 sub %eax,-0x28(%ebp) 10eeab: 89 f7 mov %esi,%edi 10eead: e9 ba 00 00 00 jmp 10ef6c <_Heap_Allocate_aligned_with_boundary+0x120> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10eeb2: 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 ) { 10eeb5: 8b 59 04 mov 0x4(%ecx),%ebx 10eeb8: 3b 5d cc cmp -0x34(%ebp),%ebx 10eebb: 0f 86 a8 00 00 00 jbe 10ef69 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10eec1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10eec5: 8d 41 08 lea 0x8(%ecx),%eax 10eec8: 89 45 dc mov %eax,-0x24(%ebp) 10eecb: 75 07 jne 10eed4 <_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; 10eecd: 89 c3 mov %eax,%ebx 10eecf: e9 91 00 00 00 jmp 10ef65 <_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; 10eed4: 8b 47 14 mov 0x14(%edi),%eax 10eed7: 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; 10eeda: 83 e3 fe and $0xfffffffe,%ebx 10eedd: 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; 10eee0: 8b 75 c8 mov -0x38(%ebp),%esi 10eee3: 29 c6 sub %eax,%esi 10eee5: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10eee7: 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); 10eeea: 89 d8 mov %ebx,%eax 10eeec: 31 d2 xor %edx,%edx 10eeee: f7 75 10 divl 0x10(%ebp) 10eef1: 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 ) { 10eef3: 39 f3 cmp %esi,%ebx 10eef5: 76 0b jbe 10ef02 <_Heap_Allocate_aligned_with_boundary+0xb6> 10eef7: 89 f0 mov %esi,%eax 10eef9: 31 d2 xor %edx,%edx 10eefb: f7 75 10 divl 0x10(%ebp) 10eefe: 89 f3 mov %esi,%ebx 10ef00: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10ef02: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10ef06: 74 3f je 10ef47 <_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; 10ef08: 8b 45 0c mov 0xc(%ebp),%eax 10ef0b: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10ef0e: 8b 45 dc mov -0x24(%ebp),%eax 10ef11: 03 45 0c add 0xc(%ebp),%eax 10ef14: 89 45 d0 mov %eax,-0x30(%ebp) 10ef17: eb 19 jmp 10ef32 <_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 ) { 10ef19: 3b 55 d0 cmp -0x30(%ebp),%edx 10ef1c: 72 4b jb 10ef69 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10ef1e: 89 d3 mov %edx,%ebx 10ef20: 2b 5d 0c sub 0xc(%ebp),%ebx 10ef23: 89 d8 mov %ebx,%eax 10ef25: 31 d2 xor %edx,%edx 10ef27: f7 75 10 divl 0x10(%ebp) 10ef2a: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10ef2c: 8b 45 0c mov 0xc(%ebp),%eax 10ef2f: 8d 34 03 lea (%ebx,%eax,1),%esi 10ef32: 89 f0 mov %esi,%eax 10ef34: 31 d2 xor %edx,%edx 10ef36: f7 75 14 divl 0x14(%ebp) 10ef39: 89 f0 mov %esi,%eax 10ef3b: 29 d0 sub %edx,%eax 10ef3d: 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 ) { 10ef3f: 39 f0 cmp %esi,%eax 10ef41: 73 04 jae 10ef47 <_Heap_Allocate_aligned_with_boundary+0xfb> 10ef43: 39 c3 cmp %eax,%ebx 10ef45: 72 d2 jb 10ef19 <_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 ) { 10ef47: 3b 5d dc cmp -0x24(%ebp),%ebx 10ef4a: 72 1d jb 10ef69 <_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; 10ef4c: be f8 ff ff ff mov $0xfffffff8,%esi 10ef51: 29 ce sub %ecx,%esi 10ef53: 01 de add %ebx,%esi 10ef55: 89 d8 mov %ebx,%eax 10ef57: 31 d2 xor %edx,%edx 10ef59: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10ef5c: 29 d6 sub %edx,%esi 10ef5e: 74 05 je 10ef65 <_Heap_Allocate_aligned_with_boundary+0x119> 10ef60: 3b 75 d4 cmp -0x2c(%ebp),%esi 10ef63: 72 04 jb 10ef69 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10ef65: 85 db test %ebx,%ebx 10ef67: 75 11 jne 10ef7a <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN break; } block = block->next; 10ef69: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10ef6c: 39 f9 cmp %edi,%ecx 10ef6e: 0f 85 3e ff ff ff jne 10eeb2 <_Heap_Allocate_aligned_with_boundary+0x66> 10ef74: 89 fe mov %edi,%esi 10ef76: 31 db xor %ebx,%ebx 10ef78: eb 16 jmp 10ef90 <_Heap_Allocate_aligned_with_boundary+0x144> 10ef7a: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10ef7c: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef7f: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10ef82: ff 75 0c pushl 0xc(%ebp) 10ef85: 53 push %ebx 10ef86: 51 push %ecx 10ef87: 57 push %edi 10ef88: e8 ab bf ff ff call 10af38 <_Heap_Block_allocate> 10ef8d: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10ef90: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef93: 39 46 44 cmp %eax,0x44(%esi) 10ef96: 73 03 jae 10ef9b <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10ef98: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10ef9b: 89 d8 mov %ebx,%eax 10ef9d: eb 02 jmp 10efa1 <_Heap_Allocate_aligned_with_boundary+0x155> 10ef9f: 31 c0 xor %eax,%eax } 10efa1: 8d 65 f4 lea -0xc(%ebp),%esp 10efa4: 5b pop %ebx 10efa5: 5e pop %esi 10efa6: 5f pop %edi 10efa7: c9 leave 10efa8: c3 ret 00112298 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 112298: 55 push %ebp 112299: 89 e5 mov %esp,%ebp 11229b: 56 push %esi 11229c: 53 push %ebx 11229d: 8b 4d 08 mov 0x8(%ebp),%ecx 1122a0: 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; 1122a3: 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; 1122a6: 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 ) { 1122a9: 39 f2 cmp %esi,%edx 1122ab: 73 0a jae 1122b7 <_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; 1122ad: b8 01 00 00 00 mov $0x1,%eax 1122b2: 3b 51 18 cmp 0x18(%ecx),%edx 1122b5: 73 5f jae 112316 <_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 ) { 1122b7: b8 02 00 00 00 mov $0x2,%eax 1122bc: 39 f2 cmp %esi,%edx 1122be: 75 56 jne 112316 <_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; 1122c0: 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; 1122c3: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 1122c6: 29 da sub %ebx,%edx 1122c8: 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); 1122cb: 89 f0 mov %esi,%eax 1122cd: 31 d2 xor %edx,%edx 1122cf: f7 71 10 divl 0x10(%ecx) 1122d2: 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; 1122d4: 8b 45 14 mov 0x14(%ebp),%eax 1122d7: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 1122d9: 31 c0 xor %eax,%eax 1122db: 3b 71 14 cmp 0x14(%ecx),%esi 1122de: 72 36 jb 112316 <_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); 1122e0: 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; 1122e3: 8b 43 04 mov 0x4(%ebx),%eax 1122e6: 83 e0 01 and $0x1,%eax 1122e9: 09 f0 or %esi,%eax 1122eb: 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 = 1122ee: 8b 41 20 mov 0x20(%ecx),%eax 1122f1: 29 d0 sub %edx,%eax 1122f3: 83 c8 01 or $0x1,%eax 1122f6: 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; 1122f9: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1122fc: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1122ff: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 112302: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 112305: 50 push %eax 112306: 50 push %eax 112307: 83 c3 08 add $0x8,%ebx 11230a: 53 push %ebx 11230b: 51 push %ecx 11230c: e8 73 b6 ff ff call 10d984 <_Heap_Free> 112311: 31 c0 xor %eax,%eax 112313: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 112316: 8d 65 f8 lea -0x8(%ebp),%esp 112319: 5b pop %ebx 11231a: 5e pop %esi 11231b: c9 leave 11231c: c3 ret 0010efac <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10efac: 55 push %ebp 10efad: 89 e5 mov %esp,%ebp 10efaf: 57 push %edi 10efb0: 56 push %esi 10efb1: 53 push %ebx 10efb2: 83 ec 14 sub $0x14,%esp 10efb5: 8b 4d 08 mov 0x8(%ebp),%ecx 10efb8: 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 ) 10efbb: 8d 58 f8 lea -0x8(%eax),%ebx 10efbe: 31 d2 xor %edx,%edx 10efc0: f7 71 10 divl 0x10(%ecx) 10efc3: 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; 10efc5: 8b 41 20 mov 0x20(%ecx),%eax 10efc8: 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 10efcb: 31 c0 xor %eax,%eax 10efcd: 3b 5d f0 cmp -0x10(%ebp),%ebx 10efd0: 72 08 jb 10efda <_Heap_Free+0x2e> 10efd2: 31 c0 xor %eax,%eax 10efd4: 39 59 24 cmp %ebx,0x24(%ecx) 10efd7: 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 ) ) { 10efda: 85 c0 test %eax,%eax 10efdc: 0f 84 2d 01 00 00 je 10f10f <_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; 10efe2: 8b 7b 04 mov 0x4(%ebx),%edi 10efe5: 89 fa mov %edi,%edx 10efe7: 83 e2 fe and $0xfffffffe,%edx 10efea: 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); 10efed: 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 10eff0: 31 f6 xor %esi,%esi 10eff2: 3b 45 f0 cmp -0x10(%ebp),%eax 10eff5: 72 0e jb 10f005 <_Heap_Free+0x59> <== NEVER TAKEN 10eff7: 39 41 24 cmp %eax,0x24(%ecx) 10effa: 0f 93 c2 setae %dl 10effd: 89 d6 mov %edx,%esi 10efff: 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 ) ) { 10f005: 85 f6 test %esi,%esi 10f007: 0f 84 02 01 00 00 je 10f10f <_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; 10f00d: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10f010: f7 c6 01 00 00 00 test $0x1,%esi 10f016: 0f 84 f3 00 00 00 je 10f10f <_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; 10f01c: 83 e6 fe and $0xfffffffe,%esi 10f01f: 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 )); 10f022: 8b 51 24 mov 0x24(%ecx),%edx 10f025: 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 10f028: 31 f6 xor %esi,%esi 10f02a: 39 d0 cmp %edx,%eax 10f02c: 74 0d je 10f03b <_Heap_Free+0x8f> 10f02e: 8b 55 e8 mov -0x18(%ebp),%edx 10f031: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10f035: 83 e6 01 and $0x1,%esi 10f038: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10f03b: 83 e7 01 and $0x1,%edi 10f03e: 75 64 jne 10f0a4 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10f040: 8b 13 mov (%ebx),%edx 10f042: 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); 10f045: 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 10f047: 31 ff xor %edi,%edi 10f049: 3b 5d f0 cmp -0x10(%ebp),%ebx 10f04c: 72 0e jb 10f05c <_Heap_Free+0xb0> <== NEVER TAKEN 10f04e: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10f051: 0f 93 c2 setae %dl 10f054: 89 d7 mov %edx,%edi 10f056: 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 ) ) { 10f05c: 85 ff test %edi,%edi 10f05e: 0f 84 ab 00 00 00 je 10f10f <_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) ) { 10f064: f6 43 04 01 testb $0x1,0x4(%ebx) 10f068: 0f 84 a1 00 00 00 je 10f10f <_Heap_Free+0x163> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10f06e: 89 f2 mov %esi,%edx 10f070: 84 d2 test %dl,%dl 10f072: 74 1a je 10f08e <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10f074: 8b 75 e0 mov -0x20(%ebp),%esi 10f077: 03 75 e8 add -0x18(%ebp),%esi 10f07a: 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; 10f07d: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10f080: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10f083: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10f086: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10f089: ff 49 38 decl 0x38(%ecx) 10f08c: eb 34 jmp 10f0c2 <_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; 10f08e: 8b 75 e0 mov -0x20(%ebp),%esi 10f091: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f094: 89 f7 mov %esi,%edi 10f096: 83 cf 01 or $0x1,%edi 10f099: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f09c: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10f0a0: 89 30 mov %esi,(%eax) 10f0a2: eb 5b jmp 10f0ff <_Heap_Free+0x153> } } else if ( next_is_free ) { /* coalesce next */ 10f0a4: 89 f2 mov %esi,%edx 10f0a6: 84 d2 test %dl,%dl 10f0a8: 74 25 je 10f0cf <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10f0aa: 8b 75 e8 mov -0x18(%ebp),%esi 10f0ad: 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; 10f0b0: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10f0b3: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10f0b6: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10f0b9: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10f0bc: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10f0bf: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f0c2: 89 f0 mov %esi,%eax 10f0c4: 83 c8 01 or $0x1,%eax 10f0c7: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10f0ca: 89 34 33 mov %esi,(%ebx,%esi,1) 10f0cd: eb 30 jmp 10f0ff <_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; 10f0cf: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10f0d2: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10f0d5: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10f0d8: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10f0db: 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; 10f0de: 8b 75 e0 mov -0x20(%ebp),%esi 10f0e1: 83 ce 01 or $0x1,%esi 10f0e4: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f0e7: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10f0eb: 8b 55 e0 mov -0x20(%ebp),%edx 10f0ee: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10f0f0: 8b 41 38 mov 0x38(%ecx),%eax 10f0f3: 40 inc %eax 10f0f4: 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; 10f0f7: 39 41 3c cmp %eax,0x3c(%ecx) 10f0fa: 73 03 jae 10f0ff <_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; 10f0fc: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10f0ff: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10f102: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10f105: 8b 45 e0 mov -0x20(%ebp),%eax 10f108: 01 41 30 add %eax,0x30(%ecx) 10f10b: b0 01 mov $0x1,%al return( true ); 10f10d: eb 02 jmp 10f111 <_Heap_Free+0x165> 10f10f: 31 c0 xor %eax,%eax } 10f111: 83 c4 14 add $0x14,%esp 10f114: 5b pop %ebx 10f115: 5e pop %esi 10f116: 5f pop %edi 10f117: c9 leave 10f118: c3 ret 0011cce0 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11cce0: 55 push %ebp 11cce1: 89 e5 mov %esp,%ebp 11cce3: 56 push %esi 11cce4: 53 push %ebx 11cce5: 8b 5d 08 mov 0x8(%ebp),%ebx 11cce8: 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 ) 11cceb: 8d 4e f8 lea -0x8(%esi),%ecx 11ccee: 89 f0 mov %esi,%eax 11ccf0: 31 d2 xor %edx,%edx 11ccf2: f7 73 10 divl 0x10(%ebx) 11ccf5: 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; 11ccf7: 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 11ccfa: 31 c0 xor %eax,%eax 11ccfc: 39 d1 cmp %edx,%ecx 11ccfe: 72 08 jb 11cd08 <_Heap_Size_of_alloc_area+0x28> 11cd00: 31 c0 xor %eax,%eax 11cd02: 39 4b 24 cmp %ecx,0x24(%ebx) 11cd05: 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 ) ) { 11cd08: 85 c0 test %eax,%eax 11cd0a: 74 2e je 11cd3a <_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); 11cd0c: 8b 41 04 mov 0x4(%ecx),%eax 11cd0f: 83 e0 fe and $0xfffffffe,%eax 11cd12: 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 11cd14: 31 c0 xor %eax,%eax 11cd16: 39 d1 cmp %edx,%ecx 11cd18: 72 08 jb 11cd22 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN 11cd1a: 31 c0 xor %eax,%eax 11cd1c: 39 4b 24 cmp %ecx,0x24(%ebx) 11cd1f: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11cd22: 85 c0 test %eax,%eax 11cd24: 74 14 je 11cd3a <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN 11cd26: f6 41 04 01 testb $0x1,0x4(%ecx) 11cd2a: 74 0e je 11cd3a <_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; 11cd2c: 29 f1 sub %esi,%ecx 11cd2e: 8d 51 04 lea 0x4(%ecx),%edx 11cd31: 8b 45 10 mov 0x10(%ebp),%eax 11cd34: 89 10 mov %edx,(%eax) 11cd36: b0 01 mov $0x1,%al return true; 11cd38: eb 02 jmp 11cd3c <_Heap_Size_of_alloc_area+0x5c> 11cd3a: 31 c0 xor %eax,%eax } 11cd3c: 5b pop %ebx 11cd3d: 5e pop %esi 11cd3e: c9 leave 11cd3f: c3 ret 0010ba25 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10ba25: 55 push %ebp 10ba26: 89 e5 mov %esp,%ebp 10ba28: 57 push %edi 10ba29: 56 push %esi 10ba2a: 53 push %ebx 10ba2b: 83 ec 4c sub $0x4c,%esp 10ba2e: 8b 7d 08 mov 0x8(%ebp),%edi 10ba31: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10ba34: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10ba37: 8b 47 14 mov 0x14(%edi),%eax 10ba3a: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10ba3d: 8b 57 24 mov 0x24(%edi),%edx 10ba40: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10ba43: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10ba46: c7 45 e4 37 bd 10 00 movl $0x10bd37,-0x1c(%ebp) 10ba4d: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10ba51: 75 07 jne 10ba5a <_Heap_Walk+0x35> 10ba53: c7 45 e4 20 ba 10 00 movl $0x10ba20,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10ba5a: 83 3d 14 64 12 00 03 cmpl $0x3,0x126414 10ba61: 0f 85 c6 02 00 00 jne 10bd2d <_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)( 10ba67: 50 push %eax 10ba68: ff 77 0c pushl 0xc(%edi) 10ba6b: ff 77 08 pushl 0x8(%edi) 10ba6e: ff 75 d0 pushl -0x30(%ebp) 10ba71: 53 push %ebx 10ba72: ff 77 1c pushl 0x1c(%edi) 10ba75: ff 77 18 pushl 0x18(%edi) 10ba78: ff 75 dc pushl -0x24(%ebp) 10ba7b: 51 push %ecx 10ba7c: 68 68 f7 11 00 push $0x11f768 10ba81: 6a 00 push $0x0 10ba83: 56 push %esi 10ba84: 89 4d bc mov %ecx,-0x44(%ebp) 10ba87: 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 ) { 10ba8a: 83 c4 30 add $0x30,%esp 10ba8d: 8b 4d bc mov -0x44(%ebp),%ecx 10ba90: 85 c9 test %ecx,%ecx 10ba92: 75 0b jne 10ba9f <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10ba94: 53 push %ebx 10ba95: 68 f9 f7 11 00 push $0x11f7f9 10ba9a: e9 5b 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10ba9f: f6 c1 03 test $0x3,%cl 10baa2: 74 0b je 10baaf <_Heap_Walk+0x8a> (*printer)( 10baa4: 51 push %ecx 10baa5: 68 0c f8 11 00 push $0x11f80c 10baaa: e9 4b 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10baaf: 8b 45 dc mov -0x24(%ebp),%eax 10bab2: 31 d2 xor %edx,%edx 10bab4: f7 f1 div %ecx 10bab6: 85 d2 test %edx,%edx 10bab8: 74 0d je 10bac7 <_Heap_Walk+0xa2> (*printer)( 10baba: ff 75 dc pushl -0x24(%ebp) 10babd: 68 2a f8 11 00 push $0x11f82a 10bac2: e9 33 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> ); return false; } if ( 10bac7: 8d 43 08 lea 0x8(%ebx),%eax 10baca: 31 d2 xor %edx,%edx 10bacc: f7 f1 div %ecx 10bace: 85 d2 test %edx,%edx 10bad0: 74 0b je 10badd <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10bad2: 53 push %ebx 10bad3: 68 4e f8 11 00 push $0x11f84e 10bad8: e9 1d 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10badd: f6 43 04 01 testb $0x1,0x4(%ebx) 10bae1: 75 0b jne 10baee <_Heap_Walk+0xc9> (*printer)( 10bae3: 51 push %ecx 10bae4: 68 7f f8 11 00 push $0x11f87f 10bae9: e9 0c 02 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> ); return false; } if ( first_block->prev_size != page_size ) { 10baee: 8b 03 mov (%ebx),%eax 10baf0: 89 45 d4 mov %eax,-0x2c(%ebp) 10baf3: 39 c8 cmp %ecx,%eax 10baf5: 74 0f je 10bb06 <_Heap_Walk+0xe1> (*printer)( 10baf7: 83 ec 0c sub $0xc,%esp 10bafa: 51 push %ecx 10bafb: 50 push %eax 10bafc: 68 ad f8 11 00 push $0x11f8ad 10bb01: e9 3d 01 00 00 jmp 10bc43 <_Heap_Walk+0x21e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10bb06: 8b 55 d0 mov -0x30(%ebp),%edx 10bb09: 8b 42 04 mov 0x4(%edx),%eax 10bb0c: 83 e0 fe and $0xfffffffe,%eax 10bb0f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10bb14: 75 0b jne 10bb21 <_Heap_Walk+0xfc> (*printer)( 10bb16: 52 push %edx 10bb17: 68 d8 f8 11 00 push $0x11f8d8 10bb1c: e9 d9 01 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10bb21: 8b 4f 10 mov 0x10(%edi),%ecx 10bb24: 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; 10bb27: 8b 4f 08 mov 0x8(%edi),%ecx 10bb2a: 89 7d e0 mov %edi,-0x20(%ebp) 10bb2d: eb 6a jmp 10bb99 <_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 10bb2f: 31 c0 xor %eax,%eax 10bb31: 39 4f 20 cmp %ecx,0x20(%edi) 10bb34: 77 08 ja 10bb3e <_Heap_Walk+0x119> 10bb36: 31 c0 xor %eax,%eax 10bb38: 39 4f 24 cmp %ecx,0x24(%edi) 10bb3b: 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 ) ) { 10bb3e: 85 c0 test %eax,%eax 10bb40: 75 0b jne 10bb4d <_Heap_Walk+0x128> (*printer)( 10bb42: 51 push %ecx 10bb43: 68 ed f8 11 00 push $0x11f8ed 10bb48: e9 ad 01 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> ); return false; } if ( 10bb4d: 8d 41 08 lea 0x8(%ecx),%eax 10bb50: 31 d2 xor %edx,%edx 10bb52: f7 75 d8 divl -0x28(%ebp) 10bb55: 85 d2 test %edx,%edx 10bb57: 74 0b je 10bb64 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10bb59: 51 push %ecx 10bb5a: 68 0d f9 11 00 push $0x11f90d 10bb5f: e9 96 01 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10bb64: 8b 41 04 mov 0x4(%ecx),%eax 10bb67: 83 e0 fe and $0xfffffffe,%eax 10bb6a: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10bb6f: 74 0b je 10bb7c <_Heap_Walk+0x157> (*printer)( 10bb71: 51 push %ecx 10bb72: 68 3d f9 11 00 push $0x11f93d 10bb77: e9 7e 01 00 00 jmp 10bcfa <_Heap_Walk+0x2d5> ); return false; } if ( free_block->prev != prev_block ) { 10bb7c: 8b 41 0c mov 0xc(%ecx),%eax 10bb7f: 3b 45 e0 cmp -0x20(%ebp),%eax 10bb82: 74 0f je 10bb93 <_Heap_Walk+0x16e> (*printer)( 10bb84: 83 ec 0c sub $0xc,%esp 10bb87: 50 push %eax 10bb88: 51 push %ecx 10bb89: 68 59 f9 11 00 push $0x11f959 10bb8e: e9 b0 00 00 00 jmp 10bc43 <_Heap_Walk+0x21e> return false; } prev_block = free_block; free_block = free_block->next; 10bb93: 89 4d e0 mov %ecx,-0x20(%ebp) 10bb96: 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 ) { 10bb99: 39 f9 cmp %edi,%ecx 10bb9b: 75 92 jne 10bb2f <_Heap_Walk+0x10a> 10bb9d: 89 75 e0 mov %esi,-0x20(%ebp) 10bba0: e9 7f 01 00 00 jmp 10bd24 <_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; 10bba5: 8b 43 04 mov 0x4(%ebx),%eax 10bba8: 89 c1 mov %eax,%ecx 10bbaa: 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); 10bbad: 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 ) { 10bbb0: a8 01 test $0x1,%al 10bbb2: 74 0c je 10bbc0 <_Heap_Walk+0x19b> (*printer)( 10bbb4: 83 ec 0c sub $0xc,%esp 10bbb7: 51 push %ecx 10bbb8: 53 push %ebx 10bbb9: 68 8b f9 11 00 push $0x11f98b 10bbbe: eb 0b jmp 10bbcb <_Heap_Walk+0x1a6> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10bbc0: 50 push %eax 10bbc1: 50 push %eax 10bbc2: ff 33 pushl (%ebx) 10bbc4: 51 push %ecx 10bbc5: 53 push %ebx 10bbc6: 68 a2 f9 11 00 push $0x11f9a2 10bbcb: 6a 00 push $0x0 10bbcd: ff 75 e0 pushl -0x20(%ebp) 10bbd0: 89 4d bc mov %ecx,-0x44(%ebp) 10bbd3: ff 55 e4 call *-0x1c(%ebp) 10bbd6: 83 c4 20 add $0x20,%esp 10bbd9: 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 10bbdc: 31 c0 xor %eax,%eax 10bbde: 39 77 20 cmp %esi,0x20(%edi) 10bbe1: 77 08 ja 10bbeb <_Heap_Walk+0x1c6> <== NEVER TAKEN 10bbe3: 31 c0 xor %eax,%eax 10bbe5: 39 77 24 cmp %esi,0x24(%edi) 10bbe8: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10bbeb: 85 c0 test %eax,%eax 10bbed: 75 11 jne 10bc00 <_Heap_Walk+0x1db> 10bbef: 89 f1 mov %esi,%ecx 10bbf1: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bbf4: 83 ec 0c sub $0xc,%esp 10bbf7: 51 push %ecx 10bbf8: 53 push %ebx 10bbf9: 68 c7 f9 11 00 push $0x11f9c7 10bbfe: eb 43 jmp 10bc43 <_Heap_Walk+0x21e> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10bc00: 89 c8 mov %ecx,%eax 10bc02: 31 d2 xor %edx,%edx 10bc04: f7 75 d4 divl -0x2c(%ebp) 10bc07: 85 d2 test %edx,%edx 10bc09: 74 0f je 10bc1a <_Heap_Walk+0x1f5> 10bc0b: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc0e: 83 ec 0c sub $0xc,%esp 10bc11: 51 push %ecx 10bc12: 53 push %ebx 10bc13: 68 f4 f9 11 00 push $0x11f9f4 10bc18: eb 29 jmp 10bc43 <_Heap_Walk+0x21e> ); return false; } if ( block_size < min_block_size ) { 10bc1a: 3b 4d dc cmp -0x24(%ebp),%ecx 10bc1d: 73 11 jae 10bc30 <_Heap_Walk+0x20b> 10bc1f: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc22: 57 push %edi 10bc23: 57 push %edi 10bc24: ff 75 dc pushl -0x24(%ebp) 10bc27: 51 push %ecx 10bc28: 53 push %ebx 10bc29: 68 22 fa 11 00 push $0x11fa22 10bc2e: eb 13 jmp 10bc43 <_Heap_Walk+0x21e> ); return false; } if ( next_block_begin <= block_begin ) { 10bc30: 39 de cmp %ebx,%esi 10bc32: 77 1f ja 10bc53 <_Heap_Walk+0x22e> 10bc34: 89 f1 mov %esi,%ecx 10bc36: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc39: 83 ec 0c sub $0xc,%esp 10bc3c: 51 push %ecx 10bc3d: 53 push %ebx 10bc3e: 68 4d fa 11 00 push $0x11fa4d 10bc43: 6a 01 push $0x1 10bc45: 56 push %esi 10bc46: ff 55 e4 call *-0x1c(%ebp) 10bc49: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10bc4b: 83 c4 20 add $0x20,%esp 10bc4e: e9 dc 00 00 00 jmp 10bd2f <_Heap_Walk+0x30a> } if ( !_Heap_Is_prev_used( next_block ) ) { 10bc53: f6 46 04 01 testb $0x1,0x4(%esi) 10bc57: 0f 85 c5 00 00 00 jne 10bd22 <_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; 10bc5d: 8b 47 08 mov 0x8(%edi),%eax 10bc60: 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; 10bc63: 8b 53 04 mov 0x4(%ebx),%edx 10bc66: 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; 10bc69: 83 e2 fe and $0xfffffffe,%edx 10bc6c: 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); 10bc6f: 01 da add %ebx,%edx 10bc71: 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)( 10bc74: 8b 4b 08 mov 0x8(%ebx),%ecx 10bc77: 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; 10bc7a: ba 81 fa 11 00 mov $0x11fa81,%edx 10bc7f: 3b 4f 0c cmp 0xc(%edi),%ecx 10bc82: 74 0e je 10bc92 <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10bc84: ba 8b fa 11 00 mov $0x11fa8b,%edx 10bc89: 39 f9 cmp %edi,%ecx 10bc8b: 74 05 je 10bc92 <_Heap_Walk+0x26d> 10bc8d: ba b6 f6 11 00 mov $0x11f6b6,%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)( 10bc92: 8b 43 0c mov 0xc(%ebx),%eax 10bc95: 89 45 d8 mov %eax,-0x28(%ebp) 10bc98: b8 95 fa 11 00 mov $0x11fa95,%eax 10bc9d: 8b 4d c0 mov -0x40(%ebp),%ecx 10bca0: 39 4d d8 cmp %ecx,-0x28(%ebp) 10bca3: 74 0f je 10bcb4 <_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)" : ""), 10bca5: b8 a0 fa 11 00 mov $0x11faa0,%eax 10bcaa: 39 7d d8 cmp %edi,-0x28(%ebp) 10bcad: 74 05 je 10bcb4 <_Heap_Walk+0x28f> 10bcaf: b8 b6 f6 11 00 mov $0x11f6b6,%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)( 10bcb4: 52 push %edx 10bcb5: ff 75 b4 pushl -0x4c(%ebp) 10bcb8: 50 push %eax 10bcb9: ff 75 d8 pushl -0x28(%ebp) 10bcbc: 53 push %ebx 10bcbd: 68 aa fa 11 00 push $0x11faaa 10bcc2: 6a 00 push $0x0 10bcc4: ff 75 e0 pushl -0x20(%ebp) 10bcc7: 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 ) { 10bcca: 8b 55 c8 mov -0x38(%ebp),%edx 10bccd: 8b 02 mov (%edx),%eax 10bccf: 83 c4 20 add $0x20,%esp 10bcd2: 39 45 cc cmp %eax,-0x34(%ebp) 10bcd5: 74 14 je 10bceb <_Heap_Walk+0x2c6> 10bcd7: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bcda: 51 push %ecx 10bcdb: 52 push %edx 10bcdc: 50 push %eax 10bcdd: ff 75 cc pushl -0x34(%ebp) 10bce0: 53 push %ebx 10bce1: 68 d6 fa 11 00 push $0x11fad6 10bce6: e9 58 ff ff ff jmp 10bc43 <_Heap_Walk+0x21e> ); return false; } if ( !prev_used ) { 10bceb: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10bcef: 75 16 jne 10bd07 <_Heap_Walk+0x2e2> 10bcf1: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bcf4: 53 push %ebx 10bcf5: 68 0f fb 11 00 push $0x11fb0f 10bcfa: 6a 01 push $0x1 10bcfc: 56 push %esi 10bcfd: ff 55 e4 call *-0x1c(%ebp) 10bd00: 31 c0 xor %eax,%eax 10bd02: 83 c4 10 add $0x10,%esp 10bd05: eb 28 jmp 10bd2f <_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; 10bd07: 8b 47 08 mov 0x8(%edi),%eax 10bd0a: eb 07 jmp 10bd13 <_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 ) { 10bd0c: 39 d8 cmp %ebx,%eax 10bd0e: 74 12 je 10bd22 <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10bd10: 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 ) { 10bd13: 39 f8 cmp %edi,%eax 10bd15: 75 f5 jne 10bd0c <_Heap_Walk+0x2e7> 10bd17: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10bd1a: 53 push %ebx 10bd1b: 68 3e fb 11 00 push $0x11fb3e 10bd20: eb d8 jmp 10bcfa <_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 ) { 10bd22: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10bd24: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bd27: 0f 85 78 fe ff ff jne 10bba5 <_Heap_Walk+0x180> 10bd2d: b0 01 mov $0x1,%al block = next_block; } return true; } 10bd2f: 8d 65 f4 lea -0xc(%ebp),%esp 10bd32: 5b pop %ebx 10bd33: 5e pop %esi 10bd34: 5f pop %edi 10bd35: c9 leave 10bd36: c3 ret 0010b014 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b014: 55 push %ebp 10b015: 89 e5 mov %esp,%ebp 10b017: 53 push %ebx 10b018: 83 ec 08 sub $0x8,%esp 10b01b: 8b 45 08 mov 0x8(%ebp),%eax 10b01e: 8b 55 0c mov 0xc(%ebp),%edx 10b021: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b024: a3 98 42 12 00 mov %eax,0x124298 _Internal_errors_What_happened.is_internal = is_internal; 10b029: 88 15 9c 42 12 00 mov %dl,0x12429c _Internal_errors_What_happened.the_error = the_error; 10b02f: 89 1d a0 42 12 00 mov %ebx,0x1242a0 _User_extensions_Fatal( the_source, is_internal, the_error ); 10b035: 53 push %ebx 10b036: 0f b6 d2 movzbl %dl,%edx 10b039: 52 push %edx 10b03a: 50 push %eax 10b03b: e8 37 19 00 00 call 10c977 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b040: c7 05 8c 43 12 00 05 movl $0x5,0x12438c <== NOT EXECUTED 10b047: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b04a: fa cli <== NOT EXECUTED 10b04b: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b04d: f4 hlt <== NOT EXECUTED 10b04e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b051: eb fe jmp 10b051 <_Internal_error_Occurred+0x3d><== NOT EXECUTED 0010b0ac <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b0ac: 55 push %ebp 10b0ad: 89 e5 mov %esp,%ebp 10b0af: 56 push %esi 10b0b0: 53 push %ebx 10b0b1: 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 ) 10b0b4: 31 c9 xor %ecx,%ecx 10b0b6: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b0ba: 74 53 je 10b10f <_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 ); 10b0bc: 8d 73 20 lea 0x20(%ebx),%esi 10b0bf: 83 ec 0c sub $0xc,%esp 10b0c2: 56 push %esi 10b0c3: e8 ac f7 ff ff call 10a874 <_Chain_Get> 10b0c8: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b0ca: 83 c4 10 add $0x10,%esp 10b0cd: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b0d1: 74 3c je 10b10f <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b0d3: 85 c0 test %eax,%eax 10b0d5: 75 1a jne 10b0f1 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b0d7: 83 ec 0c sub $0xc,%esp 10b0da: 53 push %ebx 10b0db: e8 60 00 00 00 call 10b140 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b0e0: 89 34 24 mov %esi,(%esp) 10b0e3: e8 8c f7 ff ff call 10a874 <_Chain_Get> 10b0e8: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b0ea: 83 c4 10 add $0x10,%esp 10b0ed: 85 c0 test %eax,%eax 10b0ef: 74 1e je 10b10f <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b0f1: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b0f5: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b0f9: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b0fb: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b0ff: 31 d2 xor %edx,%edx 10b101: f7 f6 div %esi 10b103: c1 e0 02 shl $0x2,%eax 10b106: 03 43 30 add 0x30(%ebx),%eax 10b109: ff 08 decl (%eax) information->inactive--; 10b10b: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b10f: 89 c8 mov %ecx,%eax 10b111: 8d 65 f8 lea -0x8(%ebp),%esp 10b114: 5b pop %ebx 10b115: 5e pop %esi 10b116: c9 leave 10b117: c3 ret 0010b140 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b140: 55 push %ebp 10b141: 89 e5 mov %esp,%ebp 10b143: 57 push %edi 10b144: 56 push %esi 10b145: 53 push %ebx 10b146: 83 ec 4c sub $0x4c,%esp 10b149: 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 ); 10b14c: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b150: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b153: 8b 4b 34 mov 0x34(%ebx),%ecx 10b156: 85 c9 test %ecx,%ecx 10b158: 75 0e jne 10b168 <_Objects_Extend_information+0x28> 10b15a: 89 45 d4 mov %eax,-0x2c(%ebp) 10b15d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b164: 31 d2 xor %edx,%edx 10b166: eb 31 jmp 10b199 <_Objects_Extend_information+0x59> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b168: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b16c: 8b 43 10 mov 0x10(%ebx),%eax 10b16f: 31 d2 xor %edx,%edx 10b171: 66 f7 f6 div %si 10b174: 0f b7 d0 movzwl %ax,%edx 10b177: 8b 7d c8 mov -0x38(%ebp),%edi 10b17a: 89 7d d4 mov %edi,-0x2c(%ebp) 10b17d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b184: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b186: eb 0a jmp 10b192 <_Objects_Extend_information+0x52> if ( information->object_blocks[ block ] == NULL ) 10b188: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b18c: 74 08 je 10b196 <_Objects_Extend_information+0x56> 10b18e: 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++ ) { 10b191: 40 inc %eax 10b192: 39 d0 cmp %edx,%eax 10b194: 72 f2 jb 10b188 <_Objects_Extend_information+0x48> 10b196: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b199: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b19d: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b1a1: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b1a4: 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 ) { 10b1a7: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b1ad: 0f 87 db 01 00 00 ja 10b38e <_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; 10b1b3: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b1b7: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b1bb: 74 1e je 10b1db <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b1bd: 83 ec 0c sub $0xc,%esp 10b1c0: 50 push %eax 10b1c1: 89 55 b4 mov %edx,-0x4c(%ebp) 10b1c4: e8 df 1a 00 00 call 10cca8 <_Workspace_Allocate> 10b1c9: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b1cc: 83 c4 10 add $0x10,%esp 10b1cf: 85 c0 test %eax,%eax 10b1d1: 8b 55 b4 mov -0x4c(%ebp),%edx 10b1d4: 75 1a jne 10b1f0 <_Objects_Extend_information+0xb0> 10b1d6: e9 b3 01 00 00 jmp 10b38e <_Objects_Extend_information+0x24e> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b1db: 83 ec 0c sub $0xc,%esp 10b1de: 50 push %eax 10b1df: 89 55 b4 mov %edx,-0x4c(%ebp) 10b1e2: e8 95 1a 00 00 call 10cc7c <_Workspace_Allocate_or_fatal_error> 10b1e7: 89 45 bc mov %eax,-0x44(%ebp) 10b1ea: 83 c4 10 add $0x10,%esp 10b1ed: 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 ) { 10b1f0: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b1f4: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b1f7: 0f 82 14 01 00 00 jb 10b311 <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b1fd: 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 ); 10b200: 83 ec 0c sub $0xc,%esp 10b203: 8b 4d b8 mov -0x48(%ebp),%ecx 10b206: 03 4d c8 add -0x38(%ebp),%ecx 10b209: 8d 04 76 lea (%esi,%esi,2),%eax 10b20c: 8d 04 01 lea (%ecx,%eax,1),%eax 10b20f: c1 e0 02 shl $0x2,%eax 10b212: 50 push %eax 10b213: 89 55 b4 mov %edx,-0x4c(%ebp) 10b216: e8 8d 1a 00 00 call 10cca8 <_Workspace_Allocate> if ( !object_blocks ) { 10b21b: 83 c4 10 add $0x10,%esp 10b21e: 85 c0 test %eax,%eax 10b220: 8b 55 b4 mov -0x4c(%ebp),%edx 10b223: 75 13 jne 10b238 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b225: 83 ec 0c sub $0xc,%esp 10b228: ff 75 bc pushl -0x44(%ebp) 10b22b: e8 91 1a 00 00 call 10ccc1 <_Workspace_Free> return; 10b230: 83 c4 10 add $0x10,%esp 10b233: e9 56 01 00 00 jmp 10b38e <_Objects_Extend_information+0x24e> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b238: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b23b: 89 4d c0 mov %ecx,-0x40(%ebp) 10b23e: 8d 34 f0 lea (%eax,%esi,8),%esi 10b241: 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 ) { 10b244: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b248: 31 c9 xor %ecx,%ecx 10b24a: 3b 75 c8 cmp -0x38(%ebp),%esi 10b24d: 76 3e jbe 10b28d <_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, 10b24f: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b256: 89 75 d0 mov %esi,-0x30(%ebp) 10b259: 8b 73 34 mov 0x34(%ebx),%esi 10b25c: 89 c7 mov %eax,%edi 10b25e: 8b 4d d0 mov -0x30(%ebp),%ecx 10b261: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b263: 8b 73 30 mov 0x30(%ebx),%esi 10b266: 8b 7d c0 mov -0x40(%ebp),%edi 10b269: 8b 4d d0 mov -0x30(%ebp),%ecx 10b26c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b26e: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b272: 03 4d c8 add -0x38(%ebp),%ecx 10b275: c1 e1 02 shl $0x2,%ecx 10b278: 8b 73 1c mov 0x1c(%ebx),%esi 10b27b: 8b 7d c4 mov -0x3c(%ebp),%edi 10b27e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b280: eb 10 jmp 10b292 <_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; 10b282: 8b 7d c4 mov -0x3c(%ebp),%edi 10b285: 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++ ) { 10b28c: 41 inc %ecx 10b28d: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b290: 72 f0 jb 10b282 <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b292: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b299: 8b 4d c0 mov -0x40(%ebp),%ecx 10b29c: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b2a3: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b2a7: 8b 75 d4 mov -0x2c(%ebp),%esi 10b2aa: 01 d6 add %edx,%esi 10b2ac: 8b 7d d4 mov -0x2c(%ebp),%edi 10b2af: 8b 55 c4 mov -0x3c(%ebp),%edx 10b2b2: 8d 0c ba lea (%edx,%edi,4),%ecx 10b2b5: 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 ; 10b2b7: eb 0a jmp 10b2c3 <_Objects_Extend_information+0x183> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b2b9: 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++ ) { 10b2bf: 42 inc %edx 10b2c0: 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 ; 10b2c3: 39 f2 cmp %esi,%edx 10b2c5: 72 f2 jb 10b2b9 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b2c7: 9c pushf 10b2c8: fa cli 10b2c9: 5e pop %esi old_tables = information->object_blocks; 10b2ca: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b2cd: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b2d0: 8b 4d c0 mov -0x40(%ebp),%ecx 10b2d3: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b2d6: 8b 7d c4 mov -0x3c(%ebp),%edi 10b2d9: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b2dc: 8b 45 b8 mov -0x48(%ebp),%eax 10b2df: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b2e3: 8b 03 mov (%ebx),%eax 10b2e5: c1 e0 18 shl $0x18,%eax 10b2e8: 0d 00 00 01 00 or $0x10000,%eax 10b2ed: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b2f1: c1 e1 1b shl $0x1b,%ecx 10b2f4: 09 c8 or %ecx,%eax 10b2f6: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b2fa: 09 c8 or %ecx,%eax 10b2fc: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b2ff: 56 push %esi 10b300: 9d popf if ( old_tables ) 10b301: 85 d2 test %edx,%edx 10b303: 74 0c je 10b311 <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b305: 83 ec 0c sub $0xc,%esp 10b308: 52 push %edx 10b309: e8 b3 19 00 00 call 10ccc1 <_Workspace_Free> 10b30e: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b311: 8b 55 cc mov -0x34(%ebp),%edx 10b314: c1 e2 02 shl $0x2,%edx 10b317: 89 55 d0 mov %edx,-0x30(%ebp) 10b31a: 8b 43 34 mov 0x34(%ebx),%eax 10b31d: 8b 75 bc mov -0x44(%ebp),%esi 10b320: 8b 4d cc mov -0x34(%ebp),%ecx 10b323: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b326: ff 73 18 pushl 0x18(%ebx) 10b329: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b32d: 52 push %edx 10b32e: ff 34 88 pushl (%eax,%ecx,4) 10b331: 8d 45 dc lea -0x24(%ebp),%eax 10b334: 50 push %eax 10b335: 89 45 b4 mov %eax,-0x4c(%ebp) 10b338: e8 a7 38 00 00 call 10ebe4 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b33d: 8d 7b 20 lea 0x20(%ebx),%edi 10b340: 8b 75 d4 mov -0x2c(%ebp),%esi 10b343: eb 23 jmp 10b368 <_Objects_Extend_information+0x228> */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b345: 8b 13 mov (%ebx),%edx 10b347: c1 e2 18 shl $0x18,%edx 10b34a: 81 ca 00 00 01 00 or $0x10000,%edx 10b350: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b354: c1 e1 1b shl $0x1b,%ecx 10b357: 09 ca or %ecx,%edx 10b359: 09 f2 or %esi,%edx 10b35b: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b35e: 52 push %edx 10b35f: 52 push %edx 10b360: 50 push %eax 10b361: 57 push %edi 10b362: e8 e9 f4 ff ff call 10a850 <_Chain_Append> index++; 10b367: 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 ) { 10b368: 8d 45 dc lea -0x24(%ebp),%eax 10b36b: 89 04 24 mov %eax,(%esp) 10b36e: e8 01 f5 ff ff call 10a874 <_Chain_Get> 10b373: 83 c4 10 add $0x10,%esp 10b376: 85 c0 test %eax,%eax 10b378: 75 cb jne 10b345 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b37a: 8b 43 30 mov 0x30(%ebx),%eax 10b37d: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b381: 8b 4d d0 mov -0x30(%ebp),%ecx 10b384: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b387: 8b 43 14 mov 0x14(%ebx),%eax 10b38a: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b38e: 8d 65 f4 lea -0xc(%ebp),%esp 10b391: 5b pop %ebx 10b392: 5e pop %esi 10b393: 5f pop %edi 10b394: c9 leave 10b395: c3 ret 0010b428 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b428: 55 push %ebp 10b429: 89 e5 mov %esp,%ebp 10b42b: 56 push %esi 10b42c: 53 push %ebx 10b42d: 8b 75 08 mov 0x8(%ebp),%esi 10b430: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b433: 85 db test %ebx,%ebx 10b435: 74 2d je 10b464 <_Objects_Get_information+0x3c><== NEVER TAKEN /* * 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 ); 10b437: 83 ec 0c sub $0xc,%esp 10b43a: 56 push %esi 10b43b: e8 dc 3c 00 00 call 10f11c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b440: 83 c4 10 add $0x10,%esp 10b443: 85 c0 test %eax,%eax 10b445: 74 1d je 10b464 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b447: 39 c3 cmp %eax,%ebx 10b449: 77 19 ja 10b464 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b44b: 8b 04 b5 c8 41 12 00 mov 0x1241c8(,%esi,4),%eax 10b452: 85 c0 test %eax,%eax 10b454: 74 0e je 10b464 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b456: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10b459: 85 c0 test %eax,%eax 10b45b: 74 09 je 10b466 <_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 ) 10b45d: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10b462: 75 02 jne 10b466 <_Objects_Get_information+0x3e> 10b464: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10b466: 8d 65 f8 lea -0x8(%ebp),%esp 10b469: 5b pop %ebx 10b46a: 5e pop %esi 10b46b: c9 leave 10b46c: c3 ret 00118a34 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118a34: 55 push %ebp 118a35: 89 e5 mov %esp,%ebp 118a37: 53 push %ebx 118a38: 8b 55 08 mov 0x8(%ebp),%edx 118a3b: 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; 118a3e: b8 01 00 00 00 mov $0x1,%eax 118a43: 2b 42 08 sub 0x8(%edx),%eax 118a46: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118a49: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118a4d: 39 c3 cmp %eax,%ebx 118a4f: 72 12 jb 118a63 <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118a51: 8b 52 1c mov 0x1c(%edx),%edx 118a54: 8b 04 82 mov (%edx,%eax,4),%eax 118a57: 85 c0 test %eax,%eax 118a59: 74 08 je 118a63 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 118a5b: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118a61: eb 08 jmp 118a6b <_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; 118a63: c7 01 01 00 00 00 movl $0x1,(%ecx) 118a69: 31 c0 xor %eax,%eax return NULL; } 118a6b: 5b pop %ebx 118a6c: c9 leave 118a6d: c3 ret 0010c614 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10c614: 55 push %ebp 10c615: 89 e5 mov %esp,%ebp 10c617: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10c61a: 8b 45 08 mov 0x8(%ebp),%eax 10c61d: 85 c0 test %eax,%eax 10c61f: 75 08 jne 10c629 <_Objects_Id_to_name+0x15> 10c621: a1 9c 73 12 00 mov 0x12739c,%eax 10c626: 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); 10c629: 89 c2 mov %eax,%edx 10c62b: c1 ea 18 shr $0x18,%edx 10c62e: 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 ) 10c631: 8d 4a ff lea -0x1(%edx),%ecx 10c634: 83 f9 03 cmp $0x3,%ecx 10c637: 77 38 ja 10c671 <_Objects_Id_to_name+0x5d> 10c639: eb 3d jmp 10c678 <_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 ]; 10c63b: 89 c1 mov %eax,%ecx 10c63d: c1 e9 1b shr $0x1b,%ecx 10c640: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10c643: 85 d2 test %edx,%edx 10c645: 74 2a je 10c671 <_Objects_Id_to_name+0x5d><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10c647: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10c64b: 75 24 jne 10c671 <_Objects_Id_to_name+0x5d><== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10c64d: 51 push %ecx 10c64e: 8d 4d f4 lea -0xc(%ebp),%ecx 10c651: 51 push %ecx 10c652: 50 push %eax 10c653: 52 push %edx 10c654: e8 63 ff ff ff call 10c5bc <_Objects_Get> if ( !the_object ) 10c659: 83 c4 10 add $0x10,%esp 10c65c: 85 c0 test %eax,%eax 10c65e: 74 11 je 10c671 <_Objects_Id_to_name+0x5d> return OBJECTS_INVALID_ID; *name = the_object->name; 10c660: 8b 50 0c mov 0xc(%eax),%edx 10c663: 8b 45 0c mov 0xc(%ebp),%eax 10c666: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c668: e8 b4 07 00 00 call 10ce21 <_Thread_Enable_dispatch> 10c66d: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10c66f: eb 05 jmp 10c676 <_Objects_Id_to_name+0x62> 10c671: b8 03 00 00 00 mov $0x3,%eax } 10c676: c9 leave 10c677: 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 ] ) 10c678: 8b 14 95 b4 72 12 00 mov 0x1272b4(,%edx,4),%edx 10c67f: 85 d2 test %edx,%edx 10c681: 75 b8 jne 10c63b <_Objects_Id_to_name+0x27> 10c683: eb ec jmp 10c671 <_Objects_Id_to_name+0x5d> 0010bc98 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10bc98: 55 push %ebp 10bc99: 89 e5 mov %esp,%ebp 10bc9b: 57 push %edi 10bc9c: 56 push %esi 10bc9d: 53 push %ebx 10bc9e: 83 ec 34 sub $0x34,%esp 10bca1: 8b 55 08 mov 0x8(%ebp),%edx 10bca4: 8b 7d 0c mov 0xc(%ebp),%edi 10bca7: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10bcaa: 0f b7 42 3a movzwl 0x3a(%edx),%eax 10bcae: 50 push %eax 10bcaf: 53 push %ebx 10bcb0: 89 55 d4 mov %edx,-0x2c(%ebp) 10bcb3: e8 04 72 00 00 call 112ebc 10bcb8: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10bcba: 83 c4 10 add $0x10,%esp 10bcbd: 8b 55 d4 mov -0x2c(%ebp),%edx 10bcc0: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10bcc4: 74 54 je 10bd1a <_Objects_Set_name+0x82> char *d; d = _Workspace_Allocate( length + 1 ); 10bcc6: 83 ec 0c sub $0xc,%esp 10bcc9: 8d 40 01 lea 0x1(%eax),%eax 10bccc: 50 push %eax 10bccd: e8 a2 16 00 00 call 10d374 <_Workspace_Allocate> 10bcd2: 89 c2 mov %eax,%edx if ( !d ) 10bcd4: 83 c4 10 add $0x10,%esp 10bcd7: 31 c0 xor %eax,%eax 10bcd9: 85 d2 test %edx,%edx 10bcdb: 74 79 je 10bd56 <_Objects_Set_name+0xbe><== NEVER TAKEN return false; if ( the_object->name.name_p ) { 10bcdd: 8b 47 0c mov 0xc(%edi),%eax 10bce0: 85 c0 test %eax,%eax 10bce2: 74 19 je 10bcfd <_Objects_Set_name+0x65> _Workspace_Free( (void *)the_object->name.name_p ); 10bce4: 83 ec 0c sub $0xc,%esp 10bce7: 50 push %eax 10bce8: 89 55 d4 mov %edx,-0x2c(%ebp) 10bceb: e8 9d 16 00 00 call 10d38d <_Workspace_Free> the_object->name.name_p = NULL; 10bcf0: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) 10bcf7: 83 c4 10 add $0x10,%esp 10bcfa: 8b 55 d4 mov -0x2c(%ebp),%edx } strncpy( d, name, length ); 10bcfd: 50 push %eax 10bcfe: 56 push %esi 10bcff: 53 push %ebx 10bd00: 52 push %edx 10bd01: 89 55 d4 mov %edx,-0x2c(%ebp) 10bd04: e8 37 71 00 00 call 112e40 d[length] = '\0'; 10bd09: 8b 55 d4 mov -0x2c(%ebp),%edx 10bd0c: c6 04 32 00 movb $0x0,(%edx,%esi,1) the_object->name.name_p = d; 10bd10: 89 57 0c mov %edx,0xc(%edi) 10bd13: b0 01 mov $0x1,%al 10bd15: 83 c4 10 add $0x10,%esp 10bd18: eb 3c jmp 10bd56 <_Objects_Set_name+0xbe> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10bd1a: 8a 03 mov (%ebx),%al 10bd1c: 88 45 d8 mov %al,-0x28(%ebp) 10bd1f: 83 fe 01 cmp $0x1,%esi 10bd22: 76 3a jbe 10bd5e <_Objects_Set_name+0xc6> 10bd24: 0f be 53 01 movsbl 0x1(%ebx),%edx 10bd28: c1 e2 10 shl $0x10,%edx 10bd2b: 83 fe 02 cmp $0x2,%esi 10bd2e: 76 33 jbe 10bd63 <_Objects_Set_name+0xcb> 10bd30: 0f be 43 02 movsbl 0x2(%ebx),%eax 10bd34: c1 e0 08 shl $0x8,%eax 10bd37: b9 20 00 00 00 mov $0x20,%ecx 10bd3c: 83 fe 03 cmp $0x3,%esi 10bd3f: 76 04 jbe 10bd45 <_Objects_Set_name+0xad> 10bd41: 0f be 4b 03 movsbl 0x3(%ebx),%ecx 10bd45: 8a 5d d8 mov -0x28(%ebp),%bl 10bd48: c1 e3 18 shl $0x18,%ebx 10bd4b: 09 d3 or %edx,%ebx 10bd4d: 09 c3 or %eax,%ebx 10bd4f: 09 cb or %ecx,%ebx 10bd51: 89 5f 0c mov %ebx,0xc(%edi) 10bd54: b0 01 mov $0x1,%al ); } return true; } 10bd56: 8d 65 f4 lea -0xc(%ebp),%esp 10bd59: 5b pop %ebx 10bd5a: 5e pop %esi 10bd5b: 5f pop %edi 10bd5c: c9 leave 10bd5d: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10bd5e: ba 00 00 20 00 mov $0x200000,%edx 10bd63: b8 00 20 00 00 mov $0x2000,%eax 10bd68: b9 20 00 00 00 mov $0x20,%ecx 10bd6d: eb d6 jmp 10bd45 <_Objects_Set_name+0xad> 0010ac14 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10ac14: 55 push %ebp 10ac15: 89 e5 mov %esp,%ebp 10ac17: 57 push %edi 10ac18: 56 push %esi 10ac19: 53 push %ebx 10ac1a: 83 ec 34 sub $0x34,%esp 10ac1d: 8b 7d 08 mov 0x8(%ebp),%edi 10ac20: 8b 75 0c mov 0xc(%ebp),%esi 10ac23: 8a 45 14 mov 0x14(%ebp),%al 10ac26: 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 ) ) { 10ac29: 8d 5d e4 lea -0x1c(%ebp),%ebx 10ac2c: 53 push %ebx 10ac2d: 56 push %esi 10ac2e: e8 82 01 00 00 call 10adb5 <_POSIX_Mutex_Get> 10ac33: 83 c4 10 add $0x10,%esp 10ac36: 85 c0 test %eax,%eax 10ac38: 0f 84 ae 00 00 00 je 10acec <_POSIX_Condition_variables_Wait_support+0xd8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ac3e: a1 54 72 12 00 mov 0x127254,%eax 10ac43: 48 dec %eax 10ac44: a3 54 72 12 00 mov %eax,0x127254 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10ac49: 52 push %edx 10ac4a: 52 push %edx 10ac4b: 53 push %ebx 10ac4c: 57 push %edi 10ac4d: e8 16 fe ff ff call 10aa68 <_POSIX_Condition_variables_Get> 10ac52: 89 c3 mov %eax,%ebx switch ( location ) { 10ac54: 83 c4 10 add $0x10,%esp 10ac57: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10ac5b: 0f 85 8b 00 00 00 jne 10acec <_POSIX_Condition_variables_Wait_support+0xd8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10ac61: 8b 40 14 mov 0x14(%eax),%eax 10ac64: 85 c0 test %eax,%eax 10ac66: 74 0b je 10ac73 <_POSIX_Condition_variables_Wait_support+0x5f> 10ac68: 3b 06 cmp (%esi),%eax 10ac6a: 74 07 je 10ac73 <_POSIX_Condition_variables_Wait_support+0x5f> _Thread_Enable_dispatch(); 10ac6c: e8 24 2d 00 00 call 10d995 <_Thread_Enable_dispatch> 10ac71: eb 79 jmp 10acec <_POSIX_Condition_variables_Wait_support+0xd8> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10ac73: 83 ec 0c sub $0xc,%esp 10ac76: 56 push %esi 10ac77: e8 20 03 00 00 call 10af9c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10ac7c: 83 c4 10 add $0x10,%esp 10ac7f: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10ac83: 75 4d jne 10acd2 <_POSIX_Condition_variables_Wait_support+0xbe> the_cond->Mutex = *mutex; 10ac85: 8b 06 mov (%esi),%eax 10ac87: 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; 10ac8a: 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; 10ac91: a1 10 73 12 00 mov 0x127310,%eax 10ac96: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10ac9d: 83 c3 18 add $0x18,%ebx 10aca0: 89 58 44 mov %ebx,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10aca3: 8b 17 mov (%edi),%edx 10aca5: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10aca8: 50 push %eax 10aca9: 68 50 e1 10 00 push $0x10e150 10acae: ff 75 10 pushl 0x10(%ebp) 10acb1: 53 push %ebx 10acb2: e8 95 31 00 00 call 10de4c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10acb7: e8 d9 2c 00 00 call 10d995 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10acbc: a1 10 73 12 00 mov 0x127310,%eax 10acc1: 8b 58 34 mov 0x34(%eax),%ebx if ( status && status != ETIMEDOUT ) 10acc4: 83 c4 10 add $0x10,%esp 10acc7: 83 fb 74 cmp $0x74,%ebx 10acca: 74 10 je 10acdc <_POSIX_Condition_variables_Wait_support+0xc8> 10accc: 85 db test %ebx,%ebx 10acce: 74 0c je 10acdc <_POSIX_Condition_variables_Wait_support+0xc8><== ALWAYS TAKEN 10acd0: eb 1f jmp 10acf1 <_POSIX_Condition_variables_Wait_support+0xdd><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 10acd2: e8 be 2c 00 00 call 10d995 <_Thread_Enable_dispatch> 10acd7: bb 74 00 00 00 mov $0x74,%ebx /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10acdc: 83 ec 0c sub $0xc,%esp 10acdf: 56 push %esi 10ace0: e8 37 02 00 00 call 10af1c if ( mutex_status ) 10ace5: 83 c4 10 add $0x10,%esp 10ace8: 85 c0 test %eax,%eax 10acea: 74 05 je 10acf1 <_POSIX_Condition_variables_Wait_support+0xdd> 10acec: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10acf1: 89 d8 mov %ebx,%eax 10acf3: 8d 65 f4 lea -0xc(%ebp),%esp 10acf6: 5b pop %ebx 10acf7: 5e pop %esi 10acf8: 5f pop %edi 10acf9: c9 leave 10acfa: c3 ret 0010e184 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10e184: 55 push %ebp 10e185: 89 e5 mov %esp,%ebp 10e187: 57 push %edi 10e188: 56 push %esi 10e189: 53 push %ebx 10e18a: 83 ec 30 sub $0x30,%esp 10e18d: 8b 75 08 mov 0x8(%ebp),%esi 10e190: 8b 5d 14 mov 0x14(%ebp),%ebx 10e193: 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( 10e196: 8d 45 e4 lea -0x1c(%ebp),%eax 10e199: 50 push %eax 10e19a: 56 push %esi 10e19b: 68 08 d5 12 00 push $0x12d508 10e1a0: 88 55 d4 mov %dl,-0x2c(%ebp) 10e1a3: e8 84 2a 00 00 call 110c2c <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10e1a8: 83 c4 10 add $0x10,%esp 10e1ab: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10e1af: 8a 55 d4 mov -0x2c(%ebp),%dl 10e1b2: 0f 85 af 00 00 00 jne 10e267 <_POSIX_Message_queue_Receive_support+0xe3> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10e1b8: 8b 78 14 mov 0x14(%eax),%edi 10e1bb: 89 f9 mov %edi,%ecx 10e1bd: 83 e1 03 and $0x3,%ecx 10e1c0: 49 dec %ecx 10e1c1: 75 0a jne 10e1cd <_POSIX_Message_queue_Receive_support+0x49> _Thread_Enable_dispatch(); 10e1c3: e8 9d 32 00 00 call 111465 <_Thread_Enable_dispatch> 10e1c8: e9 9a 00 00 00 jmp 10e267 <_POSIX_Message_queue_Receive_support+0xe3> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10e1cd: 8b 48 10 mov 0x10(%eax),%ecx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10e1d0: 8b 45 10 mov 0x10(%ebp),%eax 10e1d3: 3b 41 68 cmp 0x68(%ecx),%eax 10e1d6: 73 15 jae 10e1ed <_POSIX_Message_queue_Receive_support+0x69> _Thread_Enable_dispatch(); 10e1d8: e8 88 32 00 00 call 111465 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10e1dd: e8 9a 8a 00 00 call 116c7c <__errno> 10e1e2: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10e1e8: e9 85 00 00 00 jmp 10e272 <_POSIX_Message_queue_Receive_support+0xee> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10e1ed: 31 c0 xor %eax,%eax 10e1ef: 84 d2 test %dl,%dl 10e1f1: 74 0b je 10e1fe <_POSIX_Message_queue_Receive_support+0x7a><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10e1f3: 89 f8 mov %edi,%eax 10e1f5: c1 e8 0e shr $0xe,%eax 10e1f8: 83 f0 01 xor $0x1,%eax 10e1fb: 83 e0 01 and $0x1,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10e1fe: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10e205: 52 push %edx 10e206: 52 push %edx 10e207: ff 75 1c pushl 0x1c(%ebp) 10e20a: 0f b6 c0 movzbl %al,%eax 10e20d: 50 push %eax 10e20e: 8d 45 e0 lea -0x20(%ebp),%eax 10e211: 50 push %eax 10e212: ff 75 0c pushl 0xc(%ebp) 10e215: 56 push %esi 10e216: 83 c1 1c add $0x1c,%ecx 10e219: 51 push %ecx 10e21a: e8 41 1c 00 00 call 10fe60 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10e21f: 83 c4 20 add $0x20,%esp 10e222: e8 3e 32 00 00 call 111465 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10e227: a1 d0 d0 12 00 mov 0x12d0d0,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10e22c: 8b 50 24 mov 0x24(%eax),%edx 10e22f: c1 fa 1f sar $0x1f,%edx 10e232: 8b 48 24 mov 0x24(%eax),%ecx 10e235: 31 d1 xor %edx,%ecx 10e237: 89 0b mov %ecx,(%ebx) 10e239: 29 13 sub %edx,(%ebx) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10e23b: 83 78 34 00 cmpl $0x0,0x34(%eax) 10e23f: 75 05 jne 10e246 <_POSIX_Message_queue_Receive_support+0xc2> return length_out; 10e241: 8b 45 e0 mov -0x20(%ebp),%eax 10e244: eb 2f jmp 10e275 <_POSIX_Message_queue_Receive_support+0xf1> rtems_set_errno_and_return_minus_one( 10e246: e8 31 8a 00 00 call 116c7c <__errno> 10e24b: 89 c3 mov %eax,%ebx 10e24d: 83 ec 0c sub $0xc,%esp 10e250: a1 d0 d0 12 00 mov 0x12d0d0,%eax 10e255: ff 70 34 pushl 0x34(%eax) 10e258: e8 ff 01 00 00 call 10e45c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10e25d: 89 03 mov %eax,(%ebx) 10e25f: 83 c8 ff or $0xffffffff,%eax 10e262: 83 c4 10 add $0x10,%esp 10e265: eb 0e jmp 10e275 <_POSIX_Message_queue_Receive_support+0xf1> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e267: e8 10 8a 00 00 call 116c7c <__errno> 10e26c: c7 00 09 00 00 00 movl $0x9,(%eax) 10e272: 83 c8 ff or $0xffffffff,%eax } 10e275: 8d 65 f4 lea -0xc(%ebp),%esp 10e278: 5b pop %ebx 10e279: 5e pop %esi 10e27a: 5f pop %edi 10e27b: c9 leave 10e27c: c3 ret 0010e4b0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10e4b0: 55 push %ebp 10e4b1: 89 e5 mov %esp,%ebp 10e4b3: 83 ec 08 sub $0x8,%esp 10e4b6: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e4b9: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10e4bf: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10e4c6: 75 2c jne 10e4f4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 10e4c8: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax) 10e4cf: 75 23 jne 10e4f4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> thread_support->cancelation_requested ) { 10e4d1: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax) 10e4d8: 74 1a je 10e4f4 <_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; 10e4da: a1 e4 51 12 00 mov 0x1251e4,%eax 10e4df: 48 dec %eax 10e4e0: a3 e4 51 12 00 mov %eax,0x1251e4 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10e4e5: 50 push %eax 10e4e6: 50 push %eax 10e4e7: 6a ff push $0xffffffff 10e4e9: 52 push %edx 10e4ea: e8 c9 05 00 00 call 10eab8 <_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 && 10e4ef: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 10e4f2: c9 leave 10e4f3: c3 ret 10e4f4: 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(); 10e4f5: e9 63 db ff ff jmp 10c05d <_Thread_Enable_dispatch> 0010f4e0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 10f4e0: 55 push %ebp 10f4e1: 89 e5 mov %esp,%ebp 10f4e3: 57 push %edi 10f4e4: 56 push %esi 10f4e5: 53 push %ebx 10f4e6: 83 ec 18 sub $0x18,%esp 10f4e9: 8b 7d 08 mov 0x8(%ebp),%edi 10f4ec: 8b 5d 0c mov 0xc(%ebp),%ebx 10f4ef: 8b 75 10 mov 0x10(%ebp),%esi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 10f4f2: ff 33 pushl (%ebx) 10f4f4: e8 c7 ff ff ff call 10f4c0 <_POSIX_Priority_Is_valid> 10f4f9: 83 c4 10 add $0x10,%esp 10f4fc: 84 c0 test %al,%al 10f4fe: 0f 84 97 00 00 00 je 10f59b <_POSIX_Thread_Translate_sched_param+0xbb><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10f504: c7 06 00 00 00 00 movl $0x0,(%esi) *budget_callout = NULL; 10f50a: 8b 45 14 mov 0x14(%ebp),%eax 10f50d: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 10f513: 85 ff test %edi,%edi 10f515: 75 08 jne 10f51f <_POSIX_Thread_Translate_sched_param+0x3f> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10f517: c7 06 01 00 00 00 movl $0x1,(%esi) 10f51d: eb 18 jmp 10f537 <_POSIX_Thread_Translate_sched_param+0x57> return 0; } if ( policy == SCHED_FIFO ) { 10f51f: 83 ff 01 cmp $0x1,%edi 10f522: 75 08 jne 10f52c <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10f524: c7 06 00 00 00 00 movl $0x0,(%esi) 10f52a: eb 0b jmp 10f537 <_POSIX_Thread_Translate_sched_param+0x57> return 0; } if ( policy == SCHED_RR ) { 10f52c: 83 ff 02 cmp $0x2,%edi 10f52f: 75 0a jne 10f53b <_POSIX_Thread_Translate_sched_param+0x5b> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 10f531: c7 06 02 00 00 00 movl $0x2,(%esi) 10f537: 31 c0 xor %eax,%eax return 0; 10f539: eb 65 jmp 10f5a0 <_POSIX_Thread_Translate_sched_param+0xc0> } if ( policy == SCHED_SPORADIC ) { 10f53b: 83 ff 04 cmp $0x4,%edi 10f53e: 75 5b jne 10f59b <_POSIX_Thread_Translate_sched_param+0xbb> if ( (param->sched_ss_repl_period.tv_sec == 0) && 10f540: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10f544: 75 06 jne 10f54c <_POSIX_Thread_Translate_sched_param+0x6c> (param->sched_ss_repl_period.tv_nsec == 0) ) 10f546: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10f54a: 74 4f je 10f59b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 10f54c: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10f550: 75 06 jne 10f558 <_POSIX_Thread_Translate_sched_param+0x78> (param->sched_ss_init_budget.tv_nsec == 0) ) 10f552: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10f556: 74 43 je 10f59b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 10f558: 83 ec 0c sub $0xc,%esp 10f55b: 8d 43 08 lea 0x8(%ebx),%eax 10f55e: 50 push %eax 10f55f: e8 38 e2 ff ff call 10d79c <_Timespec_To_ticks> 10f564: 89 c7 mov %eax,%edi 10f566: 8d 43 10 lea 0x10(%ebx),%eax 10f569: 89 04 24 mov %eax,(%esp) 10f56c: e8 2b e2 ff ff call 10d79c <_Timespec_To_ticks> 10f571: 83 c4 10 add $0x10,%esp 10f574: 39 c7 cmp %eax,%edi 10f576: 72 23 jb 10f59b <_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 ) ) 10f578: 83 ec 0c sub $0xc,%esp 10f57b: ff 73 04 pushl 0x4(%ebx) 10f57e: e8 3d ff ff ff call 10f4c0 <_POSIX_Priority_Is_valid> 10f583: 83 c4 10 add $0x10,%esp 10f586: 84 c0 test %al,%al 10f588: 74 11 je 10f59b <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 10f58a: c7 06 03 00 00 00 movl $0x3,(%esi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 10f590: 8b 45 14 mov 0x14(%ebp),%eax 10f593: c7 00 13 a6 10 00 movl $0x10a613,(%eax) 10f599: eb 9c jmp 10f537 <_POSIX_Thread_Translate_sched_param+0x57> return 0; 10f59b: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 10f5a0: 8d 65 f4 lea -0xc(%ebp),%esp 10f5a3: 5b pop %ebx 10f5a4: 5e pop %esi 10f5a5: 5f pop %edi 10f5a6: c9 leave 10f5a7: c3 ret 0010a350 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10a350: 55 push %ebp 10a351: 89 e5 mov %esp,%ebp 10a353: 57 push %edi 10a354: 56 push %esi 10a355: 53 push %ebx 10a356: 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; 10a359: 8b 3d 10 12 12 00 mov 0x121210,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10a35f: 8b 15 0c 12 12 00 mov 0x12120c,%edx if ( !user_threads || maximum == 0 ) 10a365: 85 d2 test %edx,%edx 10a367: 74 54 je 10a3bd <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a369: 85 ff test %edi,%edi 10a36b: 74 50 je 10a3bd <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a36d: 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 ); 10a36f: 8d 75 a8 lea -0x58(%ebp),%esi 10a372: 83 ec 0c sub $0xc,%esp 10a375: 56 push %esi 10a376: 89 55 a4 mov %edx,-0x5c(%ebp) 10a379: e8 2a 52 00 00 call 10f5a8 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10a37e: 5a pop %edx 10a37f: 59 pop %ecx 10a380: 6a 02 push $0x2 10a382: 56 push %esi 10a383: e8 48 52 00 00 call 10f5d0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10a388: 59 pop %ecx 10a389: 58 pop %eax 10a38a: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10a38e: 56 push %esi 10a38f: e8 6c 52 00 00 call 10f600 status = pthread_create( 10a394: 6a 00 push $0x0 10a396: ff 34 df pushl (%edi,%ebx,8) 10a399: 56 push %esi 10a39a: 8d 45 e4 lea -0x1c(%ebp),%eax 10a39d: 50 push %eax 10a39e: e8 e9 fc ff ff call 10a08c &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10a3a3: 83 c4 20 add $0x20,%esp 10a3a6: 85 c0 test %eax,%eax 10a3a8: 8b 55 a4 mov -0x5c(%ebp),%edx 10a3ab: 74 0b je 10a3b8 <_POSIX_Threads_Initialize_user_threads_body+0x68> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10a3ad: 52 push %edx 10a3ae: 50 push %eax 10a3af: 6a 01 push $0x1 10a3b1: 6a 02 push $0x2 10a3b3: e8 40 1b 00 00 call 10bef8 <_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++ ) { 10a3b8: 43 inc %ebx 10a3b9: 39 d3 cmp %edx,%ebx 10a3bb: 72 b5 jb 10a372 <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10a3bd: 8d 65 f4 lea -0xc(%ebp),%esp 10a3c0: 5b pop %ebx 10a3c1: 5e pop %esi 10a3c2: 5f pop %edi 10a3c3: c9 leave 10a3c4: c3 ret 0010e68b <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 10e68b: 55 push %ebp 10e68c: 89 e5 mov %esp,%ebp 10e68e: 56 push %esi 10e68f: 53 push %ebx 10e690: 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 ]; 10e693: 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 ); 10e699: 83 ec 0c sub $0xc,%esp 10e69c: 8d 86 94 00 00 00 lea 0x94(%esi),%eax 10e6a2: 50 push %eax 10e6a3: e8 bc 0e 00 00 call 10f564 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 10e6a8: 89 43 78 mov %eax,0x78(%ebx) 10e6ab: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10e6b2: 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; 10e6b8: 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 ) { 10e6bb: 83 c4 10 add $0x10,%esp 10e6be: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10e6c2: 75 12 jne 10e6d6 <_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 ) { 10e6c4: 39 43 14 cmp %eax,0x14(%ebx) 10e6c7: 76 0d jbe 10e6d6 <_POSIX_Threads_Sporadic_budget_TSR+0x4b> _Thread_Change_priority( the_thread, new_priority, true ); 10e6c9: 52 push %edx 10e6ca: 6a 01 push $0x1 10e6cc: 50 push %eax 10e6cd: 53 push %ebx 10e6ce: e8 41 d1 ff ff call 10b814 <_Thread_Change_priority> 10e6d3: 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 ); 10e6d6: 83 ec 0c sub $0xc,%esp 10e6d9: 8d 86 8c 00 00 00 lea 0x8c(%esi),%eax 10e6df: 50 push %eax 10e6e0: e8 7f 0e 00 00 call 10f564 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10e6e5: 89 86 b0 00 00 00 mov %eax,0xb0(%esi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10e6eb: 83 c4 10 add $0x10,%esp 10e6ee: 81 c6 a4 00 00 00 add $0xa4,%esi 10e6f4: 89 75 0c mov %esi,0xc(%ebp) 10e6f7: c7 45 08 d0 42 12 00 movl $0x1242d0,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 10e6fe: 8d 65 f8 lea -0x8(%ebp),%esp 10e701: 5b pop %ebx 10e702: 5e pop %esi 10e703: c9 leave 10e704: e9 8b e3 ff ff jmp 10ca94 <_Watchdog_Insert> 0010e64b <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10e64b: 55 push %ebp 10e64c: 89 e5 mov %esp,%ebp 10e64e: 83 ec 08 sub $0x8,%esp 10e651: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e654: 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 */ 10e65a: 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); 10e661: 0f b6 15 f4 01 12 00 movzbl 0x1201f4,%edx 10e668: 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; 10e66e: 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 ) { 10e671: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e675: 75 12 jne 10e689 <_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 ) { 10e677: 39 50 14 cmp %edx,0x14(%eax) 10e67a: 73 0d jae 10e689 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); 10e67c: 51 push %ecx 10e67d: 6a 01 push $0x1 10e67f: 52 push %edx 10e680: 50 push %eax 10e681: e8 8e d1 ff ff call 10b814 <_Thread_Change_priority> 10e686: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 10e689: c9 leave 10e68a: c3 ret 0010a0fc <_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) { 10a0fc: 55 push %ebp 10a0fd: 89 e5 mov %esp,%ebp 10a0ff: 53 push %ebx 10a100: 83 ec 04 sub $0x4,%esp 10a103: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10a106: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a109: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 10a10d: 75 06 jne 10a115 <_POSIX_Timer_TSR+0x19> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10a10f: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10a113: 74 34 je 10a149 <_POSIX_Timer_TSR+0x4d> <== NEVER TAKEN activated = _POSIX_Timer_Insert_helper( 10a115: 83 ec 0c sub $0xc,%esp 10a118: 53 push %ebx 10a119: 68 fc a0 10 00 push $0x10a0fc 10a11e: ff 73 08 pushl 0x8(%ebx) 10a121: ff 73 64 pushl 0x64(%ebx) 10a124: 8d 43 10 lea 0x10(%ebx),%eax 10a127: 50 push %eax 10a128: e8 3b 51 00 00 call 10f268 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10a12d: 83 c4 20 add $0x20,%esp 10a130: 84 c0 test %al,%al 10a132: 74 30 je 10a164 <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10a134: 83 ec 0c sub $0xc,%esp 10a137: 8d 43 6c lea 0x6c(%ebx),%eax 10a13a: 50 push %eax 10a13b: e8 34 14 00 00 call 10b574 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a140: 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 ) || 10a144: 83 c4 10 add $0x10,%esp 10a147: eb 04 jmp 10a14d <_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; 10a149: 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 ) ) { 10a14d: 50 push %eax 10a14e: 50 push %eax 10a14f: ff 73 44 pushl 0x44(%ebx) 10a152: ff 73 38 pushl 0x38(%ebx) 10a155: e8 de 4c 00 00 call 10ee38 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10a15a: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10a161: 83 c4 10 add $0x10,%esp } 10a164: 8b 5d fc mov -0x4(%ebp),%ebx 10a167: c9 leave 10a168: c3 ret 00110390 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 110390: 55 push %ebp 110391: 89 e5 mov %esp,%ebp 110393: 57 push %edi 110394: 56 push %esi 110395: 53 push %ebx 110396: 83 ec 38 sub $0x38,%esp 110399: 8b 5d 08 mov 0x8(%ebp),%ebx 11039c: 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, 11039f: 6a 01 push $0x1 1103a1: 0f b6 45 10 movzbl 0x10(%ebp),%eax 1103a5: 50 push %eax 1103a6: 8d 7d dc lea -0x24(%ebp),%edi 1103a9: 57 push %edi 1103aa: 56 push %esi 1103ab: 53 push %ebx 1103ac: e8 5b 00 00 00 call 11040c <_POSIX_signals_Clear_signals> 1103b1: 83 c4 20 add $0x20,%esp 1103b4: 84 c0 test %al,%al 1103b6: 74 48 je 110400 <_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 ) 1103b8: 6b d6 0c imul $0xc,%esi,%edx 1103bb: 8b 82 5c 47 12 00 mov 0x12475c(%edx),%eax 1103c1: 83 f8 01 cmp $0x1,%eax 1103c4: 74 3a je 110400 <_POSIX_signals_Check_signal+0x70><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 1103c6: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 1103cc: 89 4d d4 mov %ecx,-0x2c(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 1103cf: 0b 8a 58 47 12 00 or 0x124758(%edx),%ecx 1103d5: 89 8b cc 00 00 00 mov %ecx,0xcc(%ebx) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 1103db: 83 ba 54 47 12 00 02 cmpl $0x2,0x124754(%edx) 1103e2: 75 06 jne 1103ea <_POSIX_signals_Check_signal+0x5a> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 1103e4: 52 push %edx 1103e5: 6a 00 push $0x0 1103e7: 57 push %edi 1103e8: eb 03 jmp 1103ed <_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 ); 1103ea: 83 ec 0c sub $0xc,%esp 1103ed: 56 push %esi 1103ee: ff d0 call *%eax 1103f0: 83 c4 10 add $0x10,%esp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 1103f3: 8b 45 d4 mov -0x2c(%ebp),%eax 1103f6: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 1103fc: b0 01 mov $0x1,%al return true; 1103fe: eb 02 jmp 110402 <_POSIX_signals_Check_signal+0x72> 110400: 31 c0 xor %eax,%eax } 110402: 8d 65 f4 lea -0xc(%ebp),%esp 110405: 5b pop %ebx 110406: 5e pop %esi 110407: 5f pop %edi 110408: c9 leave 110409: c3 ret 00111174 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 111174: 55 push %ebp 111175: 89 e5 mov %esp,%ebp 111177: 53 push %ebx 111178: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 11117b: 9c pushf 11117c: fa cli 11117d: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 11117e: 6b c1 0c imul $0xc,%ecx,%eax 111181: 83 b8 54 47 12 00 02 cmpl $0x2,0x124754(%eax) 111188: 75 0e jne 111198 <_POSIX_signals_Clear_process_signals+0x24> 11118a: 8d 98 50 49 12 00 lea 0x124950(%eax),%ebx 111190: 39 98 4c 49 12 00 cmp %ebx,0x12494c(%eax) 111196: 75 1d jne 1111b5 <_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; 111198: 49 dec %ecx 111199: b8 fe ff ff ff mov $0xfffffffe,%eax 11119e: d3 c0 rol %cl,%eax 1111a0: 23 05 48 49 12 00 and 0x124948,%eax 1111a6: a3 48 49 12 00 mov %eax,0x124948 if ( !_POSIX_signals_Pending ) 1111ab: 85 c0 test %eax,%eax 1111ad: 75 06 jne 1111b5 <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 1111af: ff 0d 94 42 12 00 decl 0x124294 } _ISR_Enable( level ); 1111b5: 52 push %edx 1111b6: 9d popf } 1111b7: 5b pop %ebx 1111b8: c9 leave 1111b9: c3 ret 0010a9d4 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10a9d4: 55 push %ebp 10a9d5: 89 e5 mov %esp,%ebp 10a9d7: 56 push %esi 10a9d8: 53 push %ebx 10a9d9: 8b 55 08 mov 0x8(%ebp),%edx 10a9dc: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10a9e1: bb 01 00 00 00 mov $0x1,%ebx 10a9e6: 8d 48 ff lea -0x1(%eax),%ecx 10a9e9: 89 de mov %ebx,%esi 10a9eb: d3 e6 shl %cl,%esi 10a9ed: 85 d6 test %edx,%esi 10a9ef: 75 1e jne 10aa0f <_POSIX_signals_Get_highest+0x3b><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10a9f1: 40 inc %eax 10a9f2: 83 f8 20 cmp $0x20,%eax 10a9f5: 75 ef jne 10a9e6 <_POSIX_signals_Get_highest+0x12> 10a9f7: 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 ) ) { 10a9f9: bb 01 00 00 00 mov $0x1,%ebx 10a9fe: 8d 48 ff lea -0x1(%eax),%ecx 10aa01: 89 de mov %ebx,%esi 10aa03: d3 e6 shl %cl,%esi 10aa05: 85 d6 test %edx,%esi 10aa07: 75 06 jne 10aa0f <_POSIX_signals_Get_highest+0x3b> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10aa09: 40 inc %eax 10aa0a: 83 f8 1b cmp $0x1b,%eax 10aa0d: 75 ef jne 10a9fe <_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; } 10aa0f: 5b pop %ebx 10aa10: 5e pop %esi 10aa11: c9 leave 10aa12: c3 ret 001111e0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 1111e0: 55 push %ebp 1111e1: 89 e5 mov %esp,%ebp 1111e3: 57 push %edi 1111e4: 56 push %esi 1111e5: 53 push %ebx 1111e6: 83 ec 0c sub $0xc,%esp 1111e9: 8b 5d 08 mov 0x8(%ebp),%ebx 1111ec: 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 ]; 1111ef: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 1111f5: 8d 4a ff lea -0x1(%edx),%ecx 1111f8: b8 01 00 00 00 mov $0x1,%eax 1111fd: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1111ff: 8b 4b 10 mov 0x10(%ebx),%ecx 111202: 89 cf mov %ecx,%edi 111204: 81 e7 00 80 00 10 and $0x10008000,%edi 11120a: 81 ff 00 80 00 10 cmp $0x10008000,%edi 111210: 75 50 jne 111262 <_POSIX_signals_Unblock_thread+0x82> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 111212: 85 43 30 test %eax,0x30(%ebx) 111215: 75 10 jne 111227 <_POSIX_signals_Unblock_thread+0x47> 111217: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 11121d: f7 d1 not %ecx 11121f: 85 c8 test %ecx,%eax 111221: 0f 84 a4 00 00 00 je 1112cb <_POSIX_signals_Unblock_thread+0xeb> the_thread->Wait.return_code = EINTR; 111227: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 11122e: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 111231: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 111235: 75 12 jne 111249 <_POSIX_signals_Unblock_thread+0x69> the_info->si_signo = signo; 111237: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 111239: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 111240: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 111247: eb 0c jmp 111255 <_POSIX_signals_Unblock_thread+0x75> } else { *the_info = *info; 111249: b9 03 00 00 00 mov $0x3,%ecx 11124e: 89 c7 mov %eax,%edi 111250: 8b 75 10 mov 0x10(%ebp),%esi 111253: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 111255: 83 ec 0c sub $0xc,%esp 111258: 53 push %ebx 111259: e8 d2 b0 ff ff call 10c330 <_Thread_queue_Extract_with_proxy> 11125e: b0 01 mov $0x1,%al 111260: eb 48 jmp 1112aa <_POSIX_signals_Unblock_thread+0xca> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 111262: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 111268: f7 d2 not %edx 11126a: 85 d0 test %edx,%eax 11126c: 74 5d je 1112cb <_POSIX_signals_Unblock_thread+0xeb> * 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; 11126e: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 111272: f7 c1 00 00 00 10 test $0x10000000,%ecx 111278: 74 35 je 1112af <_POSIX_signals_Unblock_thread+0xcf> the_thread->Wait.return_code = EINTR; 11127a: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 111281: 80 e1 08 and $0x8,%cl 111284: 74 45 je 1112cb <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111286: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11128a: 75 0f jne 11129b <_POSIX_signals_Unblock_thread+0xbb><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 11128c: 83 ec 0c sub $0xc,%esp 11128f: 8d 43 48 lea 0x48(%ebx),%eax 111292: 50 push %eax 111293: e8 14 b9 ff ff call 10cbac <_Watchdog_Remove> 111298: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11129b: 50 push %eax 11129c: 50 push %eax 11129d: 68 f8 ff 03 10 push $0x1003fff8 1112a2: 53 push %ebx 1112a3: e8 8c a6 ff ff call 10b934 <_Thread_Clear_state> 1112a8: 31 c0 xor %eax,%eax 1112aa: 83 c4 10 add $0x10,%esp 1112ad: eb 1e jmp 1112cd <_POSIX_signals_Unblock_thread+0xed> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 1112af: 85 c9 test %ecx,%ecx 1112b1: 75 18 jne 1112cb <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1112b3: a1 8c 42 12 00 mov 0x12428c,%eax 1112b8: 85 c0 test %eax,%eax 1112ba: 74 0f je 1112cb <_POSIX_signals_Unblock_thread+0xeb> 1112bc: 3b 1d b0 42 12 00 cmp 0x1242b0,%ebx 1112c2: 75 07 jne 1112cb <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 1112c4: c6 05 44 43 12 00 01 movb $0x1,0x124344 1112cb: 31 c0 xor %eax,%eax } } return false; } 1112cd: 8d 65 f4 lea -0xc(%ebp),%esp 1112d0: 5b pop %ebx 1112d1: 5e pop %esi 1112d2: 5f pop %edi 1112d3: c9 leave 1112d4: c3 ret 0010ea41 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10ea41: 55 push %ebp 10ea42: 89 e5 mov %esp,%ebp 10ea44: 53 push %ebx 10ea45: 83 ec 10 sub $0x10,%esp 10ea48: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 10ea4b: 80 3d c4 01 12 00 01 cmpb $0x1,0x1201c4 10ea52: 19 c0 sbb %eax,%eax 10ea54: 83 e0 c0 and $0xffffffc0,%eax 10ea57: 83 c0 60 add $0x60,%eax to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 10ea5a: 50 push %eax 10ea5b: e8 48 e2 ff ff call 10cca8 <_Workspace_Allocate> if ( !api ) 10ea60: 83 c4 10 add $0x10,%esp 10ea63: 31 d2 xor %edx,%edx 10ea65: 85 c0 test %eax,%eax 10ea67: 74 5f je 10eac8 <_RTEMS_tasks_Create_extension+0x87><== NEVER TAKEN return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 10ea69: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 10ea6f: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 10ea75: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10ea7c: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10ea80: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10ea87: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10ea8e: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10ea95: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10ea9c: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 10eaa3: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx) 10eaaa: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 10eaad: 80 3d c4 01 12 00 00 cmpb $0x0,0x1201c4 10eab4: 74 10 je 10eac6 <_RTEMS_tasks_Create_extension+0x85> 10eab6: 31 d2 xor %edx,%edx for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 10eab8: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 10eabf: 00 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 10eac0: 42 inc %edx 10eac1: 83 fa 10 cmp $0x10,%edx 10eac4: 75 f2 jne 10eab8 <_RTEMS_tasks_Create_extension+0x77> 10eac6: b2 01 mov $0x1,%dl api->Notepads[i] = 0; } return true; } 10eac8: 88 d0 mov %dl,%al 10eaca: 8b 5d fc mov -0x4(%ebp),%ebx 10eacd: c9 leave 10eace: c3 ret 0010e98e <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e98e: 55 push %ebp 10e98f: 89 e5 mov %esp,%ebp 10e991: 57 push %edi 10e992: 56 push %esi 10e993: 53 push %ebx 10e994: 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 ]; 10e997: 8b 45 08 mov 0x8(%ebp),%eax 10e99a: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 10e9a0: 85 db test %ebx,%ebx 10e9a2: 74 45 je 10e9e9 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e9a4: 9c pushf 10e9a5: fa cli 10e9a6: 58 pop %eax signal_set = asr->signals_posted; 10e9a7: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e9aa: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e9b1: 50 push %eax 10e9b2: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e9b3: 85 ff test %edi,%edi 10e9b5: 74 32 je 10e9e9 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10e9b7: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e9ba: 50 push %eax 10e9bb: 8d 75 e4 lea -0x1c(%ebp),%esi 10e9be: 56 push %esi 10e9bf: 68 ff ff 00 00 push $0xffff 10e9c4: ff 73 10 pushl 0x10(%ebx) 10e9c7: e8 7c 1d 00 00 call 110748 (*asr->handler)( signal_set ); 10e9cc: 89 3c 24 mov %edi,(%esp) 10e9cf: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e9d2: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e9d5: 83 c4 0c add $0xc,%esp 10e9d8: 56 push %esi 10e9d9: 68 ff ff 00 00 push $0xffff 10e9de: ff 75 e4 pushl -0x1c(%ebp) 10e9e1: e8 62 1d 00 00 call 110748 10e9e6: 83 c4 10 add $0x10,%esp } 10e9e9: 8d 65 f4 lea -0xc(%ebp),%esp 10e9ec: 5b pop %ebx 10e9ed: 5e pop %esi 10e9ee: 5f pop %edi 10e9ef: c9 leave 10e9f0: c3 ret 0010b1e8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b1e8: 55 push %ebp 10b1e9: 89 e5 mov %esp,%ebp 10b1eb: 53 push %ebx 10b1ec: 83 ec 18 sub $0x18,%esp 10b1ef: 8d 45 f4 lea -0xc(%ebp),%eax 10b1f2: 50 push %eax 10b1f3: ff 75 08 pushl 0x8(%ebp) 10b1f6: 68 20 72 12 00 push $0x127220 10b1fb: e8 04 1a 00 00 call 10cc04 <_Objects_Get> 10b200: 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 ) { 10b202: 83 c4 10 add $0x10,%esp 10b205: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b209: 75 64 jne 10b26f <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b20b: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b20e: f6 40 11 40 testb $0x40,0x11(%eax) 10b212: 74 18 je 10b22c <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 10b214: 8b 50 20 mov 0x20(%eax),%edx 10b217: 3b 53 08 cmp 0x8(%ebx),%edx 10b21a: 75 10 jne 10b22c <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b21c: 52 push %edx 10b21d: 52 push %edx 10b21e: 68 f8 ff 03 10 push $0x1003fff8 10b223: 50 push %eax 10b224: e8 4f 1e 00 00 call 10d078 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b229: 59 pop %ecx 10b22a: eb 10 jmp 10b23c <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b22c: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b230: 75 2b jne 10b25d <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b232: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 10b239: 83 ec 0c sub $0xc,%esp 10b23c: 53 push %ebx 10b23d: e8 56 fa ff ff call 10ac98 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b242: 8b 43 3c mov 0x3c(%ebx),%eax 10b245: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b248: 58 pop %eax 10b249: 5a pop %edx 10b24a: 83 c3 10 add $0x10,%ebx 10b24d: 53 push %ebx 10b24e: 68 f4 73 12 00 push $0x1273f4 10b253: e8 44 31 00 00 call 10e39c <_Watchdog_Insert> 10b258: 83 c4 10 add $0x10,%esp 10b25b: eb 07 jmp 10b264 <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b25d: 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; 10b264: a1 18 73 12 00 mov 0x127318,%eax 10b269: 48 dec %eax 10b26a: a3 18 73 12 00 mov %eax,0x127318 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b26f: 8b 5d fc mov -0x4(%ebp),%ebx 10b272: c9 leave 10b273: c3 ret 0010ab10 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10ab10: 55 push %ebp 10ab11: 89 e5 mov %esp,%ebp 10ab13: 53 push %ebx 10ab14: 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(); 10ab17: 8b 1d 04 32 12 00 mov 0x123204,%ebx if ((!the_tod) || 10ab1d: 85 c9 test %ecx,%ecx 10ab1f: 74 59 je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10ab21: b8 40 42 0f 00 mov $0xf4240,%eax 10ab26: 31 d2 xor %edx,%edx 10ab28: f7 f3 div %ebx 10ab2a: 39 41 18 cmp %eax,0x18(%ecx) 10ab2d: 73 4b jae 10ab7a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10ab2f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10ab33: 77 45 ja 10ab7a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10ab35: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10ab39: 77 3f ja 10ab7a <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10ab3b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10ab3f: 77 39 ja 10ab7a <_TOD_Validate+0x6a> (the_tod->month == 0) || 10ab41: 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) || 10ab44: 85 c0 test %eax,%eax 10ab46: 74 32 je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN 10ab48: 83 f8 0c cmp $0xc,%eax 10ab4b: 77 2d ja 10ab7a <_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) || 10ab4d: 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) || 10ab4f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10ab55: 76 23 jbe 10ab7a <_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) ) 10ab57: 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) || 10ab5a: 85 d2 test %edx,%edx 10ab5c: 74 1c je 10ab7a <_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 ) 10ab5e: 80 e3 03 and $0x3,%bl 10ab61: 75 09 jne 10ab6c <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10ab63: 8b 04 85 40 10 12 00 mov 0x121040(,%eax,4),%eax 10ab6a: eb 07 jmp 10ab73 <_TOD_Validate+0x63> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10ab6c: 8b 04 85 0c 10 12 00 mov 0x12100c(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10ab73: 39 c2 cmp %eax,%edx 10ab75: 0f 96 c0 setbe %al 10ab78: eb 02 jmp 10ab7c <_TOD_Validate+0x6c> 10ab7a: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10ab7c: 5b pop %ebx 10ab7d: c9 leave 10ab7e: c3 ret 0010b814 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10b814: 55 push %ebp 10b815: 89 e5 mov %esp,%ebp 10b817: 57 push %edi 10b818: 56 push %esi 10b819: 53 push %ebx 10b81a: 83 ec 28 sub $0x28,%esp 10b81d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b820: 8b 7d 0c mov 0xc(%ebp),%edi 10b823: 8a 45 10 mov 0x10(%ebp),%al 10b826: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10b829: 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 ); 10b82c: 53 push %ebx 10b82d: e8 5e 0d 00 00 call 10c590 <_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 ) 10b832: 83 c4 10 add $0x10,%esp 10b835: 39 7b 14 cmp %edi,0x14(%ebx) 10b838: 74 0c je 10b846 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10b83a: 50 push %eax 10b83b: 50 push %eax 10b83c: 57 push %edi 10b83d: 53 push %ebx 10b83e: e8 15 0c 00 00 call 10c458 <_Thread_Set_priority> 10b843: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10b846: 9c pushf 10b847: fa cli 10b848: 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; 10b849: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10b84c: 83 f8 04 cmp $0x4,%eax 10b84f: 74 2f je 10b880 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10b851: 83 e6 04 and $0x4,%esi 10b854: 75 08 jne 10b85e <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10b856: 89 c2 mov %eax,%edx 10b858: 83 e2 fb and $0xfffffffb,%edx 10b85b: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10b85e: 51 push %ecx 10b85f: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10b860: a9 e0 be 03 00 test $0x3bee0,%eax 10b865: 0f 84 c0 00 00 00 je 10b92b <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10b86b: 89 5d 0c mov %ebx,0xc(%ebp) 10b86e: 8b 43 44 mov 0x44(%ebx),%eax 10b871: 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 ); } 10b874: 8d 65 f4 lea -0xc(%ebp),%esp 10b877: 5b pop %ebx 10b878: 5e pop %esi 10b879: 5f pop %edi 10b87a: 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 ); 10b87b: e9 50 0b 00 00 jmp 10c3d0 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10b880: 83 e6 04 and $0x4,%esi 10b883: 75 53 jne 10b8d8 <_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 ); 10b885: 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; 10b88c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10b892: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10b899: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b89c: 66 a1 a4 42 12 00 mov 0x1242a4,%ax 10b8a2: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10b8a8: 66 a3 a4 42 12 00 mov %ax,0x1242a4 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10b8ae: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10b8b2: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10b8b8: 74 0e je 10b8c8 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10b8ba: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10b8bd: 8b 10 mov (%eax),%edx after_node->next = the_node; 10b8bf: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10b8c1: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10b8c3: 89 5a 04 mov %ebx,0x4(%edx) 10b8c6: eb 10 jmp 10b8d8 <_Thread_Change_priority+0xc4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b8c8: 8d 50 04 lea 0x4(%eax),%edx 10b8cb: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10b8cd: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10b8d0: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10b8d3: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10b8d5: 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 ); 10b8d8: 51 push %ecx 10b8d9: 9d popf 10b8da: 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 ); 10b8db: 66 8b 1d a4 42 12 00 mov 0x1242a4,%bx 10b8e2: 31 c0 xor %eax,%eax 10b8e4: 89 c2 mov %eax,%edx 10b8e6: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10b8ea: 0f b7 d2 movzwl %dx,%edx 10b8ed: 66 8b 9c 12 1c 43 12 mov 0x12431c(%edx,%edx,1),%bx 10b8f4: 00 10b8f5: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10b8f9: c1 e2 04 shl $0x4,%edx 10b8fc: 0f b7 c0 movzwl %ax,%eax 10b8ff: 01 c2 add %eax,%edx 10b901: 6b d2 0c imul $0xc,%edx,%edx 10b904: 8b 1d bc 41 12 00 mov 0x1241bc,%ebx 10b90a: 8b 14 1a mov (%edx,%ebx,1),%edx 10b90d: 89 15 80 42 12 00 mov %edx,0x124280 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10b913: a1 b0 42 12 00 mov 0x1242b0,%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() && 10b918: 39 d0 cmp %edx,%eax 10b91a: 74 0d je 10b929 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10b91c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b920: 74 07 je 10b929 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10b922: c6 05 c0 42 12 00 01 movb $0x1,0x1242c0 _ISR_Enable( level ); 10b929: 51 push %ecx 10b92a: 9d popf } 10b92b: 8d 65 f4 lea -0xc(%ebp),%esp 10b92e: 5b pop %ebx 10b92f: 5e pop %esi 10b930: 5f pop %edi 10b931: c9 leave 10b932: c3 ret 0010b934 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10b934: 55 push %ebp 10b935: 89 e5 mov %esp,%ebp 10b937: 53 push %ebx 10b938: 8b 45 08 mov 0x8(%ebp),%eax 10b93b: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10b93e: 9c pushf 10b93f: fa cli 10b940: 59 pop %ecx current_state = the_thread->current_state; 10b941: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10b944: 85 da test %ebx,%edx 10b946: 74 71 je 10b9b9 <_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); 10b948: f7 d2 not %edx 10b94a: 21 da and %ebx,%edx current_state = 10b94c: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10b94f: 85 d2 test %edx,%edx 10b951: 75 66 jne 10b9b9 <_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; 10b953: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10b959: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10b960: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b963: 66 8b 15 a4 42 12 00 mov 0x1242a4,%dx 10b96a: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10b970: 66 89 15 a4 42 12 00 mov %dx,0x1242a4 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10b977: 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); 10b97d: 8d 5a 04 lea 0x4(%edx),%ebx 10b980: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10b982: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10b985: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10b988: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10b98a: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10b98d: 51 push %ecx 10b98e: 9d popf 10b98f: 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 ) { 10b990: 8b 50 14 mov 0x14(%eax),%edx 10b993: 8b 1d 80 42 12 00 mov 0x124280,%ebx 10b999: 3b 53 14 cmp 0x14(%ebx),%edx 10b99c: 73 1b jae 10b9b9 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10b99e: a3 80 42 12 00 mov %eax,0x124280 if ( _Thread_Executing->is_preemptible || 10b9a3: a1 b0 42 12 00 mov 0x1242b0,%eax 10b9a8: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b9ac: 75 04 jne 10b9b2 <_Thread_Clear_state+0x7e> 10b9ae: 85 d2 test %edx,%edx 10b9b0: 75 07 jne 10b9b9 <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10b9b2: c6 05 c0 42 12 00 01 movb $0x1,0x1242c0 } } } _ISR_Enable( level ); 10b9b9: 51 push %ecx 10b9ba: 9d popf } 10b9bb: 5b pop %ebx 10b9bc: c9 leave 10b9bd: c3 ret 0010bb34 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10bb34: 55 push %ebp 10bb35: 89 e5 mov %esp,%ebp 10bb37: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10bb3a: 8d 45 f4 lea -0xc(%ebp),%eax 10bb3d: 50 push %eax 10bb3e: ff 75 08 pushl 0x8(%ebp) 10bb41: e8 8e 01 00 00 call 10bcd4 <_Thread_Get> switch ( location ) { 10bb46: 83 c4 10 add $0x10,%esp 10bb49: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bb4d: 75 1b jne 10bb6a <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10bb4f: 52 push %edx 10bb50: 52 push %edx 10bb51: 68 18 00 00 10 push $0x10000018 10bb56: 50 push %eax 10bb57: e8 d8 fd ff ff call 10b934 <_Thread_Clear_state> 10bb5c: a1 f4 41 12 00 mov 0x1241f4,%eax 10bb61: 48 dec %eax 10bb62: a3 f4 41 12 00 mov %eax,0x1241f4 10bb67: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10bb6a: c9 leave 10bb6b: c3 ret 0010bb6c <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10bb6c: 55 push %ebp 10bb6d: 89 e5 mov %esp,%ebp 10bb6f: 57 push %edi 10bb70: 56 push %esi 10bb71: 53 push %ebx 10bb72: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10bb75: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx _ISR_Disable( level ); 10bb7b: 9c pushf 10bb7c: fa cli 10bb7d: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10bb7e: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10bb81: e9 f1 00 00 00 jmp 10bc77 <_Thread_Dispatch+0x10b> heir = _Thread_Heir; 10bb86: 8b 35 80 42 12 00 mov 0x124280,%esi _Thread_Dispatch_disable_level = 1; 10bb8c: c7 05 f4 41 12 00 01 movl $0x1,0x1241f4 10bb93: 00 00 00 _Context_Switch_necessary = false; 10bb96: c6 05 c0 42 12 00 00 movb $0x0,0x1242c0 _Thread_Executing = heir; 10bb9d: 89 35 b0 42 12 00 mov %esi,0x1242b0 #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 ) 10bba3: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10bba7: 75 09 jne 10bbb2 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10bba9: 8b 15 c0 41 12 00 mov 0x1241c0,%edx 10bbaf: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10bbb2: 50 push %eax 10bbb3: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10bbb4: 83 ec 0c sub $0xc,%esp 10bbb7: 8d 45 e0 lea -0x20(%ebp),%eax 10bbba: 50 push %eax 10bbbb: e8 30 32 00 00 call 10edf0 <_TOD_Get_uptime> _Timestamp_Subtract( 10bbc0: 83 c4 0c add $0xc,%esp 10bbc3: 57 push %edi 10bbc4: 8d 45 e0 lea -0x20(%ebp),%eax 10bbc7: 50 push %eax 10bbc8: 68 b8 42 12 00 push $0x1242b8 10bbcd: e8 5e 0c 00 00 call 10c830 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10bbd2: 58 pop %eax 10bbd3: 5a pop %edx 10bbd4: 57 push %edi 10bbd5: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10bbdb: 50 push %eax 10bbdc: e8 1f 0c 00 00 call 10c800 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10bbe1: 8b 45 e0 mov -0x20(%ebp),%eax 10bbe4: 8b 55 e4 mov -0x1c(%ebp),%edx 10bbe7: a3 b8 42 12 00 mov %eax,0x1242b8 10bbec: 89 15 bc 42 12 00 mov %edx,0x1242bc #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10bbf2: a1 7c 42 12 00 mov 0x12427c,%eax 10bbf7: 83 c4 10 add $0x10,%esp 10bbfa: 85 c0 test %eax,%eax 10bbfc: 74 10 je 10bc0e <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10bbfe: 8b 10 mov (%eax),%edx 10bc00: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10bc06: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10bc0c: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10bc0e: 51 push %ecx 10bc0f: 51 push %ecx 10bc10: 56 push %esi 10bc11: 53 push %ebx 10bc12: e8 49 0e 00 00 call 10ca60 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10bc17: 58 pop %eax 10bc18: 5a pop %edx 10bc19: 81 c6 d4 00 00 00 add $0xd4,%esi 10bc1f: 56 push %esi 10bc20: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10bc26: 50 push %eax 10bc27: e8 f4 10 00 00 call 10cd20 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10bc2c: 83 c4 10 add $0x10,%esp 10bc2f: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10bc36: 74 36 je 10bc6e <_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 ); 10bc38: a1 78 42 12 00 mov 0x124278,%eax 10bc3d: 39 c3 cmp %eax,%ebx 10bc3f: 74 2d je 10bc6e <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10bc41: 85 c0 test %eax,%eax 10bc43: 74 11 je 10bc56 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10bc45: 83 ec 0c sub $0xc,%esp 10bc48: 05 ec 00 00 00 add $0xec,%eax 10bc4d: 50 push %eax 10bc4e: e8 01 11 00 00 call 10cd54 <_CPU_Context_save_fp> 10bc53: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10bc56: 83 ec 0c sub $0xc,%esp 10bc59: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10bc5f: 50 push %eax 10bc60: e8 f9 10 00 00 call 10cd5e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10bc65: 89 1d 78 42 12 00 mov %ebx,0x124278 10bc6b: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10bc6e: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx _ISR_Disable( level ); 10bc74: 9c pushf 10bc75: fa cli 10bc76: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10bc77: 8a 15 c0 42 12 00 mov 0x1242c0,%dl 10bc7d: 84 d2 test %dl,%dl 10bc7f: 0f 85 01 ff ff ff jne 10bb86 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10bc85: c7 05 f4 41 12 00 00 movl $0x0,0x1241f4 10bc8c: 00 00 00 _ISR_Enable( level ); 10bc8f: 50 push %eax 10bc90: 9d popf if ( _Thread_Do_post_task_switch_extension || 10bc91: 83 3d 94 42 12 00 00 cmpl $0x0,0x124294 10bc98: 75 06 jne 10bca0 <_Thread_Dispatch+0x134> executing->do_post_task_switch_extension ) { 10bc9a: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10bc9e: 74 09 je 10bca9 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10bca0: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10bca4: e8 92 ea ff ff call 10a73b <_API_extensions_Run_postswitch> } } 10bca9: 8d 65 f4 lea -0xc(%ebp),%esp 10bcac: 5b pop %ebx 10bcad: 5e pop %esi 10bcae: 5f pop %edi 10bcaf: c9 leave 10bcb0: c3 ret 00110a4c <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 110a4c: 55 push %ebp 110a4d: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 110a4f: a1 b0 42 12 00 mov 0x1242b0,%eax if ( !_States_Is_ready( executing->current_state ) || 110a54: 83 78 10 00 cmpl $0x0,0x10(%eax) 110a58: 75 0e jne 110a68 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 110a5a: 3b 05 80 42 12 00 cmp 0x124280,%eax 110a60: 74 11 je 110a73 <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 110a62: 80 78 75 00 cmpb $0x0,0x75(%eax) 110a66: 74 0b je 110a73 <_Thread_Evaluate_mode+0x27><== NEVER TAKEN _Context_Switch_necessary = true; 110a68: c6 05 c0 42 12 00 01 movb $0x1,0x1242c0 110a6f: b0 01 mov $0x1,%al return true; 110a71: eb 02 jmp 110a75 <_Thread_Evaluate_mode+0x29> 110a73: 31 c0 xor %eax,%eax } return false; } 110a75: c9 leave 110a76: c3 ret 00110a78 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 110a78: 55 push %ebp 110a79: 89 e5 mov %esp,%ebp 110a7b: 53 push %ebx 110a7c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 110a7f: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 110a85: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 110a8b: 85 c0 test %eax,%eax 110a8d: 74 03 je 110a92 <_Thread_Handler+0x1a> 110a8f: fa cli 110a90: eb 01 jmp 110a93 <_Thread_Handler+0x1b> 110a92: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 110a93: a0 9c 3e 12 00 mov 0x123e9c,%al 110a98: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 110a9b: c6 05 9c 3e 12 00 01 movb $0x1,0x123e9c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 110aa2: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 110aa9: 74 24 je 110acf <_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 ); 110aab: a1 78 42 12 00 mov 0x124278,%eax 110ab0: 39 c3 cmp %eax,%ebx 110ab2: 74 1b je 110acf <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 110ab4: 85 c0 test %eax,%eax 110ab6: 74 11 je 110ac9 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 110ab8: 83 ec 0c sub $0xc,%esp 110abb: 05 ec 00 00 00 add $0xec,%eax 110ac0: 50 push %eax 110ac1: e8 8e c2 ff ff call 10cd54 <_CPU_Context_save_fp> 110ac6: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 110ac9: 89 1d 78 42 12 00 mov %ebx,0x124278 /* * 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 ); 110acf: 83 ec 0c sub $0xc,%esp 110ad2: 53 push %ebx 110ad3: e8 3c be ff ff call 10c914 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 110ad8: e8 d4 b1 ff ff call 10bcb1 <_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) */ { 110add: 83 c4 10 add $0x10,%esp 110ae0: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 110ae4: 75 05 jne 110aeb <_Thread_Handler+0x73> INIT_NAME (); 110ae6: e8 55 c4 00 00 call 11cf40 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 110aeb: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 110af1: 85 c0 test %eax,%eax 110af3: 75 0b jne 110b00 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 110af5: 83 ec 0c sub $0xc,%esp 110af8: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 110afe: eb 0c jmp 110b0c <_Thread_Handler+0x94> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 110b00: 48 dec %eax 110b01: 75 15 jne 110b18 <_Thread_Handler+0xa0> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 110b03: 83 ec 0c sub $0xc,%esp 110b06: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 110b0c: 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 = 110b12: 89 43 28 mov %eax,0x28(%ebx) 110b15: 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 ); 110b18: 83 ec 0c sub $0xc,%esp 110b1b: 53 push %ebx 110b1c: e8 24 be ff ff call 10c945 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 110b21: 83 c4 0c add $0xc,%esp 110b24: 6a 06 push $0x6 110b26: 6a 01 push $0x1 110b28: 6a 00 push $0x0 110b2a: e8 e5 a4 ff ff call 10b014 <_Internal_error_Occurred> 0010bd48 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10bd48: 55 push %ebp 10bd49: 89 e5 mov %esp,%ebp 10bd4b: 57 push %edi 10bd4c: 56 push %esi 10bd4d: 53 push %ebx 10bd4e: 83 ec 1c sub $0x1c,%esp 10bd51: 8b 5d 0c mov 0xc(%ebp),%ebx 10bd54: 8b 4d 10 mov 0x10(%ebp),%ecx 10bd57: 8b 75 14 mov 0x14(%ebp),%esi 10bd5a: 8a 55 18 mov 0x18(%ebp),%dl 10bd5d: 8a 45 20 mov 0x20(%ebp),%al 10bd60: 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; 10bd63: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10bd6a: 00 00 00 10bd6d: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10bd74: 00 00 00 10bd77: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10bd7e: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bd81: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10bd88: 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 ) { 10bd8b: 85 c9 test %ecx,%ecx 10bd8d: 75 30 jne 10bdbf <_Thread_Initialize+0x77> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10bd8f: 51 push %ecx 10bd90: 51 push %ecx 10bd91: 56 push %esi 10bd92: 53 push %ebx 10bd93: 88 55 e0 mov %dl,-0x20(%ebp) 10bd96: e8 69 08 00 00 call 10c604 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10bd9b: 83 c4 10 add $0x10,%esp 10bd9e: 39 f0 cmp %esi,%eax 10bda0: 8a 55 e0 mov -0x20(%ebp),%dl 10bda3: 72 04 jb 10bda9 <_Thread_Initialize+0x61> 10bda5: 85 c0 test %eax,%eax 10bda7: 75 07 jne 10bdb0 <_Thread_Initialize+0x68><== ALWAYS TAKEN 10bda9: 31 c0 xor %eax,%eax 10bdab: e9 d9 01 00 00 jmp 10bf89 <_Thread_Initialize+0x241> return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10bdb0: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10bdb6: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10bdbd: eb 09 jmp 10bdc8 <_Thread_Initialize+0x80> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10bdbf: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10bdc6: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bdc8: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10bdce: 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 ) { 10bdd4: 31 ff xor %edi,%edi 10bdd6: 84 d2 test %dl,%dl 10bdd8: 74 19 je 10bdf3 <_Thread_Initialize+0xab> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bdda: 83 ec 0c sub $0xc,%esp 10bddd: 6a 6c push $0x6c 10bddf: e8 c4 0e 00 00 call 10cca8 <_Workspace_Allocate> 10bde4: 89 c7 mov %eax,%edi if ( !fp_area ) 10bde6: 83 c4 10 add $0x10,%esp 10bde9: 31 f6 xor %esi,%esi 10bdeb: 85 c0 test %eax,%eax 10bded: 0f 84 10 01 00 00 je 10bf03 <_Thread_Initialize+0x1bb> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bdf3: 89 bb ec 00 00 00 mov %edi,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10bdf9: 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; 10bdff: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10be06: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10be0d: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10be14: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10be1b: a1 90 42 12 00 mov 0x124290,%eax 10be20: 31 f6 xor %esi,%esi 10be22: 85 c0 test %eax,%eax 10be24: 74 1d je 10be43 <_Thread_Initialize+0xfb> extensions_area = _Workspace_Allocate( 10be26: 83 ec 0c sub $0xc,%esp 10be29: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10be30: 50 push %eax 10be31: e8 72 0e 00 00 call 10cca8 <_Workspace_Allocate> 10be36: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10be38: 83 c4 10 add $0x10,%esp 10be3b: 85 c0 test %eax,%eax 10be3d: 0f 84 c0 00 00 00 je 10bf03 <_Thread_Initialize+0x1bb> goto failed; } the_thread->extensions = (void **) extensions_area; 10be43: 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 ) { 10be49: 85 f6 test %esi,%esi 10be4b: 74 1c je 10be69 <_Thread_Initialize+0x121> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10be4d: 8b 0d 90 42 12 00 mov 0x124290,%ecx 10be53: 31 c0 xor %eax,%eax 10be55: eb 0e jmp 10be65 <_Thread_Initialize+0x11d> the_thread->extensions[i] = NULL; 10be57: 8b 93 00 01 00 00 mov 0x100(%ebx),%edx 10be5d: 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++ ) 10be64: 40 inc %eax 10be65: 39 c8 cmp %ecx,%eax 10be67: 76 ee jbe 10be57 <_Thread_Initialize+0x10f> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10be69: 8a 45 e7 mov -0x19(%ebp),%al 10be6c: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10be72: 8b 45 24 mov 0x24(%ebp),%eax 10be75: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10be7b: 8b 45 28 mov 0x28(%ebp),%eax 10be7e: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10be84: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10be88: 75 08 jne 10be92 <_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; 10be8a: a1 c0 41 12 00 mov 0x1241c0,%eax 10be8f: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10be92: 8b 45 2c mov 0x2c(%ebp),%eax 10be95: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10be9b: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10bea2: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10bea9: 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; 10beb0: 8b 45 1c mov 0x1c(%ebp),%eax 10beb3: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10beb6: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10bebc: 52 push %edx 10bebd: 52 push %edx 10bebe: 50 push %eax 10bebf: 53 push %ebx 10bec0: e8 93 05 00 00 call 10c458 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10bec5: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10becc: 00 00 00 10becf: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10bed6: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bed9: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10bedd: 8b 45 08 mov 0x8(%ebp),%eax 10bee0: 8b 40 1c mov 0x1c(%eax),%eax 10bee3: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bee6: 8b 45 30 mov 0x30(%ebp),%eax 10bee9: 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 ); 10beec: 89 1c 24 mov %ebx,(%esp) 10beef: e8 c0 0a 00 00 call 10c9b4 <_User_extensions_Thread_create> 10bef4: 88 c2 mov %al,%dl if ( extension_status ) 10bef6: 83 c4 10 add $0x10,%esp 10bef9: b0 01 mov $0x1,%al 10befb: 84 d2 test %dl,%dl 10befd: 0f 85 86 00 00 00 jne 10bf89 <_Thread_Initialize+0x241> return true; failed: if ( the_thread->libc_reent ) 10bf03: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10bf09: 85 c0 test %eax,%eax 10bf0b: 74 0c je 10bf19 <_Thread_Initialize+0x1d1> _Workspace_Free( the_thread->libc_reent ); 10bf0d: 83 ec 0c sub $0xc,%esp 10bf10: 50 push %eax 10bf11: e8 ab 0d 00 00 call 10ccc1 <_Workspace_Free> 10bf16: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10bf19: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10bf1f: 85 c0 test %eax,%eax 10bf21: 74 0c je 10bf2f <_Thread_Initialize+0x1e7> _Workspace_Free( the_thread->API_Extensions[i] ); 10bf23: 83 ec 0c sub $0xc,%esp 10bf26: 50 push %eax 10bf27: e8 95 0d 00 00 call 10ccc1 <_Workspace_Free> 10bf2c: 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] ) 10bf2f: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10bf35: 85 c0 test %eax,%eax 10bf37: 74 0c je 10bf45 <_Thread_Initialize+0x1fd> _Workspace_Free( the_thread->API_Extensions[i] ); 10bf39: 83 ec 0c sub $0xc,%esp 10bf3c: 50 push %eax 10bf3d: e8 7f 0d 00 00 call 10ccc1 <_Workspace_Free> 10bf42: 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] ) 10bf45: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10bf4b: 85 c0 test %eax,%eax 10bf4d: 74 0c je 10bf5b <_Thread_Initialize+0x213><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10bf4f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bf52: 50 push %eax <== NOT EXECUTED 10bf53: e8 69 0d 00 00 call 10ccc1 <_Workspace_Free> <== NOT EXECUTED 10bf58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10bf5b: 85 f6 test %esi,%esi 10bf5d: 74 0c je 10bf6b <_Thread_Initialize+0x223> (void) _Workspace_Free( extensions_area ); 10bf5f: 83 ec 0c sub $0xc,%esp 10bf62: 56 push %esi 10bf63: e8 59 0d 00 00 call 10ccc1 <_Workspace_Free> 10bf68: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10bf6b: 85 ff test %edi,%edi 10bf6d: 74 0c je 10bf7b <_Thread_Initialize+0x233> (void) _Workspace_Free( fp_area ); 10bf6f: 83 ec 0c sub $0xc,%esp 10bf72: 57 push %edi 10bf73: e8 49 0d 00 00 call 10ccc1 <_Workspace_Free> 10bf78: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10bf7b: 83 ec 0c sub $0xc,%esp 10bf7e: 53 push %ebx 10bf7f: e8 d0 06 00 00 call 10c654 <_Thread_Stack_Free> 10bf84: 31 c0 xor %eax,%eax return false; 10bf86: 83 c4 10 add $0x10,%esp } 10bf89: 8d 65 f4 lea -0xc(%ebp),%esp 10bf8c: 5b pop %ebx 10bf8d: 5e pop %esi 10bf8e: 5f pop %edi 10bf8f: c9 leave 10bf90: c3 ret 0010f84c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f84c: 55 push %ebp 10f84d: 89 e5 mov %esp,%ebp 10f84f: 53 push %ebx 10f850: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f853: 9c pushf 10f854: fa cli 10f855: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f856: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f859: f6 c2 02 test $0x2,%dl 10f85c: 74 70 je 10f8ce <_Thread_Resume+0x82> <== NEVER TAKEN 10f85e: 83 e2 fd and $0xfffffffd,%edx current_state = 10f861: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f864: 85 d2 test %edx,%edx 10f866: 75 66 jne 10f8ce <_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; 10f868: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f86e: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f875: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f878: 66 8b 15 74 93 12 00 mov 0x129374,%dx 10f87f: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f885: 66 89 15 74 93 12 00 mov %dx,0x129374 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f88c: 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); 10f892: 8d 5a 04 lea 0x4(%edx),%ebx 10f895: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f897: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f89a: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f89d: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f89f: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f8a2: 51 push %ecx 10f8a3: 9d popf 10f8a4: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f8a5: 8b 50 14 mov 0x14(%eax),%edx 10f8a8: 8b 1d 50 93 12 00 mov 0x129350,%ebx 10f8ae: 3b 53 14 cmp 0x14(%ebx),%edx 10f8b1: 73 1b jae 10f8ce <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f8b3: a3 50 93 12 00 mov %eax,0x129350 if ( _Thread_Executing->is_preemptible || 10f8b8: a1 80 93 12 00 mov 0x129380,%eax 10f8bd: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f8c1: 75 04 jne 10f8c7 <_Thread_Resume+0x7b> 10f8c3: 85 d2 test %edx,%edx 10f8c5: 75 07 jne 10f8ce <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f8c7: c6 05 90 93 12 00 01 movb $0x1,0x129390 } } } _ISR_Enable( level ); 10f8ce: 51 push %ecx 10f8cf: 9d popf } 10f8d0: 5b pop %ebx 10f8d1: c9 leave 10f8d2: c3 ret 0010c73c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10c73c: 55 push %ebp 10c73d: 89 e5 mov %esp,%ebp 10c73f: 53 push %ebx 10c740: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10c743: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10c749: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10c74d: 74 4c je 10c79b <_Thread_Tickle_timeslice+0x5f> return; if ( !_States_Is_ready( executing->current_state ) ) 10c74f: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10c753: 75 46 jne 10c79b <_Thread_Tickle_timeslice+0x5f> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10c755: 8b 43 7c mov 0x7c(%ebx),%eax 10c758: 83 f8 01 cmp $0x1,%eax 10c75b: 72 3e jb 10c79b <_Thread_Tickle_timeslice+0x5f> 10c75d: 83 f8 02 cmp $0x2,%eax 10c760: 76 07 jbe 10c769 <_Thread_Tickle_timeslice+0x2d> 10c762: 83 f8 03 cmp $0x3,%eax 10c765: 75 34 jne 10c79b <_Thread_Tickle_timeslice+0x5f><== NEVER TAKEN 10c767: eb 1a jmp 10c783 <_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 ) { 10c769: 8b 43 78 mov 0x78(%ebx),%eax 10c76c: 48 dec %eax 10c76d: 89 43 78 mov %eax,0x78(%ebx) 10c770: 85 c0 test %eax,%eax 10c772: 7f 27 jg 10c79b <_Thread_Tickle_timeslice+0x5f> _Thread_Reset_timeslice(); 10c774: e8 c3 2c 00 00 call 10f43c <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c779: a1 c0 41 12 00 mov 0x1241c0,%eax 10c77e: 89 43 78 mov %eax,0x78(%ebx) 10c781: eb 18 jmp 10c79b <_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 ) 10c783: 8b 43 78 mov 0x78(%ebx),%eax 10c786: 48 dec %eax 10c787: 89 43 78 mov %eax,0x78(%ebx) 10c78a: 85 c0 test %eax,%eax 10c78c: 75 0d jne 10c79b <_Thread_Tickle_timeslice+0x5f> (*executing->budget_callout)( executing ); 10c78e: 83 ec 0c sub $0xc,%esp 10c791: 53 push %ebx 10c792: ff 93 80 00 00 00 call *0x80(%ebx) 10c798: 83 c4 10 add $0x10,%esp break; #endif } } 10c79b: 8b 5d fc mov -0x4(%ebp),%ebx 10c79e: c9 leave 10c79f: c3 ret 0010c7a0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10c7a0: 55 push %ebp 10c7a1: 89 e5 mov %esp,%ebp 10c7a3: 56 push %esi 10c7a4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c7a5: a1 b0 42 12 00 mov 0x1242b0,%eax ready = executing->ready; 10c7aa: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c7b0: 9c pushf 10c7b1: fa cli 10c7b2: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c7b3: 8b 1a mov (%edx),%ebx 10c7b5: 3b 5a 08 cmp 0x8(%edx),%ebx 10c7b8: 74 2e je 10c7e8 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c7ba: 8b 30 mov (%eax),%esi previous = the_node->previous; 10c7bc: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10c7bf: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10c7c2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10c7c4: 8d 5a 04 lea 0x4(%edx),%ebx 10c7c7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10c7c9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10c7cc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10c7cf: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10c7d1: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c7d4: 51 push %ecx 10c7d5: 9d popf 10c7d6: fa cli if ( _Thread_Is_heir( executing ) ) 10c7d7: 3b 05 80 42 12 00 cmp 0x124280,%eax 10c7dd: 75 11 jne 10c7f0 <_Thread_Yield_processor+0x50><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10c7df: 8b 02 mov (%edx),%eax 10c7e1: a3 80 42 12 00 mov %eax,0x124280 10c7e6: eb 08 jmp 10c7f0 <_Thread_Yield_processor+0x50> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c7e8: 3b 05 80 42 12 00 cmp 0x124280,%eax 10c7ee: 74 07 je 10c7f7 <_Thread_Yield_processor+0x57><== ALWAYS TAKEN _Context_Switch_necessary = true; 10c7f0: c6 05 c0 42 12 00 01 movb $0x1,0x1242c0 _ISR_Enable( level ); 10c7f7: 51 push %ecx 10c7f8: 9d popf } 10c7f9: 5b pop %ebx 10c7fa: 5e pop %esi 10c7fb: c9 leave 10c7fc: c3 ret 0010c1f4 <_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 ) { 10c1f4: 55 push %ebp 10c1f5: 89 e5 mov %esp,%ebp 10c1f7: 57 push %edi 10c1f8: 56 push %esi 10c1f9: 53 push %ebx 10c1fa: 83 ec 10 sub $0x10,%esp 10c1fd: 8b 4d 08 mov 0x8(%ebp),%ecx 10c200: 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); 10c203: 8d 50 3c lea 0x3c(%eax),%edx 10c206: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c209: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c210: 8d 50 38 lea 0x38(%eax),%edx 10c213: 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; 10c216: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c219: 89 de mov %ebx,%esi 10c21b: c1 ee 06 shr $0x6,%esi 10c21e: 6b f6 0c imul $0xc,%esi,%esi 10c221: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c224: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c227: f6 c3 20 test $0x20,%bl 10c22a: 75 70 jne 10c29c <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c22c: 8d 56 04 lea 0x4(%esi),%edx 10c22f: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c232: 9c pushf 10c233: fa cli 10c234: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c237: 8b 16 mov (%esi),%edx 10c239: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c240: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c243: eb 1f jmp 10c264 <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c245: 8b 72 14 mov 0x14(%edx),%esi 10c248: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c24b: 39 f3 cmp %esi,%ebx 10c24d: 76 1a jbe 10c269 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c24f: ff 75 f0 pushl -0x10(%ebp) 10c252: 9d popf 10c253: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c254: 85 7a 10 test %edi,0x10(%edx) 10c257: 75 09 jne 10c262 <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN 10c259: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c25c: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c25f: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c260: eb d0 jmp 10c232 <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c262: 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 ) ) { 10c264: 3b 55 e8 cmp -0x18(%ebp),%edx 10c267: 75 dc jne 10c245 <_Thread_queue_Enqueue_priority+0x51> 10c269: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c26c: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c270: 0f 85 a9 00 00 00 jne 10c31f <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c276: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c27d: 3b 5d ec cmp -0x14(%ebp),%ebx 10c280: 0f 84 82 00 00 00 je 10c308 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c286: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c289: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c28b: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c28e: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c290: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c293: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c296: ff 75 f0 pushl -0x10(%ebp) 10c299: 9d popf 10c29a: eb 65 jmp 10c301 <_Thread_queue_Enqueue_priority+0x10d> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c29c: 0f b6 15 f4 01 12 00 movzbl 0x1201f4,%edx 10c2a3: 42 inc %edx 10c2a4: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c2a7: 9c pushf 10c2a8: fa cli 10c2a9: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c2ac: 8b 56 08 mov 0x8(%esi),%edx 10c2af: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c2b2: eb 20 jmp 10c2d4 <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 10c2b4: 8b 72 14 mov 0x14(%edx),%esi 10c2b7: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c2ba: 39 f3 cmp %esi,%ebx 10c2bc: 73 1b jae 10c2d9 <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c2be: ff 75 f0 pushl -0x10(%ebp) 10c2c1: 9d popf 10c2c2: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c2c3: 85 7a 10 test %edi,0x10(%edx) 10c2c6: 75 09 jne 10c2d1 <_Thread_queue_Enqueue_priority+0xdd> 10c2c8: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c2cb: ff 75 f0 pushl -0x10(%ebp) 10c2ce: 9d popf goto restart_reverse_search; 10c2cf: eb cb jmp 10c29c <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 10c2d1: 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 ) ) { 10c2d4: 3b 55 e8 cmp -0x18(%ebp),%edx 10c2d7: 75 db jne 10c2b4 <_Thread_queue_Enqueue_priority+0xc0> 10c2d9: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c2dc: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c2e0: 75 3d jne 10c31f <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c2e2: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c2e9: 3b 5d ec cmp -0x14(%ebp),%ebx 10c2ec: 74 1a je 10c308 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c2ee: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c2f0: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c2f2: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c2f5: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c2f7: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c2fa: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c2fd: ff 75 f0 pushl -0x10(%ebp) 10c300: 9d popf 10c301: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c306: eb 1f jmp 10c327 <_Thread_queue_Enqueue_priority+0x133> 10c308: 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; 10c30b: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c30e: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c310: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c313: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c315: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c318: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c31b: 56 push %esi 10c31c: 9d popf 10c31d: eb e2 jmp 10c301 <_Thread_queue_Enqueue_priority+0x10d> * 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; 10c31f: 8b 45 10 mov 0x10(%ebp),%eax 10c322: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c324: 8b 41 30 mov 0x30(%ecx),%eax } 10c327: 83 c4 10 add $0x10,%esp 10c32a: 5b pop %ebx 10c32b: 5e pop %esi 10c32c: 5f pop %edi 10c32d: c9 leave 10c32e: c3 ret 0010c3d0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c3d0: 55 push %ebp 10c3d1: 89 e5 mov %esp,%ebp 10c3d3: 57 push %edi 10c3d4: 56 push %esi 10c3d5: 53 push %ebx 10c3d6: 83 ec 1c sub $0x1c,%esp 10c3d9: 8b 75 08 mov 0x8(%ebp),%esi 10c3dc: 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 ) 10c3df: 85 f6 test %esi,%esi 10c3e1: 74 36 je 10c419 <_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 ) { 10c3e3: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c3e7: 75 30 jne 10c419 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c3e9: 9c pushf 10c3ea: fa cli 10c3eb: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c3ec: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c3f3: 74 22 je 10c417 <_Thread_queue_Requeue+0x47><== NEVER TAKEN 10c3f5: 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 ); 10c3fc: 50 push %eax 10c3fd: 6a 01 push $0x1 10c3ff: 57 push %edi 10c400: 56 push %esi 10c401: e8 92 2e 00 00 call 10f298 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c406: 83 c4 0c add $0xc,%esp 10c409: 8d 45 e4 lea -0x1c(%ebp),%eax 10c40c: 50 push %eax 10c40d: 57 push %edi 10c40e: 56 push %esi 10c40f: e8 e0 fd ff ff call 10c1f4 <_Thread_queue_Enqueue_priority> 10c414: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c417: 53 push %ebx 10c418: 9d popf } } 10c419: 8d 65 f4 lea -0xc(%ebp),%esp 10c41c: 5b pop %ebx 10c41d: 5e pop %esi 10c41e: 5f pop %edi 10c41f: c9 leave 10c420: c3 ret 0010c424 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c424: 55 push %ebp 10c425: 89 e5 mov %esp,%ebp 10c427: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c42a: 8d 45 f4 lea -0xc(%ebp),%eax 10c42d: 50 push %eax 10c42e: ff 75 08 pushl 0x8(%ebp) 10c431: e8 9e f8 ff ff call 10bcd4 <_Thread_Get> switch ( location ) { 10c436: 83 c4 10 add $0x10,%esp 10c439: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c43d: 75 17 jne 10c456 <_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 ); 10c43f: 83 ec 0c sub $0xc,%esp 10c442: 50 push %eax 10c443: e8 08 2f 00 00 call 10f350 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c448: a1 f4 41 12 00 mov 0x1241f4,%eax 10c44d: 48 dec %eax 10c44e: a3 f4 41 12 00 mov %eax,0x1241f4 10c453: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c456: c9 leave 10c457: c3 ret 00116c50 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116c50: 55 push %ebp 116c51: 89 e5 mov %esp,%ebp 116c53: 57 push %edi 116c54: 56 push %esi 116c55: 53 push %ebx 116c56: 83 ec 4c sub $0x4c,%esp 116c59: 8b 5d 08 mov 0x8(%ebp),%ebx 116c5c: 8d 45 dc lea -0x24(%ebp),%eax 116c5f: 8d 55 e0 lea -0x20(%ebp),%edx 116c62: 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); 116c65: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 116c68: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 116c6f: 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; 116c72: 8d 75 d0 lea -0x30(%ebp),%esi 116c75: 8d 55 d4 lea -0x2c(%ebp),%edx 116c78: 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); 116c7b: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 116c7e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 116c85: 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 ); 116c88: 8d 53 30 lea 0x30(%ebx),%edx 116c8b: 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 ); 116c8e: 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 ); 116c91: 8d 4b 08 lea 0x8(%ebx),%ecx 116c94: 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 ); 116c97: 8d 53 40 lea 0x40(%ebx),%edx 116c9a: 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; 116c9d: 8d 4d dc lea -0x24(%ebp),%ecx 116ca0: 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; 116ca3: a1 34 e7 13 00 mov 0x13e734,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 116ca8: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 116cab: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116cae: 51 push %ecx 116caf: 8d 4d d0 lea -0x30(%ebp),%ecx 116cb2: 51 push %ecx 116cb3: 29 d0 sub %edx,%eax 116cb5: 50 push %eax 116cb6: ff 75 c0 pushl -0x40(%ebp) 116cb9: e8 ee 36 00 00 call 11a3ac <_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(); 116cbe: a1 78 e6 13 00 mov 0x13e678,%eax 116cc3: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 116cc6: 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 ) { 116cc9: 83 c4 10 add $0x10,%esp 116ccc: 39 45 c4 cmp %eax,-0x3c(%ebp) 116ccf: 76 13 jbe 116ce4 <_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 ); 116cd1: 52 push %edx 116cd2: 8d 55 d0 lea -0x30(%ebp),%edx 116cd5: 52 push %edx 116cd6: 8b 4d c4 mov -0x3c(%ebp),%ecx 116cd9: 29 c1 sub %eax,%ecx 116cdb: 51 push %ecx 116cdc: 57 push %edi 116cdd: e8 ca 36 00 00 call 11a3ac <_Watchdog_Adjust_to_chain> 116ce2: eb 0f jmp 116cf3 <_Timer_server_Body+0xa3> } else if ( snapshot < last_snapshot ) { 116ce4: 73 10 jae 116cf6 <_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 ); 116ce6: 51 push %ecx 116ce7: 2b 45 c4 sub -0x3c(%ebp),%eax 116cea: 50 push %eax 116ceb: 6a 01 push $0x1 116ced: 57 push %edi 116cee: e8 4d 36 00 00 call 11a340 <_Watchdog_Adjust> 116cf3: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 116cf6: 8b 45 c4 mov -0x3c(%ebp),%eax 116cf9: 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 ); 116cfc: 8b 43 78 mov 0x78(%ebx),%eax 116cff: 83 ec 0c sub $0xc,%esp 116d02: 50 push %eax 116d03: e8 3c 07 00 00 call 117444 <_Chain_Get> if ( timer == NULL ) { 116d08: 83 c4 10 add $0x10,%esp 116d0b: 85 c0 test %eax,%eax 116d0d: 74 29 je 116d38 <_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 ) { 116d0f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 116d12: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 116d15: 75 0b jne 116d22 <_Timer_server_Body+0xd2><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116d17: 52 push %edx <== NOT EXECUTED 116d18: 52 push %edx <== NOT EXECUTED 116d19: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116d1c: 50 push %eax <== NOT EXECUTED 116d1d: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 116d20: eb 0c jmp 116d2e <_Timer_server_Body+0xde><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116d22: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 116d25: 75 d5 jne 116cfc <_Timer_server_Body+0xac><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116d27: 51 push %ecx <== NOT EXECUTED 116d28: 51 push %ecx <== NOT EXECUTED 116d29: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116d2c: 50 push %eax <== NOT EXECUTED 116d2d: 57 push %edi <== NOT EXECUTED 116d2e: e8 01 37 00 00 call 11a434 <_Watchdog_Insert> <== NOT EXECUTED 116d33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116d36: eb c4 jmp 116cfc <_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 ); 116d38: 9c pushf 116d39: fa cli 116d3a: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 116d3b: 8b 55 b4 mov -0x4c(%ebp),%edx 116d3e: 39 55 dc cmp %edx,-0x24(%ebp) 116d41: 75 13 jne 116d56 <_Timer_server_Body+0x106><== NEVER TAKEN ts->insert_chain = NULL; 116d43: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 116d4a: 50 push %eax 116d4b: 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 ) ) { 116d4c: 8b 4d b0 mov -0x50(%ebp),%ecx 116d4f: 39 4d d0 cmp %ecx,-0x30(%ebp) 116d52: 75 09 jne 116d5d <_Timer_server_Body+0x10d> 116d54: eb 3e jmp 116d94 <_Timer_server_Body+0x144> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 116d56: 50 push %eax <== NOT EXECUTED 116d57: 9d popf <== NOT EXECUTED 116d58: e9 46 ff ff ff jmp 116ca3 <_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 ); 116d5d: 9c pushf 116d5e: fa cli 116d5f: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116d60: 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)) 116d63: 3b 45 b0 cmp -0x50(%ebp),%eax 116d66: 74 25 je 116d8d <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 116d68: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 116d6a: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 116d6d: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 116d70: 85 c0 test %eax,%eax 116d72: 74 19 je 116d8d <_Timer_server_Body+0x13d><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 116d74: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 116d7b: 52 push %edx 116d7c: 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 ); 116d7d: 52 push %edx 116d7e: 52 push %edx 116d7f: ff 70 24 pushl 0x24(%eax) 116d82: ff 70 20 pushl 0x20(%eax) 116d85: ff 50 1c call *0x1c(%eax) } 116d88: 83 c4 10 add $0x10,%esp 116d8b: eb d0 jmp 116d5d <_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 ); 116d8d: 52 push %edx 116d8e: 9d popf 116d8f: e9 09 ff ff ff jmp 116c9d <_Timer_server_Body+0x4d> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 116d94: c6 43 7c 00 movb $0x0,0x7c(%ebx) 116d98: a1 e8 e5 13 00 mov 0x13e5e8,%eax 116d9d: 40 inc %eax 116d9e: a3 e8 e5 13 00 mov %eax,0x13e5e8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 116da3: 50 push %eax 116da4: 50 push %eax 116da5: 6a 08 push $0x8 116da7: ff 33 pushl (%ebx) 116da9: e8 6e 2e 00 00 call 119c1c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 116dae: 89 d8 mov %ebx,%eax 116db0: e8 0f fe ff ff call 116bc4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 116db5: 89 d8 mov %ebx,%eax 116db7: e8 4e fe ff ff call 116c0a <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 116dbc: e8 14 25 00 00 call 1192d5 <_Thread_Enable_dispatch> ts->active = true; 116dc1: 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 ); 116dc5: 59 pop %ecx 116dc6: ff 75 b8 pushl -0x48(%ebp) 116dc9: e8 7e 37 00 00 call 11a54c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116dce: 5a pop %edx 116dcf: ff 75 bc pushl -0x44(%ebp) 116dd2: e8 75 37 00 00 call 11a54c <_Watchdog_Remove> 116dd7: 83 c4 10 add $0x10,%esp 116dda: e9 be fe ff ff jmp 116c9d <_Timer_server_Body+0x4d> 00116ddf <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 116ddf: 55 push %ebp 116de0: 89 e5 mov %esp,%ebp 116de2: 57 push %edi 116de3: 56 push %esi 116de4: 53 push %ebx 116de5: 83 ec 2c sub $0x2c,%esp 116de8: 8b 5d 08 mov 0x8(%ebp),%ebx 116deb: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 116dee: 8b 53 78 mov 0x78(%ebx),%edx 116df1: 85 d2 test %edx,%edx 116df3: 0f 85 e6 00 00 00 jne 116edf <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN 116df9: 8b 15 e8 e5 13 00 mov 0x13e5e8,%edx 116dff: 42 inc %edx 116e00: 89 15 e8 e5 13 00 mov %edx,0x13e5e8 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116e06: 8b 50 38 mov 0x38(%eax),%edx 116e09: 83 fa 01 cmp $0x1,%edx 116e0c: 75 5a jne 116e68 <_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 ); 116e0e: 9c pushf 116e0f: fa cli 116e10: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116e13: 8b 0d 34 e7 13 00 mov 0x13e734,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 116e19: 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)); 116e1c: 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; 116e1f: 8d 7b 34 lea 0x34(%ebx),%edi 116e22: 39 fa cmp %edi,%edx 116e24: 74 19 je 116e3f <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116e26: 89 cf mov %ecx,%edi 116e28: 29 f7 sub %esi,%edi 116e2a: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 116e2d: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 116e30: 31 f6 xor %esi,%esi 116e32: 3b 7d e4 cmp -0x1c(%ebp),%edi 116e35: 76 05 jbe 116e3c <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 116e37: 89 fe mov %edi,%esi 116e39: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 116e3c: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 116e3f: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 116e42: ff 75 e0 pushl -0x20(%ebp) 116e45: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116e46: 57 push %edi 116e47: 57 push %edi 116e48: 83 c0 10 add $0x10,%eax 116e4b: 50 push %eax 116e4c: 8d 43 30 lea 0x30(%ebx),%eax 116e4f: 50 push %eax 116e50: e8 df 35 00 00 call 11a434 <_Watchdog_Insert> if ( !ts->active ) { 116e55: 8a 43 7c mov 0x7c(%ebx),%al 116e58: 83 c4 10 add $0x10,%esp 116e5b: 84 c0 test %al,%al 116e5d: 75 74 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 116e5f: 89 d8 mov %ebx,%eax 116e61: e8 5e fd ff ff call 116bc4 <_Timer_server_Reset_interval_system_watchdog> 116e66: eb 6b jmp 116ed3 <_Timer_server_Schedule_operation_method+0xf4> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116e68: 83 fa 03 cmp $0x3,%edx 116e6b: 75 66 jne 116ed3 <_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 ); 116e6d: 9c pushf 116e6e: fa cli 116e6f: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116e72: 8b 0d 78 e6 13 00 mov 0x13e678,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 116e78: 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)); 116e7b: 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; 116e7e: 8d 7b 6c lea 0x6c(%ebx),%edi 116e81: 39 fe cmp %edi,%esi 116e83: 74 27 je 116eac <_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; 116e85: 8b 7e 10 mov 0x10(%esi),%edi 116e88: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 116e8b: 39 d1 cmp %edx,%ecx 116e8d: 76 15 jbe 116ea4 <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 116e8f: 89 cf mov %ecx,%edi 116e91: 29 d7 sub %edx,%edi 116e93: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 116e96: 31 d2 xor %edx,%edx 116e98: 39 7d d4 cmp %edi,-0x2c(%ebp) 116e9b: 76 0c jbe 116ea9 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN delta_interval -= delta; 116e9d: 8b 55 d4 mov -0x2c(%ebp),%edx 116ea0: 29 fa sub %edi,%edx 116ea2: eb 05 jmp 116ea9 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 116ea4: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 116ea7: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 116ea9: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 116eac: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 116eaf: ff 75 e0 pushl -0x20(%ebp) 116eb2: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116eb3: 56 push %esi 116eb4: 56 push %esi 116eb5: 83 c0 10 add $0x10,%eax 116eb8: 50 push %eax 116eb9: 8d 43 68 lea 0x68(%ebx),%eax 116ebc: 50 push %eax 116ebd: e8 72 35 00 00 call 11a434 <_Watchdog_Insert> if ( !ts->active ) { 116ec2: 8a 43 7c mov 0x7c(%ebx),%al 116ec5: 83 c4 10 add $0x10,%esp 116ec8: 84 c0 test %al,%al 116eca: 75 07 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 116ecc: 89 d8 mov %ebx,%eax 116ece: e8 37 fd ff ff call 116c0a <_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 ); } } 116ed3: 8d 65 f4 lea -0xc(%ebp),%esp 116ed6: 5b pop %ebx 116ed7: 5e pop %esi 116ed8: 5f pop %edi 116ed9: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 116eda: e9 f6 23 00 00 jmp 1192d5 <_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 ); 116edf: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 116ee2: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 116ee5: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 116ee8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116eeb: 5b pop %ebx <== NOT EXECUTED 116eec: 5e pop %esi <== NOT EXECUTED 116eed: 5f pop %edi <== NOT EXECUTED 116eee: 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 ); 116eef: e9 2c 05 00 00 jmp 117420 <_Chain_Append> <== NOT EXECUTED 0010e2fc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e2fc: 55 push %ebp 10e2fd: 89 e5 mov %esp,%ebp 10e2ff: 57 push %edi 10e300: 56 push %esi 10e301: 53 push %ebx 10e302: 83 ec 1c sub $0x1c,%esp 10e305: 8b 75 08 mov 0x8(%ebp),%esi 10e308: 8b 7d 0c mov 0xc(%ebp),%edi 10e30b: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e30e: 9c pushf 10e30f: fa cli 10e310: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e311: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e313: 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 ) ) { 10e316: 39 ca cmp %ecx,%edx 10e318: 74 44 je 10e35e <_Watchdog_Adjust+0x62> switch ( direction ) { 10e31a: 85 ff test %edi,%edi 10e31c: 74 3c je 10e35a <_Watchdog_Adjust+0x5e> 10e31e: 4f dec %edi 10e31f: 75 3d jne 10e35e <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e321: 01 5a 10 add %ebx,0x10(%edx) break; 10e324: eb 38 jmp 10e35e <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e326: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e328: 8b 7a 10 mov 0x10(%edx),%edi 10e32b: 39 fb cmp %edi,%ebx 10e32d: 73 07 jae 10e336 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e32f: 29 df sub %ebx,%edi 10e331: 89 7a 10 mov %edi,0x10(%edx) break; 10e334: eb 28 jmp 10e35e <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e336: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e33d: 50 push %eax 10e33e: 9d popf _Watchdog_Tickle( header ); 10e33f: 83 ec 0c sub $0xc,%esp 10e342: 56 push %esi 10e343: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e346: e8 9d 01 00 00 call 10e4e8 <_Watchdog_Tickle> _ISR_Disable( level ); 10e34b: 9c pushf 10e34c: fa cli 10e34d: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e34e: 83 c4 10 add $0x10,%esp 10e351: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e354: 39 0e cmp %ecx,(%esi) 10e356: 74 06 je 10e35e <_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; 10e358: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e35a: 85 db test %ebx,%ebx 10e35c: 75 c8 jne 10e326 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e35e: 50 push %eax 10e35f: 9d popf } 10e360: 8d 65 f4 lea -0xc(%ebp),%esp 10e363: 5b pop %ebx 10e364: 5e pop %esi 10e365: 5f pop %edi 10e366: c9 leave 10e367: c3 ret 0010cbac <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10cbac: 55 push %ebp 10cbad: 89 e5 mov %esp,%ebp 10cbaf: 56 push %esi 10cbb0: 53 push %ebx 10cbb1: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10cbb4: 9c pushf 10cbb5: fa cli 10cbb6: 5e pop %esi previous_state = the_watchdog->state; 10cbb7: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10cbba: 83 f8 01 cmp $0x1,%eax 10cbbd: 74 09 je 10cbc8 <_Watchdog_Remove+0x1c> 10cbbf: 72 44 jb 10cc05 <_Watchdog_Remove+0x59> 10cbc1: 83 f8 03 cmp $0x3,%eax 10cbc4: 77 3f ja 10cc05 <_Watchdog_Remove+0x59> <== NEVER TAKEN 10cbc6: eb 09 jmp 10cbd1 <_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; 10cbc8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10cbcf: eb 34 jmp 10cc05 <_Watchdog_Remove+0x59> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10cbd1: 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 ); 10cbd8: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10cbda: 83 39 00 cmpl $0x0,(%ecx) 10cbdd: 74 06 je 10cbe5 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10cbdf: 8b 5a 10 mov 0x10(%edx),%ebx 10cbe2: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10cbe5: 8b 0d 3c 43 12 00 mov 0x12433c,%ecx 10cbeb: 85 c9 test %ecx,%ecx 10cbed: 74 0c je 10cbfb <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10cbef: 8b 0d 8c 42 12 00 mov 0x12428c,%ecx 10cbf5: 89 0d ac 42 12 00 mov %ecx,0x1242ac ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10cbfb: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10cbfd: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10cc00: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10cc03: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10cc05: 8b 0d 40 43 12 00 mov 0x124340,%ecx 10cc0b: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10cc0e: 56 push %esi 10cc0f: 9d popf return( previous_state ); } 10cc10: 5b pop %ebx 10cc11: 5e pop %esi 10cc12: c9 leave 10cc13: c3 ret 0010de50 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10de50: 55 push %ebp 10de51: 89 e5 mov %esp,%ebp 10de53: 57 push %edi 10de54: 56 push %esi 10de55: 53 push %ebx 10de56: 83 ec 20 sub $0x20,%esp 10de59: 8b 7d 08 mov 0x8(%ebp),%edi 10de5c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10de5f: 9c pushf 10de60: fa cli 10de61: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10de64: 56 push %esi 10de65: 57 push %edi 10de66: 68 84 0b 12 00 push $0x120b84 10de6b: e8 a8 aa ff ff call 108918 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10de70: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10de72: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10de75: 83 c4 10 add $0x10,%esp 10de78: 39 f3 cmp %esi,%ebx 10de7a: 74 1d je 10de99 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10de7c: 52 push %edx 10de7d: 52 push %edx 10de7e: 53 push %ebx 10de7f: 6a 00 push $0x0 10de81: e8 32 00 00 00 call 10deb8 <_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 ) 10de86: 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 ; 10de88: 83 c4 10 add $0x10,%esp 10de8b: 39 f3 cmp %esi,%ebx 10de8d: 75 ed jne 10de7c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10de8f: 50 push %eax 10de90: 50 push %eax 10de91: 57 push %edi 10de92: 68 9b 0b 12 00 push $0x120b9b 10de97: eb 08 jmp 10dea1 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10de99: 83 ec 0c sub $0xc,%esp 10de9c: 68 aa 0b 12 00 push $0x120baa 10dea1: e8 72 aa ff ff call 108918 10dea6: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10dea9: ff 75 e4 pushl -0x1c(%ebp) 10deac: 9d popf } 10dead: 8d 65 f4 lea -0xc(%ebp),%esp 10deb0: 5b pop %ebx 10deb1: 5e pop %esi 10deb2: 5f pop %edi 10deb3: c9 leave 10deb4: c3 ret 0010cc14 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10cc14: 55 push %ebp 10cc15: 89 e5 mov %esp,%ebp 10cc17: 57 push %edi 10cc18: 56 push %esi 10cc19: 53 push %ebx 10cc1a: 83 ec 1c sub $0x1c,%esp 10cc1d: 8b 7d 08 mov 0x8(%ebp),%edi * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 10cc20: 9c pushf 10cc21: fa cli 10cc22: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10cc23: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10cc25: 8d 47 04 lea 0x4(%edi),%eax 10cc28: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10cc2b: 39 c3 cmp %eax,%ebx 10cc2d: 74 40 je 10cc6f <_Watchdog_Tickle+0x5b> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10cc2f: 8b 43 10 mov 0x10(%ebx),%eax 10cc32: 85 c0 test %eax,%eax 10cc34: 74 08 je 10cc3e <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10cc36: 48 dec %eax 10cc37: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10cc3a: 85 c0 test %eax,%eax 10cc3c: 75 31 jne 10cc6f <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10cc3e: 83 ec 0c sub $0xc,%esp 10cc41: 53 push %ebx 10cc42: e8 65 ff ff ff call 10cbac <_Watchdog_Remove> _ISR_Enable( level ); 10cc47: 56 push %esi 10cc48: 9d popf switch( watchdog_state ) { 10cc49: 83 c4 10 add $0x10,%esp 10cc4c: 83 f8 02 cmp $0x2,%eax 10cc4f: 75 0e jne 10cc5f <_Watchdog_Tickle+0x4b> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10cc51: 50 push %eax 10cc52: 50 push %eax 10cc53: ff 73 24 pushl 0x24(%ebx) 10cc56: ff 73 20 pushl 0x20(%ebx) 10cc59: ff 53 1c call *0x1c(%ebx) 10cc5c: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10cc5f: 9c pushf 10cc60: fa cli 10cc61: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10cc62: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10cc64: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10cc67: 74 06 je 10cc6f <_Watchdog_Tickle+0x5b> 10cc69: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cc6d: eb cd jmp 10cc3c <_Watchdog_Tickle+0x28> leave: _ISR_Enable(level); 10cc6f: 56 push %esi 10cc70: 9d popf } 10cc71: 8d 65 f4 lea -0xc(%ebp),%esp 10cc74: 5b pop %ebx 10cc75: 5e pop %esi 10cc76: 5f pop %edi 10cc77: c9 leave 10cc78: c3 ret 00109f0c : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 109f0c: 55 push %ebp 109f0d: 89 e5 mov %esp,%ebp 109f0f: 56 push %esi 109f10: 53 push %ebx 109f11: 83 ec 10 sub $0x10,%esp 109f14: 8b 5d 08 mov 0x8(%ebp),%ebx 109f17: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 109f1a: 85 db test %ebx,%ebx 109f1c: 74 09 je 109f27 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 109f1e: 81 7b 04 3f 42 0f 00 cmpl $0xf423f,0x4(%ebx) 109f25: 76 13 jbe 109f3a rtems_set_errno_and_return_minus_one( EINVAL ); 109f27: e8 8c 7d 00 00 call 111cb8 <__errno> 109f2c: c7 00 16 00 00 00 movl $0x16,(%eax) 109f32: 83 c8 ff or $0xffffffff,%eax 109f35: e9 9a 00 00 00 jmp 109fd4 if ( olddelta ) { 109f3a: 85 f6 test %esi,%esi 109f3c: 74 0d je 109f4b olddelta->tv_sec = 0; 109f3e: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 109f44: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 109f4b: 69 03 40 42 0f 00 imul $0xf4240,(%ebx),%eax adjustment += delta->tv_usec; 109f51: 03 43 04 add 0x4(%ebx),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 109f54: 3b 05 04 12 12 00 cmp 0x121204,%eax 109f5a: 72 76 jb 109fd2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109f5c: a1 1c 53 12 00 mov 0x12531c,%eax 109f61: 40 inc %eax 109f62: a3 1c 53 12 00 mov %eax,0x12531c * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 109f67: 83 ec 0c sub $0xc,%esp 109f6a: 8d 45 f0 lea -0x10(%ebp),%eax 109f6d: 50 push %eax 109f6e: e8 dd 14 00 00 call 10b450 <_TOD_Get> ts.tv_sec += delta->tv_sec; 109f73: 8b 03 mov (%ebx),%eax 109f75: 01 45 f0 add %eax,-0x10(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 109f78: 69 43 04 e8 03 00 00 imul $0x3e8,0x4(%ebx),%eax 109f7f: 8b 4d f0 mov -0x10(%ebp),%ecx 109f82: 03 45 f4 add -0xc(%ebp),%eax /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 109f85: 83 c4 10 add $0x10,%esp 109f88: eb 05 jmp 109f8f 109f8a: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax 109f8f: 89 ca mov %ecx,%edx 109f91: 41 inc %ecx 109f92: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 109f97: 77 f1 ja 109f8a 109f99: eb 05 jmp 109fa0 109f9b: 05 00 ca 9a 3b add $0x3b9aca00,%eax 109fa0: 89 d1 mov %edx,%ecx 109fa2: 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) ) { 109fa3: 3d 00 36 65 c4 cmp $0xc4653600,%eax 109fa8: 76 f1 jbe 109f9b 109faa: 89 45 f4 mov %eax,-0xc(%ebp) 109fad: 89 4d f0 mov %ecx,-0x10(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 109fb0: 83 ec 0c sub $0xc,%esp 109fb3: 8d 45 f0 lea -0x10(%ebp),%eax 109fb6: 50 push %eax 109fb7: e8 24 15 00 00 call 10b4e0 <_TOD_Set> _Thread_Enable_dispatch(); 109fbc: e8 78 25 00 00 call 10c539 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 109fc1: 83 c4 10 add $0x10,%esp 109fc4: 85 f6 test %esi,%esi 109fc6: 74 0a je 109fd2 <== NEVER TAKEN *olddelta = *delta; 109fc8: 8b 03 mov (%ebx),%eax 109fca: 8b 53 04 mov 0x4(%ebx),%edx 109fcd: 89 06 mov %eax,(%esi) 109fcf: 89 56 04 mov %edx,0x4(%esi) 109fd2: 31 c0 xor %eax,%eax return 0; } 109fd4: 8d 65 f8 lea -0x8(%ebp),%esp 109fd7: 5b pop %ebx 109fd8: 5e pop %esi 109fd9: c9 leave 109fda: c3 ret 00109e18 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 109e18: 55 push %ebp 109e19: 89 e5 mov %esp,%ebp 109e1b: 83 ec 08 sub $0x8,%esp 109e1e: 8b 45 08 mov 0x8(%ebp),%eax 109e21: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 109e24: 85 d2 test %edx,%edx 109e26: 74 3c je 109e64 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 109e28: 83 f8 01 cmp $0x1,%eax 109e2b: 75 0b jne 109e38 _TOD_Get(tp); 109e2d: 83 ec 0c sub $0xc,%esp 109e30: 52 push %edx 109e31: e8 86 1b 00 00 call 10b9bc <_TOD_Get> 109e36: eb 13 jmp 109e4b return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 109e38: 83 f8 04 cmp $0x4,%eax 109e3b: 74 05 je 109e42 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 109e3d: 83 f8 02 cmp $0x2,%eax 109e40: 75 10 jne 109e52 _TOD_Get_uptime_as_timespec( tp ); 109e42: 83 ec 0c sub $0xc,%esp 109e45: 52 push %edx 109e46: e8 cd 1b 00 00 call 10ba18 <_TOD_Get_uptime_as_timespec> 109e4b: 31 c0 xor %eax,%eax return 0; 109e4d: 83 c4 10 add $0x10,%esp 109e50: eb 20 jmp 109e72 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 109e52: 83 f8 03 cmp $0x3,%eax 109e55: 75 0d jne 109e64 rtems_set_errno_and_return_minus_one( ENOSYS ); 109e57: e8 70 82 00 00 call 1120cc <__errno> 109e5c: c7 00 58 00 00 00 movl $0x58,(%eax) 109e62: eb 0b jmp 109e6f #endif rtems_set_errno_and_return_minus_one( EINVAL ); 109e64: e8 63 82 00 00 call 1120cc <__errno> 109e69: c7 00 16 00 00 00 movl $0x16,(%eax) 109e6f: 83 c8 ff or $0xffffffff,%eax return 0; } 109e72: c9 leave 109e73: c3 ret 00109e74 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 109e74: 55 push %ebp 109e75: 89 e5 mov %esp,%ebp 109e77: 83 ec 08 sub $0x8,%esp 109e7a: 8b 45 08 mov 0x8(%ebp),%eax 109e7d: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 109e80: 85 d2 test %edx,%edx 109e82: 74 44 je 109ec8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 109e84: 83 f8 01 cmp $0x1,%eax 109e87: 75 28 jne 109eb1 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 109e89: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 109e8f: 76 37 jbe 109ec8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109e91: a1 34 62 12 00 mov 0x126234,%eax 109e96: 40 inc %eax 109e97: a3 34 62 12 00 mov %eax,0x126234 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 109e9c: 83 ec 0c sub $0xc,%esp 109e9f: 52 push %edx 109ea0: e8 cb 1b 00 00 call 10ba70 <_TOD_Set> _Thread_Enable_dispatch(); 109ea5: e8 1f 2c 00 00 call 10cac9 <_Thread_Enable_dispatch> 109eaa: 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; 109eac: 83 c4 10 add $0x10,%esp 109eaf: eb 25 jmp 109ed6 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 109eb1: 83 f8 02 cmp $0x2,%eax 109eb4: 74 05 je 109ebb rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 109eb6: 83 f8 03 cmp $0x3,%eax 109eb9: 75 0d jne 109ec8 rtems_set_errno_and_return_minus_one( ENOSYS ); 109ebb: e8 0c 82 00 00 call 1120cc <__errno> 109ec0: c7 00 58 00 00 00 movl $0x58,(%eax) 109ec6: eb 0b jmp 109ed3 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 109ec8: e8 ff 81 00 00 call 1120cc <__errno> 109ecd: c7 00 16 00 00 00 movl $0x16,(%eax) 109ed3: 83 c8 ff or $0xffffffff,%eax return 0; } 109ed6: c9 leave 109ed7: c3 ret 00110f48 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 110f48: 55 push %ebp 110f49: 89 e5 mov %esp,%ebp 110f4b: 57 push %edi 110f4c: 56 push %esi 110f4d: 53 push %ebx 110f4e: 83 ec 3c sub $0x3c,%esp 110f51: 8b 5d 0c mov 0xc(%ebp),%ebx 110f54: 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() ) 110f57: e8 08 f3 ff ff call 110264 110f5c: 39 45 08 cmp %eax,0x8(%ebp) 110f5f: 74 0d je 110f6e rtems_set_errno_and_return_minus_one( ESRCH ); 110f61: e8 9e 04 00 00 call 111404 <__errno> 110f66: c7 00 03 00 00 00 movl $0x3,(%eax) 110f6c: eb 0f jmp 110f7d /* * Validate the signal passed. */ if ( !sig ) 110f6e: 85 db test %ebx,%ebx 110f70: 75 13 jne 110f85 rtems_set_errno_and_return_minus_one( EINVAL ); 110f72: e8 8d 04 00 00 call 111404 <__errno> 110f77: c7 00 16 00 00 00 movl $0x16,(%eax) 110f7d: 83 c8 ff or $0xffffffff,%eax 110f80: e9 e7 01 00 00 jmp 11116c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 110f85: 8d 4b ff lea -0x1(%ebx),%ecx if ( !is_valid_signo(sig) ) 110f88: 83 f9 1f cmp $0x1f,%ecx 110f8b: 77 e5 ja 110f72 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 ) 110f8d: 6b d3 0c imul $0xc,%ebx,%edx 110f90: 31 c0 xor %eax,%eax 110f92: 83 ba 5c 47 12 00 01 cmpl $0x1,0x12475c(%edx) 110f99: 0f 84 cd 01 00 00 je 11116c <== NEVER TAKEN /* * 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 ) ) 110f9f: 83 fb 04 cmp $0x4,%ebx 110fa2: 74 0a je 110fae 110fa4: 83 fb 08 cmp $0x8,%ebx 110fa7: 74 05 je 110fae 110fa9: 83 fb 0b cmp $0xb,%ebx 110fac: 75 16 jne 110fc4 return pthread_kill( pthread_self(), sig ); 110fae: e8 d1 03 00 00 call 111384 110fb3: 56 push %esi 110fb4: 56 push %esi 110fb5: 53 push %ebx 110fb6: 50 push %eax 110fb7: e8 1c 03 00 00 call 1112d8 110fbc: 83 c4 10 add $0x10,%esp 110fbf: e9 a8 01 00 00 jmp 11116c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 110fc4: be 01 00 00 00 mov $0x1,%esi 110fc9: d3 e6 shl %cl,%esi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 110fcb: 89 5d dc mov %ebx,-0x24(%ebp) siginfo->si_code = SI_USER; 110fce: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 110fd5: 85 ff test %edi,%edi 110fd7: 75 09 jne 110fe2 siginfo->si_value.sival_int = 0; 110fd9: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 110fe0: eb 05 jmp 110fe7 } else { siginfo->si_value = *value; 110fe2: 8b 07 mov (%edi),%eax 110fe4: 89 45 e4 mov %eax,-0x1c(%ebp) 110fe7: a1 f4 41 12 00 mov 0x1241f4,%eax 110fec: 40 inc %eax 110fed: a3 f4 41 12 00 mov %eax,0x1241f4 /* * 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; 110ff2: 8b 15 b0 42 12 00 mov 0x1242b0,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110ff8: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax 110ffe: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 111004: f7 d0 not %eax 111006: 85 c6 test %eax,%esi 111008: 0f 85 e0 00 00 00 jne 1110ee /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11100e: a1 e0 48 12 00 mov 0x1248e0,%eax 111013: eb 23 jmp 111038 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 111015: 89 c2 mov %eax,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111017: 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) 11101d: 85 70 30 test %esi,0x30(%eax) 111020: 0f 85 c8 00 00 00 jne 1110ee /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 111026: 8b 89 cc 00 00 00 mov 0xcc(%ecx),%ecx 11102c: f7 d1 not %ecx 11102e: 85 ce test %ecx,%esi 111030: 0f 85 b8 00 00 00 jne 1110ee 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 ) { 111036: 8b 00 mov (%eax),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111038: 3d e4 48 12 00 cmp $0x1248e4,%eax 11103d: 75 d6 jne 111015 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 11103f: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 111046: 40 inc %eax 111047: 89 45 d4 mov %eax,-0x2c(%ebp) 11104a: 31 d2 xor %edx,%edx 11104c: 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 ] ) 111053: 8b 4d cc mov -0x34(%ebp),%ecx 111056: 8b 04 8d c8 41 12 00 mov 0x1241c8(,%ecx,4),%eax 11105d: 85 c0 test %eax,%eax 11105f: 74 7c je 1110dd continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 111061: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 111064: 0f b7 78 10 movzwl 0x10(%eax),%edi 111068: 89 7d c0 mov %edi,-0x40(%ebp) object_table = the_info->local_table; 11106b: 8b 40 1c mov 0x1c(%eax),%eax 11106e: 89 45 c4 mov %eax,-0x3c(%ebp) 111071: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 111078: eb 5b jmp 1110d5 the_thread = (Thread_Control *) object_table[ index ]; 11107a: 8b 4d d0 mov -0x30(%ebp),%ecx 11107d: 8b 7d c4 mov -0x3c(%ebp),%edi 111080: 8b 04 8f mov (%edi,%ecx,4),%eax if ( !the_thread ) 111083: 85 c0 test %eax,%eax 111085: 74 41 je 1110c8 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 111087: 8b 48 14 mov 0x14(%eax),%ecx 11108a: 3b 4d d4 cmp -0x2c(%ebp),%ecx 11108d: 77 39 ja 1110c8 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11108f: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi 111095: 8b bf cc 00 00 00 mov 0xcc(%edi),%edi 11109b: f7 d7 not %edi 11109d: 85 fe test %edi,%esi 11109f: 74 27 je 1110c8 * * 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 ) { 1110a1: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1110a4: 72 27 jb 1110cd * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 1110a6: 8b 7a 10 mov 0x10(%edx),%edi 1110a9: 89 7d c8 mov %edi,-0x38(%ebp) 1110ac: 85 ff test %edi,%edi 1110ae: 74 18 je 1110c8 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 1110b0: 8b 78 10 mov 0x10(%eax),%edi 1110b3: 85 ff test %edi,%edi 1110b5: 74 16 je 1110cd continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 1110b7: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp) 1110be: 75 08 jne 1110c8 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 1110c0: 81 e7 00 00 00 10 and $0x10000000,%edi 1110c6: 75 05 jne 1110cd 1110c8: 8b 4d d4 mov -0x2c(%ebp),%ecx 1110cb: eb 02 jmp 1110cf 1110cd: 89 c2 mov %eax,%edx #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1110cf: ff 45 d0 incl -0x30(%ebp) 1110d2: 89 4d d4 mov %ecx,-0x2c(%ebp) 1110d5: 8b 45 c0 mov -0x40(%ebp),%eax 1110d8: 39 45 d0 cmp %eax,-0x30(%ebp) 1110db: 76 9d jbe 11107a * + 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++) { 1110dd: ff 45 cc incl -0x34(%ebp) 1110e0: 83 7d cc 05 cmpl $0x5,-0x34(%ebp) 1110e4: 0f 85 69 ff ff ff jne 111053 } } } } if ( interested ) { 1110ea: 85 d2 test %edx,%edx 1110ec: 74 17 je 111105 * 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; 1110ee: 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 ) ) { 1110f2: 51 push %ecx 1110f3: 8d 45 dc lea -0x24(%ebp),%eax 1110f6: 50 push %eax 1110f7: 53 push %ebx 1110f8: 52 push %edx 1110f9: e8 e2 00 00 00 call 1111e0 <_POSIX_signals_Unblock_thread> 1110fe: 83 c4 10 add $0x10,%esp 111101: 84 c0 test %al,%al 111103: 75 60 jne 111165 /* * 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 ); 111105: 83 ec 0c sub $0xc,%esp 111108: 56 push %esi 111109: e8 ae 00 00 00 call 1111bc <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 11110e: 6b db 0c imul $0xc,%ebx,%ebx 111111: 83 c4 10 add $0x10,%esp 111114: 83 bb 54 47 12 00 02 cmpl $0x2,0x124754(%ebx) 11111b: 75 48 jne 111165 psiginfo = (POSIX_signals_Siginfo_node *) 11111d: 83 ec 0c sub $0xc,%esp 111120: 68 d4 48 12 00 push $0x1248d4 111125: e8 4a 97 ff ff call 10a874 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 11112a: 83 c4 10 add $0x10,%esp 11112d: 85 c0 test %eax,%eax 11112f: 75 15 jne 111146 _Thread_Enable_dispatch(); 111131: e8 7b ab ff ff call 10bcb1 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 111136: e8 c9 02 00 00 call 111404 <__errno> 11113b: c7 00 0b 00 00 00 movl $0xb,(%eax) 111141: e9 37 fe ff ff jmp 110f7d } psiginfo->Info = *siginfo; 111146: 8d 78 08 lea 0x8(%eax),%edi 111149: 8d 75 dc lea -0x24(%ebp),%esi 11114c: b9 03 00 00 00 mov $0x3,%ecx 111151: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 111153: 52 push %edx 111154: 52 push %edx 111155: 50 push %eax 111156: 81 c3 4c 49 12 00 add $0x12494c,%ebx 11115c: 53 push %ebx 11115d: e8 ee 96 ff ff call 10a850 <_Chain_Append> 111162: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 111165: e8 47 ab ff ff call 10bcb1 <_Thread_Enable_dispatch> 11116a: 31 c0 xor %eax,%eax return 0; } 11116c: 8d 65 f4 lea -0xc(%ebp),%esp 11116f: 5b pop %ebx 111170: 5e pop %esi 111171: 5f pop %edi 111172: c9 leave 111173: c3 ret 0011d4ac : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 11d4ac: 55 push %ebp 11d4ad: 89 e5 mov %esp,%ebp 11d4af: 56 push %esi 11d4b0: 53 push %ebx 11d4b1: 8b 75 08 mov 0x8(%ebp),%esi 11d4b4: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 11d4b7: 83 ec 0c sub $0xc,%esp 11d4ba: 56 push %esi 11d4bb: e8 44 01 00 00 call 11d604 <_Timespec_Is_valid> 11d4c0: 83 c4 10 add $0x10,%esp 11d4c3: 84 c0 test %al,%al 11d4c5: 74 0b je 11d4d2 * 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 ) 11d4c7: 83 3e 00 cmpl $0x0,(%esi) 11d4ca: 78 06 js 11d4d2 <== NEVER TAKEN 11d4cc: 83 7e 04 00 cmpl $0x0,0x4(%esi) 11d4d0: 79 10 jns 11d4e2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 11d4d2: e8 41 43 ff ff call 111818 <__errno> 11d4d7: c7 00 16 00 00 00 movl $0x16,(%eax) 11d4dd: e9 c4 00 00 00 jmp 11d5a6 ticks = _Timespec_To_ticks( rqtp ); 11d4e2: 83 ec 0c sub $0xc,%esp 11d4e5: 56 push %esi 11d4e6: e8 6d 24 ff ff call 10f958 <_Timespec_To_ticks> 11d4eb: 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 ) { 11d4ed: 83 c4 10 add $0x10,%esp 11d4f0: 85 c0 test %eax,%eax 11d4f2: 75 2f jne 11d523 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11d4f4: a1 5c 52 12 00 mov 0x12525c,%eax 11d4f9: 40 inc %eax 11d4fa: a3 5c 52 12 00 mov %eax,0x12525c _Thread_Disable_dispatch(); _Thread_Yield_processor(); 11d4ff: e8 80 f6 fe ff call 10cb84 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 11d504: e8 8c eb fe ff call 10c095 <_Thread_Enable_dispatch> if ( rmtp ) { 11d509: 85 db test %ebx,%ebx 11d50b: 0f 84 9a 00 00 00 je 11d5ab rmtp->tv_sec = 0; 11d511: c7 03 00 00 00 00 movl $0x0,(%ebx) rmtp->tv_nsec = 0; 11d517: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 11d51e: e9 88 00 00 00 jmp 11d5ab 11d523: a1 5c 52 12 00 mov 0x12525c,%eax 11d528: 40 inc %eax 11d529: a3 5c 52 12 00 mov %eax,0x12525c /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 11d52e: 52 push %edx 11d52f: 52 push %edx 11d530: 68 08 00 00 10 push $0x10000008 11d535: ff 35 18 53 12 00 pushl 0x125318 11d53b: e8 64 f3 fe ff call 10c8a4 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 11d540: 8b 15 18 53 12 00 mov 0x125318,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 11d546: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11d549: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 11d550: c7 42 64 18 bf 10 00 movl $0x10bf18,0x64(%edx) the_watchdog->id = id; 11d557: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 11d55a: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11d561: 89 72 54 mov %esi,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11d564: 59 pop %ecx 11d565: 58 pop %eax 11d566: 83 c2 48 add $0x48,%edx 11d569: 52 push %edx 11d56a: 68 38 53 12 00 push $0x125338 11d56f: e8 70 f9 fe ff call 10cee4 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 11d574: e8 1c eb fe ff call 10c095 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 11d579: 83 c4 10 add $0x10,%esp 11d57c: 85 db test %ebx,%ebx 11d57e: 74 2b je 11d5ab ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 11d580: a1 18 53 12 00 mov 0x125318,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 11d585: 03 70 5c add 0x5c(%eax),%esi 11d588: 2b 70 60 sub 0x60(%eax),%esi _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 11d58b: 50 push %eax 11d58c: 50 push %eax 11d58d: 53 push %ebx 11d58e: 56 push %esi 11d58f: e8 48 00 00 00 call 11d5dc <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 11d594: 83 c4 10 add $0x10,%esp 11d597: 85 f6 test %esi,%esi 11d599: 74 10 je 11d5ab rtems_set_errno_and_return_minus_one( EINTR ); 11d59b: e8 78 42 ff ff call 111818 <__errno> 11d5a0: c7 00 04 00 00 00 movl $0x4,(%eax) 11d5a6: 83 c8 ff or $0xffffffff,%eax 11d5a9: eb 02 jmp 11d5ad 11d5ab: 31 c0 xor %eax,%eax #endif } return 0; } 11d5ad: 8d 65 f8 lea -0x8(%ebp),%esp 11d5b0: 5b pop %ebx 11d5b1: 5e pop %esi 11d5b2: c9 leave 11d5b3: c3 ret 0010e4f4 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10e4f4: 55 push %ebp 10e4f5: 89 e5 mov %esp,%ebp 10e4f7: 8b 45 08 mov 0x8(%ebp),%eax 10e4fa: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) 10e4fd: 85 c0 test %eax,%eax 10e4ff: 74 24 je 10e525 10e501: 83 38 00 cmpl $0x0,(%eax) 10e504: 74 1f je 10e525 return EINVAL; switch ( policy ) { 10e506: 83 f9 04 cmp $0x4,%ecx 10e509: 77 0c ja 10e517 10e50b: ba 01 00 00 00 mov $0x1,%edx 10e510: d3 e2 shl %cl,%edx 10e512: 80 e2 17 and $0x17,%dl 10e515: 75 07 jne 10e51e <== ALWAYS TAKEN 10e517: b8 86 00 00 00 mov $0x86,%eax 10e51c: eb 0c jmp 10e52a case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10e51e: 89 48 14 mov %ecx,0x14(%eax) 10e521: 31 c0 xor %eax,%eax return 0; 10e523: eb 05 jmp 10e52a 10e525: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10e52a: c9 leave 10e52b: c3 ret 0010a360 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10a360: 55 push %ebp 10a361: 89 e5 mov %esp,%ebp 10a363: 57 push %edi 10a364: 56 push %esi 10a365: 53 push %ebx 10a366: 83 ec 1c sub $0x1c,%esp 10a369: 8b 5d 08 mov 0x8(%ebp),%ebx 10a36c: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10a36f: 85 db test %ebx,%ebx 10a371: 0f 84 93 00 00 00 je 10a40a return EINVAL; if ( count == 0 ) 10a377: 85 f6 test %esi,%esi 10a379: 0f 84 8b 00 00 00 je 10a40a return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10a37f: 8b 7d 0c mov 0xc(%ebp),%edi 10a382: 85 ff test %edi,%edi 10a384: 75 0f jne 10a395 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10a386: 83 ec 0c sub $0xc,%esp 10a389: 8d 7d d8 lea -0x28(%ebp),%edi 10a38c: 57 push %edi 10a38d: e8 1a ff ff ff call 10a2ac 10a392: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10a395: 83 3f 00 cmpl $0x0,(%edi) 10a398: 74 70 je 10a40a return EINVAL; switch ( the_attr->process_shared ) { 10a39a: 83 7f 04 00 cmpl $0x0,0x4(%edi) 10a39e: 75 6a jne 10a40a <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10a3a0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10a3a7: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a3aa: a1 a4 62 12 00 mov 0x1262a4,%eax 10a3af: 40 inc %eax 10a3b0: a3 a4 62 12 00 mov %eax,0x1262a4 * 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 *) 10a3b5: 83 ec 0c sub $0xc,%esp 10a3b8: 68 8c 66 12 00 push $0x12668c 10a3bd: e8 6a 1d 00 00 call 10c12c <_Objects_Allocate> 10a3c2: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10a3c4: 83 c4 10 add $0x10,%esp 10a3c7: 85 c0 test %eax,%eax 10a3c9: 75 0c jne 10a3d7 _Thread_Enable_dispatch(); 10a3cb: e8 61 29 00 00 call 10cd31 <_Thread_Enable_dispatch> 10a3d0: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10a3d5: eb 38 jmp 10a40f } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10a3d7: 50 push %eax 10a3d8: 50 push %eax 10a3d9: 8d 45 e0 lea -0x20(%ebp),%eax 10a3dc: 50 push %eax 10a3dd: 8d 46 10 lea 0x10(%esi),%eax 10a3e0: 50 push %eax 10a3e1: e8 7a 14 00 00 call 10b860 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a3e6: 8b 46 08 mov 0x8(%esi),%eax 10a3e9: 0f b7 c8 movzwl %ax,%ecx 10a3ec: 8b 15 a8 66 12 00 mov 0x1266a8,%edx 10a3f2: 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; 10a3f5: 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; 10a3fc: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10a3fe: e8 2e 29 00 00 call 10cd31 <_Thread_Enable_dispatch> 10a403: 31 c0 xor %eax,%eax return 0; 10a405: 83 c4 10 add $0x10,%esp 10a408: eb 05 jmp 10a40f 10a40a: b8 16 00 00 00 mov $0x16,%eax } 10a40f: 8d 65 f4 lea -0xc(%ebp),%esp 10a412: 5b pop %ebx 10a413: 5e pop %esi 10a414: 5f pop %edi 10a415: c9 leave 10a416: c3 ret 00109d40 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 109d40: 55 push %ebp 109d41: 89 e5 mov %esp,%ebp 109d43: 56 push %esi 109d44: 53 push %ebx 109d45: 8b 5d 08 mov 0x8(%ebp),%ebx 109d48: 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 ) 109d4b: 85 db test %ebx,%ebx 109d4d: 74 4b je 109d9a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109d4f: a1 dc 61 12 00 mov 0x1261dc,%eax 109d54: 40 inc %eax 109d55: a3 dc 61 12 00 mov %eax,0x1261dc return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 109d5a: 83 ec 0c sub $0xc,%esp 109d5d: 6a 10 push $0x10 109d5f: e8 84 3a 00 00 call 10d7e8 <_Workspace_Allocate> if ( handler ) { 109d64: 83 c4 10 add $0x10,%esp 109d67: 85 c0 test %eax,%eax 109d69: 74 24 je 109d8f <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 109d6b: 8b 15 98 62 12 00 mov 0x126298,%edx 109d71: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 109d77: 81 c2 e0 00 00 00 add $0xe0,%edx handler->routine = routine; 109d7d: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 109d80: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 109d83: 51 push %ecx 109d84: 51 push %ecx 109d85: 50 push %eax 109d86: 52 push %edx 109d87: e8 88 15 00 00 call 10b314 <_Chain_Append> 109d8c: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 109d8f: 8d 65 f8 lea -0x8(%ebp),%esp 109d92: 5b pop %ebx 109d93: 5e pop %esi 109d94: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 109d95: e9 db 29 00 00 jmp 10c775 <_Thread_Enable_dispatch> } 109d9a: 8d 65 f8 lea -0x8(%ebp),%esp 109d9d: 5b pop %ebx 109d9e: 5e pop %esi 109d9f: c9 leave 109da0: c3 ret 0010aab0 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10aab0: 55 push %ebp 10aab1: 89 e5 mov %esp,%ebp 10aab3: 56 push %esi 10aab4: 53 push %ebx 10aab5: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10aab8: bb 0c 0c 12 00 mov $0x120c0c,%ebx 10aabd: 85 c0 test %eax,%eax 10aabf: 74 02 je 10aac3 10aac1: 89 c3 mov %eax,%ebx /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10aac3: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10aac7: 74 78 je 10ab41 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10aac9: 83 3b 00 cmpl $0x0,(%ebx) 10aacc: 74 73 je 10ab41 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aace: a1 54 72 12 00 mov 0x127254,%eax 10aad3: 40 inc %eax 10aad4: a3 54 72 12 00 mov %eax,0x127254 */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10aad9: 83 ec 0c sub $0xc,%esp 10aadc: 68 d4 76 12 00 push $0x1276d4 10aae1: e8 aa 22 00 00 call 10cd90 <_Objects_Allocate> 10aae6: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10aae8: 83 c4 10 add $0x10,%esp 10aaeb: 85 c0 test %eax,%eax 10aaed: 75 0c jne 10aafb _Thread_Enable_dispatch(); 10aaef: e8 a1 2e 00 00 call 10d995 <_Thread_Enable_dispatch> 10aaf4: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10aaf9: eb 4b jmp 10ab46 } the_cond->process_shared = the_attr->process_shared; 10aafb: 8b 43 04 mov 0x4(%ebx),%eax 10aafe: 89 46 10 mov %eax,0x10(%esi) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10ab01: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10ab08: 6a 74 push $0x74 10ab0a: 68 00 08 00 00 push $0x800 10ab0f: 6a 00 push $0x0 10ab11: 8d 46 18 lea 0x18(%esi),%eax 10ab14: 50 push %eax 10ab15: e8 92 35 00 00 call 10e0ac <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ab1a: 8b 46 08 mov 0x8(%esi),%eax 10ab1d: 0f b7 c8 movzwl %ax,%ecx 10ab20: 8b 15 f0 76 12 00 mov 0x1276f0,%edx 10ab26: 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; 10ab29: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10ab30: 8b 55 08 mov 0x8(%ebp),%edx 10ab33: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10ab35: e8 5b 2e 00 00 call 10d995 <_Thread_Enable_dispatch> 10ab3a: 31 c0 xor %eax,%eax return 0; 10ab3c: 83 c4 10 add $0x10,%esp 10ab3f: eb 05 jmp 10ab46 10ab41: b8 16 00 00 00 mov $0x16,%eax } 10ab46: 8d 65 f8 lea -0x8(%ebp),%esp 10ab49: 5b pop %ebx 10ab4a: 5e pop %esi 10ab4b: c9 leave 10ab4c: c3 ret 0010a964 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10a964: 55 push %ebp 10a965: 89 e5 mov %esp,%ebp 10a967: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10a96a: 85 c0 test %eax,%eax 10a96c: 74 0f je 10a97d 10a96e: 83 38 00 cmpl $0x0,(%eax) 10a971: 74 0a je 10a97d <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10a973: c7 00 00 00 00 00 movl $0x0,(%eax) 10a979: 31 c0 xor %eax,%eax return 0; 10a97b: eb 05 jmp 10a982 10a97d: b8 16 00 00 00 mov $0x16,%eax } 10a982: c9 leave 10a983: c3 ret 0010a08c : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10a08c: 55 push %ebp 10a08d: 89 e5 mov %esp,%ebp 10a08f: 57 push %edi 10a090: 56 push %esi 10a091: 53 push %ebx 10a092: 83 ec 4c sub $0x4c,%esp 10a095: 8b 45 0c mov 0xc(%ebp),%eax int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10a098: c7 45 b0 0e 00 00 00 movl $0xe,-0x50(%ebp) 10a09f: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a0a3: 0f 84 08 02 00 00 je 10a2b1 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10a0a9: bb 74 f7 11 00 mov $0x11f774,%ebx 10a0ae: 85 c0 test %eax,%eax 10a0b0: 74 02 je 10a0b4 10a0b2: 89 c3 mov %eax,%ebx if ( !the_attr->is_initialized ) 10a0b4: 83 3b 00 cmpl $0x0,(%ebx) 10a0b7: 0f 84 ed 01 00 00 je 10a2aa * 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) ) 10a0bd: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a0c1: 74 0f je 10a0d2 10a0c3: 8b 43 08 mov 0x8(%ebx),%eax 10a0c6: 3b 05 14 12 12 00 cmp 0x121214,%eax 10a0cc: 0f 82 d8 01 00 00 jb 10a2aa * 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 ) { 10a0d2: 8b 43 10 mov 0x10(%ebx),%eax 10a0d5: 83 f8 01 cmp $0x1,%eax 10a0d8: 74 0b je 10a0e5 10a0da: 83 f8 02 cmp $0x2,%eax 10a0dd: 0f 85 c7 01 00 00 jne 10a2aa 10a0e3: eb 1f jmp 10a104 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a0e5: a1 a0 52 12 00 mov 0x1252a0,%eax 10a0ea: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10a0f0: 8b 86 80 00 00 00 mov 0x80(%esi),%eax 10a0f6: 89 45 ac mov %eax,-0x54(%ebp) schedparam = api->schedparam; 10a0f9: 8d 7d c4 lea -0x3c(%ebp),%edi 10a0fc: 81 c6 84 00 00 00 add $0x84,%esi 10a102: eb 0c jmp 10a110 break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10a104: 8b 53 14 mov 0x14(%ebx),%edx 10a107: 89 55 ac mov %edx,-0x54(%ebp) schedparam = the_attr->schedparam; 10a10a: 8d 7d c4 lea -0x3c(%ebp),%edi 10a10d: 8d 73 18 lea 0x18(%ebx),%esi 10a110: b9 07 00 00 00 mov $0x7,%ecx 10a115: 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 ) 10a117: c7 45 b0 86 00 00 00 movl $0x86,-0x50(%ebp) 10a11e: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10a122: 0f 85 89 01 00 00 jne 10a2b1 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10a128: 83 ec 0c sub $0xc,%esp 10a12b: ff 75 c4 pushl -0x3c(%ebp) 10a12e: e8 8d 53 00 00 call 10f4c0 <_POSIX_Priority_Is_valid> 10a133: 83 c4 10 add $0x10,%esp 10a136: 84 c0 test %al,%al 10a138: 0f 84 6c 01 00 00 je 10a2aa <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10a13e: 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); 10a141: 0f b6 35 18 12 12 00 movzbl 0x121218,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10a148: 8d 45 e0 lea -0x20(%ebp),%eax 10a14b: 50 push %eax 10a14c: 8d 45 e4 lea -0x1c(%ebp),%eax 10a14f: 50 push %eax 10a150: 8d 45 c4 lea -0x3c(%ebp),%eax 10a153: 50 push %eax 10a154: ff 75 ac pushl -0x54(%ebp) 10a157: e8 84 53 00 00 call 10f4e0 <_POSIX_Thread_Translate_sched_param> 10a15c: 89 45 b0 mov %eax,-0x50(%ebp) schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10a15f: 83 c4 10 add $0x10,%esp 10a162: 85 c0 test %eax,%eax 10a164: 0f 85 47 01 00 00 jne 10a2b1 <== NEVER TAKEN #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a16a: 83 ec 0c sub $0xc,%esp 10a16d: ff 35 98 52 12 00 pushl 0x125298 10a173: e8 44 15 00 00 call 10b6bc <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10a178: c7 04 24 4c 54 12 00 movl $0x12544c,(%esp) 10a17f: e8 0c 1e 00 00 call 10bf90 <_Objects_Allocate> 10a184: 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 ) { 10a186: 83 c4 10 add $0x10,%esp 10a189: 85 c0 test %eax,%eax 10a18b: 75 05 jne 10a192 _RTEMS_Unlock_allocator(); 10a18d: 83 ec 0c sub $0xc,%esp 10a190: eb 53 jmp 10a1e5 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10a192: 8b 43 08 mov 0x8(%ebx),%eax 10a195: 51 push %ecx 10a196: 6a 00 push $0x0 10a198: 6a 00 push $0x0 10a19a: ff 75 e0 pushl -0x20(%ebp) 10a19d: ff 75 e4 pushl -0x1c(%ebp) 10a1a0: 6a 01 push $0x1 10a1a2: 81 e6 ff 00 00 00 and $0xff,%esi 10a1a8: 29 fe sub %edi,%esi 10a1aa: 56 push %esi 10a1ab: 6a 01 push $0x1 10a1ad: 8b 0d 14 12 12 00 mov 0x121214,%ecx 10a1b3: d1 e1 shl %ecx 10a1b5: 39 c1 cmp %eax,%ecx 10a1b7: 73 02 jae 10a1bb 10a1b9: 89 c1 mov %eax,%ecx 10a1bb: 51 push %ecx 10a1bc: ff 73 04 pushl 0x4(%ebx) 10a1bf: 52 push %edx 10a1c0: 68 4c 54 12 00 push $0x12544c 10a1c5: 89 55 a8 mov %edx,-0x58(%ebp) 10a1c8: e8 8b 2a 00 00 call 10cc58 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10a1cd: 83 c4 30 add $0x30,%esp 10a1d0: 84 c0 test %al,%al 10a1d2: 8b 55 a8 mov -0x58(%ebp),%edx 10a1d5: 75 25 jne 10a1fc RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10a1d7: 53 push %ebx 10a1d8: 53 push %ebx 10a1d9: 52 push %edx 10a1da: 68 4c 54 12 00 push $0x12544c 10a1df: e8 98 20 00 00 call 10c27c <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a1e4: 59 pop %ecx 10a1e5: ff 35 98 52 12 00 pushl 0x125298 10a1eb: e8 14 15 00 00 call 10b704 <_API_Mutex_Unlock> 10a1f0: c7 45 b0 0b 00 00 00 movl $0xb,-0x50(%ebp) 10a1f7: e9 a9 00 00 00 jmp 10a2a5 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10a1fc: 8b 8a f8 00 00 00 mov 0xf8(%edx),%ecx 10a202: 89 4d b4 mov %ecx,-0x4c(%ebp) api->Attributes = *the_attr; 10a205: b9 0f 00 00 00 mov $0xf,%ecx 10a20a: 8b 7d b4 mov -0x4c(%ebp),%edi 10a20d: 89 de mov %ebx,%esi 10a20f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10a211: 8b 43 38 mov 0x38(%ebx),%eax 10a214: 8b 4d b4 mov -0x4c(%ebp),%ecx 10a217: 89 41 3c mov %eax,0x3c(%ecx) api->schedpolicy = schedpolicy; 10a21a: 8b 45 ac mov -0x54(%ebp),%eax 10a21d: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = schedparam; 10a223: 89 cf mov %ecx,%edi 10a225: 81 c7 84 00 00 00 add $0x84,%edi 10a22b: 8d 75 c4 lea -0x3c(%ebp),%esi 10a22e: b9 07 00 00 00 mov $0x7,%ecx 10a233: 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; 10a235: c6 42 74 01 movb $0x1,0x74(%edx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10a239: 83 ec 0c sub $0xc,%esp 10a23c: 6a 00 push $0x0 10a23e: ff 75 14 pushl 0x14(%ebp) 10a241: ff 75 10 pushl 0x10(%ebp) 10a244: 6a 01 push $0x1 10a246: 52 push %edx 10a247: 89 55 a8 mov %edx,-0x58(%ebp) 10a24a: e8 a1 33 00 00 call 10d5f0 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10a24f: 83 c4 20 add $0x20,%esp 10a252: 83 7d ac 04 cmpl $0x4,-0x54(%ebp) 10a256: 8b 55 a8 mov -0x58(%ebp),%edx 10a259: 75 34 jne 10a28f _Watchdog_Insert_ticks( 10a25b: 83 ec 0c sub $0xc,%esp 10a25e: 8b 45 b4 mov -0x4c(%ebp),%eax 10a261: 05 8c 00 00 00 add $0x8c,%eax 10a266: 50 push %eax 10a267: e8 30 35 00 00 call 10d79c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a26c: 8b 4d b4 mov -0x4c(%ebp),%ecx 10a26f: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a275: 58 pop %eax 10a276: 5a pop %edx 10a277: 89 c8 mov %ecx,%eax 10a279: 05 a4 00 00 00 add $0xa4,%eax 10a27e: 50 push %eax 10a27f: 68 c0 52 12 00 push $0x1252c0 10a284: e8 bf 37 00 00 call 10da48 <_Watchdog_Insert> 10a289: 83 c4 10 add $0x10,%esp 10a28c: 8b 55 a8 mov -0x58(%ebp),%edx } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10a28f: 8b 52 08 mov 0x8(%edx),%edx 10a292: 8b 45 08 mov 0x8(%ebp),%eax 10a295: 89 10 mov %edx,(%eax) _RTEMS_Unlock_allocator(); 10a297: 83 ec 0c sub $0xc,%esp 10a29a: ff 35 98 52 12 00 pushl 0x125298 10a2a0: e8 5f 14 00 00 call 10b704 <_API_Mutex_Unlock> return 0; 10a2a5: 83 c4 10 add $0x10,%esp 10a2a8: eb 07 jmp 10a2b1 10a2aa: c7 45 b0 16 00 00 00 movl $0x16,-0x50(%ebp) } 10a2b1: 8b 45 b0 mov -0x50(%ebp),%eax 10a2b4: 8d 65 f4 lea -0xc(%ebp),%esp 10a2b7: 5b pop %ebx 10a2b8: 5e pop %esi 10a2b9: 5f pop %edi 10a2ba: c9 leave 10a2bb: c3 ret 0011055c : } void pthread_exit( void *value_ptr ) { 11055c: 55 push %ebp 11055d: 89 e5 mov %esp,%ebp 11055f: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 110562: ff 75 08 pushl 0x8(%ebp) 110565: ff 35 b0 42 12 00 pushl 0x1242b0 11056b: e8 88 ff ff ff call 1104f8 <_POSIX_Thread_Exit> 110570: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 110573: c9 leave <== NOT EXECUTED 110574: c3 ret <== NOT EXECUTED 00109be8 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 109be8: 55 push %ebp 109be9: 89 e5 mov %esp,%ebp 109beb: 8b 45 08 mov 0x8(%ebp),%eax 109bee: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 109bf1: 85 c0 test %eax,%eax 109bf3: 74 12 je 109c07 return EINVAL; if ( !attr->is_initialized ) 109bf5: 83 38 00 cmpl $0x0,(%eax) 109bf8: 74 0d je 109c07 return EINVAL; if ( !type ) 109bfa: 85 d2 test %edx,%edx 109bfc: 74 09 je 109c07 <== NEVER TAKEN return EINVAL; *type = attr->type; 109bfe: 8b 40 10 mov 0x10(%eax),%eax 109c01: 89 02 mov %eax,(%edx) 109c03: 31 c0 xor %eax,%eax return 0; 109c05: eb 05 jmp 109c0c 109c07: b8 16 00 00 00 mov $0x16,%eax } 109c0c: c9 leave 109c0d: c3 ret 0010ba80 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10ba80: 55 push %ebp 10ba81: 89 e5 mov %esp,%ebp 10ba83: 8b 45 08 mov 0x8(%ebp),%eax 10ba86: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10ba89: 85 c0 test %eax,%eax 10ba8b: 74 11 je 10ba9e 10ba8d: 83 38 00 cmpl $0x0,(%eax) 10ba90: 74 0c je 10ba9e return EINVAL; switch ( pshared ) { 10ba92: 83 fa 01 cmp $0x1,%edx 10ba95: 77 07 ja 10ba9e <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10ba97: 89 50 04 mov %edx,0x4(%eax) 10ba9a: 31 c0 xor %eax,%eax return 0; 10ba9c: eb 05 jmp 10baa3 10ba9e: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10baa3: c9 leave 10baa4: c3 ret 00109c38 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 109c38: 55 push %ebp 109c39: 89 e5 mov %esp,%ebp 109c3b: 8b 45 08 mov 0x8(%ebp),%eax 109c3e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 109c41: 85 c0 test %eax,%eax 109c43: 74 11 je 109c56 109c45: 83 38 00 cmpl $0x0,(%eax) 109c48: 74 0c je 109c56 <== NEVER TAKEN return EINVAL; switch ( type ) { 109c4a: 83 fa 03 cmp $0x3,%edx 109c4d: 77 07 ja 109c56 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 109c4f: 89 50 10 mov %edx,0x10(%eax) 109c52: 31 c0 xor %eax,%eax return 0; 109c54: eb 05 jmp 109c5b 109c56: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 109c5b: c9 leave 109c5c: c3 ret 0010a6d4 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10a6d4: 55 push %ebp 10a6d5: 89 e5 mov %esp,%ebp 10a6d7: 56 push %esi 10a6d8: 53 push %ebx 10a6d9: 83 ec 10 sub $0x10,%esp 10a6dc: 8b 5d 08 mov 0x8(%ebp),%ebx 10a6df: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10a6e2: 85 f6 test %esi,%esi 10a6e4: 74 04 je 10a6ea 10a6e6: 85 db test %ebx,%ebx 10a6e8: 75 07 jne 10a6f1 10a6ea: b8 16 00 00 00 mov $0x16,%eax 10a6ef: eb 4b jmp 10a73c return EINVAL; if ( !once_control->init_executed ) { 10a6f1: 31 c0 xor %eax,%eax 10a6f3: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a6f7: 75 43 jne 10a73c rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10a6f9: 52 push %edx 10a6fa: 8d 45 f4 lea -0xc(%ebp),%eax 10a6fd: 50 push %eax 10a6fe: 68 00 01 00 00 push $0x100 10a703: 68 00 01 00 00 push $0x100 10a708: e8 93 0a 00 00 call 10b1a0 if ( !once_control->init_executed ) { 10a70d: 83 c4 10 add $0x10,%esp 10a710: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a714: 75 0f jne 10a725 <== NEVER TAKEN once_control->is_initialized = true; 10a716: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10a71c: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10a723: ff d6 call *%esi } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10a725: 50 push %eax 10a726: 8d 45 f4 lea -0xc(%ebp),%eax 10a729: 50 push %eax 10a72a: 68 00 01 00 00 push $0x100 10a72f: ff 75 f4 pushl -0xc(%ebp) 10a732: e8 69 0a 00 00 call 10b1a0 10a737: 31 c0 xor %eax,%eax 10a739: 83 c4 10 add $0x10,%esp } return 0; } 10a73c: 8d 65 f8 lea -0x8(%ebp),%esp 10a73f: 5b pop %ebx 10a740: 5e pop %esi 10a741: c9 leave 10a742: c3 ret 0010aca0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10aca0: 55 push %ebp 10aca1: 89 e5 mov %esp,%ebp 10aca3: 56 push %esi 10aca4: 53 push %ebx 10aca5: 83 ec 10 sub $0x10,%esp 10aca8: 8b 5d 08 mov 0x8(%ebp),%ebx const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10acab: 85 db test %ebx,%ebx 10acad: 0f 84 81 00 00 00 je 10ad34 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10acb3: 8b 75 0c mov 0xc(%ebp),%esi 10acb6: 85 f6 test %esi,%esi 10acb8: 75 0f jne 10acc9 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10acba: 83 ec 0c sub $0xc,%esp 10acbd: 8d 75 ec lea -0x14(%ebp),%esi 10acc0: 56 push %esi 10acc1: e8 3e 09 00 00 call 10b604 10acc6: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10acc9: 83 3e 00 cmpl $0x0,(%esi) 10accc: 74 66 je 10ad34 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10acce: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10acd2: 75 60 jne 10ad34 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10acd4: a1 04 72 12 00 mov 0x127204,%eax 10acd9: 40 inc %eax 10acda: a3 04 72 12 00 mov %eax,0x127204 * 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 *) 10acdf: 83 ec 0c sub $0xc,%esp 10ace2: 68 2c 74 12 00 push $0x12742c 10ace7: e8 e4 22 00 00 call 10cfd0 <_Objects_Allocate> 10acec: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10acee: 83 c4 10 add $0x10,%esp 10acf1: 85 c0 test %eax,%eax 10acf3: 75 0c jne 10ad01 _Thread_Enable_dispatch(); 10acf5: e8 db 2e 00 00 call 10dbd5 <_Thread_Enable_dispatch> 10acfa: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10acff: eb 38 jmp 10ad39 } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10ad01: 50 push %eax 10ad02: 50 push %eax 10ad03: 8d 45 f4 lea -0xc(%ebp),%eax 10ad06: 50 push %eax 10ad07: 8d 46 10 lea 0x10(%esi),%eax 10ad0a: 50 push %eax 10ad0b: e8 4c 1b 00 00 call 10c85c <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ad10: 8b 46 08 mov 0x8(%esi),%eax 10ad13: 0f b7 c8 movzwl %ax,%ecx 10ad16: 8b 15 48 74 12 00 mov 0x127448,%edx 10ad1c: 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; 10ad1f: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10ad26: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10ad28: e8 a8 2e 00 00 call 10dbd5 <_Thread_Enable_dispatch> 10ad2d: 31 c0 xor %eax,%eax return 0; 10ad2f: 83 c4 10 add $0x10,%esp 10ad32: eb 05 jmp 10ad39 10ad34: b8 16 00 00 00 mov $0x16,%eax } 10ad39: 8d 65 f8 lea -0x8(%ebp),%esp 10ad3c: 5b pop %ebx 10ad3d: 5e pop %esi 10ad3e: c9 leave 10ad3f: c3 ret 0010ada4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10ada4: 55 push %ebp 10ada5: 89 e5 mov %esp,%ebp 10ada7: 56 push %esi 10ada8: 53 push %ebx 10ada9: 83 ec 20 sub $0x20,%esp 10adac: 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 ) 10adaf: 85 f6 test %esi,%esi 10adb1: 0f 84 89 00 00 00 je 10ae40 * * 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 ); 10adb7: 50 push %eax 10adb8: 50 push %eax 10adb9: 8d 45 f0 lea -0x10(%ebp),%eax 10adbc: 50 push %eax 10adbd: ff 75 0c pushl 0xc(%ebp) 10adc0: e8 87 56 00 00 call 11044c <_POSIX_Absolute_timeout_to_ticks> 10adc5: 89 c3 mov %eax,%ebx 10adc7: 83 c4 0c add $0xc,%esp 10adca: 8d 45 f4 lea -0xc(%ebp),%eax 10adcd: 50 push %eax 10adce: ff 36 pushl (%esi) 10add0: 68 2c 74 12 00 push $0x12742c 10add5: e8 0a 26 00 00 call 10d3e4 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10adda: 83 c4 10 add $0x10,%esp 10addd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ade1: 75 5d jne 10ae40 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, 10ade3: 83 fb 03 cmp $0x3,%ebx 10ade6: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10ade9: 83 ec 0c sub $0xc,%esp 10adec: 6a 00 push $0x0 10adee: ff 75 f0 pushl -0x10(%ebp) 10adf1: 0f b6 ca movzbl %dl,%ecx 10adf4: 51 push %ecx 10adf5: ff 36 pushl (%esi) 10adf7: 83 c0 10 add $0x10,%eax 10adfa: 50 push %eax 10adfb: 88 55 e4 mov %dl,-0x1c(%ebp) 10adfe: e8 8d 1a 00 00 call 10c890 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10ae03: 83 c4 20 add $0x20,%esp 10ae06: e8 ca 2d 00 00 call 10dbd5 <_Thread_Enable_dispatch> if ( !do_wait ) { 10ae0b: 8a 55 e4 mov -0x1c(%ebp),%dl 10ae0e: 84 d2 test %dl,%dl 10ae10: 75 19 jne 10ae2b if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10ae12: a1 c0 72 12 00 mov 0x1272c0,%eax 10ae17: 83 78 34 02 cmpl $0x2,0x34(%eax) 10ae1b: 75 0e jne 10ae2b switch (status) { 10ae1d: 85 db test %ebx,%ebx 10ae1f: 74 1f je 10ae40 <== NEVER TAKEN 10ae21: b8 74 00 00 00 mov $0x74,%eax 10ae26: 83 fb 02 cmp $0x2,%ebx 10ae29: 76 1a jbe 10ae45 <== ALWAYS TAKEN break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ae2b: 83 ec 0c sub $0xc,%esp 10ae2e: a1 c0 72 12 00 mov 0x1272c0,%eax 10ae33: ff 70 34 pushl 0x34(%eax) 10ae36: e8 b9 00 00 00 call 10aef4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10ae3b: 83 c4 10 add $0x10,%esp 10ae3e: eb 05 jmp 10ae45 10ae40: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ae45: 8d 65 f8 lea -0x8(%ebp),%esp 10ae48: 5b pop %ebx 10ae49: 5e pop %esi 10ae4a: c9 leave 10ae4b: c3 ret 0010ae4c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10ae4c: 55 push %ebp 10ae4d: 89 e5 mov %esp,%ebp 10ae4f: 56 push %esi 10ae50: 53 push %ebx 10ae51: 83 ec 20 sub $0x20,%esp 10ae54: 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 ) 10ae57: 85 f6 test %esi,%esi 10ae59: 0f 84 89 00 00 00 je 10aee8 * * 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 ); 10ae5f: 50 push %eax 10ae60: 50 push %eax 10ae61: 8d 45 f0 lea -0x10(%ebp),%eax 10ae64: 50 push %eax 10ae65: ff 75 0c pushl 0xc(%ebp) 10ae68: e8 df 55 00 00 call 11044c <_POSIX_Absolute_timeout_to_ticks> 10ae6d: 89 c3 mov %eax,%ebx 10ae6f: 83 c4 0c add $0xc,%esp 10ae72: 8d 45 f4 lea -0xc(%ebp),%eax 10ae75: 50 push %eax 10ae76: ff 36 pushl (%esi) 10ae78: 68 2c 74 12 00 push $0x12742c 10ae7d: e8 62 25 00 00 call 10d3e4 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ae82: 83 c4 10 add $0x10,%esp 10ae85: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ae89: 75 5d jne 10aee8 (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, 10ae8b: 83 fb 03 cmp $0x3,%ebx 10ae8e: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10ae91: 83 ec 0c sub $0xc,%esp 10ae94: 6a 00 push $0x0 10ae96: ff 75 f0 pushl -0x10(%ebp) 10ae99: 0f b6 ca movzbl %dl,%ecx 10ae9c: 51 push %ecx 10ae9d: ff 36 pushl (%esi) 10ae9f: 83 c0 10 add $0x10,%eax 10aea2: 50 push %eax 10aea3: 88 55 e4 mov %dl,-0x1c(%ebp) 10aea6: e8 9d 1a 00 00 call 10c948 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10aeab: 83 c4 20 add $0x20,%esp 10aeae: e8 22 2d 00 00 call 10dbd5 <_Thread_Enable_dispatch> if ( !do_wait && 10aeb3: 8a 55 e4 mov -0x1c(%ebp),%dl 10aeb6: 84 d2 test %dl,%dl 10aeb8: 75 19 jne 10aed3 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10aeba: a1 c0 72 12 00 mov 0x1272c0,%eax 10aebf: 83 78 34 02 cmpl $0x2,0x34(%eax) 10aec3: 75 0e jne 10aed3 switch (status) { 10aec5: 85 db test %ebx,%ebx 10aec7: 74 1f je 10aee8 <== NEVER TAKEN 10aec9: b8 74 00 00 00 mov $0x74,%eax 10aece: 83 fb 02 cmp $0x2,%ebx 10aed1: 76 1a jbe 10aeed <== ALWAYS TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10aed3: 83 ec 0c sub $0xc,%esp 10aed6: a1 c0 72 12 00 mov 0x1272c0,%eax 10aedb: ff 70 34 pushl 0x34(%eax) 10aede: e8 11 00 00 00 call 10aef4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10aee3: 83 c4 10 add $0x10,%esp 10aee6: eb 05 jmp 10aeed 10aee8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10aeed: 8d 65 f8 lea -0x8(%ebp),%esp 10aef0: 5b pop %ebx 10aef1: 5e pop %esi 10aef2: c9 leave 10aef3: c3 ret 0010afcc : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10afcc: 55 push %ebp 10afcd: 89 e5 mov %esp,%ebp 10afcf: 53 push %ebx 10afd0: 83 ec 14 sub $0x14,%esp 10afd3: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10afd6: 85 c0 test %eax,%eax 10afd8: 74 3a je 10b014 <== NEVER TAKEN 10afda: 52 push %edx 10afdb: 8d 55 f4 lea -0xc(%ebp),%edx 10afde: 52 push %edx 10afdf: ff 30 pushl (%eax) 10afe1: 68 2c 74 12 00 push $0x12742c 10afe6: e8 f9 23 00 00 call 10d3e4 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10afeb: 83 c4 10 add $0x10,%esp 10afee: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aff2: 75 20 jne 10b014 <== NEVER TAKEN case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10aff4: 83 ec 0c sub $0xc,%esp 10aff7: 83 c0 10 add $0x10,%eax 10affa: 50 push %eax 10affb: e8 cc 19 00 00 call 10c9cc <_CORE_RWLock_Release> 10b000: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b002: e8 ce 2b 00 00 call 10dbd5 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10b007: 89 1c 24 mov %ebx,(%esp) 10b00a: e8 e5 fe ff ff call 10aef4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 10b00f: 83 c4 10 add $0x10,%esp 10b012: eb 05 jmp 10b019 10b014: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b019: 8b 5d fc mov -0x4(%ebp),%ebx 10b01c: c9 leave 10b01d: c3 ret 0010b624 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10b624: 55 push %ebp 10b625: 89 e5 mov %esp,%ebp 10b627: 8b 45 08 mov 0x8(%ebp),%eax 10b62a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b62d: 85 c0 test %eax,%eax 10b62f: 74 11 je 10b642 return EINVAL; if ( !attr->is_initialized ) 10b631: 83 38 00 cmpl $0x0,(%eax) 10b634: 74 0c je 10b642 return EINVAL; switch ( pshared ) { 10b636: 83 fa 01 cmp $0x1,%edx 10b639: 77 07 ja 10b642 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b63b: 89 50 04 mov %edx,0x4(%eax) 10b63e: 31 c0 xor %eax,%eax return 0; 10b640: eb 05 jmp 10b647 10b642: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b647: c9 leave 10b648: c3 ret 0010c5f8 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10c5f8: 55 push %ebp 10c5f9: 89 e5 mov %esp,%ebp 10c5fb: 57 push %edi 10c5fc: 56 push %esi 10c5fd: 53 push %ebx 10c5fe: 83 ec 2c sub $0x2c,%esp 10c601: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10c604: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp) 10c60b: 85 f6 test %esi,%esi 10c60d: 0f 84 ff 00 00 00 je 10c712 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10c613: 8d 45 e0 lea -0x20(%ebp),%eax 10c616: 50 push %eax 10c617: 8d 45 e4 lea -0x1c(%ebp),%eax 10c61a: 50 push %eax 10c61b: 56 push %esi 10c61c: ff 75 0c pushl 0xc(%ebp) 10c61f: e8 48 4d 00 00 call 11136c <_POSIX_Thread_Translate_sched_param> 10c624: 89 45 d4 mov %eax,-0x2c(%ebp) policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10c627: 83 c4 10 add $0x10,%esp 10c62a: 85 c0 test %eax,%eax 10c62c: 0f 85 e0 00 00 00 jne 10c712 10c632: 53 push %ebx 10c633: 8d 45 dc lea -0x24(%ebp),%eax 10c636: 50 push %eax 10c637: ff 75 08 pushl 0x8(%ebp) 10c63a: 68 ac 94 12 00 push $0x1294ac 10c63f: e8 28 1c 00 00 call 10e26c <_Objects_Get> 10c644: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10c646: 83 c4 10 add $0x10,%esp 10c649: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10c64d: 74 0c je 10c65b 10c64f: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp) 10c656: e9 b7 00 00 00 jmp 10c712 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c65b: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx if ( api->schedpolicy == SCHED_SPORADIC ) 10c661: 83 bb 80 00 00 00 04 cmpl $0x4,0x80(%ebx) 10c668: 75 18 jne 10c682 (void) _Watchdog_Remove( &api->Sporadic_timer ); 10c66a: 83 ec 0c sub $0xc,%esp 10c66d: 8d 83 a4 00 00 00 lea 0xa4(%ebx),%eax 10c673: 50 push %eax 10c674: 89 55 d0 mov %edx,-0x30(%ebp) 10c677: e8 0c 34 00 00 call 10fa88 <_Watchdog_Remove> 10c67c: 83 c4 10 add $0x10,%esp 10c67f: 8b 55 d0 mov -0x30(%ebp),%edx api->schedpolicy = policy; 10c682: 8b 45 0c mov 0xc(%ebp),%eax 10c685: 89 83 80 00 00 00 mov %eax,0x80(%ebx) api->schedparam = *param; 10c68b: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi 10c691: b9 07 00 00 00 mov $0x7,%ecx 10c696: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10c698: 8b 45 e4 mov -0x1c(%ebp),%eax 10c69b: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10c69e: 8b 45 e0 mov -0x20(%ebp),%eax 10c6a1: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10c6a7: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10c6ab: 78 60 js 10c70d <== NEVER TAKEN 10c6ad: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10c6b1: 7e 08 jle 10c6bb 10c6b3: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10c6b7: 75 54 jne 10c70d <== NEVER TAKEN 10c6b9: eb 24 jmp 10c6df case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c6bb: a1 10 92 12 00 mov 0x129210,%eax 10c6c0: 89 42 78 mov %eax,0x78(%edx) 10c6c3: 0f b6 05 18 52 12 00 movzbl 0x125218,%eax 10c6ca: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax the_thread->real_priority = 10c6d0: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10c6d3: 51 push %ecx 10c6d4: 6a 01 push $0x1 10c6d6: 50 push %eax 10c6d7: 52 push %edx 10c6d8: e8 e3 1e 00 00 call 10e5c0 <_Thread_Change_priority> 10c6dd: eb 2b jmp 10c70a true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10c6df: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10c6e5: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) _Watchdog_Remove( &api->Sporadic_timer ); 10c6eb: 83 ec 0c sub $0xc,%esp 10c6ee: 81 c3 a4 00 00 00 add $0xa4,%ebx 10c6f4: 53 push %ebx 10c6f5: 89 55 d0 mov %edx,-0x30(%ebp) 10c6f8: e8 8b 33 00 00 call 10fa88 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10c6fd: 58 pop %eax 10c6fe: 5a pop %edx 10c6ff: 8b 55 d0 mov -0x30(%ebp),%edx 10c702: 52 push %edx 10c703: 6a 00 push $0x0 10c705: e8 5d fe ff ff call 10c567 <_POSIX_Threads_Sporadic_budget_TSR> 10c70a: 83 c4 10 add $0x10,%esp break; } _Thread_Enable_dispatch(); 10c70d: e8 4b 23 00 00 call 10ea5d <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10c712: 8b 45 d4 mov -0x2c(%ebp),%eax 10c715: 8d 65 f4 lea -0xc(%ebp),%esp 10c718: 5b pop %ebx 10c719: 5e pop %esi 10c71a: 5f pop %edi 10c71b: c9 leave 10c71c: c3 ret 0010a4c4 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10a4c4: 55 push %ebp 10a4c5: 89 e5 mov %esp,%ebp 10a4c7: 53 push %ebx 10a4c8: 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() ) 10a4cb: a1 74 62 12 00 mov 0x126274,%eax 10a4d0: 85 c0 test %eax,%eax 10a4d2: 75 48 jne 10a51c <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a4d4: a1 98 62 12 00 mov 0x126298,%eax 10a4d9: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10a4df: 8b 15 dc 61 12 00 mov 0x1261dc,%edx 10a4e5: 42 inc %edx 10a4e6: 89 15 dc 61 12 00 mov %edx,0x1261dc _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a4ec: 31 db xor %ebx,%ebx 10a4ee: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10a4f5: 75 0a jne 10a501 <== 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)); 10a4f7: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax) 10a4fe: 0f 95 c3 setne %bl thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a501: e8 6f 22 00 00 call 10c775 <_Thread_Enable_dispatch> if ( cancel ) 10a506: 84 db test %bl,%bl 10a508: 74 12 je 10a51c _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10a50a: 50 push %eax 10a50b: 50 push %eax 10a50c: 6a ff push $0xffffffff 10a50e: ff 35 98 62 12 00 pushl 0x126298 10a514: e8 e7 4c 00 00 call 10f200 <_POSIX_Thread_Exit> 10a519: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a51c: 8b 5d fc mov -0x4(%ebp),%ebx 10a51f: c9 leave 10a520: c3 ret 0010c550 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c550: 55 push %ebp 10c551: 89 e5 mov %esp,%ebp 10c553: 57 push %edi 10c554: 56 push %esi 10c555: 53 push %ebx 10c556: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c559: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c55d: 74 41 je 10c5a0 <== NEVER TAKEN 10c55f: 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 ] ) 10c564: 8b 04 9d ac ef 12 00 mov 0x12efac(,%ebx,4),%eax 10c56b: 85 c0 test %eax,%eax 10c56d: 74 2b je 10c59a continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10c56f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c572: be 01 00 00 00 mov $0x1,%esi 10c577: 85 ff test %edi,%edi 10c579: 75 17 jne 10c592 10c57b: eb 1d jmp 10c59a continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c57d: 8b 47 1c mov 0x1c(%edi),%eax 10c580: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c583: 85 c0 test %eax,%eax 10c585: 74 0a je 10c591 <== NEVER TAKEN continue; (*routine)(the_thread); 10c587: 83 ec 0c sub $0xc,%esp 10c58a: 50 push %eax 10c58b: ff 55 08 call *0x8(%ebp) 10c58e: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c591: 46 inc %esi 10c592: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c596: 39 c6 cmp %eax,%esi 10c598: 76 e3 jbe 10c57d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c59a: 43 inc %ebx 10c59b: 83 fb 05 cmp $0x5,%ebx 10c59e: 75 c4 jne 10c564 (*routine)(the_thread); } } } 10c5a0: 8d 65 f4 lea -0xc(%ebp),%esp 10c5a3: 5b pop %ebx 10c5a4: 5e pop %esi 10c5a5: 5f pop %edi 10c5a6: c9 leave 10c5a7: c3 ret 00114910 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114910: 55 push %ebp 114911: 89 e5 mov %esp,%ebp 114913: 57 push %edi 114914: 56 push %esi 114915: 53 push %ebx 114916: 83 ec 1c sub $0x1c,%esp 114919: 8b 75 0c mov 0xc(%ebp),%esi 11491c: 8b 55 10 mov 0x10(%ebp),%edx 11491f: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114922: b8 03 00 00 00 mov $0x3,%eax 114927: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 11492b: 0f 84 cf 00 00 00 je 114a00 return RTEMS_INVALID_NAME; if ( !starting_address ) 114931: 85 f6 test %esi,%esi 114933: 0f 84 bb 00 00 00 je 1149f4 return RTEMS_INVALID_ADDRESS; if ( !id ) 114939: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 11493d: 0f 84 b1 00 00 00 je 1149f4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114943: 85 ff test %edi,%edi 114945: 0f 84 b0 00 00 00 je 1149fb 11494b: 85 d2 test %edx,%edx 11494d: 0f 84 a8 00 00 00 je 1149fb 114953: 39 fa cmp %edi,%edx 114955: 0f 82 a0 00 00 00 jb 1149fb 11495b: f7 c7 03 00 00 00 test $0x3,%edi 114961: 0f 85 94 00 00 00 jne 1149fb !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114967: f7 c6 03 00 00 00 test $0x3,%esi 11496d: 0f 85 81 00 00 00 jne 1149f4 114973: a1 e8 e5 13 00 mov 0x13e5e8,%eax 114978: 40 inc %eax 114979: a3 e8 e5 13 00 mov %eax,0x13e5e8 * 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 ); 11497e: 83 ec 0c sub $0xc,%esp 114981: 68 70 e4 13 00 push $0x13e470 114986: 89 55 e4 mov %edx,-0x1c(%ebp) 114989: e8 92 3c 00 00 call 118620 <_Objects_Allocate> 11498e: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 114990: 83 c4 10 add $0x10,%esp 114993: 85 c0 test %eax,%eax 114995: 8b 55 e4 mov -0x1c(%ebp),%edx 114998: 75 0c jne 1149a6 _Thread_Enable_dispatch(); 11499a: e8 36 49 00 00 call 1192d5 <_Thread_Enable_dispatch> 11499f: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1149a4: eb 5a jmp 114a00 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1149a6: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1149a9: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1149ac: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1149af: 8b 45 18 mov 0x18(%ebp),%eax 1149b2: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 1149b5: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 1149bc: 57 push %edi 1149bd: 89 d0 mov %edx,%eax 1149bf: 31 d2 xor %edx,%edx 1149c1: f7 f7 div %edi 1149c3: 50 push %eax 1149c4: 56 push %esi 1149c5: 8d 43 24 lea 0x24(%ebx),%eax 1149c8: 50 push %eax 1149c9: e8 9a 2a 00 00 call 117468 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1149ce: 8b 43 08 mov 0x8(%ebx),%eax 1149d1: 0f b7 c8 movzwl %ax,%ecx 1149d4: 8b 15 8c e4 13 00 mov 0x13e48c,%edx 1149da: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1149dd: 8b 55 08 mov 0x8(%ebp),%edx 1149e0: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1149e3: 8b 55 1c mov 0x1c(%ebp),%edx 1149e6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1149e8: e8 e8 48 00 00 call 1192d5 <_Thread_Enable_dispatch> 1149ed: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1149ef: 83 c4 10 add $0x10,%esp 1149f2: eb 0c jmp 114a00 1149f4: b8 09 00 00 00 mov $0x9,%eax 1149f9: eb 05 jmp 114a00 1149fb: b8 08 00 00 00 mov $0x8,%eax } 114a00: 8d 65 f4 lea -0xc(%ebp),%esp 114a03: 5b pop %ebx 114a04: 5e pop %esi 114a05: 5f pop %edi 114a06: c9 leave 114a07: c3 ret 0010ae6d : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10ae6d: 55 push %ebp 10ae6e: 89 e5 mov %esp,%ebp 10ae70: 57 push %edi 10ae71: 56 push %esi 10ae72: 53 push %ebx 10ae73: 83 ec 30 sub $0x30,%esp 10ae76: 8b 75 08 mov 0x8(%ebp),%esi 10ae79: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 10ae7c: 8d 45 e4 lea -0x1c(%ebp),%eax 10ae7f: 50 push %eax 10ae80: 56 push %esi 10ae81: 68 20 72 12 00 push $0x127220 10ae86: e8 79 1d 00 00 call 10cc04 <_Objects_Get> 10ae8b: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10ae8d: 83 c4 10 add $0x10,%esp 10ae90: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10ae94: 0f 85 40 01 00 00 jne 10afda case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10ae9a: 8b 40 40 mov 0x40(%eax),%eax 10ae9d: 3b 05 d4 73 12 00 cmp 0x1273d4,%eax 10aea3: 74 0f je 10aeb4 _Thread_Enable_dispatch(); 10aea5: e8 4b 25 00 00 call 10d3f5 <_Thread_Enable_dispatch> 10aeaa: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 10aeaf: e9 2b 01 00 00 jmp 10afdf } if ( length == RTEMS_PERIOD_STATUS ) { 10aeb4: 85 db test %ebx,%ebx 10aeb6: 75 19 jne 10aed1 switch ( the_period->state ) { 10aeb8: 8b 47 38 mov 0x38(%edi),%eax 10aebb: 83 f8 04 cmp $0x4,%eax 10aebe: 77 07 ja 10aec7 <== NEVER TAKEN 10aec0: 8b 1c 85 84 08 12 00 mov 0x120884(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10aec7: e8 29 25 00 00 call 10d3f5 <_Thread_Enable_dispatch> return( return_value ); 10aecc: e9 0e 01 00 00 jmp 10afdf } _ISR_Disable( level ); 10aed1: 9c pushf 10aed2: fa cli 10aed3: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 10aed6: 8b 47 38 mov 0x38(%edi),%eax 10aed9: 83 f8 02 cmp $0x2,%eax 10aedc: 74 5f je 10af3d 10aede: 83 f8 04 cmp $0x4,%eax 10aee1: 0f 84 ba 00 00 00 je 10afa1 10aee7: 85 c0 test %eax,%eax 10aee9: 0f 85 eb 00 00 00 jne 10afda <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10aeef: ff 75 d4 pushl -0x2c(%ebp) 10aef2: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10aef3: 83 ec 0c sub $0xc,%esp 10aef6: 57 push %edi 10aef7: e8 9c fd ff ff call 10ac98 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10aefc: 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; 10af03: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10af0a: c7 47 2c e8 b1 10 00 movl $0x10b1e8,0x2c(%edi) the_watchdog->id = id; 10af11: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 10af14: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10af1b: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10af1e: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10af21: 5b pop %ebx 10af22: 5e pop %esi 10af23: 83 c7 10 add $0x10,%edi 10af26: 57 push %edi 10af27: 68 f4 73 12 00 push $0x1273f4 10af2c: e8 6b 34 00 00 call 10e39c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10af31: e8 bf 24 00 00 call 10d3f5 <_Thread_Enable_dispatch> 10af36: 31 db xor %ebx,%ebx 10af38: e9 98 00 00 00 jmp 10afd5 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10af3d: 83 ec 0c sub $0xc,%esp 10af40: 57 push %edi 10af41: e8 4c fe ff ff call 10ad92 <_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; 10af46: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 10af4d: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 10af50: ff 75 d4 pushl -0x2c(%ebp) 10af53: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10af54: a1 d4 73 12 00 mov 0x1273d4,%eax 10af59: 8b 57 08 mov 0x8(%edi),%edx 10af5c: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10af5f: 5a pop %edx 10af60: 59 pop %ecx 10af61: 68 00 40 00 00 push $0x4000 10af66: 50 push %eax 10af67: e8 c4 2c 00 00 call 10dc30 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10af6c: 9c pushf 10af6d: fa cli 10af6e: 5a pop %edx local_state = the_period->state; 10af6f: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 10af72: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 10af79: 52 push %edx 10af7a: 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 ) 10af7b: 83 c4 10 add $0x10,%esp 10af7e: 83 f8 03 cmp $0x3,%eax 10af81: 75 15 jne 10af98 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10af83: 56 push %esi 10af84: 56 push %esi 10af85: 68 00 40 00 00 push $0x4000 10af8a: ff 35 d4 73 12 00 pushl 0x1273d4 10af90: e8 e3 20 00 00 call 10d078 <_Thread_Clear_state> 10af95: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 10af98: e8 58 24 00 00 call 10d3f5 <_Thread_Enable_dispatch> 10af9d: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 10af9f: eb 3e jmp 10afdf case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10afa1: 83 ec 0c sub $0xc,%esp 10afa4: 57 push %edi 10afa5: e8 e8 fd ff ff call 10ad92 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10afaa: ff 75 d4 pushl -0x2c(%ebp) 10afad: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10afae: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 10afb5: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10afb8: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10afbb: 59 pop %ecx 10afbc: 5b pop %ebx 10afbd: 83 c7 10 add $0x10,%edi 10afc0: 57 push %edi 10afc1: 68 f4 73 12 00 push $0x1273f4 10afc6: e8 d1 33 00 00 call 10e39c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10afcb: e8 25 24 00 00 call 10d3f5 <_Thread_Enable_dispatch> 10afd0: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 10afd5: 83 c4 10 add $0x10,%esp 10afd8: eb 05 jmp 10afdf 10afda: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10afdf: 89 d8 mov %ebx,%eax 10afe1: 8d 65 f4 lea -0xc(%ebp),%esp 10afe4: 5b pop %ebx 10afe5: 5e pop %esi 10afe6: 5f pop %edi 10afe7: c9 leave 10afe8: c3 ret 0010afec : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10afec: 55 push %ebp 10afed: 89 e5 mov %esp,%ebp 10afef: 57 push %edi 10aff0: 56 push %esi 10aff1: 53 push %ebx 10aff2: 83 ec 7c sub $0x7c,%esp 10aff5: 8b 5d 08 mov 0x8(%ebp),%ebx 10aff8: 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 ) 10affb: 85 ff test %edi,%edi 10affd: 0f 84 2b 01 00 00 je 10b12e <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b003: 52 push %edx 10b004: 52 push %edx 10b005: 68 98 08 12 00 push $0x120898 10b00a: 53 push %ebx 10b00b: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10b00d: 5e pop %esi 10b00e: 58 pop %eax 10b00f: 68 b6 08 12 00 push $0x1208b6 10b014: 53 push %ebx 10b015: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 10b017: 5a pop %edx 10b018: 59 pop %ecx 10b019: 68 d8 08 12 00 push $0x1208d8 10b01e: 53 push %ebx 10b01f: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b021: 5e pop %esi 10b022: 58 pop %eax 10b023: 68 fb 08 12 00 push $0x1208fb 10b028: 53 push %ebx 10b029: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10b02b: 5a pop %edx 10b02c: 59 pop %ecx 10b02d: 68 46 09 12 00 push $0x120946 10b032: 53 push %ebx 10b033: 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 ; 10b035: 8b 35 28 72 12 00 mov 0x127228,%esi 10b03b: 83 c4 10 add $0x10,%esp 10b03e: e9 df 00 00 00 jmp 10b122 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b043: 50 push %eax 10b044: 50 push %eax 10b045: 8d 45 88 lea -0x78(%ebp),%eax 10b048: 50 push %eax 10b049: 56 push %esi 10b04a: e8 85 51 00 00 call 1101d4 if ( status != RTEMS_SUCCESSFUL ) 10b04f: 83 c4 10 add $0x10,%esp 10b052: 85 c0 test %eax,%eax 10b054: 0f 85 c7 00 00 00 jne 10b121 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10b05a: 51 push %ecx 10b05b: 51 push %ecx 10b05c: 8d 55 c0 lea -0x40(%ebp),%edx 10b05f: 52 push %edx 10b060: 56 push %esi 10b061: e8 12 52 00 00 call 110278 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b066: 83 c4 0c add $0xc,%esp 10b069: 8d 45 e3 lea -0x1d(%ebp),%eax 10b06c: 50 push %eax 10b06d: 6a 05 push $0x5 10b06f: ff 75 c0 pushl -0x40(%ebp) 10b072: e8 fd 01 00 00 call 10b274 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b077: 58 pop %eax 10b078: 5a pop %edx 10b079: ff 75 8c pushl -0x74(%ebp) 10b07c: ff 75 88 pushl -0x78(%ebp) 10b07f: 8d 55 e3 lea -0x1d(%ebp),%edx 10b082: 52 push %edx 10b083: 56 push %esi 10b084: 68 92 09 12 00 push $0x120992 10b089: 53 push %ebx 10b08a: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b08c: 8b 45 88 mov -0x78(%ebp),%eax 10b08f: 83 c4 20 add $0x20,%esp 10b092: 85 c0 test %eax,%eax 10b094: 75 0f jne 10b0a5 (*print)( context, "\n" ); 10b096: 51 push %ecx 10b097: 51 push %ecx 10b098: 68 0c 0c 12 00 push $0x120c0c 10b09d: 53 push %ebx 10b09e: ff d7 call *%edi continue; 10b0a0: 83 c4 10 add $0x10,%esp 10b0a3: eb 7c jmp 10b121 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 ); 10b0a5: 52 push %edx 10b0a6: 8d 55 d8 lea -0x28(%ebp),%edx 10b0a9: 52 push %edx 10b0aa: 50 push %eax 10b0ab: 8d 45 a0 lea -0x60(%ebp),%eax 10b0ae: 50 push %eax 10b0af: e8 bc 2f 00 00 call 10e070 <_Timespec_Divide_by_integer> (*print)( context, 10b0b4: 8b 45 dc mov -0x24(%ebp),%eax 10b0b7: b9 e8 03 00 00 mov $0x3e8,%ecx 10b0bc: 99 cltd 10b0bd: f7 f9 idiv %ecx 10b0bf: 50 push %eax 10b0c0: ff 75 d8 pushl -0x28(%ebp) 10b0c3: 8b 45 9c mov -0x64(%ebp),%eax 10b0c6: 99 cltd 10b0c7: f7 f9 idiv %ecx 10b0c9: 50 push %eax 10b0ca: ff 75 98 pushl -0x68(%ebp) 10b0cd: 8b 45 94 mov -0x6c(%ebp),%eax 10b0d0: 99 cltd 10b0d1: f7 f9 idiv %ecx 10b0d3: 50 push %eax 10b0d4: ff 75 90 pushl -0x70(%ebp) 10b0d7: 68 a9 09 12 00 push $0x1209a9 10b0dc: 53 push %ebx 10b0dd: 89 4d 84 mov %ecx,-0x7c(%ebp) 10b0e0: 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); 10b0e2: 83 c4 2c add $0x2c,%esp 10b0e5: 8d 55 d8 lea -0x28(%ebp),%edx 10b0e8: 52 push %edx 10b0e9: ff 75 88 pushl -0x78(%ebp) 10b0ec: 8d 45 b8 lea -0x48(%ebp),%eax 10b0ef: 50 push %eax 10b0f0: e8 7b 2f 00 00 call 10e070 <_Timespec_Divide_by_integer> (*print)( context, 10b0f5: 8b 45 dc mov -0x24(%ebp),%eax 10b0f8: 8b 4d 84 mov -0x7c(%ebp),%ecx 10b0fb: 99 cltd 10b0fc: f7 f9 idiv %ecx 10b0fe: 50 push %eax 10b0ff: ff 75 d8 pushl -0x28(%ebp) 10b102: 8b 45 b4 mov -0x4c(%ebp),%eax 10b105: 99 cltd 10b106: f7 f9 idiv %ecx 10b108: 50 push %eax 10b109: ff 75 b0 pushl -0x50(%ebp) 10b10c: 8b 45 ac mov -0x54(%ebp),%eax 10b10f: 99 cltd 10b110: f7 f9 idiv %ecx 10b112: 50 push %eax 10b113: ff 75 a8 pushl -0x58(%ebp) 10b116: 68 c8 09 12 00 push $0x1209c8 10b11b: 53 push %ebx 10b11c: ff d7 call *%edi 10b11e: 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++ ) { 10b121: 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 ; 10b122: 3b 35 2c 72 12 00 cmp 0x12722c,%esi 10b128: 0f 86 15 ff ff ff jbe 10b043 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b12e: 8d 65 f4 lea -0xc(%ebp),%esp 10b131: 5b pop %ebx 10b132: 5e pop %esi 10b133: 5f pop %edi 10b134: c9 leave 10b135: c3 ret 00115cb8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 115cb8: 55 push %ebp 115cb9: 89 e5 mov %esp,%ebp 115cbb: 53 push %ebx 115cbc: 83 ec 14 sub $0x14,%esp 115cbf: 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 ) 115cc2: b8 0a 00 00 00 mov $0xa,%eax 115cc7: 85 db test %ebx,%ebx 115cc9: 74 71 je 115d3c return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 115ccb: 50 push %eax 115ccc: 50 push %eax 115ccd: 8d 45 f4 lea -0xc(%ebp),%eax 115cd0: 50 push %eax 115cd1: ff 75 08 pushl 0x8(%ebp) 115cd4: e8 4b 36 00 00 call 119324 <_Thread_Get> 115cd9: 89 c1 mov %eax,%ecx switch ( location ) { 115cdb: 83 c4 10 add $0x10,%esp 115cde: b8 04 00 00 00 mov $0x4,%eax 115ce3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115ce7: 75 53 jne 115d3c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 115ce9: 8b 91 f4 00 00 00 mov 0xf4(%ecx),%edx asr = &api->Signal; 115cef: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 115cf3: 74 3d je 115d32 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 115cf5: 80 7a 08 00 cmpb $0x0,0x8(%edx) 115cf9: 74 26 je 115d21 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115cfb: 9c pushf 115cfc: fa cli 115cfd: 58 pop %eax *signal_set |= signals; 115cfe: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 115d01: 50 push %eax 115d02: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 115d03: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 115d07: a1 80 e6 13 00 mov 0x13e680,%eax 115d0c: 85 c0 test %eax,%eax 115d0e: 74 19 je 115d29 115d10: 3b 0d a4 e6 13 00 cmp 0x13e6a4,%ecx 115d16: 75 11 jne 115d29 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 115d18: c6 05 38 e7 13 00 01 movb $0x1,0x13e738 115d1f: eb 08 jmp 115d29 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115d21: 9c pushf 115d22: fa cli 115d23: 58 pop %eax *signal_set |= signals; 115d24: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115d27: 50 push %eax 115d28: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115d29: e8 a7 35 00 00 call 1192d5 <_Thread_Enable_dispatch> 115d2e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115d30: eb 0a jmp 115d3c } _Thread_Enable_dispatch(); 115d32: e8 9e 35 00 00 call 1192d5 <_Thread_Enable_dispatch> 115d37: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115d3c: 8b 5d fc mov -0x4(%ebp),%ebx 115d3f: c9 leave 115d40: c3 ret 00110748 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 110748: 55 push %ebp 110749: 89 e5 mov %esp,%ebp 11074b: 57 push %edi 11074c: 56 push %esi 11074d: 53 push %ebx 11074e: 83 ec 1c sub $0x1c,%esp 110751: 8b 4d 10 mov 0x10(%ebp),%ecx ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 110754: b8 09 00 00 00 mov $0x9,%eax 110759: 85 c9 test %ecx,%ecx 11075b: 0f 84 f4 00 00 00 je 110855 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 110761: 8b 1d b0 42 12 00 mov 0x1242b0,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 110767: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 11076d: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 110771: 19 ff sbb %edi,%edi 110773: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 110779: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 11077d: 74 06 je 110785 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 11077f: 81 cf 00 02 00 00 or $0x200,%edi if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 110785: 80 7e 08 01 cmpb $0x1,0x8(%esi) 110789: 19 d2 sbb %edx,%edx 11078b: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 110791: 89 55 e4 mov %edx,-0x1c(%ebp) 110794: 89 4d e0 mov %ecx,-0x20(%ebp) 110797: e8 6f c7 ff ff call 10cf0b <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 11079c: 8b 55 e4 mov -0x1c(%ebp),%edx 11079f: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 1107a1: 09 f8 or %edi,%eax 1107a3: 8b 4d e0 mov -0x20(%ebp),%ecx 1107a6: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 1107a8: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1107af: 74 0f je 1107c0 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1107b1: 8b 45 08 mov 0x8(%ebp),%eax 1107b4: c1 e8 08 shr $0x8,%eax 1107b7: 83 f0 01 xor $0x1,%eax 1107ba: 83 e0 01 and $0x1,%eax 1107bd: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1107c0: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1107c7: 74 21 je 1107ea if ( _Modes_Is_timeslice(mode_set) ) { 1107c9: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1107d0: 74 11 je 1107e3 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1107d2: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1107d9: a1 c0 41 12 00 mov 0x1241c0,%eax 1107de: 89 43 78 mov %eax,0x78(%ebx) 1107e1: eb 07 jmp 1107ea } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1107e3: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 1107ea: f6 45 0c 01 testb $0x1,0xc(%ebp) 1107ee: 74 0a je 1107fa */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 1107f0: f6 45 08 01 testb $0x1,0x8(%ebp) 1107f4: 74 03 je 1107f9 1107f6: fa cli 1107f7: eb 01 jmp 1107fa 1107f9: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1107fa: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 110801: 74 33 je 110836 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 110803: 8b 45 08 mov 0x8(%ebp),%eax 110806: c1 e8 0a shr $0xa,%eax 110809: 83 f0 01 xor $0x1,%eax 11080c: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 11080f: 3a 46 08 cmp 0x8(%esi),%al 110812: 74 22 je 110836 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 110814: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 110817: 9c pushf 110818: fa cli 110819: 58 pop %eax _signals = information->signals_pending; 11081a: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 11081d: 8b 4e 14 mov 0x14(%esi),%ecx 110820: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 110823: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 110826: 50 push %eax 110827: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 110828: 83 7e 14 00 cmpl $0x0,0x14(%esi) 11082c: 74 08 je 110836 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 11082e: c6 43 74 01 movb $0x1,0x74(%ebx) 110832: b3 01 mov $0x1,%bl 110834: eb 02 jmp 110838 110836: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 110838: 83 3d 8c 43 12 00 03 cmpl $0x3,0x12438c 11083f: 75 12 jne 110853 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 110841: e8 06 02 00 00 call 110a4c <_Thread_Evaluate_mode> 110846: 84 c0 test %al,%al 110848: 75 04 jne 11084e 11084a: 84 db test %bl,%bl 11084c: 74 05 je 110853 _Thread_Dispatch(); 11084e: e8 19 b3 ff ff call 10bb6c <_Thread_Dispatch> 110853: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110855: 83 c4 1c add $0x1c,%esp 110858: 5b pop %ebx 110859: 5e pop %esi 11085a: 5f pop %edi 11085b: c9 leave 11085c: c3 ret 0010e178 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10e178: 55 push %ebp 10e179: 89 e5 mov %esp,%ebp 10e17b: 56 push %esi 10e17c: 53 push %ebx 10e17d: 83 ec 10 sub $0x10,%esp 10e180: 8b 5d 0c mov 0xc(%ebp),%ebx 10e183: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10e186: 85 db test %ebx,%ebx 10e188: 74 10 je 10e19a 10e18a: 0f b6 05 f4 51 12 00 movzbl 0x1251f4,%eax 10e191: ba 13 00 00 00 mov $0x13,%edx 10e196: 39 c3 cmp %eax,%ebx 10e198: 77 50 ja 10e1ea !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e19a: ba 09 00 00 00 mov $0x9,%edx 10e19f: 85 f6 test %esi,%esi 10e1a1: 74 47 je 10e1ea return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e1a3: 51 push %ecx 10e1a4: 51 push %ecx 10e1a5: 8d 45 f4 lea -0xc(%ebp),%eax 10e1a8: 50 push %eax 10e1a9: ff 75 08 pushl 0x8(%ebp) 10e1ac: e8 f3 1b 00 00 call 10fda4 <_Thread_Get> switch ( location ) { 10e1b1: 83 c4 10 add $0x10,%esp 10e1b4: ba 04 00 00 00 mov $0x4,%edx 10e1b9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e1bd: 75 2b jne 10e1ea case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e1bf: 8b 50 14 mov 0x14(%eax),%edx 10e1c2: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e1c4: 85 db test %ebx,%ebx 10e1c6: 74 1b je 10e1e3 the_thread->real_priority = new_priority; 10e1c8: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e1cb: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e1cf: 74 05 je 10e1d6 the_thread->current_priority > new_priority ) 10e1d1: 39 58 14 cmp %ebx,0x14(%eax) 10e1d4: 76 0d jbe 10e1e3 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e1d6: 52 push %edx 10e1d7: 6a 00 push $0x0 10e1d9: 53 push %ebx 10e1da: 50 push %eax 10e1db: e8 d8 16 00 00 call 10f8b8 <_Thread_Change_priority> 10e1e0: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e1e3: e8 6d 1b 00 00 call 10fd55 <_Thread_Enable_dispatch> 10e1e8: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e1ea: 89 d0 mov %edx,%eax 10e1ec: 8d 65 f8 lea -0x8(%ebp),%esp 10e1ef: 5b pop %ebx 10e1f0: 5e pop %esi 10e1f1: c9 leave 10e1f2: c3 ret 00116500 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 116500: 55 push %ebp 116501: 89 e5 mov %esp,%ebp 116503: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 116506: 8d 45 f4 lea -0xc(%ebp),%eax 116509: 50 push %eax 11650a: ff 75 08 pushl 0x8(%ebp) 11650d: 68 34 ef 13 00 push $0x13ef34 116512: e8 59 25 00 00 call 118a70 <_Objects_Get> 116517: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116519: 83 c4 10 add $0x10,%esp 11651c: b8 04 00 00 00 mov $0x4,%eax 116521: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116525: 75 1c jne 116543 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 116527: 83 7a 38 04 cmpl $0x4,0x38(%edx) 11652b: 74 0f je 11653c <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 11652d: 83 ec 0c sub $0xc,%esp 116530: 83 c2 10 add $0x10,%edx 116533: 52 push %edx 116534: e8 13 40 00 00 call 11a54c <_Watchdog_Remove> 116539: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 11653c: e8 94 2d 00 00 call 1192d5 <_Thread_Enable_dispatch> 116541: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116543: c9 leave 116544: c3 ret 00116968 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116968: 55 push %ebp 116969: 89 e5 mov %esp,%ebp 11696b: 57 push %edi 11696c: 56 push %esi 11696d: 53 push %ebx 11696e: 83 ec 1c sub $0x1c,%esp 116971: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116974: 8b 35 74 ef 13 00 mov 0x13ef74,%esi if ( !timer_server ) 11697a: b8 0e 00 00 00 mov $0xe,%eax 11697f: 85 f6 test %esi,%esi 116981: 0f 84 b4 00 00 00 je 116a3b return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 116987: b0 0b mov $0xb,%al 116989: 80 3d fc e5 13 00 00 cmpb $0x0,0x13e5fc 116990: 0f 84 a5 00 00 00 je 116a3b <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 116996: b0 09 mov $0x9,%al 116998: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11699c: 0f 84 99 00 00 00 je 116a3b return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1169a2: 83 ec 0c sub $0xc,%esp 1169a5: 53 push %ebx 1169a6: e8 61 d6 ff ff call 11400c <_TOD_Validate> 1169ab: 83 c4 10 add $0x10,%esp 1169ae: 84 c0 test %al,%al 1169b0: 0f 84 80 00 00 00 je 116a36 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1169b6: 83 ec 0c sub $0xc,%esp 1169b9: 53 push %ebx 1169ba: e8 e5 d5 ff ff call 113fa4 <_TOD_To_seconds> 1169bf: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1169c1: 83 c4 10 add $0x10,%esp 1169c4: 3b 05 78 e6 13 00 cmp 0x13e678,%eax 1169ca: 76 6a jbe 116a36 1169cc: 51 push %ecx 1169cd: 8d 45 e4 lea -0x1c(%ebp),%eax 1169d0: 50 push %eax 1169d1: ff 75 08 pushl 0x8(%ebp) 1169d4: 68 34 ef 13 00 push $0x13ef34 1169d9: e8 92 20 00 00 call 118a70 <_Objects_Get> 1169de: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1169e0: 83 c4 10 add $0x10,%esp 1169e3: b8 04 00 00 00 mov $0x4,%eax 1169e8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1169ec: 75 4d jne 116a3b case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1169ee: 83 ec 0c sub $0xc,%esp 1169f1: 8d 43 10 lea 0x10(%ebx),%eax 1169f4: 50 push %eax 1169f5: e8 52 3b 00 00 call 11a54c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 1169fa: 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; 116a01: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116a08: 8b 45 10 mov 0x10(%ebp),%eax 116a0b: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 116a0e: 8b 45 08 mov 0x8(%ebp),%eax 116a11: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 116a14: 8b 45 14 mov 0x14(%ebp),%eax 116a17: 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(); 116a1a: 2b 3d 78 e6 13 00 sub 0x13e678,%edi 116a20: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 116a23: 58 pop %eax 116a24: 5a pop %edx 116a25: 53 push %ebx 116a26: 56 push %esi 116a27: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 116a2a: e8 a6 28 00 00 call 1192d5 <_Thread_Enable_dispatch> 116a2f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116a31: 83 c4 10 add $0x10,%esp 116a34: eb 05 jmp 116a3b 116a36: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a3b: 8d 65 f4 lea -0xc(%ebp),%esp 116a3e: 5b pop %ebx 116a3f: 5e pop %esi 116a40: 5f pop %edi 116a41: c9 leave 116a42: c3 ret 0010a754 : #include int sched_get_priority_max( int policy ) { 10a754: 55 push %ebp 10a755: 89 e5 mov %esp,%ebp 10a757: 83 ec 08 sub $0x8,%esp 10a75a: 8b 4d 08 mov 0x8(%ebp),%ecx switch ( policy ) { 10a75d: 83 f9 04 cmp $0x4,%ecx 10a760: 77 0b ja 10a76d 10a762: b8 01 00 00 00 mov $0x1,%eax 10a767: d3 e0 shl %cl,%eax 10a769: a8 17 test $0x17,%al 10a76b: 75 10 jne 10a77d <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10a76d: e8 56 78 00 00 call 111fc8 <__errno> 10a772: c7 00 16 00 00 00 movl $0x16,(%eax) 10a778: 83 c8 ff or $0xffffffff,%eax 10a77b: eb 08 jmp 10a785 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10a77d: 0f b6 05 18 12 12 00 movzbl 0x121218,%eax 10a784: 48 dec %eax } 10a785: c9 leave 10a786: c3 ret 0010a788 : #include int sched_get_priority_min( int policy ) { 10a788: 55 push %ebp 10a789: 89 e5 mov %esp,%ebp 10a78b: 83 ec 08 sub $0x8,%esp 10a78e: 8b 4d 08 mov 0x8(%ebp),%ecx switch ( policy ) { 10a791: 83 f9 04 cmp $0x4,%ecx 10a794: 77 11 ja 10a7a7 10a796: ba 01 00 00 00 mov $0x1,%edx 10a79b: d3 e2 shl %cl,%edx 10a79d: b8 01 00 00 00 mov $0x1,%eax 10a7a2: 80 e2 17 and $0x17,%dl 10a7a5: 75 0e jne 10a7b5 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10a7a7: e8 1c 78 00 00 call 111fc8 <__errno> 10a7ac: c7 00 16 00 00 00 movl $0x16,(%eax) 10a7b2: 83 c8 ff or $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10a7b5: c9 leave 10a7b6: c3 ret 0010a7b8 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10a7b8: 55 push %ebp 10a7b9: 89 e5 mov %esp,%ebp 10a7bb: 56 push %esi 10a7bc: 53 push %ebx 10a7bd: 8b 75 08 mov 0x8(%ebp),%esi 10a7c0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10a7c3: 85 f6 test %esi,%esi 10a7c5: 74 16 je 10a7dd <== NEVER TAKEN 10a7c7: e8 ec d0 ff ff call 1078b8 10a7cc: 39 c6 cmp %eax,%esi 10a7ce: 74 0d je 10a7dd rtems_set_errno_and_return_minus_one( ESRCH ); 10a7d0: e8 f3 77 00 00 call 111fc8 <__errno> 10a7d5: c7 00 03 00 00 00 movl $0x3,(%eax) 10a7db: eb 0f jmp 10a7ec if ( !interval ) 10a7dd: 85 db test %ebx,%ebx 10a7df: 75 10 jne 10a7f1 rtems_set_errno_and_return_minus_one( EINVAL ); 10a7e1: e8 e2 77 00 00 call 111fc8 <__errno> 10a7e6: c7 00 16 00 00 00 movl $0x16,(%eax) 10a7ec: 83 c8 ff or $0xffffffff,%eax 10a7ef: eb 13 jmp 10a804 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10a7f1: 50 push %eax 10a7f2: 50 push %eax 10a7f3: 53 push %ebx 10a7f4: ff 35 b0 51 12 00 pushl 0x1251b0 10a7fa: e8 41 2f 00 00 call 10d740 <_Timespec_From_ticks> 10a7ff: 31 c0 xor %eax,%eax return 0; 10a801: 83 c4 10 add $0x10,%esp } 10a804: 8d 65 f8 lea -0x8(%ebp),%esp 10a807: 5b pop %ebx 10a808: 5e pop %esi 10a809: c9 leave 10a80a: c3 ret 0010ce38 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10ce38: 55 push %ebp 10ce39: 89 e5 mov %esp,%ebp 10ce3b: 57 push %edi 10ce3c: 56 push %esi 10ce3d: 53 push %ebx 10ce3e: 83 ec 2c sub $0x2c,%esp 10ce41: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ce44: a1 dc a3 12 00 mov 0x12a3dc,%eax 10ce49: 40 inc %eax 10ce4a: a3 dc a3 12 00 mov %eax,0x12a3dc POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10ce4f: 8b 45 0c mov 0xc(%ebp),%eax 10ce52: 25 00 02 00 00 and $0x200,%eax 10ce57: 89 45 d4 mov %eax,-0x2c(%ebp) 10ce5a: 75 04 jne 10ce60 10ce5c: 31 ff xor %edi,%edi 10ce5e: eb 03 jmp 10ce63 va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10ce60: 8b 7d 14 mov 0x14(%ebp),%edi va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10ce63: 52 push %edx 10ce64: 52 push %edx 10ce65: 8d 45 e4 lea -0x1c(%ebp),%eax 10ce68: 50 push %eax 10ce69: 56 push %esi 10ce6a: e8 9d 53 00 00 call 11220c <_POSIX_Semaphore_Name_to_id> 10ce6f: 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 ) { 10ce71: 83 c4 10 add $0x10,%esp 10ce74: 85 c0 test %eax,%eax 10ce76: 74 19 je 10ce91 /* * 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) ) ) { 10ce78: 83 f8 02 cmp $0x2,%eax 10ce7b: 75 06 jne 10ce83 <== NEVER TAKEN 10ce7d: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10ce81: 75 59 jne 10cedc _Thread_Enable_dispatch(); 10ce83: e8 99 24 00 00 call 10f321 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10ce88: e8 bb 83 00 00 call 115248 <__errno> 10ce8d: 89 18 mov %ebx,(%eax) 10ce8f: eb 1f jmp 10ceb0 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10ce91: 8b 45 0c mov 0xc(%ebp),%eax 10ce94: 25 00 0a 00 00 and $0xa00,%eax 10ce99: 3d 00 0a 00 00 cmp $0xa00,%eax 10ce9e: 75 15 jne 10ceb5 _Thread_Enable_dispatch(); 10cea0: e8 7c 24 00 00 call 10f321 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10cea5: e8 9e 83 00 00 call 115248 <__errno> 10ceaa: c7 00 11 00 00 00 movl $0x11,(%eax) 10ceb0: 83 c8 ff or $0xffffffff,%eax 10ceb3: eb 4a jmp 10ceff 10ceb5: 50 push %eax 10ceb6: 8d 45 dc lea -0x24(%ebp),%eax 10ceb9: 50 push %eax 10ceba: ff 75 e4 pushl -0x1c(%ebp) 10cebd: 68 c4 a6 12 00 push $0x12a6c4 10cec2: e8 21 1c 00 00 call 10eae8 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10cec7: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10ceca: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10cecd: e8 4f 24 00 00 call 10f321 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10ced2: e8 4a 24 00 00 call 10f321 <_Thread_Enable_dispatch> goto return_id; 10ced7: 83 c4 10 add $0x10,%esp 10ceda: eb 1d jmp 10cef9 /* * 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( 10cedc: 8d 45 e0 lea -0x20(%ebp),%eax 10cedf: 50 push %eax 10cee0: 57 push %edi 10cee1: 6a 00 push $0x0 10cee3: 56 push %esi 10cee4: e8 ef 51 00 00 call 1120d8 <_POSIX_Semaphore_Create_support> 10cee9: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10ceeb: e8 31 24 00 00 call 10f321 <_Thread_Enable_dispatch> if ( status == -1 ) 10cef0: 83 c4 10 add $0x10,%esp 10cef3: 83 c8 ff or $0xffffffff,%eax 10cef6: 43 inc %ebx 10cef7: 74 06 je 10ceff 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; 10cef9: 8b 45 e0 mov -0x20(%ebp),%eax 10cefc: 83 c0 08 add $0x8,%eax #endif return id; } 10ceff: 8d 65 f4 lea -0xc(%ebp),%esp 10cf02: 5b pop %ebx 10cf03: 5e pop %esi 10cf04: 5f pop %edi 10cf05: c9 leave 10cf06: c3 ret 0010a650 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10a650: 55 push %ebp 10a651: 89 e5 mov %esp,%ebp 10a653: 57 push %edi 10a654: 56 push %esi 10a655: 53 push %ebx 10a656: 83 ec 1c sub $0x1c,%esp 10a659: 8b 5d 08 mov 0x8(%ebp),%ebx 10a65c: 8b 55 0c mov 0xc(%ebp),%edx 10a65f: 8b 45 10 mov 0x10(%ebp),%eax ISR_Level level; if ( oact ) 10a662: 85 c0 test %eax,%eax 10a664: 74 12 je 10a678 *oact = _POSIX_signals_Vectors[ sig ]; 10a666: 6b f3 0c imul $0xc,%ebx,%esi 10a669: 81 c6 94 67 12 00 add $0x126794,%esi 10a66f: b9 03 00 00 00 mov $0x3,%ecx 10a674: 89 c7 mov %eax,%edi 10a676: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10a678: 85 db test %ebx,%ebx 10a67a: 74 0d je 10a689 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10a67c: 8d 43 ff lea -0x1(%ebx),%eax 10a67f: 83 f8 1f cmp $0x1f,%eax 10a682: 77 05 ja 10a689 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10a684: 83 fb 09 cmp $0x9,%ebx 10a687: 75 10 jne 10a699 rtems_set_errno_and_return_minus_one( EINVAL ); 10a689: e8 3e 7a 00 00 call 1120cc <__errno> 10a68e: c7 00 16 00 00 00 movl $0x16,(%eax) 10a694: 83 c8 ff or $0xffffffff,%eax 10a697: eb 53 jmp 10a6ec /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10a699: 31 c0 xor %eax,%eax 10a69b: 85 d2 test %edx,%edx 10a69d: 74 4d je 10a6ec <== 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 ); 10a69f: 9c pushf 10a6a0: fa cli 10a6a1: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10a6a4: 83 7a 08 00 cmpl $0x0,0x8(%edx) 10a6a8: 75 18 jne 10a6c2 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10a6aa: 6b db 0c imul $0xc,%ebx,%ebx 10a6ad: 8d bb 94 67 12 00 lea 0x126794(%ebx),%edi 10a6b3: 8d b3 80 07 12 00 lea 0x120780(%ebx),%esi 10a6b9: b9 03 00 00 00 mov $0x3,%ecx 10a6be: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a6c0: eb 24 jmp 10a6e6 } else { _POSIX_signals_Clear_process_signals( sig ); 10a6c2: 83 ec 0c sub $0xc,%esp 10a6c5: 53 push %ebx 10a6c6: 89 55 e0 mov %edx,-0x20(%ebp) 10a6c9: e8 d6 4b 00 00 call 10f2a4 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10a6ce: 6b db 0c imul $0xc,%ebx,%ebx 10a6d1: 8d bb 94 67 12 00 lea 0x126794(%ebx),%edi 10a6d7: b9 03 00 00 00 mov $0x3,%ecx 10a6dc: 8b 55 e0 mov -0x20(%ebp),%edx 10a6df: 89 d6 mov %edx,%esi 10a6e1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a6e3: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10a6e6: ff 75 e4 pushl -0x1c(%ebp) 10a6e9: 9d popf 10a6ea: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10a6ec: 8d 65 f4 lea -0xc(%ebp),%esp 10a6ef: 5b pop %ebx 10a6f0: 5e pop %esi 10a6f1: 5f pop %edi 10a6f2: c9 leave 10a6f3: c3 ret 0010c3a4 : #include int sigsuspend( const sigset_t *sigmask ) { 10c3a4: 55 push %ebp 10c3a5: 89 e5 mov %esp,%ebp 10c3a7: 56 push %esi 10c3a8: 53 push %ebx 10c3a9: 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 ); 10c3ac: 8d 5d f4 lea -0xc(%ebp),%ebx 10c3af: 53 push %ebx 10c3b0: ff 75 08 pushl 0x8(%ebp) 10c3b3: 6a 01 push $0x1 10c3b5: e8 c6 ff ff ff call 10c380 (void) sigfillset( &all_signals ); 10c3ba: 8d 75 f0 lea -0x10(%ebp),%esi 10c3bd: 89 34 24 mov %esi,(%esp) 10c3c0: e8 17 ff ff ff call 10c2dc status = sigtimedwait( &all_signals, NULL, NULL ); 10c3c5: 83 c4 0c add $0xc,%esp 10c3c8: 6a 00 push $0x0 10c3ca: 6a 00 push $0x0 10c3cc: 56 push %esi 10c3cd: e8 69 00 00 00 call 10c43b 10c3d2: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10c3d4: 83 c4 0c add $0xc,%esp 10c3d7: 6a 00 push $0x0 10c3d9: 53 push %ebx 10c3da: 6a 00 push $0x0 10c3dc: e8 9f ff ff ff call 10c380 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10c3e1: 83 c4 10 add $0x10,%esp 10c3e4: 46 inc %esi 10c3e5: 74 0b je 10c3f2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); 10c3e7: e8 f4 77 00 00 call 113be0 <__errno> 10c3ec: c7 00 04 00 00 00 movl $0x4,(%eax) return status; } 10c3f2: 83 c8 ff or $0xffffffff,%eax 10c3f5: 8d 65 f8 lea -0x8(%ebp),%esp 10c3f8: 5b pop %ebx 10c3f9: 5e pop %esi 10c3fa: c9 leave 10c3fb: c3 ret 0010aa13 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10aa13: 55 push %ebp 10aa14: 89 e5 mov %esp,%ebp 10aa16: 57 push %edi 10aa17: 56 push %esi 10aa18: 53 push %ebx 10aa19: 83 ec 2c sub $0x2c,%esp 10aa1c: 8b 7d 08 mov 0x8(%ebp),%edi 10aa1f: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10aa22: 85 ff test %edi,%edi 10aa24: 74 24 je 10aa4a /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10aa26: 85 db test %ebx,%ebx 10aa28: 74 33 je 10aa5d if ( !_Timespec_Is_valid( timeout ) ) 10aa2a: 83 ec 0c sub $0xc,%esp 10aa2d: 53 push %ebx 10aa2e: e8 f5 2f 00 00 call 10da28 <_Timespec_Is_valid> 10aa33: 83 c4 10 add $0x10,%esp 10aa36: 84 c0 test %al,%al 10aa38: 74 10 je 10aa4a rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10aa3a: 83 ec 0c sub $0xc,%esp 10aa3d: 53 push %ebx 10aa3e: e8 3d 30 00 00 call 10da80 <_Timespec_To_ticks> if ( !interval ) 10aa43: 83 c4 10 add $0x10,%esp 10aa46: 85 c0 test %eax,%eax 10aa48: 75 15 jne 10aa5f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10aa4a: e8 91 79 00 00 call 1123e0 <__errno> 10aa4f: c7 00 16 00 00 00 movl $0x16,(%eax) 10aa55: 83 cf ff or $0xffffffff,%edi 10aa58: e9 13 01 00 00 jmp 10ab70 10aa5d: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10aa5f: 8b 5d 0c mov 0xc(%ebp),%ebx 10aa62: 85 db test %ebx,%ebx 10aa64: 75 03 jne 10aa69 10aa66: 8d 5d dc lea -0x24(%ebp),%ebx the_thread = _Thread_Executing; 10aa69: 8b 15 f0 62 12 00 mov 0x1262f0,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10aa6f: 8b b2 f8 00 00 00 mov 0xf8(%edx),%esi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10aa75: 9c pushf 10aa76: fa cli 10aa77: 8f 45 d4 popl -0x2c(%ebp) if ( *set & api->signals_pending ) { 10aa7a: 8b 0f mov (%edi),%ecx 10aa7c: 89 4d d0 mov %ecx,-0x30(%ebp) 10aa7f: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx 10aa85: 85 4d d0 test %ecx,-0x30(%ebp) 10aa88: 74 32 je 10aabc /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 10aa8a: 83 ec 0c sub $0xc,%esp 10aa8d: 51 push %ecx 10aa8e: e8 41 ff ff ff call 10a9d4 <_POSIX_signals_Get_highest> 10aa93: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10aa95: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10aa9c: 6a 00 push $0x0 10aa9e: 53 push %ebx 10aa9f: 50 push %eax 10aaa0: 56 push %esi 10aaa1: e8 32 4e 00 00 call 10f8d8 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10aaa6: ff 75 d4 pushl -0x2c(%ebp) 10aaa9: 9d popf the_info->si_code = SI_USER; 10aaaa: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10aab1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10aab8: 8b 3b mov (%ebx),%edi 10aaba: eb 3b jmp 10aaf7 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10aabc: 8b 0d 88 69 12 00 mov 0x126988,%ecx 10aac2: 85 4d d0 test %ecx,-0x30(%ebp) 10aac5: 74 35 je 10aafc signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10aac7: 83 ec 0c sub $0xc,%esp 10aaca: 51 push %ecx 10aacb: e8 04 ff ff ff call 10a9d4 <_POSIX_signals_Get_highest> 10aad0: 89 c7 mov %eax,%edi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10aad2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10aad9: 6a 01 push $0x1 10aadb: 53 push %ebx 10aadc: 50 push %eax 10aadd: 56 push %esi 10aade: e8 f5 4d 00 00 call 10f8d8 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10aae3: ff 75 d4 pushl -0x2c(%ebp) 10aae6: 9d popf the_info->si_signo = signo; 10aae7: 89 3b mov %edi,(%ebx) the_info->si_code = SI_USER; 10aae9: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10aaf0: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10aaf7: 83 c4 20 add $0x20,%esp 10aafa: eb 74 jmp 10ab70 } the_info->si_signo = -1; 10aafc: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10ab02: 8b 0d 34 62 12 00 mov 0x126234,%ecx 10ab08: 41 inc %ecx 10ab09: 89 0d 34 62 12 00 mov %ecx,0x126234 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10ab0f: c7 42 44 20 69 12 00 movl $0x126920,0x44(%edx) the_thread->Wait.return_code = EINTR; 10ab16: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10ab1d: 8b 0f mov (%edi),%ecx 10ab1f: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10ab22: 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; 10ab25: c7 05 50 69 12 00 01 movl $0x1,0x126950 10ab2c: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10ab2f: ff 75 d4 pushl -0x2c(%ebp) 10ab32: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10ab33: 52 push %edx 10ab34: 68 1c d6 10 00 push $0x10d61c 10ab39: 50 push %eax 10ab3a: 68 20 69 12 00 push $0x126920 10ab3f: e8 1c 28 00 00 call 10d360 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10ab44: e8 60 23 00 00 call 10cea9 <_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 ); 10ab49: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10ab50: 6a 00 push $0x0 10ab52: 53 push %ebx 10ab53: ff 33 pushl (%ebx) 10ab55: 56 push %esi 10ab56: e8 7d 4d 00 00 call 10f8d8 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10ab5b: 83 c4 20 add $0x20,%esp 10ab5e: e8 7d 78 00 00 call 1123e0 <__errno> 10ab63: 8b 15 f0 62 12 00 mov 0x1262f0,%edx 10ab69: 8b 52 34 mov 0x34(%edx),%edx 10ab6c: 89 10 mov %edx,(%eax) return the_info->si_signo; 10ab6e: 8b 3b mov (%ebx),%edi } 10ab70: 89 f8 mov %edi,%eax 10ab72: 8d 65 f4 lea -0xc(%ebp),%esp 10ab75: 5b pop %ebx 10ab76: 5e pop %esi 10ab77: 5f pop %edi 10ab78: c9 leave 10ab79: c3 ret 0010c5bc : int sigwait( const sigset_t *set, int *sig ) { 10c5bc: 55 push %ebp 10c5bd: 89 e5 mov %esp,%ebp 10c5bf: 53 push %ebx 10c5c0: 83 ec 08 sub $0x8,%esp 10c5c3: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10c5c6: 6a 00 push $0x0 10c5c8: 6a 00 push $0x0 10c5ca: ff 75 08 pushl 0x8(%ebp) 10c5cd: e8 69 fe ff ff call 10c43b 10c5d2: 89 c2 mov %eax,%edx if ( status != -1 ) { 10c5d4: 83 c4 10 add $0x10,%esp 10c5d7: 83 f8 ff cmp $0xffffffff,%eax 10c5da: 74 0a je 10c5e6 if ( sig ) 10c5dc: 31 c0 xor %eax,%eax 10c5de: 85 db test %ebx,%ebx 10c5e0: 74 0b je 10c5ed <== NEVER TAKEN *sig = status; 10c5e2: 89 13 mov %edx,(%ebx) 10c5e4: eb 07 jmp 10c5ed return 0; } return errno; 10c5e6: e8 f5 75 00 00 call 113be0 <__errno> 10c5eb: 8b 00 mov (%eax),%eax } 10c5ed: 8b 5d fc mov -0x4(%ebp),%ebx 10c5f0: c9 leave 10c5f1: c3 ret 00109e8c : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 109e8c: 55 push %ebp 109e8d: 89 e5 mov %esp,%ebp 109e8f: 56 push %esi 109e90: 53 push %ebx 109e91: 8b 5d 0c mov 0xc(%ebp),%ebx 109e94: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 109e97: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 109e9b: 75 1d jne 109eba rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 109e9d: 85 f6 test %esi,%esi 109e9f: 74 19 je 109eba /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 109ea1: 85 db test %ebx,%ebx 109ea3: 74 22 je 109ec7 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 109ea5: 8b 03 mov (%ebx),%eax 109ea7: 48 dec %eax 109ea8: 83 f8 01 cmp $0x1,%eax 109eab: 77 0d ja 109eba <== 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 ) 109ead: 8b 43 04 mov 0x4(%ebx),%eax 109eb0: 85 c0 test %eax,%eax 109eb2: 74 06 je 109eba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 109eb4: 48 dec %eax 109eb5: 83 f8 1f cmp $0x1f,%eax 109eb8: 76 0d jbe 109ec7 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 109eba: e8 21 7f 00 00 call 111de0 <__errno> 109ebf: c7 00 16 00 00 00 movl $0x16,(%eax) 109ec5: eb 2f jmp 109ef6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109ec7: a1 48 62 12 00 mov 0x126248,%eax 109ecc: 40 inc %eax 109ecd: a3 48 62 12 00 mov %eax,0x126248 * 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 ); 109ed2: 83 ec 0c sub $0xc,%esp 109ed5: 68 70 65 12 00 push $0x126570 109eda: e8 1d 1b 00 00 call 10b9fc <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 109edf: 83 c4 10 add $0x10,%esp 109ee2: 85 c0 test %eax,%eax 109ee4: 75 18 jne 109efe _Thread_Enable_dispatch(); 109ee6: e8 16 27 00 00 call 10c601 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 109eeb: e8 f0 7e 00 00 call 111de0 <__errno> 109ef0: c7 00 0b 00 00 00 movl $0xb,(%eax) 109ef6: 83 c8 ff or $0xffffffff,%eax 109ef9: e9 83 00 00 00 jmp 109f81 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 109efe: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 109f02: 8b 15 04 63 12 00 mov 0x126304,%edx 109f08: 8b 52 08 mov 0x8(%edx),%edx 109f0b: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 109f0e: 85 db test %ebx,%ebx 109f10: 74 11 je 109f23 ptimer->inf.sigev_notify = evp->sigev_notify; 109f12: 8b 13 mov (%ebx),%edx 109f14: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 109f17: 8b 53 04 mov 0x4(%ebx),%edx 109f1a: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 109f1d: 8b 53 08 mov 0x8(%ebx),%edx 109f20: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 109f23: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 109f2a: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 109f31: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 109f38: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 109f3f: 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; 109f46: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 109f4d: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 109f54: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 109f5b: 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; 109f62: 8b 50 08 mov 0x8(%eax),%edx 109f65: 0f b7 da movzwl %dx,%ebx 109f68: 8b 0d 8c 65 12 00 mov 0x12658c,%ecx 109f6e: 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; 109f71: 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; 109f78: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 109f7a: e8 82 26 00 00 call 10c601 <_Thread_Enable_dispatch> 109f7f: 31 c0 xor %eax,%eax return 0; } 109f81: 8d 65 f8 lea -0x8(%ebp),%esp 109f84: 5b pop %ebx 109f85: 5e pop %esi 109f86: c9 leave 109f87: c3 ret 00109f88 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 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 2c sub $0x2c,%esp 109f91: 8b 45 0c mov 0xc(%ebp),%eax Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 109f94: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 109f98: 0f 84 47 01 00 00 je 10a0e5 <== 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 ) || 109f9e: 8b 55 10 mov 0x10(%ebp),%edx 109fa1: 81 7a 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%edx) 109fa8: 0f 87 37 01 00 00 ja 10a0e5 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 109fae: 81 7a 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%edx) 109fb5: 0f 87 2a 01 00 00 ja 10a0e5 <== 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 ) { 109fbb: 85 c0 test %eax,%eax 109fbd: 74 09 je 109fc8 109fbf: 83 f8 04 cmp $0x4,%eax 109fc2: 0f 85 1d 01 00 00 jne 10a0e5 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 109fc8: 8d 7d cc lea -0x34(%ebp),%edi 109fcb: b9 04 00 00 00 mov $0x4,%ecx 109fd0: 8b 75 10 mov 0x10(%ebp),%esi 109fd3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 109fd5: 83 f8 04 cmp $0x4,%eax 109fd8: 75 2f jne 10a009 struct timespec now; _TOD_Get( &now ); 109fda: 83 ec 0c sub $0xc,%esp 109fdd: 8d 5d dc lea -0x24(%ebp),%ebx 109fe0: 53 push %ebx 109fe1: e8 8e 15 00 00 call 10b574 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 109fe6: 59 pop %ecx 109fe7: 5e pop %esi 109fe8: 8d 75 d4 lea -0x2c(%ebp),%esi 109feb: 56 push %esi 109fec: 53 push %ebx 109fed: e8 8e 31 00 00 call 10d180 <_Timespec_Greater_than> 109ff2: 83 c4 10 add $0x10,%esp 109ff5: 84 c0 test %al,%al 109ff7: 0f 85 e8 00 00 00 jne 10a0e5 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 109ffd: 52 push %edx 109ffe: 56 push %esi 109fff: 56 push %esi 10a000: 53 push %ebx 10a001: e8 9e 31 00 00 call 10d1a4 <_Timespec_Subtract> 10a006: 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 *) 10a009: 50 push %eax 10a00a: 8d 45 e4 lea -0x1c(%ebp),%eax 10a00d: 50 push %eax 10a00e: ff 75 08 pushl 0x8(%ebp) 10a011: 68 70 65 12 00 push $0x126570 10a016: e8 f5 1d 00 00 call 10be10 <_Objects_Get> 10a01b: 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 ) { 10a01d: 83 c4 10 add $0x10,%esp 10a020: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10a024: 0f 85 bb 00 00 00 jne 10a0e5 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 ) { 10a02a: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10a02e: 75 3b jne 10a06b 10a030: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 10a034: 75 35 jne 10a06b /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10a036: 83 ec 0c sub $0xc,%esp 10a039: 8d 40 10 lea 0x10(%eax),%eax 10a03c: 50 push %eax 10a03d: e8 1e 35 00 00 call 10d560 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10a042: 83 c4 10 add $0x10,%esp 10a045: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a049: 74 0d je 10a058 *ovalue = ptimer->timer_data; 10a04b: 8d 73 54 lea 0x54(%ebx),%esi 10a04e: b9 04 00 00 00 mov $0x4,%ecx 10a053: 8b 7d 14 mov 0x14(%ebp),%edi 10a056: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10a058: 8d 7b 54 lea 0x54(%ebx),%edi 10a05b: 8d 75 cc lea -0x34(%ebp),%esi 10a05e: b9 04 00 00 00 mov $0x4,%ecx 10a063: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a065: c6 43 3c 04 movb $0x4,0x3c(%ebx) 10a069: eb 35 jmp 10a0a0 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10a06b: 83 ec 0c sub $0xc,%esp 10a06e: ff 75 10 pushl 0x10(%ebp) 10a071: e8 62 31 00 00 call 10d1d8 <_Timespec_To_ticks> 10a076: 89 43 64 mov %eax,0x64(%ebx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10a079: 8d 45 d4 lea -0x2c(%ebp),%eax 10a07c: 89 04 24 mov %eax,(%esp) 10a07f: e8 54 31 00 00 call 10d1d8 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10a084: 89 1c 24 mov %ebx,(%esp) 10a087: 68 fc a0 10 00 push $0x10a0fc 10a08c: ff 73 08 pushl 0x8(%ebx) 10a08f: 50 push %eax 10a090: 8d 43 10 lea 0x10(%ebx),%eax 10a093: 50 push %eax 10a094: e8 cf 51 00 00 call 10f268 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10a099: 83 c4 20 add $0x20,%esp 10a09c: 84 c0 test %al,%al 10a09e: 75 09 jne 10a0a9 _Thread_Enable_dispatch(); 10a0a0: e8 5c 25 00 00 call 10c601 <_Thread_Enable_dispatch> 10a0a5: 31 c0 xor %eax,%eax return 0; 10a0a7: eb 4a jmp 10a0f3 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10a0a9: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a0ad: 74 0d je 10a0bc *ovalue = ptimer->timer_data; 10a0af: 8d 73 54 lea 0x54(%ebx),%esi 10a0b2: b9 04 00 00 00 mov $0x4,%ecx 10a0b7: 8b 7d 14 mov 0x14(%ebp),%edi 10a0ba: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10a0bc: 8d 7b 54 lea 0x54(%ebx),%edi 10a0bf: 8d 75 cc lea -0x34(%ebp),%esi 10a0c2: b9 04 00 00 00 mov $0x4,%ecx 10a0c7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a0c9: c6 43 3c 03 movb $0x3,0x3c(%ebx) _TOD_Get( &ptimer->time ); 10a0cd: 83 ec 0c sub $0xc,%esp 10a0d0: 83 c3 6c add $0x6c,%ebx 10a0d3: 53 push %ebx 10a0d4: e8 9b 14 00 00 call 10b574 <_TOD_Get> _Thread_Enable_dispatch(); 10a0d9: e8 23 25 00 00 call 10c601 <_Thread_Enable_dispatch> 10a0de: 31 c0 xor %eax,%eax return 0; 10a0e0: 83 c4 10 add $0x10,%esp 10a0e3: eb 0e jmp 10a0f3 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a0e5: e8 f6 7c 00 00 call 111de0 <__errno> 10a0ea: c7 00 16 00 00 00 movl $0x16,(%eax) 10a0f0: 83 c8 ff or $0xffffffff,%eax } 10a0f3: 8d 65 f4 lea -0xc(%ebp),%esp 10a0f6: 5b pop %ebx 10a0f7: 5e pop %esi 10a0f8: 5f pop %edi 10a0f9: c9 leave 10a0fa: c3 ret 00109db0 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 109db0: 55 push %ebp 109db1: 89 e5 mov %esp,%ebp 109db3: 57 push %edi 109db4: 56 push %esi 109db5: 53 push %ebx 109db6: 83 ec 1c sub $0x1c,%esp 109db9: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 109dbc: 83 3d 38 6b 12 00 00 cmpl $0x0,0x126b38 109dc3: 75 2c jne 109df1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109dc5: c7 05 24 6b 12 00 00 movl $0x0,0x126b24 109dcc: 00 00 00 the_watchdog->routine = routine; 109dcf: c7 05 38 6b 12 00 92 movl $0x109e92,0x126b38 109dd6: 9e 10 00 the_watchdog->id = id; 109dd9: c7 05 3c 6b 12 00 00 movl $0x0,0x126b3c 109de0: 00 00 00 the_watchdog->user_data = user_data; 109de3: c7 05 40 6b 12 00 00 movl $0x0,0x126b40 109dea: 00 00 00 109ded: 31 db xor %ebx,%ebx 109def: eb 4f jmp 109e40 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 109df1: 83 ec 0c sub $0xc,%esp 109df4: 68 1c 6b 12 00 push $0x126b1c 109df9: e8 4a 33 00 00 call 10d148 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 109dfe: 83 e8 02 sub $0x2,%eax 109e01: 83 c4 10 add $0x10,%esp 109e04: 31 db xor %ebx,%ebx 109e06: 83 f8 01 cmp $0x1,%eax 109e09: 77 35 ja 109e40 <== 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); 109e0b: a1 30 6b 12 00 mov 0x126b30,%eax 109e10: 03 05 28 6b 12 00 add 0x126b28,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 109e16: 51 push %ecx 109e17: 51 push %ecx 109e18: 8d 55 e0 lea -0x20(%ebp),%edx 109e1b: 52 push %edx 109e1c: 2b 05 34 6b 12 00 sub 0x126b34,%eax 109e22: 50 push %eax 109e23: e8 d0 2e 00 00 call 10ccf8 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 109e28: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx remaining += tp.tv_nsec / 1000; 109e2f: 8b 45 e4 mov -0x1c(%ebp),%eax 109e32: bf e8 03 00 00 mov $0x3e8,%edi 109e37: 99 cltd 109e38: f7 ff idiv %edi 109e3a: 8d 1c 08 lea (%eax,%ecx,1),%ebx 109e3d: 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 ) { 109e40: 85 f6 test %esi,%esi 109e42: 74 44 je 109e88 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 109e44: b9 40 42 0f 00 mov $0xf4240,%ecx 109e49: 89 f0 mov %esi,%eax 109e4b: 31 d2 xor %edx,%edx 109e4d: f7 f1 div %ecx 109e4f: 89 45 e0 mov %eax,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 109e52: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 109e58: 89 55 e4 mov %edx,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 109e5b: 83 ec 0c sub $0xc,%esp 109e5e: 8d 75 e0 lea -0x20(%ebp),%esi 109e61: 56 push %esi 109e62: e8 ed 2e 00 00 call 10cd54 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 109e67: 89 34 24 mov %esi,(%esp) 109e6a: e8 e5 2e 00 00 call 10cd54 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 109e6f: a3 28 6b 12 00 mov %eax,0x126b28 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 109e74: 58 pop %eax 109e75: 5a pop %edx 109e76: 68 1c 6b 12 00 push $0x126b1c 109e7b: 68 20 63 12 00 push $0x126320 109e80: e8 ab 31 00 00 call 10d030 <_Watchdog_Insert> 109e85: 83 c4 10 add $0x10,%esp } return remaining; } 109e88: 89 d8 mov %ebx,%eax 109e8a: 8d 65 f4 lea -0xc(%ebp),%esp 109e8d: 5b pop %ebx 109e8e: 5e pop %esi 109e8f: 5f pop %edi 109e90: c9 leave 109e91: c3 ret