RTEMS 4.11Annotated Report
Sat Nov 27 19:35:44 2010
0011731c <_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
)
{
11731c: 55 push %ebp
11731d: 89 e5 mov %esp,%ebp
11731f: 57 push %edi
117320: 56 push %esi
117321: 53 push %ebx
117322: 83 ec 1c sub $0x1c,%esp
117325: 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 ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
117328: b8 01 00 00 00 mov $0x1,%eax
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11732d: 8b 55 10 mov 0x10(%ebp),%edx
117330: 3b 53 4c cmp 0x4c(%ebx),%edx
117333: 77 4e ja 117383 <_CORE_message_queue_Broadcast+0x67><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
117335: 83 7b 48 00 cmpl $0x0,0x48(%ebx)
117339: 75 09 jne 117344 <_CORE_message_queue_Broadcast+0x28>
11733b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
117342: eb 23 jmp 117367 <_CORE_message_queue_Broadcast+0x4b>
*count = 0;
117344: 8b 45 1c mov 0x1c(%ebp),%eax
117347: c7 00 00 00 00 00 movl $0x0,(%eax)
11734d: eb 32 jmp 117381 <_CORE_message_queue_Broadcast+0x65>
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
11734f: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
117352: 8b 42 2c mov 0x2c(%edx),%eax
117355: 89 c7 mov %eax,%edi
117357: 8b 75 0c mov 0xc(%ebp),%esi
11735a: 8b 4d 10 mov 0x10(%ebp),%ecx
11735d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
11735f: 8b 42 28 mov 0x28(%edx),%eax
117362: 8b 55 10 mov 0x10(%ebp),%edx
117365: 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 =
117367: 83 ec 0c sub $0xc,%esp
11736a: 53 push %ebx
11736b: e8 88 23 00 00 call 1196f8 <_Thread_queue_Dequeue>
117370: 89 c2 mov %eax,%edx
117372: 83 c4 10 add $0x10,%esp
117375: 85 c0 test %eax,%eax
117377: 75 d6 jne 11734f <_CORE_message_queue_Broadcast+0x33>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
117379: 8b 55 e4 mov -0x1c(%ebp),%edx
11737c: 8b 45 1c mov 0x1c(%ebp),%eax
11737f: 89 10 mov %edx,(%eax)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
117381: 31 c0 xor %eax,%eax
}
117383: 8d 65 f4 lea -0xc(%ebp),%esp
117386: 5b pop %ebx
117387: 5e pop %esi
117388: 5f pop %edi
117389: c9 leave
11738a: c3 ret
001121c8 <_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
)
{
1121c8: 55 push %ebp
1121c9: 89 e5 mov %esp,%ebp
1121cb: 57 push %edi
1121cc: 56 push %esi
1121cd: 53 push %ebx
1121ce: 83 ec 1c sub $0x1c,%esp
1121d1: 8b 5d 08 mov 0x8(%ebp),%ebx
1121d4: 8b 7d 10 mov 0x10(%ebp),%edi
1121d7: 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;
1121da: 89 7b 44 mov %edi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
1121dd: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
1121e4: 89 53 4c mov %edx,0x4c(%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)) {
1121e7: 89 d0 mov %edx,%eax
1121e9: f6 c2 03 test $0x3,%dl
1121ec: 74 0c je 1121fa <_CORE_message_queue_Initialize+0x32>
allocated_message_size += sizeof(uint32_t);
1121ee: 83 c0 04 add $0x4,%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
1121f1: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
return false;
1121f4: 31 f6 xor %esi,%esi
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
allocated_message_size &= ~(sizeof(uint32_t) - 1);
}
if (allocated_message_size < maximum_message_size)
1121f6: 39 d0 cmp %edx,%eax
1121f8: 72 68 jb 112262 <_CORE_message_queue_Initialize+0x9a><== 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));
1121fa: 8d 50 10 lea 0x10(%eax),%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
1121fd: 89 d1 mov %edx,%ecx
1121ff: 0f af cf imul %edi,%ecx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
112202: 31 f6 xor %esi,%esi
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
112204: 39 c1 cmp %eax,%ecx
112206: 72 5a jb 112262 <_CORE_message_queue_Initialize+0x9a><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
112208: 83 ec 0c sub $0xc,%esp
11220b: 51 push %ecx
11220c: 89 55 e4 mov %edx,-0x1c(%ebp)
11220f: e8 42 26 00 00 call 114856 <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
112214: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
112217: 83 c4 10 add $0x10,%esp
11221a: 85 c0 test %eax,%eax
11221c: 8b 55 e4 mov -0x1c(%ebp),%edx
11221f: 74 41 je 112262 <_CORE_message_queue_Initialize+0x9a>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
112221: 52 push %edx
112222: 57 push %edi
112223: 50 push %eax
112224: 8d 43 60 lea 0x60(%ebx),%eax
112227: 50 push %eax
112228: e8 f7 3f 00 00 call 116224 <_Chain_Initialize>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
11222d: 8d 43 54 lea 0x54(%ebx),%eax
112230: 89 43 50 mov %eax,0x50(%ebx)
head->next = tail;
head->previous = NULL;
112233: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
11223a: 8d 43 50 lea 0x50(%ebx),%eax
11223d: 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(
112240: 6a 06 push $0x6
112242: 68 80 00 00 00 push $0x80
112247: 8b 45 0c mov 0xc(%ebp),%eax
11224a: 83 38 01 cmpl $0x1,(%eax)
11224d: 0f 94 c0 sete %al
112250: 0f b6 c0 movzbl %al,%eax
112253: 50 push %eax
112254: 53 push %ebx
112255: e8 06 1e 00 00 call 114060 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
11225a: 83 c4 20 add $0x20,%esp
11225d: be 01 00 00 00 mov $0x1,%esi
}
112262: 89 f0 mov %esi,%eax
112264: 8d 65 f4 lea -0xc(%ebp),%esp
112267: 5b pop %ebx
112268: 5e pop %esi
112269: 5f pop %edi
11226a: c9 leave
11226b: c3 ret
0011226c <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
11226c: 55 push %ebp
11226d: 89 e5 mov %esp,%ebp
11226f: 57 push %edi
112270: 56 push %esi
112271: 53 push %ebx
112272: 83 ec 2c sub $0x2c,%esp
112275: 8b 45 08 mov 0x8(%ebp),%eax
112278: 8b 55 0c mov 0xc(%ebp),%edx
11227b: 89 55 dc mov %edx,-0x24(%ebp)
11227e: 8b 55 10 mov 0x10(%ebp),%edx
112281: 89 55 e4 mov %edx,-0x1c(%ebp)
112284: 8b 7d 14 mov 0x14(%ebp),%edi
112287: 8b 55 1c mov 0x1c(%ebp),%edx
11228a: 89 55 d4 mov %edx,-0x2c(%ebp)
11228d: 8a 55 18 mov 0x18(%ebp),%dl
112290: 88 55 db mov %dl,-0x25(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
112293: 8b 0d 10 b6 12 00 mov 0x12b610,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
112299: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
1122a0: 9c pushf
1122a1: fa cli
1122a2: 8f 45 e0 popl -0x20(%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 );
}
1122a5: 8b 50 50 mov 0x50(%eax),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
1122a8: 8d 58 54 lea 0x54(%eax),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
1122ab: 39 da cmp %ebx,%edx
1122ad: 74 47 je 1122f6 <_CORE_message_queue_Seize+0x8a>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
1122af: 8b 32 mov (%edx),%esi
head->next = new_first;
1122b1: 89 70 50 mov %esi,0x50(%eax)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
1122b4: 8d 58 50 lea 0x50(%eax),%ebx
1122b7: 89 5e 04 mov %ebx,0x4(%esi)
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
1122ba: 85 d2 test %edx,%edx
1122bc: 74 38 je 1122f6 <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
1122be: ff 48 48 decl 0x48(%eax)
_ISR_Enable( level );
1122c1: ff 75 e0 pushl -0x20(%ebp)
1122c4: 9d popf
*size_p = the_message->Contents.size;
1122c5: 8b 4a 08 mov 0x8(%edx),%ecx
1122c8: 89 0f mov %ecx,(%edi)
_Thread_Executing->Wait.count =
1122ca: 8b 0d 10 b6 12 00 mov 0x12b610,%ecx
1122d0: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
1122d7: 8d 72 0c lea 0xc(%edx),%esi
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
1122da: 8b 0f mov (%edi),%ecx
1122dc: 8b 7d e4 mov -0x1c(%ebp),%edi
1122df: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
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 );
1122e1: 89 55 0c mov %edx,0xc(%ebp)
1122e4: 83 c0 60 add $0x60,%eax
1122e7: 89 45 08 mov %eax,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 );
}
1122ea: 83 c4 2c add $0x2c,%esp
1122ed: 5b pop %ebx
1122ee: 5e pop %esi
1122ef: 5f pop %edi
1122f0: c9 leave
1122f1: e9 52 fe ff ff jmp 112148 <_Chain_Append>
return;
}
#endif
}
if ( !wait ) {
1122f6: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
1122fa: 75 13 jne 11230f <_CORE_message_queue_Seize+0xa3>
_ISR_Enable( level );
1122fc: ff 75 e0 pushl -0x20(%ebp)
1122ff: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
112300: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
112307: 83 c4 2c add $0x2c,%esp
11230a: 5b pop %ebx
11230b: 5e pop %esi
11230c: 5f pop %edi
11230d: c9 leave
11230e: 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;
11230f: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
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;
112316: 89 41 44 mov %eax,0x44(%ecx)
executing->Wait.id = id;
112319: 8b 55 dc mov -0x24(%ebp),%edx
11231c: 89 51 20 mov %edx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
11231f: 8b 55 e4 mov -0x1c(%ebp),%edx
112322: 89 51 2c mov %edx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
112325: 89 79 28 mov %edi,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
112328: ff 75 e0 pushl -0x20(%ebp)
11232b: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
11232c: c7 45 10 10 41 11 00 movl $0x114110,0x10(%ebp)
112333: 8b 55 d4 mov -0x2c(%ebp),%edx
112336: 89 55 0c mov %edx,0xc(%ebp)
112339: 89 45 08 mov %eax,0x8(%ebp)
}
11233c: 83 c4 2c add $0x2c,%esp
11233f: 5b pop %ebx
112340: 5e pop %esi
112341: 5f pop %edi
112342: 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 );
112343: e9 ec 1a 00 00 jmp 113e34 <_Thread_queue_Enqueue_with_handler>
0010ab79 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10ab79: 55 push %ebp
10ab7a: 89 e5 mov %esp,%ebp
10ab7c: 53 push %ebx
10ab7d: 83 ec 14 sub $0x14,%esp
10ab80: 8b 5d 08 mov 0x8(%ebp),%ebx
10ab83: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10ab86: a1 60 32 12 00 mov 0x123260,%eax
10ab8b: 85 c0 test %eax,%eax
10ab8d: 74 19 je 10aba8 <_CORE_mutex_Seize+0x2f>
10ab8f: 84 d2 test %dl,%dl
10ab91: 74 15 je 10aba8 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN
10ab93: 83 3d dc 33 12 00 01 cmpl $0x1,0x1233dc
10ab9a: 76 0c jbe 10aba8 <_CORE_mutex_Seize+0x2f>
10ab9c: 53 push %ebx
10ab9d: 6a 12 push $0x12
10ab9f: 6a 00 push $0x0
10aba1: 6a 00 push $0x0
10aba3: e8 e4 05 00 00 call 10b18c <_Internal_error_Occurred>
10aba8: 51 push %ecx
10aba9: 51 push %ecx
10abaa: 8d 45 18 lea 0x18(%ebp),%eax
10abad: 50 push %eax
10abae: 53 push %ebx
10abaf: 88 55 f4 mov %dl,-0xc(%ebp)
10abb2: e8 05 3d 00 00 call 10e8bc <_CORE_mutex_Seize_interrupt_trylock>
10abb7: 83 c4 10 add $0x10,%esp
10abba: 85 c0 test %eax,%eax
10abbc: 8a 55 f4 mov -0xc(%ebp),%dl
10abbf: 74 48 je 10ac09 <_CORE_mutex_Seize+0x90>
10abc1: 84 d2 test %dl,%dl
10abc3: 75 12 jne 10abd7 <_CORE_mutex_Seize+0x5e>
10abc5: ff 75 18 pushl 0x18(%ebp)
10abc8: 9d popf
10abc9: a1 a0 34 12 00 mov 0x1234a0,%eax
10abce: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
10abd5: eb 32 jmp 10ac09 <_CORE_mutex_Seize+0x90>
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;
10abd7: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10abde: a1 a0 34 12 00 mov 0x1234a0,%eax
10abe3: 89 58 44 mov %ebx,0x44(%eax)
10abe6: 8b 55 0c mov 0xc(%ebp),%edx
10abe9: 89 50 20 mov %edx,0x20(%eax)
10abec: a1 60 32 12 00 mov 0x123260,%eax
10abf1: 40 inc %eax
10abf2: a3 60 32 12 00 mov %eax,0x123260
10abf7: ff 75 18 pushl 0x18(%ebp)
10abfa: 9d popf
10abfb: 50 push %eax
10abfc: 50 push %eax
10abfd: ff 75 14 pushl 0x14(%ebp)
10ac00: 53 push %ebx
10ac01: e8 26 ff ff ff call 10ab2c <_CORE_mutex_Seize_interrupt_blocking>
10ac06: 83 c4 10 add $0x10,%esp
}
10ac09: 8b 5d fc mov -0x4(%ebp),%ebx
10ac0c: c9 leave
10ac0d: c3 ret
0010e8bc <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
10e8bc: 55 push %ebp
10e8bd: 89 e5 mov %esp,%ebp
10e8bf: 57 push %edi
10e8c0: 56 push %esi
10e8c1: 53 push %ebx
10e8c2: 83 ec 0c sub $0xc,%esp
10e8c5: 8b 55 08 mov 0x8(%ebp),%edx
10e8c8: 8b 5d 0c mov 0xc(%ebp),%ebx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10e8cb: 8b 0d a0 34 12 00 mov 0x1234a0,%ecx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
10e8d1: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
10e8d8: 83 7a 50 00 cmpl $0x0,0x50(%edx)
10e8dc: 0f 84 89 00 00 00 je 10e96b <_CORE_mutex_Seize_interrupt_trylock+0xaf>
the_mutex->lock = CORE_MUTEX_LOCKED;
10e8e2: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_mutex->holder = executing;
10e8e9: 89 4a 5c mov %ecx,0x5c(%edx)
the_mutex->holder_id = executing->Object.id;
10e8ec: 8b 41 08 mov 0x8(%ecx),%eax
10e8ef: 89 42 60 mov %eax,0x60(%edx)
the_mutex->nest_count = 1;
10e8f2: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx)
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
10e8f9: 8b 42 48 mov 0x48(%edx),%eax
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10e8fc: 83 f8 02 cmp $0x2,%eax
10e8ff: 74 05 je 10e906 <_CORE_mutex_Seize_interrupt_trylock+0x4a>
10e901: 83 f8 03 cmp $0x3,%eax
10e904: 75 0e jne 10e914 <_CORE_mutex_Seize_interrupt_trylock+0x58>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
10e906: 8b 71 1c mov 0x1c(%ecx),%esi
10e909: 8d 7e 01 lea 0x1(%esi),%edi
10e90c: 89 79 1c mov %edi,0x1c(%ecx)
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
10e90f: 83 f8 03 cmp $0x3,%eax
10e912: 74 05 je 10e919 <_CORE_mutex_Seize_interrupt_trylock+0x5d>
_ISR_Enable( *level_p );
10e914: ff 33 pushl (%ebx)
10e916: 9d popf
10e917: eb 7c jmp 10e995 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
10e919: 8b 42 4c mov 0x4c(%edx),%eax
10e91c: 39 41 14 cmp %eax,0x14(%ecx)
10e91f: 75 05 jne 10e926 <_CORE_mutex_Seize_interrupt_trylock+0x6a>
_ISR_Enable( *level_p );
10e921: ff 33 pushl (%ebx)
10e923: 9d popf
10e924: eb 6f jmp 10e995 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
return 0;
}
if ( current > ceiling ) {
10e926: 76 26 jbe 10e94e <_CORE_mutex_Seize_interrupt_trylock+0x92>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10e928: a1 60 32 12 00 mov 0x123260,%eax
10e92d: 40 inc %eax
10e92e: a3 60 32 12 00 mov %eax,0x123260
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
10e933: ff 33 pushl (%ebx)
10e935: 9d popf
_Thread_Change_priority(
10e936: 50 push %eax
10e937: 6a 00 push $0x0
10e939: ff 72 4c pushl 0x4c(%edx)
10e93c: ff 72 5c pushl 0x5c(%edx)
10e93f: e8 74 d2 ff ff call 10bbb8 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
10e944: e8 b5 d6 ff ff call 10bffe <_Thread_Enable_dispatch>
10e949: 83 c4 10 add $0x10,%esp
10e94c: eb 47 jmp 10e995 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
10e94e: c7 41 34 06 00 00 00 movl $0x6,0x34(%ecx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10e955: c7 42 50 01 00 00 00 movl $0x1,0x50(%edx)
the_mutex->nest_count = 0; /* undo locking above */
10e95c: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
executing->resource_count--; /* undo locking above */
10e963: 89 71 1c mov %esi,0x1c(%ecx)
_ISR_Enable( *level_p );
10e966: ff 33 pushl (%ebx)
10e968: 9d popf
10e969: eb 2a jmp 10e995 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
10e96b: 8b 72 5c mov 0x5c(%edx),%esi
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
10e96e: b8 01 00 00 00 mov $0x1,%eax
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
10e973: 39 ce cmp %ecx,%esi
10e975: 75 20 jne 10e997 <_CORE_mutex_Seize_interrupt_trylock+0xdb>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
10e977: 8b 4a 40 mov 0x40(%edx),%ecx
10e97a: 85 c9 test %ecx,%ecx
10e97c: 74 05 je 10e983 <_CORE_mutex_Seize_interrupt_trylock+0xc7>
10e97e: 49 dec %ecx
10e97f: 75 16 jne 10e997 <_CORE_mutex_Seize_interrupt_trylock+0xdb><== ALWAYS TAKEN
10e981: eb 08 jmp 10e98b <_CORE_mutex_Seize_interrupt_trylock+0xcf><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
10e983: ff 42 54 incl 0x54(%edx)
_ISR_Enable( *level_p );
10e986: ff 33 pushl (%ebx)
10e988: 9d popf
10e989: eb 0a jmp 10e995 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
10e98b: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) <== NOT EXECUTED
_ISR_Enable( *level_p );
10e992: ff 33 pushl (%ebx) <== NOT EXECUTED
10e994: 9d popf <== NOT EXECUTED
return 0;
10e995: 31 c0 xor %eax,%eax
10e997: 8d 65 f4 lea -0xc(%ebp),%esp
10e99a: 5b pop %ebx
10e99b: 5e pop %esi
10e99c: 5f pop %edi
10e99d: c9 leave
10e99e: c3 ret
0010ad34 <_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
)
{
10ad34: 55 push %ebp
10ad35: 89 e5 mov %esp,%ebp
10ad37: 53 push %ebx
10ad38: 83 ec 10 sub $0x10,%esp
10ad3b: 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)) ) {
10ad3e: 53 push %ebx
10ad3f: e8 0c 16 00 00 call 10c350 <_Thread_queue_Dequeue>
10ad44: 89 c2 mov %eax,%edx
10ad46: 83 c4 10 add $0x10,%esp
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10ad49: 31 c0 xor %eax,%eax
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10ad4b: 85 d2 test %edx,%edx
10ad4d: 75 15 jne 10ad64 <_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 );
10ad4f: 9c pushf
10ad50: fa cli
10ad51: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10ad52: 8b 53 48 mov 0x48(%ebx),%edx
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10ad55: b0 04 mov $0x4,%al
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10ad57: 3b 53 40 cmp 0x40(%ebx),%edx
10ad5a: 73 06 jae 10ad62 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN
the_semaphore->count += 1;
10ad5c: 42 inc %edx
10ad5d: 89 53 48 mov %edx,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10ad60: 30 c0 xor %al,%al
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10ad62: 51 push %ecx
10ad63: 9d popf
}
return status;
}
10ad64: 8b 5d fc mov -0x4(%ebp),%ebx
10ad67: c9 leave
10ad68: c3 ret
00109d48 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
109d48: 55 push %ebp
109d49: 89 e5 mov %esp,%ebp
109d4b: 57 push %edi
109d4c: 56 push %esi
109d4d: 53 push %ebx
109d4e: 83 ec 2c sub $0x2c,%esp
109d51: 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 ];
109d54: 8b bb e4 00 00 00 mov 0xe4(%ebx),%edi
option_set = (rtems_option) the_thread->Wait.option;
109d5a: 8b 43 30 mov 0x30(%ebx),%eax
109d5d: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
109d60: 9c pushf
109d61: fa cli
109d62: 58 pop %eax
pending_events = api->pending_events;
109d63: 8b 17 mov (%edi),%edx
109d65: 89 55 d4 mov %edx,-0x2c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
109d68: 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 ) ) {
109d6b: 21 f2 and %esi,%edx
109d6d: 75 07 jne 109d76 <_Event_Surrender+0x2e>
_ISR_Enable( level );
109d6f: 50 push %eax
109d70: 9d popf
return;
109d71: e9 af 00 00 00 jmp 109e25 <_Event_Surrender+0xdd>
/*
* 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() &&
109d76: 83 3d 9c 34 12 00 00 cmpl $0x0,0x12349c
109d7d: 74 49 je 109dc8 <_Event_Surrender+0x80>
109d7f: 3b 1d a0 34 12 00 cmp 0x1234a0,%ebx
109d85: 75 41 jne 109dc8 <_Event_Surrender+0x80>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109d87: 8b 0d d4 34 12 00 mov 0x1234d4,%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() &&
_Thread_Is_executing( the_thread ) &&
109d8d: 83 f9 02 cmp $0x2,%ecx
109d90: 74 09 je 109d9b <_Event_Surrender+0x53> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
109d92: 8b 0d d4 34 12 00 mov 0x1234d4,%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() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109d98: 49 dec %ecx
109d99: 75 2d jne 109dc8 <_Event_Surrender+0x80>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109d9b: 39 f2 cmp %esi,%edx
109d9d: 74 06 je 109da5 <_Event_Surrender+0x5d>
109d9f: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109da3: 74 1f je 109dc4 <_Event_Surrender+0x7c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
109da5: 89 d6 mov %edx,%esi
109da7: f7 d6 not %esi
109da9: 23 75 d4 and -0x2c(%ebp),%esi
109dac: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
109dae: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109db5: 8b 4b 28 mov 0x28(%ebx),%ecx
109db8: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109dba: c7 05 d4 34 12 00 03 movl $0x3,0x1234d4
109dc1: 00 00 00
}
_ISR_Enable( level );
109dc4: 50 push %eax
109dc5: 9d popf
return;
109dc6: eb 5d jmp 109e25 <_Event_Surrender+0xdd>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109dc8: f6 43 11 01 testb $0x1,0x11(%ebx)
109dcc: 74 55 je 109e23 <_Event_Surrender+0xdb>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109dce: 39 f2 cmp %esi,%edx
109dd0: 74 06 je 109dd8 <_Event_Surrender+0x90>
109dd2: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109dd6: 74 4b je 109e23 <_Event_Surrender+0xdb> <== NEVER TAKEN
109dd8: 89 d6 mov %edx,%esi
109dda: f7 d6 not %esi
109ddc: 23 75 d4 and -0x2c(%ebp),%esi
109ddf: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
109de1: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109de8: 8b 4b 28 mov 0x28(%ebx),%ecx
109deb: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109ded: 50 push %eax
109dee: 9d popf
109def: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109df0: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
109df4: 74 06 je 109dfc <_Event_Surrender+0xb4>
_ISR_Enable( level );
109df6: 50 push %eax
109df7: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109df8: 51 push %ecx
109df9: 51 push %ecx
109dfa: eb 17 jmp 109e13 <_Event_Surrender+0xcb>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109dfc: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
109e03: 50 push %eax
109e04: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
109e05: 83 ec 0c sub $0xc,%esp
109e08: 8d 43 48 lea 0x48(%ebx),%eax
109e0b: 50 push %eax
109e0c: e8 53 2f 00 00 call 10cd64 <_Watchdog_Remove>
109e11: 58 pop %eax
109e12: 5a pop %edx
109e13: 68 f8 ff 03 10 push $0x1003fff8
109e18: 53 push %ebx
109e19: e8 ae 1e 00 00 call 10bccc <_Thread_Clear_state>
109e1e: 83 c4 10 add $0x10,%esp
109e21: eb 02 jmp 109e25 <_Event_Surrender+0xdd>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
109e23: 50 push %eax
109e24: 9d popf
}
109e25: 8d 65 f4 lea -0xc(%ebp),%esp
109e28: 5b pop %ebx
109e29: 5e pop %esi
109e2a: 5f pop %edi
109e2b: c9 leave
109e2c: c3 ret
00109e30 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
109e30: 55 push %ebp
109e31: 89 e5 mov %esp,%ebp
109e33: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
109e36: 8d 45 f4 lea -0xc(%ebp),%eax
109e39: 50 push %eax
109e3a: ff 75 08 pushl 0x8(%ebp)
109e3d: e8 de 21 00 00 call 10c020 <_Thread_Get>
switch ( location ) {
109e42: 83 c4 10 add $0x10,%esp
109e45: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
109e49: 75 49 jne 109e94 <_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 );
109e4b: 9c pushf
109e4c: fa cli
109e4d: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
109e4e: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
109e55: 3b 05 a0 34 12 00 cmp 0x1234a0,%eax
109e5b: 75 13 jne 109e70 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
109e5d: 8b 0d d4 34 12 00 mov 0x1234d4,%ecx
109e63: 49 dec %ecx
109e64: 75 0a jne 109e70 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
109e66: c7 05 d4 34 12 00 02 movl $0x2,0x1234d4
109e6d: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
109e70: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
109e77: 52 push %edx
109e78: 9d popf
109e79: 52 push %edx
109e7a: 52 push %edx
109e7b: 68 f8 ff 03 10 push $0x1003fff8
109e80: 50 push %eax
109e81: e8 46 1e 00 00 call 10bccc <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
109e86: a1 60 32 12 00 mov 0x123260,%eax
109e8b: 48 dec %eax
109e8c: a3 60 32 12 00 mov %eax,0x123260
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
109e91: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
109e94: c9 leave
109e95: c3 ret
0010ef1b <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
10ef1b: 55 push %ebp
10ef1c: 89 e5 mov %esp,%ebp
10ef1e: 57 push %edi
10ef1f: 56 push %esi
10ef20: 53 push %ebx
10ef21: 83 ec 4c sub $0x4c,%esp
10ef24: 8b 5d 08 mov 0x8(%ebp),%ebx
10ef27: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
10ef2a: 8b 43 20 mov 0x20(%ebx),%eax
10ef2d: 89 45 c0 mov %eax,-0x40(%ebp)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
10ef30: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
10ef37: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
10ef3e: 8b 53 10 mov 0x10(%ebx),%edx
10ef41: 89 55 c4 mov %edx,-0x3c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10ef44: 8b 43 14 mov 0x14(%ebx),%eax
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
10ef47: 8b 7b 30 mov 0x30(%ebx),%edi
10ef4a: 89 7d bc mov %edi,-0x44(%ebp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
10ef4d: 31 f6 xor %esi,%esi
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
10ef4f: 8b 7d 0c mov 0xc(%ebp),%edi
10ef52: 01 cf add %ecx,%edi
10ef54: 0f 82 d4 01 00 00 jb 10f12e <_Heap_Extend+0x213>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
10ef5a: 52 push %edx
10ef5b: 52 push %edx
10ef5c: 8d 55 e0 lea -0x20(%ebp),%edx
10ef5f: 52 push %edx
10ef60: 8d 55 e4 lea -0x1c(%ebp),%edx
10ef63: 52 push %edx
10ef64: 50 push %eax
10ef65: ff 75 c4 pushl -0x3c(%ebp)
10ef68: 51 push %ecx
10ef69: ff 75 0c pushl 0xc(%ebp)
10ef6c: e8 3e c3 ff ff call 10b2af <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
10ef71: 83 c4 20 add $0x20,%esp
10ef74: 84 c0 test %al,%al
10ef76: 0f 84 b2 01 00 00 je 10f12e <_Heap_Extend+0x213>
10ef7c: 8b 4d c0 mov -0x40(%ebp),%ecx
10ef7f: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10ef86: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10ef8d: 31 f6 xor %esi,%esi
10ef8f: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
10ef96: 8b 43 18 mov 0x18(%ebx),%eax
10ef99: 89 5d b8 mov %ebx,-0x48(%ebp)
10ef9c: eb 02 jmp 10efa0 <_Heap_Extend+0x85>
10ef9e: 89 c8 mov %ecx,%eax
uintptr_t const sub_area_end = start_block->prev_size;
10efa0: 8b 19 mov (%ecx),%ebx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
10efa2: 39 c7 cmp %eax,%edi
10efa4: 76 09 jbe 10efaf <_Heap_Extend+0x94>
10efa6: 39 5d 0c cmp %ebx,0xc(%ebp)
10efa9: 0f 82 7d 01 00 00 jb 10f12c <_Heap_Extend+0x211>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10efaf: 39 c7 cmp %eax,%edi
10efb1: 74 06 je 10efb9 <_Heap_Extend+0x9e>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10efb3: 39 df cmp %ebx,%edi
10efb5: 72 07 jb 10efbe <_Heap_Extend+0xa3>
10efb7: eb 08 jmp 10efc1 <_Heap_Extend+0xa6>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10efb9: 89 4d d0 mov %ecx,-0x30(%ebp)
10efbc: eb 03 jmp 10efc1 <_Heap_Extend+0xa6>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10efbe: 89 4d c8 mov %ecx,-0x38(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10efc1: 8d 43 f8 lea -0x8(%ebx),%eax
10efc4: 89 45 d4 mov %eax,-0x2c(%ebp)
10efc7: 89 d8 mov %ebx,%eax
10efc9: 31 d2 xor %edx,%edx
10efcb: f7 75 c4 divl -0x3c(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10efce: 29 55 d4 sub %edx,-0x2c(%ebp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
10efd1: 3b 5d 0c cmp 0xc(%ebp),%ebx
10efd4: 75 07 jne 10efdd <_Heap_Extend+0xc2>
start_block->prev_size = extend_area_end;
10efd6: 89 39 mov %edi,(%ecx)
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 )
10efd8: 8b 75 d4 mov -0x2c(%ebp),%esi
10efdb: eb 08 jmp 10efe5 <_Heap_Extend+0xca>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
10efdd: 73 06 jae 10efe5 <_Heap_Extend+0xca>
10efdf: 8b 55 d4 mov -0x2c(%ebp),%edx
10efe2: 89 55 cc mov %edx,-0x34(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10efe5: 8b 45 d4 mov -0x2c(%ebp),%eax
10efe8: 8b 48 04 mov 0x4(%eax),%ecx
10efeb: 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);
10efee: 01 c1 add %eax,%ecx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
10eff0: 3b 4d c0 cmp -0x40(%ebp),%ecx
10eff3: 75 a9 jne 10ef9e <_Heap_Extend+0x83>
10eff5: 8b 5d b8 mov -0x48(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
10eff8: 8b 55 0c mov 0xc(%ebp),%edx
10effb: 3b 53 18 cmp 0x18(%ebx),%edx
10effe: 73 05 jae 10f005 <_Heap_Extend+0xea>
heap->area_begin = extend_area_begin;
10f000: 89 53 18 mov %edx,0x18(%ebx)
10f003: eb 08 jmp 10f00d <_Heap_Extend+0xf2>
} else if ( heap->area_end < extend_area_end ) {
10f005: 39 7b 1c cmp %edi,0x1c(%ebx)
10f008: 73 03 jae 10f00d <_Heap_Extend+0xf2>
heap->area_end = extend_area_end;
10f00a: 89 7b 1c mov %edi,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
10f00d: 8b 45 e0 mov -0x20(%ebp),%eax
10f010: 8b 55 e4 mov -0x1c(%ebp),%edx
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
10f013: 89 c1 mov %eax,%ecx
10f015: 29 d1 sub %edx,%ecx
10f017: 89 4d d4 mov %ecx,-0x2c(%ebp)
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
10f01a: 89 3a mov %edi,(%edx)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
10f01c: 83 c9 01 or $0x1,%ecx
10f01f: 89 4a 04 mov %ecx,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
10f022: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f025: 89 08 mov %ecx,(%eax)
extend_last_block->size_and_flag = 0;
10f027: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
10f02e: 39 53 20 cmp %edx,0x20(%ebx)
10f031: 76 05 jbe 10f038 <_Heap_Extend+0x11d>
heap->first_block = extend_first_block;
10f033: 89 53 20 mov %edx,0x20(%ebx)
10f036: eb 08 jmp 10f040 <_Heap_Extend+0x125>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
10f038: 39 43 24 cmp %eax,0x24(%ebx)
10f03b: 73 03 jae 10f040 <_Heap_Extend+0x125>
heap->last_block = extend_last_block;
10f03d: 89 43 24 mov %eax,0x24(%ebx)
}
if ( merge_below_block != NULL ) {
10f040: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10f044: 74 3b je 10f081 <_Heap_Extend+0x166>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
10f046: 8b 43 10 mov 0x10(%ebx),%eax
10f049: 89 45 d4 mov %eax,-0x2c(%ebp)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10f04c: 8b 4d 0c mov 0xc(%ebp),%ecx
10f04f: 83 c1 08 add $0x8,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10f052: 89 c8 mov %ecx,%eax
10f054: 31 d2 xor %edx,%edx
10f056: f7 75 d4 divl -0x2c(%ebp)
if ( remainder != 0 ) {
10f059: 85 d2 test %edx,%edx
10f05b: 74 05 je 10f062 <_Heap_Extend+0x147> <== ALWAYS TAKEN
return value - remainder + alignment;
10f05d: 03 4d d4 add -0x2c(%ebp),%ecx <== NOT EXECUTED
10f060: 29 d1 sub %edx,%ecx <== NOT EXECUTED
uintptr_t const new_first_block_begin =
10f062: 8d 51 f8 lea -0x8(%ecx),%edx
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
10f065: 8b 45 d0 mov -0x30(%ebp),%eax
10f068: 8b 00 mov (%eax),%eax
10f06a: 89 41 f8 mov %eax,-0x8(%ecx)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
10f06d: 8b 45 d0 mov -0x30(%ebp),%eax
10f070: 29 d0 sub %edx,%eax
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
10f072: 83 c8 01 or $0x1,%eax
10f075: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
10f078: 89 d8 mov %ebx,%eax
10f07a: e8 81 fe ff ff call 10ef00 <_Heap_Free_block>
10f07f: eb 14 jmp 10f095 <_Heap_Extend+0x17a>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
10f081: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10f085: 74 0e je 10f095 <_Heap_Extend+0x17a>
_Heap_Link_below(
10f087: 8b 55 e0 mov -0x20(%ebp),%edx
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
10f08a: 8b 45 c8 mov -0x38(%ebp),%eax
10f08d: 29 d0 sub %edx,%eax
10f08f: 83 c8 01 or $0x1,%eax
10f092: 89 42 04 mov %eax,0x4(%edx)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
10f095: 85 f6 test %esi,%esi
10f097: 74 30 je 10f0c9 <_Heap_Extend+0x1ae>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
10f099: 83 ef 08 sub $0x8,%edi
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
10f09c: 29 f7 sub %esi,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10f09e: 89 f8 mov %edi,%eax
10f0a0: 31 d2 xor %edx,%edx
10f0a2: f7 73 10 divl 0x10(%ebx)
10f0a5: 29 d7 sub %edx,%edi
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
10f0a7: 8b 46 04 mov 0x4(%esi),%eax
10f0aa: 29 f8 sub %edi,%eax
| HEAP_PREV_BLOCK_USED;
10f0ac: 83 c8 01 or $0x1,%eax
10f0af: 89 44 37 04 mov %eax,0x4(%edi,%esi,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f0b3: 8b 46 04 mov 0x4(%esi),%eax
10f0b6: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
10f0b9: 09 f8 or %edi,%eax
10f0bb: 89 46 04 mov %eax,0x4(%esi)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
10f0be: 89 f2 mov %esi,%edx
10f0c0: 89 d8 mov %ebx,%eax
10f0c2: e8 39 fe ff ff call 10ef00 <_Heap_Free_block>
10f0c7: eb 21 jmp 10f0ea <_Heap_Extend+0x1cf>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
10f0c9: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10f0cd: 74 1b je 10f0ea <_Heap_Extend+0x1cf>
_Heap_Link_above(
10f0cf: 8b 4d e0 mov -0x20(%ebp),%ecx
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
10f0d2: 8b 45 e4 mov -0x1c(%ebp),%eax
10f0d5: 2b 45 cc sub -0x34(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f0d8: 8b 7d cc mov -0x34(%ebp),%edi
10f0db: 8b 57 04 mov 0x4(%edi),%edx
10f0de: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
10f0e1: 09 d0 or %edx,%eax
10f0e3: 89 47 04 mov %eax,0x4(%edi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10f0e6: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
10f0ea: 85 f6 test %esi,%esi
10f0ec: 75 10 jne 10f0fe <_Heap_Extend+0x1e3>
10f0ee: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10f0f2: 75 0a jne 10f0fe <_Heap_Extend+0x1e3>
_Heap_Free_block( heap, extend_first_block );
10f0f4: 8b 55 e4 mov -0x1c(%ebp),%edx
10f0f7: 89 d8 mov %ebx,%eax
10f0f9: e8 02 fe ff ff call 10ef00 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
10f0fe: 8b 53 24 mov 0x24(%ebx),%edx
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
10f101: 8b 43 20 mov 0x20(%ebx),%eax
10f104: 29 d0 sub %edx,%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f106: 8b 4a 04 mov 0x4(%edx),%ecx
10f109: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
10f10c: 09 c8 or %ecx,%eax
10f10e: 89 42 04 mov %eax,0x4(%edx)
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
10f111: 8b 43 30 mov 0x30(%ebx),%eax
10f114: 2b 45 bc sub -0x44(%ebp),%eax
/* Statistics */
stats->size += extended_size;
10f117: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
10f11a: be 01 00 00 00 mov $0x1,%esi
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
10f11f: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10f123: 74 09 je 10f12e <_Heap_Extend+0x213> <== NEVER TAKEN
*extended_size_ptr = extended_size;
10f125: 8b 55 14 mov 0x14(%ebp),%edx
10f128: 89 02 mov %eax,(%edx)
10f12a: eb 02 jmp 10f12e <_Heap_Extend+0x213>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
10f12c: 31 f6 xor %esi,%esi
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
10f12e: 89 f0 mov %esi,%eax
10f130: 8d 65 f4 lea -0xc(%ebp),%esp
10f133: 5b pop %ebx
10f134: 5e pop %esi
10f135: 5f pop %edi
10f136: c9 leave
10f137: c3 ret
0010eb60 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10eb60: 55 push %ebp
10eb61: 89 e5 mov %esp,%ebp
10eb63: 57 push %edi
10eb64: 56 push %esi
10eb65: 53 push %ebx
10eb66: 83 ec 14 sub $0x14,%esp
10eb69: 8b 4d 08 mov 0x8(%ebp),%ecx
10eb6c: 8b 45 0c mov 0xc(%ebp),%eax
10eb6f: 8d 58 f8 lea -0x8(%eax),%ebx
10eb72: 31 d2 xor %edx,%edx
10eb74: f7 71 10 divl 0x10(%ecx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10eb77: 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
10eb79: 8b 41 20 mov 0x20(%ecx),%eax
10eb7c: 89 45 ec mov %eax,-0x14(%ebp)
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10eb7f: 31 d2 xor %edx,%edx
10eb81: 39 c3 cmp %eax,%ebx
10eb83: 72 08 jb 10eb8d <_Heap_Free+0x2d>
10eb85: 31 d2 xor %edx,%edx
10eb87: 39 59 24 cmp %ebx,0x24(%ecx)
10eb8a: 0f 93 c2 setae %dl
bool next_is_free = false;
_Heap_Protection_block_check( heap, block );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10eb8d: 31 c0 xor %eax,%eax
uintptr_t next_block_size = 0;
bool next_is_free = false;
_Heap_Protection_block_check( heap, block );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10eb8f: 85 d2 test %edx,%edx
10eb91: 0f 84 21 01 00 00 je 10ecb8 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10eb97: 8b 43 04 mov 0x4(%ebx),%eax
10eb9a: 89 45 f0 mov %eax,-0x10(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10eb9d: 89 c6 mov %eax,%esi
10eb9f: 83 e6 fe and $0xfffffffe,%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10eba2: 8d 14 33 lea (%ebx,%esi,1),%edx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10eba5: 31 ff xor %edi,%edi
10eba7: 3b 55 ec cmp -0x14(%ebp),%edx
10ebaa: 72 0a jb 10ebb6 <_Heap_Free+0x56> <== NEVER TAKEN
10ebac: 31 c0 xor %eax,%eax
10ebae: 39 51 24 cmp %edx,0x24(%ecx)
10ebb1: 0f 93 c0 setae %al
10ebb4: 89 c7 mov %eax,%edi
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
10ebb6: 31 c0 xor %eax,%eax
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10ebb8: 85 ff test %edi,%edi
10ebba: 0f 84 f8 00 00 00 je 10ecb8 <_Heap_Free+0x158> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10ebc0: 8b 7a 04 mov 0x4(%edx),%edi
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10ebc3: f7 c7 01 00 00 00 test $0x1,%edi
10ebc9: 0f 84 e9 00 00 00 je 10ecb8 <_Heap_Free+0x158> <== 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;
10ebcf: 83 e7 fe and $0xfffffffe,%edi
10ebd2: 89 7d e8 mov %edi,-0x18(%ebp)
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10ebd5: 8b 41 24 mov 0x24(%ecx),%eax
10ebd8: 89 45 e4 mov %eax,-0x1c(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10ebdb: 31 c0 xor %eax,%eax
10ebdd: 3b 55 e4 cmp -0x1c(%ebp),%edx
10ebe0: 74 0a je 10ebec <_Heap_Free+0x8c>
10ebe2: 31 c0 xor %eax,%eax
10ebe4: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1)
10ebe9: 0f 94 c0 sete %al
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10ebec: 88 45 e3 mov %al,-0x1d(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
10ebef: f6 45 f0 01 testb $0x1,-0x10(%ebp)
10ebf3: 75 62 jne 10ec57 <_Heap_Free+0xf7>
uintptr_t const prev_size = block->prev_size;
10ebf5: 8b 03 mov (%ebx),%eax
10ebf7: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10ebfa: 29 c3 sub %eax,%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;
10ebfc: 31 ff xor %edi,%edi
10ebfe: 3b 5d ec cmp -0x14(%ebp),%ebx
10ec01: 72 0a jb 10ec0d <_Heap_Free+0xad> <== NEVER TAKEN
10ec03: 31 c0 xor %eax,%eax
10ec05: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10ec08: 0f 93 c0 setae %al
10ec0b: 89 c7 mov %eax,%edi
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
_HAssert( false );
return( false );
10ec0d: 31 c0 xor %eax,%eax
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
10ec0f: 85 ff test %edi,%edi
10ec11: 0f 84 a1 00 00 00 je 10ecb8 <_Heap_Free+0x158> <== 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) ) {
10ec17: f6 43 04 01 testb $0x1,0x4(%ebx)
10ec1b: 0f 84 97 00 00 00 je 10ecb8 <_Heap_Free+0x158> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10ec21: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10ec25: 74 1a je 10ec41 <_Heap_Free+0xe1>
uintptr_t const size = block_size + prev_size + next_block_size;
10ec27: 8b 45 e8 mov -0x18(%ebp),%eax
10ec2a: 8d 04 06 lea (%esi,%eax,1),%eax
10ec2d: 03 45 f0 add -0x10(%ebp),%eax
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10ec30: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = block->prev;
10ec33: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
10ec36: 89 7a 08 mov %edi,0x8(%edx)
next->prev = prev;
10ec39: 89 57 0c mov %edx,0xc(%edi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10ec3c: ff 49 38 decl 0x38(%ecx)
10ec3f: eb 33 jmp 10ec74 <_Heap_Free+0x114>
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;
10ec41: 8b 45 f0 mov -0x10(%ebp),%eax
10ec44: 8d 04 06 lea (%esi,%eax,1),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10ec47: 89 c7 mov %eax,%edi
10ec49: 83 cf 01 or $0x1,%edi
10ec4c: 89 7b 04 mov %edi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10ec4f: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
10ec53: 89 02 mov %eax,(%edx)
10ec55: eb 56 jmp 10ecad <_Heap_Free+0x14d>
}
} else if ( next_is_free ) { /* coalesce next */
10ec57: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10ec5b: 74 24 je 10ec81 <_Heap_Free+0x121>
uintptr_t const size = block_size + next_block_size;
10ec5d: 8b 45 e8 mov -0x18(%ebp),%eax
10ec60: 01 f0 add %esi,%eax
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10ec62: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = old_block->prev;
10ec65: 8b 52 0c mov 0xc(%edx),%edx
new_block->next = next;
10ec68: 89 7b 08 mov %edi,0x8(%ebx)
new_block->prev = prev;
10ec6b: 89 53 0c mov %edx,0xc(%ebx)
next->prev = new_block;
10ec6e: 89 5f 0c mov %ebx,0xc(%edi)
prev->next = new_block;
10ec71: 89 5a 08 mov %ebx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10ec74: 89 c2 mov %eax,%edx
10ec76: 83 ca 01 or $0x1,%edx
10ec79: 89 53 04 mov %edx,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10ec7c: 89 04 03 mov %eax,(%ebx,%eax,1)
10ec7f: eb 2c jmp 10ecad <_Heap_Free+0x14d>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10ec81: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
10ec84: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
10ec87: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10ec8a: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10ec8d: 89 58 0c mov %ebx,0xc(%eax)
} 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;
10ec90: 89 f0 mov %esi,%eax
10ec92: 83 c8 01 or $0x1,%eax
10ec95: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10ec98: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
10ec9c: 89 32 mov %esi,(%edx)
/* Statistics */
++stats->free_blocks;
10ec9e: 8b 41 38 mov 0x38(%ecx),%eax
10eca1: 40 inc %eax
10eca2: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
10eca5: 39 41 3c cmp %eax,0x3c(%ecx)
10eca8: 73 03 jae 10ecad <_Heap_Free+0x14d>
stats->max_free_blocks = stats->free_blocks;
10ecaa: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10ecad: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10ecb0: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10ecb3: 01 71 30 add %esi,0x30(%ecx)
return( true );
10ecb6: b0 01 mov $0x1,%al
}
10ecb8: 83 c4 14 add $0x14,%esp
10ecbb: 5b pop %ebx
10ecbc: 5e pop %esi
10ecbd: 5f pop %edi
10ecbe: c9 leave
10ecbf: c3 ret
0011bd30 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11bd30: 55 push %ebp
11bd31: 89 e5 mov %esp,%ebp
11bd33: 57 push %edi
11bd34: 56 push %esi
11bd35: 53 push %ebx
11bd36: 8b 5d 08 mov 0x8(%ebp),%ebx
11bd39: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11bd3c: 8d 4e f8 lea -0x8(%esi),%ecx
11bd3f: 89 f0 mov %esi,%eax
11bd41: 31 d2 xor %edx,%edx
11bd43: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11bd46: 29 d1 sub %edx,%ecx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
11bd48: 8b 53 20 mov 0x20(%ebx),%edx
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11bd4b: 31 ff xor %edi,%edi
11bd4d: 39 d1 cmp %edx,%ecx
11bd4f: 72 0a jb 11bd5b <_Heap_Size_of_alloc_area+0x2b>
11bd51: 31 c0 xor %eax,%eax
11bd53: 39 4b 24 cmp %ecx,0x24(%ebx)
11bd56: 0f 93 c0 setae %al
11bd59: 89 c7 mov %eax,%edi
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 ) ) {
return false;
11bd5b: 31 c0 xor %eax,%eax
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 ) ) {
11bd5d: 85 ff test %edi,%edi
11bd5f: 74 30 je 11bd91 <_Heap_Size_of_alloc_area+0x61>
- 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;
11bd61: 8b 41 04 mov 0x4(%ecx),%eax
11bd64: 83 e0 fe and $0xfffffffe,%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11bd67: 01 c1 add %eax,%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;
11bd69: 31 ff xor %edi,%edi
11bd6b: 39 d1 cmp %edx,%ecx
11bd6d: 72 0a jb 11bd79 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN
11bd6f: 31 c0 xor %eax,%eax
11bd71: 39 4b 24 cmp %ecx,0x24(%ebx)
11bd74: 0f 93 c0 setae %al
11bd77: 89 c7 mov %eax,%edi
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
11bd79: 31 c0 xor %eax,%eax
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
11bd7b: 85 ff test %edi,%edi
11bd7d: 74 12 je 11bd91 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
11bd7f: f6 41 04 01 testb $0x1,0x4(%ecx)
11bd83: 74 0c je 11bd91 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11bd85: 29 f1 sub %esi,%ecx
11bd87: 8d 51 04 lea 0x4(%ecx),%edx
11bd8a: 8b 45 10 mov 0x10(%ebp),%eax
11bd8d: 89 10 mov %edx,(%eax)
return true;
11bd8f: b0 01 mov $0x1,%al
}
11bd91: 5b pop %ebx
11bd92: 5e pop %esi
11bd93: 5f pop %edi
11bd94: c9 leave
11bd95: c3 ret
0010bb6a <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10bb6a: 55 push %ebp
10bb6b: 89 e5 mov %esp,%ebp
10bb6d: 57 push %edi
10bb6e: 56 push %esi
10bb6f: 53 push %ebx
10bb70: 83 ec 4c sub $0x4c,%esp
10bb73: 8b 75 08 mov 0x8(%ebp),%esi
10bb76: 8b 5d 0c mov 0xc(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10bb79: 8b 46 10 mov 0x10(%esi),%eax
10bb7c: 89 45 d8 mov %eax,-0x28(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10bb7f: 8b 4e 14 mov 0x14(%esi),%ecx
10bb82: 89 4d d4 mov %ecx,-0x2c(%ebp)
Heap_Block *const first_block = heap->first_block;
10bb85: 8b 46 20 mov 0x20(%esi),%eax
10bb88: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *const last_block = heap->last_block;
10bb8b: 8b 4e 24 mov 0x24(%esi),%ecx
10bb8e: 89 4d c8 mov %ecx,-0x38(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10bb91: c7 45 e4 2c bb 10 00 movl $0x10bb2c,-0x1c(%ebp)
10bb98: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10bb9c: 74 07 je 10bba5 <_Heap_Walk+0x3b>
10bb9e: c7 45 e4 31 bb 10 00 movl $0x10bb31,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
10bba5: b0 01 mov $0x1,%al
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10bba7: 83 3d 64 54 12 00 03 cmpl $0x3,0x125464
10bbae: 0f 85 e8 02 00 00 jne 10be9c <_Heap_Walk+0x332>
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)(
10bbb4: 52 push %edx
10bbb5: ff 76 0c pushl 0xc(%esi)
10bbb8: ff 76 08 pushl 0x8(%esi)
10bbbb: ff 75 c8 pushl -0x38(%ebp)
10bbbe: ff 75 d0 pushl -0x30(%ebp)
10bbc1: ff 76 1c pushl 0x1c(%esi)
10bbc4: ff 76 18 pushl 0x18(%esi)
10bbc7: ff 75 d4 pushl -0x2c(%ebp)
10bbca: ff 75 d8 pushl -0x28(%ebp)
10bbcd: 68 b1 e8 11 00 push $0x11e8b1
10bbd2: 6a 00 push $0x0
10bbd4: 53 push %ebx
10bbd5: 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 ) {
10bbd8: 83 c4 30 add $0x30,%esp
10bbdb: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
10bbdf: 75 0b jne 10bbec <_Heap_Walk+0x82>
(*printer)( source, true, "page size is zero\n" );
10bbe1: 50 push %eax
10bbe2: 68 42 e9 11 00 push $0x11e942
10bbe7: e9 6b 02 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10bbec: f6 45 d8 03 testb $0x3,-0x28(%ebp)
10bbf0: 74 0d je 10bbff <_Heap_Walk+0x95>
(*printer)(
10bbf2: ff 75 d8 pushl -0x28(%ebp)
10bbf5: 68 55 e9 11 00 push $0x11e955
10bbfa: e9 58 02 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10bbff: 8b 45 d4 mov -0x2c(%ebp),%eax
10bc02: 31 d2 xor %edx,%edx
10bc04: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10bc07: 85 d2 test %edx,%edx
10bc09: 74 0d je 10bc18 <_Heap_Walk+0xae>
(*printer)(
10bc0b: ff 75 d4 pushl -0x2c(%ebp)
10bc0e: 68 73 e9 11 00 push $0x11e973
10bc13: e9 3f 02 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10bc18: 8b 45 d0 mov -0x30(%ebp),%eax
10bc1b: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10bc1e: 31 d2 xor %edx,%edx
10bc20: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if (
10bc23: 85 d2 test %edx,%edx
10bc25: 74 0d je 10bc34 <_Heap_Walk+0xca>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10bc27: ff 75 d0 pushl -0x30(%ebp)
10bc2a: 68 97 e9 11 00 push $0x11e997
10bc2f: e9 23 02 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10bc34: 8b 45 d0 mov -0x30(%ebp),%eax
10bc37: f6 40 04 01 testb $0x1,0x4(%eax)
10bc3b: 75 0b jne 10bc48 <_Heap_Walk+0xde>
(*printer)(
10bc3d: 57 push %edi
10bc3e: 68 c8 e9 11 00 push $0x11e9c8
10bc43: e9 0f 02 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
- 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;
10bc48: 8b 4d c8 mov -0x38(%ebp),%ecx
10bc4b: 8b 79 04 mov 0x4(%ecx),%edi
10bc4e: 83 e7 fe and $0xfffffffe,%edi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10bc51: 01 cf add %ecx,%edi
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10bc53: f6 47 04 01 testb $0x1,0x4(%edi)
10bc57: 75 0b jne 10bc64 <_Heap_Walk+0xfa>
(*printer)(
10bc59: 56 push %esi
10bc5a: 68 f6 e9 11 00 push $0x11e9f6
10bc5f: e9 f3 01 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
);
return false;
}
if (
10bc64: 3b 7d d0 cmp -0x30(%ebp),%edi
10bc67: 74 0b je 10bc74 <_Heap_Walk+0x10a> <== ALWAYS TAKEN
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10bc69: 51 push %ecx <== NOT EXECUTED
10bc6a: 68 0b ea 11 00 push $0x11ea0b <== NOT EXECUTED
10bc6f: e9 e3 01 00 00 jmp 10be57 <_Heap_Walk+0x2ed> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10bc74: 8b 46 10 mov 0x10(%esi),%eax
10bc77: 89 45 e0 mov %eax,-0x20(%ebp)
block = next_block;
} while ( block != first_block );
return true;
}
10bc7a: 8b 4e 08 mov 0x8(%esi),%ecx
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
10bc7d: 89 75 dc mov %esi,-0x24(%ebp)
10bc80: eb 75 jmp 10bcf7 <_Heap_Walk+0x18d>
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;
10bc82: 31 c0 xor %eax,%eax
10bc84: 39 4e 20 cmp %ecx,0x20(%esi)
10bc87: 77 08 ja 10bc91 <_Heap_Walk+0x127>
10bc89: 31 c0 xor %eax,%eax
10bc8b: 39 4e 24 cmp %ecx,0x24(%esi)
10bc8e: 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 ) ) {
10bc91: 85 c0 test %eax,%eax
10bc93: 75 0b jne 10bca0 <_Heap_Walk+0x136>
(*printer)(
10bc95: 51 push %ecx
10bc96: 68 3a ea 11 00 push $0x11ea3a
10bc9b: e9 b7 01 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10bca0: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10bca3: 31 d2 xor %edx,%edx
10bca5: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10bca8: 85 d2 test %edx,%edx
10bcaa: 74 0b je 10bcb7 <_Heap_Walk+0x14d>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10bcac: 51 push %ecx
10bcad: 68 5a ea 11 00 push $0x11ea5a
10bcb2: e9 a0 01 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
- 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;
10bcb7: 8b 41 04 mov 0x4(%ecx),%eax
10bcba: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10bcbd: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10bcc2: 74 0b je 10bccf <_Heap_Walk+0x165>
(*printer)(
10bcc4: 51 push %ecx
10bcc5: 68 8a ea 11 00 push $0x11ea8a
10bcca: e9 88 01 00 00 jmp 10be57 <_Heap_Walk+0x2ed>
);
return false;
}
if ( free_block->prev != prev_block ) {
10bccf: 8b 41 0c mov 0xc(%ecx),%eax
10bcd2: 3b 45 dc cmp -0x24(%ebp),%eax
10bcd5: 74 1a je 10bcf1 <_Heap_Walk+0x187>
(*printer)(
10bcd7: 83 ec 0c sub $0xc,%esp
10bcda: 50 push %eax
10bcdb: 51 push %ecx
10bcdc: 68 a6 ea 11 00 push $0x11eaa6
10bce1: 6a 01 push $0x1
10bce3: 53 push %ebx
10bce4: ff 55 e4 call *-0x1c(%ebp)
10bce7: 83 c4 20 add $0x20,%esp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
10bcea: 31 c0 xor %eax,%eax
10bcec: e9 ab 01 00 00 jmp 10be9c <_Heap_Walk+0x332>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10bcf1: 89 4d dc mov %ecx,-0x24(%ebp)
10bcf4: 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 ) {
10bcf7: 39 f1 cmp %esi,%ecx
10bcf9: 75 87 jne 10bc82 <_Heap_Walk+0x118>
10bcfb: 89 5d dc mov %ebx,-0x24(%ebp)
10bcfe: eb 02 jmp 10bd02 <_Heap_Walk+0x198>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10bd00: 89 df mov %ebx,%edi
return true;
}
10bd02: 8b 4f 04 mov 0x4(%edi),%ecx
10bd05: 89 4d cc mov %ecx,-0x34(%ebp)
10bd08: 83 e1 fe and $0xfffffffe,%ecx
10bd0b: 89 4d e0 mov %ecx,-0x20(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10bd0e: 8d 1c 0f lea (%edi,%ecx,1),%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;
10bd11: 31 c0 xor %eax,%eax
10bd13: 39 5e 20 cmp %ebx,0x20(%esi)
10bd16: 77 08 ja 10bd20 <_Heap_Walk+0x1b6> <== NEVER TAKEN
10bd18: 31 c0 xor %eax,%eax
10bd1a: 39 5e 24 cmp %ebx,0x24(%esi)
10bd1d: 0f 93 c0 setae %al
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10bd20: 85 c0 test %eax,%eax
10bd22: 75 11 jne 10bd35 <_Heap_Walk+0x1cb>
10bd24: 89 d9 mov %ebx,%ecx
10bd26: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bd29: 83 ec 0c sub $0xc,%esp
10bd2c: 51 push %ecx
10bd2d: 57 push %edi
10bd2e: 68 d8 ea 11 00 push $0x11ead8
10bd33: eb ac jmp 10bce1 <_Heap_Walk+0x177>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10bd35: 3b 7d c8 cmp -0x38(%ebp),%edi
10bd38: 0f 95 c1 setne %cl
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10bd3b: 8b 45 e0 mov -0x20(%ebp),%eax
10bd3e: 31 d2 xor %edx,%edx
10bd40: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10bd43: 85 d2 test %edx,%edx
10bd45: 74 15 je 10bd5c <_Heap_Walk+0x1f2>
10bd47: 84 c9 test %cl,%cl
10bd49: 74 11 je 10bd5c <_Heap_Walk+0x1f2>
10bd4b: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bd4e: 83 ec 0c sub $0xc,%esp
10bd51: ff 75 e0 pushl -0x20(%ebp)
10bd54: 57 push %edi
10bd55: 68 05 eb 11 00 push $0x11eb05
10bd5a: eb 85 jmp 10bce1 <_Heap_Walk+0x177>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10bd5c: 8b 45 d4 mov -0x2c(%ebp),%eax
10bd5f: 39 45 e0 cmp %eax,-0x20(%ebp)
10bd62: 73 18 jae 10bd7c <_Heap_Walk+0x212>
10bd64: 84 c9 test %cl,%cl
10bd66: 74 14 je 10bd7c <_Heap_Walk+0x212> <== NEVER TAKEN
10bd68: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bd6b: 52 push %edx
10bd6c: 52 push %edx
10bd6d: 50 push %eax
10bd6e: ff 75 e0 pushl -0x20(%ebp)
10bd71: 57 push %edi
10bd72: 68 33 eb 11 00 push $0x11eb33
10bd77: e9 65 ff ff ff jmp 10bce1 <_Heap_Walk+0x177>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10bd7c: 39 fb cmp %edi,%ebx
10bd7e: 77 18 ja 10bd98 <_Heap_Walk+0x22e>
10bd80: 84 c9 test %cl,%cl
10bd82: 74 14 je 10bd98 <_Heap_Walk+0x22e>
10bd84: 89 d9 mov %ebx,%ecx
10bd86: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10bd89: 83 ec 0c sub $0xc,%esp
10bd8c: 51 push %ecx
10bd8d: 57 push %edi
10bd8e: 68 5e eb 11 00 push $0x11eb5e
10bd93: e9 49 ff ff ff jmp 10bce1 <_Heap_Walk+0x177>
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;
10bd98: 8b 4d cc mov -0x34(%ebp),%ecx
10bd9b: 83 e1 01 and $0x1,%ecx
10bd9e: 89 4d c4 mov %ecx,-0x3c(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10bda1: f6 43 04 01 testb $0x1,0x4(%ebx)
10bda5: 0f 85 ba 00 00 00 jne 10be65 <_Heap_Walk+0x2fb>
block = next_block;
} while ( block != first_block );
return true;
}
10bdab: 8b 46 08 mov 0x8(%esi),%eax
10bdae: 89 45 c0 mov %eax,-0x40(%ebp)
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10bdb1: 8b 4f 08 mov 0x8(%edi),%ecx
10bdb4: 89 4d b4 mov %ecx,-0x4c(%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)(
10bdb7: ba 7e e8 11 00 mov $0x11e87e,%edx
10bdbc: 3b 4e 0c cmp 0xc(%esi),%ecx
10bdbf: 74 0e je 10bdcf <_Heap_Walk+0x265>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10bdc1: ba b5 e7 11 00 mov $0x11e7b5,%edx
10bdc6: 39 f1 cmp %esi,%ecx
10bdc8: 75 05 jne 10bdcf <_Heap_Walk+0x265>
10bdca: ba 8d e8 11 00 mov $0x11e88d,%edx
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10bdcf: 8b 47 0c mov 0xc(%edi),%eax
10bdd2: 89 45 cc mov %eax,-0x34(%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)(
10bdd5: b8 97 e8 11 00 mov $0x11e897,%eax
10bdda: 8b 4d c0 mov -0x40(%ebp),%ecx
10bddd: 39 4d cc cmp %ecx,-0x34(%ebp)
10bde0: 74 0f je 10bdf1 <_Heap_Walk+0x287>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10bde2: b8 b5 e7 11 00 mov $0x11e7b5,%eax
10bde7: 39 75 cc cmp %esi,-0x34(%ebp)
10bdea: 75 05 jne 10bdf1 <_Heap_Walk+0x287>
10bdec: b8 a7 e8 11 00 mov $0x11e8a7,%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)(
10bdf1: 83 ec 0c sub $0xc,%esp
10bdf4: 52 push %edx
10bdf5: ff 75 b4 pushl -0x4c(%ebp)
10bdf8: 50 push %eax
10bdf9: ff 75 cc pushl -0x34(%ebp)
10bdfc: ff 75 e0 pushl -0x20(%ebp)
10bdff: 57 push %edi
10be00: 68 92 eb 11 00 push $0x11eb92
10be05: 6a 00 push $0x0
10be07: ff 75 dc pushl -0x24(%ebp)
10be0a: ff 55 e4 call *-0x1c(%ebp)
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10be0d: 8b 03 mov (%ebx),%eax
10be0f: 83 c4 30 add $0x30,%esp
10be12: 39 45 e0 cmp %eax,-0x20(%ebp)
10be15: 74 16 je 10be2d <_Heap_Walk+0x2c3>
10be17: 89 d9 mov %ebx,%ecx
10be19: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10be1c: 56 push %esi
10be1d: 51 push %ecx
10be1e: 50 push %eax
10be1f: ff 75 e0 pushl -0x20(%ebp)
10be22: 57 push %edi
10be23: 68 c7 eb 11 00 push $0x11ebc7
10be28: e9 b4 fe ff ff jmp 10bce1 <_Heap_Walk+0x177>
);
return false;
}
if ( !prev_used ) {
10be2d: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10be31: 75 0b jne 10be3e <_Heap_Walk+0x2d4>
10be33: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10be36: 57 push %edi
10be37: 68 00 ec 11 00 push $0x11ec00
10be3c: eb 19 jmp 10be57 <_Heap_Walk+0x2ed>
block = next_block;
} while ( block != first_block );
return true;
}
10be3e: 8b 46 08 mov 0x8(%esi),%eax
10be41: eb 07 jmp 10be4a <_Heap_Walk+0x2e0>
{
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 ) {
10be43: 39 f8 cmp %edi,%eax
10be45: 74 4a je 10be91 <_Heap_Walk+0x327>
return true;
}
free_block = free_block->next;
10be47: 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 ) {
10be4a: 39 f0 cmp %esi,%eax
10be4c: 75 f5 jne 10be43 <_Heap_Walk+0x2d9>
10be4e: 8b 5d dc mov -0x24(%ebp),%ebx
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10be51: 57 push %edi
10be52: 68 6b ec 11 00 push $0x11ec6b
10be57: 6a 01 push $0x1
10be59: 53 push %ebx
10be5a: ff 55 e4 call *-0x1c(%ebp)
10be5d: 83 c4 10 add $0x10,%esp
10be60: e9 85 fe ff ff jmp 10bcea <_Heap_Walk+0x180>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10be65: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10be69: 74 0e je 10be79 <_Heap_Walk+0x30f>
(*printer)(
10be6b: 83 ec 0c sub $0xc,%esp
10be6e: ff 75 e0 pushl -0x20(%ebp)
10be71: 57 push %edi
10be72: 68 2f ec 11 00 push $0x11ec2f
10be77: eb 0d jmp 10be86 <_Heap_Walk+0x31c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10be79: 51 push %ecx
10be7a: 51 push %ecx
10be7b: ff 37 pushl (%edi)
10be7d: ff 75 e0 pushl -0x20(%ebp)
10be80: 57 push %edi
10be81: 68 46 ec 11 00 push $0x11ec46
10be86: 6a 00 push $0x0
10be88: ff 75 dc pushl -0x24(%ebp)
10be8b: ff 55 e4 call *-0x1c(%ebp)
10be8e: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10be91: 3b 5d d0 cmp -0x30(%ebp),%ebx
10be94: 0f 85 66 fe ff ff jne 10bd00 <_Heap_Walk+0x196>
return true;
10be9a: b0 01 mov $0x1,%al
}
10be9c: 8d 65 f4 lea -0xc(%ebp),%esp
10be9f: 5b pop %ebx
10bea0: 5e pop %esi
10bea1: 5f pop %edi
10bea2: c9 leave
10bea3: c3 ret
0010b18c <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10b18c: 55 push %ebp
10b18d: 89 e5 mov %esp,%ebp
10b18f: 53 push %ebx
10b190: 83 ec 08 sub $0x8,%esp
10b193: 8b 45 08 mov 0x8(%ebp),%eax
10b196: 8b 55 0c mov 0xc(%ebp),%edx
10b199: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10b19c: a3 18 33 12 00 mov %eax,0x123318
_Internal_errors_What_happened.is_internal = is_internal;
10b1a1: 88 15 1c 33 12 00 mov %dl,0x12331c
_Internal_errors_What_happened.the_error = the_error;
10b1a7: 89 1d 20 33 12 00 mov %ebx,0x123320
_User_extensions_Fatal( the_source, is_internal, the_error );
10b1ad: 53 push %ebx
10b1ae: 0f b6 d2 movzbl %dl,%edx
10b1b1: 52 push %edx
10b1b2: 50 push %eax
10b1b3: e8 73 19 00 00 call 10cb2b <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10b1b8: c7 05 dc 33 12 00 05 movl $0x5,0x1233dc <== NOT EXECUTED
10b1bf: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10b1c2: fa cli <== NOT EXECUTED
10b1c3: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10b1c5: f4 hlt <== NOT EXECUTED
10b1c6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b1c9: eb fe jmp 10b1c9 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010b21c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10b21c: 55 push %ebp
10b21d: 89 e5 mov %esp,%ebp
10b21f: 56 push %esi
10b220: 53 push %ebx
10b221: 8b 5d 08 mov 0x8(%ebp),%ebx
* 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 )
return NULL;
10b224: 31 c9 xor %ecx,%ecx
* 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 )
10b226: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10b22a: 74 53 je 10b27f <_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 );
10b22c: 8d 73 20 lea 0x20(%ebx),%esi
10b22f: 83 ec 0c sub $0xc,%esp
10b232: 56 push %esi
10b233: e8 94 f7 ff ff call 10a9cc <_Chain_Get>
10b238: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10b23a: 83 c4 10 add $0x10,%esp
10b23d: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b241: 74 3c je 10b27f <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10b243: 85 c0 test %eax,%eax
10b245: 75 1a jne 10b261 <_Objects_Allocate+0x45>
_Objects_Extend_information( information );
10b247: 83 ec 0c sub $0xc,%esp
10b24a: 53 push %ebx
10b24b: e8 60 00 00 00 call 10b2b0 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10b250: 89 34 24 mov %esi,(%esp)
10b253: e8 74 f7 ff ff call 10a9cc <_Chain_Get>
10b258: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10b25a: 83 c4 10 add $0x10,%esp
10b25d: 85 c0 test %eax,%eax
10b25f: 74 1e je 10b27f <_Objects_Allocate+0x63>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10b261: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10b265: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10b269: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10b26b: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10b26f: 31 d2 xor %edx,%edx
10b271: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10b273: c1 e0 02 shl $0x2,%eax
10b276: 03 43 30 add 0x30(%ebx),%eax
10b279: ff 08 decl (%eax)
information->inactive--;
10b27b: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10b27f: 89 c8 mov %ecx,%eax
10b281: 8d 65 f8 lea -0x8(%ebp),%esp
10b284: 5b pop %ebx
10b285: 5e pop %esi
10b286: c9 leave
10b287: c3 ret
0010b5a4 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10b5a4: 55 push %ebp
10b5a5: 89 e5 mov %esp,%ebp
10b5a7: 57 push %edi
10b5a8: 56 push %esi
10b5a9: 53 push %ebx
10b5aa: 83 ec 0c sub $0xc,%esp
10b5ad: 8b 75 08 mov 0x8(%ebp),%esi
10b5b0: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
10b5b3: 31 db xor %ebx,%ebx
)
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10b5b5: 66 85 ff test %di,%di
10b5b8: 74 37 je 10b5f1 <_Objects_Get_information+0x4d>
/*
* 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 );
10b5ba: 83 ec 0c sub $0xc,%esp
10b5bd: 56 push %esi
10b5be: e8 fd 36 00 00 call 10ecc0 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10b5c3: 83 c4 10 add $0x10,%esp
10b5c6: 85 c0 test %eax,%eax
10b5c8: 74 27 je 10b5f1 <_Objects_Get_information+0x4d>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10b5ca: 0f b7 ff movzwl %di,%edi
10b5cd: 39 c7 cmp %eax,%edi
10b5cf: 77 20 ja 10b5f1 <_Objects_Get_information+0x4d>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10b5d1: 8b 04 b5 38 32 12 00 mov 0x123238(,%esi,4),%eax
10b5d8: 85 c0 test %eax,%eax
10b5da: 74 15 je 10b5f1 <_Objects_Get_information+0x4d><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10b5dc: 8b 1c b8 mov (%eax,%edi,4),%ebx
if ( !info )
10b5df: 85 db test %ebx,%ebx
10b5e1: 74 0e je 10b5f1 <_Objects_Get_information+0x4d><== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
10b5e3: 31 c0 xor %eax,%eax
10b5e5: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx)
10b5ea: 0f 95 c0 setne %al
10b5ed: f7 d8 neg %eax
10b5ef: 21 c3 and %eax,%ebx
#endif
return info;
}
10b5f1: 89 d8 mov %ebx,%eax
10b5f3: 8d 65 f4 lea -0xc(%ebp),%esp
10b5f6: 5b pop %ebx
10b5f7: 5e pop %esi
10b5f8: 5f pop %edi
10b5f9: c9 leave
10b5fa: c3 ret
001189b8 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
1189b8: 55 push %ebp
1189b9: 89 e5 mov %esp,%ebp
1189bb: 53 push %ebx
1189bc: 8b 55 08 mov 0x8(%ebp),%edx
1189bf: 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;
1189c2: b8 01 00 00 00 mov $0x1,%eax
1189c7: 2b 42 08 sub 0x8(%edx),%eax
1189ca: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
1189cd: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
1189d1: 39 c3 cmp %eax,%ebx
1189d3: 72 12 jb 1189e7 <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
1189d5: 8b 52 1c mov 0x1c(%edx),%edx
1189d8: 8b 04 82 mov (%edx,%eax,4),%eax
1189db: 85 c0 test %eax,%eax
1189dd: 74 08 je 1189e7 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
1189df: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
1189e5: eb 08 jmp 1189ef <_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;
1189e7: c7 01 01 00 00 00 movl $0x1,(%ecx)
return NULL;
1189ed: 31 c0 xor %eax,%eax
}
1189ef: 5b pop %ebx
1189f0: c9 leave
1189f1: c3 ret
0010c7d0 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10c7d0: 55 push %ebp
10c7d1: 89 e5 mov %esp,%ebp
10c7d3: 53 push %ebx
10c7d4: 83 ec 14 sub $0x14,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10c7d7: 8b 45 08 mov 0x8(%ebp),%eax
10c7da: 85 c0 test %eax,%eax
10c7dc: 75 08 jne 10c7e6 <_Objects_Id_to_name+0x16>
10c7de: a1 2c 65 12 00 mov 0x12652c,%eax
10c7e3: 8b 40 08 mov 0x8(%eax),%eax
10c7e6: 89 c2 mov %eax,%edx
10c7e8: c1 ea 18 shr $0x18,%edx
10c7eb: 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 )
10c7ee: 8d 4a ff lea -0x1(%edx),%ecx
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
10c7f1: bb 03 00 00 00 mov $0x3,%ebx
10c7f6: 83 f9 02 cmp $0x2,%ecx
10c7f9: 77 30 ja 10c82b <_Objects_Id_to_name+0x5b>
10c7fb: eb 35 jmp 10c832 <_Objects_Id_to_name+0x62>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10c7fd: 89 c1 mov %eax,%ecx
10c7ff: c1 e9 1b shr $0x1b,%ecx
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10c802: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10c805: 85 d2 test %edx,%edx
10c807: 74 22 je 10c82b <_Objects_Id_to_name+0x5b><== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10c809: 51 push %ecx
10c80a: 8d 4d f4 lea -0xc(%ebp),%ecx
10c80d: 51 push %ecx
10c80e: 50 push %eax
10c80f: 52 push %edx
10c810: e8 63 ff ff ff call 10c778 <_Objects_Get>
if ( !the_object )
10c815: 83 c4 10 add $0x10,%esp
10c818: 85 c0 test %eax,%eax
10c81a: 74 0f je 10c82b <_Objects_Id_to_name+0x5b>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10c81c: 8b 50 0c mov 0xc(%eax),%edx
10c81f: 8b 45 0c mov 0xc(%ebp),%eax
10c822: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c824: e8 71 09 00 00 call 10d19a <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10c829: 31 db xor %ebx,%ebx
}
10c82b: 89 d8 mov %ebx,%eax
10c82d: 8b 5d fc mov -0x4(%ebp),%ebx
10c830: c9 leave
10c831: 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 ] )
10c832: 8b 14 95 c4 62 12 00 mov 0x1262c4(,%edx,4),%edx
10c839: 85 d2 test %edx,%edx
10c83b: 75 c0 jne 10c7fd <_Objects_Id_to_name+0x2d>
10c83d: eb ec jmp 10c82b <_Objects_Id_to_name+0x5b>
0010b6a4 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10b6a4: 55 push %ebp
10b6a5: 89 e5 mov %esp,%ebp
10b6a7: 57 push %edi
10b6a8: 56 push %esi
10b6a9: 53 push %ebx
10b6aa: 83 ec 0c sub $0xc,%esp
10b6ad: 8b 45 08 mov 0x8(%ebp),%eax
10b6b0: 8b 5d 0c mov 0xc(%ebp),%ebx
10b6b3: 8b 75 10 mov 0x10(%ebp),%esi
10b6b6: 8b 4d 14 mov 0x14(%ebp),%ecx
10b6b9: 8b 7d 20 mov 0x20(%ebp),%edi
10b6bc: 0f b7 55 18 movzwl 0x18(%ebp),%edx
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10b6c0: 89 18 mov %ebx,(%eax)
information->the_class = the_class;
10b6c2: 66 89 70 04 mov %si,0x4(%eax)
information->size = size;
10b6c6: 89 50 18 mov %edx,0x18(%eax)
information->local_table = 0;
10b6c9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
information->inactive_per_block = 0;
10b6d0: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
information->object_blocks = 0;
10b6d7: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
information->inactive = 0;
10b6de: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
10b6e4: 66 c7 40 10 00 00 movw $0x0,0x10(%eax)
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
10b6ea: 0f b7 f6 movzwl %si,%esi
10b6ed: 8b 14 9d 38 32 12 00 mov 0x123238(,%ebx,4),%edx
10b6f4: 89 04 b2 mov %eax,(%edx,%esi,4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
10b6f7: 89 ca mov %ecx,%edx
10b6f9: c1 ea 1f shr $0x1f,%edx
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
10b6fc: 88 50 12 mov %dl,0x12(%eax)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
10b6ff: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
10b705: 85 d2 test %edx,%edx
10b707: 74 10 je 10b719 <_Objects_Initialize_information+0x75>
10b709: 85 c9 test %ecx,%ecx
10b70b: 75 0c jne 10b719 <_Objects_Initialize_information+0x75>
_Internal_error_Occurred(
10b70d: 50 push %eax
10b70e: 6a 13 push $0x13
10b710: 6a 01 push $0x1
10b712: 6a 00 push $0x0
10b714: e8 73 fa ff ff call 10b18c <_Internal_error_Occurred>
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
10b719: 66 89 48 14 mov %cx,0x14(%eax)
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
10b71d: c7 40 1c 1c 2f 12 00 movl $0x122f1c,0x1c(%eax)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b724: 89 da mov %ebx,%edx
10b726: c1 e2 18 shl $0x18,%edx
10b729: 81 ca 00 00 01 00 or $0x10000,%edx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10b72f: c1 e6 1b shl $0x1b,%esi
10b732: 09 f2 or %esi,%edx
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
10b734: 31 db xor %ebx,%ebx
10b736: 85 c9 test %ecx,%ecx
10b738: 0f 95 c3 setne %bl
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b73b: 09 da or %ebx,%edx
10b73d: 89 50 08 mov %edx,0x8(%eax)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10b740: 89 fa mov %edi,%edx
10b742: f6 c2 03 test $0x3,%dl
10b745: 74 06 je 10b74d <_Objects_Initialize_information+0xa9><== ALWAYS TAKEN
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10b747: 83 c2 04 add $0x4,%edx <== NOT EXECUTED
10b74a: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10b74d: 66 89 50 38 mov %dx,0x38(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10b751: 8d 50 24 lea 0x24(%eax),%edx
10b754: 89 50 20 mov %edx,0x20(%eax)
head->next = tail;
head->previous = NULL;
10b757: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10b75e: 8d 50 20 lea 0x20(%eax),%edx
10b761: 89 50 28 mov %edx,0x28(%eax)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
10b764: 85 c9 test %ecx,%ecx
10b766: 74 0f je 10b777 <_Objects_Initialize_information+0xd3>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10b768: 89 45 08 mov %eax,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10b76b: 8d 65 f4 lea -0xc(%ebp),%esp
10b76e: 5b pop %ebx
10b76f: 5e pop %esi
10b770: 5f pop %edi
10b771: c9 leave
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10b772: e9 39 fb ff ff jmp 10b2b0 <_Objects_Extend_information>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10b777: 8d 65 f4 lea -0xc(%ebp),%esp
10b77a: 5b pop %ebx
10b77b: 5e pop %esi
10b77c: 5f pop %edi
10b77d: c9 leave
10b77e: c3 ret
0010e5bd <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
10e5bd: 55 push %ebp
10e5be: 89 e5 mov %esp,%ebp
10e5c0: 57 push %edi
10e5c1: 56 push %esi
10e5c2: 53 push %ebx
10e5c3: 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 ];
10e5c6: 8b 45 08 mov 0x8(%ebp),%eax
10e5c9: 8b 98 e4 00 00 00 mov 0xe4(%eax),%ebx
if ( !api )
10e5cf: 85 db test %ebx,%ebx
10e5d1: 74 45 je 10e618 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
10e5d3: 9c pushf
10e5d4: fa cli
10e5d5: 58 pop %eax
signal_set = asr->signals_posted;
10e5d6: 8b 7b 14 mov 0x14(%ebx),%edi
asr->signals_posted = 0;
10e5d9: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
10e5e0: 50 push %eax
10e5e1: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
10e5e2: 85 ff test %edi,%edi
10e5e4: 74 32 je 10e618 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
10e5e6: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e5e9: 50 push %eax
10e5ea: 8d 75 e4 lea -0x1c(%ebp),%esi
10e5ed: 56 push %esi
10e5ee: 68 ff ff 00 00 push $0xffff
10e5f3: ff 73 10 pushl 0x10(%ebx)
10e5f6: e8 e9 18 00 00 call 10fee4 <rtems_task_mode>
(*asr->handler)( signal_set );
10e5fb: 89 3c 24 mov %edi,(%esp)
10e5fe: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
10e601: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e604: 83 c4 0c add $0xc,%esp
10e607: 56 push %esi
10e608: 68 ff ff 00 00 push $0xffff
10e60d: ff 75 e4 pushl -0x1c(%ebp)
10e610: e8 cf 18 00 00 call 10fee4 <rtems_task_mode>
10e615: 83 c4 10 add $0x10,%esp
}
10e618: 8d 65 f4 lea -0xc(%ebp),%esp
10e61b: 5b pop %ebx
10e61c: 5e pop %esi
10e61d: 5f pop %edi
10e61e: c9 leave
10e61f: c3 ret
0010b3b4 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10b3b4: 55 push %ebp
10b3b5: 89 e5 mov %esp,%ebp
10b3b7: 53 push %ebx
10b3b8: 83 ec 18 sub $0x18,%esp
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
10b3bb: 8d 45 f4 lea -0xc(%ebp),%eax
10b3be: 50 push %eax
10b3bf: ff 75 08 pushl 0x8(%ebp)
10b3c2: 68 54 68 12 00 push $0x126854
10b3c7: e8 04 1a 00 00 call 10cdd0 <_Objects_Get>
10b3cc: 89 c3 mov %eax,%ebx
switch ( location ) {
10b3ce: 83 c4 10 add $0x10,%esp
10b3d1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b3d5: 75 64 jne 10b43b <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10b3d7: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10b3da: f6 40 11 40 testb $0x40,0x11(%eax)
10b3de: 74 18 je 10b3f8 <_Rate_monotonic_Timeout+0x44>
10b3e0: 8b 53 08 mov 0x8(%ebx),%edx
10b3e3: 39 50 20 cmp %edx,0x20(%eax)
10b3e6: 75 10 jne 10b3f8 <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b3e8: 52 push %edx
10b3e9: 52 push %edx
10b3ea: 68 f8 ff 03 10 push $0x1003fff8
10b3ef: 50 push %eax
10b3f0: e8 5b 20 00 00 call 10d450 <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10b3f5: 59 pop %ecx
10b3f6: eb 10 jmp 10b408 <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10b3f8: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10b3fc: 75 2b jne 10b429 <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10b3fe: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
10b405: 83 ec 0c sub $0xc,%esp
10b408: 53 push %ebx
10b409: e8 ec fa ff ff call 10aefa <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b40e: 8b 43 3c mov 0x3c(%ebx),%eax
10b411: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b414: 58 pop %eax
10b415: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10b416: 83 c3 10 add $0x10,%ebx
10b419: 53 push %ebx
10b41a: 68 28 6a 12 00 push $0x126a28
10b41f: e8 ac 30 00 00 call 10e4d0 <_Watchdog_Insert>
10b424: 83 c4 10 add $0x10,%esp
10b427: eb 07 jmp 10b430 <_Rate_monotonic_Timeout+0x7c>
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10b429: 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;
10b430: a1 44 69 12 00 mov 0x126944,%eax
10b435: 48 dec %eax
10b436: a3 44 69 12 00 mov %eax,0x126944
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b43b: 8b 5d fc mov -0x4(%ebp),%ebx
10b43e: c9 leave
10b43f: c3 ret
0010ecd8 <_Scheduler_priority_Block>:
void _Scheduler_priority_Block(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
10ecd8: 55 push %ebp
10ecd9: 89 e5 mov %esp,%ebp
10ecdb: 56 push %esi
10ecdc: 53 push %ebx
10ecdd: 8b 55 0c mov 0xc(%ebp),%edx
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
Thread_Control *the_thread
)
{
Chain_Control *ready = the_thread->scheduler.priority->ready_chain;
10ece0: 8b 82 8c 00 00 00 mov 0x8c(%edx),%eax
10ece6: 8b 00 mov (%eax),%eax
if ( _Chain_Has_only_one_node( ready ) ) {
10ece8: 8b 48 08 mov 0x8(%eax),%ecx
10eceb: 39 08 cmp %ecx,(%eax)
10eced: 75 38 jne 10ed27 <_Scheduler_priority_Block+0x4f>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10ecef: 8d 48 04 lea 0x4(%eax),%ecx
10ecf2: 89 08 mov %ecx,(%eax)
head->next = tail;
head->previous = NULL;
10ecf4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
10ecfb: 89 40 08 mov %eax,0x8(%eax)
_Chain_Initialize_empty( ready );
_Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map );
10ecfe: 8b 8a 8c 00 00 00 mov 0x8c(%edx),%ecx
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10ed04: 8b 59 04 mov 0x4(%ecx),%ebx
10ed07: 66 8b 03 mov (%ebx),%ax
10ed0a: 66 23 41 0e and 0xe(%ecx),%ax
10ed0e: 66 89 03 mov %ax,(%ebx)
if ( *the_priority_map->minor == 0 )
10ed11: 66 85 c0 test %ax,%ax
10ed14: 75 1b jne 10ed31 <_Scheduler_priority_Block+0x59>
_Priority_Major_bit_map &= the_priority_map->block_major;
10ed16: 66 a1 b0 34 12 00 mov 0x1234b0,%ax
10ed1c: 23 41 0c and 0xc(%ecx),%eax
10ed1f: 66 a3 b0 34 12 00 mov %ax,0x1234b0
10ed25: eb 0a jmp 10ed31 <_Scheduler_priority_Block+0x59>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ed27: 8b 0a mov (%edx),%ecx
previous = the_node->previous;
10ed29: 8b 42 04 mov 0x4(%edx),%eax
next->previous = previous;
10ed2c: 89 41 04 mov %eax,0x4(%ecx)
previous->next = next;
10ed2f: 89 08 mov %ecx,(%eax)
{
_Scheduler_priority_Ready_queue_extract(the_thread);
/* TODO: flash critical section */
if ( _Thread_Is_heir( the_thread ) )
10ed31: 3b 15 a4 34 12 00 cmp 0x1234a4,%edx
10ed37: 75 42 jne 10ed7b <_Scheduler_priority_Block+0xa3>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10ed39: 66 8b 35 b0 34 12 00 mov 0x1234b0,%si
10ed40: 31 c9 xor %ecx,%ecx
10ed42: 89 cb mov %ecx,%ebx
10ed44: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10ed48: 0f b7 db movzwl %bx,%ebx
10ed4b: 66 8b b4 1b b4 34 12 mov 0x1234b4(%ebx,%ebx,1),%si
10ed52: 00
10ed53: 66 0f bc ce bsf %si,%cx
return (_Priority_Bits_index( major ) << 4) +
10ed57: c1 e3 04 shl $0x4,%ebx
10ed5a: 0f b7 c9 movzwl %cx,%ecx
10ed5d: 8d 04 0b lea (%ebx,%ecx,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10ed60: 6b c0 0c imul $0xc,%eax,%eax
10ed63: 8b 4d 08 mov 0x8(%ebp),%ecx
10ed66: 03 01 add (%ecx),%eax
_Scheduler_priority_Block_body(the_scheduler, the_thread);
}
10ed68: 8b 18 mov (%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10ed6a: 83 c0 04 add $0x4,%eax
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10ed6d: 31 c9 xor %ecx,%ecx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10ed6f: 39 c3 cmp %eax,%ebx
10ed71: 74 02 je 10ed75 <_Scheduler_priority_Block+0x9d><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
10ed73: 89 d9 mov %ebx,%ecx
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10ed75: 89 0d a4 34 12 00 mov %ecx,0x1234a4
/* TODO: flash critical section */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body(the_scheduler);
if ( _Thread_Is_executing( the_thread ) )
10ed7b: 3b 15 a0 34 12 00 cmp 0x1234a0,%edx
10ed81: 75 07 jne 10ed8a <_Scheduler_priority_Block+0xb2>
_Thread_Dispatch_necessary = true;
10ed83: c6 05 ac 34 12 00 01 movb $0x1,0x1234ac
10ed8a: 5b pop %ebx
10ed8b: 5e pop %esi
10ed8c: c9 leave
10ed8d: c3 ret
0010b9d0 <_Scheduler_priority_Schedule>:
*/
void _Scheduler_priority_Schedule(
Scheduler_Control *the_scheduler
)
{
10b9d0: 55 push %ebp
10b9d1: 89 e5 mov %esp,%ebp
10b9d3: 53 push %ebx
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10b9d4: 66 8b 1d b0 34 12 00 mov 0x1234b0,%bx
10b9db: 31 d2 xor %edx,%edx
10b9dd: 89 d1 mov %edx,%ecx
10b9df: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10b9e3: 0f b7 c9 movzwl %cx,%ecx
10b9e6: 66 8b 9c 09 b4 34 12 mov 0x1234b4(%ecx,%ecx,1),%bx
10b9ed: 00
10b9ee: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
10b9f2: c1 e1 04 shl $0x4,%ecx
10b9f5: 0f b7 d2 movzwl %dx,%edx
10b9f8: 8d 04 11 lea (%ecx,%edx,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10b9fb: 6b c0 0c imul $0xc,%eax,%eax
10b9fe: 8b 55 08 mov 0x8(%ebp),%edx
10ba01: 03 02 add (%edx),%eax
_Scheduler_priority_Schedule_body( the_scheduler );
}
10ba03: 8b 08 mov (%eax),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10ba05: 83 c0 04 add $0x4,%eax
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10ba08: 31 d2 xor %edx,%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10ba0a: 39 c1 cmp %eax,%ecx
10ba0c: 74 02 je 10ba10 <_Scheduler_priority_Schedule+0x40><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
10ba0e: 89 ca mov %ecx,%edx
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10ba10: 89 15 a4 34 12 00 mov %edx,0x1234a4
10ba16: 5b pop %ebx
10ba17: c9 leave
10ba18: c3 ret
0010bb0c <_Scheduler_priority_Yield>:
*/
void _Scheduler_priority_Yield(
Scheduler_Control *the_scheduler __attribute__((unused))
)
{
10bb0c: 55 push %ebp
10bb0d: 89 e5 mov %esp,%ebp
10bb0f: 56 push %esi
10bb10: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10bb11: a1 a0 34 12 00 mov 0x1234a0,%eax
ready = executing->scheduler.priority->ready_chain;
10bb16: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
10bb1c: 8b 12 mov (%edx),%edx
_ISR_Disable( level );
10bb1e: 9c pushf
10bb1f: fa cli
10bb20: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10bb21: 8b 5a 08 mov 0x8(%edx),%ebx
10bb24: 39 1a cmp %ebx,(%edx)
10bb26: 74 2e je 10bb56 <_Scheduler_priority_Yield+0x4a>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10bb28: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10bb2a: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10bb2d: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10bb30: 89 33 mov %esi,(%ebx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10bb32: 8b 5a 08 mov 0x8(%edx),%ebx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
10bb35: 8d 72 04 lea 0x4(%edx),%esi
10bb38: 89 30 mov %esi,(%eax)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10bb3a: 89 42 08 mov %eax,0x8(%edx)
old_last->next = the_node;
10bb3d: 89 03 mov %eax,(%ebx)
the_node->previous = old_last;
10bb3f: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10bb42: 51 push %ecx
10bb43: 9d popf
10bb44: fa cli
if ( _Thread_Is_heir( executing ) )
10bb45: 3b 05 a4 34 12 00 cmp 0x1234a4,%eax
10bb4b: 75 11 jne 10bb5e <_Scheduler_priority_Yield+0x52><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
10bb4d: 8b 02 mov (%edx),%eax
10bb4f: a3 a4 34 12 00 mov %eax,0x1234a4
10bb54: eb 08 jmp 10bb5e <_Scheduler_priority_Yield+0x52>
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10bb56: 3b 05 a4 34 12 00 cmp 0x1234a4,%eax
10bb5c: 74 07 je 10bb65 <_Scheduler_priority_Yield+0x59><== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
10bb5e: c6 05 ac 34 12 00 01 movb $0x1,0x1234ac
_ISR_Enable( level );
10bb65: 51 push %ecx
10bb66: 9d popf
}
10bb67: 5b pop %ebx
10bb68: 5e pop %esi
10bb69: c9 leave
10bb6a: c3 ret
0010acc0 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10acc0: 55 push %ebp
10acc1: 89 e5 mov %esp,%ebp
10acc3: 56 push %esi
10acc4: 53 push %ebx
10acc5: 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();
10acc8: 8b 35 04 22 12 00 mov 0x122204,%esi
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
10acce: 31 db xor %ebx,%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) ||
10acd0: 85 c9 test %ecx,%ecx
10acd2: 74 57 je 10ad2b <_TOD_Validate+0x6b> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10acd4: b8 40 42 0f 00 mov $0xf4240,%eax
10acd9: 31 d2 xor %edx,%edx
10acdb: f7 f6 div %esi
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10acdd: 39 41 18 cmp %eax,0x18(%ecx)
10ace0: 73 49 jae 10ad2b <_TOD_Validate+0x6b>
(the_tod->ticks >= ticks_per_second) ||
10ace2: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10ace6: 77 43 ja 10ad2b <_TOD_Validate+0x6b>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10ace8: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10acec: 77 3d ja 10ad2b <_TOD_Validate+0x6b>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10acee: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10acf2: 77 37 ja 10ad2b <_TOD_Validate+0x6b>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10acf4: 8b 41 04 mov 0x4(%ecx),%eax
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10acf7: 85 c0 test %eax,%eax
10acf9: 74 30 je 10ad2b <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->month == 0) ||
10acfb: 83 f8 0c cmp $0xc,%eax
10acfe: 77 2b ja 10ad2b <_TOD_Validate+0x6b>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10ad00: 8b 31 mov (%ecx),%esi
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10ad02: 81 fe c3 07 00 00 cmp $0x7c3,%esi
10ad08: 76 21 jbe 10ad2b <_TOD_Validate+0x6b>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10ad0a: 8b 51 08 mov 0x8(%ecx),%edx
(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) ||
10ad0d: 85 d2 test %edx,%edx
10ad0f: 74 1a je 10ad2b <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10ad11: 83 e6 03 and $0x3,%esi
10ad14: 75 09 jne 10ad1f <_TOD_Validate+0x5f>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10ad16: 8b 04 85 6c 01 12 00 mov 0x12016c(,%eax,4),%eax
10ad1d: eb 07 jmp 10ad26 <_TOD_Validate+0x66>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10ad1f: 8b 04 85 38 01 12 00 mov 0x120138(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10ad26: 39 c2 cmp %eax,%edx
10ad28: 0f 96 c3 setbe %bl
if ( the_tod->day > days_in_month )
return false;
return true;
}
10ad2b: 88 d8 mov %bl,%al
10ad2d: 5b pop %ebx
10ad2e: 5e pop %esi
10ad2f: c9 leave
10ad30: c3 ret
0010bbb8 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10bbb8: 55 push %ebp
10bbb9: 89 e5 mov %esp,%ebp
10bbbb: 57 push %edi
10bbbc: 56 push %esi
10bbbd: 53 push %ebx
10bbbe: 83 ec 28 sub $0x28,%esp
10bbc1: 8b 5d 08 mov 0x8(%ebp),%ebx
10bbc4: 8b 75 0c mov 0xc(%ebp),%esi
10bbc7: 8a 45 10 mov 0x10(%ebp),%al
10bbca: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10bbcd: 8b 7b 10 mov 0x10(%ebx),%edi
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
10bbd0: 53 push %ebx
10bbd1: e8 f6 0b 00 00 call 10c7cc <_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 )
10bbd6: 83 c4 10 add $0x10,%esp
10bbd9: 39 73 14 cmp %esi,0x14(%ebx)
10bbdc: 74 0c je 10bbea <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10bbde: 50 push %eax
10bbdf: 50 push %eax
10bbe0: 56 push %esi
10bbe1: 53 push %ebx
10bbe2: e8 85 0b 00 00 call 10c76c <_Thread_Set_priority>
10bbe7: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10bbea: 9c pushf
10bbeb: fa cli
10bbec: 5e pop %esi
/*
* 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;
10bbed: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10bbf0: 83 f8 04 cmp $0x4,%eax
10bbf3: 74 2f je 10bc24 <_Thread_Change_priority+0x6c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10bbf5: 83 e7 04 and $0x4,%edi
10bbf8: 75 08 jne 10bc02 <_Thread_Change_priority+0x4a><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10bbfa: 89 c2 mov %eax,%edx
10bbfc: 83 e2 fb and $0xfffffffb,%edx
10bbff: 89 53 10 mov %edx,0x10(%ebx)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10bc02: 56 push %esi
10bc03: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10bc04: a9 e0 be 03 00 test $0x3bee0,%eax
10bc09: 0f 84 b5 00 00 00 je 10bcc4 <_Thread_Change_priority+0x10c>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10bc0f: 89 5d 0c mov %ebx,0xc(%ebp)
10bc12: 8b 43 44 mov 0x44(%ebx),%eax
10bc15: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10bc18: 8d 65 f4 lea -0xc(%ebp),%esp
10bc1b: 5b pop %ebx
10bc1c: 5e pop %esi
10bc1d: 5f pop %edi
10bc1e: 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 );
10bc1f: e9 c0 0a 00 00 jmp 10c6e4 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10bc24: 83 e7 04 and $0x4,%edi
10bc27: 75 6b jne 10bc94 <_Thread_Change_priority+0xdc><== NEVER TAKEN
* Ready Queue with interrupts off.
*
* FIXME: hard-coded for priority scheduling. Might be ok since this
* function is specific to priority scheduling?
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10bc29: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10bc30: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10bc34: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10bc3a: 74 2b je 10bc67 <_Thread_Change_priority+0xaf>
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10bc3c: 8b 50 04 mov 0x4(%eax),%edx
10bc3f: 66 8b 48 0a mov 0xa(%eax),%cx
10bc43: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10bc46: 66 8b 15 b0 34 12 00 mov 0x1234b0,%dx
10bc4d: 0b 50 08 or 0x8(%eax),%edx
10bc50: 66 89 15 b0 34 12 00 mov %dx,0x1234b0
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
_Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain,
10bc57: 8b 00 mov (%eax),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10bc59: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10bc5c: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10bc5e: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10bc60: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10bc62: 89 5a 04 mov %ebx,0x4(%edx)
10bc65: eb 2d jmp 10bc94 <_Thread_Change_priority+0xdc>
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10bc67: 8b 50 04 mov 0x4(%eax),%edx
10bc6a: 66 8b 48 0a mov 0xa(%eax),%cx
10bc6e: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10bc71: 66 8b 15 b0 34 12 00 mov 0x1234b0,%dx
10bc78: 0b 50 08 or 0x8(%eax),%edx
10bc7b: 66 89 15 b0 34 12 00 mov %dx,0x1234b0
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
_Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain,
10bc82: 8b 00 mov (%eax),%eax
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10bc84: 8b 50 08 mov 0x8(%eax),%edx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
10bc87: 8d 48 04 lea 0x4(%eax),%ecx
10bc8a: 89 0b mov %ecx,(%ebx)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10bc8c: 89 58 08 mov %ebx,0x8(%eax)
old_last->next = the_node;
10bc8f: 89 1a mov %ebx,(%edx)
the_node->previous = old_last;
10bc91: 89 53 04 mov %edx,0x4(%ebx)
_Scheduler_priority_Ready_queue_enqueue_first( the_thread );
else
_Scheduler_priority_Ready_queue_enqueue( the_thread );
}
_ISR_Flash( level );
10bc94: 56 push %esi
10bc95: 9d popf
10bc96: fa cli
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule(
Scheduler_Control *the_scheduler
)
{
the_scheduler->Operations.schedule( the_scheduler );
10bc97: 83 ec 0c sub $0xc,%esp
10bc9a: 68 e8 32 12 00 push $0x1232e8
10bc9f: ff 15 ec 32 12 00 call *0x1232ec
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10bca5: a1 a0 34 12 00 mov 0x1234a0,%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.
*/
_Scheduler_Schedule(&_Scheduler);
if ( !_Thread_Is_executing_also_the_heir() &&
10bcaa: 83 c4 10 add $0x10,%esp
10bcad: 3b 05 a4 34 12 00 cmp 0x1234a4,%eax
10bcb3: 74 0d je 10bcc2 <_Thread_Change_priority+0x10a>
10bcb5: 80 78 74 00 cmpb $0x0,0x74(%eax)
10bcb9: 74 07 je 10bcc2 <_Thread_Change_priority+0x10a>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10bcbb: c6 05 ac 34 12 00 01 movb $0x1,0x1234ac
_ISR_Enable( level );
10bcc2: 56 push %esi
10bcc3: 9d popf
}
10bcc4: 8d 65 f4 lea -0xc(%ebp),%esp
10bcc7: 5b pop %ebx
10bcc8: 5e pop %esi
10bcc9: 5f pop %edi
10bcca: c9 leave
10bccb: c3 ret
0010be8c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10be8c: 55 push %ebp
10be8d: 89 e5 mov %esp,%ebp
10be8f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10be92: 8d 45 f4 lea -0xc(%ebp),%eax
10be95: 50 push %eax
10be96: ff 75 08 pushl 0x8(%ebp)
10be99: e8 82 01 00 00 call 10c020 <_Thread_Get>
switch ( location ) {
10be9e: 83 c4 10 add $0x10,%esp
10bea1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10bea5: 75 1b jne 10bec2 <_Thread_Delay_ended+0x36><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10bea7: 52 push %edx
10bea8: 52 push %edx
10bea9: 68 18 00 00 10 push $0x10000018
10beae: 50 push %eax
10beaf: e8 18 fe ff ff call 10bccc <_Thread_Clear_state>
10beb4: a1 60 32 12 00 mov 0x123260,%eax
10beb9: 48 dec %eax
10beba: a3 60 32 12 00 mov %eax,0x123260
10bebf: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10bec2: c9 leave
10bec3: c3 ret
0010bec4 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10bec4: 55 push %ebp
10bec5: 89 e5 mov %esp,%ebp
10bec7: 57 push %edi
10bec8: 56 push %esi
10bec9: 53 push %ebx
10beca: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10becd: 8b 1d a0 34 12 00 mov 0x1234a0,%ebx
_ISR_Disable( level );
10bed3: 9c pushf
10bed4: fa cli
10bed5: 58 pop %eax
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
10bed6: 8d 7d d8 lea -0x28(%ebp),%edi
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10bed9: e9 f9 00 00 00 jmp 10bfd7 <_Thread_Dispatch+0x113>
heir = _Thread_Heir;
10bede: 8b 35 a4 34 12 00 mov 0x1234a4,%esi
_Thread_Dispatch_disable_level = 1;
10bee4: c7 05 60 32 12 00 01 movl $0x1,0x123260
10beeb: 00 00 00
_Thread_Dispatch_necessary = false;
10beee: c6 05 ac 34 12 00 00 movb $0x0,0x1234ac
_Thread_Executing = heir;
10bef5: 89 35 a0 34 12 00 mov %esi,0x1234a0
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10befb: 39 de cmp %ebx,%esi
10befd: 0f 84 e2 00 00 00 je 10bfe5 <_Thread_Dispatch+0x121>
*/
#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 )
10bf03: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10bf07: 75 09 jne 10bf12 <_Thread_Dispatch+0x4e>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10bf09: 8b 15 30 32 12 00 mov 0x123230,%edx
10bf0f: 89 56 78 mov %edx,0x78(%esi)
_ISR_Enable( level );
10bf12: 50 push %eax
10bf13: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10bf14: 83 ec 0c sub $0xc,%esp
10bf17: 8d 45 e0 lea -0x20(%ebp),%eax
10bf1a: 50 push %eax
10bf1b: e8 80 2a 00 00 call 10e9a0 <_TOD_Get_uptime>
_Timestamp_Subtract(
10bf20: 83 c4 0c add $0xc,%esp
10bf23: 57 push %edi
10bf24: 8d 45 e0 lea -0x20(%ebp),%eax
10bf27: 50 push %eax
10bf28: 68 30 33 12 00 push $0x123330
10bf2d: e8 ae 0a 00 00 call 10c9e0 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10bf32: 58 pop %eax
10bf33: 5a pop %edx
10bf34: 57 push %edi
10bf35: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10bf3b: 50 push %eax
10bf3c: e8 6f 0a 00 00 call 10c9b0 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10bf41: 8b 45 e0 mov -0x20(%ebp),%eax
10bf44: 8b 55 e4 mov -0x1c(%ebp),%edx
10bf47: a3 30 33 12 00 mov %eax,0x123330
10bf4c: 89 15 34 33 12 00 mov %edx,0x123334
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10bf52: a1 08 33 12 00 mov 0x123308,%eax
10bf57: 83 c4 10 add $0x10,%esp
10bf5a: 85 c0 test %eax,%eax
10bf5c: 74 10 je 10bf6e <_Thread_Dispatch+0xaa> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10bf5e: 8b 10 mov (%eax),%edx
10bf60: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10bf66: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx
10bf6c: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10bf6e: 51 push %ecx
10bf6f: 51 push %ecx
10bf70: 56 push %esi
10bf71: 53 push %ebx
10bf72: e8 a1 0c 00 00 call 10cc18 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10bf77: 58 pop %eax
10bf78: 5a pop %edx
10bf79: 81 c6 c4 00 00 00 add $0xc4,%esi
10bf7f: 56 push %esi
10bf80: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax
10bf86: 50 push %eax
10bf87: e8 54 0f 00 00 call 10cee0 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10bf8c: 83 c4 10 add $0x10,%esp
10bf8f: 83 bb dc 00 00 00 00 cmpl $0x0,0xdc(%ebx)
10bf96: 74 36 je 10bfce <_Thread_Dispatch+0x10a>
#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 );
10bf98: a1 e4 32 12 00 mov 0x1232e4,%eax
10bf9d: 39 c3 cmp %eax,%ebx
10bf9f: 74 2d je 10bfce <_Thread_Dispatch+0x10a>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10bfa1: 85 c0 test %eax,%eax
10bfa3: 74 11 je 10bfb6 <_Thread_Dispatch+0xf2>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10bfa5: 83 ec 0c sub $0xc,%esp
10bfa8: 05 dc 00 00 00 add $0xdc,%eax
10bfad: 50 push %eax
10bfae: e8 61 0f 00 00 call 10cf14 <_CPU_Context_save_fp>
10bfb3: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10bfb6: 83 ec 0c sub $0xc,%esp
10bfb9: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax
10bfbf: 50 push %eax
10bfc0: e8 59 0f 00 00 call 10cf1e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10bfc5: 89 1d e4 32 12 00 mov %ebx,0x1232e4
10bfcb: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10bfce: 8b 1d a0 34 12 00 mov 0x1234a0,%ebx
_ISR_Disable( level );
10bfd4: 9c pushf
10bfd5: fa cli
10bfd6: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10bfd7: 8a 15 ac 34 12 00 mov 0x1234ac,%dl
10bfdd: 84 d2 test %dl,%dl
10bfdf: 0f 85 f9 fe ff ff jne 10bede <_Thread_Dispatch+0x1a>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10bfe5: c7 05 60 32 12 00 00 movl $0x0,0x123260
10bfec: 00 00 00
_ISR_Enable( level );
10bfef: 50 push %eax
10bff0: 9d popf
_API_extensions_Run_postswitch();
10bff1: e8 9d e8 ff ff call 10a893 <_API_extensions_Run_postswitch>
}
10bff6: 8d 65 f4 lea -0xc(%ebp),%esp
10bff9: 5b pop %ebx
10bffa: 5e pop %esi
10bffb: 5f pop %edi
10bffc: c9 leave
10bffd: c3 ret
0010c020 <_Thread_Get>:
*/
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10c020: 55 push %ebp
10c021: 89 e5 mov %esp,%ebp
10c023: 53 push %ebx
10c024: 83 ec 04 sub $0x4,%esp
10c027: 8b 55 08 mov 0x8(%ebp),%edx
10c02a: 8b 45 0c mov 0xc(%ebp),%eax
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
10c02d: 85 d2 test %edx,%edx
10c02f: 75 1a jne 10c04b <_Thread_Get+0x2b>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c031: 8b 15 60 32 12 00 mov 0x123260,%edx
10c037: 42 inc %edx
10c038: 89 15 60 32 12 00 mov %edx,0x123260
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
10c03e: c7 00 00 00 00 00 movl $0x0,(%eax)
tp = _Thread_Executing;
10c044: a1 a0 34 12 00 mov 0x1234a0,%eax
goto done;
10c049: eb 3a jmp 10c085 <_Thread_Get+0x65>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10c04b: 89 d1 mov %edx,%ecx
10c04d: c1 e9 18 shr $0x18,%ecx
10c050: 83 e1 07 and $0x7,%ecx
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10c053: 8d 59 ff lea -0x1(%ecx),%ebx
10c056: 83 fb 02 cmp $0x2,%ebx
10c059: 76 2f jbe 10c08a <_Thread_Get+0x6a>
10c05b: eb 12 jmp 10c06f <_Thread_Get+0x4f>
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10c05d: 8b 0c 8d 38 32 12 00 mov 0x123238(,%ecx,4),%ecx
/*
* There is no way for this to happen if POSIX is enabled.
*/
#if !defined(RTEMS_POSIX_API)
if ( !api_information ) {
10c064: 85 c9 test %ecx,%ecx
10c066: 74 07 je 10c06f <_Thread_Get+0x4f> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
#endif
information = api_information[ the_class ];
10c068: 8b 49 04 mov 0x4(%ecx),%ecx
if ( !information ) {
10c06b: 85 c9 test %ecx,%ecx
10c06d: 75 0a jne 10c079 <_Thread_Get+0x59>
*location = OBJECTS_ERROR;
10c06f: c7 00 01 00 00 00 movl $0x1,(%eax)
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
10c075: 31 c0 xor %eax,%eax
#endif
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
goto done;
10c077: eb 0c jmp 10c085 <_Thread_Get+0x65>
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10c079: 53 push %ebx
10c07a: 50 push %eax
10c07b: 52 push %edx
10c07c: 51 push %ecx
10c07d: e8 ca f5 ff ff call 10b64c <_Objects_Get>
10c082: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10c085: 8b 5d fc mov -0x4(%ebp),%ebx
10c088: c9 leave
10c089: c3 ret
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10c08a: 89 d3 mov %edx,%ebx
10c08c: c1 eb 1b shr $0x1b,%ebx
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
10c08f: 4b dec %ebx
10c090: 74 cb je 10c05d <_Thread_Get+0x3d>
10c092: eb db jmp 10c06f <_Thread_Get+0x4f>
00110104 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110104: 55 push %ebp
110105: 89 e5 mov %esp,%ebp
110107: 53 push %ebx
110108: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
11010b: 8b 1d a0 34 12 00 mov 0x1234a0,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110111: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
_ISR_Set_level(level);
110117: 85 c0 test %eax,%eax
110119: 74 03 je 11011e <_Thread_Handler+0x1a>
11011b: fa cli
11011c: eb 01 jmp 11011f <_Thread_Handler+0x1b>
11011e: fb sti
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
11011f: a0 24 2f 12 00 mov 0x122f24,%al
110124: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
110127: c6 05 24 2f 12 00 01 movb $0x1,0x122f24
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
11012e: 83 bb dc 00 00 00 00 cmpl $0x0,0xdc(%ebx)
110135: 74 24 je 11015b <_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 );
110137: a1 e4 32 12 00 mov 0x1232e4,%eax
11013c: 39 c3 cmp %eax,%ebx
11013e: 74 1b je 11015b <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
110140: 85 c0 test %eax,%eax
110142: 74 11 je 110155 <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
110144: 83 ec 0c sub $0xc,%esp
110147: 05 dc 00 00 00 add $0xdc,%eax
11014c: 50 push %eax
11014d: e8 c2 cd ff ff call 10cf14 <_CPU_Context_save_fp>
110152: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
110155: 89 1d e4 32 12 00 mov %ebx,0x1232e4
/*
* 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 );
11015b: 83 ec 0c sub $0xc,%esp
11015e: 53 push %ebx
11015f: e8 64 c9 ff ff call 10cac8 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
110164: e8 95 be ff ff call 10bffe <_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) */ {
110169: 83 c4 10 add $0x10,%esp
11016c: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
110170: 75 05 jne 110177 <_Thread_Handler+0x73>
INIT_NAME ();
110172: e8 19 be 00 00 call 11bf90 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
110177: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx)
11017e: 75 15 jne 110195 <_Thread_Handler+0x91> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
110180: 83 ec 0c sub $0xc,%esp
110183: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
110189: ff 93 90 00 00 00 call *0x90(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
11018f: 89 43 28 mov %eax,0x28(%ebx)
110192: 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 );
110195: 83 ec 0c sub $0xc,%esp
110198: 53 push %ebx
110199: e8 5b c9 ff ff call 10caf9 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
11019e: 83 c4 0c add $0xc,%esp
1101a1: 6a 05 push $0x5
1101a3: 6a 01 push $0x1
1101a5: 6a 00 push $0x0
1101a7: e8 e0 af ff ff call 10b18c <_Internal_error_Occurred>
0010c094 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10c094: 55 push %ebp
10c095: 89 e5 mov %esp,%ebp
10c097: 57 push %edi
10c098: 56 push %esi
10c099: 53 push %ebx
10c09a: 83 ec 24 sub $0x24,%esp
10c09d: 8b 5d 0c mov 0xc(%ebp),%ebx
10c0a0: 8b 75 14 mov 0x14(%ebp),%esi
10c0a3: 8a 55 18 mov 0x18(%ebp),%dl
10c0a6: 8a 45 20 mov 0x20(%ebp),%al
10c0a9: 88 45 e4 mov %al,-0x1c(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10c0ac: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10c0b3: 00 00 00
10c0b6: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10c0bd: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10c0c0: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10c0c7: 00 00 00
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10c0ca: 56 push %esi
10c0cb: 53 push %ebx
10c0cc: 88 55 e0 mov %dl,-0x20(%ebp)
10c0cf: e8 68 07 00 00 call 10c83c <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10c0d4: 83 c4 10 add $0x10,%esp
10c0d7: 39 f0 cmp %esi,%eax
10c0d9: 8a 55 e0 mov -0x20(%ebp),%dl
10c0dc: 0f 82 d9 01 00 00 jb 10c2bb <_Thread_Initialize+0x227>
10c0e2: 85 c0 test %eax,%eax
10c0e4: 0f 84 d1 01 00 00 je 10c2bb <_Thread_Initialize+0x227><== NEVER TAKEN
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10c0ea: 8b 8b c0 00 00 00 mov 0xc0(%ebx),%ecx
10c0f0: 89 8b b8 00 00 00 mov %ecx,0xb8(%ebx)
the_stack->size = size;
10c0f6: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10c0fc: 31 ff xor %edi,%edi
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10c0fe: 84 d2 test %dl,%dl
10c100: 74 17 je 10c119 <_Thread_Initialize+0x85>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10c102: 83 ec 0c sub $0xc,%esp
10c105: 6a 6c push $0x6c
10c107: e8 72 0d 00 00 call 10ce7e <_Workspace_Allocate>
10c10c: 89 c7 mov %eax,%edi
if ( !fp_area )
10c10e: 83 c4 10 add $0x10,%esp
10c111: 85 c0 test %eax,%eax
10c113: 0f 84 17 01 00 00 je 10c230 <_Thread_Initialize+0x19c>
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10c119: 89 bb dc 00 00 00 mov %edi,0xdc(%ebx)
the_thread->Start.fp_context = fp_area;
10c11f: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c125: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10c12c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10c133: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10c13a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10c141: a1 14 33 12 00 mov 0x123314,%eax
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10c146: 31 f6 xor %esi,%esi
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10c148: 85 c0 test %eax,%eax
10c14a: 74 1d je 10c169 <_Thread_Initialize+0xd5>
extensions_area = _Workspace_Allocate(
10c14c: 83 ec 0c sub $0xc,%esp
10c14f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10c156: 50 push %eax
10c157: e8 22 0d 00 00 call 10ce7e <_Workspace_Allocate>
10c15c: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10c15e: 83 c4 10 add $0x10,%esp
10c161: 85 c0 test %eax,%eax
10c163: 0f 84 c9 00 00 00 je 10c232 <_Thread_Initialize+0x19e>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10c169: 89 b3 ec 00 00 00 mov %esi,0xec(%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 ) {
10c16f: 85 f6 test %esi,%esi
10c171: 74 16 je 10c189 <_Thread_Initialize+0xf5>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10c173: 8b 15 14 33 12 00 mov 0x123314,%edx
10c179: 31 c0 xor %eax,%eax
10c17b: eb 08 jmp 10c185 <_Thread_Initialize+0xf1>
the_thread->extensions[i] = NULL;
10c17d: c7 04 86 00 00 00 00 movl $0x0,(%esi,%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++ )
10c184: 40 inc %eax
10c185: 39 d0 cmp %edx,%eax
10c187: 76 f4 jbe 10c17d <_Thread_Initialize+0xe9>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10c189: 8a 45 e4 mov -0x1c(%ebp),%al
10c18c: 88 83 a0 00 00 00 mov %al,0xa0(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10c192: 8b 45 24 mov 0x24(%ebp),%eax
10c195: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.budget_callout = budget_callout;
10c19b: 8b 45 28 mov 0x28(%ebp),%eax
10c19e: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10c1a4: 8b 45 2c mov 0x2c(%ebp),%eax
10c1a7: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
the_thread->current_state = STATES_DORMANT;
10c1ad: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10c1b4: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10c1bb: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10c1c2: 8b 45 1c mov 0x1c(%ebp),%eax
10c1c5: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10c1c8: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
10c1ce: 52 push %edx
10c1cf: 52 push %edx
10c1d0: 53 push %ebx
10c1d1: 68 e8 32 12 00 push $0x1232e8
10c1d6: ff 15 fc 32 12 00 call *0x1232fc
10c1dc: 89 45 e4 mov %eax,-0x1c(%ebp)
sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
if ( !sched )
10c1df: 83 c4 10 add $0x10,%esp
10c1e2: 85 c0 test %eax,%eax
10c1e4: 74 53 je 10c239 <_Thread_Initialize+0x1a5>
goto failed;
_Thread_Set_priority( the_thread, priority );
10c1e6: 50 push %eax
10c1e7: 50 push %eax
10c1e8: ff 75 1c pushl 0x1c(%ebp)
10c1eb: 53 push %ebx
10c1ec: e8 7b 05 00 00 call 10c76c <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10c1f1: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10c1f8: 00 00 00
10c1fb: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10c202: 00 00 00
_Thread_Stack_Free( the_thread );
return false;
}
10c205: 8b 45 08 mov 0x8(%ebp),%eax
10c208: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c20b: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c20f: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c212: 8b 45 30 mov 0x30(%ebp),%eax
10c215: 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 );
10c218: 89 1c 24 mov %ebx,(%esp)
10c21b: e8 48 09 00 00 call 10cb68 <_User_extensions_Thread_create>
10c220: 88 c2 mov %al,%dl
if ( extension_status )
10c222: 83 c4 10 add $0x10,%esp
return true;
10c225: b0 01 mov $0x1,%al
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
10c227: 84 d2 test %dl,%dl
10c229: 74 0e je 10c239 <_Thread_Initialize+0x1a5>
10c22b: e9 8d 00 00 00 jmp 10c2bd <_Thread_Initialize+0x229>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10c230: 31 f6 xor %esi,%esi
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10c232: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
10c239: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax
10c23f: 85 c0 test %eax,%eax
10c241: 74 0c je 10c24f <_Thread_Initialize+0x1bb>
_Workspace_Free( the_thread->libc_reent );
10c243: 83 ec 0c sub $0xc,%esp
10c246: 50 push %eax
10c247: e8 4b 0c 00 00 call 10ce97 <_Workspace_Free>
10c24c: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10c24f: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10c255: 85 c0 test %eax,%eax
10c257: 74 0c je 10c265 <_Thread_Initialize+0x1d1>
_Workspace_Free( the_thread->API_Extensions[i] );
10c259: 83 ec 0c sub $0xc,%esp
10c25c: 50 push %eax
10c25d: e8 35 0c 00 00 call 10ce97 <_Workspace_Free>
10c262: 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] )
10c265: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax
10c26b: 85 c0 test %eax,%eax
10c26d: 74 0c je 10c27b <_Thread_Initialize+0x1e7><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
10c26f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c272: 50 push %eax <== NOT EXECUTED
10c273: e8 1f 0c 00 00 call 10ce97 <_Workspace_Free> <== NOT EXECUTED
10c278: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( extensions_area )
10c27b: 85 f6 test %esi,%esi
10c27d: 74 0c je 10c28b <_Thread_Initialize+0x1f7>
(void) _Workspace_Free( extensions_area );
10c27f: 83 ec 0c sub $0xc,%esp
10c282: 56 push %esi
10c283: e8 0f 0c 00 00 call 10ce97 <_Workspace_Free>
10c288: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10c28b: 85 ff test %edi,%edi
10c28d: 74 0c je 10c29b <_Thread_Initialize+0x207>
(void) _Workspace_Free( fp_area );
10c28f: 83 ec 0c sub $0xc,%esp
10c292: 57 push %edi
10c293: e8 ff 0b 00 00 call 10ce97 <_Workspace_Free>
10c298: 83 c4 10 add $0x10,%esp
#endif
if ( sched )
10c29b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10c29f: 74 0e je 10c2af <_Thread_Initialize+0x21b>
(void) _Workspace_Free( sched );
10c2a1: 83 ec 0c sub $0xc,%esp
10c2a4: ff 75 e4 pushl -0x1c(%ebp)
10c2a7: e8 eb 0b 00 00 call 10ce97 <_Workspace_Free>
10c2ac: 83 c4 10 add $0x10,%esp
_Thread_Stack_Free( the_thread );
10c2af: 83 ec 0c sub $0xc,%esp
10c2b2: 53 push %ebx
10c2b3: e8 d4 05 00 00 call 10c88c <_Thread_Stack_Free>
return false;
10c2b8: 83 c4 10 add $0x10,%esp
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10c2bb: 31 c0 xor %eax,%eax
_Thread_Stack_Free( the_thread );
return false;
}
10c2bd: 8d 65 f4 lea -0xc(%ebp),%esp
10c2c0: 5b pop %ebx
10c2c1: 5e pop %esi
10c2c2: 5f pop %edi
10c2c3: c9 leave
10c2c4: c3 ret
0010f4fc <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
10f4fc: 55 push %ebp
10f4fd: 89 e5 mov %esp,%ebp
10f4ff: 53 push %ebx
10f500: 83 ec 04 sub $0x4,%esp
10f503: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10f506: 9c pushf
10f507: fa cli
10f508: 5b pop %ebx
current_state = the_thread->current_state;
10f509: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
10f50c: f6 c2 02 test $0x2,%dl
10f50f: 74 1b je 10f52c <_Thread_Resume+0x30> <== NEVER TAKEN
10f511: 83 e2 fd and $0xfffffffd,%edx
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
10f514: 89 50 10 mov %edx,0x10(%eax)
if ( _States_Is_ready( current_state ) ) {
10f517: 85 d2 test %edx,%edx
10f519: 75 11 jne 10f52c <_Thread_Resume+0x30>
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.unblock( the_scheduler, the_thread );
10f51b: 52 push %edx
10f51c: 52 push %edx
10f51d: 50 push %eax
10f51e: 68 b8 63 12 00 push $0x1263b8
10f523: ff 15 c8 63 12 00 call *0x1263c8
10f529: 83 c4 10 add $0x10,%esp
_Scheduler_Unblock( &_Scheduler, the_thread );
}
}
_ISR_Enable( level );
10f52c: 53 push %ebx
10f52d: 9d popf
}
10f52e: 8b 5d fc mov -0x4(%ebp),%ebx
10f531: c9 leave
10f532: c3 ret
0010c6e4 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10c6e4: 55 push %ebp
10c6e5: 89 e5 mov %esp,%ebp
10c6e7: 57 push %edi
10c6e8: 56 push %esi
10c6e9: 53 push %ebx
10c6ea: 83 ec 1c sub $0x1c,%esp
10c6ed: 8b 75 08 mov 0x8(%ebp),%esi
10c6f0: 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 )
10c6f3: 85 f6 test %esi,%esi
10c6f5: 74 36 je 10c72d <_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 ) {
10c6f7: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10c6fb: 75 30 jne 10c72d <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10c6fd: 9c pushf
10c6fe: fa cli
10c6ff: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10c700: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10c707: 74 22 je 10c72b <_Thread_queue_Requeue+0x47><== NEVER TAKEN
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;
10c709: 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 );
10c710: 50 push %eax
10c711: 6a 01 push $0x1
10c713: 57 push %edi
10c714: 56 push %esi
10c715: e8 d6 27 00 00 call 10eef0 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10c71a: 83 c4 0c add $0xc,%esp
10c71d: 8d 45 e4 lea -0x1c(%ebp),%eax
10c720: 50 push %eax
10c721: 57 push %edi
10c722: 56 push %esi
10c723: e8 c0 fd ff ff call 10c4e8 <_Thread_queue_Enqueue_priority>
10c728: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10c72b: 53 push %ebx
10c72c: 9d popf
}
}
10c72d: 8d 65 f4 lea -0xc(%ebp),%esp
10c730: 5b pop %ebx
10c731: 5e pop %esi
10c732: 5f pop %edi
10c733: c9 leave
10c734: c3 ret
0010c738 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10c738: 55 push %ebp
10c739: 89 e5 mov %esp,%ebp
10c73b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c73e: 8d 45 f4 lea -0xc(%ebp),%eax
10c741: 50 push %eax
10c742: ff 75 08 pushl 0x8(%ebp)
10c745: e8 d6 f8 ff ff call 10c020 <_Thread_Get>
switch ( location ) {
10c74a: 83 c4 10 add $0x10,%esp
10c74d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c751: 75 17 jne 10c76a <_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 );
10c753: 83 ec 0c sub $0xc,%esp
10c756: 50 push %eax
10c757: e8 4c 28 00 00 call 10efa8 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c75c: a1 60 32 12 00 mov 0x123260,%eax
10c761: 48 dec %eax
10c762: a3 60 32 12 00 mov %eax,0x123260
10c767: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c76a: c9 leave
10c76b: c3 ret
00116974 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
116974: 55 push %ebp
116975: 89 e5 mov %esp,%ebp
116977: 57 push %edi
116978: 56 push %esi
116979: 53 push %ebx
11697a: 83 ec 4c sub $0x4c,%esp
11697d: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116980: 8d 55 dc lea -0x24(%ebp),%edx
116983: 8d 45 e0 lea -0x20(%ebp),%eax
116986: 89 45 dc mov %eax,-0x24(%ebp)
head->previous = NULL;
116989: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
116990: 89 55 e4 mov %edx,-0x1c(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116993: 8d 7d d0 lea -0x30(%ebp),%edi
116996: 8d 4d d4 lea -0x2c(%ebp),%ecx
116999: 89 4d d0 mov %ecx,-0x30(%ebp)
head->previous = NULL;
11699c: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
1169a3: 89 7d d8 mov %edi,-0x28(%ebp)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1169a6: 8d 53 30 lea 0x30(%ebx),%edx
1169a9: 89 55 c0 mov %edx,-0x40(%ebp)
/*
* 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 );
1169ac: 8d 73 68 lea 0x68(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
1169af: 89 45 b4 mov %eax,-0x4c(%ebp)
Chain_Control *tmp;
/*
* 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;
1169b2: 8d 4d dc lea -0x24(%ebp),%ecx
1169b5: 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;
1169b8: a1 68 c7 13 00 mov 0x13c768,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1169bd: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
1169c0: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1169c3: 51 push %ecx
1169c4: 57 push %edi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1169c5: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1169c7: 50 push %eax
1169c8: ff 75 c0 pushl -0x40(%ebp)
1169cb: e8 0c 38 00 00 call 11a1dc <_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();
1169d0: a1 e0 c6 13 00 mov 0x13c6e0,%eax
1169d5: 89 45 c4 mov %eax,-0x3c(%ebp)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
1169d8: 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 ) {
1169db: 83 c4 10 add $0x10,%esp
1169de: 39 45 c4 cmp %eax,-0x3c(%ebp)
1169e1: 76 10 jbe 1169f3 <_Timer_server_Body+0x7f>
/*
* 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 );
1169e3: 52 push %edx
1169e4: 57 push %edi
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
1169e5: 8b 55 c4 mov -0x3c(%ebp),%edx
1169e8: 29 c2 sub %eax,%edx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1169ea: 52 push %edx
1169eb: 56 push %esi
1169ec: e8 eb 37 00 00 call 11a1dc <_Watchdog_Adjust_to_chain>
1169f1: eb 0f jmp 116a02 <_Timer_server_Body+0x8e>
} else if ( snapshot < last_snapshot ) {
1169f3: 73 10 jae 116a05 <_Timer_server_Body+0x91>
/*
* 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 );
1169f5: 51 push %ecx
} else if ( snapshot < last_snapshot ) {
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
1169f6: 2b 45 c4 sub -0x3c(%ebp),%eax
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
1169f9: 50 push %eax
1169fa: 6a 01 push $0x1
1169fc: 56 push %esi
1169fd: e8 6e 37 00 00 call 11a170 <_Watchdog_Adjust>
116a02: 83 c4 10 add $0x10,%esp
}
watchdogs->last_snapshot = snapshot;
116a05: 8b 4d c4 mov -0x3c(%ebp),%ecx
116a08: 89 4b 74 mov %ecx,0x74(%ebx)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
116a0b: 8b 43 78 mov 0x78(%ebx),%eax
116a0e: 83 ec 0c sub $0xc,%esp
116a11: 50 push %eax
116a12: e8 a9 08 00 00 call 1172c0 <_Chain_Get>
if ( timer == NULL ) {
116a17: 83 c4 10 add $0x10,%esp
116a1a: 85 c0 test %eax,%eax
116a1c: 74 29 je 116a47 <_Timer_server_Body+0xd3><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116a1e: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
116a21: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
116a24: 75 0b jne 116a31 <_Timer_server_Body+0xbd><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116a26: 52 push %edx <== NOT EXECUTED
116a27: 52 push %edx <== NOT EXECUTED
116a28: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116a2b: 50 push %eax <== NOT EXECUTED
116a2c: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
116a2f: eb 0c jmp 116a3d <_Timer_server_Body+0xc9><== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116a31: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
116a34: 75 d5 jne 116a0b <_Timer_server_Body+0x97><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116a36: 51 push %ecx <== NOT EXECUTED
116a37: 51 push %ecx <== NOT EXECUTED
116a38: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116a3b: 50 push %eax <== NOT EXECUTED
116a3c: 56 push %esi <== NOT EXECUTED
116a3d: e8 22 38 00 00 call 11a264 <_Watchdog_Insert> <== NOT EXECUTED
116a42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116a45: eb c4 jmp 116a0b <_Timer_server_Body+0x97><== 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 );
116a47: 9c pushf
116a48: fa cli
116a49: 5a pop %edx
tmp = ts->insert_chain;
116a4a: 8b 43 78 mov 0x78(%ebx),%eax
if ( _Chain_Is_empty( insert_chain ) ) {
116a4d: b0 01 mov $0x1,%al
116a4f: 8b 4d b4 mov -0x4c(%ebp),%ecx
116a52: 39 4d dc cmp %ecx,-0x24(%ebp)
116a55: 75 09 jne 116a60 <_Timer_server_Body+0xec><== NEVER TAKEN
ts->insert_chain = NULL;
116a57: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
do_loop = false;
116a5e: 31 c0 xor %eax,%eax
}
_ISR_Enable( level );
116a60: 52 push %edx
116a61: 9d popf
* 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;
while ( do_loop ) {
116a62: 84 c0 test %al,%al
116a64: 0f 85 4e ff ff ff jne 1169b8 <_Timer_server_Body+0x44><== NEVER TAKEN
116a6a: 8d 45 d4 lea -0x2c(%ebp),%eax
_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 ) ) {
116a6d: 39 45 d0 cmp %eax,-0x30(%ebp)
116a70: 74 3a je 116aac <_Timer_server_Body+0x138>
116a72: 89 45 b0 mov %eax,-0x50(%ebp)
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
116a75: 9c pushf
116a76: fa cli
116a77: 59 pop %ecx
initialized = false;
}
#endif
return status;
}
116a78: 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))
116a7b: 3b 45 b0 cmp -0x50(%ebp),%eax
116a7e: 74 25 je 116aa5 <_Timer_server_Body+0x131>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
116a80: 8b 10 mov (%eax),%edx
head->next = new_first;
116a82: 89 55 d0 mov %edx,-0x30(%ebp)
new_first->previous = head;
116a85: 89 7a 04 mov %edi,0x4(%edx)
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
116a88: 85 c0 test %eax,%eax
116a8a: 74 19 je 116aa5 <_Timer_server_Body+0x131><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
116a8c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116a93: 51 push %ecx
116a94: 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 );
116a95: 52 push %edx
116a96: 52 push %edx
116a97: ff 70 24 pushl 0x24(%eax)
116a9a: ff 70 20 pushl 0x20(%eax)
116a9d: ff 50 1c call *0x1c(%eax)
}
116aa0: 83 c4 10 add $0x10,%esp
116aa3: eb d0 jmp 116a75 <_Timer_server_Body+0x101>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
116aa5: 51 push %ecx
116aa6: 9d popf
116aa7: e9 06 ff ff ff jmp 1169b2 <_Timer_server_Body+0x3e>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
116aac: c6 43 7c 00 movb $0x0,0x7c(%ebx)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
116ab0: e8 23 fe ff ff call 1168d8 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
116ab5: 51 push %ecx
116ab6: 51 push %ecx
116ab7: 6a 08 push $0x8
116ab9: ff 33 pushl (%ebx)
116abb: e8 34 31 00 00 call 119bf4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
116ac0: 89 d8 mov %ebx,%eax
116ac2: e8 21 fe ff ff call 1168e8 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
116ac7: 89 d8 mov %ebx,%eax
116ac9: e8 60 fe ff ff call 11692e <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
116ace: e8 d3 28 00 00 call 1193a6 <_Thread_Enable_dispatch>
ts->active = true;
116ad3: 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 );
116ad7: 8d 43 08 lea 0x8(%ebx),%eax
116ada: 89 04 24 mov %eax,(%esp)
116add: e8 9a 38 00 00 call 11a37c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
116ae2: 8d 43 40 lea 0x40(%ebx),%eax
116ae5: 89 04 24 mov %eax,(%esp)
116ae8: e8 8f 38 00 00 call 11a37c <_Watchdog_Remove>
116aed: 83 c4 10 add $0x10,%esp
116af0: e9 bd fe ff ff jmp 1169b2 <_Timer_server_Body+0x3e>
00116af5 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116af5: 55 push %ebp
116af6: 89 e5 mov %esp,%ebp
116af8: 57 push %edi
116af9: 56 push %esi
116afa: 53 push %ebx
116afb: 83 ec 2c sub $0x2c,%esp
116afe: 8b 5d 08 mov 0x8(%ebp),%ebx
116b01: 8b 75 0c mov 0xc(%ebp),%esi
if ( ts->insert_chain == NULL ) {
116b04: 8b 43 78 mov 0x78(%ebx),%eax
116b07: 85 c0 test %eax,%eax
116b09: 0f 85 de 00 00 00 jne 116bed <_Timer_server_Schedule_operation_method+0xf8><== NEVER TAKEN
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
116b0f: e8 c4 fd ff ff call 1168d8 <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116b14: 8b 46 38 mov 0x38(%esi),%eax
116b17: 83 f8 01 cmp $0x1,%eax
116b1a: 75 5a jne 116b76 <_Timer_server_Schedule_operation_method+0x81>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116b1c: 9c pushf
116b1d: fa cli
116b1e: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116b21: 8b 15 68 c7 13 00 mov 0x13c768,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
116b27: 8b 4b 3c mov 0x3c(%ebx),%ecx
initialized = false;
}
#endif
return status;
}
116b2a: 8b 43 30 mov 0x30(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
116b2d: 8d 7b 34 lea 0x34(%ebx),%edi
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
116b30: 39 f8 cmp %edi,%eax
116b32: 74 19 je 116b4d <_Timer_server_Schedule_operation_method+0x58>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116b34: 89 d7 mov %edx,%edi
116b36: 29 cf sub %ecx,%edi
116b38: 89 7d e4 mov %edi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
116b3b: 8b 78 10 mov 0x10(%eax),%edi
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
116b3e: 31 c9 xor %ecx,%ecx
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
116b40: 3b 7d e4 cmp -0x1c(%ebp),%edi
116b43: 76 05 jbe 116b4a <_Timer_server_Schedule_operation_method+0x55>
delta_interval -= delta;
116b45: 89 f9 mov %edi,%ecx
116b47: 2b 4d e4 sub -0x1c(%ebp),%ecx
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
116b4a: 89 48 10 mov %ecx,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
116b4d: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
116b50: ff 75 e0 pushl -0x20(%ebp)
116b53: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116b54: 50 push %eax
116b55: 50 push %eax
116b56: 83 c6 10 add $0x10,%esi
116b59: 56 push %esi
116b5a: 8d 43 30 lea 0x30(%ebx),%eax
116b5d: 50 push %eax
116b5e: e8 01 37 00 00 call 11a264 <_Watchdog_Insert>
if ( !ts->active ) {
116b63: 8a 43 7c mov 0x7c(%ebx),%al
116b66: 83 c4 10 add $0x10,%esp
116b69: 84 c0 test %al,%al
116b6b: 75 74 jne 116be1 <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_interval_system_watchdog( ts );
116b6d: 89 d8 mov %ebx,%eax
116b6f: e8 74 fd ff ff call 1168e8 <_Timer_server_Reset_interval_system_watchdog>
116b74: eb 6b jmp 116be1 <_Timer_server_Schedule_operation_method+0xec>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116b76: 83 f8 03 cmp $0x3,%eax
116b79: 75 66 jne 116be1 <_Timer_server_Schedule_operation_method+0xec>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116b7b: 9c pushf
116b7c: fa cli
116b7d: 8f 45 e0 popl -0x20(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
116b80: 8b 15 e0 c6 13 00 mov 0x13c6e0,%edx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
116b86: 8b 43 74 mov 0x74(%ebx),%eax
initialized = false;
}
#endif
return status;
}
116b89: 8b 4b 68 mov 0x68(%ebx),%ecx
116b8c: 8d 7b 6c lea 0x6c(%ebx),%edi
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
116b8f: 39 f9 cmp %edi,%ecx
116b91: 74 27 je 116bba <_Timer_server_Schedule_operation_method+0xc5>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
116b93: 8b 79 10 mov 0x10(%ecx),%edi
116b96: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
116b99: 39 c2 cmp %eax,%edx
116b9b: 76 15 jbe 116bb2 <_Timer_server_Schedule_operation_method+0xbd>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
116b9d: 89 d7 mov %edx,%edi
116b9f: 29 c7 sub %eax,%edi
116ba1: 89 7d e4 mov %edi,-0x1c(%ebp)
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
116ba4: 31 c0 xor %eax,%eax
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
116ba6: 39 7d d4 cmp %edi,-0x2c(%ebp)
116ba9: 76 0c jbe 116bb7 <_Timer_server_Schedule_operation_method+0xc2><== NEVER TAKEN
delta_interval -= delta;
116bab: 8b 45 d4 mov -0x2c(%ebp),%eax
116bae: 29 f8 sub %edi,%eax
116bb0: eb 05 jmp 116bb7 <_Timer_server_Schedule_operation_method+0xc2>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
116bb2: 03 45 d4 add -0x2c(%ebp),%eax
delta_interval += delta;
116bb5: 29 d0 sub %edx,%eax
}
first_watchdog->delta_interval = delta_interval;
116bb7: 89 41 10 mov %eax,0x10(%ecx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
116bba: 89 53 74 mov %edx,0x74(%ebx)
_ISR_Enable( level );
116bbd: ff 75 e0 pushl -0x20(%ebp)
116bc0: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116bc1: 57 push %edi
116bc2: 57 push %edi
116bc3: 83 c6 10 add $0x10,%esi
116bc6: 56 push %esi
116bc7: 8d 43 68 lea 0x68(%ebx),%eax
116bca: 50 push %eax
116bcb: e8 94 36 00 00 call 11a264 <_Watchdog_Insert>
if ( !ts->active ) {
116bd0: 8a 43 7c mov 0x7c(%ebx),%al
116bd3: 83 c4 10 add $0x10,%esp
116bd6: 84 c0 test %al,%al
116bd8: 75 07 jne 116be1 <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_tod_system_watchdog( ts );
116bda: 89 d8 mov %ebx,%eax
116bdc: e8 4d fd ff ff call 11692e <_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 );
}
}
116be1: 8d 65 f4 lea -0xc(%ebp),%esp
116be4: 5b pop %ebx
116be5: 5e pop %esi
116be6: 5f pop %edi
116be7: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
116be8: e9 b9 27 00 00 jmp 1193a6 <_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 );
116bed: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
116bf0: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED
116bf3: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
116bf6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
116bf9: 5b pop %ebx <== NOT EXECUTED
116bfa: 5e pop %esi <== NOT EXECUTED
116bfb: 5f pop %edi <== NOT EXECUTED
116bfc: 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 );
116bfd: e9 82 06 00 00 jmp 117284 <_Chain_Append> <== NOT EXECUTED
0010e21c <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
10e21c: 55 push %ebp
10e21d: 89 e5 mov %esp,%ebp
10e21f: 53 push %ebx
10e220: 8b 4d 08 mov 0x8(%ebp),%ecx
10e223: 8b 55 0c mov 0xc(%ebp),%edx
if ( lhs->tv_sec > rhs->tv_sec )
return true;
10e226: b0 01 mov $0x1,%al
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
10e228: 8b 1a mov (%edx),%ebx
10e22a: 39 19 cmp %ebx,(%ecx)
10e22c: 7f 0d jg 10e23b <_Timespec_Greater_than+0x1f>
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
10e22e: b0 00 mov $0x0,%al
)
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
10e230: 7c 09 jl 10e23b <_Timespec_Greater_than+0x1f><== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
10e232: 8b 42 04 mov 0x4(%edx),%eax
10e235: 39 41 04 cmp %eax,0x4(%ecx)
10e238: 0f 9f c0 setg %al
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
10e23b: 5b pop %ebx
10e23c: c9 leave
10e23d: c3 ret
0010cb2b <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10cb2b: 55 push %ebp
10cb2c: 89 e5 mov %esp,%ebp
10cb2e: 57 push %edi
10cb2f: 56 push %esi
10cb30: 53 push %ebx
10cb31: 83 ec 0c sub $0xc,%esp
10cb34: 8b 7d 10 mov 0x10(%ebp),%edi
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10cb37: 8b 1d 58 34 12 00 mov 0x123458,%ebx
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10cb3d: 0f b6 75 0c movzbl 0xc(%ebp),%esi
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10cb41: eb 15 jmp 10cb58 <_User_extensions_Fatal+0x2d>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10cb43: 8b 43 30 mov 0x30(%ebx),%eax
10cb46: 85 c0 test %eax,%eax
10cb48: 74 0b je 10cb55 <_User_extensions_Fatal+0x2a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10cb4a: 52 push %edx
10cb4b: 57 push %edi
10cb4c: 56 push %esi
10cb4d: ff 75 08 pushl 0x8(%ebp)
10cb50: ff d0 call *%eax
10cb52: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10cb55: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10cb58: 81 fb 50 34 12 00 cmp $0x123450,%ebx
10cb5e: 75 e3 jne 10cb43 <_User_extensions_Fatal+0x18><== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10cb60: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10cb63: 5b pop %ebx <== NOT EXECUTED
10cb64: 5e pop %esi <== NOT EXECUTED
10cb65: 5f pop %edi <== NOT EXECUTED
10cb66: c9 leave <== NOT EXECUTED
10cb67: c3 ret <== NOT EXECUTED
0010ca14 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10ca14: 55 push %ebp
10ca15: 89 e5 mov %esp,%ebp
10ca17: 57 push %edi
10ca18: 56 push %esi
10ca19: 53 push %ebx
10ca1a: 83 ec 1c sub $0x1c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10ca1d: a1 34 f2 11 00 mov 0x11f234,%eax
10ca22: 89 45 e4 mov %eax,-0x1c(%ebp)
initial_extensions = Configuration.User_extension_table;
10ca25: 8b 35 38 f2 11 00 mov 0x11f238,%esi
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10ca2b: c7 05 50 34 12 00 54 movl $0x123454,0x123450
10ca32: 34 12 00
head->previous = NULL;
10ca35: c7 05 54 34 12 00 00 movl $0x0,0x123454
10ca3c: 00 00 00
tail->previous = head;
10ca3f: c7 05 58 34 12 00 50 movl $0x123450,0x123458
10ca46: 34 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10ca49: c7 05 64 32 12 00 68 movl $0x123268,0x123264
10ca50: 32 12 00
head->previous = NULL;
10ca53: c7 05 68 32 12 00 00 movl $0x0,0x123268
10ca5a: 00 00 00
tail->previous = head;
10ca5d: c7 05 6c 32 12 00 64 movl $0x123264,0x12326c
10ca64: 32 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10ca67: 85 f6 test %esi,%esi
10ca69: 74 53 je 10cabe <_User_extensions_Handler_initialization+0xaa><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10ca6b: 6b c8 34 imul $0x34,%eax,%ecx
10ca6e: 83 ec 0c sub $0xc,%esp
10ca71: 51 push %ecx
10ca72: 89 4d e0 mov %ecx,-0x20(%ebp)
10ca75: e8 32 04 00 00 call 10ceac <_Workspace_Allocate_or_fatal_error>
10ca7a: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10ca7c: 31 c0 xor %eax,%eax
10ca7e: 8b 4d e0 mov -0x20(%ebp),%ecx
10ca81: 89 df mov %ebx,%edi
10ca83: f3 aa rep stos %al,%es:(%edi)
10ca85: 89 f0 mov %esi,%eax
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10ca87: 83 c4 10 add $0x10,%esp
10ca8a: 31 d2 xor %edx,%edx
10ca8c: eb 2b jmp 10cab9 <_User_extensions_Handler_initialization+0xa5>
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10ca8e: 8d 7b 14 lea 0x14(%ebx),%edi
10ca91: 89 c6 mov %eax,%esi
10ca93: b9 08 00 00 00 mov $0x8,%ecx
10ca98: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10ca9a: 83 ec 0c sub $0xc,%esp
10ca9d: 53 push %ebx
10ca9e: 89 45 dc mov %eax,-0x24(%ebp)
10caa1: 89 55 e0 mov %edx,-0x20(%ebp)
10caa4: e8 af 25 00 00 call 10f058 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10caa9: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10caac: 8b 55 e0 mov -0x20(%ebp),%edx
10caaf: 42 inc %edx
10cab0: 8b 45 dc mov -0x24(%ebp),%eax
10cab3: 83 c0 20 add $0x20,%eax
10cab6: 83 c4 10 add $0x10,%esp
10cab9: 3b 55 e4 cmp -0x1c(%ebp),%edx
10cabc: 72 d0 jb 10ca8e <_User_extensions_Handler_initialization+0x7a>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10cabe: 8d 65 f4 lea -0xc(%ebp),%esp
10cac1: 5b pop %ebx
10cac2: 5e pop %esi
10cac3: 5f pop %edi
10cac4: c9 leave
10cac5: c3 ret
0010caf9 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10caf9: 55 push %ebp
10cafa: 89 e5 mov %esp,%ebp
10cafc: 56 push %esi
10cafd: 53 push %ebx
10cafe: 8b 75 08 mov 0x8(%ebp),%esi
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10cb01: 8b 1d 58 34 12 00 mov 0x123458,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10cb07: eb 13 jmp 10cb1c <_User_extensions_Thread_exitted+0x23>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10cb09: 8b 43 2c mov 0x2c(%ebx),%eax
10cb0c: 85 c0 test %eax,%eax
10cb0e: 74 09 je 10cb19 <_User_extensions_Thread_exitted+0x20>
(*the_extension->Callouts.thread_exitted)( executing );
10cb10: 83 ec 0c sub $0xc,%esp
10cb13: 56 push %esi
10cb14: ff d0 call *%eax
10cb16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10cb19: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10cb1c: 81 fb 50 34 12 00 cmp $0x123450,%ebx
10cb22: 75 e5 jne 10cb09 <_User_extensions_Thread_exitted+0x10>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10cb24: 8d 65 f8 lea -0x8(%ebp),%esp
10cb27: 5b pop %ebx
10cb28: 5e pop %esi
10cb29: c9 leave
10cb2a: c3 ret
0010e364 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10e364: 55 push %ebp
10e365: 89 e5 mov %esp,%ebp
10e367: 57 push %edi
10e368: 56 push %esi
10e369: 53 push %ebx
10e36a: 83 ec 1c sub $0x1c,%esp
10e36d: 8b 75 08 mov 0x8(%ebp),%esi
10e370: 8b 7d 0c mov 0xc(%ebp),%edi
10e373: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10e376: 9c pushf
10e377: fa cli
10e378: 58 pop %eax
}
}
_ISR_Enable( level );
}
10e379: 8b 16 mov (%esi),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10e37b: 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 ) ) {
10e37e: 39 ca cmp %ecx,%edx
10e380: 74 44 je 10e3c6 <_Watchdog_Adjust+0x62>
switch ( direction ) {
10e382: 85 ff test %edi,%edi
10e384: 74 3c je 10e3c2 <_Watchdog_Adjust+0x5e>
10e386: 4f dec %edi
10e387: 75 3d jne 10e3c6 <_Watchdog_Adjust+0x62> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10e389: 01 5a 10 add %ebx,0x10(%edx)
break;
10e38c: eb 38 jmp 10e3c6 <_Watchdog_Adjust+0x62>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
10e38e: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10e390: 8b 7a 10 mov 0x10(%edx),%edi
10e393: 39 fb cmp %edi,%ebx
10e395: 73 07 jae 10e39e <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10e397: 29 df sub %ebx,%edi
10e399: 89 7a 10 mov %edi,0x10(%edx)
break;
10e39c: eb 28 jmp 10e3c6 <_Watchdog_Adjust+0x62>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10e39e: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10e3a5: 50 push %eax
10e3a6: 9d popf
_Watchdog_Tickle( header );
10e3a7: 83 ec 0c sub $0xc,%esp
10e3aa: 56 push %esi
10e3ab: 89 4d e4 mov %ecx,-0x1c(%ebp)
10e3ae: e8 9d 01 00 00 call 10e550 <_Watchdog_Tickle>
_ISR_Disable( level );
10e3b3: 9c pushf
10e3b4: fa cli
10e3b5: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10e3b6: 83 c4 10 add $0x10,%esp
10e3b9: 8b 4d e4 mov -0x1c(%ebp),%ecx
10e3bc: 39 0e cmp %ecx,(%esi)
10e3be: 74 06 je 10e3c6 <_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;
10e3c0: 29 fb sub %edi,%ebx
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10e3c2: 85 db test %ebx,%ebx
10e3c4: 75 c8 jne 10e38e <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10e3c6: 50 push %eax
10e3c7: 9d popf
}
10e3c8: 8d 65 f4 lea -0xc(%ebp),%esp
10e3cb: 5b pop %ebx
10e3cc: 5e pop %esi
10e3cd: 5f pop %edi
10e3ce: c9 leave
10e3cf: c3 ret
0010cd64 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10cd64: 55 push %ebp
10cd65: 89 e5 mov %esp,%ebp
10cd67: 56 push %esi
10cd68: 53 push %ebx
10cd69: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10cd6c: 9c pushf
10cd6d: fa cli
10cd6e: 5e pop %esi
previous_state = the_watchdog->state;
10cd6f: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10cd72: 83 f8 01 cmp $0x1,%eax
10cd75: 74 09 je 10cd80 <_Watchdog_Remove+0x1c>
10cd77: 72 42 jb 10cdbb <_Watchdog_Remove+0x57>
10cd79: 83 f8 03 cmp $0x3,%eax
10cd7c: 77 3d ja 10cdbb <_Watchdog_Remove+0x57> <== NEVER TAKEN
10cd7e: eb 09 jmp 10cd89 <_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;
10cd80: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10cd87: eb 32 jmp 10cdbb <_Watchdog_Remove+0x57>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10cd89: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
10cd90: 8b 0a mov (%edx),%ecx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10cd92: 83 39 00 cmpl $0x0,(%ecx)
10cd95: 74 06 je 10cd9d <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10cd97: 8b 5a 10 mov 0x10(%edx),%ebx
10cd9a: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10cd9d: 8b 1d 90 33 12 00 mov 0x123390,%ebx
10cda3: 85 db test %ebx,%ebx
10cda5: 74 0c je 10cdb3 <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10cda7: 8b 1d 9c 34 12 00 mov 0x12349c,%ebx
10cdad: 89 1d 28 33 12 00 mov %ebx,0x123328
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10cdb3: 8b 5a 04 mov 0x4(%edx),%ebx
next->previous = previous;
10cdb6: 89 59 04 mov %ebx,0x4(%ecx)
previous->next = next;
10cdb9: 89 0b mov %ecx,(%ebx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10cdbb: 8b 0d 94 33 12 00 mov 0x123394,%ecx
10cdc1: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10cdc4: 56 push %esi
10cdc5: 9d popf
return( previous_state );
}
10cdc6: 5b pop %ebx
10cdc7: 5e pop %esi
10cdc8: c9 leave
10cdc9: c3 ret
0010df08 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10df08: 55 push %ebp
10df09: 89 e5 mov %esp,%ebp
10df0b: 57 push %edi
10df0c: 56 push %esi
10df0d: 53 push %ebx
10df0e: 83 ec 20 sub $0x20,%esp
10df11: 8b 7d 08 mov 0x8(%ebp),%edi
10df14: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10df17: 9c pushf
10df18: fa cli
10df19: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10df1c: 56 push %esi
10df1d: 57 push %edi
10df1e: 68 e8 fc 11 00 push $0x11fce8
10df23: e8 c0 ab ff ff call 108ae8 <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
10df28: 8b 1e mov (%esi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10df2a: 83 c6 04 add $0x4,%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
10df2d: 83 c4 10 add $0x10,%esp
10df30: 39 f3 cmp %esi,%ebx
10df32: 74 1d je 10df51 <_Watchdog_Report_chain+0x49>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10df34: 52 push %edx
10df35: 52 push %edx
10df36: 53 push %ebx
10df37: 6a 00 push $0x0
10df39: e8 32 00 00 00 call 10df70 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
10df3e: 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 = _Chain_First( header ) ;
10df40: 83 c4 10 add $0x10,%esp
10df43: 39 f3 cmp %esi,%ebx
10df45: 75 ed jne 10df34 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10df47: 50 push %eax
10df48: 50 push %eax
10df49: 57 push %edi
10df4a: 68 ff fc 11 00 push $0x11fcff
10df4f: eb 08 jmp 10df59 <_Watchdog_Report_chain+0x51>
} else {
printk( "Chain is empty\n" );
10df51: 83 ec 0c sub $0xc,%esp
10df54: 68 0e fd 11 00 push $0x11fd0e
10df59: e8 8a ab ff ff call 108ae8 <printk>
10df5e: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10df61: ff 75 e4 pushl -0x1c(%ebp)
10df64: 9d popf
}
10df65: 8d 65 f4 lea -0xc(%ebp),%esp
10df68: 5b pop %ebx
10df69: 5e pop %esi
10df6a: 5f pop %edi
10df6b: c9 leave
10df6c: c3 ret
0010ab40 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10ab40: 55 push %ebp
10ab41: 89 e5 mov %esp,%ebp
10ab43: 56 push %esi
10ab44: 53 push %ebx
10ab45: 8b 5d 10 mov 0x10(%ebp),%ebx
10ab48: 8b 75 14 mov 0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
10ab4b: 50 push %eax
10ab4c: 50 push %eax
10ab4d: ff 75 0c pushl 0xc(%ebp)
10ab50: ff 75 08 pushl 0x8(%ebp)
10ab53: e8 40 04 00 00 call 10af98 <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
10ab58: 83 c4 10 add $0x10,%esp
10ab5b: 84 c0 test %al,%al
10ab5d: 74 11 je 10ab70 <rtems_chain_append_with_notification+0x30><== NEVER TAKEN
sc = rtems_event_send( task, events );
10ab5f: 89 75 0c mov %esi,0xc(%ebp)
10ab62: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10ab65: 8d 65 f8 lea -0x8(%ebp),%esp
10ab68: 5b pop %ebx
10ab69: 5e pop %esi
10ab6a: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
10ab6b: e9 cc f6 ff ff jmp 10a23c <rtems_event_send>
}
return sc;
}
10ab70: 31 c0 xor %eax,%eax
10ab72: 8d 65 f8 lea -0x8(%ebp),%esp
10ab75: 5b pop %ebx
10ab76: 5e pop %esi
10ab77: c9 leave
10ab78: c3 ret <== NOT EXECUTED
0010abb8 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10abb8: 55 push %ebp
10abb9: 89 e5 mov %esp,%ebp
10abbb: 57 push %edi
10abbc: 56 push %esi
10abbd: 53 push %ebx
10abbe: 83 ec 1c sub $0x1c,%esp
10abc1: 8b 7d 0c mov 0xc(%ebp),%edi
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10abc4: 8d 75 e4 lea -0x1c(%ebp),%esi
10abc7: eb 13 jmp 10abdc <rtems_chain_get_with_wait+0x24>
10abc9: 56 push %esi
10abca: ff 75 10 pushl 0x10(%ebp)
10abcd: 6a 00 push $0x0
10abcf: 57 push %edi
10abd0: e8 07 f5 ff ff call 10a0dc <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10abd5: 83 c4 10 add $0x10,%esp
10abd8: 85 c0 test %eax,%eax
10abda: 75 16 jne 10abf2 <rtems_chain_get_with_wait+0x3a><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10abdc: 83 ec 0c sub $0xc,%esp
10abdf: ff 75 08 pushl 0x8(%ebp)
10abe2: e8 51 04 00 00 call 10b038 <_Chain_Get>
10abe7: 89 c3 mov %eax,%ebx
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10abe9: 83 c4 10 add $0x10,%esp
10abec: 85 c0 test %eax,%eax
10abee: 74 d9 je 10abc9 <rtems_chain_get_with_wait+0x11>
10abf0: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10abf2: 8b 55 14 mov 0x14(%ebp),%edx
10abf5: 89 1a mov %ebx,(%edx)
return sc;
}
10abf7: 8d 65 f4 lea -0xc(%ebp),%esp
10abfa: 5b pop %ebx
10abfb: 5e pop %esi
10abfc: 5f pop %edi
10abfd: c9 leave
10abfe: c3 ret
0010ac00 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10ac00: 55 push %ebp
10ac01: 89 e5 mov %esp,%ebp
10ac03: 56 push %esi
10ac04: 53 push %ebx
10ac05: 8b 5d 10 mov 0x10(%ebp),%ebx
10ac08: 8b 75 14 mov 0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
10ac0b: 50 push %eax
10ac0c: 50 push %eax
10ac0d: ff 75 0c pushl 0xc(%ebp)
10ac10: ff 75 08 pushl 0x8(%ebp)
10ac13: e8 64 04 00 00 call 10b07c <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
10ac18: 83 c4 10 add $0x10,%esp
10ac1b: 84 c0 test %al,%al
10ac1d: 74 11 je 10ac30 <rtems_chain_prepend_with_notification+0x30><== NEVER TAKEN
sc = rtems_event_send( task, events );
10ac1f: 89 75 0c mov %esi,0xc(%ebp)
10ac22: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10ac25: 8d 65 f8 lea -0x8(%ebp),%esp
10ac28: 5b pop %ebx
10ac29: 5e pop %esi
10ac2a: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
10ac2b: e9 0c f6 ff ff jmp 10a23c <rtems_event_send>
}
return sc;
}
10ac30: 31 c0 xor %eax,%eax
10ac32: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10ac35: 5b pop %ebx <== NOT EXECUTED
10ac36: 5e pop %esi <== NOT EXECUTED
10ac37: c9 leave <== NOT EXECUTED
10ac38: c3 ret <== NOT EXECUTED
0010b720 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
10b720: 55 push %ebp
10b721: 89 e5 mov %esp,%ebp
10b723: 57 push %edi
10b724: 56 push %esi
10b725: 53 push %ebx
10b726: 83 ec 0c sub $0xc,%esp
10b729: 8b 5d 08 mov 0x8(%ebp),%ebx
10b72c: 8b 75 0c mov 0xc(%ebp),%esi
10b72f: 8b 45 10 mov 0x10(%ebp),%eax
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10b732: 8b 15 18 66 12 00 mov 0x126618,%edx
if ( rtems_interrupt_is_in_progress() )
10b738: 83 3d 5c 65 12 00 00 cmpl $0x0,0x12655c
10b73f: 0f 85 cc 00 00 00 jne 10b811 <rtems_io_register_driver+0xf1><== NEVER TAKEN
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10b745: 85 c0 test %eax,%eax
10b747: 0f 84 cb 00 00 00 je 10b818 <rtems_io_register_driver+0xf8>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10b74d: 89 10 mov %edx,(%eax)
if ( driver_table == NULL )
10b74f: 85 f6 test %esi,%esi
10b751: 0f 84 c1 00 00 00 je 10b818 <rtems_io_register_driver+0xf8>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10b757: 83 3e 00 cmpl $0x0,(%esi)
10b75a: 0f 85 cc 00 00 00 jne 10b82c <rtems_io_register_driver+0x10c>
10b760: 83 7e 04 00 cmpl $0x0,0x4(%esi)
10b764: 0f 85 c2 00 00 00 jne 10b82c <rtems_io_register_driver+0x10c>
10b76a: e9 a9 00 00 00 jmp 10b818 <rtems_io_register_driver+0xf8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b76f: 8b 15 20 63 12 00 mov 0x126320,%edx
10b775: 42 inc %edx
10b776: 89 15 20 63 12 00 mov %edx,0x126320
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10b77c: 85 db test %ebx,%ebx
10b77e: 75 32 jne 10b7b2 <rtems_io_register_driver+0x92>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10b780: 8b 0d 18 66 12 00 mov 0x126618,%ecx
10b786: 8b 15 1c 66 12 00 mov 0x12661c,%edx
10b78c: eb 15 jmp 10b7a3 <rtems_io_register_driver+0x83>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10b78e: 83 3a 00 cmpl $0x0,(%edx)
10b791: 0f 85 9f 00 00 00 jne 10b836 <rtems_io_register_driver+0x116>
10b797: 83 7a 04 00 cmpl $0x0,0x4(%edx)
10b79b: 0f 85 95 00 00 00 jne 10b836 <rtems_io_register_driver+0x116>
10b7a1: eb 04 jmp 10b7a7 <rtems_io_register_driver+0x87>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10b7a3: 39 cb cmp %ecx,%ebx
10b7a5: 72 e7 jb 10b78e <rtems_io_register_driver+0x6e>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10b7a7: 89 18 mov %ebx,(%eax)
if ( m != n )
10b7a9: 39 cb cmp %ecx,%ebx
10b7ab: 75 30 jne 10b7dd <rtems_io_register_driver+0xbd>
10b7ad: e9 8d 00 00 00 jmp 10b83f <rtems_io_register_driver+0x11f>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10b7b2: 6b d3 18 imul $0x18,%ebx,%edx
10b7b5: 03 15 1c 66 12 00 add 0x12661c,%edx
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10b7bb: 31 c9 xor %ecx,%ecx
10b7bd: 83 3a 00 cmpl $0x0,(%edx)
10b7c0: 75 09 jne 10b7cb <rtems_io_register_driver+0xab>
10b7c2: 31 c9 xor %ecx,%ecx
10b7c4: 83 7a 04 00 cmpl $0x0,0x4(%edx)
10b7c8: 0f 94 c1 sete %cl
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
10b7cb: 85 c9 test %ecx,%ecx
10b7cd: 75 0c jne 10b7db <rtems_io_register_driver+0xbb>
_Thread_Enable_dispatch();
10b7cf: e8 52 19 00 00 call 10d126 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10b7d4: b8 0c 00 00 00 mov $0xc,%eax
10b7d9: eb 49 jmp 10b824 <rtems_io_register_driver+0x104>
}
*registered_major = major;
10b7db: 89 18 mov %ebx,(%eax)
}
_IO_Driver_address_table [major] = *driver_table;
10b7dd: 6b c3 18 imul $0x18,%ebx,%eax
10b7e0: 03 05 1c 66 12 00 add 0x12661c,%eax
10b7e6: b9 06 00 00 00 mov $0x6,%ecx
10b7eb: 89 c7 mov %eax,%edi
10b7ed: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10b7ef: e8 32 19 00 00 call 10d126 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10b7f4: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10b7fb: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10b802: 89 5d 08 mov %ebx,0x8(%ebp)
}
10b805: 83 c4 0c add $0xc,%esp
10b808: 5b pop %ebx
10b809: 5e pop %esi
10b80a: 5f pop %edi
10b80b: c9 leave
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10b80c: e9 a3 66 00 00 jmp 111eb4 <rtems_io_initialize>
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10b811: b8 12 00 00 00 mov $0x12,%eax
10b816: eb 0c jmp 10b824 <rtems_io_register_driver+0x104>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10b818: b8 09 00 00 00 mov $0x9,%eax
10b81d: eb 05 jmp 10b824 <rtems_io_register_driver+0x104>
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
10b81f: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10b824: 83 c4 0c add $0xc,%esp
10b827: 5b pop %ebx
10b828: 5e pop %esi
10b829: 5f pop %edi
10b82a: c9 leave
10b82b: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10b82c: 39 d3 cmp %edx,%ebx
10b82e: 0f 82 3b ff ff ff jb 10b76f <rtems_io_register_driver+0x4f>
10b834: eb e9 jmp 10b81f <rtems_io_register_driver+0xff>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10b836: 43 inc %ebx
10b837: 83 c2 18 add $0x18,%edx
10b83a: e9 64 ff ff ff jmp 10b7a3 <rtems_io_register_driver+0x83>
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10b83f: e8 e2 18 00 00 call 10d126 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10b844: b8 05 00 00 00 mov $0x5,%eax
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
10b849: eb d9 jmp 10b824 <rtems_io_register_driver+0x104>
0010c6ac <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
10c6ac: 55 push %ebp
10c6ad: 89 e5 mov %esp,%ebp
10c6af: 57 push %edi
10c6b0: 56 push %esi
10c6b1: 53 push %ebx
10c6b2: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10c6b5: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10c6b9: 74 41 je 10c6fc <rtems_iterate_over_all_threads+0x50><== NEVER TAKEN
10c6bb: bb 01 00 00 00 mov $0x1,%ebx
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
10c6c0: 8b 04 9d 1c e0 12 00 mov 0x12e01c(,%ebx,4),%eax
10c6c7: 85 c0 test %eax,%eax
10c6c9: 74 2b je 10c6f6 <rtems_iterate_over_all_threads+0x4a>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10c6cb: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10c6ce: be 01 00 00 00 mov $0x1,%esi
10c6d3: 85 ff test %edi,%edi
10c6d5: 75 17 jne 10c6ee <rtems_iterate_over_all_threads+0x42>
10c6d7: eb 1d jmp 10c6f6 <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10c6d9: 8b 47 1c mov 0x1c(%edi),%eax
10c6dc: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !the_thread )
10c6df: 85 c0 test %eax,%eax
10c6e1: 74 0a je 10c6ed <rtems_iterate_over_all_threads+0x41><== NEVER TAKEN
continue;
(*routine)(the_thread);
10c6e3: 83 ec 0c sub $0xc,%esp
10c6e6: 50 push %eax
10c6e7: ff 55 08 call *0x8(%ebp)
10c6ea: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10c6ed: 46 inc %esi
10c6ee: 0f b7 47 10 movzwl 0x10(%edi),%eax
10c6f2: 39 c6 cmp %eax,%esi
10c6f4: 76 e3 jbe 10c6d9 <rtems_iterate_over_all_threads+0x2d>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10c6f6: 43 inc %ebx
10c6f7: 83 fb 04 cmp $0x4,%ebx
10c6fa: 75 c4 jne 10c6c0 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10c6fc: 8d 65 f4 lea -0xc(%ebp),%esp
10c6ff: 5b pop %ebx
10c700: 5e pop %esi
10c701: 5f pop %edi
10c702: c9 leave
10c703: c3 ret
001147e8 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
1147e8: 55 push %ebp
1147e9: 89 e5 mov %esp,%ebp
1147eb: 57 push %edi
1147ec: 56 push %esi
1147ed: 53 push %ebx
1147ee: 83 ec 1c sub $0x1c,%esp
1147f1: 8b 75 0c mov 0xc(%ebp),%esi
1147f4: 8b 55 10 mov 0x10(%ebp),%edx
1147f7: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
1147fa: b8 03 00 00 00 mov $0x3,%eax
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
1147ff: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
114803: 0f 84 ce 00 00 00 je 1148d7 <rtems_partition_create+0xef>
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
114809: b0 09 mov $0x9,%al
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
11480b: 85 f6 test %esi,%esi
11480d: 0f 84 c4 00 00 00 je 1148d7 <rtems_partition_create+0xef>
return RTEMS_INVALID_ADDRESS;
if ( !id )
114813: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
114817: 0f 84 ba 00 00 00 je 1148d7 <rtems_partition_create+0xef><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
11481d: 85 ff test %edi,%edi
11481f: 0f 84 ad 00 00 00 je 1148d2 <rtems_partition_create+0xea>
114825: 85 d2 test %edx,%edx
114827: 0f 84 a5 00 00 00 je 1148d2 <rtems_partition_create+0xea>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
11482d: b0 08 mov $0x8,%al
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
11482f: 39 fa cmp %edi,%edx
114831: 0f 82 a0 00 00 00 jb 1148d7 <rtems_partition_create+0xef>
114837: f7 c7 03 00 00 00 test $0x3,%edi
11483d: 0f 85 94 00 00 00 jne 1148d7 <rtems_partition_create+0xef>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
114843: b0 09 mov $0x9,%al
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
114845: f7 c6 03 00 00 00 test $0x3,%esi
11484b: 0f 85 86 00 00 00 jne 1148d7 <rtems_partition_create+0xef>
114851: a1 34 c6 13 00 mov 0x13c634,%eax
114856: 40 inc %eax
114857: a3 34 c6 13 00 mov %eax,0x13c634
* 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 );
11485c: 83 ec 0c sub $0xc,%esp
11485f: 68 c4 c4 13 00 push $0x13c4c4
114864: 89 55 e4 mov %edx,-0x1c(%ebp)
114867: e8 1c 3d 00 00 call 118588 <_Objects_Allocate>
11486c: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
11486e: 83 c4 10 add $0x10,%esp
114871: 85 c0 test %eax,%eax
114873: 8b 55 e4 mov -0x1c(%ebp),%edx
114876: 75 0c jne 114884 <rtems_partition_create+0x9c>
_Thread_Enable_dispatch();
114878: e8 29 4b 00 00 call 1193a6 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
11487d: b8 05 00 00 00 mov $0x5,%eax
114882: eb 53 jmp 1148d7 <rtems_partition_create+0xef>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
114884: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
114887: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
11488a: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
11488d: 8b 45 18 mov 0x18(%ebp),%eax
114890: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
114893: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
11489a: 57 push %edi
11489b: 89 d0 mov %edx,%eax
11489d: 31 d2 xor %edx,%edx
11489f: f7 f7 div %edi
1148a1: 50 push %eax
1148a2: 56 push %esi
1148a3: 8d 43 24 lea 0x24(%ebx),%eax
1148a6: 50 push %eax
1148a7: e8 38 2a 00 00 call 1172e4 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1148ac: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1148af: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1148b2: 8b 15 e0 c4 13 00 mov 0x13c4e0,%edx
1148b8: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1148bb: 8b 55 08 mov 0x8(%ebp),%edx
1148be: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1148c1: 8b 55 1c mov 0x1c(%ebp),%edx
1148c4: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1148c6: e8 db 4a 00 00 call 1193a6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1148cb: 83 c4 10 add $0x10,%esp
1148ce: 31 c0 xor %eax,%eax
1148d0: eb 05 jmp 1148d7 <rtems_partition_create+0xef>
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
1148d2: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1148d7: 8d 65 f4 lea -0xc(%ebp),%esp
1148da: 5b pop %ebx
1148db: 5e pop %esi
1148dc: 5f pop %edi
1148dd: c9 leave
1148de: c3 ret
0010b03d <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10b03d: 55 push %ebp
10b03e: 89 e5 mov %esp,%ebp
10b040: 57 push %edi
10b041: 56 push %esi
10b042: 53 push %ebx
10b043: 83 ec 30 sub $0x30,%esp
10b046: 8b 75 08 mov 0x8(%ebp),%esi
10b049: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
10b04c: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10b04f: 50 push %eax
10b050: 56 push %esi
10b051: 68 54 68 12 00 push $0x126854
10b056: e8 75 1d 00 00 call 10cdd0 <_Objects_Get>
10b05b: 89 c7 mov %eax,%edi
switch ( location ) {
10b05d: 83 c4 10 add $0x10,%esp
10b060: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10b064: 0f 85 3b 01 00 00 jne 10b1a5 <rtems_rate_monotonic_period+0x168><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10b06a: a1 84 6b 12 00 mov 0x126b84,%eax
10b06f: 39 47 40 cmp %eax,0x40(%edi)
10b072: 74 0f je 10b083 <rtems_rate_monotonic_period+0x46>
_Thread_Enable_dispatch();
10b074: e8 09 27 00 00 call 10d782 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10b079: be 17 00 00 00 mov $0x17,%esi
10b07e: e9 27 01 00 00 jmp 10b1aa <rtems_rate_monotonic_period+0x16d>
}
if ( length == RTEMS_PERIOD_STATUS ) {
10b083: 85 db test %ebx,%ebx
10b085: 75 1b jne 10b0a2 <rtems_rate_monotonic_period+0x65>
switch ( the_period->state ) {
10b087: 8b 47 38 mov 0x38(%edi),%eax
10b08a: 31 f6 xor %esi,%esi
10b08c: 83 f8 04 cmp $0x4,%eax
10b08f: 77 07 ja 10b098 <rtems_rate_monotonic_period+0x5b><== NEVER TAKEN
10b091: 8b 34 85 88 fa 11 00 mov 0x11fa88(,%eax,4),%esi
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10b098: e8 e5 26 00 00 call 10d782 <_Thread_Enable_dispatch>
return( return_value );
10b09d: e9 08 01 00 00 jmp 10b1aa <rtems_rate_monotonic_period+0x16d>
}
_ISR_Disable( level );
10b0a2: 9c pushf
10b0a3: fa cli
10b0a4: 8f 45 d4 popl -0x2c(%ebp)
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
10b0a7: 8b 47 38 mov 0x38(%edi),%eax
10b0aa: 85 c0 test %eax,%eax
10b0ac: 75 4c jne 10b0fa <rtems_rate_monotonic_period+0xbd>
_ISR_Enable( level );
10b0ae: ff 75 d4 pushl -0x2c(%ebp)
10b0b1: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10b0b2: 83 ec 0c sub $0xc,%esp
10b0b5: 57 push %edi
10b0b6: e8 3f fe ff ff call 10aefa <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10b0bb: 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;
10b0c2: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10b0c9: c7 47 2c b4 b3 10 00 movl $0x10b3b4,0x2c(%edi)
the_watchdog->id = id;
10b0d0: 89 77 30 mov %esi,0x30(%edi)
the_watchdog->user_data = user_data;
10b0d3: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10b0da: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b0dd: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b0e0: 58 pop %eax
10b0e1: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10b0e2: 83 c7 10 add $0x10,%edi
10b0e5: 57 push %edi
10b0e6: 68 28 6a 12 00 push $0x126a28
10b0eb: e8 e0 33 00 00 call 10e4d0 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10b0f0: e8 8d 26 00 00 call 10d782 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b0f5: 83 c4 10 add $0x10,%esp
10b0f8: eb 65 jmp 10b15f <rtems_rate_monotonic_period+0x122>
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
10b0fa: 83 f8 02 cmp $0x2,%eax
10b0fd: 75 64 jne 10b163 <rtems_rate_monotonic_period+0x126>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10b0ff: 83 ec 0c sub $0xc,%esp
10b102: 57 push %edi
10b103: e8 5a fe ff ff call 10af62 <_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;
10b108: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
the_period->next_length = length;
10b10f: 89 5f 3c mov %ebx,0x3c(%edi)
_ISR_Enable( level );
10b112: ff 75 d4 pushl -0x2c(%ebp)
10b115: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10b116: a1 84 6b 12 00 mov 0x126b84,%eax
10b11b: 8b 57 08 mov 0x8(%edi),%edx
10b11e: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10b121: 5b pop %ebx
10b122: 5e pop %esi
10b123: 68 00 40 00 00 push $0x4000
10b128: 50 push %eax
10b129: e8 e6 2d 00 00 call 10df14 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10b12e: 9c pushf
10b12f: fa cli
10b130: 5a pop %edx
local_state = the_period->state;
10b131: 8b 47 38 mov 0x38(%edi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
10b134: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
_ISR_Enable( level );
10b13b: 52 push %edx
10b13c: 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 )
10b13d: 83 c4 10 add $0x10,%esp
10b140: 83 f8 03 cmp $0x3,%eax
10b143: 75 15 jne 10b15a <rtems_rate_monotonic_period+0x11d>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10b145: 51 push %ecx
10b146: 51 push %ecx
10b147: 68 00 40 00 00 push $0x4000
10b14c: ff 35 84 6b 12 00 pushl 0x126b84
10b152: e8 f9 22 00 00 call 10d450 <_Thread_Clear_state>
10b157: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
10b15a: e8 23 26 00 00 call 10d782 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b15f: 31 f6 xor %esi,%esi
10b161: eb 47 jmp 10b1aa <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b163: be 04 00 00 00 mov $0x4,%esi
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
10b168: 83 f8 04 cmp $0x4,%eax
10b16b: 75 3d jne 10b1aa <rtems_rate_monotonic_period+0x16d><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10b16d: 83 ec 0c sub $0xc,%esp
10b170: 57 push %edi
10b171: e8 ec fd ff ff call 10af62 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10b176: ff 75 d4 pushl -0x2c(%ebp)
10b179: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10b17a: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
the_period->next_length = length;
10b181: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b184: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b187: 58 pop %eax
10b188: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10b189: 83 c7 10 add $0x10,%edi
10b18c: 57 push %edi
10b18d: 68 28 6a 12 00 push $0x126a28
10b192: e8 39 33 00 00 call 10e4d0 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10b197: e8 e6 25 00 00 call 10d782 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10b19c: 83 c4 10 add $0x10,%esp
10b19f: 66 be 06 00 mov $0x6,%si
10b1a3: eb 05 jmp 10b1aa <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b1a5: be 04 00 00 00 mov $0x4,%esi
}
10b1aa: 89 f0 mov %esi,%eax
10b1ac: 8d 65 f4 lea -0xc(%ebp),%esp
10b1af: 5b pop %ebx
10b1b0: 5e pop %esi
10b1b1: 5f pop %edi
10b1b2: c9 leave
10b1b3: c3 ret
0010b1b4 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10b1b4: 55 push %ebp
10b1b5: 89 e5 mov %esp,%ebp
10b1b7: 57 push %edi
10b1b8: 56 push %esi
10b1b9: 53 push %ebx
10b1ba: 83 ec 7c sub $0x7c,%esp
10b1bd: 8b 5d 08 mov 0x8(%ebp),%ebx
10b1c0: 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 )
10b1c3: 85 ff test %edi,%edi
10b1c5: 0f 84 2b 01 00 00 je 10b2f6 <rtems_rate_monotonic_report_statistics_with_plugin+0x142><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10b1cb: 52 push %edx
10b1cc: 52 push %edx
10b1cd: 68 9c fa 11 00 push $0x11fa9c
10b1d2: 53 push %ebx
10b1d3: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10b1d5: 5e pop %esi
10b1d6: 58 pop %eax
10b1d7: 68 ba fa 11 00 push $0x11faba
10b1dc: 53 push %ebx
10b1dd: ff d7 call *%edi
(*print)( context, "--- Wall times are in seconds ---\n" );
10b1df: 5a pop %edx
10b1e0: 59 pop %ecx
10b1e1: 68 dc fa 11 00 push $0x11fadc
10b1e6: 53 push %ebx
10b1e7: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10b1e9: 5e pop %esi
10b1ea: 58 pop %eax
10b1eb: 68 ff fa 11 00 push $0x11faff
10b1f0: 53 push %ebx
10b1f1: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10b1f3: 5a pop %edx
10b1f4: 59 pop %ecx
10b1f5: 68 4a fb 11 00 push $0x11fb4a
10b1fa: 53 push %ebx
10b1fb: 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 ;
10b1fd: 8b 35 5c 68 12 00 mov 0x12685c,%esi
10b203: 83 c4 10 add $0x10,%esp
10b206: e9 df 00 00 00 jmp 10b2ea <rtems_rate_monotonic_report_statistics_with_plugin+0x136>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10b20b: 50 push %eax
10b20c: 50 push %eax
10b20d: 8d 45 88 lea -0x78(%ebp),%eax
10b210: 50 push %eax
10b211: 56 push %esi
10b212: e8 a1 4b 00 00 call 10fdb8 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10b217: 83 c4 10 add $0x10,%esp
10b21a: 85 c0 test %eax,%eax
10b21c: 0f 85 c7 00 00 00 jne 10b2e9 <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
10b222: 51 push %ecx
10b223: 51 push %ecx
10b224: 8d 55 c0 lea -0x40(%ebp),%edx
10b227: 52 push %edx
10b228: 56 push %esi
10b229: e8 2e 4c 00 00 call 10fe5c <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10b22e: 83 c4 0c add $0xc,%esp
10b231: 8d 45 e3 lea -0x1d(%ebp),%eax
10b234: 50 push %eax
10b235: 6a 05 push $0x5
10b237: ff 75 c0 pushl -0x40(%ebp)
10b23a: e8 01 02 00 00 call 10b440 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10b23f: 58 pop %eax
10b240: 5a pop %edx
10b241: ff 75 8c pushl -0x74(%ebp)
10b244: ff 75 88 pushl -0x78(%ebp)
10b247: 8d 55 e3 lea -0x1d(%ebp),%edx
10b24a: 52 push %edx
10b24b: 56 push %esi
10b24c: 68 96 fb 11 00 push $0x11fb96
10b251: 53 push %ebx
10b252: ff d7 call *%edi
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10b254: 8b 45 88 mov -0x78(%ebp),%eax
10b257: 83 c4 20 add $0x20,%esp
10b25a: 85 c0 test %eax,%eax
10b25c: 75 0f jne 10b26d <rtems_rate_monotonic_report_statistics_with_plugin+0xb9>
(*print)( context, "\n" );
10b25e: 51 push %ecx
10b25f: 51 push %ecx
10b260: 68 10 fe 11 00 push $0x11fe10
10b265: 53 push %ebx
10b266: ff d7 call *%edi
continue;
10b268: 83 c4 10 add $0x10,%esp
10b26b: eb 7c jmp 10b2e9 <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
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 );
10b26d: 52 push %edx
10b26e: 8d 55 d8 lea -0x28(%ebp),%edx
10b271: 52 push %edx
10b272: 50 push %eax
10b273: 8d 45 a0 lea -0x60(%ebp),%eax
10b276: 50 push %eax
10b277: e8 28 2f 00 00 call 10e1a4 <_Timespec_Divide_by_integer>
(*print)( context,
10b27c: 8b 45 dc mov -0x24(%ebp),%eax
10b27f: b9 e8 03 00 00 mov $0x3e8,%ecx
10b284: 99 cltd
10b285: f7 f9 idiv %ecx
10b287: 50 push %eax
10b288: ff 75 d8 pushl -0x28(%ebp)
10b28b: 8b 45 9c mov -0x64(%ebp),%eax
10b28e: 99 cltd
10b28f: f7 f9 idiv %ecx
10b291: 50 push %eax
10b292: ff 75 98 pushl -0x68(%ebp)
10b295: 8b 45 94 mov -0x6c(%ebp),%eax
10b298: 99 cltd
10b299: f7 f9 idiv %ecx
10b29b: 50 push %eax
10b29c: ff 75 90 pushl -0x70(%ebp)
10b29f: 68 ad fb 11 00 push $0x11fbad
10b2a4: 53 push %ebx
10b2a5: 89 4d 84 mov %ecx,-0x7c(%ebp)
10b2a8: 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);
10b2aa: 83 c4 2c add $0x2c,%esp
10b2ad: 8d 55 d8 lea -0x28(%ebp),%edx
10b2b0: 52 push %edx
10b2b1: ff 75 88 pushl -0x78(%ebp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
10b2b4: 8d 45 b8 lea -0x48(%ebp),%eax
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10b2b7: 50 push %eax
10b2b8: e8 e7 2e 00 00 call 10e1a4 <_Timespec_Divide_by_integer>
(*print)( context,
10b2bd: 8b 45 dc mov -0x24(%ebp),%eax
10b2c0: 8b 4d 84 mov -0x7c(%ebp),%ecx
10b2c3: 99 cltd
10b2c4: f7 f9 idiv %ecx
10b2c6: 50 push %eax
10b2c7: ff 75 d8 pushl -0x28(%ebp)
10b2ca: 8b 45 b4 mov -0x4c(%ebp),%eax
10b2cd: 99 cltd
10b2ce: f7 f9 idiv %ecx
10b2d0: 50 push %eax
10b2d1: ff 75 b0 pushl -0x50(%ebp)
10b2d4: 8b 45 ac mov -0x54(%ebp),%eax
10b2d7: 99 cltd
10b2d8: f7 f9 idiv %ecx
10b2da: 50 push %eax
10b2db: ff 75 a8 pushl -0x58(%ebp)
10b2de: 68 cc fb 11 00 push $0x11fbcc
10b2e3: 53 push %ebx
10b2e4: ff d7 call *%edi
10b2e6: 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++ ) {
10b2e9: 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 ;
10b2ea: 3b 35 60 68 12 00 cmp 0x126860,%esi
10b2f0: 0f 86 15 ff ff ff jbe 10b20b <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10b2f6: 8d 65 f4 lea -0xc(%ebp),%esp
10b2f9: 5b pop %ebx
10b2fa: 5e pop %esi
10b2fb: 5f pop %edi
10b2fc: c9 leave
10b2fd: c3 ret
00115b48 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115b48: 55 push %ebp
115b49: 89 e5 mov %esp,%ebp
115b4b: 53 push %ebx
115b4c: 83 ec 14 sub $0x14,%esp
115b4f: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
115b52: b8 0a 00 00 00 mov $0xa,%eax
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
115b57: 85 db test %ebx,%ebx
115b59: 74 6d je 115bc8 <rtems_signal_send+0x80>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115b5b: 50 push %eax
115b5c: 50 push %eax
115b5d: 8d 45 f4 lea -0xc(%ebp),%eax
115b60: 50 push %eax
115b61: ff 75 08 pushl 0x8(%ebp)
115b64: e8 5f 38 00 00 call 1193c8 <_Thread_Get>
switch ( location ) {
115b69: 83 c4 10 add $0x10,%esp
115b6c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115b70: 75 51 jne 115bc3 <rtems_signal_send+0x7b>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
115b72: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
115b78: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115b7c: 74 39 je 115bb7 <rtems_signal_send+0x6f>
if ( asr->is_enabled ) {
115b7e: 80 7a 08 00 cmpb $0x0,0x8(%edx)
115b82: 74 22 je 115ba6 <rtems_signal_send+0x5e>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115b84: 9c pushf
115b85: fa cli
115b86: 59 pop %ecx
*signal_set |= signals;
115b87: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
115b8a: 51 push %ecx
115b8b: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
115b8c: 83 3d 78 c8 13 00 00 cmpl $0x0,0x13c878
115b93: 74 19 je 115bae <rtems_signal_send+0x66>
115b95: 3b 05 7c c8 13 00 cmp 0x13c87c,%eax
115b9b: 75 11 jne 115bae <rtems_signal_send+0x66><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
115b9d: c6 05 88 c8 13 00 01 movb $0x1,0x13c888
115ba4: eb 08 jmp 115bae <rtems_signal_send+0x66>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115ba6: 9c pushf
115ba7: fa cli
115ba8: 58 pop %eax
*signal_set |= signals;
115ba9: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
115bac: 50 push %eax
115bad: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
115bae: e8 f3 37 00 00 call 1193a6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115bb3: 31 c0 xor %eax,%eax
115bb5: eb 11 jmp 115bc8 <rtems_signal_send+0x80>
}
_Thread_Enable_dispatch();
115bb7: e8 ea 37 00 00 call 1193a6 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
115bbc: b8 0b 00 00 00 mov $0xb,%eax
115bc1: eb 05 jmp 115bc8 <rtems_signal_send+0x80>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115bc3: b8 04 00 00 00 mov $0x4,%eax
}
115bc8: 8b 5d fc mov -0x4(%ebp),%ebx
115bcb: c9 leave
115bcc: c3 ret
0010fee4 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
10fee4: 55 push %ebp
10fee5: 89 e5 mov %esp,%ebp
10fee7: 57 push %edi
10fee8: 56 push %esi
10fee9: 53 push %ebx
10feea: 83 ec 1c sub $0x1c,%esp
10feed: 8b 4d 10 mov 0x10(%ebp),%ecx
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
10fef0: b8 09 00 00 00 mov $0x9,%eax
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
10fef5: 85 c9 test %ecx,%ecx
10fef7: 0f 84 fb 00 00 00 je 10fff8 <rtems_task_mode+0x114> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
10fefd: 8b 35 a0 34 12 00 mov 0x1234a0,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10ff03: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
10ff09: 80 7e 74 01 cmpb $0x1,0x74(%esi)
10ff0d: 19 ff sbb %edi,%edi
10ff0f: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
10ff15: 83 7e 7c 00 cmpl $0x0,0x7c(%esi)
10ff19: 74 06 je 10ff21 <rtems_task_mode+0x3d>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
10ff1b: 81 cf 00 02 00 00 or $0x200,%edi
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
10ff21: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
10ff25: 19 d2 sbb %edx,%edx
10ff27: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
10ff2d: 89 55 e4 mov %edx,-0x1c(%ebp)
10ff30: 89 4d e0 mov %ecx,-0x20(%ebp)
10ff33: e8 0d d3 ff ff call 10d245 <_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;
10ff38: 8b 55 e4 mov -0x1c(%ebp),%edx
10ff3b: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
10ff3d: 09 f8 or %edi,%eax
10ff3f: 8b 4d e0 mov -0x20(%ebp),%ecx
10ff42: 89 01 mov %eax,(%ecx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
10ff44: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
10ff4b: 74 0b je 10ff58 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
10ff4d: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp)
10ff54: 0f 94 46 74 sete 0x74(%esi)
if ( mask & RTEMS_TIMESLICE_MASK ) {
10ff58: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
10ff5f: 74 21 je 10ff82 <rtems_task_mode+0x9e>
if ( _Modes_Is_timeslice(mode_set) ) {
10ff61: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
10ff68: 74 11 je 10ff7b <rtems_task_mode+0x97>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10ff6a: c7 46 7c 01 00 00 00 movl $0x1,0x7c(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10ff71: a1 30 32 12 00 mov 0x123230,%eax
10ff76: 89 46 78 mov %eax,0x78(%esi)
10ff79: eb 07 jmp 10ff82 <rtems_task_mode+0x9e>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10ff7b: c7 46 7c 00 00 00 00 movl $0x0,0x7c(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
10ff82: f6 45 0c 01 testb $0x1,0xc(%ebp)
10ff86: 74 0a je 10ff92 <rtems_task_mode+0xae>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
10ff88: f6 45 08 01 testb $0x1,0x8(%ebp)
10ff8c: 74 03 je 10ff91 <rtems_task_mode+0xad>
10ff8e: fa cli
10ff8f: eb 01 jmp 10ff92 <rtems_task_mode+0xae>
10ff91: fb sti
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
10ff92: 31 c9 xor %ecx,%ecx
if ( mask & RTEMS_ASR_MASK ) {
10ff94: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
10ff9b: 74 2a je 10ffc7 <rtems_task_mode+0xe3>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
10ff9d: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp)
10ffa4: 0f 94 c0 sete %al
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
10ffa7: 3a 43 08 cmp 0x8(%ebx),%al
10ffaa: 74 1b je 10ffc7 <rtems_task_mode+0xe3>
asr->is_enabled = is_asr_enabled;
10ffac: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
10ffaf: 9c pushf
10ffb0: fa cli
10ffb1: 58 pop %eax
_signals = information->signals_pending;
10ffb2: 8b 53 18 mov 0x18(%ebx),%edx
information->signals_pending = information->signals_posted;
10ffb5: 8b 4b 14 mov 0x14(%ebx),%ecx
10ffb8: 89 4b 18 mov %ecx,0x18(%ebx)
information->signals_posted = _signals;
10ffbb: 89 53 14 mov %edx,0x14(%ebx)
_ISR_Enable( _level );
10ffbe: 50 push %eax
10ffbf: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
10ffc0: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10ffc4: 0f 95 c1 setne %cl
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
10ffc7: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
10ffc9: 83 3d dc 33 12 00 03 cmpl $0x3,0x1233dc
10ffd0: 75 26 jne 10fff8 <rtems_task_mode+0x114> <== NEVER TAKEN
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
10ffd2: 8b 15 a0 34 12 00 mov 0x1234a0,%edx
if ( are_signals_pending ||
10ffd8: 84 c9 test %cl,%cl
10ffda: 75 0e jne 10ffea <rtems_task_mode+0x106>
10ffdc: 3b 15 a4 34 12 00 cmp 0x1234a4,%edx
10ffe2: 74 14 je 10fff8 <rtems_task_mode+0x114>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
10ffe4: 80 7a 74 00 cmpb $0x0,0x74(%edx)
10ffe8: 74 0e je 10fff8 <rtems_task_mode+0x114> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
10ffea: c6 05 ac 34 12 00 01 movb $0x1,0x1234ac
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
10fff1: e8 ce be ff ff call 10bec4 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
10fff6: 31 c0 xor %eax,%eax
}
10fff8: 83 c4 1c add $0x1c,%esp
10fffb: 5b pop %ebx
10fffc: 5e pop %esi
10fffd: 5f pop %edi
10fffe: c9 leave
10ffff: c3 ret
0010dd24 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10dd24: 55 push %ebp
10dd25: 89 e5 mov %esp,%ebp
10dd27: 56 push %esi
10dd28: 53 push %ebx
10dd29: 83 ec 10 sub $0x10,%esp
10dd2c: 8b 5d 0c mov 0xc(%ebp),%ebx
10dd2f: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10dd32: 85 db test %ebx,%ebx
10dd34: 74 10 je 10dd46 <rtems_task_set_priority+0x22>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10dd36: 0f b6 15 34 35 12 00 movzbl 0x123534,%edx
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10dd3d: b8 13 00 00 00 mov $0x13,%eax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10dd42: 39 d3 cmp %edx,%ebx
10dd44: 77 52 ja 10dd98 <rtems_task_set_priority+0x74>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10dd46: b8 09 00 00 00 mov $0x9,%eax
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10dd4b: 85 f6 test %esi,%esi
10dd4d: 74 49 je 10dd98 <rtems_task_set_priority+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10dd4f: 51 push %ecx
10dd50: 51 push %ecx
10dd51: 8d 45 f4 lea -0xc(%ebp),%eax
10dd54: 50 push %eax
10dd55: ff 75 08 pushl 0x8(%ebp)
10dd58: e8 27 1d 00 00 call 10fa84 <_Thread_Get>
switch ( location ) {
10dd5d: 83 c4 10 add $0x10,%esp
10dd60: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10dd64: 75 2d jne 10dd93 <rtems_task_set_priority+0x6f>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10dd66: 8b 50 14 mov 0x14(%eax),%edx
10dd69: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10dd6b: 85 db test %ebx,%ebx
10dd6d: 74 1b je 10dd8a <rtems_task_set_priority+0x66>
the_thread->real_priority = new_priority;
10dd6f: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10dd72: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10dd76: 74 05 je 10dd7d <rtems_task_set_priority+0x59>
10dd78: 39 58 14 cmp %ebx,0x14(%eax)
10dd7b: 76 0d jbe 10dd8a <rtems_task_set_priority+0x66><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10dd7d: 52 push %edx
10dd7e: 6a 00 push $0x0
10dd80: 53 push %ebx
10dd81: 50 push %eax
10dd82: e8 95 18 00 00 call 10f61c <_Thread_Change_priority>
10dd87: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10dd8a: e8 d3 1c 00 00 call 10fa62 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10dd8f: 31 c0 xor %eax,%eax
10dd91: eb 05 jmp 10dd98 <rtems_task_set_priority+0x74>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10dd93: b8 04 00 00 00 mov $0x4,%eax
}
10dd98: 8d 65 f8 lea -0x8(%ebp),%esp
10dd9b: 5b pop %ebx
10dd9c: 5e pop %esi
10dd9d: c9 leave
10dd9e: c3 ret
0011639c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
11639c: 55 push %ebp
11639d: 89 e5 mov %esp,%ebp
11639f: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
1163a2: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
1163a5: 50 push %eax
1163a6: ff 75 08 pushl 0x8(%ebp)
1163a9: 68 f4 c8 13 00 push $0x13c8f4
1163ae: e8 41 26 00 00 call 1189f4 <_Objects_Get>
switch ( location ) {
1163b3: 83 c4 10 add $0x10,%esp
1163b6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1163ba: 75 1e jne 1163da <rtems_timer_cancel+0x3e>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
1163bc: 83 78 38 04 cmpl $0x4,0x38(%eax)
1163c0: 74 0f je 1163d1 <rtems_timer_cancel+0x35><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
1163c2: 83 ec 0c sub $0xc,%esp
1163c5: 83 c0 10 add $0x10,%eax
1163c8: 50 push %eax
1163c9: e8 ae 3f 00 00 call 11a37c <_Watchdog_Remove>
1163ce: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
1163d1: e8 d0 2f 00 00 call 1193a6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1163d6: 31 c0 xor %eax,%eax
1163d8: eb 05 jmp 1163df <rtems_timer_cancel+0x43>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1163da: b8 04 00 00 00 mov $0x4,%eax
}
1163df: c9 leave
1163e0: c3 ret
001167fc <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1167fc: 55 push %ebp
1167fd: 89 e5 mov %esp,%ebp
1167ff: 57 push %edi
116800: 56 push %esi
116801: 53 push %ebx
116802: 83 ec 1c sub $0x1c,%esp
116805: 8b 7d 0c mov 0xc(%ebp),%edi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
116808: 8b 35 34 c9 13 00 mov 0x13c934,%esi
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
11680e: bb 0e 00 00 00 mov $0xe,%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
116813: 85 f6 test %esi,%esi
116815: 0f 84 b1 00 00 00 je 1168cc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
11681b: b3 0b mov $0xb,%bl
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
11681d: 80 3d 48 c6 13 00 00 cmpb $0x0,0x13c648
116824: 0f 84 a2 00 00 00 je 1168cc <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
11682a: b3 09 mov $0x9,%bl
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
11682c: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
116830: 0f 84 96 00 00 00 je 1168cc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
116836: 83 ec 0c sub $0xc,%esp
116839: 57 push %edi
11683a: e8 ad d6 ff ff call 113eec <_TOD_Validate>
11683f: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_CLOCK;
116842: b3 14 mov $0x14,%bl
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
116844: 84 c0 test %al,%al
116846: 0f 84 80 00 00 00 je 1168cc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
11684c: 83 ec 0c sub $0xc,%esp
11684f: 57 push %edi
116850: e8 2f d6 ff ff call 113e84 <_TOD_To_seconds>
116855: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
116857: 83 c4 10 add $0x10,%esp
11685a: 3b 05 e0 c6 13 00 cmp 0x13c6e0,%eax
116860: 76 6a jbe 1168cc <rtems_timer_server_fire_when+0xd0>
116862: 51 push %ecx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
116863: 8d 45 e4 lea -0x1c(%ebp),%eax
116866: 50 push %eax
116867: ff 75 08 pushl 0x8(%ebp)
11686a: 68 f4 c8 13 00 push $0x13c8f4
11686f: e8 80 21 00 00 call 1189f4 <_Objects_Get>
116874: 89 c3 mov %eax,%ebx
switch ( location ) {
116876: 83 c4 10 add $0x10,%esp
116879: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
11687d: 75 48 jne 1168c7 <rtems_timer_server_fire_when+0xcb>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11687f: 83 ec 0c sub $0xc,%esp
116882: 8d 40 10 lea 0x10(%eax),%eax
116885: 50 push %eax
116886: e8 f1 3a 00 00 call 11a37c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
11688b: 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;
116892: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
116899: 8b 45 10 mov 0x10(%ebp),%eax
11689c: 89 43 2c mov %eax,0x2c(%ebx)
the_watchdog->id = id;
11689f: 8b 45 08 mov 0x8(%ebp),%eax
1168a2: 89 43 30 mov %eax,0x30(%ebx)
the_watchdog->user_data = user_data;
1168a5: 8b 45 14 mov 0x14(%ebp),%eax
1168a8: 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();
1168ab: 2b 3d e0 c6 13 00 sub 0x13c6e0,%edi
1168b1: 89 7b 1c mov %edi,0x1c(%ebx)
(*timer_server->schedule_operation)( timer_server, the_timer );
1168b4: 58 pop %eax
1168b5: 5a pop %edx
1168b6: 53 push %ebx
1168b7: 56 push %esi
1168b8: ff 56 04 call *0x4(%esi)
_Thread_Enable_dispatch();
1168bb: e8 e6 2a 00 00 call 1193a6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1168c0: 83 c4 10 add $0x10,%esp
1168c3: 31 db xor %ebx,%ebx
1168c5: eb 05 jmp 1168cc <rtems_timer_server_fire_when+0xd0>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1168c7: bb 04 00 00 00 mov $0x4,%ebx
}
1168cc: 89 d8 mov %ebx,%eax
1168ce: 8d 65 f4 lea -0xc(%ebp),%esp
1168d1: 5b pop %ebx
1168d2: 5e pop %esi
1168d3: 5f pop %edi
1168d4: c9 leave
1168d5: c3 ret